pkgstripfiles doesn't preserve permissions of png files

Bug #817792 reported by Felix Geyer
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
pkgbinarymangler (Ubuntu)
Fix Released
High
Martin Pitt

Bug Description

pkgstripfiles runs advpng which doesn't preserve file permissions.

For example in https://launchpadlibrarian.net/76159822/buildlog_ubuntu-oneiric-i386.ksnapshot_4%3A4.7.0-0ubuntu1_BUILDING.txt.gz

-rw-r--r-- root/root 91025 2011-05-20 20:36 ./usr/share/doc/kde/HTML/en/ksnapshot/window.png
-rw-rw-r-- root/root 34949 2011-07-28 14:34 ./usr/share/doc/kde/HTML/en/ksnapshot/send-to-menu.png

send-to-menu.png has wrong permissions because advpng was able to optimize it.

Revision history for this message
Lionel Le Folgoc (mrpouit) wrote :

I can confirm that, it's 100% reproducible on my oneiric chroots here.

It's not a problem when umask is 022, but with the new default umask (002), the permissions are messed up (664 instead of 644). And since this optimization takes place "inside" dpkg-deb, dh_fixperms has already run...

Changed in pkgbinarymangler (Ubuntu):
status: New → Confirmed
Revision history for this message
Lionel Le Folgoc (mrpouit) wrote :

For example, abiword built yesterday (<https://launchpadlibrarian.net/77469802/buildlog_ubuntu-oneiric-amd64.abiword_2.8.6-0.3ubuntu1_BUILDING.txt.gz>) has one png with broken permissions:

-rw-rw-r-- root/root 3515 2011-08-17 19:36 ./usr/share/pixmaps/abiword_48.png

Revision history for this message
Lionel Le Folgoc (mrpouit) wrote :

I added a quick'n'dirty'n'incomplete test to pkgbinarymangler to compare modes (cf attachment), and it fails for me in my oneiric chroot:
======================================================================
FAIL: test_png_permissions (__main__.T)
Ensure that the file attributes are preserved
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test/run", line 721, in test_png_permissions
    self.assertEqual(statinfo_orig.st_mode, statinfo_ship.st_mode)
AssertionError: 33188 != 33204

----------------------------------------------------------------------

Martin Pitt (pitti)
Changed in pkgbinarymangler (Ubuntu):
status: Confirmed → In Progress
importance: Undecided → High
assignee: nobody → Martin Pitt (pitti)
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package pkgbinarymangler - 102

---------------
pkgbinarymangler (102) oneiric; urgency=low

  * test/icecream/debian/rules, test/icecream/Makefile: Install PNGs with some
    defined permissions.
  * test/run, check_deb_integrity(): Verify that PNG permissions in the final
    debs are as they are expected to be.
  * pkgstripfiles: Restore permissions of optimized PNG files to their
    original value; advpng does not preserve them. (LP: #817792)
 -- Martin Pitt <email address hidden> Sun, 21 Aug 2011 21:13:59 +0200

Changed in pkgbinarymangler (Ubuntu):
status: In Progress → 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.