Bug#917431: debian-policy: virtual packages: logind, default-logind

2019-02-15 Thread Sean Whitton
control: tag -1 +pending

Hello Simon,

On Sun 30 Dec 2018 at 03:52PM +00, Simon McVittie wrote:

> Maybe "via D-Bus and " or "via D-Bus and sd-login(3)"?

I've committed the latter.

> If a logind provider such as elogind doesn't result in the libsystemd
> sd-login APIs working (at least as well as they would with the provided
> logind version), would you consider that to be a bug in the provider?
> I asked this earlier in the bug and didn't notice an answer (my apologies
> if there has been one that I missed).
>
> I ask because libsystemd users like dbus and policykit-1 cannot be linked
> to both libsystemd and libelogind without compiling the daemon twice and
> somehow arranging to run the right one for the installed system, which
> I think is an undesirable level of complexity; for Debian, we should be
> preferring the library that matches our default installation, which is
> libsystemd. Derivatives like Devuan that don't have libsystemd at all
> are of course free to link their libsystemd users to libelogind instead.

We don't seem to have a consensus on this question yet.  I don't
properly understand the issue, but it doesn't seem like it needs to
block adding the virtual packages to the list.

-- 
Sean Whitton


signature.asc
Description: PGP signature


Bug#917431: debian-policy: virtual packages: logind, default-logind

2019-01-27 Thread Holger Levsen
On Fri, Dec 28, 2018 at 12:36:31PM +0100, Adam Borowski wrote:
> On Thu, Dec 27, 2018 at 06:28:04PM +, Sean Whitton wrote:
> > Could you provide an actual diff to be applied to policy.git, please?
> 
> Sure, what about:?
> 
> diff --git a/policy/upgrading-checklist.rst b/policy/upgrading-checklist.rst
> index 679a187..633c14e 100644
> --- a/policy/upgrading-checklist.rst
> +++ b/policy/upgrading-checklist.rst
> @@ -39,6 +39,14 @@ The sections in this checklist match the values for the
>  except in the two anomalous historical cases where normative
>  requirements were changed in a minor patch release.
>  
> +Unreleased
> +--
> +
> +virtual
> +New ``logind`` and ``default-logind`` virtual packages for a package
> +providing logind API (over D-Bus and /run/), and for Debian's preferred
> +implementation, respectively.
> +
>  Version 4.3.0
>  -
>  
> diff --git a/virtual-package-names-list.yaml b/virtual-package-names-list.yaml
> index afb76a3..de54e32 100644
> --- a/virtual-package-names-list.yaml
> +++ b/virtual-package-names-list.yaml
> @@ -110,6 +110,10 @@ virtualPackages:
> description: provides the D-Bus well-known session bus for most or all 
> user login sessions
>   - name: default-dbus-session-bus
> description: Debian's preferred implementation of dbus-session-bus, 
> possibly architecture-specific
> + - name: logind
> +   description: an org.freedesktop.login1 D-Bus API implementation 
> (versioned)
> + - name: default-logind
> +   description: Debian's preferred implementation of logind, possibly 
> architecture-specific (versioned)

seconded, thanks.


-- 
tschüß,
Holger

---
   holger@(debian|reproducible-builds|layer-acht).org
   PGP fingerprint: B8BF 5413 7B09 D35C F026 FE9D 091A B856 069A AA1C


signature.asc
Description: PGP signature


Bug#917431: debian-policy: virtual packages: logind, default-logind

2018-12-30 Thread Sean Whitton
Hello Adam,

On Sun 30 Dec 2018 at 03:39pm +0100, Adam Borowski wrote:

