rpm: split build and extra functionality into separate packages
PATCH 1/1 rpm: split build and extra functionality into separate packages
Having all the rpm build related tools in the main package requires adding runtime dependencies on perl and python3-core, so adding rpm to a target image can pull quite many unneeded packages to satisfy the dependencies.
This splits all the build related tools into rpm-build and moves the bash, perl and python3-core runtime dependencies to that package.
Also, the rpmsign tool is split into rpm-sign and rpm2archive (only built if archive is in PACKAGECONFIG) into rpm-archive. These are separate packages since they are not really related to building, so do not belong in rpm-build, but are not necessarily wanted in target images when rpm is included.
--- meta/recipes-devtools/rpm/rpm_4.16.1.2.bb | 39 ++++++++++++++++++++--- 1 file changed, 35 insertions(+), 4 deletions(-)
meta/recipes-devtools/rpm/rpm_4.16.1.2.bb +35 -4
@@ -145,15 +145,46 @@ FILES_${PN}_append_class-nativesdk = " ${SDKPATHNATIVE}/environment-setup.d/rpm. FILES_${PN}-dev += "${libdir}/rpm-plugins/*.la \ " +PACKAGE_BEFORE_PN += "${PN}-build ${PN}-sign ${PN}-archive" + +RRECOMMENDS_${PN} += "rpm-build rpm-sign rpm-archive" + +FILES_${PN}-build = "\ + ${bindir}/rpmbuild \ + ${bindir}/gendiff \ + ${bindir}/rpmspec \ + ${libdir}/librpmbuild.so.* \ + ${libdir}/rpm/brp-* \ + ${libdir}/rpm/check-* \ + ${libdir}/rpm/debugedit \ + ${libdir}/rpm/sepdebugcrcfix \ + ${libdir}/rpm/find-debuginfo.sh \ + ${libdir}/rpm/find-lang.sh \ + ${libdir}/rpm/*provides* \ + ${libdir}/rpm/*requires* \ + ${libdir}/rpm/*deps* \ + ${libdir}/rpm/*.prov \ + ${libdir}/rpm/*.req \ + ${libdir}/rpm/config.* \ + ${libdir}/rpm/mkinstalldirs \ + ${libdir}/rpm/macros.p* \ + ${libdir}/rpm/fileattrs/* \ +" + +FILES_${PN}-sign = "\ + ${bindir}/rpmsign \ + ${libdir}/librpmsign.so.* \ +" + +FILES_${PN}-archive = "\ + ${bindir}/rpm2archive \ +" PACKAGES += "python3-rpm" PROVIDES += "python3-rpm" FILES_python3-rpm = "${PYTHON_SITEPACKAGES_DIR}/rpm/*" -# rpm 5.x was packaging the rpm build tools separately -RPROVIDES_${PN} += "rpm-build" - -RDEPENDS_${PN} = "bash perl python3-core" +RDEPENDS_${PN}-build = "bash perl python3-core" PACKAGE_PREPROCESS_FUNCS += "rpm_package_preprocess"
Signature · 1 line
2.18.4
Thanks, a nice benefit to this is also eliminating bash (a gpl3 dependency) out of the main package. We (mbition.io) might use that in our production images!
Alex
Quoted 83 lines · Diego Santa Cruz via lists.openembedded.org
Having all the rpm build related tools in the main package requires adding runtime dependencies on perl and python3-core, so adding rpm to a target image can pull quite many unneeded packages to satisfy the dependencies.
This splits all the build related tools into rpm-build and moves the bash, perl and python3-core runtime dependencies to that package.
Also, the rpmsign tool is split into rpm-sign and rpm2archive (only built if archive is in PACKAGECONFIG) into rpm-archive. These are separate packages since they are not really related to building, so do not belong in rpm-build, but are not necessarily wanted in target images when rpm is included.
Signed-off-by Diego Santa Cruz <[email protected]>--- meta/recipes-devtools/rpm/rpm_4.16.1.2.bb | 39 ++++++++++++++++++++--- 1 file changed, 35 insertions(+), 4 deletions(-)meta/recipes-devtools/rpm/rpm_4.16.1.2.bb +0
-0@@ -145,15 +145,46 @@ FILES_${PN}_append_class-nativesdk = "${SDKPATHNATIVE}/environment-setup.d/rpm.
FILES_${PN}-dev += "${libdir}/rpm-plugins/*.la \ "meta/recipes-devtools/rpm/rpm_4.16.1.2.bb +35
-5+PACKAGE_BEFORE_PN += "${PN}-build ${PN}-sign ${PN}-archive" + +RRECOMMENDS_${PN} += "rpm-build rpm-sign rpm-archive" + +FILES_${PN}-build = "\ + ${bindir}/rpmbuild \ + ${bindir}/gendiff \ + ${bindir}/rpmspec \ + ${libdir}/librpmbuild.so.* \ + ${libdir}/rpm/brp-* \ + ${libdir}/rpm/check-* \ + ${libdir}/rpm/debugedit \ + ${libdir}/rpm/sepdebugcrcfix \ + ${libdir}/rpm/find-debuginfo.sh \ + ${libdir}/rpm/find-lang.sh \ + ${libdir}/rpm/*provides* \ + ${libdir}/rpm/*requires* \ + ${libdir}/rpm/*deps* \ + ${libdir}/rpm/*.prov \ + ${libdir}/rpm/*.req \ + ${libdir}/rpm/config.* \ + ${libdir}/rpm/mkinstalldirs \ + ${libdir}/rpm/macros.p* \ + ${libdir}/rpm/fileattrs/* \ +" + +FILES_${PN}-sign = "\ + ${bindir}/rpmsign \ + ${libdir}/librpmsign.so.* \ +" + +FILES_${PN}-archive = "\ + ${bindir}/rpm2archive \ +" PACKAGES += "python3-rpm" PROVIDES += "python3-rpm" FILES_python3-rpm = "${PYTHON_SITEPACKAGES_DIR}/rpm/*" -# rpm 5.x was packaging the rpm build tools separately -RPROVIDES_${PN} += "rpm-build" - -RDEPENDS_${PN} = "bash perl python3-core" +RDEPENDS_${PN}-build = "bash perl python3-core" PACKAGE_PREPROCESS_FUNCS += "rpm_package_preprocess" --2.18.4