debcrafters-packages team mailing list archive
-
debcrafters-packages team
-
Mailing list archive
-
Message #04510
[Bug 2080257] Re: [WSL] systemd fails to upgrade on WSL1
Commenting here because I just marked bug 2069555 as a duplicate.
When I last looked into this, it seemed like this was really on
Microsoft to fix WSL1. Hence, I didn't really think there was a great
fix here on the systemd side. Sure, we could fallback to F_SETLK or so,
but my understanding is that WSL1 just returns success but never does
any locking in that case. So that doesn't seem better to me.
In the postinst, the systemd-sysusers call is added automatically by
dh_installsysusers, so working around the error in postinst scripts is
not ideal either (anything that uses dh_installsysusers is affected).
I'm open to suggestions, but without locking support in WSL, anything
would just be papering over the failure.
--
You received this bug notification because you are a member of
Debcrafters packages, which is subscribed to systemd in Ubuntu.
https://bugs.launchpad.net/bugs/2080257
Title:
[WSL] systemd fails to upgrade on WSL1
Status in systemd package in Ubuntu:
Invalid
Bug description:
Original report: https://github.com/ubuntu/WSL/issues/493
On WSL with systemd disabled (wsl1 or wsl2 without systemd enabled),
systemd fails to upgrade.
# Test Case WSL1
1. Install Ubuntu 24.04 with WSL from a Windows shell
wsl --install --enable-wsl1 ubuntu-24.04
or
wsl --install ubuntu-24.04
wsl --set-version ubuntu-24.04 1
=> Verify that 24.04 is using version 1
NAME STATE VERSION
Ubuntu-22.04 Stopped 2
Ubuntu-24.04 Running 1
2. Start the distro if it is not already running
ubuntu2404.exe
3. In the distro run the following command:
sudo apt install --reinstall systemd
# Expected result
systemd is reinstalled without any issue
# Actual result
systemd postinst script fails and the following error is displayed to
the user:
```
root@drenec:~# apt install --reinstall systemd
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 2 not upgraded.
Need to get 3470 kB of archives.
After this operation, 0 B of additional disk space will be used.
Get:1 http://archive.ubuntu.com/ubuntu noble-updates/main amd64 systemd amd64 255.4-1ubuntu8.4 [3470 kB]
Fetched 3470 kB in 1s (2816 kB/s)
(Reading database ... 40771 files and directories currently installed.)
Preparing to unpack .../systemd_255.4-1ubuntu8.4_amd64.deb ...
Unpacking systemd (255.4-1ubuntu8.4) over (255.4-1ubuntu8.4) ...
Setting up systemd (255.4-1ubuntu8.4) ...
Failed to take /etc/passwd lock: Invalid argument
dpkg: error processing package systemd (--configure):
installed systemd package post-installation script subprocess returned error exit status 1
Processing triggers for dbus (1.14.10-4ubuntu4.1) ...
Processing triggers for man-db (2.12.0-4build2) ...
Errors were encountered while processing:
systemd
E: Sub-process /usr/bin/dpkg returned an error code (1)
```
There is no easy way to recover from the error.
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/2080257/+subscriptions