[Bug 2047975] Re: package systemd-resolved 253.5-1ubuntu7 failed to install/upgrade: installed systemd-resolved package post-installation script subprocess returned error exit status 1 [cp: '/etc/resolv.conf' and '/run/systemd/resolve/stub-resolv.conf' are the same file]
Launchpad Bug Tracker
2047975 at bugs.launchpad.net
Wed Jul 10 16:54:41 UTC 2024
This bug was fixed in the package systemd - 256-1ubuntu1
---------------
systemd (256-1ubuntu1) oracular; urgency=medium
* Merge with Debian unstable. Remaining changes:
- debian/tests/upstream{,-1,-2}: split upstream tests into two parts
- debian/tests/tests-in-lxd: run some autopkgtests in LXD too
- debian/tests/boot-and-services:
+ skip apparmor tests on armhf
+ consume stderr in systemctl status call in test_service
+ drop test_no_failed
- debian/systemd.postinst:
+ skip daemon-reexec and try-restarts during shutdown
+ manually call systemd-tmpfiles --create in postinst
- debian/systemd-resolved.postinst: copy existing /etc/resolv.conf to
/run/systemd/resolve/stub-resolv.conf
- debian/rules:
+ Remove unneeded efi artifacts on i386 to avoid debugedit errors
- debian/rules,debian/control,debian/tests/control:
+ Do not build with tpm libraries on i386
+ Do not build with libqrencode on i386
- debian/gbp.conf,debian/extra/wrap_cl.py:
Use a customization script to add LP commit links to changelog
- debian/control:
+ Add Recommends: networkd-dispatcher systemd-resolved to systemd package
+ Give systemd-resolved Priority: important
+ Add Recommends: systemd-hwe-hwdb to udev package
+ Add Breaks: systemd (<< ${binary:Version}) to udev package so that
systemd is upgraded as well when upgrading udev
+ Make systemd-sysv Depends: on matching version of systemd
+ Drop Recommends: libnss-myhostname libnss-resolve from systemd-resolved
+ Build-Depends: linux-tools-generic
- d/p/Revert-network-if-sys-is-rw-then-udev-should-be-around.patch:
Revert "network: if /sys is rw, then udev should be around" upstream
commit
- debian/tests/upstream: export QEMU_MEM="1024M" for all tests
- debian/systemd.links: mask systemd-gpt-auto-generator by default
- debian/systemd.install: exclude files that are not built for i386
- debian/systemd.manpages: do not ship un-built manpages on i386
- debian/tests/control: only install systemd-boot-efi for supported arches
- test: skip exec-privatenetwork-yes-privatemounts-yes.service in LXC
- debian/test/unit-tests: skip test-execute on armhf.
* Dropped changes, included in Debian:
- debian/extra: use a drop-in resolved.conf to configure Cache=no-negative
- debian/extra: use a dropin to configure Nice=-1 on systemd-journald.service.
- debian/extra/systemd-oomd-defaults/-.slice.d/10-oomd-root-slice-defaults.conf:
Set ManagedOOMSwap=auto, disabling swap kill by default
- debian/rules:
+ Set default user path
+ Disable LLMNR by default
- debian/tests/storage: skip tests if scsi_debug module is not available
* Dropped changes:
- debian/patches/tmpfiles.d-tmp.conf-make-cleanup-age-30d-on-Ubuntu.patch:
We want to stay aligned with Debian and upstream instead of keeping this
30d cleanup.
- debian/systemd-resolved.install: drop unnecessary delta
- d/p/debian/UBUNTU-Don-t-override-Ubuntu-s-default-sysctl-values-LP-1962038.patch:
We do not actually ship sysctld.d/50-default.conf in Debian or Ubuntu.
When this patch was written, we did, but that change was lost in a merge
from Debian. The preferred package to set sysctl defaults is procps
anyways, so rather than restoring sysctl.d/50-default.conf to make this
patch relevant, drop the patch.
* New changes:
- debian/extra: remove systemd-logind.service.d/nice.conf (LP: #2067927)
- switch-root: use MS_MOVE for /run when switchig from initrd (LP: #2064096)
- debian/systemd.postinst: do not create /etc/tmpfiles.d/tmp.conf on upgrades.
We want the upgrades on Ubuntu to be aligned with what a new install
would look like.
systemd (256-1) unstable; urgency=medium
[ Kevin Fleming ]
* Additional workaround for links to legacy /usr/share/systemd/tmp.mount
placeholder
[ Yu Watanabe ]
* debian/extra/network: use NamePolicy=mac only when ID_NET_NAME_MAC is
set.
[ Luca Boccassi ]
* New upstream version 256. For a full list of changes, see:
https://github.com/systemd/systemd/releases/tag/v256
systemd (256~rc4-1) unstable; urgency=high
[ Luca Boccassi ]
* Restart managers on libc-upgrade dpkg trigger (Closes: #1072373)
* LimitCORE: restore default hard limit to infinity. The intention was
to change the soft limit, but by default it applies to both unless
specified, so fix it.
* New upstream version 256~rc4
* Drop patches merged upstream
[ Nick Rosbrook ]
* debian/extra: set ManagedOOMSwap=auto on -.slice. This has the effect
of disabling swap kill by default, so cgroups will only be monitored
for memory pressure, and not swap usage.
* debian/extra: use a drop-in resolved.conf to configure Cache=no-
negative. Only ship this on Ubuntu.
* debian/extra: use a dropin to configure Nice=-1 on systemd-
journald.service. Only ship this on Ubuntu.
[ Dan Streetman ]
* debian/tests/storage: without scsi_debug, skip test
systemd (256~rc3-7) unstable; urgency=medium
* NEWS: note that any leftover file in /tmp/ will be invisible due to
the tmpfs and other clarifications (Closes: #1072249)
* Add pkg.systemd.noukify profile. Will be useful for i386 reduced
builds
* d/rules: be more robust against non-existing dirs when deleting files
* Allow setting GENSYMBOLS_LEVEL from the environment. Needed when
building with llvm to work around #986746
systemd (256~rc3-6) unstable; urgency=medium
* NEWS: clarify tmpfiles.d entry (Closes: #1072155)
* Override false positive Lintian warning
* Add workaround for links to legacy /usr/share/systemd/tmp.mount
placeholder. Some users apparently link to the placeholder in
/usr/share/ so delete any such links, given we don't ship it anymore
(Closes: #1072187)
-- Nick Rosbrook <enr0n at ubuntu.com> Thu, 13 Jun 2024 11:46:06 -0400
** Changed in: systemd (Ubuntu)
Status: Fix Committed => Fix Released
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to systemd in Ubuntu.
https://bugs.launchpad.net/bugs/2047975
Title:
package systemd-resolved 253.5-1ubuntu7 failed to install/upgrade:
installed systemd-resolved package post-installation script subprocess
returned error exit status 1 [cp: '/etc/resolv.conf' and
'/run/systemd/resolve/stub-resolv.conf' are the same file]
Status in systemd package in Ubuntu:
Fix Released
Status in systemd source package in Noble:
Fix Released
Bug description:
[Impact]
For users that disabled the stub-resolver, and in doing so also
created a symlink /etc/resolv.conf -> /run/systemd/resolve/resolv.conf
(note this is not the correct way to disable the stub-resolver),
upgrading from Jammy to Noble will fail with:
cp: '/etc/resolv.conf' and '/run/systemd/resolve/stub-resolv.conf' are
the same file
This logic in systemd-resolved.postinst is guarded by a version check,
and is only run on upgrades from systemd versions before 251.4-2
(which in practice means only upgrades from Jammy), and on new
installs.
[Test Plan]
Start a VM or container running Jammy. Disable the stub-resolver, and
create the symlink /etc/resolv.conf ->
/run/systemd/resolve/resolv.conf:
$ mkdir -p /etc/systemd/resolved.conf.d/
$ cat > /etc/systemd/resolved.conf.d/no-stub-resolver.conf << EOF
[Resolve]
DNSStubListener=no
EOF
$ ln -sf /run/systemd/resolve/resolv.conf /etc/resolv.conf
$ systemctl restart systemd-resolved
Then, run an upgrade to Noble:
$ do-release-upgrade --devel
NB that currently, even devel upgrades are disabled to from Jammy to
Noble, so the upgrade would need to be run as:
$ wget http://archive.ubuntu.com/ubuntu/dists/noble-proposed/main/dist-upgrader-all/24.04.18/noble.tar.gz
$ tar xf noble.tar.gz
$ ./noble
Inspect the relevant output and logs to ensure that systemd-resolved
was upgraded successfully during the upgrade.
[Where problems could occur]
The fix is to make such a failure non-fatal. This is safe because
although manually creating this symlink is not necessary, it will not
impact the operation of systemd-resolved. Hence, failing to make this
cp will not impact the user. Later in the postinst, we force the new
symlink anyways.
If something was wrong with the change, it would likely cause the
systemd-resolved.postinst to fail a different way.
[Original Description]
upgraded from 22.04 -> 24.04
ProblemType: Package
DistroRelease: Ubuntu 24.04
Package: systemd-resolved 253.5-1ubuntu7
ProcVersionSignature: Ubuntu 6.2.0-39.40~22.04.1-generic 6.2.16
Uname: Linux 6.2.0-39-generic x86_64
ApportVersion: 2.27.0-0ubuntu6
Architecture: amd64
CasperMD5CheckResult: pass
CloudArchitecture: x86_64
CloudID: none
CloudName: none
CloudPlatform: none
CloudSubPlatform: config
Date: Wed Jan 3 21:06:55 2024
ErrorMessage: installed systemd-resolved package post-installation script subprocess returned error exit status 1
InstallationDate: Installed on 2023-02-27 (311 days ago)
InstallationMedia: Ubuntu-Server 22.04.1 LTS "Jammy Jellyfish" - Release amd64 (20220809)
Python3Details: /usr/bin/python3.11, Python 3.11.7, python3-minimal, 3.11.4-5
PythonDetails: N/A
RebootRequiredPkgs: Error: path contained symlinks.
RelatedPackageVersions:
dpkg 1.22.1ubuntu5
apt 2.7.6
SourcePackage: systemd
Title: package systemd-resolved 253.5-1ubuntu7 failed to install/upgrade: installed systemd-resolved package post-installation script subprocess returned error exit status 1
UpgradeStatus: Upgraded to noble on 2024-01-03 (0 days ago)
mtime.conffile..etc.systemd.resolved.conf: 2023-02-27T21:16:55.869158
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/2047975/+subscriptions
More information about the foundations-bugs
mailing list