Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#76726 - [systemd] systemd 252 can't find/remove service/socket during pkg uninstall

Attached to Project: Arch Linux
Opened by czyyodkrcmvo (czyyodkrcmvo) - Saturday, 03 December 2022, 02:08 GMT
Last edited by Toolybird (Toolybird) - Saturday, 03 December 2022, 02:40 GMT
Task Type Bug Report
Category Packages: Core
Status Closed
Assigned To No-one
Architecture x86_64
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:

Since systemd 252 it can't disable any running service/socket via PKGBUILD .install script

Additional info:

For and example I am testing this PKGBUILD. https://github.com/CachyOS/CachyOS-DNSCrypt-Proxy. Here the pkg contains dnscrypt-proxy.install script which fails to disable the activated service during uninstall.

Steps to reproduce:

Just try to uninstall any program whose service/socket that was installed and enabled via PKGBUILD's .install script.
For and example, systemctl disable --now dnscrypt-proxy -f in post_remove() for the following project's dnscrypt-proxy.install script is no more working via systemd 252 and later versions (Previously worked with systemd 251.7-4 I downgraded systemd already and retried was working then).

But for an example in post_install() section systemctl enable --now dnscrypt-proxy -f working flawlessly. But when uninstalling its showing that Failed to disable unit: dnscrypt-proxy.service doesn't exist.

Then I checked with systemctl status dnscrypt-proxy and the status is not-found (active running) and current command vanished from the unit file. Which is very weird. But I have tried manually to disable that (working after installation only).

But after uninstalling the pkg, the service disabling is not working and only stopping the service is working. If its not stopped then it also persists in the future boots. Very Very weird bug from latest systemd.
This task depends upon

Closed by  Toolybird (Toolybird)
Saturday, 03 December 2022, 02:40 GMT
Reason for closing:  Not a bug
Additional comments about closing:  See comments
Comment by Mark Wagie (yochananmarqos) - Saturday, 03 December 2022, 02:21 GMT
Stopping and/or disabling a service should be done in pre_remove(), not post_remove().
Comment by Doug Newgard (Scimmia) - Saturday, 03 December 2022, 02:21 GMT
So you file the same bug, under the wrong project, and with the wrong severity. Really? Come on.

Anyway, sounds pretty normal to me. You're trying to disable it after the file has already been removed. User error, IMO.
Comment by czyyodkrcmvo (czyyodkrcmvo) - Saturday, 03 December 2022, 02:28 GMT
it worked before with post_remove() also with previous systemd version 251.7-4. Just not with 252 series
Comment by czyyodkrcmvo (czyyodkrcmvo) - Saturday, 03 December 2022, 02:32 GMT
If its due to pacman update about handling pre_remove() from now. Then let me know. Cause previously it worked even with post_remove().
BTW Thanks for the reply

Loading...