Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Register
  • Sign in
  • S strip-nondeterminism
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 4
    • Issues 4
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Reproducible BuildsReproducible Builds
  • strip-nondeterminism
  • Issues
  • #4
Closed
Open
Issue created Mar 22, 2017 by Chris Lamb@lambyOwner

Does not normalise Unix ownership in .zip archives or .epub files

This bug was originally reported by Mike Swanson (mikeonthecomputer@gmail.com) in Debian bug #858431:

Zip archives may contain Unix metadata about its member files, including
ownership, mode, and so forth.

strip-nondeterminism fails to correct for ownership, allowing for
archives to be created and maintained with basically arbitrary and
unpredictable UIDs/GIDs, normally the UIDs/GIDs of the user the archive
is being created under.  Example run (starting out with an empty
directory):

chungy@turanga:sn$ fakeroot
root@turanga:sn# mkdir 1 2
root@turanga:sn# touch {1,2}/{root,user}
root@turanga:sn# chown 1000:1001 1/user && chown 1001:1002 2/user
root@turanga:sn# chmod 700 1/root 2/root
root@turanga:sn# zip -qj 1.zip 1/root 1/user && zip -qj 2.zip 2/user
2/root
root@turanga:sn# bsdtar -tvf 1.zip
-rwx------  0 0      0           0 Mar 22 03:44 root
-rw-r--r--  0 1000   1001        0 Mar 22 03:44 user
root@turanga:sn# bsdtar -tvf 2.zip
-rw-r--r--  0 1001   1002        0 Mar 22 03:44 user
-rwx------  0 0      0           0 Mar 22 03:44 root
root@turanga:sn# strip-nondeterminism ?.zip
root@turanga:sn# bsdtar -tvf 1.zip
-rwxr-xr-x  0 0      0           0 Mar 22 03:44 root
-rw-r--r--  0 1000   1001        0 Mar 22 03:44 user
root@turanga:sn# bsdtar -tvf 2.zip
-rwxr-xr-x  0 0      0           0 Mar 22 03:44 root
-rw-r--r--  0 1001   1002        0 Mar 22 03:44 user

What I expect to see, and believe should happen, is all UIDs and GIDs in
the zip archive become 0, owned by root.
Edited Apr 24, 2019 by Chris Lamb
Assignee
Assign to
Time tracking