Bug 31007 - fetchmail reinstallation failed
fetchmail reinstallation failed
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: Mail
UCS 3.1
Other Linux
: P5 normal (vote)
: UCS 3.1-1-errata
Assigned To: Erik Damrose
Sönke Schwardt-Krummrich
:
Depends on:
Blocks: 31025
  Show dependency treegraph
 
Reported: 2013-04-10 09:20 CEST by Stefan Gohmann
Modified: 2018-02-20 12:05 CET (History)
2 users (show)

See Also:
What kind of report is it?: ---
What type of bug is this?: ---
Who will be affected by this bug?: ---
How will those affected feel about the bug?: ---
User Pain:
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional):
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Stefan Gohmann univentionstaff 2013-04-10 09:20:30 CEST
root@master521:~# apt-get install fetchmail
Paketlisten werden gelesen... Fertig
Abhängigkeitsbaum wird aufgebaut       
Statusinformationen werden eingelesen... Fertig
Die folgenden zusätzlichen Pakete werden installiert:
  ca-certificates
Vorgeschlagene Pakete:
  fetchmailconf resolvconf
Die folgenden NEUEN Pakete werden installiert:
  ca-certificates fetchmail
0 aktualisiert, 2 neu installiert, 0 zu entfernen und 2 nicht aktualisiert.
Es müssen 1.065 kB an Archiven heruntergeladen werden.
Nach dieser Operation werden 3.408 kB Plattenplatz zusätzlich benutzt.
Möchten Sie fortfahren [J/n]? 
Hole:1 http://updates.software-univention.de/3.0/maintained/ 3.0-0/all/ ca-certificates 20090814+nmu3.9.201109140808 [152 kB]
Hole:2 http://updates.software-univention.de/3.1/maintained/ 3.1-1/amd64/ fetchmail 6.3.18-2.30.201303211640 [912 kB]
Es wurden 1.065 kB in 1 s geholt (1.057 kB/s)
Vorkonfiguration der Pakete ...
Vormals abgewähltes Paket ca-certificates wird gewählt.
(Lese Datenbank ... 57413 Dateien und Verzeichnisse sind derzeit installiert.)
Entpacken von ca-certificates (aus .../ca-certificates_20090814+nmu3.9.201109140808_all.deb) ...
Vormals abgewähltes Paket fetchmail wird gewählt.
Entpacken von fetchmail (aus .../fetchmail_6.3.18-2.30.201303211640_amd64.deb) ...
Trigger für man-db werden verarbeitet ...
ca-certificates (20090814+nmu3.9.201109140808) wird eingerichtet ...
Updating certificates in /etc/ssl/certs... WARNING: Skipping duplicate certificate brasil.gov.br.pem
140 added, 0 removed; done.
Running hooks in /etc/ca-certificates/update.d....done.
fetchmail (6.3.18-2.30.201303211640) wird eingerichtet ...
Lege Systembenutzer »fetchmail« (UID 112) an ...
Lege neuen Benutzer »fetchmail« (UID 112) mit Gruppe »nogroup« an ...
Erstelle Home-Verzeichnis »/var/lib/fetchmail« ...
usermod: Keine Änderungen
/etc/fetchmailrc not found. ... failed!
can not start fetchmail daemon... consider disabling the script ... failed!
root@master521:~# echo $?
0
root@master521:~# dpkg -C audit
dpkg: --audit akzeptiert keine Argumente

Nutzen Sie dpkg --help für Hilfe zur Installation und Deinst. von Paketen [*];
Benutzen Sie »dselect« oder »aptitude« für benutzerfreundliches Paketmanagement;
Nutzen Sie dpkg -Dhelp für eine Liste von Debug-Flags von dpkg;
Nutzen Sie dpkg --force-help für eine Liste von Optionen zum Erzwingen;
Nutzen Sie dpkg-deb --help für Hilfe zum Manipulieren von *.deb-Dateien;

Optionen mit [*] geben viel aus - schicken Sie es durch »less« oder »more«!
root@master521:~# dpkg -C
root@master521:~# apt-get install --reinstall fetchmail
Paketlisten werden gelesen... Fertig
Abhängigkeitsbaum wird aufgebaut       
Statusinformationen werden eingelesen... Fertig
0 aktualisiert, 0 neu installiert, 1 erneut installiert, 0 zu entfernen und 2 nicht aktualisiert.
Es müssen noch 0 B von 912 kB an Archiven heruntergeladen werden.
Nach dieser Operation werden 0 B Plattenplatz zusätzlich benutzt.
(Lese Datenbank ... 57651 Dateien und Verzeichnisse sind derzeit installiert.)
Vorbereitung zum Ersetzen von fetchmail 6.3.18-2.30.201303211640 (durch .../fetchmail_6.3.18-2.30.201303211640_amd64.deb) ...
/etc/fetchmailrc not found. ... failed!
can not start fetchmail daemon... consider disabling the script ... failed!
dpkg: Warnung: Unterprozess altes pre-removal-Skript gab den Fehlerwert 6 zurück
dpkg - stattdessen wird Skript aus dem neuen Paket probiert ...
/etc/fetchmailrc not found. ... failed!
can not start fetchmail daemon... consider disabling the script ... failed!
dpkg: Fehler beim Bearbeiten von /var/cache/apt/archives/fetchmail_6.3.18-2.30.201303211640_amd64.deb (--unpack):
 Unterprozess neues pre-removal-Skript gab den Fehlerwert 6 zurück
