Siduction Forum

Siduction Forum => Upgrade Warnings => Topic started by: michaa7 on 2026/03/01, 17:32:57

Title: fetchmail_6.6.2-3 : maintainer script ... failed with exit staus 5
Post by: michaa7 on 2026/03/01, 17:32:57
# LANG=C apt full-upgrade -y
Upgrading:                     
  fetchmail
                                                                                                                               
Not upgrading:
  grass-core  lxqt-panel

Summary:
  Upgrading: 1, Installing: 0, Removing: 0, Not Upgrading: 2
  4 not fully installed or removed.
  Download size: 0 B / 551 kB
  Freed space: 3.072 B

apt-listchanges: Reading changelogs...
(Reading database ... 653587 files and directories currently installed.)
Preparing to unpack .../fetchmail_6.6.2-3_amd64.deb ...
Failed to stop fetchmail.service: Unit fetchmail.service not loaded.
dpkg: warning: old fetchmail package prerm maintainer script subprocess failed with exit status 5
dpkg: trying prerm maintainer script from the new fetchmail package instead ...
Failed to stop fetchmail.service: Unit fetchmail.service not loaded.
dpkg: error processing archive /var/cache/apt/archives/fetchmail_6.6.2-3_amd64.deb (--unpack):
new fetchmail package prerm maintainer script subprocess failed with exit status 5
Errors were encountered while processing:
/var/cache/apt/archives/fetchmail_6.6.2-3_amd64.deb
needrestart is being skipped since dpkg has failed
Error: Sub-process /usr/bin/dpkg returned an error code (1)

Until now there doesn't seems to exist any bug report against fetchmail.

Someone has an idea how to solve this?

EDIT:
fetchmail is runing here in an user context. Why would I ever need a fetchmail.service?

Failed to stop fetchmail.service: Unit fetchmail.service not loaded. <- does this indicate a wrong assumption by the maintainer?
Title: Re: fetchmail_6.6.2-3 : maintainer script ... failed with exit staus 5
Post by: qord on 2026/03/01, 23:51:55
Hatte ich auch, das scheint damit zu tun zu haben, dass fetchmail jetzt nur noch über systemd gestartet werden kann/soll & deswegen ein service-file braucht - installiert ist aber keins & beim Update wird bisher anscheinend auch keins installiert...

Ich habe jetzt unter /usr/lib/systemd/system/fetchmail.service dieses stehen

[Unit]
Description=Fetchmail
After=network.target

[Service]
User=fetchmail
ExecStart=/usr/bin/fetchmail --pidfile /run/fetchmail/fetchmailrc.pid -f /etc/fetchmailrc
RestartSec=1
RuntimeDirectory=fetchmail
RuntimeDirectoryMode=0755

[Install]
WantedBy=multi-user.target


und dann noch in /usr/lib/systemd/system/fetchmail.timer:

[Unit]
Description=Run fetchmail every 1 minutes

[Timer]
OnBootSec=2min
OnUnitActiveSec=1min
Persistent=true

[Install]
WantedBy=timers.target


Damit läuft's bei mir wieder...

Evtl brauchts auch noch /etc/tmpfiles.d/fetchmail.tmpfiles:

d /run/fetchmail 700 fetchmail nogroup
d /var/lib/fetchmail 755 fetchmail nogroup


Basiert auf:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1129245#10 (https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1129245#10)
und
https://gitlab.archlinux.org/archlinux/packaging/packages/fetchmail (https://gitlab.archlinux.org/archlinux/packaging/packages/fetchmail)
Title: Re: fetchmail_6.6.2-3 : maintainer script ... failed with exit staus 5
Post by: michaa7 on 2026/03/02, 01:23:57
Danke für deine Antwort!

Hast du fetchmail auch nur in einem Nutzer Kontext laufen?
Systemd + [Install]
WantedBy=multi-user.target
schaut für mich nicht danach aus. Bei mir liegt die fetchmail Konfiguration in meinem /home und es wird einfach im WM Nutzer-environment gestartet. Ich würde nur sehr ungern da eine neue Konfiguration zusammen basteln müssen.
Title: Re: fetchmail_6.6.2-3 : maintainer script ... failed with exit staus 5
Post by: qord on 2026/03/02, 08:52:56
Nein, das ist bei mir systemweit... so wie ich das verstanden habe, ist aber das Hauptproblem beim fetchmal-Updatze das fehlende service-file. Vielleicht wäre es eine Option, dass anzulegen aber nicht zu enablen?

Bin da leider von meinem Fachwissen auch auf sehr dünnem Eis...
Title: Re: fetchmail_6.6.2-3 : maintainer script ... failed with exit staus 5
Post by: michaa7 on 2026/04/07, 11:41:52
Version 6.6.3-1 behebt das Upgradeproblem. Es bleibt jedoch eine Fehlermeldung wegen fehlendem fetchmail systemd service welche die Funktion nicht beeinträchtigt..