All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] dbus: build with systemd support
@ 2015-11-20 14:38 Andrew Shadura
  2015-11-20 14:38 ` [PATCH 2/2] dbus: add user sessions support Andrew Shadura
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Andrew Shadura @ 2015-11-20 14:38 UTC (permalink / raw)
  To: OE Core

It's good to have the extra functionality, such as seat support
provided with systemd support. Not least of all to support
systemd user-sessions.

This commit also changes references to the system unit path
from ${systemd_unitdir}/system to ${systemd_system_unitdir},
a new variable provided by bitbake.

Signed-off-by: Andrew Shadura <andrew.shadura@collabora.co.uk>
Signed-off-by: Joshua Lock <joshua.lock@collabora.co.uk>
---
 meta/recipes-core/dbus/dbus_1.10.2.bb | 19 ++++++++-----------
 1 file changed, 8 insertions(+), 11 deletions(-)

diff --git a/meta/recipes-core/dbus/dbus_1.10.2.bb b/meta/recipes-core/dbus/dbus_1.10.2.bb
index 1abe067..f7ab39b 100644
--- a/meta/recipes-core/dbus/dbus_1.10.2.bb
+++ b/meta/recipes-core/dbus/dbus_1.10.2.bb
@@ -68,7 +68,7 @@ FILES_${PN} = "${bindir}/dbus-daemon* \
                ${datadir}/dbus-1/session.conf \
                ${datadir}/dbus-1/system.d \
                ${datadir}/dbus-1/system.conf \
-               ${systemd_unitdir}/system/"
+               ${systemd_system_unitdir}"
 FILES_${PN}-lib = "${libdir}/lib*.so.*"
 RRECOMMENDS_${PN}-lib = "${PN}"
 FILES_${PN}-dev += "${libdir}/dbus-1.0/include ${bindir}/dbus-glib-tool ${bindir}/dbus-test-tool"
@@ -90,8 +90,7 @@ pkg_postinst_dbus() {
 EXTRA_OECONF = "--disable-tests \
                 --disable-xml-docs \
                 --disable-doxygen-docs \
-                --disable-libaudit \
-                --disable-systemd"
+                --disable-libaudit"
 
 EXTRA_OECONF_append_class-native = " --disable-selinux"
 
@@ -100,9 +99,7 @@ PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd',
 PACKAGECONFIG_class-native = ""
 PACKAGECONFIG_class-nativesdk = ""
 
-# Would like to --enable-systemd but that's a circular build-dependency between
-# systemd<->dbus
-PACKAGECONFIG[systemd] = "--with-systemdsystemunitdir=${systemd_unitdir}/system/,--without-systemdsystemunitdir"
+PACKAGECONFIG[systemd] = "--enable-systemd --with-systemdsystemunitdir=${systemd_system_unitdir},--disable-systemd --without-systemdsystemunitdir,systemd"
 PACKAGECONFIG[x11] = "--with-x --enable-x11-autolaunch,--without-x --disable-x11-autolaunch, virtual/libx11 libsm"
 PACKAGECONFIG[apparmor] = "--enable-apparmor,--disable-apparmor,libapparmor"
 
@@ -117,12 +114,12 @@ do_install() {
 
 	if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
 		for i in dbus.target.wants sockets.target.wants multi-user.target.wants; do \
-			install -d ${D}${systemd_unitdir}/system/$i; done
-		install -m 0644 ${B}/bus/dbus.service ${B}/bus/dbus.socket ${D}${systemd_unitdir}/system/
+			install -d ${D}${systemd_system_unitdir}/$i; done
+		install -m 0644 ${B}/bus/dbus.service ${B}/bus/dbus.socket ${D}${systemd_system_unitdir}/
 		cd ${D}${systemd_unitdir}/system/dbus.target.wants/
-		ln -fs ../dbus.socket ${D}${systemd_unitdir}/system/dbus.target.wants/dbus.socket
-		ln -fs ../dbus.socket ${D}${systemd_unitdir}/system/sockets.target.wants/dbus.socket
-		ln -fs ../dbus.service ${D}${systemd_unitdir}/system/multi-user.target.wants/dbus.service
+		ln -fs ../dbus.socket ${D}${systemd_system_unitdir}/dbus.target.wants/dbus.socket
+		ln -fs ../dbus.socket ${D}${systemd_system_unitdir}/sockets.target.wants/dbus.socket
+		ln -fs ../dbus.service ${D}${systemd_system_unitdir}/multi-user.target.wants/dbus.service
 	fi
 
 	install -d ${D}${sysconfdir}/default/volatiles
-- 
2.5.0



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

* [PATCH 2/2] dbus: add user sessions support
  2015-11-20 14:38 [PATCH 1/2] dbus: build with systemd support Andrew Shadura
@ 2015-11-20 14:38 ` Andrew Shadura
  2015-11-24 14:03   ` Burton, Ross
  2016-01-08 14:44   ` Patrick Ohly
  2015-11-20 16:09 ` [PATCH 1/2] dbus: build with systemd support Jussi Kukkonen
  2015-12-07 19:02 ` Patrick Ohly
  2 siblings, 2 replies; 9+ messages in thread
