[Reproducible-commits] [texlive-bin] 02/04: Modified function to produce timezone independent timestamps using UTC
Reiner Herrmann
reiner at reiner-h.de
Sun Oct 18 13:00:47 UTC 2015
This is an automated email from the git hooks/post-receive script.
deki-guest pushed a commit to branch pu/reproducible_builds
in repository texlive-bin.
commit a11c9674cc5292e07cc61e92db8d0e7af3adf2bd
Author: akira <marivalenm at gmail.com>
Date: Mon Aug 10 10:02:51 2015 +0200
Modified function to produce timezone independent timestamps using UTC
---
debian/changelog | 7 +++
.../Use-gmtime-to-produce-reproducible-output | 50 ++++++++++++++++++++++
debian/patches/series | 1 +
3 files changed, 58 insertions(+)
diff --git a/debian/changelog b/debian/changelog
index ff289b2..13aee06 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -10,6 +10,13 @@ texlive-bin (2015.20150524.37493-7) unstable; urgency=medium
-- Norbert Preining <preining at debian.org> Wed, 14 Oct 2015 12:50:25 +0900
+texlive-bin (2015.20150524.37493-5.1~reproducible2) unstable; urgency=medium
+
+ * Non-maintainer upload.
+ * Add patch Use-gmtime-to-produce-reproducible-output which modifies function makepdftime to produce timezone independent timestamps by using UTC
+
+ -- akira <marivalenm at gmail.com> Mon, 10 Aug 2015 09:51:23 +0200
+
texlive-bin (2015.20150524.37493-5.1~reproducible1) unstable; urgency=medium
* Non-maintainer upload.
diff --git a/debian/patches/Use-gmtime-to-produce-reproducible-output b/debian/patches/Use-gmtime-to-produce-reproducible-output
new file mode 100644
index 0000000..93a2df8
--- /dev/null
+++ b/debian/patches/Use-gmtime-to-produce-reproducible-output
@@ -0,0 +1,50 @@
+Description: Use gmtime instead of localtime to produce timezone independent output if SOURCE_DATE_EPOCH is set
+
+--- a/texk/web2c/lib/texmfmp.c
++++ b/texk/web2c/lib/texmfmp.c
+@@ -2876,7 +2876,7 @@ char start_time_str[TIME_STR_SIZE];
+ static char time_str[TIME_STR_SIZE];
+ /* minimum size for time_str is 24: "D:YYYYmmddHHMMSS+HH'MM'" */
+
+-static void makepdftime(time_t t, char *time_str)
++static void makepdftime(time_t t, char *time_str, int utc)
+ {
+
+ struct tm lt, gmt;
+@@ -2884,7 +2884,12 @@ static void makepdftime(time_t t, char *
+ int i, off, off_hours, off_mins;
+
+ /* get the time */
+- lt = *localtime(&t);
++ if (utc){
++ lt = *gmtime(&t);
++ }
++ else {
++ lt = *localtime(&t);
++ }
+ size = strftime(time_str, TIME_STR_SIZE, "D:%Y%m%d%H%M%S", <);
+ /* expected format: "YYYYmmddHHMMSS" */
+ if (size == 0) {
+@@ -2958,11 +2963,12 @@ void initstarttime(void)
+ uexit(EXIT_FAILURE);
+ }
+ start_time = epoch;
++ makepdftime(start_time, start_time_str, 1);
+ }
+ else {
+ start_time = time((time_t *) NULL);
++ makepdftime(start_time, start_time_str, 0);
+ }
+- makepdftime(start_time, start_time_str);
+ }
+ }
+
+@@ -3049,7 +3055,7 @@ void getfilemoddate(integer s)
+ if (stat(file_name, &file_data) == 0) {
+ size_t len;
+
+- makepdftime(file_data.st_mtime, time_str);
++ makepdftime(file_data.st_mtime, time_str, 0);
+ len = strlen(time_str);
+ if ((unsigned) (poolptr + len) >= (unsigned) (poolsize)) {
+ poolptr = poolsize;
diff --git a/debian/patches/series b/debian/patches/series
index baa4fef..8f554a0 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -11,6 +11,7 @@ mktexlsr-use-mktemp
dvihp-use-mktemp
remove-libdir-from-kpathsea-pkgconfig
honour-source-date-epoch
+Use-gmtime-to-produce-reproducible-output
# from here on upstream patches
upstream-svn37801-xobjcect-typo
upstream-svn38047-dvipdfmx-fix
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/texlive-bin.git
More information about the Reproducible-commits
mailing list