Failure trying to purge policycoreutils

Bug #1005398 reported by bpedman
24
This bug affects 3 people
Affects Status Importance Assigned to Milestone
policycoreutils (Debian)
Fix Released
Unknown
policycoreutils (Ubuntu)
Fix Released
Undecided
Unassigned
Precise
Fix Released
Undecided
Unassigned

Bug Description

[Precise SRU Justification]
policycoreutils fails to purge with the following error:

Purging configuration files for policycoreutils ...
update-rc.d: /etc/init.d/policycoreutils: file does not exist
dpkg: error processing policycoreutils (--purge):
 subprocess installed post-removal script returned error exit status 1

Fixing this bug is blocked on Bug #935368, since otherwise the package will not rebuild in precise, so the debdiff includes a fix.

[Fix]
Update debian/policycoreutils.postrm to use update-rc.d remove in the purge section instead of update-rc.d defaults.

For Bug #935368, _GNU_SOURCE needed to be defined earlier in sandbox/seunshare.c and the path to libsetpol.a had to be updated to the current multiarch path. Both fixes adapted from the version in quantal.

[Regression Potential]
The regression potential should be minor since the only source file touched, sandbox/seunshare.c, only has #define _GNU_SOURCE moved from before #include <sched.h> (which: man 2 unshare; suggests is all that is necessary, apparently not) a couple lines up to the beginning of the file.

[Test Case]
Install policycoreutils and then run: sudo apt-get purge policycoreutils;

For Bug #935368 attempt to rebuild the policycoreutils 2.1.0-3ubuntu1 in precise.
===============================================================================

I tested out selinux because I was going to run a somewhat untrusted piece of code (which I ended up running elsewhere anyway), so I decided to purge selinux and all the packages that came with it. When it tried to purge policycoreutils it failed

ProblemType: Package
DistroRelease: Ubuntu 12.04
Package: policycoreutils (not installed)
ProcVersionSignature: Ubuntu 3.2.0-24.39-generic 3.2.16
Uname: Linux 3.2.0-24-generic x86_64
NonfreeKernelModules: nvidia
ApportVersion: 2.0.1-0ubuntu7
Architecture: amd64
Date: Sun May 27 17:42:56 2012
ErrorMessage: subprocess installed post-removal script returned error exit status 1
InstallationMedia: Ubuntu 12.04 LTS "Precise Pangolin" - Release amd64 (20120425)
SourcePackage: policycoreutils
Title: package policycoreutils (not installed) failed to install/upgrade: subprocess installed post-removal script returned error exit status 1
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
bpedman (bpedman) wrote :
Revision history for this message
Jason Conti (jconti) wrote :

Related debian bug report: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=660345

Seems like 2.1.10-5 contains a fix, although the fix is to completely rewrite the maintainer scripts, so not exactly something easy to add to the precise package.

Though, looking at debian/policycoreutils.postrm, the purge section has:

update-rc.d policycoreutils defaults >/dev/null

plus three other similar lines. That should be:

update-rc.d policycoreutils remove >/dev/null

right? The change seems to fix it here on purge. I can update the package if that is the right sort of thing to do to fix it.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in policycoreutils (Ubuntu):
status: New → Confirmed
Changed in policycoreutils (Debian):
status: Unknown → New
Revision history for this message
Jason Conti (jconti) wrote :

Actually, even if the above fix is sufficient, we are still blocked on https://bugs.launchpad.net/ubuntu/+source/policycoreutils/+bug/935368 (the package doesn't build on precise anymore)

I'm attaching a debdiff which fixes the FTBFS and includes the changes above, but I'm not really sure how to deal with changes outside of debian/ when the package doesn't use quilt, so someone else will need to take a look at it. (And we seem to be missing a dep on libcap-ng0, not sure why the ${shlibs:Depends} isn't grabbing it)

Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "policycoreutils_fix_purge_and_ftbfs.debdiff" of this bug report has been identified as being a patch in the form of a debdiff. The ubuntu-sponsors team has been subscribed to the bug report so that they can review and hopefully sponsor the debdiff. In the event that this is in fact not a patch you can resolve this situation by removing the tag 'patch' from the bug report and editing the attachment so that it is not flagged as a patch. Additionally, if you are member of the ubuntu-sponsors team please also unsubscribe the team from this bug report.

[This is an automated message performed by a Launchpad user owned by Brian Murray. Please contact him regarding any issues with the action taken in this bug report.]

tags: added: patch
Revision history for this message
Daniel Holbach (dholbach) wrote :

Fixed in quantal with bug 1004480.

Changed in policycoreutils (Ubuntu):
status: Confirmed → Fix Released
Changed in policycoreutils (Debian):
status: New → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in policycoreutils (Ubuntu Precise):
status: New → Confirmed
Revision history for this message
Stefano Rivera (stefanor) wrote :

This should probably be versioned 2.1.0-3ubuntu1.1 and be targetted at precise-proposed.

The bug description needs SRU related information added. See
https://wiki.ubuntu.com/StableReleaseUpdates#Procedure

Revision history for this message
Jason Conti (jconti) wrote :

Attaching updated debdiff.

Jason Conti (jconti)
description: updated
Revision history for this message
Andrew Starr-Bochicchio (andrewsomething) wrote :

I can confirm that the above patch allows this to both build and be purged cleanly on precise.

Uploaded to precise-proposed. Now an archive admin will have to approve it.

Thanks for your work on this!

Revision history for this message
Brian Murray (brian-murray) wrote : Please test proposed package

Hello bpedman, or anyone else affected,

Accepted policycoreutils into precise-proposed. The package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

Changed in policycoreutils (Ubuntu Precise):
status: Confirmed → Fix Committed
tags: added: verification-needed
Revision history for this message
Stéphane Graber (stgraber) wrote :

package removes cleanly.

tags: added: verification-done
removed: verification-needed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package policycoreutils - 2.1.0-3ubuntu1.1

---------------
policycoreutils (2.1.0-3ubuntu1.1) precise-proposed; urgency=low

  * Fix FTBFS in precise: (LP: #935368)
    - Define _GNU_SOURCE earlier in seunshare.c
    - Update to multiarch path of libsepol.a
  * debian/policycoreutils.postrm:
    - Remove the rc.d links on purge (LP: #1005398)
 -- Jason Conti <email address hidden> Mon, 04 Jun 2012 12:09:07 -0400

Changed in policycoreutils (Ubuntu Precise):
status: Fix Committed → Fix Released
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.