From: Andrew Shadura @ 2015-11-20 14:38 UTC (permalink / raw)
  To: OE Core

Enable the user-sessions support with a PACKAGECONFIG flag.

Signed-off-by: Andrew Shadura <andrew.shadura@collabora.co.uk>
Signed-off-by: Joshua Lock <joshua.lock@collabora.co.uk>
---
 meta/recipes-core/dbus/dbus_1.10.2.bb | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/meta/recipes-core/dbus/dbus_1.10.2.bb b/meta/recipes-core/dbus/dbus_1.10.2.bb
index f7ab39b..445f7ef 100644
--- a/meta/recipes-core/dbus/dbus_1.10.2.bb
+++ b/meta/recipes-core/dbus/dbus_1.10.2.bb
@@ -68,7 +68,9 @@ FILES_${PN} = "${bindir}/dbus-daemon* \
                ${datadir}/dbus-1/session.conf \
                ${datadir}/dbus-1/system.d \
                ${datadir}/dbus-1/system.conf \
-               ${systemd_system_unitdir}"
+               ${systemd_system_unitdir} \
+               ${systemd_user_unitdir} \
+"
 FILES_${PN}-lib = "${libdir}/lib*.so.*"
 RRECOMMENDS_${PN}-lib = "${PN}"
 FILES_${PN}-dev += "${libdir}/dbus-1.0/include ${bindir}/dbus-glib-tool ${bindir}/dbus-test-tool"
@@ -99,9 +101,10 @@ PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd',
 PACKAGECONFIG_class-native = ""
 PACKAGECONFIG_class-nativesdk = ""
 
-PACKAGECONFIG[systemd] = "--enable-systemd --with-systemdsystemunitdir=${systemd_system_unitdir},--disable-systemd --without-systemdsystemunitdir,systemd"
+PACKAGECONFIG[systemd] = "--enable-systemd --with-systemdsystemunitdir=${systemd_system_unitdir} --with-systemduserunitdir=${systemd_user_unitdir},--disable-systemd --without-systemdsystemunitdir --without-systemduserunitdir,systemd"
 PACKAGECONFIG[x11] = "--with-x --enable-x11-autolaunch,--without-x --disable-x11-autolaunch, virtual/libx11 libsm"
 PACKAGECONFIG[apparmor] = "--enable-apparmor,--disable-apparmor,libapparmor"
