Bug#1053301: udev.postinst removes valid /etc/rc*.d/ symlinks

2023-10-29 Thread Matthias Geiger

On Thu, 05 Oct 2023 16:31:00 +0100 Luca Boccassi  wrote:
> Control: severity -1 minor
>
> On Wed, 4 Oct 2023 22:00:06 +0100 Mark Hindley 
> wrote:
> > Control: tags -1 patch
> > Control: affects -1 initscripts
> > Control: severity -1 serious
> > Justification: Breaks unrelated packages, breaks non-systemd boot
> >
> > Michael,
> >
> > Please find a patch below that addresses this issue in my test setup.
> I can
> > offer to NMU if you would like?
> >
> > I have provided an easy means to reproduce the bug and a clear
> justfication for
> > why I think this is an RC bug. If you disagree, please explain why,
> rather than
> > just changing the severity. Thanks.
>
> If you want to see your changes merged, I would recommend to stop
> playing games with severity and send a MR on Salsa instead. It will be
> quicker, easier and much more effective.
>
> --
> Kind regards,

> Luca Boccassi

Created https://salsa.debian.org/systemd-team/systemd/-/merge_requests/219 .

I hope this gets resolved soon so my openRC system gets unbroken.

best,

--
Matthias Geiger 
Debian Maintainer
"Freiheit ist immer Freiheit des anders Denkenden" -- Rosa Luxemburg



OpenPGP_0x18BD106B3B6C5475.asc
Description: OpenPGP public key


OpenPGP_signature.asc
Description: OpenPGP digital signature


Bug#1053301: udev.postinst removes valid /etc/rc*.d/ symlinks

2023-10-05 Thread Luca Boccassi
Control: severity -1 minor

On Wed, 4 Oct 2023 22:00:06 +0100 Mark Hindley 
wrote:
> Control: tags -1 patch
> Control: affects -1 initscripts
> Control: severity -1 serious
> Justification: Breaks unrelated packages, breaks non-systemd boot
> 
> Michael,
> 
> Please find a patch below that addresses this issue in my test setup.
I can
> offer to NMU if you would like?
> 
> I have provided an easy means to reproduce the bug and a clear
justfication for
> why I think this is an RC bug. If you disagree, please explain why,
rather than
> just changing the severity. Thanks.

If you want to see your changes merged, I would recommend to stop
playing games with severity and send a MR on Salsa instead. It will be
quicker, easier and much more effective.

-- 
Kind regards,
Luca Boccassi


signature.asc
Description: This is a digitally signed message part


Bug#1053301: udev.postinst removes valid /etc/rc*.d/ symlinks

2023-10-04 Thread Mark Hindley
Control: tags -1 patch
Control: affects -1 initscripts
Control: severity -1 serious
Justification: Breaks unrelated packages, breaks non-systemd boot

Michael,

Please find a patch below that addresses this issue in my test setup. I can
offer to NMU if you would like?

I have provided an easy means to reproduce the bug and a clear justfication for
why I think this is an RC bug. If you disagree, please explain why, rather than
just changing the severity. Thanks.

Best wishes

Mark