configured to not write apport reports
                                      /etc/fetchmailrc not found. ... failed!
can not start fetchmail daemon... consider disabling the script ... failed!
Fehler traten auf beim Bearbeiten von:
 /var/cache/apt/archives/fetchmail_6.3.18-2.30.201303211640_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
root@master521:~#
Comment 1 Stefan Gohmann univentionstaff 2013-04-10 09:23:55 CEST
It should be announced as 3.1-1-errata and as fetchmail app update.

@Sönke, please copy the package to the OX app directory too.
Comment 2 Sönke Schwardt-Krummrich univentionstaff 2013-04-10 09:29:32 CEST
> @Sönke, please copy the package to the OX app directory too.

Note to self: the package has also to be copied/cherrypicked to the OX update repo UCS 3.0→3.1
Comment 3 Tim Petersen univentionstaff 2013-04-10 10:26:01 CEST
The problem is already rolled out witch fetchmail 6.3.18-2.25 (UCS 3.0-0)

"
root@master:~# dpkg -l *fetchmail*
Gewünscht=Unbekannt/Installieren/R=Entfernen/P=Vollständig Löschen/Halten
| Status=Nicht/Installiert/Config/U=Entpackt/halb konFiguriert/
         Halb installiert/Trigger erWartet/Trigger anhängig
|/ Fehler?=(kein)/R=Neuinstallation notwendig (Status, Fehler: GROSS=schlecht)
||/ Name                                       Version                                    Beschreibung
+++-==========================================-==========================================-====================================================================================================
ii  fetchmail                                  6.3.18-2.25.201104260645                   SSL enabled POP3, APOP, IMAP mail gatherer/forwarder
un  fetchmail-common                           <keine>                                    (keine Beschreibung vorhanden)
un  fetchmail-ssl                              <keine>                                    (keine Beschreibung vorhanden)
un  fetchmailconf                              <keine>                                    (keine Beschreibung vorhanden)
un  univention-fetchmail                       <keine>                                    (keine Beschreibung vorhanden)


root@master:~# apt-get install --reinstall fetchmail
Paketlisten werden gelesen... Fertig
Abhängigkeitsbaum wird aufgebaut       
Statusinformationen werden eingelesen... Fertig
Die folgenden Pakete wurden automatisch installiert und werden nicht mehr benötigt:
  x11-apps libdpkg-perl libts-0.0-0 libstdc++5 fakeroot lib32ncurses5 pkg-config libxxf86dga1 libkpathsea4 xbase-clients tetex-base python-json libmysqlclient15off x11-utils x11-xkb-utils
  g++-4.4 cramfsprogs libxxf86vm1 xterm libgl1-mesa-dri libgl1-mesa-glx libx86-1 libdns46 sysutils libevent1 univention-smbencrypt procinfo univention-management-console-themes
  tightvncserver libmpfr1ldbl g++ libdigest-md4-perl python2.4 php5-gd libisccc40 univention-dojo x11-session-utils libdirectfb-1.0-0 ia32-sun-java6-plugin libkrb53 tetex-bin libhesiod0
  libunivention-debug0 firefox xbitmaps liblwres40 libt1-5 xfonts-base expect x11-xfs-utils libpoppler3 x11-xserver-utils libbind9-40 libkrb5-25-heimdal
  univention-management-console-system-info libglib2.0-dev univention-security-update zlib1g-dev libxtrap6 xinit build-essential dpkg-dev python2.4-minimal libcrypt-smbhash-perl libfs6
  tcl8.4 tcl8.5 libmozjs1d ttf-dejavu libxxf86misc1 libisccfg40 libutempter0 memtester tsconf libpam-passwdcache libssl0.9.7 libdb4.2 grub univention-mail-postfix-forward patch
  libnss-passwdcache libisc45 libdbus-1-dev dbus-x11 libxv1 libdbus-glib-1-dev libhx509-3-heimdal dhcp3-common libxkbfile1 libltdl3 libgssapi2-heimdal libstdc++6-4.4-dev
Verwenden Sie »apt-get autoremove«, um sie zu entfernen.
0 aktualisiert, 0 neu installiert, 1 erneut installiert, 0 zu entfernen und 0 nicht aktualisiert.
Es müssen 912 kB an Archiven heruntergeladen werden.
Nach dieser Operation werden 0 B Plattenplatz zusätzlich benutzt.
WARNUNG: Die folgenden Pakete können nicht authentifiziert werden!
  fetchmail
