Discussion:
Bug#1015015: unable to upgrade due to elogind vs systemd conflict
(too old to reply)
Craig Sanders
2022-07-16 08:40:01 UTC
Permalink
Package: elogind
Version: 246.9.1-1+debian1

I don't know if a newer version of elogind would help here, but it
probably wouldn't hurt. elogind in debian hasn't been updated since
Dec 23.

# apt -u dist-upgade
[...]
The following packages will be REMOVED:
alsa-firmware-loaders bluez brasero fwupd gnome-disk-utility
gnome-session-bin gvfs gvfs-backends gvfs-daemons i2c-tools kpartx
lcdproc libblockdev-mdraid2 libtss2-esys-3.0.2-0 libtss2-mu0
libtss2-sys1 libtss2-tcti-cmd0 libtss2-tcti-device0 libtss2-tcti-mssim0
libtss2-tcti-swtpm0 linux-image-5.16.0-6-amd64 linux-image-5.17.0-3-amd64
linux-image-5.18.0-2-amd64 linux-image-amd64 mdadm tpm-udev udisks2
upower xfce4-power-manager xfce4-power-manager-plugins xserver-xorg
xserver-xorg-input-evdev xserver-xorg-input-kbd xserver-xorg-input-mouse

Most of those I don't care about, but I really don't want linux-* packages or
mdadm or xserver-* packages to be force-removed.


Aborting that and running 'apt upgrade' just highlights the cause:

# apt -u upgrade
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Calculating upgrade... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
elogind : Conflicts: systemd
Conflicts: systemd:i386
libelogind0 : Conflicts: libsystemd0
Conflicts: systemd
Conflicts: systemd:i386
E: Broken packages




systemd creeps ever closer to de-facto Essential status in debian,
contradicting promises made during the init systems vote years
ago (but we always knew that the systemd pushers were lying about
that). Something in recent sid systemd depends directly on systemd,
conflicting with elogind and forcing removal of several packages with
dist-upgrade.

I gave up resisting the systemd borg years ago, except on this one
machine: every attempt to switch it over to systemd has failed - IT
WILL NOT BOOT AT ALL WITH SYSTEMD, so it has to stay on sysvinit.
Looks like that's not going to be viable any longer.

and the worst of it is that systemd actually makes a fairly decent
init system - nothing ground-breaking or innovative but certainly
adequate. As init, it's good enough. It's all the other things that
it attempts to borg (and does a shitty half-arsed job of) that are
the problem: logind, policy kit, journald, shitty replacements for
ntp, dns resolver, grub, and much more. systemd would be OK if it
wasn't trying to do things an init system has no business doing, if
you didn't have to carefully check it on every upgrade to disable the
next thing it's incompetently trying to take over.



craig
Mark Hindley
2022-07-16 09:10:01 UTC
Permalink
Craig,

Thanks for this.

What release are you upgrading from an to?
Post by Craig Sanders
Package: elogind
Version: 246.9.1-1+debian1
I don't know if a newer version of elogind would help here, but it
probably wouldn't hurt. elogind in debian hasn't been updated since
Dec 23.
# apt -u dist-upgade
[...]
alsa-firmware-loaders bluez brasero fwupd gnome-disk-utility
gnome-session-bin gvfs gvfs-backends gvfs-daemons i2c-tools kpartx
lcdproc libblockdev-mdraid2 libtss2-esys-3.0.2-0 libtss2-mu0
libtss2-sys1 libtss2-tcti-cmd0 libtss2-tcti-device0 libtss2-tcti-mssim0
libtss2-tcti-swtpm0 linux-image-5.16.0-6-amd64 linux-image-5.17.0-3-amd64
linux-image-5.18.0-2-amd64 linux-image-amd64 mdadm tpm-udev udisks2
upower xfce4-power-manager xfce4-power-manager-plugins xserver-xorg
xserver-xorg-input-evdev xserver-xorg-input-kbd xserver-xorg-input-mouse
Most of those I don't care about, but I really don't want linux-* packages or
mdadm or xserver-* packages to be force-removed.
I can't immediately see the package that might be causing the conflict here.
Post by Craig Sanders
# apt -u upgrade
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Calculating upgrade... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
elogind : Conflicts: systemd
Conflicts: systemd:i386
libelogind0 : Conflicts: libsystemd0
Conflicts: systemd
Conflicts: systemd:i386
E: Broken packages
AFAIK this should still work, but apt might need a bit of help to find the
solution you want: it uses the first/default option which can lead it down the
systemd route.