diff --git a/debian/changelog b/debian/changelog
index fe1f4bc..ec8a75a 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,12 @@
+systemd (254.5-1.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * d/udev.postinst: Correct version number test for dropping
+/etc/init.d/udev and only remove /etc/rc?.d/symlinks if
+/etc/init.d/udev doesn't exist.  (Closes: #1053301)
+
+ -- Mark Hindley   Wed, 04 Oct 2023 18:30:36 +0100
+
 systemd (254.5-1) unstable; urgency=medium
 
   * New upstream version 254.5
diff --git a/debian/udev.postinst b/debian/udev.postinst
index 84ff782..04bafa2 100644
--- a/debian/udev.postinst
+++ b/debian/udev.postinst
@@ -11,7 +11,8 @@ case "$1" in
 # update/create hwdb before we (re)start udev
 update_hwdb
 
-if dpkg --compare-versions "$2" lt-nl "254.1-4~"; then
+if dpkg --compare-versions "$2" lt-nl "254.3-1~" &&
+[ ! -f /etc/init.d/udev ] ; then
 update-rc.d udev remove || true
 fi
 ;;



Bug#1053301: udev.postinst removes valid /etc/rc*.d/ symlinks

2023-10-03 Thread Mark Hindley
Control: reopen -1 "Bill Brelsford "
Control: reassign -1 udev 254.3-1
Control: severity -1 severe
Justification: Breaks unrelated software; causes boot failure on some systems

Dear systemd maintainers,

As Bill has reported here, the new udev.postinst is breaking systems not using
systemd as PID 1.

On Fri, Sep 29, 2023 at 09:51:21PM -0700, Bill Brelsford wrote:
> When upgrading (with aptitude), initscripts (3.08-1) is set up
> before udev (254.4-1). Udev claims to remove the "obsolete
> conffile /etc/init.d/udev", but it's still there. However, the
> rc*.d symlinks are not -- "update-rc.d udev defaults" fixes it.

It is reproducible by installing trixie udev and initscripts in a bookworm
chroot:

bookworm-chroot:/# dpkg --no-pager -l udev initscripts
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name   Version  Architecture Description
+++-==---=
ii  initscripts3.06-4   all  scripts for initializing and 
shutting down the system
ii  udev   252.12-1~deb12u1 amd64/dev/ and hotplug management 
daemon
bookworm-chroot:/# ls -l /etc/rc?.d/*udev*
lrwxrwxrwx 1 root root 14 Oct  3 08:36 /etc/rc0.d/K01udev -> ../init.d/udev
lrwxrwxrwx 1 root root 14 Oct  3 08:36 /etc/rc6.d/K01udev -> ../init.d/udev
lrwxrwxrwx 1 root root 14 Oct  3 08:36 /etc/rcS.d/S02udev -> ../init.d/udev
bookworm-chroot:/# apt install --no-install-recommends -t trixie udev 
initscripts
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
  libudev1 systemd systemd-dev
Suggested packages:
  systemd-container systemd-homed systemd-userdbd systemd-boot systemd-resolved 
libfido2-1 libqrencode4 libtss2-esys-3.0.2-0 libtss2-mu0 libtss2-rc0
  polkitd python3:any python3-pefile
Recommended packages:
  default-dbus-system-bus | dbus-system-bus systemd-timesyncd | time-daemon
The following NEW packages will be installed:
  systemd systemd-dev
The following packages will be upgraded:
  initscripts libudev1 udev
3 upgraded, 2 newly installed, 0 to remove and 60 not upgraded.
Need to get 5299 kB of archives.
After this operation, 11.8 MB of additional disk space will be used.
Do you want to continue? [Y/n]
Get:1 http://deb.debian.org/debian trixie/main amd64 udev amd64 254.4-1 [1756 
kB]
Get:2 http://deb.debian.org/debian trixie/main amd64 systemd-dev all 254.4-1 
[54.7 kB]
Get:3 http://deb.debian.org/debian trixie/main amd64 systemd amd64 254.4-1 
[3304 kB]
Get:4 http://deb.debian.org/debian trixie/main amd64 libudev1 amd64 254.4-1 
[120 kB]
Get:5 http://deb.debian.org/debian trixie/main amd64 initscripts all 3.08-1 
[64.5 kB]
Fetched 5299 kB in 1s (4686 kB/s)  
debconf: delaying package configuration, since apt-utils is not installed
(Reading database ... 6627 files and directories currently installed.)
Preparing to unpack .../udev_254.4-1_amd64.deb ...
Unpacking udev (254.4-1) over (252.12-1~deb12u1) ...
Selecting previously unselected package systemd-dev.
Preparing to unpack .../systemd-dev_254.4-1_all.deb ...
Unpacking systemd-dev (254.4-1) ...
Selecting previously unselected package systemd.
Preparing to unpack .../systemd_254.4-1_amd64.deb ...
Unpacking systemd (254.4-1) ...
Preparing to unpack .../libudev1_254.4-1_amd64.deb ...
Unpacking libudev1:amd64 (254.4-1) over (252.12-1~deb12u1) ...
Setting up libudev1:amd64 (254.4-1) ...
(Reading database ... 7562 files and directories currently installed.)
Preparing to unpack .../initscripts_3.08-1_all.deb ...
Unpacking initscripts (3.08-1) over (3.06-4) ...
Setting up initscripts (3.08-1) ...
Installing new version of config file /etc/init.d/brightness ...
Setting up systemd-dev (254.4-1) ...
Setting up systemd (254.4-1) ...
Setting up udev (254.4-1) ...
Removing obsolete conffile /etc/init.d/udev ...
Processing triggers for libc-bin (2.36-9+deb12u1) ...
bookworm-chroot:/# ls -l /etc/rc?.d/*udev*
ls: cannot access '/etc/rc?.d/*udev*': No such file or directory

It appears that the udev postinst is running after initscripts has been
configured and removing the /etc/rc?.d/ udev symlinks.

bookworm-chroot:/# dpkg-reconfigure initscripts
bookworm-chroot:/# ls -l /etc/rc?.d/*udev*
lrwxrwxrwx 1 root root 14 Oct  3 08:50 /etc/rc0.d/K01udev -> ../init.d/udev
lrwxrwxrwx 1 root root 14 Oct  3 08:50 /etc/rc6.d/K01udev -> ../init.d/udev
lrwxrwxrwx 1 root root 14 Oct  3 08:50 /etc/rcS.d/S02udev -> ../init.d/udev

The relevant code in udev's postinst has:

 if dpkg --compare-versions "$2" lt-nl "254.1-4~"; then
update-rc.d udev remove || true
fi

I think there are 2 issues here:-

 1) update-rc.d shouldn't be called if /etc/init.d/udev exists and is not owned
by bin:udev.

 2) There appears to be a typo: the version of