diff options
Diffstat (limited to 'Build/source')
-rw-r--r-- | Build/source/texk/web2c/ChangeLog | 4 | ||||
-rw-r--r-- | Build/source/texk/web2c/lib/ChangeLog | 9 | ||||
-rw-r--r-- | Build/source/texk/web2c/lib/texmfmp.c | 70 | ||||
-rw-r--r-- | Build/source/texk/web2c/man/pdftex.man | 72 | ||||
-rw-r--r-- | Build/source/texk/web2c/pdftexdir/NEWS | 10 | ||||
-rw-r--r-- | Build/source/texk/web2c/pdftexdir/README | 18 | ||||
-rw-r--r-- | Build/source/texk/web2c/texmfmp-help.h | 4 |
7 files changed, 115 insertions, 72 deletions
diff --git a/Build/source/texk/web2c/ChangeLog b/Build/source/texk/web2c/ChangeLog index af6fb41877c..594e37a1f91 100644 --- a/Build/source/texk/web2c/ChangeLog +++ b/Build/source/texk/web2c/ChangeLog @@ -1,3 +1,7 @@ +2016-05-04 Karl Berry <karl@freefriends.org> + + * texmfmp-help.h (PDFTEXHELP) [pdfTeX]: mention pdftex.org. + 2016-02-27 Akira Kakuto <kakuto@fuk.kindai.ac.jp> * help.h: Add an option -charcode-format in omfonts for compatibility. diff --git a/Build/source/texk/web2c/lib/ChangeLog b/Build/source/texk/web2c/lib/ChangeLog index 7a8ede7b015..8062c326881 100644 --- a/Build/source/texk/web2c/lib/ChangeLog +++ b/Build/source/texk/web2c/lib/ChangeLog @@ -1,3 +1,12 @@ +2016-05-04 Karl Berry <karl@freefriends.org> + + * texmfmp.c (init_start_time): new fn, factored out from + initstarttime. + (get_date_and_time): if envvar SOURCE_DATE_EPOCH_TEX_PRIMITIVES + is set, initialize minutes, day, month, year, from + SOURCE_DATE_EPOCH value. Requested by Debian, thread starting at + http://tug.org/pipermail/tex-k/2016-May/002691.html. + 2016-04-14 Akira Kakuto <kakuto@fuk.kinidai.ac.jp> * texmfmp.c: Fix a bug to show input file name in the case of pipe input. diff --git a/Build/source/texk/web2c/lib/texmfmp.c b/Build/source/texk/web2c/lib/texmfmp.c index a391445d0fa..c1ad63df96e 100644 --- a/Build/source/texk/web2c/lib/texmfmp.c +++ b/Build/source/texk/web2c/lib/texmfmp.c @@ -2200,6 +2200,30 @@ catch_interrupt (int arg) } #endif /* not WIN32 */ +static boolean start_time_set = false; +static time_t start_time = 0; + +void init_start_time() { + char *source_date_epoch; + unsigned long long epoch; + char *endptr; + if (!start_time_set) { + start_time_set = true; + source_date_epoch = getenv("SOURCE_DATE_EPOCH"); + if (source_date_epoch) { + errno = 0; + epoch = strtoull(source_date_epoch, &endptr, 10); + if (epoch < 0 || *endptr != '\0' || errno != 0) { +FATAL1 ("invalid epoch-seconds-timezone value for environment variable $SOURCE_DATE_EPOCH: %s", + source_date_epoch); + } + start_time = epoch; + } else { + start_time = time((time_t *) NULL); + } + } +} + /* Besides getting the date and time here, we also set up the interrupt handler, for no particularly good reason. It's just that since the `fix_date_and_time' routine is called early on (section 1337 in TeX, @@ -2210,8 +2234,24 @@ void get_date_and_time (integer *minutes, integer *day, integer *month, integer *year) { - time_t myclock = time ((time_t *) 0); - struct tm *tmptr = localtime (&myclock); + struct tm *tmptr; + string sde_texprim = getenv ("SOURCE_DATE_EPOCH_TEX_PRIMITIVES"); + if (sde_texprim && STREQ (sde_texprim, "1")) { + init_start_time (); + tmptr = gmtime (&start_time); + } else { + /* whether the envvar was not set (usual case) or invalid, + use current time. */ + time_t myclock = time ((time_t *) 0); + tmptr = localtime (&myclock); + + /* warn if they gave an invalid value, empty (null string) ok. */ + if (sde_texprim && strlen (sde_texprim) > 0 + && !STREQ (sde_texprim, "0")) { +WARNING1 ("invalid value (expected 0 or 1) for environment variable $SOURCE_DATE_EPOCH_TEX_PRIMITIVES: %s", + sde_texprim); + } + } *minutes = tmptr->tm_hour * 60 + tmptr->tm_min; *day = tmptr->tm_mday; @@ -2930,8 +2970,7 @@ void pdftex_fail(const char *fmt, ...) #endif /* not pdfTeX */ #if !defined(XeTeX) -static boolean start_time_set = false; -static time_t start_time = 0; + #define TIME_STR_SIZE 30 char start_time_str[TIME_STR_SIZE]; static char time_str[TIME_STR_SIZE]; @@ -2996,25 +3035,12 @@ static void makepdftime(time_t t, char *time_str, boolean utc) void initstarttime(void) { - char *source_date_epoch; - int64_t epoch; - char *endptr; if (!start_time_set) { - start_time_set = true; - source_date_epoch = getenv("SOURCE_DATE_EPOCH"); - if (source_date_epoch) { - errno = 0; - epoch = strtoll(source_date_epoch, &endptr, 10); - if (epoch < 0 || *endptr != '\0' || errno != 0) { - FATAL1 ("invalid value for environment variable $SOURCE_DATE_EPOCH: %s", - source_date_epoch); - } - start_time = epoch; - makepdftime(start_time, start_time_str, /* utc= */true); - } - else { - start_time = time((time_t *) NULL); - makepdftime(start_time, start_time_str, /* utc= */false); + init_start_time (); + if (getenv ("SOURCE_DATE_EPOCH")) { + makepdftime (start_time, start_time_str, /* utc= */true); + } else { + makepdftime (start_time, start_time_str, /* utc= */false); } } } diff --git a/Build/source/texk/web2c/man/pdftex.man b/Build/source/texk/web2c/man/pdftex.man index 507801dbeb2..d1b8ef5e2d6 100644 --- a/Build/source/texk/web2c/man/pdftex.man +++ b/Build/source/texk/web2c/man/pdftex.man @@ -1,4 +1,4 @@ -.TH PDFTEX 1 "16 June 2015" "Web2C @VERSION@" +.TH PDFTEX 1 "4 May 2016" "Web2C @VERSION@" .\"===================================================================== .if n .ds MF Metafont .if t .ds MF Metafont @@ -318,7 +318,7 @@ line can overrule this setting. Print version information and exit. .\"===================================================================== .SH ENVIRONMENT -See the Kpathsearch library documentation (the `Path specifications' +See the Kpathsea library documentation (e.g., the `Path specifications' node) for precise details of how the environment variables are used. The .B kpsewhich @@ -364,11 +364,6 @@ current directory and ``/home/user/tex'' to the standard search path. .B TEXFORMATS Search path for format files. .TP -.B TEXPOOL -search path for -.B pdftex -internal strings. -.TP .B TEXEDIT Command template for switching to editor. The default, usually .BR vi , @@ -378,6 +373,27 @@ is set when pdf\*(TX is compiled. Search path for font metric .RI ( .tfm ) files. +.TP +.B SOURCE_DATE_EPOCH +If set, its value, taken to be in epoch-seconds, will be used for the +timestamps in the PDF output, such as the CreationDate and ModDate keys. +This is useful for making reproducible builds. +.TP +.B SOURCE_DATE_EPOCH_TEX_PRIMITIVES +If set to the value "1", the time-related \*(TX primitives +.RI ( \eyear , +.IR \emonth , +.IR \eday , +.IR \etime ) +are also initialized from the value of SOURCE_DATE_EPOCH. This is not +recommended if there is any viable alternative. +.br +pdf\*(TX also has several primitives to support reproducible builds, +which are preferable to setting these environment variables; see the +main manual. +.PP +Many, many more environment variables may be consulted related to path +searching. See the Kpathsea manual. .\"===================================================================== .SH FILES The location of the files mentioned below varies from system to @@ -385,11 +401,8 @@ system. Use the .B kpsewhich utility to find their locations. .TP -.I pdftex.pool -Text file containing pdf\*(TX's internal strings. -.TP .I pdftex.map -Filename mapping definitions. +Font name mapping definitions. .TP .I *.tfm Metric files for pdf\*(TX's fonts. @@ -409,14 +422,6 @@ and the info manual .IR "Web2C: A TeX implementation" . .\"===================================================================== .SH BUGS -This version of pdf\*(TX implements a number of optional extensions. -In fact, many of these extensions conflict to a greater or lesser -extent with the definition of pdf\*(TX. When such extensions are -enabled, the banner printed when pdf\*(TX starts is changed to print -.B pdfTeXk -instead of -.BR pdfTeX . -.PP This version of pdf\*(TX fails to trap arithmetic overflow when dimensions are added or subtracted. Cases where this occurs are rare, but when it does the generated @@ -427,27 +432,19 @@ file would be usable is unknown. .\"===================================================================== .SH AVAILABILITY pdf\*(TX is available for a large variety of machine architectures -and operation systems. +and operating systems. pdf\*(TX is part of all major \*(TX distributions. -.P -Information on how to get pdf\*(TX and related information -is available at the -.B http://www.pdftex.org -.IR "pdf\*(TX" -web site. -.P -The following pdfe\*(TX related mailing list is available: -.BR pdftex@tug.org . -This is a mailman list; -to subscribe send a message containing -.I subscribe -to -.BR pdftex-request@tug.org . -A web interface and list archives can be found at the -.B "http://lists.tug.org/pdftex" -mailing list web site. +.br +The pdf\*(TX home page: http://www.pdftex.org. +.br +pdf\*(TX on CTAN: http://www.ctan.org/pkg/pdftex. +.br +pdf\*(TX mailing list for all discussion: http://lists.tug.org/pdftex. .\"===================================================================== .SH "SEE ALSO" +The full pdf\*(TX manual can be accessed from the home page or CTAN page. +Same for the Web2C, Kpathsea, and other manuals. +Some related programs: .BR epstopdf (1), .BR etex (1), .BR latex (1), @@ -455,7 +452,6 @@ mailing list web site. .BR mptopdf (1), .BR tex (1), .BR mf (1). -http://pdftex.org, http://tug.org/web2c. .\"===================================================================== .SH AUTHORS The primary authors of pdf\*(TX are Han The Thanh, Petr Sojka, diff --git a/Build/source/texk/web2c/pdftexdir/NEWS b/Build/source/texk/web2c/pdftexdir/NEWS index 7171ee730ef..bd682a8b045 100644 --- a/Build/source/texk/web2c/pdftexdir/NEWS +++ b/Build/source/texk/web2c/pdftexdir/NEWS @@ -1,9 +1,13 @@ pdfTeX 3.14159265-2.6-1.40.17 (TeX Live 2016) - changes: - - if environment variable SOURCE_DATE_EPOCH is set, use its value for - the CreationDate and ModDate values, and to seed the trailer /ID. + - if the environment variable SOURCE_DATE_EPOCH is set, use its value for + the PDF CreationDate and ModDate values, and to seed the trailer /ID. This by itself should suffice to create reproducible PDFs. The - other changes support more granular output tweaks along the same lines. + new primitives below support more granular output tweaks with the + same intent. + - if the environment variable SOURCE_DATE_EPOCH_TEX_PRIMITIVES is set + to 1, the \year, \day, and \time primitives are also initialized + from the SOURCE_DATE_EPOCH value, instead of the current time. - new primitive \pdfinfoomitdate to omit CreationDate and ModDate keys. - new primitive \pdftrailerid to set seed for the trailer /ID diff --git a/Build/source/texk/web2c/pdftexdir/README b/Build/source/texk/web2c/pdftexdir/README index 9b78615b002..785ab5b4595 100644 --- a/Build/source/texk/web2c/pdftexdir/README +++ b/Build/source/texk/web2c/pdftexdir/README @@ -2,14 +2,16 @@ pdfTeX is an extended version of eTeX that can create PDF directly from TeX source files and enhance the result of TeX typesetting with the help of PDF. When PDF output is not selected, pdfTeX produces normal DVI output, otherwise it produces PDF output that looks essentially -identical to the DVI output. An important aspect of this project was to -investigate alternative justification algorithms, resulting in the -margin kerning and font expansion "microtypgraphy" features, inspired by -Peter Karow. - -pdfTeX is based on the original e-TeX sources and Web2c, and has been -successfully compiled on many systems. It is actively maintained, but -stability is paramount now; only bug fixes and small enhancements are expected. +identical to the DVI output + +An important aspect of this project was to investigate alternative +justification algorithms, resulting in the "microtypography" features of +margin kerning and font expansion. This was inspired by Peter Karow's +and Hermann Zapf's work. + +pdfTeX is integrated with the original e-TeX sources and Web2c. It is +actively maintained, but stability is paramount now; only bug fixes and +small enhancements are expected. Releases are made through TeX Live. See the file NEWS for changes to the program. Documentation about pdfTeX can be found at http://www.pdftex.org. diff --git a/Build/source/texk/web2c/texmfmp-help.h b/Build/source/texk/web2c/texmfmp-help.h index 6a0dba4b676..b6a5f9ddee3 100644 --- a/Build/source/texk/web2c/texmfmp-help.h +++ b/Build/source/texk/web2c/texmfmp-help.h @@ -1,6 +1,6 @@ /* The help messages for TeX & MF family of programs. -Copyright 1995, 1996, 2008-2015 Karl Berry. +Copyright 1995, 1996, 2008-2016 Karl Berry. Copyright 2001-05 Olaf Weber. This program is free software; you can redistribute it and/or modify @@ -464,6 +464,8 @@ const_string PDFTEXHELP[] = { "-8bit make all characters printable by default", "-help display this help and exit", "-version output version information and exit", + "", + "pdfTeX home page: <http://pdftex.org>", NULL }; #endif /* pdfTeX */ |