package apparmor 2.12-4ubuntu5.3 failed to install/upgrade: new apparmor package pre-installation script subprocess returned error exit status 1
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
apparmor (Ubuntu) |
Fix Released
|
Critical
|
Georgia Garcia | ||
Focal |
In Progress
|
Critical
|
Georgia Garcia |
Bug Description
[ Impact ]
* During an apparmor package upgrade, the cache files were
deleted, but there could also be directories under
/etc/
not account for. The upgrade would then fail with the
following error message because it would not be able to remove
the directories:
package:
Preparing to unpack .../16-
rm: cannot remove '/etc/apparmor.
dpkg: error processing archive /tmp/apt-
new apparmor package pre-installation script subprocess returned error exit status 1
ErrorMessage: new apparmor package pre-installation script subprocess returned error exit status 1
[ Test Plan ]
* On a bionic machine, create a directory under
/etc/apparmor.
sudo mkdir /etc/apparmor.
* To simulate a system upgrade to focal, you can run the following steps
1. Add the focal archive
sudo bash -c "cat <<EOF >/etc/apt/
deb http://
EOF"
2. Set up preferences so not all packages are upgraded from focal
sudo bash -c "cat <<EOF >/etc/apt/
Package: *
Pin: release a=focal
Pin-Priority: 400
EOF"
3. Install only apparmor from focal
sudo apt-get install apparmor/focal
4. Notice that the error occurs:
The following packages will be upgraded:
apparmor
1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/494 kB of archives.
After this operation, 99.3 kB of additional disk space will be used.
Preconfiguring packages ...
(Reading database ... 220084 files and directories currently installed.)
Preparing to unpack .../apparmor_
rm: cannot remove '/etc/apparmor.
dpkg: error processing archive /var/cache/
new apparmor package pre-installation script subprocess returned error exit status 1
Errors were encountered while processing:
/var/cache/
E: Sub-process /usr/bin/dpkg returned an error code (1)
[ Where problems could occur ]
* Since the cache files are being removed, they will have to be
recreated next time apparmor runs.
-------
Original bug description
-------
package install error
ProblemType: Package
DistroRelease: Ubuntu 20.04
Package: apparmor 2.12-4ubuntu5.3
ProcVersionSign
Uname: Linux 4.15.0-213-generic x86_64
ApportVersion: 2.20.11-
Architecture: amd64
CasperMD5CheckR
Date: Thu Aug 24 02:35:35 2023
DuplicateSignature:
package:
Preparing to unpack .../16-
rm: cannot remove '/etc/apparmor.
dpkg: error processing archive /tmp/apt-
new apparmor package pre-installation script subprocess returned error exit status 1
ErrorMessage: new apparmor package pre-installation script subprocess returned error exit status 1
InstallationDate: Installed on 2023-08-22 (1 days ago)
InstallationMedia: Ubuntu 14.04.5 LTS "Trusty Tahr" - Release amd64 (20160803)
ProcKernelCmdline: BOOT_IMAGE=
Python3Details: /usr/bin/python3.8, Python 3.8.10, python3-minimal, 3.8.2-0ubuntu2
PythonDetails: N/A
RelatedPackageV
dpkg 1.19.7ubuntu3.2
apt 2.0.9
SourcePackage: apparmor
Syslog:
Aug 24 02:04:25 adminn-
Aug 24 02:05:26 adminn-
Aug 24 02:05:31 adminn-
Aug 24 02:06:04 adminn-
Aug 24 03:39:11 adminn-
Title: package apparmor 2.12-4ubuntu5.3 failed to install/upgrade: new apparmor package pre-installation script subprocess returned error exit status 1
UpgradeStatus: No upgrade log present (probably fresh install)
information type: | Private Security → Public |
tags: | removed: need-duplicate-check |
Changed in apparmor (Ubuntu): | |
status: | Confirmed → In Progress |
Changed in apparmor (Ubuntu): | |
importance: | Undecided → Critical |
Status changed to 'Confirmed' because the bug affects multiple users.