ntp package does not remove appamor profile when being removed
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
openntpd (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
Description: Ubuntu 14.04.4 LTS
Release: 14.04
ntp:
Installed: (none)
Candidate: 1:4.2.6.
Version table:
1:
500 http://
100 /var/lib/
1:
500 http://
1:
500 http://
Steps to reproduce:
1. apt-get install apparmor
2. apt-get install ntpd
3. apt-get install openntpd
Results:
# aptitude install openntpd
The following partially installed packages will be configured:
openntpd
No packages will be installed, upgraded, or removed.
0 packages upgraded, 0 newly installed, 0 to remove and 8 not upgraded.
Need to get 0 B of archives. After unpacking 0 B will be used.
Setting up openntpd (20080406p-7) ...
Starting openntpd: /etc/openntpd/
invoke-rc.d: initscript openntpd, action "start" failed.
dpkg: error processing package openntpd (--configure):
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
openntpd
E: Sub-process /usr/bin/dpkg returned an error code (1)
A package failed to install. Trying to recover:
Setting up openntpd (20080406p-7) ...
Starting openntpd: /etc/openntpd/
invoke-rc.d: initscript openntpd, action "start" failed.
dpkg: error processing package openntpd (--configure):
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
openntpd
Details:
ntp leaves behind an apparmor profile that is specific to the ntpd binary. As a result no alternative ntp implementations can be installed on the system.
Solution:
The ntp package needs to remove the installed profile and restart apparmor.
Workaround:
It is possible to manually remove the profile, restart apparmor, and then continue with installation of other packages (as mentioned in bugs 458061 and others). However this solution is not compatible with configuration management systems, as it effectively requires you to exec out to a shell script to fix the installation.
Status changed to 'Confirmed' because the bug affects multiple users.