Authentifizierungswarnung überstimmt.
Hole:1 http://updates.software-univention.de/3.0/maintained/ 3.0-0/amd64/ fetchmail 6.3.18-2.25.201104260645 [912 kB]
Es wurden 912 kB in 0 s geholt (1.500 kB/s)
(Lese Datenbank ... 86291 Dateien und Verzeichnisse sind derzeit installiert.)
Vorbereitung zum Ersetzen von fetchmail 6.3.18-2.25.201104260645 (durch .../fetchmail_6.3.18-2.25.201104260645_amd64.deb) ...
/etc/fetchmailrc not found. ... failed!
can not start fetchmail daemon... consider disabling the script ... failed!
dpkg: Warnung: Unterprozess altes pre-removal-Skript gab den Fehlerwert 6 zurück
dpkg - stattdessen wird Skript aus dem neuen Paket probiert ...
/etc/fetchmailrc not found. ... failed!
can not start fetchmail daemon... consider disabling the script ... failed!
dpkg: Fehler beim Bearbeiten von /var/cache/apt/archives/fetchmail_6.3.18-2.25.201104260645_amd64.deb (--unpack):
 Unterprozess neues pre-removal-Skript gab den Fehlerwert 6 zurück
configured to not write apport reports
                                      /etc/fetchmailrc not found. ... failed!
can not start fetchmail daemon... consider disabling the script ... failed!
Fehler traten auf beim Bearbeiten von:
 /var/cache/apt/archives/fetchmail_6.3.18-2.25.201104260645_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
root@master:~#
"
######################################

So perhaps the "new" package will not workaround the issue (which seems to be related to the pre-removal script)...
Comment 4 Erik Damrose univentionstaff 2013-04-10 10:59:07 CEST
The problem is a combination of the prerm script and the fetchmail initscript. Prerm tries to stop the fetchmail daemon by calling the initscript with 'stop'. 

The initscript however always checks if the fetchmailrc is available and exits with an errorcode, which causes the prerm script to fail (due to set -e). A workaround in UCS 3.0 (but not 3.1-1) should be ucr set fetchmail/enabled=no; That way the initscript will exit with 0 before checking if the fetchmailrc exists.
Comment 5 Erik Damrose univentionstaff 2013-04-10 11:00:41 CEST
(In reply to comment #4)
Clarification on workaround: ucr set fetchmail/enabled=no should be set before the update. But when one reads this it is probably already to late.
Comment 6 Tim Petersen univentionstaff 2013-04-10 11:11:55 CEST
(In reply to comment #5)
> (In reply to comment #4)
> Clarification on workaround: ucr set fetchmail/enabled=no should be set before
> the update. But when one reads this it is probably already to late.

http://forum.univention.de/viewtopic.php?f=48&t=2550&p=8736 :

"
Laut Bug: 

CODE: ALLES AUSWÄHLEN
ucr set fetchmail/enabled=no

ausgeführt

schon geht das update :)
"
Comment 7 Erik Damrose univentionstaff 2013-04-10 12:11:57 CEST
Fetchmail has been patched to stop fetchmail without errors in the prerm script. On updating fetchmail dpkg detects the broken prerm script and successfully tries the one from the updated package.

fetchmail 6.3.18-2.33.201304101148 build for scopes errata3.1-1 and fetchmail (app center)
2013-04-10-fetchmail.yaml

After QA: Announce new fetchmail app center version
Errata announce: please also announce this version for 3.1-0
Comment 8 Sönke Schwardt-Krummrich univentionstaff 2013-04-10 18:29:51 CEST
> fetchmail 6.3.18-2.33.201304101148 build for scopes errata3.1-1 and fetchmail
> (app center)
> 2013-04-10-fetchmail.yaml

* OK: patch integration into fetchmail
* OK: packages rebuild with patches in scopes errata3.1-1 and fetchmail
* OK: update test with and without fetchmail app
* OK: YAML file

> After QA: Announce new fetchmail app center version

This is not neccessary. The fixed fetchmail package of the errata scope is used if the fetchmail app will be installed.

Errata announce: please also announce this version for 3.1-0
Comment 9 Sönke Schwardt-Krummrich univentionstaff 2013-04-11 11:01:08 CEST
(In reply to comment #2)
> > @Sönke, please copy the package to the OX app directory too.

→ this is not necessary. The errata component is always used.

> Note to self: the package has also to be copied/cherrypicked to the OX update
> repo UCS 3.0→3.1

→ splitted off to Bug 31025

(In reply to comment #8)
> * OK: patch integration into fetchmail
> * OK: packages rebuild with patches in scopes errata3.1-1 and fetchmail
> * OK: update test with and without fetchmail app
> * OK: YAML file

→ VERIFIED

Errata announce: please announce this version for 3.1-0 and 3.1-1
Comment 10 Janek Walkenhorst univentionstaff 2013-04-12 15:04:50 CEST
http://errata.univention.de/3.1-errata85.html