> On Sat, Dec 29, 2018 at 02:07:25PM +, Sean Whitton wrote:
>> Ideally, this would be reviewed and seconded by people working on init
>> stuff, so I'm not going to second it myself unless we don't get interest.
>
> I asked around, and got the following remark:
>
> Mark Hindley:
> } Could you just replace "providing logind API (over D-Bus and /run/)"
> } with something like "providing logind APIs (D-Bus and sd-login)" in the
> } upgrading checklist?
> }
> } /run/ is really not part of the API and nobody should be using it directly.
>
> Which makes sense -- directing people to wrappers and libraries instead of
> the files would be preferred.  The less ad-hoc undocumented APIs are there,
> the better.
>
> But, this is a change to the upgrading checklist rather than the main part
> of the Policy -- not sure if you want seconds for that.

No, the upgrading checklist is at the Policy Editor's discretion.  No
need for seconding.

> The upgrading-checklist part would then be:
>
> +virtual
> +New ``logind`` and ``default-logind`` virtual packages for a package
> +providing logind API (over D-Bus and sd-login), and for Debian's
> +preferred implementation, respectively.
>
> (one word difference).

I'll happily use this instead.

-- 
Sean Whitton


signature.asc
Description: PGP signature


Bug#917431: debian-policy: virtual packages: logind, default-logind

2018-12-30 Thread Simon McVittie
On Sun, 30 Dec 2018 at 15:39:58 +0100, Adam Borowski wrote:
> On Sat, Dec 29, 2018 at 02:07:25PM +, Sean Whitton wrote:
> > Ideally, this would be reviewed and seconded by people working on init
> > stuff, so I'm not going to second it myself unless we don't get interest.
> 
> I asked around, and got the following remark:
> 
> Mark Hindley:
> } Could you just replace "providing logind API (over D-Bus and /run/)"
> } with something like "providing logind APIs (D-Bus and sd-login)" in the
> } upgrading checklist?
> }
> } /run/ is really not part of the API and nobody should be using it directly.
> 
> Which makes sense -- directing people to wrappers and libraries instead of
> the files would be preferred.  The less ad-hoc undocumented APIs are there,
> the better.

Maybe "via D-Bus and " or "via D-Bus and sd-login(3)"?

If a logind provider such as elogind doesn't result in the libsystemd
sd-login APIs working (at least as well as they would with the provided
logind version), would you consider that to be a bug in the provider?
I asked this earlier in the bug and didn't notice an answer (my apologies
if there has been one that I missed).

I ask because libsystemd users like dbus and policykit-1 cannot be linked
to both libsystemd and libelogind without compiling the daemon twice and
somehow arranging to run the right one for the installed system, which
I think is an undesirable level of complexity; for Debian, we should be
preferring the library that matches our default installation, which is
libsystemd. Derivatives like Devuan that don't have libsystemd at all
are of course free to link their libsystemd users to libelogind instead.

smcv



Bug#917431: debian-policy: virtual packages: logind, default-logind

2018-12-30 Thread Adam Borowski
On Sat, Dec 29, 2018 at 02:07:25PM +, Sean Whitton wrote:
> Ideally, this would be reviewed and seconded by people working on init
> stuff, so I'm not going to second it myself unless we don't get interest.

I asked around, and got the following remark:

Mark Hindley:
} Could you just replace "providing logind API (over D-Bus and /run/)"
} with something like "providing logind APIs (D-Bus and sd-login)" in the
} upgrading checklist?
}
} /run/ is really not part of the API and nobody should be using it directly.

Which makes sense -- directing people to wrappers and libraries instead of
the files would be preferred.  The less ad-hoc undocumented APIs are there,
the better.

But, this is a change to the upgrading checklist rather than the main part
of the Policy -- not sure if you want seconds for that.

The upgrading-checklist part would then be:

+virtual
+New ``logind`` and ``default-logind`` virtual packages for a package
+providing logind API (over D-Bus and sd-login), and for Debian's
+preferred implementation, respectively.

(one word difference).


Meow!
-- 
⢀⣴⠾⠻⢶⣦⠀ 
⣾⠁⢠⠒⠀⣿⡁ Ivan was a worldly man: born in St. Petersburg, raised in
⢿⡄⠘⠷⠚⠋⠀ Petrograd, lived most of his life in Leningrad, then returned
⠈⠳⣄ to the city of his birth to die.



