[OE-core] [PATCH 11/11] rpm: Add nativesdk in BBCLASSEXTEND
David Nystrom
david.c.nystrom at gmail.com
Thu Oct 17 16:00:05 UTC 2013
On 17 Oct 2013 16:31, "Mark Hatle" <mark.hatle at windriver.com> wrote:
>
> On 10/17/13 8:59 AM, David Nyström wrote:
>
> Should have a commit message explaining the various changes.
>
>
>> Signed-off-by: David Nyström <david.nystrom at enea.com>
>> ---
>> meta/recipes-devtools/rpm/rpm_5.4.9.bb | 24 ++++++++++++++++++------
>> 1 file changed, 18 insertions(+), 6 deletions(-)
>>
>> diff --git a/meta/recipes-devtools/rpm/rpm_5.4.9.bbb/meta/recipes-devtools/rpm/
rpm_5.4.9.bb
>> index 3c7e03b..0630f74 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,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".
>
>
> Otherwise the content looks fine.
>
> --Mark
>
>
>> "
>>
>> 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"
>>
>
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core at lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openembedded.org/pipermail/openembedded-core/attachments/20131017/7d53528d/attachment-0002.html>
More information about the Openembedded-core
mailing list