* [PATCH 0/3] Correct RPM related problems
@ 2011-02-25 23:39 Mark Hatle
2011-02-25 23:39 ` [PATCH 1/3] rootfs_rpm: Fix rootfs generation using RPM packages Mark Hatle
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: Mark Hatle @ 2011-02-25 23:39 UTC (permalink / raw)
To: poky
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 <mark.hatle@windriver.com>
---
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(-)
--
1.7.3.4
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 1/3] rootfs_rpm: Fix rootfs generation using RPM packages
2011-02-25 23:39 [PATCH 0/3] Correct RPM related problems Mark Hatle
@ 2011-02-25 23:39 ` Mark Hatle
2011-02-25 23:39 ` [PATCH 2/3] rpm: Fix rpm usage of prelink on the target Mark Hatle
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Mark Hatle @ 2011-02-25 23:39 UTC (permalink / raw)
To: poky
[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.
Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
---
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(-)
diff --git a/meta/classes/package_rpm.bbclass b/meta/classes/package_rpm.bbclass
index 7cbdae6..60127d2 100644
--- a/meta/classes/package_rpm.bbclass
+++ b/meta/classes/package_rpm.bbclass
@@ -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'"
diff --git a/meta/classes/populate_sdk_rpm.bbclass b/meta/classes/populate_sdk_rpm.bbclass
index d179780..0afe042 100644
--- a/meta/classes/populate_sdk_rpm.bbclass
+++ b/meta/classes/populate_sdk_rpm.bbclass
@@ -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}
diff --git a/meta/classes/rootfs_rpm.bbclass b/meta/classes/rootfs_rpm.bbclass
index a722e68..caafbdc 100644
--- a/meta/classes/rootfs_rpm.bbclass
+++ b/meta/classes/rootfs_rpm.bbclass
@@ -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
--
1.7.3.4
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 2/3] rpm: Fix rpm usage of prelink on the target
2011-02-25 23:39 [PATCH 0/3] Correct RPM related problems Mark Hatle
2011-02-25 23:39 ` [PATCH 1/3] rootfs_rpm: Fix rootfs generation using RPM packages Mark Hatle
@ 2011-02-25 23:39 ` Mark Hatle
2011-02-25 23:39 ` [PATCH 3/3] rpm: Fix rpm-dbg package split Mark Hatle
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Mark Hatle @ 2011-02-25 23:39 UTC (permalink / raw)
To: poky
RPM 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.
Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
---
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(-)
diff --git a/meta/classes/image-prelink.bbclass b/meta/classes/image-prelink.bbclass
index faf1814..ee0951c 100644
--- a/meta/classes/image-prelink.bbclass
+++ b/meta/classes/image-prelink.bbclass
@@ -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
diff --git a/meta/recipes-devtools/prelink/prelink_git.bb b/meta/recipes-devtools/prelink/prelink_git.bb
index 53ef045..e8abf59 100644
--- a/meta/recipes-devtools/prelink/prelink_git.bb
+++ b/meta/recipes-devtools/prelink/prelink_git.bb
@@ -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() {
diff --git a/meta/recipes-devtools/rpm/rpm_5.4.0.bb b/meta/recipes-devtools/rpm/rpm_5.4.0.bb
index 8bce395..e350150 100644
--- a/meta/recipes-devtools/rpm/rpm_5.4.0.bb
+++ b/meta/recipes-devtools/rpm/rpm_5.4.0.bb
@@ -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"
--
1.7.3.4
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 3/3] rpm: Fix rpm-dbg package split
2011-02-25 23:39 [PATCH 0/3] Correct RPM related problems Mark Hatle
2011-02-25 23:39 ` [PATCH 1/3] rootfs_rpm: Fix rootfs generation using RPM packages Mark Hatle
2011-02-25 23:39 ` [PATCH 2/3] rpm: Fix rpm usage of prelink on the target Mark Hatle
@ 2011-02-25 23:39 ` Mark Hatle
2011-02-25 23:47 ` [PATCH 0/3] Correct RPM related problems Richard Purdie
2011-02-26 22:46 ` Saul Wold
4 siblings, 0 replies; 6+ messages in thread
From: Mark Hatle @ 2011-02-25 23:39 UTC (permalink / raw)
To: poky
The rpm-dbg package split was specified incorrectly in the recipe,
correct this so we generate the proper -dbg file.
Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
---
meta/recipes-devtools/rpm/rpm_5.4.0.bb | 4 +---
1 files changed, 1 insertions(+), 3 deletions(-)
diff --git a/meta/recipes-devtools/rpm/rpm_5.4.0.bb b/meta/recipes-devtools/rpm/rpm_5.4.0.bb
index e350150..0003f48 100644
--- a/meta/recipes-devtools/rpm/rpm_5.4.0.bb
+++ b/meta/recipes-devtools/rpm/rpm_5.4.0.bb
@@ -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 \
"
--
1.7.3.4
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 0/3] Correct RPM related problems
2011-02-25 23:39 [PATCH 0/3] Correct RPM related problems Mark Hatle
` (2 preceding siblings ...)
2011-02-25 23:39 ` [PATCH 3/3] rpm: Fix rpm-dbg package split Mark Hatle
@ 2011-02-25 23:47 ` Richard Purdie
2011-02-26 22:46 ` Saul Wold
4 siblings, 0 replies; 6+ messages in thread
From: Richard Purdie @ 2011-02-25 23:47 UTC (permalink / raw)
To: Mark Hatle; +Cc: poky
On Fri, 2011-02-25 at 17:39 -0600, Mark Hatle wrote:
> 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 <mark.hatle@windriver.com>
> ---
>
>
> 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(-)
Merged to master, thanks!
Richard
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 0/3] Correct RPM related problems
2011-02-25 23:39 [PATCH 0/3] Correct RPM related problems Mark Hatle
` (3 preceding siblings ...)
2011-02-25 23:47 ` [PATCH 0/3] Correct RPM related problems Richard Purdie
@ 2011-02-26 22:46 ` Saul Wold
4 siblings, 0 replies; 6+ messages in thread
From: Saul Wold @ 2011-02-26 22:46 UTC (permalink / raw)
To: Mark Hatle; +Cc: poky
On 02/25/2011 03:39 PM, Mark Hatle wrote:
> 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<mark.hatle@windriver.com>
> ---
>
>
> 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(-)
>
Merk,
This is merged, but please check the current RC build, we had a problem
with package-index and solvedb.
Thanks
Sau!
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2011-02-26 22:46 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-25 23:39 [PATCH 0/3] Correct RPM related problems Mark Hatle
2011-02-25 23:39 ` [PATCH 1/3] rootfs_rpm: Fix rootfs generation using RPM packages Mark Hatle
2011-02-25 23:39 ` [PATCH 2/3] rpm: Fix rpm usage of prelink on the target Mark Hatle
2011-02-25 23:39 ` [PATCH 3/3] rpm: Fix rpm-dbg package split Mark Hatle
2011-02-25 23:47 ` [PATCH 0/3] Correct RPM related problems Richard Purdie
2011-02-26 22:46 ` Saul Wold
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.