Correct RPM related problems
cover Correct RPM related problems
Correct 3 rpm related issues. The first is a defect found when trying to install packages on the target. Second on the use of prelink by RPM on the target. The third on how the rpm-dbg file was being generated.
Pull URL: git://git.pokylinux.org/poky-contrib.git
Branch: mhatle/rpm
Browse: http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=mhatle/rpm
Thanks,
Mark Hatle <[email protected]>
---
Mark Hatle (3):
rootfs_rpm: Fix rootfs generation using RPM packages
rpm: Fix rpm usage of prelink on the target
rpm: Fix rpm-dbg package split
meta/classes/image-prelink.bbclass | 2 +- meta/classes/package_rpm.bbclass | 15 +++++++++------ meta/classes/populate_sdk_rpm.bbclass | 13 +++++++++++-- meta/classes/rootfs_rpm.bbclass | 5 +++-- meta/recipes-devtools/prelink/prelink_git.bb | 8 +++++--- meta/recipes-devtools/rpm/rpm_5.4.0.bb | 7 +++---- 6 files changed, 32 insertions(+), 18 deletions(-)
Signature · 1 line
1.7.3.4
PATCH 1/3 rootfs_rpm: Fix rootfs generation using RPM packages
[BUG #756]
Fix bug #756. The rootfs contains a control file /etc/rpm/platform that specifies the default system platform, as well as patterns for compatible architectures. This file was not being setup properly due to a misunderstanding of the format in a previous patch.
--- meta/classes/package_rpm.bbclass | 15 +++++++++------ meta/classes/populate_sdk_rpm.bbclass | 13 +++++++++++-- meta/classes/rootfs_rpm.bbclass | 5 +++-- 3 files changed, 23 insertions(+), 10 deletions(-)
meta/classes/package_rpm.bbclass +9 -6
@@ -155,7 +155,8 @@ resolve_package_rpm () { # install a bunch of packages using rpm # the following shell variables needs to be set before calling this func: # INSTALL_ROOTFS_RPM - install root dir -# INSTALL_PLATFORM_RPM - extra platform +# INSTALL_PLATFORM_RPM - main platform +# INSTALL_PLATFORM_EXTRA_RPM - extra platform # INSTALL_CONFBASE_RPM - configuration file base name # INSTALL_PACKAGES_NORMAL_RPM - packages to be installed # INSTALL_PACKAGES_ATTEMPTONLY_RPM - packages attemped to be installed only
@@ -166,7 +167,8 @@ resolve_package_rpm () { package_install_internal_rpm () { local target_rootfs="${INSTALL_ROOTFS_RPM}" - local platforms="${INSTALL_PLATFORM_RPM}" + local platform="${INSTALL_PLATFORM_RPM}" + local platform_extra="${INSTALL_PLATFORM_EXTRA_RPM}" local confbase="${INSTALL_CONFBASE_RPM}" local package_to_install="${INSTALL_PACKAGES_NORMAL_RPM}" local package_attemptonly="${INSTALL_PACKAGES_ATTEMPTONLY_RPM}"
@@ -176,9 +178,10 @@ package_install_internal_rpm () { # Setup base system configuration mkdir -p ${target_rootfs}/etc/rpm/ - if [ ! -z "$platforms" ]; then - for pt in $platforms ; do - echo "$pt-unknown-linux" >> ${target_rootfs}/etc/rpm/platform + echo "${platform}-poky-linux-gnu" > ${target_rootfs}/etc/rpm/platform + if [ ! -z "$platform_extra" ]; then + for pt in $platform_extra ; do + echo "$pt-.*-linux.*" >> ${target_rootfs}/etc/rpm/platform done fi
@@ -764,7 +767,7 @@ python do_package_rpm () { os.chmod(pkgwritedir, 0755) cmd = rpmbuild - cmd = cmd + " --nodeps --short-circuit --target " + pkgarch + " --buildroot " + pkgd + cmd = cmd + " --nodeps --short-circuit --target " + pkgarch + "-poky-linux-gnu --buildroot " + pkgd cmd = cmd + " --define '_topdir " + workdir + "' --define '_rpmdir " + pkgwritedir + "'" cmd = cmd + " --define '_build_name_fmt %%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm'" cmd = cmd + " --define '_use_internal_dependency_generator 0'"
meta/classes/populate_sdk_rpm.bbclass +11 -2
@@ -33,10 +33,17 @@ fakeroot populate_sdk_rpm () { #install target export INSTALL_ROOTFS_RPM="${SDK_OUTPUT}/${SDKTARGETSYSROOT}" - export INSTALL_PLATFORM_RPM="${PACKAGE_ARCHS}" + export INSTALL_PLATFORM_RPM="${TARGET_ARCHS}" export INSTALL_CONFBASE_RPM="${RPMCONF_TARGET_BASE}" export INSTALL_PACKAGES_NORMAL_RPM="${TOOLCHAIN_TARGET_TASK}" + # List must be prefered to least preferred order + INSTALL_PLATFORM_RPM="" + for each_arch in ${PACKAGE_ARCHS} ; do + INSTALL_PLATFORM_RPM="$each_arch $INSTALL_PLATFORM_RPM" + done + export INSTALL_PLATFORM_RPM + package_install_internal_rpm populate_sdk_post_rpm ${INSTALL_ROOTFS_RPM}
@@ -45,6 +52,7 @@ fakeroot populate_sdk_rpm () { export INSTALL_PLATFORM_RPM="${SDK_ARCH}" export INSTALL_CONFBASE_RPM="${RPMCONF_HOST_BASE}" export INSTALL_PACKAGES_NORMAL_RPM="${TOOLCHAIN_HOST_TASK}" + export INSTALL_PLATFORM_EXTRA_RPM="" for arch in ${PACKAGE_ARCHS}; do sdkarch=`echo $arch | sed -e 's/${HOST_ARCH}/${SDK_ARCH}/'` extension="-nativesdk"
@@ -52,9 +60,10 @@ fakeroot populate_sdk_rpm () { extension="" fi if [ -e ${DEPLOY_DIR_RPM}/$sdkarch$extension ]; then - INSTALL_PLATFORM_RPM="$INSTALL_PLATFORM_RPM $sdkarch" + INSTALL_PLATFORM_EXTRA_RPM="$sdkarch $INSTALL_PLATFORM_EXTRA_RPM" fi done + export INSTALL_PLATFORM_EXTRA_RPM package_install_internal_rpm populate_sdk_post_rpm ${INSTALL_ROOTFS_RPM}
meta/classes/rootfs_rpm.bbclass +3 -2
@@ -48,6 +48,7 @@ fakeroot rootfs_rpm_do_rootfs () { #install pacakges export INSTALL_ROOTFS_RPM="${IMAGE_ROOTFS}" + export INSTALL_PLATFORM_RPM="${TARGET_ARCH}" export INSTALL_CONFBASE_RPM="${RPMCONF_TARGET_BASE}" export INSTALL_PACKAGES_NORMAL_RPM="${PACKAGE_INSTALL}" export INSTALL_PACKAGES_ATTEMPTONLY_RPM="${PACKAGE_INSTALL_ATTEMPTONLY}"
@@ -56,9 +57,9 @@ fakeroot rootfs_rpm_do_rootfs () { export INSTALL_TASK_RPM="populate_sdk" # List must be prefered to least preferred order - INSTALL_PLATFORM_RPM="" + INSTALL_PLATFORM_EXTRA_RPM="" for each_arch in ${PACKAGE_ARCHS} ; do - INSTALL_PLATFORM_RPM="$each_arch $INSTALL_PLATFORM_RPM" + INSTALL_PLATFORM_EXTRA_RPM="$each_arch $INSTALL_PLATFORM_EXTRA_RPM" done export INSTALL_PLATFORM_RPM
Signature · 1 line
1.7.3.4
PATCH 2/3 rpm: Fix rpm usage of prelink on the target
In reply to Mark HatleRPM has the ability to validate files that have been prelinked, however the necessary configuration and staging was not done properly. Resolve this issue by fixing the macro paths, providing the missing RPM macro, and correcting a defect in the way the prelink image class was working with the necessary configuration file.
--- meta/classes/image-prelink.bbclass | 2 +- meta/recipes-devtools/prelink/prelink_git.bb | 8 +++++--- meta/recipes-devtools/rpm/rpm_5.4.0.bb | 3 ++- 3 files changed, 8 insertions(+), 5 deletions(-)
meta/classes/image-prelink.bbclass +1 -1
@@ -24,7 +24,7 @@ prelink_image () { ${STAGING_DIR_NATIVE}/usr/sbin/prelink --root ${IMAGE_ROOTFS} -amR # Remove the prelink.conf if we had to add it. - if [ $dummy_prelink_conf ]; then + if [ "$dummy_prelink_conf" == "true" ]; then rm -f ${IMAGE_ROOTFS}/etc/prelink.conf fi
meta/recipes-devtools/prelink/prelink_git.bb +5 -3
@@ -8,12 +8,13 @@ runtime and thus programs come up faster." LICENSE = "GPLv2" LIC_FILES_CHKSUM = "file://COPYING;md5=c93c0550bd3173f4504b2cbd8991e50b" PV = "1.0+git${SRCPV}" -PR = "r1" +PR = "r2" SRC_URI = "git://git.pokylinux.org/prelink-cross.git;protocol=git \ file://prelink.conf \ file://prelink.cron.daily \ - file://prelink.default" + file://prelink.default \ + file://macros.prelink" TARGET_OS_ORIG := "${TARGET_OS}" OVERRIDES_append = ":${TARGET_OS_ORIG}"
@@ -33,10 +34,11 @@ do_configure_prepend () { } do_install_append () { - install -d ${D}${sysconfdir}/cron.daily ${D}${sysconfdir}/default + install -d ${D}${sysconfdir}/cron.daily ${D}${sysconfdir}/default ${D}${sysconfdir}/rpm install -m 0644 ${WORKDIR}/prelink.conf ${D}${sysconfdir}/prelink.conf install -m 0644 ${WORKDIR}/prelink.cron.daily ${D}${sysconfdir}/cron.daily/prelink install -m 0644 ${WORKDIR}/prelink.default ${D}${sysconfdir}/default/prelink + install -m 0644 ${WORKDIR}/macros.prelink ${D}${sysconfdir}/rpm/macros.prelink } pkg_postinst_prelink() {
meta/recipes-devtools/rpm/rpm_5.4.0.bb +2 -1
@@ -74,7 +74,8 @@ inherit autotools gettext acpaths = "-I ${S}/db/dist/aclocal -I ${S}/db/dist/aclocal_java" # Specify the default rpm macros in terms of adjustable variables -rpm_macros = "%{_usrlibrpm}/macros:%{_usrlibrpm}/poky/macros:%{_usrlibrpm}/poky/%{_target}/macros:~/.oerpmmacros" +rpm_macros = "%{_usrlibrpm}/macros:%{_usrlibrpm}/poky/macros:%{_usrlibrpm}/poky/%{_target}/macros:%{_etcrpm}/macros.*:%{_etcrpm}/macros:%{_etcrpm}/%{_target}/macros:~/.oerpmmacros" +rpm_macros_virtclass-native = "%{_usrlibrpm}/macros:%{_usrlibrpm}/poky/macros:%{_usrlibrpm}/poky/%{_target}/macros:~/.oerpmmacros" # Configure values taken from rpm.spec WITH_BZIP2 = "--with-bzip2"
Signature · 1 line
1.7.3.4
PATCH 3/3 rpm: Fix rpm-dbg package split
In reply to Mark HatleThe rpm-dbg package split was specified incorrectly in the recipe, correct this so we generate the proper -dbg file.
--- meta/recipes-devtools/rpm/rpm_5.4.0.bb | 4 +--- 1 files changed, 1 insertions(+), 3 deletions(-)
meta/recipes-devtools/rpm/rpm_5.4.0.bb +1 -3
@@ -194,9 +194,7 @@ FILES_${PN} = "${bindir}/rpm \ # ${libdir}/rpm/bin/db_* # ${libdir}/rpm/bin/grep -FILES_${PN}-dbg = "${bindir}/.debug \ - ${libdir}/.debug \ - ${libdir}/rpm/.debug \ +FILES_${PN}-dbg += "${libdir}/rpm/.debug \ ${libdir}/rpm/bin/.debug \ "
Signature · 1 line
1.7.3.4
Richard Purdie
AppliedQuoted 18 lines · Mark Hatle
Correct 3 rpm related issues. The first is a defect found when trying to install packages on the target. Second on the use of prelink by RPM on the target. The third on how the rpm-dbg file was being generated.
Pull URL:
git://git.pokylinux.org/poky-contrib.git
Branch: mhatle/rpm
Browse: http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=mhatle/rpmThanks,
Mark Hatle <[email protected]>
---Mark Hatle (3):
rootfs_rpm: Fix rootfs generation using RPM packages
rpm: Fix rpm usage of prelink on the target
rpm: Fix rpm-dbg package split
Quoted 7 lines
meta/classes/image-prelink.bbclass | 2 +- meta/classes/package_rpm.bbclass | 15 +++++++++------ meta/classes/populate_sdk_rpm.bbclass | 13 +++++++++++-- meta/classes/rootfs_rpm.bbclass | 5 +++-- meta/recipes-devtools/prelink/prelink_git.bb | 8 +++++--- meta/recipes-devtools/rpm/rpm_5.4.0.bb | 7 +++---- 6 files changed, 32 insertions(+), 18 deletions(-)
Merged to master, thanks!
Richard
Quoted 18 lines · Mark Hatle
Correct 3 rpm related issues. The first is a defect found when trying to install packages on the target. Second on the use of prelink by RPM on the target. The third on how the rpm-dbg file was being generated.
Pull URL:
git://git.pokylinux.org/poky-contrib.git
Branch: mhatle/rpm
Browse: http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=mhatle/rpmThanks,
Mark Hatle<[email protected]>
---Mark Hatle (3):
rootfs_rpm: Fix rootfs generation using RPM packages
rpm: Fix rpm usage of prelink on the target
rpm: Fix rpm-dbg package split
Quoted 8 lines
meta/classes/image-prelink.bbclass | 2 +- meta/classes/package_rpm.bbclass | 15 +++++++++------ meta/classes/populate_sdk_rpm.bbclass | 13 +++++++++++-- meta/classes/rootfs_rpm.bbclass | 5 +++-- meta/recipes-devtools/prelink/prelink_git.bb | 8 +++++--- meta/recipes-devtools/rpm/rpm_5.4.0.bb | 7 +++---- 6 files changed, 32 insertions(+), 18 deletions(-)
Merk,
This is merged, but please check the current RC build, we had a problem with package-index and solvedb.
Thanks
Sau!