[PATCH] profiles: Enable USE=user-session on systemd profiles

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

[PATCH] profiles: Enable USE=user-session on systemd profiles

Matt Turner-5
Signed-off-by: Matt Turner <[hidden email]>
---
 .../linux/amd64/17.0/desktop/plasma/systemd/package.use    | 7 -------
 .../linux/amd64/17.1/desktop/plasma/systemd/package.use    | 7 -------
 .../linux/arm/17.0/desktop/plasma/systemd/package.use      | 7 -------
 .../linux/arm64/17.0/desktop/plasma/systemd/package.use    | 7 -------
 .../linux/x86/17.0/desktop/plasma/systemd/package.use      | 7 -------
 profiles/targets/systemd/make.defaults                     | 4 ++--
 6 files changed, 2 insertions(+), 37 deletions(-)
 delete mode 100644 profiles/default/linux/amd64/17.0/desktop/plasma/systemd/package.use
 delete mode 100644 profiles/default/linux/amd64/17.1/desktop/plasma/systemd/package.use
 delete mode 100644 profiles/default/linux/arm/17.0/desktop/plasma/systemd/package.use
 delete mode 100644 profiles/default/linux/arm64/17.0/desktop/plasma/systemd/package.use
 delete mode 100644 profiles/default/linux/x86/17.0/desktop/plasma/systemd/package.use

diff --git a/profiles/default/linux/amd64/17.0/desktop/plasma/systemd/package.use b/profiles/default/linux/amd64/17.0/desktop/plasma/systemd/package.use
deleted file mode 100644
index bdf6c817864..00000000000
--- a/profiles/default/linux/amd64/17.0/desktop/plasma/systemd/package.use
+++ /dev/null
@@ -1,7 +0,0 @@
-# Copyright 2019-2019 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-# Brian Evans <[hidden email]> (2019-02-27)
-# Avoid conflict between kde-plasma/plasma-workspace[systemd] requiring sys-apps/dbus[user-session]
-# and net-wireless/bluez[systemd,-user-session] requiring sys-apps/dbus[-user-session].
-net-wireless/bluez user-session
diff --git a/profiles/default/linux/amd64/17.1/desktop/plasma/systemd/package.use b/profiles/default/linux/amd64/17.1/desktop/plasma/systemd/package.use
deleted file mode 100644
index bdf6c817864..00000000000
--- a/profiles/default/linux/amd64/17.1/desktop/plasma/systemd/package.use
+++ /dev/null
@@ -1,7 +0,0 @@
-# Copyright 2019-2019 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-# Brian Evans <[hidden email]> (2019-02-27)
-# Avoid conflict between kde-plasma/plasma-workspace[systemd] requiring sys-apps/dbus[user-session]
-# and net-wireless/bluez[systemd,-user-session] requiring sys-apps/dbus[-user-session].
-net-wireless/bluez user-session
diff --git a/profiles/default/linux/arm/17.0/desktop/plasma/systemd/package.use b/profiles/default/linux/arm/17.0/desktop/plasma/systemd/package.use
deleted file mode 100644
index bdf6c817864..00000000000
--- a/profiles/default/linux/arm/17.0/desktop/plasma/systemd/package.use
+++ /dev/null
@@ -1,7 +0,0 @@
-# Copyright 2019-2019 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-# Brian Evans <[hidden email]> (2019-02-27)
-# Avoid conflict between kde-plasma/plasma-workspace[systemd] requiring sys-apps/dbus[user-session]
-# and net-wireless/bluez[systemd,-user-session] requiring sys-apps/dbus[-user-session].
-net-wireless/bluez user-session
diff --git a/profiles/default/linux/arm64/17.0/desktop/plasma/systemd/package.use b/profiles/default/linux/arm64/17.0/desktop/plasma/systemd/package.use
deleted file mode 100644
index bdf6c817864..00000000000
--- a/profiles/default/linux/arm64/17.0/desktop/plasma/systemd/package.use
+++ /dev/null
@@ -1,7 +0,0 @@
-# Copyright 2019-2019 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-# Brian Evans <[hidden email]> (2019-02-27)
-# Avoid conflict between kde-plasma/plasma-workspace[systemd] requiring sys-apps/dbus[user-session]
-# and net-wireless/bluez[systemd,-user-session] requiring sys-apps/dbus[-user-session].
-net-wireless/bluez user-session
diff --git a/profiles/default/linux/x86/17.0/desktop/plasma/systemd/package.use b/profiles/default/linux/x86/17.0/desktop/plasma/systemd/package.use
deleted file mode 100644
index bdf6c817864..00000000000
--- a/profiles/default/linux/x86/17.0/desktop/plasma/systemd/package.use
+++ /dev/null
@@ -1,7 +0,0 @@
-# Copyright 2019-2019 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-# Brian Evans <[hidden email]> (2019-02-27)
-# Avoid conflict between kde-plasma/plasma-workspace[systemd] requiring sys-apps/dbus[user-session]
-# and net-wireless/bluez[systemd,-user-session] requiring sys-apps/dbus[-user-session].
-net-wireless/bluez user-session
diff --git a/profiles/targets/systemd/make.defaults b/profiles/targets/systemd/make.defaults
index 8bc064858b2..7b7f59898a3 100644
--- a/profiles/targets/systemd/make.defaults
+++ b/profiles/targets/systemd/make.defaults
@@ -1,6 +1,6 @@
-# Copyright 1999-2014 Gentoo Foundation
+# Copyright 1999-2020 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
-USE="systemd udev"
+USE="systemd udev user-session"
 
 BOOTSTRAP_USE="${BOOTSTRAP_USE} systemd udev"
