<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, &quot;David Nyström&quot; &lt;<a href="mailto:david.c.nystrom@gmail.com">david.c.nystrom@gmail.com</a>&gt; 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&#39;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&#39;ll do it that way.<br>
<br>
Cleanup of FEATURES, since it was the same for native &amp; target.<br>
<br>
Signed-off-by: David Nyström &lt;<a href="mailto:david.nystrom@enea.com">david.nystrom@enea.com</a>&gt;<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 = &quot;-I ${S}/db/dist/aclocal -I ${S}/db/dist/aclocal_java&quot;<br>
 # Specify the default rpm macros in terms of adjustable variables<br>
 rpm_macros = &quot;%{_usrlibrpm}/macros:%{_usrlibrpm}/poky/macros:%{_usrlibrpm}/poky/%{_target}/macros:%{_etcrpm}/macros.*:%{_etcrpm}/macros:%{_etcrpm}/%{_target}/macros:~/.oerpmmacros&quot;<br>
 rpm_macros_class-native = &quot;%{_usrlibrpm}/macros:%{_usrlibrpm}/poky/macros:%{_usrlibrpm}/poky/%{_target}/macros:~/.oerpmmacros&quot;<br>
+rpm_macros_class-nativesdk = &quot;%{_usrlibrpm}/macros:%{_usrlibrpm}/poky/macros:%{_usrlibrpm}/poky/%{_target}/macros:~/.oerpmmacros&quot;<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 ??= &quot;db bzip2 zlib beecrypt openssl libelf python&quot;<br>
 PACKAGECONFIG ??= &quot;db bzip2 zlib beecrypt openssl libelf python&quot;<br>
<br>
 PACKAGECONFIG[bzip2] = &quot;--with-bzip2,--without-bzip2,bzip2,&quot;<br>
@@ -224,8 +224,16 @@ FILES_${PN} =  &quot;${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>
                &quot;<br>
<br>
 FILES_${PN}-dbg += &quot;${libdir}/rpm/.debug \<br>
@@ -235,7 +243,7 @@ FILES_${PN}-dbg += &quot;${libdir}/rpm/.debug \<br>
 FILES_${PN}-common = &quot;${bindir}/rpm2cpio \<br>
                ${bindir}/gendiff \<br>
                ${sysconfdir}/rpm \<br>
-               /var/spool/repackage \<br>
+               ${localstatedir}/spool/repackage \<br>
                &quot;<br>
<br>
 FILES_${PN}-libs = &quot;${libdir}/librpm-*.so \<br>
@@ -250,6 +258,7 @@ RDEPENDS_${PN}-build += &quot;bash&quot;<br>
<br>
 FILES_${PN}-build = &quot;${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 = &quot;${prefix}/src/rpm \<br>
                &quot;<br>
 RDEPENDS_${PN} = &quot;base-files run-postinsts&quot;<br>
 RDEPENDS_${PN}_class-native = &quot;&quot;<br>
+RDEPENDS_${PN}_class-nativesdk = &quot;&quot;<br>
 RDEPENDS_${PN}-build = &quot;file&quot;<br>
<br>
 RDEPENDS_python-rpm = &quot;${PN}&quot;<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=&#39;`dirname $&#39;&#39;realpath`&#39;/${@os.path.relpath(d.getVar(&#39;libdir&#39;, True), d.getVar(&#39;bindir&#39;, True))}/rpm \<br>
                RPM_ETCRPM=&#39;$&#39;{RPM_ETCRPM-&#39;`dirname $&#39;&#39;realpath`&#39;/${@os.path.relpath(d.getVar(&#39;sysconfdir&#39;, True), d.getVar(&#39;bindir&#39;, True))}/rpm} \<br>
@@ -481,4 +491,12 @@ do_install_append_class-native() {<br>
        done<br>
 }<br>
<br>
-BBCLASSEXTEND = &quot;native&quot;<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 = &quot;native nativesdk&quot;<br>
--<br>
1.8.3.2<br>
<br>
</blockquote></div>