My suggestions:

- Ensure you have the correct apt sources and remove any pinning or held
packages.

- apt update

- Manually install the new elogind, libelogind and libpam-elogind.

- apt upgrade

- apt dist-upgrade

If you find apt is trying to install systemd at any of these steps, we need to
identify the package that has a hard systemd dependency and deal with it.

HTH. Let me know how you get on.

Mark
Craig Sanders
2022-07-16 13:20:01 UTC
Permalink
Post by Mark Hindley
What release are you upgrading from an to?
Version of what? There's no new version of elogind. That's kind of what my
bug report is asking for.

The machine is running sid, so this was just a routine dist-upgrade.
Post by Mark Hindley
I can't immediately see the package that might be causing the conflict here.
A little more investigation reveals that it's udev.

udev 2.51.3-1 (Wed, 13 Jul 2022 23:05:40 +0200) now depends on 'systemd | systemd-tmpfiles'.

The previous version of udev, 251.2-7 (Tue, 28 Jun 2022 14:33:37 +0200) did NOT.

Package: udev
Version: 251.3-1
Depends: libacl1 (>= 2.2.23), libblkid1 (>= 2.37.2), libc6 (>= 2.33), libcap2 (>= 1:2.10), libkmod2 (>= 5~), libselinux1 (>= 3.1~), systemd | systemd-tmpfiles, adduser, libudev1 (= 251.3-1)

Package: udev
Version: 251.2-7
Depends: libacl1 (>= 2.2.23), libblkid1 (>= 2.37.2), libc6 (>= 2.33), libcap2 (>= 1:2.10), libkmod2 (>= 5~), libselinux1 (>= 3.1~), adduser, libudev1 (= 251.2-7)


Yep. So much for the "systemd will never be mandatory in Debian"
promises. What a surprise! Debian's systemd zealots haven't even been
pretending they meant that for years now. It was discarded almost as soon as
they no longer needed it to get enough votes.

udev may not be flagged as "Essential: yes" but it is not an optional
package. Certainly not on a machine with X installed - xserver-xorg-core,
pulse-audio and about 100 other packages depend on it directly.
Post by Mark Hindley
Post by Craig Sanders
# apt -u upgrade
[...]
elogind : Conflicts: systemd
Conflicts: systemd:i386
libelogind0 : Conflicts: libsystemd0
Conflicts: systemd
Conflicts: systemd:i386
E: Broken packages
AFAIK this should still work, but apt might need a bit of help to find the
solution you want: it uses the first/default option which can lead it down the
systemd route.
Nope, it doesn't. udev depends on systemd now. There is no alternative.
Post by Mark Hindley
- Ensure you have the correct apt sources and remove any pinning or held
packages.
My apt sources are fine - pointing at sid in my own local debian mirrors (i've
been mirroring debian since the 90s).

The only relevant held packages are sysvinit related. If I unhold them, then
'apt dist-upgrade' just offers to remove them and install systemd instead.
Post by Mark Hindley
- apt update
- Manually install the new elogind, libelogind and libpam-elogind.
Unless it was released today, there is no new debian package of elogind. or
related packages. That's still 246.9.1-1+debian1 as it has been since Dec 23
2020.

