From: "David Nyström" <david.c.nystrom@gmail.com>
To: openembedded-core@lists.openembedded.org
Subject: [PATCHv2] rpm: Add nativesdk to BBCLASSEXTEND
Date: Fri, 18 Oct 2013 12:27:26 +0200 [thread overview]
Message-ID: <1382092046-25109-1-git-send-email-david.nystrom@enea.com> (raw)
In-Reply-To: <1382018386-25389-12-git-send-email-david.nystrom@enea.com>
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.
Signed-off-by: David Nyström <david.nystrom@enea.com>
---
meta/recipes-devtools/rpm/rpm_5.4.9.bb | 30 ++++++++++++++++++++++++------
1 file changed, 24 insertions(+), 6 deletions(-)
diff --git a/meta/recipes-devtools/rpm/rpm_5.4.9.bb b/meta/recipes-devtools/rpm/rpm_5.4.9.bb
index 3c7e03b..9699639 100644
--- a/meta/recipes-devtools/rpm/rpm_5.4.9.bb
+++ b/meta/recipes-devtools/rpm/rpm_5.4.9.bb
@@ -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"
--
1.8.3.2
next prev parent reply other threads:[~2013-10-18 10:27 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-17 13:59 [PATCH 00/11] RPM PMS in SDK tarball David Nyström
2013-10-17 13:59 ` [PATCH 01/11] popt: Add nativesdk in BBCLASSEXTEND David Nyström
2013-10-17 13:59 ` [PATCH 02/11] icu: " David Nyström
2013-10-17 13:59 ` [PATCH 03/11] beecrypt: " David Nyström
2013-10-17 13:59 ` [PATCH 04/11] attr: " David Nyström
2013-10-17 13:59 ` [PATCH 05/11] acl: " David Nyström
2013-10-17 13:59 ` [PATCH 06/11] rpmresolve: " David Nyström
2013-10-17 13:59 ` [PATCH 07/11] smartpm: " David Nyström
2013-10-17 13:59 ` [PATCH 08/11] ossp-uuid: " David Nyström
2013-10-17 13:59 ` [PATCH 09/11] file: " David Nyström
2013-10-17 13:59 ` [PATCH 10/11] nativesdk-packagegroup-sdk-host: Add new DISTRO_FEATURE, sdk-pms David Nyström
2013-10-18 14:54 ` Richard Purdie
2013-10-18 18:53 ` David Nystrom
2013-10-17 13:59 ` [PATCH 11/11] rpm: Add nativesdk in BBCLASSEXTEND David Nyström
2013-10-17 14:31 ` Mark Hatle
2013-10-17 16:00 ` David Nystrom
2013-10-18 10:27 ` David Nyström [this message]
2013-10-21 18:03 ` [PATCHv2] rpm: Add nativesdk to BBCLASSEXTEND David Nystrom
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1382092046-25109-1-git-send-email-david.nystrom@enea.com \
--to=david.c.nystrom@gmail.com \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox