summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
Diffstat (limited to 'meta')
-rw-r--r--meta/recipes-devtools/rpm/rpm_4.14.1.bb42
1 files changed, 28 insertions, 14 deletions
diff --git a/meta/recipes-devtools/rpm/rpm_4.14.1.bb b/meta/recipes-devtools/rpm/rpm_4.14.1.bb
index d49530e0b9..cf26c1e8db 100644
--- a/meta/recipes-devtools/rpm/rpm_4.14.1.bb
+++ b/meta/recipes-devtools/rpm/rpm_4.14.1.bb
@@ -67,6 +67,7 @@ EXTRA_OECONF_append_libc-musl = " --disable-nls"
67# Disable dbus for native, so that rpm doesn't attempt to inhibit shutdown via session dbus even when plugins support is enabled. 67# Disable dbus for native, so that rpm doesn't attempt to inhibit shutdown via session dbus even when plugins support is enabled.
68# Also disable plugins by default for native. 68# Also disable plugins by default for native.
69EXTRA_OECONF_append_class-native = " --sysconfdir=/etc --localstatedir=/var --without-dbus --disable-plugins" 69EXTRA_OECONF_append_class-native = " --sysconfdir=/etc --localstatedir=/var --without-dbus --disable-plugins"
70EXTRA_OECONF_append_class-nativesdk = " --sysconfdir=/etc --localstatedir=/var --without-dbus --disable-plugins"
70 71
71BBCLASSEXTEND = "native nativesdk" 72BBCLASSEXTEND = "native nativesdk"
72 73
@@ -77,21 +78,22 @@ ASNEEDED = ""
77 78
78# Direct rpm-native to read configuration from our sysroot, not the one it was compiled in 79# Direct rpm-native to read configuration from our sysroot, not the one it was compiled in
79# libmagic also has sysroot path contamination, so override it 80# libmagic also has sysroot path contamination, so override it
81
82WRAPPER_TOOLS = " \
83 ${bindir}/rpm \
84 ${bindir}/rpm2archive \
85 ${bindir}/rpm2cpio \
86 ${bindir}/rpmbuild \
87 ${bindir}/rpmdb \
88 ${bindir}/rpmgraph \
89 ${bindir}/rpmkeys \
90 ${bindir}/rpmsign \
91 ${bindir}/rpmspec \
92 ${libdir}/rpm/rpmdeps \
93"
94
80do_install_append_class-native() { 95do_install_append_class-native() {
81 tools="\ 96 for tool in ${WRAPPER_TOOLS}; do
82 ${bindir}/rpm \
83 ${bindir}/rpm2archive \
84 ${bindir}/rpm2cpio \
85 ${bindir}/rpmbuild \
86 ${bindir}/rpmdb \
87 ${bindir}/rpmgraph \
88 ${bindir}/rpmkeys \
89 ${bindir}/rpmsign \
90 ${bindir}/rpmspec \
91 ${libdir}/rpm/rpmdeps \
92 "
93
94 for tool in $tools; do
95 create_wrapper ${D}$tool \ 97 create_wrapper ${D}$tool \
96 RPM_CONFIGDIR=${STAGING_LIBDIR_NATIVE}/rpm \ 98 RPM_CONFIGDIR=${STAGING_LIBDIR_NATIVE}/rpm \
97 RPM_ETCCONFIGDIR=${STAGING_DIR_NATIVE} \ 99 RPM_ETCCONFIGDIR=${STAGING_DIR_NATIVE} \
@@ -100,6 +102,18 @@ do_install_append_class-native() {
100 done 102 done
101} 103}
102 104
105do_install_append_class-nativesdk() {
106 for tool in ${WRAPPER_TOOLS}; do
107 create_wrapper ${D}$tool \
108 RPM_CONFIGDIR='`dirname $''realpath`'/${@os.path.relpath(d.getVar('libdir', True), d.getVar('bindir', True))}/rpm \
109 RPM_ETCCONFIGDIR='$'{RPM_ETCCONFIGDIR-'`dirname $''realpath`'/${@os.path.relpath(d.getVar('sysconfdir', True), d.getVar('bindir', True))}/..} \
110 MAGIC='`dirname $''realpath`'/${@os.path.relpath(d.getVar('datadir', True), d.getVar('bindir', True))}/misc/magic.mgc \
111 RPM_NO_CHROOT_FOR_SCRIPTS=1
112 done
113
114 rm -rf ${D}/var
115}
116
103# Rpm's make install creates var/tmp which clashes with base-files packaging 117# Rpm's make install creates var/tmp which clashes with base-files packaging
104do_install_append_class-target() { 118do_install_append_class-target() {
105 rm -rf ${D}/var 119 rm -rf ${D}/var