Could not install / Could not start service

Bug #1542174 reported by Laurent Declercq
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
courier-authlib (Ubuntu)
New
Undecided
Unassigned

Bug Description

Latest version of the courier-authdaemon package as provided in Ubuntu Xenial repository cannot be installed due to the following bug:

The 'courier' user/group in the /usr/lib/tmpfiles.d/courier-authdaemon.conf file doesn't exists. It should be replaced by the 'daemon' user/group.

Once I've edited the file manually for changing the user/group and run apt-get install -f, the package was successfully installed.

INFO:

root@xenial:~# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu Xenial Xerus (development branch)
Release: 16.04
Codename: xenial

root@xenial:~# aptitude show courier-authdaemon
Paquet : courier-authdaemon
État: installé
Automatiquement installé: oui
Version : 0.66.4-2
Priorité : optionnel
Section : universe/mail
Responsable : Ubuntu Developers <email address hidden>
Architecture : amd64
Taille décompressée : 39,9 k
Dépend: courier-authlib (>= 0.66.4), lsb-base (>= 3.0-10)
Est en conflit: courier-authdaemon:i386
Description : Démon d'authentification pour Courier
 Ce paquet contient le démon d'authentification pour les applications Courier.
Site : http://www.courier-mta.org/

Revision history for this message
Laurent Declercq (l-declercq) wrote :

@ Ondřej Surý

Loving when you push changes without any test... You should be killed.

courier-authlib (0.66.4-2) unstable; urgency=medium

  * Convert the d/copyright into machine-readable file and add license for
    authldaplib.c
  * Use invoke-rc.d to restart authdaemon on mysql and postgresql fresh
    installation
  * Add courier-authdaemon systemd files (service and tmpfile)

 -- Ondřej Surý <email address hidden> Sat, 02 Jan 2016 17:29:17 +0100

Revision history for this message
Laurent Declercq (l-declercq) wrote :
Download full text (3.4 KiB)

More details:

#############################################################
root@xenial:/usr/local/src/imscp# LANG=C aptitude install courier-authdaemon
The following NEW packages will be installed:
  courier-authdaemon
0 packages upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/5756 B of archives. After unpacking 39.9 kB will be used.
Selecting previously unselected package courier-authdaemon.
(Reading database ... 101286 files and directories currently installed.)
Preparing to unpack .../courier-authdaemon_0.66.4-2_amd64.deb ...
Unpacking courier-authdaemon (0.66.4-2) ...
Processing triggers for systemd (228-5ubuntu3) ...
Processing triggers for ureadahead (0.100.0-19) ...
Setting up courier-authdaemon (0.66.4-2) ...
[/usr/lib/tmpfiles.d/courier-authdaemon.conf:2] Unknown user 'courier'.
Job for courier-authdaemon.service failed because the control process exited with error code. See "systemctl status courier-authdaemon.service" and "journalctl -xe" for details.
invoke-rc.d: initscript courier-authdaemon, action "start" failed.
dpkg: error processing package courier-authdaemon (--configure):
 subprocess installed post-installation script returned error exit status 1
Processing triggers for systemd (228-5ubuntu3) ...
Processing triggers for ureadahead (0.100.0-19) ...
Errors were encountered while processing:
 courier-authdaemon
E: Sub-process /usr/bin/dpkg returned an error code (1)
Failed to perform requested operation on package. Trying to recover:
Setting up courier-authdaemon (0.66.4-2) ...
[/usr/lib/tmpfiles.d/courier-authdaemon.conf:2] Unknown user 'courier'.
Job for courier-authdaemon.service failed because the control process exited with error code. See "systemctl status courier-authdaemon.service" and "journalctl -xe" for details.
invoke-rc.d: initscript courier-authdaemon, action "start" failed.
dpkg: error processing package courier-authdaemon (--configure):
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 courier-authdaemon
#############################################################

As you can see, installation failed. This is due to the wrong user/group put in the /usr/lib/tmpfiles.d/courier-authdaemon.conf:

#############################################################
root@xenial:/usr/local/src/imscp# cat /usr/lib/tmpfiles.d/courier-authdaemon.conf
#Type Path Mode UID GID Age Argument
    d /var/run/courier/authdaemon 0755 courier courier - -
#############################################################

Changing it to daemon user/group solve the problem:

#############################################################
root@xenial:/usr/local/src/imscp# nano /usr/lib/tmpfiles.d/courier-authdaemon.conf
root@xenial:/usr/local/src/imscp# cat /usr/lib/tmpfiles.d/courier-authdaemon.conf
#Type Path Mode UID GID Age Argument
    d /var/run/courier/authdaemon 0755 daemon daemon - -
root@xenial:/usr/local/src/imscp# apt-get install -f
Lecture des listes de paquets... Fait
Construction de l'arbre des dépendances
Lecture des informations d'état... Fait
0 mis à jour,...

Read more...

Revision history for this message
Laurent Declercq (l-declercq) wrote :

Seem fixed by:

courier-authlib (0.66.4-3) unstable; urgency=medium

  * Check and create courier user in authdaemon package in case
    courier-base is not installed first (LP#1542174)

 -- Ondřej Surý <email address hidden> Fri, 05 Feb 2016 09:58:26 +0100

But a question still remains there:

Why create the 'courier' user while the 'daemon' user has been used for years... Really strange.

Changed in courier-authlib (Ubuntu):
status: New → Fix Released
status: Fix Released → New
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.