<p dir="ltr">Ping?</p>
<p dir="ltr">Was this patch forgotten ?</p>
<p dir="ltr">//DD</p>
<div class="gmail_quote">On 18 Oct 2013 11:27, "David Nyström" <<a href="mailto:david.c.nystrom@gmail.com">david.c.nystrom@gmail.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Modified FILES-paths since nativesdk can't handle hardcoded paths,<br>
Also added *.real binaries to packaging since this is not done when built<br>
as native.<br>
<br>
As far as /var having to be hardcoded, I have a hard time seeing someone<br>
modifying bitbake.conf to place localstatedir somewhere else than /var.<br>
<br>
If there exists a target/nativesdk portable way of hardcoding FILES,<br>
please let me know, and we'll do it that way.<br>
<br>
Cleanup of FEATURES, since it was the same for native & target.<br>
<br>
Signed-off-by: David Nyström <<a href="mailto:david.nystrom@enea.com">david.nystrom@enea.com</a>><br>
---<br>
meta/recipes-devtools/rpm/<a href="http://rpm_5.4.9.bb" target="_blank">rpm_5.4.9.bb</a> | 30 ++++++++++++++++++++++++------<br>
1 file changed, 24 insertions(+), 6 deletions(-)<br>
<br>
diff --git a/meta/recipes-devtools/rpm/<a href="http://rpm_5.4.9.bb" target="_blank">rpm_5.4.9.bb</a> b/meta/recipes-devtools/rpm/<a href="http://rpm_5.4.9.bb" target="_blank">rpm_5.4.9.bb</a><br>
index 3c7e03b..9699639 100644<br>
--- a/meta/recipes-devtools/rpm/<a href="http://rpm_5.4.9.bb" target="_blank">rpm_5.4.9.bb</a><br>
+++ b/meta/recipes-devtools/rpm/<a href="http://rpm_5.4.9.bb" target="_blank">rpm_5.4.9.bb</a><br>
@@ -105,12 +105,12 @@ acpaths = "-I ${S}/db/dist/aclocal -I ${S}/db/dist/aclocal_java"<br>
# Specify the default rpm macros in terms of adjustable variables<br>
rpm_macros = "%{_usrlibrpm}/macros:%{_usrlibrpm}/poky/macros:%{_usrlibrpm}/poky/%{_target}/macros:%{_etcrpm}/macros.*:%{_etcrpm}/macros:%{_etcrpm}/%{_target}/macros:~/.oerpmmacros"<br>
rpm_macros_class-native = "%{_usrlibrpm}/macros:%{_usrlibrpm}/poky/macros:%{_usrlibrpm}/poky/%{_target}/macros:~/.oerpmmacros"<br>
+rpm_macros_class-nativesdk = "%{_usrlibrpm}/macros:%{_usrlibrpm}/poky/macros:%{_usrlibrpm}/poky/%{_target}/macros:~/.oerpmmacros"<br>
<br>
# sqlite lua tcl augeas nss gcrypt neon xz xar keyutils perl selinux<br>
<br>
# Note: perl and sqlite w/o db specified does not currently work.<br>
# tcl, augeas, nss, gcrypt, xar and keyutils support is untested.<br>
-PACKAGECONFIG_class-native ??= "db bzip2 zlib beecrypt openssl libelf python"<br>
PACKAGECONFIG ??= "db bzip2 zlib beecrypt openssl libelf python"<br>
<br>
PACKAGECONFIG[bzip2] = "--with-bzip2,--without-bzip2,bzip2,"<br>
@@ -224,8 +224,16 @@ FILES_${PN} = "${bindir}/rpm \<br>
${libdir}/rpm/bin/rpmrepo \<br>
${libdir}/rpm/bin/rpmspecdump \<br>
${libdir}/rpm/bin/wget \<br>
- /var/lib/rpm \<br>
- /var/cache/rpm \<br>
+ ${libdir}/rpm \<br>
+ ${localstatedir}/cache \<br>
+ ${localstatedir}/cache/rpm \<br>
+ ${localstatedir}/cache/wdj \<br>
+ ${localstatedir}/lib \<br>
+ ${localstatedir}/lib/rpm \<br>
+ ${localstatedir}/lib/wdj \<br>
+ ${bindir}/rpm.real \<br>
+ ${bindir}/rpmconstant.real \<br>
+ ${bindir}/rpm2cpio.real \<br>
"<br>
<br>
FILES_${PN}-dbg += "${libdir}/rpm/.debug \<br>
@@ -235,7 +243,7 @@ FILES_${PN}-dbg += "${libdir}/rpm/.debug \<br>
FILES_${PN}-common = "${bindir}/rpm2cpio \<br>
${bindir}/gendiff \<br>
${sysconfdir}/rpm \<br>
- /var/spool/repackage \<br>
+ ${localstatedir}/spool/repackage \<br>
"<br>
<br>
FILES_${PN}-libs = "${libdir}/librpm-*.so \<br>
@@ -250,6 +258,7 @@ RDEPENDS_${PN}-build += "bash"<br>
<br>
FILES_${PN}-build = "${prefix}/src/rpm \<br>
${bindir}/rpmbuild \<br>
+ ${bindir}/rpmbuild.real \<br>
${libdir}/rpm/brp-* \<br>
${libdir}/rpm/check-files \<br>
${libdir}/rpm/cross-build \<br>
@@ -313,6 +322,7 @@ FILES_${PN}-build = "${prefix}/src/rpm \<br>
"<br>
RDEPENDS_${PN} = "base-files run-postinsts"<br>
RDEPENDS_${PN}_class-native = ""<br>
+RDEPENDS_${PN}_class-nativesdk = ""<br>
RDEPENDS_${PN}-build = "file"<br>
<br>
RDEPENDS_python-rpm = "${PN}"<br>
@@ -452,7 +462,7 @@ do_install_append() {<br>
<br>
}<br>
<br>
-do_install_append_class-native() {<br>
+add_native_wrapper() {<br>
create_wrapper ${D}/${bindir}/rpm \<br>
RPM_USRLIBRPM='`dirname $''realpath`'/${@os.path.relpath(d.getVar('libdir', True), d.getVar('bindir', True))}/rpm \<br>
RPM_ETCRPM='$'{RPM_ETCRPM-'`dirname $''realpath`'/${@os.path.relpath(d.getVar('sysconfdir', True), d.getVar('bindir', True))}/rpm} \<br>
@@ -481,4 +491,12 @@ do_install_append_class-native() {<br>
done<br>
}<br>
<br>
-BBCLASSEXTEND = "native"<br>
+do_install_append_class-native() {<br>
+ add_native_wrapper<br>
+}<br>
+<br>
+do_install_append_class-nativesdk() {<br>
+ add_native_wrapper<br>
+}<br>
+<br>
+BBCLASSEXTEND = "native nativesdk"<br>
--<br>
1.8.3.2<br>
<br>
</blockquote></div>