summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/rpm
diff options
context:
space:
mode:
authorRoss Burton <ross@burtonini.com>2020-09-28 19:43:28 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-09-30 15:01:51 +0100
commit3b545e61dba16b8e10c15767a11572d3fe0297be (patch)
treea2432a9eb2bd97f8af07a582fe3f0a57f60d97a1 /meta/recipes-devtools/rpm
parent7f6dfe562cfb2cab018f8664d3dc0a3111147a56 (diff)
downloadpoky-3b545e61dba16b8e10c15767a11572d3fe0297be.tar.gz
rpm: add PACKAGECONFIG for the systemd inhibit plugin
RPM ships a systemd inhibit plugin, that will tell systemd to inhibit a reboot or sleep during a package upgrades. For native RPM this is entirely useless, and for target it's only useful if you're using systemd+logind+rpm. This plugin uses DBus which means it depends on expat -> cmake-native -> libarchive-native curl-native, which is quite a dependency tree to need in early build (required to build packages via rpm-native). It was previously forcibly disabled for native packages but the build dependency on DBus remained. Add a PACKAGECONFIG for the plugin that is only enabled for target builds with systemd and explicitly disabled for native/nativesdk builds, but also keep the explicit disabling of all plugins as the prioreset plugin also behaves badly inside a build. (From OE-Core rev: df758ea66fd2f69d591c1fd36b90969796d50bd0) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/rpm')
-rw-r--r--meta/recipes-devtools/rpm/rpm_4.15.1.bb15
1 files changed, 9 insertions, 6 deletions
diff --git a/meta/recipes-devtools/rpm/rpm_4.15.1.bb b/meta/recipes-devtools/rpm/rpm_4.15.1.bb
index 71e2c033fd..a1c5205554 100644
--- a/meta/recipes-devtools/rpm/rpm_4.15.1.bb
+++ b/meta/recipes-devtools/rpm/rpm_4.15.1.bb
@@ -49,7 +49,7 @@ SRCREV = "ab2179452c5be276a6b96c591afded485c7e58c3"
49 49
50S = "${WORKDIR}/git" 50S = "${WORKDIR}/git"
51 51
52DEPENDS = "openssl db file popt xz bzip2 dbus elfutils python3" 52DEPENDS = "openssl db file popt xz bzip2 elfutils python3"
53DEPENDS_append_class-native = " file-replacement-native bzip2-replacement-native" 53DEPENDS_append_class-native = " file-replacement-native bzip2-replacement-native"
54 54
55inherit autotools gettext pkgconfig python3native 55inherit autotools gettext pkgconfig python3native
@@ -62,18 +62,21 @@ EXTRA_OECONF_append = " --without-lua --enable-python --with-crypto=openssl"
62EXTRA_OECONF_append_libc-musl = " --disable-nls --disable-openmp" 62EXTRA_OECONF_append_libc-musl = " --disable-nls --disable-openmp"
63 63
64# --sysconfdir prevents rpm from attempting to access machine-specific configuration in sysroot/etc; we need to have it in rootfs 64# --sysconfdir prevents rpm from attempting to access machine-specific configuration in sysroot/etc; we need to have it in rootfs
65#
66# --localstatedir prevents rpm from writing its database to native sysroot when building images 65# --localstatedir prevents rpm from writing its database to native sysroot when building images
67# 66# Forcibly disable plugins for native/nativesdk, as the inhibit and prioreset
68# Disable dbus for native, so that rpm doesn't attempt to inhibit shutdown via session dbus even when plugins support is enabled. 67# plugins both behave badly inside builds.
69# Also disable plugins by default for native.
70EXTRA_OECONF_append_class-native = " --sysconfdir=/etc --localstatedir=/var --disable-plugins" 68EXTRA_OECONF_append_class-native = " --sysconfdir=/etc --localstatedir=/var --disable-plugins"
71EXTRA_OECONF_append_class-nativesdk = " --sysconfdir=/etc --disable-plugins" 69EXTRA_OECONF_append_class-nativesdk = " --sysconfdir=/etc --disable-plugins"
72 70
73BBCLASSEXTEND = "native nativesdk" 71BBCLASSEXTEND = "native nativesdk"
74 72
75PACKAGECONFIG ??= "" 73PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'inhibit', '', d)}"
74# The inhibit plugin serves no purpose outside of the target
75PACKAGECONFIG_remove_class-native = "inhibit"
76PACKAGECONFIG_remove_class-nativesdk = "inhibit"
77
76PACKAGECONFIG[imaevm] = "--with-imaevm,,ima-evm-utils" 78PACKAGECONFIG[imaevm] = "--with-imaevm,,ima-evm-utils"
79PACKAGECONFIG[inhibit] = "--enable-inhibit-plugin,--disable-inhibit-plugin,dbus"
77PACKAGECONFIG[rpm2archive] = "--with-archive,--without-archive,libarchive" 80PACKAGECONFIG[rpm2archive] = "--with-archive,--without-archive,libarchive"
78 81
79ASNEEDED = "" 82ASNEEDED = ""