I've been running apt update and then trying upgrade or dist-upgrade for the
last few days and getting the same result, hoping a new version of elogind
will be released. And then I realised that's probably not going to happen
until someone files a bug report.
Post by Mark Hindley
- apt upgrade
- apt dist-upgrade
If you find apt is trying to install systemd at any of these steps, we need to
identify the package that has a hard systemd dependency and deal with it.
HTH. Let me know how you get on.
I'm going to make another attempt to switch this machine to systemd. It's
been at least two years since I last tried. Hopefully it will either work or
I'll be able to revert back to sysvinit (I've been able to do so in the past,
but it's always been a PITA chore).

Much as I loathe the way systemd steadily absorbs more and more stuff that has
nothing to do with init, it does make a decent init system as long as I can
disable all the unwanted bullshit.

This machine would have been switched to systemd years ago if systemd was
actually capable of booting it. Having to maintain one machine that's
different from all my other machines is a PITA...a bigger PITA than the
constant vigilance against systemd's encroachments.

And, no, there's nothing unusual about this machine. It's an AMD FX 8150 on an
Asus Sabertooth 990FX motherboard. I have another identical motherboard with
an AMD Phenom II 1090T which runs systemd without a problem. And it's not the
FX 8150 CPU - this machine used to have an identical 1090T CPU, and systemd
wouldn't boot on it back then either.


craig

--
craig sanders <***@taz.net.au>
Lorenzo
2022-07-16 13:40:02 UTC
Permalink
Hi Craig,

On Sat, 16 Jul 2022 23:07:47 +1000
Post by Craig Sanders
A little more investigation reveals that it's udev.
udev 2.51.3-1 (Wed, 13 Jul 2022 23:05:40 +0200) now depends on
'systemd | systemd-tmpfiles'.
Try to install the systemd-standalone-tmpfiles package first, then run
the upgrade as usual. It should work.

Lorenzo
Adam Borowski
2022-07-16 13:40:02 UTC
Permalink
Post by Craig Sanders
The machine is running sid, so this was just a routine dist-upgrade.
Post by Mark Hindley
I can't immediately see the package that might be causing the conflict here.
A little more investigation reveals that it's udev.
udev 2.51.3-1 (Wed, 13 Jul 2022 23:05:40 +0200) now depends on 'systemd | systemd-tmpfiles'.
Just do:
apt dist-upgrade systemd-

That will let apt find the solution where it install systemd-tmpfiles but no
systemd itself.

The _correct_ way would be to write that dependency as
'systemd-tmpfiles | systemd' which is no-op on systemd installs but
avoids init switch elsewhere.
Post by Craig Sanders
I'm going to make another attempt to switch this machine to systemd. It's
been at least two years since I last tried.
Don't. My primary desktop is in the same situation, and it appears I risk
physical damage(!) whenever I attempt to boot systemd.
Post by Craig Sanders
And, no, there's nothing unusual about this machine. It's an AMD FX 8150 on an
Asus Sabertooth 990FX motherboard. I have another identical motherboard with
an AMD Phenom II 1090T which runs systemd without a problem. And it's not the
FX 8150 CPU - this machine used to have an identical 1090T CPU, and systemd
wouldn't boot on it back then either.
AMD Threadripper+ 2990WX here.


Meow!
--
⢀⣴⠾⠻⢶⣦⠀
⣾⠁⢠⠒⠀⣿⡁ How to squander your resources: those silly Swedes have a sauce
⢿⡄⠘⠷⠚⠋⠀ named "hovmästarsås", the best thing ever to put on cheese, yet
⠈⠳⣄⠀⠀⠀⠀ they waste it solely on mere salmon.
Mark Hindley
2022-07-16 14:50:01 UTC
Permalink
Adam,
Post by Adam Borowski
The _correct_ way would be to write that dependency as
'systemd-tmpfiles | systemd' which is no-op on systemd installs but
avoids init switch elsewhere.
Thanks. That is a good suggestion.

Michael,

I know this issue was raised a few days ago in #1014805 and you rejected any
change, but, as they stand, the udev dependencies are causing problems to users
and apt does not readily find the solution which avoids switching init system.

In your rejection of #1014805 you correctly asserted the first alternative in a
dependency should be a real package. So, perhaps

systemd-standalone-tmpfiles | systemd-tmpfiles

would satisfy the Policy requirements and not produce unexpected behaviour for
users? On systemd systems it would be noop as systemd provides systemd-tmpfiles
and it would avoid trying to install systemd on non-systemd systems which then
causes conflicts with elogind.

What do you think?

Thanks for your consideration.

Best wishes

Mark
Mark Hindley
2022-07-16 13:40:02 UTC
Permalink
Craig,

Thanks.
Post by Craig Sanders
A little more investigation reveals that it's udev.
udev 2.51.3-1 (Wed, 13 Jul 2022 23:05:40 +0200) now depends on 'systemd | systemd-tmpfiles'.
Great. systemd-tmpfiles is a virtual package that is also provided by
systemd-standalone-tmpfiles. If you manually install that, I suspect you will find
everything is OK again.

Mark
Craig Sanders
2022-07-17 01:50:01 UTC
Permalink
Post by Mark Hindley
Post by Craig Sanders
A little more investigation reveals that it's udev.
udev 2.51.3-1 (Wed, 13 Jul 2022 23:05:40 +0200) now depends on 'systemd | systemd-tmpfiles'.
Great. systemd-tmpfiles is a virtual package that is also provided by
systemd-standalone-tmpfiles. If you manually install that, I suspect you
will find everything is OK again.
Thanks, I have just tried that and it seems to work.

Perhaps elogind should Suggest or Recommend systemd-standalone-tmpfiles?



BTW, I had already installed systemd, but hadn't rebooted yet, before I
saw this, but (after examining /var/log/dpkg.log to find out exactly which
packages had been removed because of that), running the following reverted my
system back to the way it was before.

apt-get install systemd-standalone-tmpfiles sysvinit-core elogind

and, of course:

apt-mark hold sysvinit-core

To prevent systemd from being auto-installed in some future upgrade.


indra:/var/log# grep -E ' (remove|purge) ' dpkg.log
2022-07-16 17:05:39 startup packages remove
2022-07-16 17:05:39 remove libelogind0:amd64 246.9.1-1+debian1 <none>
2022-07-16 17:05:39 remove elogind:amd64 246.9.1-1+debian1 <none>
2022-07-16 17:05:41 startup packages remove
2022-07-16 17:05:41 remove sysvinit-core:amd64 3.03-1 <none>
2022-07-16 17:05:42 startup packages remove
2022-07-16 17:05:43 remove libpam-elogind:amd64 246.9.1-1+debian1 <none>
2022-07-16 17:05:44 startup packages remove
2022-07-16 17:05:44 remove libpam-elogind-compat:amd64 1.3 <none>

craig
Thorsten Glaser
2022-07-17 02:20:01 UTC
Permalink
Post by Craig Sanders
=20
apt-mark hold sysvinit-core
=20
To prevent systemd from being auto-installed in some future upgrade.
You most likely want some pinning. Just held in dpkg or even marked
as XB-Important: yes often brings apt to tears in sid, i.e. refusing
to dist-upgrade at all.

Check the prevent-* packages in
http://www.mirbsd.org/~tg/Debs/dists/sid/wtf/Pkgs/mirabilos-support/
for inspiration. (I=E2=80=99ve moved from sid to bullseye though, so they
only get very mild testing in a chroot, and not with the latest
shenanigans yet.)