Bug#917431: debian-policy: virtual packages: logind, default-logind

2018-12-29 Thread Sean Whitton
Hello Adam,

On Fri 28 Dec 2018 at 12:36pm +0100, Adam Borowski wrote:

> On Thu, Dec 27, 2018 at 06:28:04PM +, Sean Whitton wrote:
>> Could you provide an actual diff to be applied to policy.git, please?
>
> Sure, what about:?

Thanks.

Ideally, this would be reviewed and seconded by people working on init
stuff, so I'm not going to second it myself unless we don't get interest.

>> Ansgar's suggestion should probably be included, too.
>
> To keep the wording terse I appended just "(versioned)" -- I see no
> precedent for such a marking, but I hope this is clear enough.

I'll (or someone else) add a note in the list saying that this means
that versioned Provides should be used with this virtual package.

-- 
Sean Whitton


signature.asc
Description: PGP signature


Bug#917431: debian-policy: virtual packages: logind, default-logind

2018-12-28 Thread Adam Borowski
On Thu, Dec 27, 2018 at 06:28:04PM +, Sean Whitton wrote:
> Could you provide an actual diff to be applied to policy.git, please?

Sure, what about:?

diff --git a/policy/upgrading-checklist.rst b/policy/upgrading-checklist.rst
index 679a187..633c14e 100644
--- a/policy/upgrading-checklist.rst
+++ b/policy/upgrading-checklist.rst
@@ -39,6 +39,14 @@ The sections in this checklist match the values for the
 except in the two anomalous historical cases where normative
 requirements were changed in a minor patch release.
 
+Unreleased
+--
+
+virtual
+New ``logind`` and ``default-logind`` virtual packages for a package
+providing logind API (over D-Bus and /run/), and for Debian's preferred
+implementation, respectively.
+
 Version 4.3.0
 -
 
diff --git a/virtual-package-names-list.yaml b/virtual-package-names-list.yaml
index afb76a3..de54e32 100644
--- a/virtual-package-names-list.yaml
+++ b/virtual-package-names-list.yaml
@@ -110,6 +110,10 @@ virtualPackages:
description: provides the D-Bus well-known session bus for most or all user 
login sessions
  - name: default-dbus-session-bus
description: Debian's preferred implementation of dbus-session-bus, 
possibly architecture-specific
+ - name: logind
+   description: an org.freedesktop.login1 D-Bus API implementation (versioned)
+ - name: default-logind
+   description: Debian's preferred implementation of logind, possibly 
architecture-specific (versioned)
 
 # Documentation
 

> Please follow the style for the other default-* packages listed there.

There's exactly one (dbus-session-bus).

> Ansgar's suggestion should probably be included, too.

To keep the wording terse I appended just "(versioned)" -- I see no
precedent for such a marking, but I hope this is clear enough.


Meow!
-- 
⢀⣴⠾⠻⢶⣦⠀ 
⣾⠁⢠⠒⠀⣿⡁ Ivan was a worldly man: born in St. Petersburg, raised in
⢿⡄⠘⠷⠚⠋⠀ Petrograd, lived most of his life in Leningrad, then returned
⠈⠳⣄ to the city of his birth to die.



Bug#917431: debian-policy: virtual packages: logind, default-logind

2018-12-28 Thread Simon McVittie
On Fri, 28 Dec 2018 at 02:52:09 +0900, Ansgar Burchardt wrote:
> Adam Borowski writes:
> > Thus, the wording would be (as proposed by fsateler):
> >
> > logind: an org.freedesktop.login1 D-Bus API implementation
> >
> > default-logind: should be provided by the distribution's default logind
> > provider (currently pam-systemd)
> 
> So any provider of logind would have to provide the full interface of
> the current interface (including future updates)?

Presumably a package that Provides: logind (= 123) would be expected to
provide the same D-Bus APIs that the logind in systemd 123 did.