--
2.24.1


Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] profiles: Enable USE=user-session on systemd profiles

Mart Raudsepp-2
> @@ -1,6 +1,6 @@
> -# Copyright 1999-2014 Gentoo Foundation
> +# Copyright 1999-2020 Gentoo Foundation
>  # Distributed under the terms of the GNU General Public License v2
>  
> -USE="systemd udev"
> +USE="systemd udev user-session"
>  
>  BOOTSTRAP_USE="${BOOTSTRAP_USE} systemd udev"

Seems good to me in principle, but I'm not sure it is something we
should do until we haven't promoted this into a global USE flag.

With the disclaimer of not knowing anything about dbus[user-session] on
a non-systemd system - maybe it's just time to make user-session
unconditionally enabled on dbus (and then bluez) instead?
All it seems to do (on a very quick look) is install some extra systemd
files - can't they just be always installed (by always passing --
enable-user-session) and call it a day? Will bluez go wrong if it's
installed as USE=user-session does now and ran on a non-systemd system
like that?


Mart

signature.asc (1000 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] profiles: Enable USE=user-session on systemd profiles

Mike Gilbert-2
On Wed, Mar 18, 2020 at 4:16 PM Mart Raudsepp <[hidden email]> wrote:

>
> > @@ -1,6 +1,6 @@
> > -# Copyright 1999-2014 Gentoo Foundation
> > +# Copyright 1999-2020 Gentoo Foundation
> >  # Distributed under the terms of the GNU General Public License v2
> >
> > -USE="systemd udev"
> > +USE="systemd udev user-session"
> >
> >  BOOTSTRAP_USE="${BOOTSTRAP_USE} systemd udev"
>
> Seems good to me in principle, but I'm not sure it is something we
> should do until we haven't promoted this into a global USE flag.

An alternative would be to add entries in package.use.

> With the disclaimer of not knowing anything about dbus[user-session] on
> a non-systemd system - maybe it's just time to make user-session
> unconditionally enabled on dbus (and then bluez) instead?
> All it seems to do (on a very quick look) is install some extra systemd
> files - can't they just be always installed (by always passing --
> enable-user-session) and call it a day?

It looks like user-session has no effect if systemd is not in use.

On systems running systemd, having the units installed automatically
enables the systemd user bus, and the only way to disable it is to
mask the units. Having the user bus enabled generally prevents display
managers and startx from starting individual session buses, since they
will use the user bus instead. That's probably fine, but I wanted to
note it.

Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] profiles: Enable USE=user-session on systemd profiles

Mart Raudsepp-2
Ühel kenal päeval, K, 18.03.2020 kell 16:43, kirjutas Mike Gilbert:
> Seems good to me in principle, but I'm not sure it is something we
> > should do until we haven't promoted this into a global USE flag.
>
> An alternative would be to add entries in package.use.

Yeah, that'd be what it is now, just done in systemd profile, not most
of the separate systemd profiles.

> > With the disclaimer of not knowing anything about dbus[user-
> > session] on
> > a non-systemd system - maybe it's just time to make user-session
> > unconditionally enabled on dbus (and then bluez) instead?
> > All it seems to do (on a very quick look) is install some extra
> > systemd
> > files - can't they just be always installed (by always passing --
> > enable-user-session) and call it a day?
>
> It looks like user-session has no effect if systemd is not in use.
>
> On systems running systemd, having the units installed automatically
> enables the systemd user bus, and the only way to disable it is to
> mask the units. Having the user bus enabled generally prevents
> display
> managers and startx from starting individual session buses, since
> they
> will use the user bus instead. That's probably fine, but I wanted to
> note it.
So how about we try to just always enable this instead in dbus and
bluez? Anyone got any objections, provided the below can be handled?

I peeked at bluez, and there USE=user-session exists to apply a patch
to unbreak things when user-session is disabled. Unfortunately it seems
to be needed there for non-systemd systems as well. I think we should
be able to figure things out to work in all situations there, or make
it be applied for USE=-systemd only (that's already the case there,
just it is not applied for USE="systemd -user-session" right now).


