rpm: remove dbus dependency for rpm-native
cover rpm: remove dbus dependency for rpm-native
The following changes since commit 9e3a9637b8f86f504e187b96cd0c98d8e1f651da:
systemd: fix typo in sulogin-path setting (2018-04-04 08:51:02 +0100)
are available in the git repository at:
git://git.pokylinux.org/poky-contrib ChenQi/rpm-native-dbus
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=ChenQi/rpm-native-dbus
Chen Qi (1):
rpm: remove dbus dependency for rpm-native
meta/recipes-devtools/rpm/rpm_4.14.1.bb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
Signature · 1 line
1.9.1
PATCH 1/1 rpm: remove dbus dependency for rpm-native
Previously, the rpm recipe tries to prevent rpm-native from attempting to inhibit shutdown via session dbus by appending '--disable-plugins' to EXTRA_OECONF in case of native.
However, some layer may need some functionality via plugin support. And when it enables it, we would meet the following warning at rootfs time.
Unable to get systemd shutdown inhibition lock: Socket name too long
As plugins/systemd_inhibit.c is the only place that's related to this dependency, we can be sure that this dependency is really not needed in case of native. So we explictly remove the dbus dependency for rpm-native.
--- meta/recipes-devtools/rpm/rpm_4.14.1.bb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
meta/recipes-devtools/rpm/rpm_4.14.1.bb +5 -1
@@ -50,6 +50,10 @@ S = "${WORKDIR}/git" DEPENDS = "nss libarchive db file popt xz bzip2 dbus elfutils python3" DEPENDS_append_class-native = " file-replacement-native bzip2-replacement-native" +# dbus dependency is deliberately omitted for rpm-native to prevent it from attempting to +# inhibit shutdown via session dbus, even when some layer enables plugins support for rpm-native. +DEPENDS_remove_class-native = "dbus" + inherit autotools gettext pkgconfig python3native export PYTHON_ABI
@@ -63,7 +67,7 @@ EXTRA_OECONF_append_libc-musl = " --disable-nls" # # --localstatedir prevents rpm from writing its database to native sysroot when building images # -# Also disable plugins, so that rpm doesn't attempt to inhibit shutdown via session dbus +# Disable plugins for rpm-native. EXTRA_OECONF_append_class-native = " --sysconfdir=/etc --localstatedir=/var --disable-plugins" BBCLASSEXTEND = "native nativesdk"
Signature · 1 line
1.9.1
Quoted 8 lines · Chen Qi
meta/recipes-devtools/rpm/rpm_4.14.1.bb +4
-0+# dbus dependency is deliberately omitted for rpm-native to prevent it from attempting to +# inhibit shutdown via session dbus, even when some layer enables plugins support for rpm-native. +DEPENDS_remove_class-native = "dbus" + inherit autotools gettext pkgconfig python3native export PYTHON_ABI
meta/recipes-devtools/rpm/rpm_4.14.1.bb EXTRA_OECONF_append_libc-musl = " --disable-nls" · line 71
Quoted 6 lines
meta/recipes-devtools/rpm/rpm_4.14.1.bb +1
-1@@ -63,7 +67,7 @@ EXTRA_OECONF_append_libc-musl = " --disable-nls" # # --localstatedir prevents rpm from writing its database to native sysroot when building images # -# Also disable plugins, so that rpm doesn't attempt to inhibit shutdown via session dbus +# Disable plugins for rpm-native. EXTRA_OECONF_append_class-native = " --sysconfdir=/etc --localstatedir=/var --disable-plugins"
This should definitely be a PACKAGECONFIG option. Actually, two different options: "plugins" (pulls in dbus) and "plugins-native" (does not pull in dbus). Then both can be enabled for target and native, respectively.
Alex
Quoted 12 lines · Alexander Kanavin
Quoted 12 lines
+# dbus dependency is deliberately omitted for rpm-native to prevent it from attempting to
+# inhibit shutdown via session dbus, even when some layer enables plugins support for rpm-native.meta/recipes-devtools/rpm/rpm_4.14.1.bb +2
-0+DEPENDS_remove_class-native = "dbus" +inherit autotools gettext pkgconfig python3native export
PYTHON_ABImeta/recipes-devtools/rpm/rpm_4.14.1.bb +0
-0@@ -63,7 +67,7 @@ EXTRA_OECONF_append_libc-musl = " --disable-nls" # # --localstatedir prevents rpm from writing its database to native sysroot when building images #
Quoted 8 lines
Quoted 5 lines
(quoted diff) +0
-1-# Also disable plugins, so that rpm doesn't attempt to inhibitshutdown via session dbus
+# Disable plugins for rpm-native. EXTRA_OECONF_append_class-native = " --sysconfdir=/etc --localstatedir=/var --disable-plugins"This should definitely be a PACKAGECONFIG option. Actually, two different options: "plugins" (pulls in dbus) and "plugins-native" (does not pull in dbus). Then both can be enabled for target and native, respectively.
Actually, no, neither of these ideas is correct. If dbus is removed from explicit dependencies, that does not guarantee that it will not get pulled into rpm sysroot by something else that rpm depends on. You need to either patch configure.ac in rpm source code to add an explicit enable/disable-dbus switch, or to enable plugins in all cases, and remove the unneeded plugin at do_install tim when building rpm-native.
Alex
Quoted 23 lines · Alexander Kanavin
Quoted 13 lines · Alexander Kanavin
Quoted 13 lines
+# dbus dependency is deliberately omitted for rpm-native to prevent it from attempting to
+# inhibit shutdown via session dbus, even when some layer enables plugins support for rpm-native.meta/recipes-devtools/rpm/rpm_4.14.1.bb +2
-0+DEPENDS_remove_class-native = "dbus" + inherit autotools gettext pkgconfig python3native export PYTHON_ABI@@ -63,7 +67,7 @@ EXTRA_OECONF_append_libc-musl = " --disable-nls" # # --localstatedir prevents rpm from writing its database to nativesysroot when building images
#Quoted 8 lines
Quoted 5 lines
-# Also disable plugins, so that rpm doesn't attempt to inhibit shutdown via session dbus
+# Disable plugins for rpm-native.
EXTRA_OECONF_append_class-native = " --sysconfdir=/etc
--localstatedir=/var --disable-plugins"This should definitely be a PACKAGECONFIG option. Actually, two different options: "plugins" (pulls in dbus) and "plugins-native" (does not pull in dbus). Then both can be enabled for target and native, respectively.
Quoted 4 lines
Actually, no, neither of these ideas is correct. If dbus is removed from explicit dependencies, that does not guarantee that it will not get pulled into rpm sysroot by something else that rpm depends on. You need to either patch configure.ac in rpm source code to add an explicit enable/disable-dbus switch, or to enable plugins in all cases, and remove the unneeded plugin at
do_installtim when building rpm-native.Alex
Hi Alex,
Thanks for your advice.
I've sent out a new patch, which adds dbus option to configure.ac and then disables it for rpm-native.
Best Regards,
Chen Qi
Quoted 2 lines · ChenQi
Thanks for your advice.
I've sent out a new patch, which adds dbus option to configure.ac and then disables it for rpm-native.
Thanks. Can you submit the patch upstream please? Open a pull request here:
https://github.com/rpm-software-management/rpm
Alex