]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commit
package_rpm: add RPMBUILD_EXTRA_PARAMS variable jansa/rpm-user-defined
authorMartin Jansa <martin.jansa@gmail.com>
Thu, 1 Feb 2024 10:45:02 +0000 (11:45 +0100)
committerMartin Jansa <martin.jansa@gmail.com>
Thu, 1 Feb 2024 11:55:24 +0000 (12:55 +0100)
commit6d26f0ebdbe46cc1dc8e0278493a2601af79e640
tree38913bb08a2ac4cd6e1e6da532c6ca17e927d4df
parentb40bc4ad79d2087966aea6785792bb018bce1912
package_rpm: add RPMBUILD_EXTRA_PARAMS variable

* e.g. for DISTROs which define extra user-defined fields with
  PACKAGE_ADD_METADATA/PACKAGE_ADD_METADATA_RPM
  as undefined fields in packagedata are fatal error for rpmbuild:
  "error: line 9: Unknown tag: Author: Unspecified"
  as shown in:
  http://errors.yoctoproject.org/Errors/Details/751706/
  with "Author" field added with:

  PACKAGE_CLASSES = "package_rpm"
  PACKAGE_ADD_AUTHOR_METADATA = "test-author"
  PACKAGE_ADD_METADATA = "Author: ${PACKAGE_ADD_AUTHOR_METADATA}"

  to fix rpm build you can use:
  RPMBUILD_EXTRA_PARAMS = " --define '_Author Author'"
  keep in mind that this doesn't cause this Author field to be
  added in .rpm, it just avoids the BUILDSPEC failure.

  and for ipk build:
  OPKG_MAKE_INDEX_EXTRA_PARAMS = "-f"

  alternatively you can avoid additional packagedata fields ending
  in the package manager (if you use them only with buildhistory
  or packagedata) with:
  PACKAGE_ADD_METADATA_RPM = ""
  PACKAGE_ADD_METADATA_IPK = ""
  PACKAGE_ADD_METADATA_DEP = ""

Signed-off-by: Martin Jansa <martin.jansa@gmail.com>
meta/classes-global/package_rpm.bbclass