Mart


signature.asc (1000 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] profiles: Enable USE=user-session on systemd profiles

Mike Gilbert-2
On Thu, Mar 19, 2020 at 9:41 AM Mart Raudsepp <[hidden email]> wrote:

>
> Ühel kenal päeval, K, 18.03.2020 kell 16:43, kirjutas Mike Gilbert:
> > Seems good to me in principle, but I'm not sure it is something we
> > > should do until we haven't promoted this into a global USE flag.
> >
> > An alternative would be to add entries in package.use.
>
> Yeah, that'd be what it is now, just done in systemd profile, not most
> of the separate systemd profiles.
>
> > > With the disclaimer of not knowing anything about dbus[user-
> > > session] on
> > > a non-systemd system - maybe it's just time to make user-session
> > > unconditionally enabled on dbus (and then bluez) instead?
> > > All it seems to do (on a very quick look) is install some extra
> > > systemd
> > > files - can't they just be always installed (by always passing --
> > > enable-user-session) and call it a day?
> >
> > It looks like user-session has no effect if systemd is not in use.
> >
> > On systems running systemd, having the units installed automatically
> > enables the systemd user bus, and the only way to disable it is to
> > mask the units. Having the user bus enabled generally prevents
> > display
> > managers and startx from starting individual session buses, since
> > they
> > will use the user bus instead. That's probably fine, but I wanted to
> > note it.
>
> So how about we try to just always enable this instead in dbus and
> bluez? Anyone got any objections, provided the below can be handled?
>
> I peeked at bluez, and there USE=user-session exists to apply a patch
> to unbreak things when user-session is disabled. Unfortunately it seems
> to be needed there for non-systemd systems as well. I think we should
> be able to figure things out to work in all situations there, or make
> it be applied for USE=-systemd only (that's already the case there,
> just it is not applied for USE="systemd -user-session" right now).

I think we can apply
0001-Allow-using-obexd-without-systemd-in-the-user-session-r2.patch
unconditionally.

The patched unit should work just fine with systemd, provided the user
bus is available.

Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] profiles: Enable USE=user-session on systemd profiles

Pacho Ramos
El jue, 19-03-2020 a las 10:35 -0400, Mike Gilbert escribió:

> On Thu, Mar 19, 2020 at 9:41 AM Mart Raudsepp <[hidden email]> wrote:
> > Ühel kenal päeval, K, 18.03.2020 kell 16:43, kirjutas Mike Gilbert:
> > > Seems good to me in principle, but I'm not sure it is something we
> > > > should do until we haven't promoted this into a global USE flag.
> > >
> > > An alternative would be to add entries in package.use.
> >
> > Yeah, that'd be what it is now, just done in systemd profile, not most
> > of the separate systemd profiles.
> >
> > > > With the disclaimer of not knowing anything about dbus[user-
> > > > session] on
> > > > a non-systemd system - maybe it's just time to make user-session
> > > > unconditionally enabled on dbus (and then bluez) instead?
> > > > All it seems to do (on a very quick look) is install some extra
> > > > systemd
> > > > files - can't they just be always installed (by always passing --
> > > > enable-user-session) and call it a day?
> > >
> > > It looks like user-session has no effect if systemd is not in use.
> > >
> > > On systems running systemd, having the units installed automatically
> > > enables the systemd user bus, and the only way to disable it is to
> > > mask the units. Having the user bus enabled generally prevents
> > > display
> > > managers and startx from starting individual session buses, since
> > > they
> > > will use the user bus instead. That's probably fine, but I wanted to
> > > note it.
> >
> > So how about we try to just always enable this instead in dbus and
> > bluez? Anyone got any objections, provided the below can be handled?
> >
> > I peeked at bluez, and there USE=user-session exists to apply a patch
> > to unbreak things when user-session is disabled. Unfortunately it seems
> > to be needed there for non-systemd systems as well. I think we should
> > be able to figure things out to work in all situations there, or make
> > it be applied for USE=-systemd only (that's already the case there,
> > just it is not applied for USE="systemd -user-session" right now).
>
> I think we can apply
> 0001-Allow-using-obexd-without-systemd-in-the-user-session-r2.patch
> unconditionally.
>
> The patched unit should work just fine with systemd, provided the user
> bus is available.
>
I agree, I see that also Debian is applying it unconditionally even when running
systemd

signature.asc (499 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] profiles: Enable USE=user-session on systemd profiles

Mart Raudsepp-2
Ühel kenal päeval, L, 21.03.2020 kell 11:16, kirjutas Pacho Ramos:
> I agree, I see that also Debian is applying it unconditionally even
> when running
> systemd

But I assume it would be a problem with USE=systemd + USE=-user-session
dbus, so how about instead of this profile business, we then just go
with:

