Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
Please login to access the resource
home:bmwiedemann:reproducible:distribution:ring1
zip
reproducible.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File reproducible.patch of Package zip
Author: Bernhard M. Wiedemann <bwiedemann suse de> Date: 2019-05-03 Override mtime with zip -X and SOURCE_DATE_EPOCH to allow for reproducible builds of .zip files See https://reproducible-builds.org/ for why this is good and https://reproducible-builds.org/specs/source-date-epoch/ for the definition of this variable. Index: zip30/zipup.c =================================================================== --- zip30.orig/zipup.c +++ zip30/zipup.c @@ -414,6 +414,7 @@ struct zlist far *z; /* zip entry to ush tempcext = 0; char *tempextra = NULL; char *tempcextra = NULL; + const char *source_date_epoch; #ifdef WINDLL @@ -674,6 +675,13 @@ struct zlist far *z; /* zip entry to } /* strcmp(z->name, "-") == 0 */ + if (extra_fields == 0 && (source_date_epoch = getenv("SOURCE_DATE_EPOCH")) != NULL) { + time_t epoch = strtoull(source_date_epoch, NULL, 10); + if (epoch > 0) { + ulg epochtim = unix2dostime(&epoch); + if (z->tim > epochtim) z->tim = epochtim; + } + } if (extra_fields == 2) { unsigned len; char *p;
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor