Skip to contentSkip to conversation

RPM PMS in SDK tarball

PATCH In review David Nyström 3 participants 18 messages Oct 17, 2013 – Oct 21, 2013

lore
Share & tools
lore
#0 lore raw

cover RPM PMS in SDK tarball

As part of the effort to allow wic/mic usability in the SDK tarball:

This is a patchset directed towards adding RPM PMS functionality. Unfortunately, this also adds a python runtime dependency, so I took the liberty to add a DISTRO_FEATURE called "sdk-pms" to opt out, and to avoid bloating the toolchain tarball.

David Nyström (11):
popt: Add nativesdk in BBCLASSEXTEND
icu: Add nativesdk in BBCLASSEXTEND
beecrypt: Add nativesdk in BBCLASSEXTEND
attr: Add nativesdk in BBCLASSEXTEND
acl: Add nativesdk in BBCLASSEXTEND
rpmresolve: Add nativesdk in BBCLASSEXTEND
smartpm: Add nativesdk in BBCLASSEXTEND
ossp-uuid: Add nativesdk in BBCLASSEXTEND
file: Add nativesdk in BBCLASSEXTEND nativesdk-packagegroup-sdk-host: Add new DISTRO_FEATURE, sdk-pms
rpm: Add nativesdk in BBCLASSEXTEND

 .../nativesdk-packagegroup-sdk-host.bb             |  3 ++-
 meta/recipes-devtools/file/file_5.15.bb            |  2 +-
 meta/recipes-devtools/ossp-uuid/ossp-uuid_1.6.2.bb |  2 +-
 .../python/python-smartpm_1.4.1.bb                 |  6 +++++-
 meta/recipes-devtools/rpm/rpm_5.4.9.bb             | 24 ++++++++++++++++------
 meta/recipes-devtools/rpm/rpmresolve_1.0.bb        |  2 +-
 meta/recipes-support/attr/acl_2.2.51.bb            |  2 ++
 meta/recipes-support/attr/attr_2.4.46.bb           |  2 ++
 meta/recipes-support/beecrypt/beecrypt_4.2.1.bb    |  2 +-
 meta/recipes-support/icu/icu.inc                   |  3 ++-
 meta/recipes-support/popt/popt_1.16.bb             |  2 +-
 11 files changed, 36 insertions(+), 14 deletions(-)
Signature · 1 line
1.8.3.2
#1 lore raw

PATCH 1/11 popt: Add nativesdk in BBCLASSEXTEND

---
 meta/recipes-support/popt/popt_1.16.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-support/popt/popt_1.16.bb +1 -1
index aa4e379..32110f2 100644
@@ -17,4 +17,4 @@ SRC_URI[sha256sum] = "e728ed296fe9f069a0e005003c3d6b2dde3d9cad453422a10d6558616d
 
 inherit autotools gettext
 
-BBCLASSEXTEND = "native"
+BBCLASSEXTEND = "native nativesdk"
Signature · 1 line
1.8.3.2
#2 lore raw

PATCH 2/11 icu: Add nativesdk in BBCLASSEXTEND

In reply to David Nyström
---
 meta/recipes-support/icu/icu.inc | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
meta/recipes-support/icu/icu.inc +2 -1
index e3944cd..c592f85 100644
@@ -19,6 +19,7 @@ inherit autotools pkgconfig binconfig
 # into consideration, the native build directory needs to be staged.
 EXTRA_OECONF = "--with-cross-build=${STAGING_ICU_DIR_NATIVE}"
 EXTRA_OECONF_class-native = ""
+EXTRA_OECONF_class-nativesdk = "--with-cross-build=${STAGING_ICU_DIR_NATIVE}"
 
 # ICU puts custom m4 autoconf functions in aclocal.m4.
 # However, this file is deleted in our build system. 
@@ -51,5 +52,5 @@ FILES_libiculx = "${libdir}/libiculx.so.*"
 FILES_libicutu = "${libdir}/libicutu.so.*"
 FILES_libicuio = "${libdir}/libicuio.so.*"
 
-BBCLASSEXTEND = "native"
+BBCLASSEXTEND = "native nativesdk"
 
Signature · 1 line
1.8.3.2
#3 lore raw

PATCH 3/11 beecrypt: Add nativesdk in BBCLASSEXTEND

In reply to David Nyström
---
 meta/recipes-support/beecrypt/beecrypt_4.2.1.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-support/beecrypt/beecrypt_4.2.1.bb +1 -1
index 7baf92e..0a8ff4b 100644
@@ -33,4 +33,4 @@ FILES_${PN} = "${sysconfdir} ${libdir}/*.so.* ${libdir}/${BPN}/*.so.*"
 FILES_${PN}-dev += "${libdir}/${BPN}/*.so ${libdir}/${BPN}/*.la"
 FILES_${PN}-staticdev += "${libdir}/${BPN}/*.a"
 
-BBCLASSEXTEND = "native"
+BBCLASSEXTEND = "native nativesdk"
Signature · 1 line
1.8.3.2
#4 lore raw

PATCH 4/11 attr: Add nativesdk in BBCLASSEXTEND

In reply to David Nyström
---
 meta/recipes-support/attr/attr_2.4.46.bb | 2 ++
 1 file changed, 2 insertions(+)
meta/recipes-support/attr/attr_2.4.46.bb +2 -0
index a76ebae..c8aef3f 100644
@@ -4,3 +4,5 @@ PR = "r4"
 
 SRC_URI[md5sum] = "db557c17fdfa4f785333ecda08654010"
 SRC_URI[sha256sum] = "dcd69bdca7ff166bc45141eddbcf21967999a6b66b0544be12a1cc2fd6340e1f"
+
+BBCLASSEXTEND = "native nativesdk"
\ No newline at end of file
Signature · 1 line
1.8.3.2
#5 lore raw

PATCH 5/11 acl: Add nativesdk in BBCLASSEXTEND

In reply to David Nyström
---
 meta/recipes-support/attr/acl_2.2.51.bb | 2 ++
 1 file changed, 2 insertions(+)
meta/recipes-support/attr/acl_2.2.51.bb +2 -0
index 1c40b00..dbe84bd 100644
@@ -4,3 +4,5 @@ PR = "r3"
 
 SRC_URI[md5sum] = "3fc0ce99dc5253bdcce4c9cd437bc267"
 SRC_URI[sha256sum] = "06854521cf5d396801af7e54b9636680edf8064355e51c07657ec7442a185225"
+
+BBCLASSEXTEND = "native nativesdk"
\ No newline at end of file
Signature · 1 line
1.8.3.2
#6 lore raw

PATCH 6/11 rpmresolve: Add nativesdk in BBCLASSEXTEND

In reply to David Nyström
---
 meta/recipes-devtools/rpm/rpmresolve_1.0.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-devtools/rpm/rpmresolve_1.0.bb +1 -1
index 48c52c0..04a55fd 100644
@@ -26,4 +26,4 @@ do_install_append_class-native() {
 			RPM_LOCALEDIRRPM=${STAGING_DATADIR_NATIVE}/locale
 }
 
-BBCLASSEXTEND = "native"
+BBCLASSEXTEND = "native nativesdk"
Signature · 1 line
1.8.3.2
#7 lore raw

PATCH 7/11 smartpm: Add nativesdk in BBCLASSEXTEND

In reply to David Nyström
---
 meta/recipes-devtools/python/python-smartpm_1.4.1.bb | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
meta/recipes-devtools/python/python-smartpm_1.4.1.bb +5 -1
index f349469..464c5c5 100644
@@ -49,6 +49,10 @@ RPM_RDEP_class-native = ""
 QT_RDEP_class-native = ""
 GTK_RDEP_class-native = ""
 
+RPM_RDEP_class-nativesdk = ""
+QT_RDEP_class-nativesdk = ""
+GTK_RDEP_class-nativesdk = ""
+
 PACKAGECONFIG[rpm] = ",,rpm,${RPM_RDEP}"
 PACKAGECONFIG[qt4] = ",,qt4-x11,${QT_RDEP}"
 PACKAGECONFIG[gtk] = ",,gtk+,${GTK_RDEP}"
@@ -138,5 +142,5 @@ FILES_${PN}-interface-qt4 = "${libdir}/python*/site-packages/smart/interfaces/qt
 FILES_${PN}-interface-gtk = "${libdir}/python*/site-packages/smart/interfaces/gtk"
 FILES_${PN}-interface-images = "${datadir}/${baselib}/python*/site-packages/smart/interfaces/images"
 
-BBCLASSEXTEND = "native"
+BBCLASSEXTEND = "native nativesdk"
 
Signature · 1 line
1.8.3.2
#8 lore raw

PATCH 8/11 ossp-uuid: Add nativesdk in BBCLASSEXTEND

In reply to David Nyström
---
 meta/recipes-devtools/ossp-uuid/ossp-uuid_1.6.2.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-devtools/ossp-uuid/ossp-uuid_1.6.2.bb +1 -1
index b6304f0..4bc151f 100644
@@ -55,4 +55,4 @@ FILES_uuid = "${bindir}/uuid"
 FILES_${PN} = "${libdir}/libossp-uuid.so.16*"
 FILES_${PN}-dev += "${bindir}/uuid-config"
 
-BBCLASSEXTEND = "native"
+BBCLASSEXTEND = "native nativesdk"
Signature · 1 line
1.8.3.2
#9 lore raw

PATCH 9/11 file: Add nativesdk in BBCLASSEXTEND

In reply to David Nyström
---
 meta/recipes-devtools/file/file_5.15.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-devtools/file/file_5.15.bb +1 -1
index 5589efa..aecbbe5 100644
@@ -33,4 +33,4 @@ do_install_append_class-native() {
 }
 
 
-BBCLASSEXTEND = "native"
+BBCLASSEXTEND = "native nativesdk"
Signature · 1 line
1.8.3.2
#10 lore raw

PATCH 10/11 nativesdk-packagegroup-sdk-host: Add new DISTRO_FEATURE, sdk-pms

In reply to David Nyström

Added a new distro feature called sdk-pms, since smartpm rdepends on the python runtime.
This to avoid bloating the SDK tarball for those who does not want it.

---
 meta/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bb | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
meta/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bb +2 -1
index e298ff4..1f45c4c 100644
@@ -16,7 +16,8 @@ RDEPENDS_${PN} = "\
     nativesdk-qemu-helper \
     nativesdk-pseudo \
     nativesdk-unfs-server \
-    nativesdk-opkg \
+    ${@base_contains('DISTRO_FEATURES', 'sdk-pms', 'nativesdk-opkg','', d)} \
+    ${@base_contains('DISTRO_FEATURES', 'sdk-pms', 'nativesdk-smartpm','', d)} \
     nativesdk-libtool \
     nativesdk-autoconf \
     nativesdk-automake \
Signature · 1 line
1.8.3.2
#11 lore raw

Re: [PATCH 10/11] nativesdk-packagegroup-sdk-host: Add new DISTRO_FEATURE, sdk-pms

Quoted 15 lines · David Nyström

Added a new distro feature called sdk-pms, since smartpm rdepends on the python runtime.
This to avoid bloating the SDK tarball for those who does not want it.

---
 meta/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bb | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
meta/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bb +0 -0
index e298ff4..1f45c4c 100644

meta/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bb RDEPENDS_${PN} = "\ · line 23

Quoted 9 lines
meta/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bb +2 -1
@@ -16,7 +16,8 @@ RDEPENDS_${PN} = "\
     nativesdk-qemu-helper \
     nativesdk-pseudo \
     nativesdk-unfs-server \
-    nativesdk-opkg \
+    ${@base_contains('DISTRO_FEATURES', 'sdk-pms', 'nativesdk-opkg','', d)} \
+    ${@base_contains('DISTRO_FEATURES', 'sdk-pms', 'nativesdk-smartpm','', d)} \
     nativesdk-libtool \
     nativesdk-autoconf \
     nativesdk-automake \

I think we need to keep a list of DISTRO_FEATURES somewhere along with a definition about what the feature is supposed to do. For example this is clearly about power management, right? :)

Along with this addition could you start a list somewhere documenting this?

Cheers,

Richard

#12 lore raw

Re: [PATCH 10/11] nativesdk-packagegroup-sdk-host: Add new DISTRO_FEATURE, sdk-pms

Quoted 10 lines · Richard Purdie
Quoted 8 lines · David Nyström

Added a new distro feature called sdk-pms, since smartpm rdepends on the python runtime.
This to avoid bloating the SDK tarball for those who does not want it.

---
 meta/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bb | 3

++-

Quoted 3 lines

Review

Quoted 3 lines
 1 file changed, 2 insertions(+), 1 deletion(-)
(quoted diff) +0 -0

nativesdk-packagegroup-sdk-host.bb b/meta/recipes-core/packagegroups/ nativesdk-packagegroup-sdk-host.bb

Quoted 9 lines

meta/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bb RDEPENDS_${PN} = "\ · line 19

Quoted 9 lines

index e298ff4..1f45c4c 100644

meta/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bb +1 -1
@@ -16,7 +16,8 @@ RDEPENDS_${PN} = "\
     nativesdk-qemu-helper \
     nativesdk-pseudo \
     nativesdk-unfs-server \
-    nativesdk-opkg \
+    ${@base_contains('DISTRO_FEATURES', 'sdk-pms',

'nativesdk-opkg','', d)} \

Quoted 1 line

meta/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bb RDEPENDS_${PN} = "\ · line 20

Quoted 1 line
meta/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bb +1 -0
+    ${@base_contains('DISTRO_FEATURES', 'sdk-pms',

'nativesdk-smartpm','', d)} \

Quoted 10 lines

meta/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bb RDEPENDS_${PN} = "\ · line 23

Quoted 3 lines
meta/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bb +0 -0
     nativesdk-libtool \
     nativesdk-autoconf \
     nativesdk-automake \

I think we need to keep a list of DISTRO_FEATURES somewhere along with a definition about what the feature is supposed to do. For example this is clearly about power management, right? :)

Along with this addition could you start a list somewhere documenting this?

Sure, where would be a good place to start this ?
In the Reference manual ?

Br,
David

Quoted 6 lines

Cheers,

Richard

#13 lore raw

PATCH 11/11 rpm: Add nativesdk in BBCLASSEXTEND

In reply to David Nyström
---
 meta/recipes-devtools/rpm/rpm_5.4.9.bb | 24 ++++++++++++++++++------
 1 file changed, 18 insertions(+), 6 deletions(-)
meta/recipes-devtools/rpm/rpm_5.4.9.bb +18 -6
index 3c7e03b..0630f74 100644
@@ -105,12 +105,12 @@ 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:%{_etcrpm}/macros.*:%{_etcrpm}/macros:%{_etcrpm}/%{_target}/macros:~/.oerpmmacros"
 rpm_macros_class-native = "%{_usrlibrpm}/macros:%{_usrlibrpm}/poky/macros:%{_usrlibrpm}/poky/%{_target}/macros:~/.oerpmmacros"
+rpm_macros_class-nativesdk = "%{_usrlibrpm}/macros:%{_usrlibrpm}/poky/macros:%{_usrlibrpm}/poky/%{_target}/macros:~/.oerpmmacros"
 
 # sqlite lua tcl augeas nss gcrypt neon xz xar keyutils perl selinux
 
 # Note: perl and sqlite w/o db specified does not currently work.
 #       tcl, augeas, nss, gcrypt, xar and keyutils support is untested.
-PACKAGECONFIG_class-native ??= "db bzip2 zlib beecrypt openssl libelf python"
 PACKAGECONFIG ??= "db bzip2 zlib beecrypt openssl libelf python"
 
 PACKAGECONFIG[bzip2] = "--with-bzip2,--without-bzip2,bzip2,"
@@ -224,8 +224,11 @@ FILES_${PN} =  "${bindir}/rpm \
 		${libdir}/rpm/bin/rpmrepo \
 		${libdir}/rpm/bin/rpmspecdump \
 		${libdir}/rpm/bin/wget \
-		/var/lib/rpm \
-		/var/cache/rpm \
+		${libdir}/rpm \
+		${localstatedir}/cache/rpm \
+		${localstatedir}/cache/wdj \
+		${localstatedir}/lib/rpm \
+		${localstatedir}/lib/wdj \
 		"
 
 FILES_${PN}-dbg += "${libdir}/rpm/.debug \
@@ -235,7 +238,7 @@ FILES_${PN}-dbg += "${libdir}/rpm/.debug \
 FILES_${PN}-common = "${bindir}/rpm2cpio \
 		${bindir}/gendiff \
 		${sysconfdir}/rpm \
-		/var/spool/repackage \
+		${localstatedir}/spool/repackage \
 		"
 
 FILES_${PN}-libs = "${libdir}/librpm-*.so \
@@ -313,6 +316,7 @@ FILES_${PN}-build = "${prefix}/src/rpm \
 		"
 RDEPENDS_${PN} = "base-files run-postinsts"
 RDEPENDS_${PN}_class-native = ""
+RDEPENDS_${PN}_class-nativesdk = ""
 RDEPENDS_${PN}-build = "file"
 
 RDEPENDS_python-rpm = "${PN}"
@@ -452,7 +456,7 @@ do_install_append() {
 
 }
 
