All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/1] rpm: remove dbus dependency for rpm-native
@ 2018-04-04 10:45 Chen Qi
  2018-04-04 10:45 ` [PATCH 1/1] " Chen Qi
  0 siblings, 1 reply; 6+ messages in thread
From: Chen Qi @ 2018-04-04 10:45 UTC (permalink / raw)
  To: openembedded-core

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(-)

-- 
1.9.1



^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH 1/1] rpm: remove dbus dependency for rpm-native
  2018-04-04 10:45 [PATCH 0/1] rpm: remove dbus dependency for rpm-native Chen Qi
@ 2018-04-04 10:45 ` Chen Qi
  2018-04-04 11:32   ` Alexander Kanavin
  0 siblings, 1 reply; 6+ messages in thread
From: Chen Qi @ 2018-04-04 10:45 UTC (permalink / raw)
  To: openembedded-core

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.

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
---
 meta/recipes-devtools/rpm/rpm_4.14.1.bb | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/meta/recipes-devtools/rpm/rpm_4.14.1.bb b/meta/recipes-devtools/rpm/rpm_4.14.1.bb
index 7b8ea46..88f9535 100644
--- a/meta/recipes-devtools/rpm/rpm_4.14.1.bb
+++ b/meta/recipes-devtools/rpm/rpm_4.14.1.bb
@@ -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"
-- 
1.9.1



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/1] rpm: remove dbus dependency for rpm-native
  2018-04-04 10:45 ` [PATCH 1/1] " Chen Qi
@ 2018-04-04 11:32   ` Alexander Kanavin
  2018-04-05  9:16     ` Alexander Kanavin
  0 siblings, 1 reply; 6+ messages in thread
From: Alexander Kanavin @ 2018-04-04 11:32 UTC (permalink / raw)
  To: Chen Qi, openembedded-core

On 04/04/2018 01:45 PM, Chen Qi wrote:
> +# 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"


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




^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/1] rpm: remove dbus dependency for rpm-native
  2018-04-04 11:32   ` Alexander Kanavin
@ 2018-04-05  9:16     ` Alexander Kanavin
  2018-04-08  7:57       ` ChenQi
  0 siblings, 1 reply; 6+ messages in thread
From: Alexander Kanavin @ 2018-04-05  9:16 UTC (permalink / raw)
  To: Chen Qi, openembedded-core

On 04/04/2018 02:32 PM, Alexander Kanavin wrote:
>> +# 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"
> 
> 
> 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


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/1] rpm: remove dbus dependency for rpm-native
  2018-04-05  9:16     ` Alexander Kanavin
@ 2018-04-08  7:57       ` ChenQi
  2018-04-09  6:11         ` Alexander Kanavin
  0 siblings, 1 reply; 6+ messages in thread
From: ChenQi @ 2018-04-08  7:57 UTC (permalink / raw)
  To: Alexander Kanavin, openembedded-core

On 04/05/2018 05:16 PM, Alexander Kanavin wrote:
> On 04/04/2018 02:32 PM, Alexander Kanavin wrote:
>>> +# 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"
>>
>>
>> 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
>
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


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/1] rpm: remove dbus dependency for rpm-native
  2018-04-08  7:57       ` ChenQi
@ 2018-04-09  6:11         ` Alexander Kanavin
  0 siblings, 0 replies; 6+ messages in thread
From: Alexander Kanavin @ 2018-04-09  6:11 UTC (permalink / raw)
  To: ChenQi, openembedded-core

On 04/08/2018 10:57 AM, ChenQi wrote:
> 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


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2018-04-09  6:17 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-04 10:45 [PATCH 0/1] rpm: remove dbus dependency for rpm-native Chen Qi
2018-04-04 10:45 ` [PATCH 1/1] " Chen Qi
2018-04-04 11:32   ` Alexander Kanavin
2018-04-05  9:16     ` Alexander Kanavin
2018-04-08  7:57       ` ChenQi
2018-04-09  6:11         ` Alexander Kanavin

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.