bye,
//mirabilos
--=20
Infrastrukturexperte =E2=80=A2 tarent solutions GmbH
Am Dickobskreuz 10, D-53121 Bonn =E2=80=A2 http://www.tarent.de/
Telephon +49 228 54881-393 =E2=80=A2 Fax: +49 228 54881-235
HRB AG Bonn 5168 =E2=80=A2 USt-ID (VAT): DE122264941
Gesch=C3=A4ftsf=C3=BChrer: Dr. Stefan Barth, Kai Ebenrett, Boris Esser, Ale=
xander Steeg

***************************************************=
*
/=E2=81=80\ The UTF-8 Ribbon
=E2=95=B2=C2=A0=E2=95=B1 Campaign against Mit dem tarent-Newsletter ni=
chts mehr verpassen:
=C2=A0=E2=95=B3=C2=A0 HTML eMail! Also, https://www.tarent.de/newslette=
r
=E2=95=B1=C2=A0=E2=95=B2 header encryption!
***************************************************=
*
Craig Sanders
2022-07-17 02:30:01 UTC
Permalink
Post by Thorsten Glaser
Post by Craig Sanders
apt-mark hold sysvinit-core
To prevent systemd from being auto-installed in some future upgrade.
You most likely want some pinning.
I've never found pinning to be of much use. When I did have an actual use for
it (many years ago, during the gnome 2 -> gnome 3 transition), it required
constant work and tweaking of the pinning rules to get it to do what I
wanted. Far more work than it was worth - I ended up just purging gnome and
switching to xfce instead.

Having `APT::Default-Release "unstable";` is enough for my needs. That allows
me to run sid and cherry pick a few things (mostly nvidia-kernel-dkms and
friends) from experimental. With that default release, apt will only install
from unstable unless I explicitly force it to with `-t experimental`. Works
for me.

Or `APT::Default-Release "stable";` allows a system to run stable and
cherry-pick from testing/sid/experimental plus backports as needed.
Post by Thorsten Glaser
Just held in dpkg or even marked as XB-Important: yes often brings apt to
tears in sid, i.e. refusing to dist-upgrade at all.
Yeah, but I **want** apt to chuck a wobbly, it alerts me to the fact that
there are problems that need manual intervention and/or that I need to wait
a few days/weeks for updated packages. I don't run a dist-upgrade every day
anyway, so waiting is no big deal.

craig

--
craig sanders <***@taz.net.au>
Thorsten Glaser
2022-07-17 02:40:01 UTC
Permalink
Post by Thorsten Glaser
You most likely want some pinning.
I've never found pinning to be of much use. When I did have an actual use=
for
[=E2=80=A6]

No, not that. You need it to get apt to not even consider systemd
installable.
wanted. Far more work than it was worth - I ended up just purging gnome a=
nd
switching to xfce instead.
That anyway.
Having `APT::Default-Release "unstable";` is enough for my needs. That al=
lows
[=E2=80=A6]
Or `APT::Default-Release "stable";` allows a system to run stable and
cherry-pick from testing/sid/experimental plus backports as needed.
No, not that. See above and below.
Post by Thorsten Glaser
Just held in dpkg or even marked as XB-Important: yes often brings apt =
to
Post by Thorsten Glaser
tears in sid, i.e. refusing to dist-upgrade at all.
Yeah, but I **want** apt to chuck a wobbly, it alerts me to the fact that
there are problems that need manual intervention and/or that I need to wa=
it

Nope. These are things apt could, in theory, solve by itself but cannot
because it can only consider one solution but that=E2=80=99s uninstallable.=
By
forcing it to not even consider systemd by pinning it down to -1 you get
apt to consider an alternative solution instead.

In pbuilder, I pin down dconf-gsettings-backend for example, so it gets
gconf-gsettings-backend instead, which works without systemd. (Not that
this is actually used during the building, but dependencies are gonna
depend.)

bye,
//mirabilos
--=20
<diogenese> Beware of ritual lest you forget the meaning behind it.
<igli> yeah but it means if you really care about something, don't
ritualise it, or you will lose it. don't fetishise it, don't
obsess. or you'll forget why you love it in the first place.

Loading...