package policykit 0.9-1ubuntu2 failed to install/upgrade:

Bug #275355 reported by bhaskar
18
This bug affects 1 person
Affects Status Importance Assigned to Milestone
policykit (Ubuntu)
Fix Released
High
Unassigned
Nominated for Intrepid by James Westby

Bug Description

Binary package hint: policykit

Upgraded, rebooted and logged in

ProblemType: Package
Architecture: i386
DistroRelease: Ubuntu 8.10
ErrorMessage:
 ErrorMessage: subprocess post-installation script returned error exit status 1
NonfreeKernelModules: nvidia
Package: policykit 0.9-1ubuntu2
SourcePackage: policykit
Title: package policykit 0.9-1ubuntu2 failed to install/upgrade:
Uname: Linux 2.6.27-4-generic i686

Related branches

Revision history for this message
bhaskar (bhaskar) wrote :
Revision history for this message
James Westby (james-w) wrote :

Setting up policykit (0.9-1ubuntu2) ...

chown: cannot access `/var/run/PolicyKit': No such file or directory

dpkg: error processing policykit (--configure):

 subprocess post-installation script returned error exit status 1

Revision history for this message
James Westby (james-w) wrote :

See bug 193533 for apparently the same problem.

Thanks,

James

James Westby (james-w)
Changed in policykit:
importance: Undecided → High
status: New → Confirmed
Revision history for this message
Chris Coulson (chrisccoulson) wrote :

The postinst script will fail if it is executed before Policykit was ever started, because /var/run/PolicyKit won't exist yet, as /var/run is on a tmpfs (I think, anyway. I've only had a chance to have a quick look at it because I'm at work at the minute).

I'm confused why the postinst script needs to set ownership of a folder that resides on a volatile filesystem anyway. This is handled by the init script when it creates the folder at boot time (and the two aren't consistent anyway - for example, the postinst script tries to set ownership on /var/run/PolicyKit to root:polkituser, then the init script sets it to polkituser:polkituser).

I think the postinst script should just start /etc/init.d/policykit and let the init script create and set the ownership of /var/run/PolicyKit.

Revision history for this message
James Westby (james-w) wrote :

Hi,

Here is a proposed patch which should fix this, based on the resolution to
bug 193533.

Thanks,

James

Revision history for this message
James Westby (james-w) wrote :
Revision history for this message
Steve Langasek (vorlon) wrote :

I'm not sure how this error condition would ever be hit, since I see that policykit ships the /var/run/PolicyKit directory within the package.

But that in itself is a bug, so I'm sponsoring this fix with the one added change to drop /var/run/PolicyKit from the package. Amended changelog:

policykit (0.9-1ubuntu3) intrepid; urgency=low

  [ James Westby ]
  * Don't chown /var/run/PolicyKit in the postinst, as /var/run is on a tmpfs,
    and it should be the job of the init script to do this. (LP: #275355)
  * Use root:polkituser for /var/run/PolicyKit in the init script, as this
    is what the postinst uses. Thanks to Chris Coulson for spotting this.

  [ Steve Langasek ]
  * Don't ship /var/run/PolicyKit in the package either, since the init
    script should always handle it per the above.

 -- Steve Langasek <email address hidden> Wed, 08 Oct 2008 06:42:17 +0000

Thanks for your contribution to Ubuntu!

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

This bug was fixed in the package policykit - 0.9-1ubuntu3

---------------
policykit (0.9-1ubuntu3) intrepid; urgency=low

  [ James Westby ]
  * Don't chown /var/run/PolicyKit in the postinst, as /var/run is on a tmpfs,
    and it should be the job of the init script to do this. (LP: #275355)
  * Use root:polkituser for /var/run/PolicyKit in the init script, as this
    is what the postinst uses. Thanks to Chris Coulson for spotting this.

  [ Steve Langasek ]
  * Don't ship /var/run/PolicyKit in the package either, since the init
    script should always handle it per the above.

 -- Steve Langasek <email address hidden> Wed, 08 Oct 2008 06:42:17 +0000

Changed in policykit:
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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