* Revbump bluez to drop IUSE=user-session, unconditionally apply the
patch and change the dbus dep in systemd conditional to
>=sys-apps/dbus-1.6:=[user-session(+)]
* Fix bluez USE=systemd handling in above revbump as well: --enable-
systemd should always be passed, not controlled by a USE=systemd,
because all it appears to do is decide whether to install systemd
service files, and that should be always done per the small files
policy.
* Revbump dbus, dropping user-session IUSE and unconditionally passing
--enable-user-session

* After some time (dbus revision with IUSE=user-session has been gone
for a while), remove all of the IUSE=systemd handling from bluez, as
the user-session matching enforcement isn't needed anymore (and the
configure systemd conditional has been nuked per above)
* At that point the package.use entries can be removed altogether as
well, instead of migrating to systemd target profile.


Mart

signature.asc (1000 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] profiles: Enable USE=user-session on systemd profiles

Mike Gilbert-2
On Sat, Mar 21, 2020 at 6:43 AM Mart Raudsepp <[hidden email]> wrote:

>
> Ühel kenal päeval, L, 21.03.2020 kell 11:16, kirjutas Pacho Ramos:
> > I agree, I see that also Debian is applying it unconditionally even
> > when running
> > systemd
>
> But I assume it would be a problem with USE=systemd + USE=-user-session
> dbus, so how about instead of this profile business, we then just go
> with:
>
> * Revbump bluez to drop IUSE=user-session, unconditionally apply the
> patch and change the dbus dep in systemd conditional to
> >=sys-apps/dbus-1.6:=[user-session(+)]
> * Fix bluez USE=systemd handling in above revbump as well: --enable-
> systemd should always be passed, not controlled by a USE=systemd,
> because all it appears to do is decide whether to install systemd
> service files, and that should be always done per the small files
> policy.
>
> * Revbump dbus, dropping user-session IUSE and unconditionally passing
> --enable-user-session

I think we should probably move it behind USE=systemd. It should
probably be that way already, but I missed it when adding the
user-session flag to the dbus ebuild.

There is a quite a bit of conditionally compiled code in dbus-daemon
that gets disabled if --disable-systemd is passed to configure. I
would guess that dbus.service will not function properly if this code
is not enabled.

Since we are dropping user-session from IUSE, the following should suffice:

$(use_enable systemd user-session)

> * After some time (dbus revision with IUSE=user-session has been gone
> for a while), remove all of the IUSE=systemd handling from bluez, as
> the user-session matching enforcement isn't needed anymore (and the
> configure systemd conditional has been nuked per above)
> * At that point the package.use entries can be removed altogether as
> well, instead of migrating to systemd target profile.

Agreed on the rest of the plan.

Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] profiles: Enable USE=user-session on systemd profiles

Pacho Ramos
El sáb, 21-03-2020 a las 09:01 -0400, Mike Gilbert escribió:

> On Sat, Mar 21, 2020 at 6:43 AM Mart Raudsepp <[hidden email]> wrote:
> > Ühel kenal päeval, L, 21.03.2020 kell 11:16, kirjutas Pacho Ramos:
> > > I agree, I see that also Debian is applying it unconditionally even
> > > when running
> > > systemd
> >
> > But I assume it would be a problem with USE=systemd + USE=-user-session
> > dbus, so how about instead of this profile business, we then just go
> > with:
> >
> > * Revbump bluez to drop IUSE=user-session, unconditionally apply the
> > patch and change the dbus dep in systemd conditional to
> > > =sys-apps/dbus-1.6:=[user-session(+)]
> > * Fix bluez USE=systemd handling in above revbump as well: --enable-
> > systemd should always be passed, not controlled by a USE=systemd,
> > because all it appears to do is decide whether to install systemd
> > service files, and that should be always done per the small files
> > policy.
> >
> > * Revbump dbus, dropping user-session IUSE and unconditionally passing
> > --enable-user-session
>
> I think we should probably move it behind USE=systemd. It should
> probably be that way already, but I missed it when adding the
> user-session flag to the dbus ebuild.
>
> There is a quite a bit of conditionally compiled code in dbus-daemon
> that gets disabled if --disable-systemd is passed to configure. I
> would guess that dbus.service will not function properly if this code
> is not enabled.
>
> Since we are dropping user-session from IUSE, the following should suffice:
>
> $(use_enable systemd user-session)
>
> > * After some time (dbus revision with IUSE=user-session has been gone
> > for a while), remove all of the IUSE=systemd handling from bluez, as
> > the user-session matching enforcement isn't needed anymore (and the
> > configure systemd conditional has been nuked per above)
> > * At that point the package.use entries can be removed altogether as
> > well, instead of migrating to systemd target profile.
>
> Agreed on the rest of the plan.
Yes, we can try in that way

signature.asc (499 bytes) Download Attachment