-do_install_append_class-native() {
+add_native_wrapper() {
         create_wrapper ${D}/${bindir}/rpm \
 		RPM_USRLIBRPM='`dirname $''realpath`'/${@os.path.relpath(d.getVar('libdir', True), d.getVar('bindir', True))}/rpm \
 		RPM_ETCRPM='$'{RPM_ETCRPM-'`dirname $''realpath`'/${@os.path.relpath(d.getVar('sysconfdir', True), d.getVar('bindir', True))}/rpm} \
@@ -481,4 +485,12 @@ do_install_append_class-native() {
 	done
 }
 
-BBCLASSEXTEND = "native"
+do_install_append_class-native() {
+	add_native_wrapper
+}
+
+do_install_append_class-nativesdk() {
+	add_native_wrapper
+}
+
+BBCLASSEXTEND = "native nativesdk"
Signature · 1 line
1.8.3.2
#14 lore raw

Re: [PATCH 11/11] rpm: Add nativesdk in BBCLASSEXTEND

On 10/17/13 8:59 AM, David Nyström wrote:

Should have a commit message explaining the various changes.

Quoted 24 lines
---
  meta/recipes-devtools/rpm/rpm_5.4.9.bb | 24 ++++++++++++++++++------
  1 file changed, 18 insertions(+), 6 deletions(-)
meta/recipes-devtools/rpm/rpm_5.4.9.bb +1 -1
index 3c7e03b..0630f74 100644
@@ -105,12 +105,12 @@ 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:%{_etcrpm}/macros.*:%{_etcrpm}/macros:%{_etcrpm}/%{_target}/macros:~/.oerpmmacros"
  rpm_macros_class-native = "%{_usrlibrpm}/macros:%{_usrlibrpm}/poky/macros:%{_usrlibrpm}/poky/%{_target}/macros:~/.oerpmmacros"
+rpm_macros_class-nativesdk = "%{_usrlibrpm}/macros:%{_usrlibrpm}/poky/macros:%{_usrlibrpm}/poky/%{_target}/macros:~/.oerpmmacros"
 
  # sqlite lua tcl augeas nss gcrypt neon xz xar keyutils perl selinux
 
  # Note: perl and sqlite w/o db specified does not currently work.
  #       tcl, augeas, nss, gcrypt, xar and keyutils support is untested.
-PACKAGECONFIG_class-native ??= "db bzip2 zlib beecrypt openssl libelf python"
  PACKAGECONFIG ??= "db bzip2 zlib beecrypt openssl libelf python"
 
  PACKAGECONFIG[bzip2] = "--with-bzip2,--without-bzip2,bzip2,"

meta/recipes-devtools/rpm/rpm_5.4.9.bb FILES_${PN} = "${bindir}/rpm \ · line 231

Quoted 10 lines
meta/recipes-devtools/rpm/rpm_5.4.9.bb +5 -2
@@ -224,8 +224,11 @@ FILES_${PN} =  "${bindir}/rpm \
  		${libdir}/rpm/bin/rpmrepo \
  		${libdir}/rpm/bin/rpmspecdump \
  		${libdir}/rpm/bin/wget \
-		/var/lib/rpm \
-		/var/cache/rpm \
+		${libdir}/rpm \
+		${localstatedir}/cache/rpm \
+		${localstatedir}/cache/wdj \
+		${localstatedir}/lib/rpm \
+		${localstatedir}/lib/wdj \

The above was hard defined because the /var/lib, /var/cache locations were hard coded into RPM itself and did not vary based on libdir/localstatedir. It's possible this has changed since the work was originally done. But you should be sure to verify that.

Otherwise the content looks fine.

--Mark

Quoted 44 lines
meta/recipes-devtools/rpm/rpm_5.4.9.bb +12 -3
  		"
 
  FILES_${PN}-dbg += "${libdir}/rpm/.debug \
@@ -235,7 +238,7 @@ FILES_${PN}-dbg += "${libdir}/rpm/.debug \
  FILES_${PN}-common = "${bindir}/rpm2cpio \
  		${bindir}/gendiff \
  		${sysconfdir}/rpm \
-		/var/spool/repackage \
+		${localstatedir}/spool/repackage \
  		"
 
  FILES_${PN}-libs = "${libdir}/librpm-*.so \
@@ -313,6 +316,7 @@ FILES_${PN}-build = "${prefix}/src/rpm \
  		"
  RDEPENDS_${PN} = "base-files run-postinsts"
  RDEPENDS_${PN}_class-native = ""
+RDEPENDS_${PN}_class-nativesdk = ""
  RDEPENDS_${PN}-build = "file"
 
  RDEPENDS_python-rpm = "${PN}"
@@ -452,7 +456,7 @@ do_install_append() {
 
  }
 
-do_install_append_class-native() {
+add_native_wrapper() {
          create_wrapper ${D}/${bindir}/rpm \
  		RPM_USRLIBRPM='`dirname $''realpath`'/${@os.path.relpath(d.getVar('libdir', True), d.getVar('bindir', True))}/rpm \
  		RPM_ETCRPM='$'{RPM_ETCRPM-'`dirname $''realpath`'/${@os.path.relpath(d.getVar('sysconfdir', True), d.getVar('bindir', True))}/rpm} \
@@ -481,4 +485,12 @@ do_install_append_class-native() {
  	done
  }
 
-BBCLASSEXTEND = "native"
+do_install_append_class-native() {
+	add_native_wrapper
+}
+
+do_install_append_class-nativesdk() {
+	add_native_wrapper
+}
+
+BBCLASSEXTEND = "native nativesdk"
#15 lore raw

Re: [PATCH 11/11] rpm: Add nativesdk in BBCLASSEXTEND

Quoted 6 lines · Mark Hatle

On 10/17/13 8:59 AM, David Nyström wrote:

Should have a commit message explaining the various changes.

Quoted 6 lines

Review

Quoted 6 lines
---
  meta/recipes-devtools/rpm/rpm_5.4.9.bb | 24 ++++++++++++++++++------
  1 file changed, 18 insertions(+), 6 deletions(-)
(quoted diff) +0 -0

rpm_5.4.9.bb

Quoted 4 lines

meta/recipes-devtools/rpm/rpm_5.4.9.bb acpaths = "-I ${S}/db/dist/aclocal -I

Quoted 4 lines

index 3c7e03b..0630f74 100644

meta/recipes-devtools/rpm/rpm_5.4.9.bb +0 -0
@@ -105,12 +105,12 @@ acpaths = "-I ${S}/db/dist/aclocal -I

${S}/db/dist/aclocal_java"

Quoted 2 lines

meta/recipes-devtools/rpm/rpm_5.4.9.bb acpaths = "-I ${S}/db/dist/aclocal -I · line 106

Quoted 2 lines
meta/recipes-devtools/rpm/rpm_5.4.9.bb +0 -0
  # Specify the default rpm macros in terms of adjustable variables
  rpm_macros =

"%{_usrlibrpm}/macros:%{_usrlibrpm}/poky/macros:%{_usrlibrpm}/poky/%{_target}/macros:%{_etcrpm}/macros.*:%{_etcrpm}/macros:%{_etcrpm}/%{_target}/macros:~/.oerpmmacros"

Quoted 1 line

meta/recipes-devtools/rpm/rpm_5.4.9.bb acpaths = "-I ${S}/db/dist/aclocal -I · line 107

Quoted 1 line
meta/recipes-devtools/rpm/rpm_5.4.9.bb +0 -0
  rpm_macros_class-native =

"%{_usrlibrpm}/macros:%{_usrlibrpm}/poky/macros:%{_usrlibrpm}/poky/%{_target}/macros:~/.oerpmmacros"

Quoted 1 line

meta/recipes-devtools/rpm/rpm_5.4.9.bb acpaths = "-I ${S}/db/dist/aclocal -I · line 108

Quoted 1 line
meta/recipes-devtools/rpm/rpm_5.4.9.bb +1 -0
+rpm_macros_class-nativesdk =

"%{_usrlibrpm}/macros:%{_usrlibrpm}/poky/macros:%{_usrlibrpm}/poky/%{_target}/macros:~/.oerpmmacros"

Quoted 6 lines

meta/recipes-devtools/rpm/rpm_5.4.9.bb acpaths = "-I ${S}/db/dist/aclocal -I ${S}/db/dist/aclocal_java"

Quoted 6 lines
meta/recipes-devtools/rpm/rpm_5.4.9.bb +0 -1
  # sqlite lua tcl augeas nss gcrypt neon xz xar keyutils perl selinux
 
  # Note: perl and sqlite w/o db specified does not currently work.
  #       tcl, augeas, nss, gcrypt, xar and keyutils support is untested.
-PACKAGECONFIG_class-native ??= "db bzip2 zlib beecrypt openssl libelf

python"

Quoted 17 lines
Quoted 4 lines
meta/recipes-devtools/rpm/rpm_5.4.9.bb +0 -0
  PACKAGECONFIG ??= "db bzip2 zlib beecrypt openssl libelf python"
 
  PACKAGECONFIG[bzip2] = "--with-bzip2,--without-bzip2,bzip2,"

meta/recipes-devtools/rpm/rpm_5.4.9.bb FILES_${PN} = "${bindir}/rpm \ · line 231

Quoted 10 lines
meta/recipes-devtools/rpm/rpm_5.4.9.bb +5 -2
@@ -224,8 +224,11 @@ FILES_${PN} =  "${bindir}/rpm \
                ${libdir}/rpm/bin/rpmrepo \
                ${libdir}/rpm/bin/rpmspecdump \
                ${libdir}/rpm/bin/wget \
-               /var/lib/rpm \
-               /var/cache/rpm \
+               ${libdir}/rpm \
+               ${localstatedir}/cache/rpm \
+               ${localstatedir}/cache/wdj \
+               ${localstatedir}/lib/rpm \
+               ${localstatedir}/lib/wdj \

The above was hard defined because the /var/lib, /var/cache locations

were hard coded into RPM itself and did not vary based on libdir/localstatedir. It's possible this has changed since the work was originally done. But you should be sure to verify that.

I was under the impression that localstatedir always resolved to /var, But your probably correct about libdir above(/usr/lib vs. /lib), will return with V2.

The reason for the change is that nativesdk variable-expansion is different(broken ?) from target/native, and will not find items from hardcoded libdir, bindir et.c.

Postinstall hooks using libdir, bindir et.al. when built in nativesdk mode is equally "broken".

Quoted 29 lines

Otherwise the content looks fine.

--Mark

Quoted 22 lines
meta/recipes-devtools/rpm/rpm_5.4.9.bb +2 -1
                "
 
  FILES_${PN}-dbg += "${libdir}/rpm/.debug \
@@ -235,7 +238,7 @@ FILES_${PN}-dbg += "${libdir}/rpm/.debug \
  FILES_${PN}-common = "${bindir}/rpm2cpio \
                ${bindir}/gendiff \
                ${sysconfdir}/rpm \
-               /var/spool/repackage \
+               ${localstatedir}/spool/repackage \
                "
 
  FILES_${PN}-libs = "${libdir}/librpm-*.so \
@@ -313,6 +316,7 @@ FILES_${PN}-build = "${prefix}/src/rpm \
                "
  RDEPENDS_${PN} = "base-files run-postinsts"
  RDEPENDS_${PN}_class-native = ""
+RDEPENDS_${PN}_class-nativesdk = ""
  RDEPENDS_${PN}-build = "file"
 
  RDEPENDS_python-rpm = "${PN}"
@@ -452,7 +456,7 @@ do_install_append() {
 
Quoted 6 lines

meta/recipes-devtools/rpm/rpm_5.4.9.bb do_install_append() {

Quoted 6 lines
meta/recipes-devtools/rpm/rpm_5.4.9.bb +1 -1
  }
 
-do_install_append_class-native() {
+add_native_wrapper() {
          create_wrapper ${D}/${bindir}/rpm \
                RPM_USRLIBRPM='`dirname

$''realpath`'/${@os.path.relpath(d.getVar('libdir', True), d.getVar('bindir', True))}/rpm \

Quoted 1 line

meta/recipes-devtools/rpm/rpm_5.4.9.bb do_install_append() { · line 462

Quoted 1 line
meta/recipes-devtools/rpm/rpm_5.4.9.bb +0 -0
                RPM_ETCRPM='$'{RPM_ETCRPM-'`dirname

$''realpath`'/${@os.path.relpath(d.getVar('sysconfdir', True), d.getVar('bindir', True))}/rpm} \

Quoted 20 lines
Quoted 5 lines
meta/recipes-devtools/rpm/rpm_5.4.9.bb +0 -0
@@ -481,4 +485,12 @@ do_install_append_class-native() {
        done
  }
 

meta/recipes-devtools/rpm/rpm_5.4.9.bb do_install_append_class-native() { · line 496

Quoted 10 lines
meta/recipes-devtools/rpm/rpm_5.4.9.bb +9 -1
-BBCLASSEXTEND = "native"
+do_install_append_class-native() {
+       add_native_wrapper
+}
+
+do_install_append_class-nativesdk() {
+       add_native_wrapper
+}
+
+BBCLASSEXTEND = "native nativesdk"

_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core

#16 lore raw

PATCH v2 1/1 rpm: Add nativesdk to BBCLASSEXTEND

In reply to David Nyström

Modified FILES-paths since nativesdk can't handle hardcoded paths, Also added *.real binaries to packaging since this is not done when built as native.

As far as /var having to be hardcoded, I have a hard time seeing someone modifying bitbake.conf to place localstatedir somewhere else than /var.

If there exists a target/nativesdk portable way of hardcoding FILES, please let me know, and we'll do it that way.

Cleanup of FEATURES, since it was the same for native & target.

---
 meta/recipes-devtools/rpm/rpm_5.4.9.bb | 30 ++++++++++++++++++++++++------
 1 file changed, 24 insertions(+), 6 deletions(-)
meta/recipes-devtools/rpm/rpm_5.4.9.bb +24 -6
index 3c7e03b..9699639 100644
@@ -105,12 +105,12 @@ 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:%{_etcrpm}/macros.*:%{_etcrpm}/macros:%{_etcrpm}/%{_target}/macros:~/.oerpmmacros"
 rpm_macros_class-native = "%{_usrlibrpm}/macros:%{_usrlibrpm}/poky/macros:%{_usrlibrpm}/poky/%{_target}/macros:~/.oerpmmacros"
+rpm_macros_class-nativesdk = "%{_usrlibrpm}/macros:%{_usrlibrpm}/poky/macros:%{_usrlibrpm}/poky/%{_target}/macros:~/.oerpmmacros"
 
 # sqlite lua tcl augeas nss gcrypt neon xz xar keyutils perl selinux
 
 # Note: perl and sqlite w/o db specified does not currently work.
 #       tcl, augeas, nss, gcrypt, xar and keyutils support is untested.
-PACKAGECONFIG_class-native ??= "db bzip2 zlib beecrypt openssl libelf python"
 PACKAGECONFIG ??= "db bzip2 zlib beecrypt openssl libelf python"
 
 PACKAGECONFIG[bzip2] = "--with-bzip2,--without-bzip2,bzip2,"
@@ -224,8 +224,16 @@ FILES_${PN} =  "${bindir}/rpm \
 		${libdir}/rpm/bin/rpmrepo \
 		${libdir}/rpm/bin/rpmspecdump \
 		${libdir}/rpm/bin/wget \
-		/var/lib/rpm \
-		/var/cache/rpm \
+		${libdir}/rpm \
+		${localstatedir}/cache \
+		${localstatedir}/cache/rpm \
+		${localstatedir}/cache/wdj \
+		${localstatedir}/lib \
+		${localstatedir}/lib/rpm \
+		${localstatedir}/lib/wdj \
+		${bindir}/rpm.real \
+		${bindir}/rpmconstant.real \
+		${bindir}/rpm2cpio.real \
 		"
 
 FILES_${PN}-dbg += "${libdir}/rpm/.debug \
@@ -235,7 +243,7 @@ FILES_${PN}-dbg += "${libdir}/rpm/.debug \
 FILES_${PN}-common = "${bindir}/rpm2cpio \
 		${bindir}/gendiff \
 		${sysconfdir}/rpm \
-		/var/spool/repackage \
+		${localstatedir}/spool/repackage \
 		"
 
 FILES_${PN}-libs = "${libdir}/librpm-*.so \
@@ -250,6 +258,7 @@ RDEPENDS_${PN}-build += "bash"
 
 FILES_${PN}-build = "${prefix}/src/rpm \
 		${bindir}/rpmbuild \
+		${bindir}/rpmbuild.real \
 		${libdir}/rpm/brp-* \
 		${libdir}/rpm/check-files \
 		${libdir}/rpm/cross-build \
@@ -313,6 +322,7 @@ FILES_${PN}-build = "${prefix}/src/rpm \
 		"
 RDEPENDS_${PN} = "base-files run-postinsts"
 RDEPENDS_${PN}_class-native = ""
+RDEPENDS_${PN}_class-nativesdk = ""
 RDEPENDS_${PN}-build = "file"
 
 RDEPENDS_python-rpm = "${PN}"
@@ -452,7 +462,7 @@ do_install_append() {
 
 }
 
-do_install_append_class-native() {
+add_native_wrapper() {
         create_wrapper ${D}/${bindir}/rpm \
 		RPM_USRLIBRPM='`dirname $''realpath`'/${@os.path.relpath(d.getVar('libdir', True), d.getVar('bindir', True))}/rpm \
 		RPM_ETCRPM='$'{RPM_ETCRPM-'`dirname $''realpath`'/${@os.path.relpath(d.getVar('sysconfdir', True), d.getVar('bindir', True))}/rpm} \
@@ -481,4 +491,12 @@ do_install_append_class-native() {
 	done
 }
 
-BBCLASSEXTEND = "native"
+do_install_append_class-native() {
+	add_native_wrapper
+}
+
+do_install_append_class-nativesdk() {
+	add_native_wrapper
+}
+
+BBCLASSEXTEND = "native nativesdk"
Signature · 1 line
1.8.3.2
#17 lore raw

Re: [PATCHv2] rpm: Add nativesdk to BBCLASSEXTEND

Ping?

Was this patch forgotten ?

//DD

Quoted 117 lines · David Nyström

Modified FILES-paths since nativesdk can't handle hardcoded paths, Also added *.real binaries to packaging since this is not done when built as native.

As far as /var having to be hardcoded, I have a hard time seeing someone modifying bitbake.conf to place localstatedir somewhere else than /var.

If there exists a target/nativesdk portable way of hardcoding FILES, please let me know, and we'll do it that way.

Cleanup of FEATURES, since it was the same for native & target.

---
 meta/recipes-devtools/rpm/rpm_5.4.9.bb | 30
++++++++++++++++++++++++------
 1 file changed, 24 insertions(+), 6 deletions(-)
(quoted diff) +0 -0

rpm_5.4.9.bb
index 3c7e03b..9699639 100644

meta/recipes-devtools/rpm/rpm_5.4.9.bb +0 -0
@@ -105,12 +105,12 @@ 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:%{_etcrpm}/macros.*:%{_etcrpm}/macros:%{_etcrpm}/%{_target}/macros:~/.oerpmmacros"
rpm_macros_class-native =
"%{_usrlibrpm}/macros:%{_usrlibrpm}/poky/macros:%{_usrlibrpm}/poky/%{_target}/macros:~/.oerpmmacros"
+rpm_macros_class-nativesdk =
"%{_usrlibrpm}/macros:%{_usrlibrpm}/poky/macros:%{_usrlibrpm}/poky/%{_target}/macros:~/.oerpmmacros"

 # sqlite lua tcl augeas nss gcrypt neon xz xar keyutils perl selinux

# Note: perl and sqlite w/o db specified does not currently work.
# tcl, augeas, nss, gcrypt, xar and keyutils support is untested.
-PACKAGECONFIG_class-native ??= "db bzip2 zlib beecrypt openssl libelf python"
PACKAGECONFIG ??= "db bzip2 zlib beecrypt openssl libelf python"

PACKAGECONFIG[bzip2] = "--with-bzip2,--without-bzip2,bzip2,"

meta/recipes-devtools/rpm/rpm_5.4.9.bb +14 -4
@@ -224,8 +224,16 @@ FILES_${PN} =  "${bindir}/rpm \
                ${libdir}/rpm/bin/rpmrepo \
                ${libdir}/rpm/bin/rpmspecdump \
                ${libdir}/rpm/bin/wget \
-               /var/lib/rpm \
-               /var/cache/rpm \
+               ${libdir}/rpm \
+               ${localstatedir}/cache \
+               ${localstatedir}/cache/rpm \
+               ${localstatedir}/cache/wdj \
+               ${localstatedir}/lib \
+               ${localstatedir}/lib/rpm \
+               ${localstatedir}/lib/wdj \
+               ${bindir}/rpm.real \
+               ${bindir}/rpmconstant.real \
+               ${bindir}/rpm2cpio.real \
                "
 
 FILES_${PN}-dbg += "${libdir}/rpm/.debug \
@@ -235,7 +243,7 @@ FILES_${PN}-dbg += "${libdir}/rpm/.debug \
 FILES_${PN}-common = "${bindir}/rpm2cpio \
                ${bindir}/gendiff \
                ${sysconfdir}/rpm \
-               /var/spool/repackage \
+               ${localstatedir}/spool/repackage \
                "
 
 FILES_${PN}-libs = "${libdir}/librpm-*.so \
@@ -250,6 +258,7 @@ RDEPENDS_${PN}-build += "bash"
 
 FILES_${PN}-build = "${prefix}/src/rpm \
                ${bindir}/rpmbuild \
+               ${bindir}/rpmbuild.real \
                ${libdir}/rpm/brp-* \
                ${libdir}/rpm/check-files \
                ${libdir}/rpm/cross-build \
@@ -313,6 +322,7 @@ FILES_${PN}-build = "${prefix}/src/rpm \
                "
 RDEPENDS_${PN} = "base-files run-postinsts"
 RDEPENDS_${PN}_class-native = ""
+RDEPENDS_${PN}_class-nativesdk = ""
 RDEPENDS_${PN}-build = "file"
 
 RDEPENDS_python-rpm = "${PN}"
@@ -452,7 +462,7 @@ do_install_append() {
 
 }
 
-do_install_append_class-native() {
+add_native_wrapper() {
         create_wrapper ${D}/${bindir}/rpm \
                RPM_USRLIBRPM='`dirname
 $''realpath`'/${@os.path.relpath(d.getVar('libdir', True),
d.getVar('bindir', True))}/rpm \
                RPM_ETCRPM='$'{RPM_ETCRPM-'`dirname

$''realpath`'/${@os.path.relpath(d.getVar('sysconfdir', True), d.getVar('bindir', True))}/rpm} \

meta/recipes-devtools/rpm/rpm_5.4.9.bb +9 -2
@@ -481,4 +491,12 @@ do_install_append_class-native() {
        done
 }
 
-BBCLASSEXTEND = "native"
+do_install_append_class-native() {
+       add_native_wrapper
+}
+
+do_install_append_class-nativesdk() {
+       add_native_wrapper
+}
+
+BBCLASSEXTEND = "native nativesdk"
--

1.8.3.2