Skip to content

Commit

Permalink
Pass TZ=UTC to zip in rpmuncompress
Browse files Browse the repository at this point in the history
The ZIP format has no notion of time zone, so timestamps are only
meaningful if it is known what time zone they were created in. Pass UTC
to prevent time stamps to depend on local time zone setting and make
builds from sources in zip files (more) reproducible.

Tested manually with Fedora's xz-java-1.9.zip as mentioned in the issue.

Resolves: rpm-software-management#2955
  • Loading branch information
ffesti committed Jun 17, 2024
1 parent 8a721b6 commit 4a1308a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/rpmuncompress.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ struct archiveType_s {
{ COMPRESSED_NOT, 0, "%{__cat}" , "", "" },
{ COMPRESSED_OTHER, 0, "%{__gzip}", "-dc", "" },
{ COMPRESSED_BZIP2, 0, "%{__bzip2}", "-dc", "" },
{ COMPRESSED_ZIP, 1, "%{__unzip}", "", "-qq" },
{ COMPRESSED_ZIP, 1, "TZ=UTC %{__unzip}", "", "-qq" },
{ COMPRESSED_LZMA, 0, "%{__xz}", "-dc", "" },
{ COMPRESSED_XZ, 0, "%{__xz}", "-dc", "" },
{ COMPRESSED_LZIP, 0, "%{__lzip}", "-dc", "" },
Expand Down

0 comments on commit 4a1308a

Please sign in to comment.