+PACKAGECONFIG[user-session] = "--enable-user-session,--disable-user-session"
 
 do_install() {
 	autotools_do_install
-- 
2.5.0



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

* Re: [PATCH 1/2] dbus: build with systemd support
  2015-11-20 14:38 [PATCH 1/2] dbus: build with systemd support Andrew Shadura
  2015-11-20 14:38 ` [PATCH 2/2] dbus: add user sessions support Andrew Shadura
@ 2015-11-20 16:09 ` Jussi Kukkonen
  2015-11-20 16:12   ` Andrew Shadura
  2015-12-07 19:02 ` Patrick Ohly
  2 siblings, 1 reply; 9+ messages in thread
From: Jussi Kukkonen @ 2015-11-20 16:09 UTC (permalink / raw)
  To: Andrew Shadura; +Cc: OE Core

[-- Attachment #1: Type: text/plain, Size: 4188 bytes --]

On 20 November 2015 at 16:38, Andrew Shadura <andrew.shadura@collabora.co.uk>
wrote:
>
> It's good to have the extra functionality, such as seat support
> provided with systemd support. Not least of all to support
> systemd user-sessions.
>
> This commit also changes references to the system unit path
> from ${systemd_unitdir}/system to ${systemd_system_unitdir},
> a new variable provided by bitbake.
>
> Signed-off-by: Andrew Shadura <andrew.shadura@collabora.co.uk>
> Signed-off-by: Joshua Lock <joshua.lock@collabora.co.uk>
> ---
>  meta/recipes-core/dbus/dbus_1.10.2.bb | 19 ++++++++-----------
>  1 file changed, 8 insertions(+), 11 deletions(-)
>
> diff --git a/meta/recipes-core/dbus/dbus_1.10.2.bb
b/meta/recipes-core/dbus/dbus_1.10.2.bb
> index 1abe067..f7ab39b 100644
> --- a/meta/recipes-core/dbus/dbus_1.10.2.bb
> +++ b/meta/recipes-core/dbus/dbus_1.10.2.bb
> @@ -68,7 +68,7 @@ FILES_${PN} = "${bindir}/dbus-daemon* \
>                 ${datadir}/dbus-1/session.conf \
>                 ${datadir}/dbus-1/system.d \
>                 ${datadir}/dbus-1/system.conf \
> -               ${systemd_unitdir}/system/"
> +               ${systemd_system_unitdir}"
>  FILES_${PN}-lib = "${libdir}/lib*.so.*"
>  RRECOMMENDS_${PN}-lib = "${PN}"
>  FILES_${PN}-dev += "${libdir}/dbus-1.0/include ${bindir}/dbus-glib-tool
${bindir}/dbus-test-tool"
> @@ -90,8 +90,7 @@ pkg_postinst_dbus() {
>  EXTRA_OECONF = "--disable-tests \
>                  --disable-xml-docs \
>                  --disable-doxygen-docs \
> -                --disable-libaudit \
> -                --disable-systemd"
> +                --disable-libaudit"
>
>  EXTRA_OECONF_append_class-native = " --disable-selinux"
>
> @@ -100,9 +99,7 @@ PACKAGECONFIG ??=
"${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd',
>  PACKAGECONFIG_class-native = ""
>  PACKAGECONFIG_class-nativesdk = ""
>
> -# Would like to --enable-systemd but that's a circular build-dependency
between
> -# systemd<->dbus

Has this issue been somehow resolved since the comment was added?

> -PACKAGECONFIG[systemd] =
"--with-systemdsystemunitdir=${systemd_unitdir}/system/,--without-systemdsystemunitdir"
> +PACKAGECONFIG[systemd] = "--enable-systemd
--with-systemdsystemunitdir=${systemd_system_unitdir},--disable-systemd
--without-systemdsystemunitdir,systemd"
>  PACKAGECONFIG[x11] = "--with-x --enable-x11-autolaunch,--without-x
--disable-x11-autolaunch, virtual/libx11 libsm"
>  PACKAGECONFIG[apparmor] =
"--enable-apparmor,--disable-apparmor,libapparmor"
>
> @@ -117,12 +114,12 @@ do_install() {
>
>         if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true',
'false', d)}; then
>                 for i in dbus.target.wants sockets.target.wants
multi-user.target.wants; do \
> -                       install -d ${D}${systemd_unitdir}/system/$i; done
> -               install -m 0644 ${B}/bus/dbus.service
${B}/bus/dbus.socket ${D}${systemd_unitdir}/system/
> +                       install -d ${D}${systemd_system_unitdir}/$i; done
> +               install -m 0644 ${B}/bus/dbus.service
${B}/bus/dbus.socket ${D}${systemd_system_unitdir}/
>                 cd ${D}${systemd_unitdir}/system/dbus.target.wants/
> -               ln -fs ../dbus.socket
${D}${systemd_unitdir}/system/dbus.target.wants/dbus.socket
> -               ln -fs ../dbus.socket
${D}${systemd_unitdir}/system/sockets.target.wants/dbus.socket
> -               ln -fs ../dbus.service
${D}${systemd_unitdir}/system/multi-user.target.wants/dbus.service
> +               ln -fs ../dbus.socket
${D}${systemd_system_unitdir}/dbus.target.wants/dbus.socket
> +               ln -fs ../dbus.socket
${D}${systemd_system_unitdir}/sockets.target.wants/dbus.socket
> +               ln -fs ../dbus.service
${D}${systemd_system_unitdir}/multi-user.target.wants/dbus.service
>         fi
>
>         install -d ${D}${sysconfdir}/default/volatiles
> --
> 2.5.0
>
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core

[-- Attachment #2: Type: text/html, Size: 5493 bytes --]

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

* Re: [PATCH 1/2] dbus: build with systemd support
  2015-11-20 16:09 ` [PATCH 1/2] dbus: build with systemd support Jussi Kukkonen
@ 2015-11-20 16:12   ` Andrew Shadura
  0 siblings, 0 replies; 9+ messages in thread
From: Andrew Shadura @ 2015-11-20 16:12 UTC (permalink / raw)
  To: Jussi Kukkonen; +Cc: OE Core

[-- Attachment #1: Type: text/plain, Size: 445 bytes --]

On 20/11/15 17:09, Jussi Kukkonen wrote:
>>  PACKAGECONFIG_class-native = ""
>>  PACKAGECONFIG_class-nativesdk = ""
>>
>> -# Would like to --enable-systemd but that's a circular
> build-dependency between
>> -# systemd<->dbus
> 
> Has this issue been somehow resolved since the comment was added?

Yes, systemd doesn't depend on dbus any longer unless explicitly
enabled, as it uses its own dbus library.

-- 
Cheers,
  Andrew


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

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

* Re: [PATCH 2/2] dbus: add user sessions support
  2015-11-20 14:38 ` [PATCH 2/2] dbus: add user sessions support Andrew Shadura
@ 2015-11-24 14:03   ` Burton, Ross
  2015-11-24 14:07     ` Andrew Shadura
  2016-01-08 14:44   ` Patrick Ohly
  1 sibling, 1 reply; 9+ messages in thread
From: Burton, Ross @ 2015-11-24 14:03 UTC (permalink / raw)
  To: Andrew Shadura; +Cc: OE Core

[-- Attachment #1: Type: text/plain, Size: 329 bytes --]

On 20 November 2015 at 14:38, Andrew Shadura <andrew.shadura@collabora.co.uk
> wrote:

> Enable the user-sessions support with a PACKAGECONFIG flag.
>

What is the impact on this if someone is using systemd but doesn't want
user sessions?  Should we enable it if the DISTRO_FEATURES contains systemd
by default?

Ross

[-- Attachment #2: Type: text/html, Size: 746 bytes --]

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

* Re: [PATCH 2/2] dbus: add user sessions support
  2015-11-24 14:03   ` Burton, Ross
@ 2015-11-24 14:07     ` Andrew Shadura
  0 siblings, 0 replies; 9+ messages in thread
From: Andrew Shadura @ 2015-11-24 14:07 UTC (permalink / raw)
  To: Burton, Ross; +Cc: OE Core

[-- Attachment #1: Type: text/plain, Size: 608 bytes --]

On 24/11/15 15:03, Burton, Ross wrote:
> On 20 November 2015 at 14:38, Andrew Shadura
> <andrew.shadura@collabora.co.uk> wrote:
> 
>>    Enable the user-sessions support with a PACKAGECONFIG flag.
> 
> What is the impact on this if someone is using systemd but doesn't want
> user sessions?  Should we enable it if the DISTRO_FEATURES contains
> systemd by default?

It is okay to use systemd and not use user sessions. Possibly, we want
to enable it by default in the future, but it should be okay to have it
disabled for now unless it's switched on from elsewhere.

-- 
Cheers,
  Andrew


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

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

* Re: [PATCH 1/2] dbus: build with systemd support
  2015-11-20 14:38 [PATCH 1/2] dbus: build with systemd support Andrew Shadura
  2015-11-20 14:38 ` [PATCH 2/2] dbus: add user sessions support Andrew Shadura
  2015-11-20 16:09 ` [PATCH 1/2] dbus: build with systemd support Jussi Kukkonen
@ 2015-12-07 19:02 ` Patrick Ohly
  2015-12-07 19:08   ` Andrew Shadura
  2 siblings, 1 reply; 9+ messages in thread
From: Patrick Ohly @ 2015-12-07 19:02 UTC (permalink / raw)
  To: Andrew Shadura; +Cc: OE Core

On Fri, 2015-11-20 at 15:38 +0100, Andrew Shadura wrote:
> It's good to have the extra functionality, such as seat support
> provided with systemd support. Not least of all to support
> systemd user-sessions.

Your patch is against D-Bus 1.10.2, which is not yet in OE-core master.
I adapted the patch to the current D-Bus 1.8.20, but there the
advantages turned out to be (IMHO) fairly minor: it only adds logging
via journald.

socket activation via systemd already works even without
--enable-systemd, because the recipe explicitly installs the systemd
unit files and the code itself supports it also without
--enable-systemd.

But I like your patches, so perhaps including D-Bus 1.10.x (1.10.6 is
the latest stable release) can be considered for the next OE-core
release?

-- 
Best Regards, Patrick Ohly

The content of this message is my personal opinion only and although
I am an employee of Intel, the statements I make here in no way
represent Intel's position on the issue, nor am I authorized to speak
on behalf of Intel on this matter.





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

* Re: [PATCH 1/2] dbus: build with systemd support
  2015-12-07 19:02 ` Patrick Ohly
@ 2015-12-07 19:08   ` Andrew Shadura
  0 siblings, 0 replies; 9+ messages in thread
From: Andrew Shadura @ 2015-12-07 19:08 UTC (permalink / raw)
  To: Patrick Ohly; +Cc: OE Core

[-- Attachment #1: Type: text/plain, Size: 1035 bytes --]

On 07/12/15 20:02, Patrick Ohly wrote:
> On Fri, 2015-11-20 at 15:38 +0100, Andrew Shadura wrote:
>> > It's good to have the extra functionality, such as seat support
>> > provided with systemd support. Not least of all to support
>> > systemd user-sessions.
> Your patch is against D-Bus 1.10.2, which is not yet in OE-core master.
> I adapted the patch to the current D-Bus 1.8.20, but there the
> advantages turned out to be (IMHO) fairly minor: it only adds logging
> via journald.
> 
> socket activation via systemd already works even without
> --enable-systemd, because the recipe explicitly installs the systemd
> unit files and the code itself supports it also without
> --enable-systemd.
> 
> But I like your patches, so perhaps including D-Bus 1.10.x (1.10.6 is
> the latest stable release) can be considered for the next OE-core
> release?

This patch is supposed to be applied after other series of mine adding
1.10.2, see <http://patchwork.openembedded.org/patch/108237/>.

-- 
Cheers,
  Andrew


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

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

* Re: [PATCH 2/2] dbus: add user sessions support
  2015-11-20 14:38 ` [PATCH 2/2] dbus: add user sessions support Andrew Shadura
  2015-11-24 14:03   ` Burton, Ross
@ 2016-01-08 14:44   ` Patrick Ohly
  1 sibling, 0 replies; 9+ messages in thread
From: Patrick Ohly @ 2016-01-08 14:44 UTC (permalink / raw)
  To: Andrew Shadura; +Cc: OE Core

On Fri, 2015-11-20 at 15:38 +0100, Andrew Shadura wrote:
> Enable the user-sessions support with a PACKAGECONFIG flag.

I've tried this out in combination with the D-Bus 1.10 update patches.
It's perhaps worth pointing out that user sessions only work in
combination with pam.

I also found that one minor fix was needed in
meta/recipes-core/dbus/dbus_1.10.2.bb. Andrew, Ross, feel free to just
squash that into the pending patch.

But overall it looked good, so I'd love to have this in OE-core.

https://github.com/pohly/poky/commit/5b32e63f9e37492cef8de7aabfae562ab072b510

commit 5b32e63f9e37492cef8de7aabfae562ab072b510
Author: Patrick Ohly <patrick.ohly@intel.com>
Date:   Fri Jan 8 15:34:50 2016 +0100

    dbus_1.10.2.bb: fix path to systemctl
    
    When compiling with systemd, pam and user sessions, the resulting
    /usr/lib/systemd/user/dbus.socket ensures that the right
    DBUS_SESSION_BUS_ADDRESS gets put into the environment when logging
    into the system.
    
    The default configure behavior is to look in the PATH, which picks up
    the tool from the host sysroot. We need to override that so that the
    final location on the target is used instead. This is only relevant at
    the moment when enabling user sessions, but it makes sense to fix the
    value in all cases.
    
    Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>

diff --git a/meta/recipes-core/dbus/dbus_1.10.2.bb b/meta/recipes-core/dbus/dbus_1.10.2.bb
index ffb428b..a6cb649 100644
--- a/meta/recipes-core/dbus/dbus_1.10.2.bb
+++ b/meta/recipes-core/dbus/dbus_1.10.2.bb
@@ -96,6 +96,10 @@ EXTRA_OECONF = "--disable-tests \
 
 EXTRA_OECONF_append_class-native = " --disable-selinux"
 
+# Automatic detection in the configure script picks up the path to
+# the native tool, therefore we must override the automatism.
+EXTRA_OECONF_append_class-target = " SYSTEMCTL=${base_bindir}/systemctl"
+
 PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)} \
                    ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)}"
 PACKAGECONFIG_class-native = ""

-- 
Best Regards, Patrick Ohly

The content of this message is my personal opinion only and although
I am an employee of Intel, the statements I make here in no way
represent Intel's position on the issue, nor am I authorized to speak
on behalf of Intel on this matter.





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

end of thread, other threads:[~2016-01-08 14:44 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-20 14:38 [PATCH 1/2] dbus: build with systemd support Andrew Shadura
2015-11-20 14:38 ` [PATCH 2/2] dbus: add user sessions support Andrew Shadura
2015-11-24 14:03   ` Burton, Ross
2015-11-24 14:07     ` Andrew Shadura
2016-01-08 14:44   ` Patrick Ohly
2015-11-20 16:09 ` [PATCH 1/2] dbus: build with systemd support Jussi Kukkonen
2015-11-20 16:12   ` Andrew Shadura
2015-12-07 19:02 ` Patrick Ohly
2015-12-07 19:08   ` Andrew Shadura

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.