Some of logind's APIs are not D-Bus APIs: in addition to D-Bus, it
has an ad-hoc form of IPC using files in /run. I think the files and
their contents themselves are not considered to be public API, but the
functions in libsystemd that read those files are. This is used by other
packages, notably dbus-daemon (which should not normally use D-Bus APIs
itself because that would be a circular dependency) for its deprecated
at_console policy, and policykit-1 for many of its policies.

Are packages that provide logind expected to create the same files in
/run so that libsystemd APIs will work as intended?

> You can start logind without libpam-systemd, it just wouldn't know about
> any session.  So it is about providing hooks to register sessions with
> logind.

A *working* org.freedesktop.login1 implementation, then, perhaps? (If an
implementation of logind doesn't know about login sessions then it can't
really be said to be working correctly.)

smcv



Bug#917431: debian-policy: virtual packages: logind, default-logind

2018-12-27 Thread Sean Whitton
Hello,

On Thu 27 Dec 2018 at 06:36pm +0100, Adam Borowski wrote:

> As discussed in bug #915407, we'd want a virtual package for logind
> implementations.  At present, two packages implement this functionality:
> libpam-systemd and libpam-elogind.
>
> This has been discussed, including a formal proposal on debian-devel,
> and no objections have been raised.
>
> Thus, the wording would be (as proposed by fsateler):
>
> logind: an org.freedesktop.login1 D-Bus API implementation
> default-logind: should be provided by the distribution's default logind
> provider (currently pam-systemd)

Could you provide an actual diff to be applied to policy.git, please?
Please follow the style for the other default-* packages listed there.

Ansgar's suggestion should probably be included, too.

-- 
Sean Whitton


signature.asc
Description: PGP signature


Bug#917431: debian-policy: virtual packages: logind, default-logind

2018-12-27 Thread Jonathan Nieder
Adam Borowski wrote:

> logind: an org.freedesktop.login1 D-Bus API implementation
> default-logind: distribution's default logind provider

Seconded.

I like this description because it doesn't make assumptions about how
many logind implementions there are or which is the current default,
which should make ongoing maintenance of the docs easier.

Sincerely,
Jonathan



Bug#917431: debian-policy: virtual packages: logind, default-logind

2018-12-27 Thread Ansgar Burchardt
Adam Borowski writes:
> Thus, the wording would be (as proposed by fsateler):
>
> logind: an org.freedesktop.login1 D-Bus API implementation
>
> default-logind: should be provided by the distribution's default logind
> provider (currently pam-systemd)

So any provider of logind would have to provide the full interface of
the current interface (including future updates)?

The patch against systemd used versioned provides.  Is that still the
plan?  If so, it should probably be documented in the virtual package
list.

> Background: currently libpam-systemd provides two features currently used
> by third parties: one is the necessary hooks to start the systemd
> implementation of login1.

You can start logind without libpam-systemd, it just wouldn't know about
any session.  So it is about providing hooks to register sessions with
logind.

Ansgar



Bug#917431: debian-policy: virtual packages: logind, default-logind

2018-12-27 Thread Adam Borowski
Package: debian-policy
Version: 4.3.0.1
Severity: wishlist
Tags: patch

Hi!
As discussed in bug #915407, we'd want a virtual package for logind
implementations.  At present, two packages implement this functionality:
libpam-systemd and libpam-elogind.

This has been discussed, including a formal proposal on debian-devel,
and no objections have been raised.

Thus, the wording would be (as proposed by fsateler):

logind: an org.freedesktop.login1 D-Bus API implementation
default-logind: should be provided by the distribution's default logind
provider (currently pam-systemd)

Background: currently libpam-systemd provides two features currently used
by third parties: one is the necessary hooks to start the systemd
implementation of login1. The second is hooking up the systemd --user
service manager. This virtual package attempts to disentangle the two so
that packages that only require logind can use an alternative
implementation.

=

If you prefer a more terse wording for default-, it could be just:

logind: an org.freedesktop.login1 D-Bus API implementation
default-logind: distribution's default logind provider


Meow!