click package cannot be installed on desktop

Bug #1232128 reported by Alan Pope 🍺🐧🐱 🦄
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
click (Ubuntu)
Fix Released
Medium
Colin Watson

Bug Description

Installing this package on 13.10 desktop fails:-

http://people.canonical.com/~alan/click/fr.skimbo.skimbou_1.2_unknown.click

alan@deep-thought:~/Downloads$ sudo click install --user=$USER --force-missing-framework fr.skimbo.skimbou_1.2_unknown.click
Selecting previously unselected package fr.skimbo.skimbou.
(Reading database ... 0 files and directories currently installed.)
Unpacking fr.skimbo.skimbou (from fr.skimbo.skimbou_1.2_unknown.click) ...
dpkg: error processing fr.skimbo.skimbou_1.2_unknown.click (--install):
 unable to open '/opt/click.ubuntu.com/fr.skimbo.skimbou/1.2/.git/objects/4e/5e593ba4c1642b88374a6fd9d1f168df052937.dpkg-new': Permission denied
Errors were encountered while processing:
 fr.skimbo.skimbou_1.2_unknown.click
Traceback (most recent call last):
  File "/usr/bin/click", line 84, in <module>
    sys.exit(main())
  File "/usr/bin/click", line 79, in main
    mod.run(args)
  File "/usr/lib/python3/dist-packages/click/commands/install.py", line 51, in run
    package_path, user=options.user, all_users=options.all_users)
  File "/usr/lib/python3/dist-packages/click/install.py", line 292, in install
    env=env, **kwargs)
  File "/usr/lib/python3.3/subprocess.py", line 547, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['dpkg', '--force-not-root', '--force-bad-path', '--instdir', '/opt/click.ubuntu.com/fr.skimbo.skimbou/1.2', '--admindir', '/opt/click.ubuntu.com/fr.skimbo.skimbou/1.2/.click', '--path-exclude', '*/.click/*', '--log', '/opt/click.ubuntu.com/.click/log', '--no-triggers', '--install', 'fr.skimbo.skimbou_1.2_unknown.click']' returned non-zero exit status 1

ProblemType: Bug
DistroRelease: Ubuntu 13.10
Package: click 0.4.8
Uname: Linux 3.11.0-994-generic x86_64
ApportVersion: 2.12.4-0ubuntu1
Architecture: amd64
Date: Fri Sep 27 17:39:45 2013
EcryptfsInUse: Yes
InstallationDate: Installed on 2012-06-29 (454 days ago)
InstallationMedia: Ubuntu 12.04 LTS "Precise Pangolin" - Release amd64 (20120425)
MarkForUpload: True
SourcePackage: click
UpgradeStatus: Upgraded to saucy on 2013-07-12 (77 days ago)

Related branches

Revision history for this message
Alan Pope 🍺🐧🐱 🦄 (popey) wrote :
Revision history for this message
Colin Watson (cjwatson) wrote :

This is because:

 * the package was built with a version of click before 0.4.7, which didn't strip .git directories out of built packages
 * objects in .git directories are mode 0444
 * dpkg (called by click to unpack packages) opens files for writing twice, I think in order to provide sync hints to the kernel
 * in dpkg's normal use case this is fine because it's running as root which gets to override DAC permissions, but click drops privileges to run dpkg

The sanest answer is probably just to force the 0600 (owner-writeable) permission bit on unpacked files. The unpacked package is unwriteable from the package's point of view anyway, so it doesn't matter.

Revision history for this message
Colin Watson (cjwatson) wrote :

By which I mean 0200 (owner-writeable), of course.

Changed in click (Ubuntu):
status: New → Fix Committed
importance: Undecided → Medium
assignee: nobody → Colin Watson (cjwatson)
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package click - 0.4.9

---------------
click (0.4.9) saucy; urgency=low

  * Explicitly build-depend on pkg-config, since it's needed even if the
    PackageKit/GLib-related build-dependencies are removed for backporting.
  * Remove some stray documentation references to Ubuntu 13.04.
  * Ensure that the user's overlay database directory exists when
    unregistering a preinstalled package (LP: #1232066).
  * Support packages containing code for multiple architectures, and
    document the "architecture" manifest field (LP: #1214380, #1214864).
  * Correctly pass through return values of commands as the exit status of
    the "click" wrapper.
  * Extend "click info" to take a registered package name as an alternative
    to a path to a Click package file (LP: #1232118).
  * Force unpacked files to be owner-writeable (LP: #1232128).
 -- Colin Watson <email address hidden> Mon, 30 Sep 2013 15:24:49 +0100

Changed in click (Ubuntu):
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.