apparmor 4.0.0~alpha2-0ubuntu3 ships same file as liblxc-common

Bug #2036302 reported by Heinrich Schuchardt
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
apparmor (Ubuntu)
Fix Released
Critical
Alex Murray
lxc (Ubuntu)
Fix Released
Critical
Unassigned

Bug Description

When running apt-get distupgrade I saw this message:

Preparing to unpack .../apparmor_4.0.0~alpha2-0ubuntu3_amd64.deb ...
Unpacking apparmor (4.0.0~alpha2-0ubuntu3) over (4.0.0~alpha2-0ubuntu2) ...
dpkg: error processing archive /var/cache/apt/archives/apparmor_4.0.0~alpha2-0ubuntu3_amd64.deb (--unpack):
 trying to overwrite '/etc/apparmor.d/usr.bin.lxc-start', which is also in package liblxc-common 1:5.0.1-0ubuntu6
dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)

The problem could be overcome with:

sudo apt-get install liblxc-common --reinstall

which resulted in output

Preparing to unpack .../liblxc-common_1%3a5.0.1-0ubuntu6_amd64.deb ...
Unpacking liblxc-common (1:5.0.1-0ubuntu6) over (1:5.0.1-0ubuntu6) ...

I have seen the same type of problem before with other packages.

I would have expected apt-get to correctly sequence all necessary actions on its own.

These are related events in my apt history:

Start-Date: 2022-10-30 05:33:09
Commandline: apt-get install lxc
Requested-By: ubuntu (1000)
Install:
liblxc-common:amd64 (1:5.0.0~git2209-g5a7b9ce67-0ubuntu3, automatic)

Start-Date: 2023-01-28 11:06:34
Commandline: apt-get dist-upgrade
Requested-By: ubuntu (1000)
Upgrade:
liblxc-common:amd64 (1:5.0.0~git2209-g5a7b9ce67-0ubuntu3, 1:5.0.1-0ubuntu6)

ProblemType: Bug
DistroRelease: Ubuntu 23.10
Package: apt 2.7.3
ProcVersionSignature: Ubuntu 6.5.0-5.5-generic 6.5.0
Uname: Linux 6.5.0-5-generic x86_64
NonfreeKernelModules: zfs
ApportVersion: 2.27.0-0ubuntu2
Architecture: amd64
CasperMD5CheckResult: pass
CurrentDesktop: KDE
Date: Sat Sep 16 11:12:36 2023
InstallationDate: Installed on 2021-07-01 (807 days ago)
InstallationMedia: Kubuntu 21.04 "Hirsute Hippo" - Release amd64 (20210420)
SourcePackage: apt
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Heinrich Schuchardt (xypron) wrote :
Revision history for this message
Heinrich Schuchardt (xypron) wrote :
Revision history for this message
Heinrich Schuchardt (xypron) wrote :
Revision history for this message
Julian Andres Klode (juliank) wrote :

Packages need to declare the appropriate Replaces and Breaks (or Conflicts if no later version of the package previously shipping the file exists)

affects: apt (Ubuntu) → apparmor (Ubuntu)
description: updated
Revision history for this message
Heinrich Schuchardt (xypron) wrote (last edit ):

Hello Julian,

liblxc-common_5.0.1-0ubuntu6_amd64.deb and apparmor_4.0.0~alpha2-0ubuntu3_amd64.deb actually both contain
/etc/apparmor.d/usr.bin.lxc-start

Why does apt not report this when I run

sudo apt-get install liblxc-common --reinstall

Instead it completes the configuration of all updates. Isn't there still an apt issue lurking here?

Regards

Heinrich

Jeremy Bícha (jbicha)
Changed in apparmor (Ubuntu):
importance: Undecided → Critical
Changed in lxc (Ubuntu):
importance: Undecided → Critical
summary: - Apt fails to upgrade when file ownership of packages changes
+ apparmor 4.0.0~alpha2-0ubuntu3 ships same file as liblxc-common
Changed in lxc (Ubuntu):
status: New → Triaged
Changed in apparmor (Ubuntu):
status: New → Triaged
assignee: nobody → Alex Murray (alexmurray)
Jeremy Bícha (jbicha)
tags: added: update-excuse
Revision history for this message
Alex Murray (alexmurray) wrote :

Apologies for this - I am working on an update now to resolve it.

Revision history for this message
Alex Murray (alexmurray) wrote :

Uploaded in apparmor 4.0.0~alpha2-0ubuntu4 - currently waiting to build etc - https://launchpad.net/ubuntu/mantic/+queue?queue_state=3&queue_text=apparmor

Changed in apparmor (Ubuntu):
status: Triaged → Fix Committed
Jeremy Bícha (jbicha)
Changed in lxc (Ubuntu):
status: Triaged → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package apparmor - 4.0.0~alpha2-0ubuntu4

---------------
apparmor (4.0.0~alpha2-0ubuntu4) mantic; urgency=medium

  * Remove conflicting profile for usr.bin.lxc-start (LP: #2036302)
    - d/p/u/userns-unconfined-profiles.patch: Don't ship a profile for
      usr.bin.lxc-start as this is already shipped in liblxc-common
    - debian/apparmor.install: Remove usr.bin.lxc-start profile

 -- Alex Murray <email address hidden> Mon, 18 Sep 2023 10:59:37 +0930

Changed in apparmor (Ubuntu):
status: Fix Committed → Fix Released
Benjamin Drung (bdrung)
tags: removed: foundations-todo
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.