[texlive-bin] 05/07: Imported Upstream version 2016.20160511.41021
This is an automated email from the git hooks/post-receive script.
preining pushed a commit to branch experimental
in repository texlive-bin.
commit 27779d16fc10971ebf742d88577cf2f4759d70cb
Author: Norbert Preining <preining@debian.org>
Date: Wed May 11 20:49:35 2016 +0900
Imported Upstream version 2016.20160511.41021
---
README | 6 +-
build-aux/texinfo.tex | 56 +++--
texk/dvipdfm-x/ChangeLog | 13 ++
texk/dvipdfm-x/Makefile.am | 2 +
texk/dvipdfm-x/Makefile.in | 21 +-
texk/dvipdfm-x/dvi.c | 13 +-
texk/dvipdfm-x/dvipdfmx.c | 37 ++++
texk/dvipdfm-x/dvipdfmx.h | 1 +
texk/dvipdfm-x/pdffont.c | 7 +-
texk/dvipdfm-x/spc_dvipdfmx.c | 104 +++++++++
texk/dvipdfm-x/{dvipdfmx.h => spc_dvipdfmx.h} | 25 +--
texk/dvipdfm-x/specials.c | 10 +
texk/dvipsk/ChangeLog | 2 +-
texk/texlive/linked_scripts/Makefile.am | 2 +
texk/texlive/linked_scripts/Makefile.in | 2 +
texk/texlive/linked_scripts/epspdf/epspdf.tlu | 283 +++++++++---------------
texk/texlive/linked_scripts/epspdf/epspdftk.tcl | 13 +-
texk/texlive/linked_scripts/m-tx/m-tx.lua | 5 +
texk/texlive/linked_scripts/pmx/pmx2pdf.lua | 5 +
texk/texlive/linked_scripts/texlive/tlmgr.pl | 243 ++++++++++++++++----
texk/web2c/lib/ChangeLog | 5 +
texk/web2c/lib/texmfmp.c | 4 +
utils/devnag/ChangeLog | 11 +
23 files changed, 596 insertions(+), 274 deletions(-)
diff --git a/README b/README
index 445b6a5..da09bb7 100644
--- a/README
+++ b/README
@@ -34,12 +34,16 @@ amd64-netbsd:
NetBSD/amd64 6.1.3
TL_MAKE=gmake LDFLAGS='-L/usr/X11R7/lib -Wl,-rpath,/usr/X11R7/lib' ./Build
+i386-openbsd, amd64-openbsd:
+ e.g., see CONFIGURE_ARGS in the Makefile in
+ http://cvsweb.openbsd.org/cgi-bin/cvsweb/ports/print/texlive/base/
+
i386-solaris, x86_64-solaris: Solaris 10. See doc/README.solaris.
i386-cygwin, x86_64-cygwin: gcc-4.8.2, cygwin-1.7.29.
./Build (with --enable-xindy for i386).
-powerpc-linux (Debian Squeeze)
+powerpc-linux (Debian Squeeze):
Linux homer 2.6.32-5-powerpc64 #1 SMP Tue Mar 8 02:01:42 UTC 2011
ppc64 Debian GNU/Linux 6.0
(only the kernel is 64bit, the entire userland is 32bit)
diff --git a/build-aux/texinfo.tex b/build-aux/texinfo.tex
index 37e2de8..314063c 100644
--- a/build-aux/texinfo.tex
+++ b/build-aux/texinfo.tex
@@ -3,7 +3,7 @@
% Load plain if necessary, i.e., if running under initex.
\expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi
%
-\def\texinfoversion{2016-04-14.07}
+\def\texinfoversion{2016-05-07.20}
%
% Copyright 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995,
% 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
@@ -67,6 +67,10 @@
\everyjob{\message{[Texinfo version \texinfoversion]}%
\catcode`+=\active \catcode`\_=\active}
+% LaTeX's \typeout. This ensures that the messages it is used for
+% are identical in format to the corresponding ones from latex/pdflatex.
+\def\typeout{\immediate\write17}%
+
\chardef\other=12
% We never want plain's \outer definition of \+ in Texinfo.
@@ -1534,7 +1538,6 @@ output) for that.)}
%
% PDF outline support
%
- \pdfmakepagedesttrue \relax
% Emulate the primitive of pdfTeX
\def\pdfdest name#1 xyz{%
\special{pdf:dest (name#1) [@thispage /XYZ @xpos @ypos]}%
@@ -3270,8 +3273,8 @@ end
% @{ @} @lbracechar{} @rbracechar{} all generate brace characters.
% Unless we're in typewriter, use \ecfont because the CM text fonts do
% not have braces, and we don't want to switch into math.
-\def\mylbrace{{\ifmonospace\else\ecfont\fi \char123}}
-\def\myrbrace{{\ifmonospace\else\ecfont\fi \char125}}
+\def\mylbrace{{\ifmonospace\char123\else\ensuremath\lbrace\fi}}
+\def\myrbrace{{\ifmonospace\char125\else\ensuremath\rbrace\fi}}
\let\{=\mylbrace \let\lbracechar=\{
\let\}=\myrbrace \let\rbracechar=\}
\begingroup
@@ -4753,7 +4756,7 @@ end
\def\docodeindex#1{\edef\indexname{#1}\parsearg\docodeindexxxx}
\def\docodeindexxxx #1{\doind{\indexname}{\code{#1}}}
-% Used when writing an index entry out to an index file, to prevent
+% Used when writing an index entry out to an index file to prevent
% expansion of Texinfo commands that can appear in an index entry.
%
\def\indexdummies{%
@@ -4889,12 +4892,9 @@ end
%
% We want to disable all macros so that they are not expanded by \write.
\macrolist
+ \definedummyword\value
%
\normalturnoffactive
- %
- % Handle some cases of @value -- where it does not contain any
- % (non-fully-expandable) commands.
- \makevalueexpandable
}
% \commondummiesnofonts: common to \commondummies and \indexnofonts.
@@ -5159,9 +5159,10 @@ end
\ifx\suffix\indexisfl\def\suffix{f1}\fi
% Open the file
\immediate\openout\csname#1indfile\endcsname \jobname.\suffix
- % Using \immediate here prevents an object entering into the current box,
- % which could confound checks such as those in \safewhatsit for preceding
- % skips.
+ % Using \immediate above here prevents an object entering into the current
+ % box, which could confound checks such as those in \safewhatsit for
+ % preceding skips.
+ \typeout{Writing index file \jobname.\suffix}%
\fi}
\def\indexisfl{fl}
@@ -5369,6 +5370,7 @@ end
% index. The easiest way to prevent this problem is to make sure
% there is some text.
\putwordIndexNonexistent
+ \typeout{No file \jobname.\indexname s.}%
\else
\catcode`\\ = 0
%
@@ -6682,7 +6684,14 @@ end
% 1 and 2 (the page numbers aren't printed), and so are the first
% two pages of the document. Thus, we'd have two destinations named
% `1', and two named `2'.
- \ifpdf \global\pdfmakepagedesttrue \fi
+ \ifpdf
+ \global\pdfmakepagedesttrue
+ \else
+ \ifx\XeTeXrevision\thisisundefined
+ \else
+ \global\pdfmakepagedesttrue
+ \fi
+ \fi
}
@@ -8862,6 +8871,7 @@ end
% include an _ in the xref name, etc.
\indexnofonts
\turnoffactive
+ \def\value##1{##1}%
\expandafter\global\expandafter\let\expandafter\Xthisreftitle
\csname XR#1-title\endcsname
}%
@@ -9002,14 +9012,14 @@ end
\fi\fi\fi
}
-% Define \refx{NAME}{SUFFIX} to reference a cross-reference string named NAME.
-% If its value is nonempty, SUFFIX is output afterward.
-%
+% \refx{NAME}{SUFFIX} - reference a cross-reference string named NAME. SUFFIX
+% is output afterwards if non-empty.
\def\refx#1#2{%
\requireauxfile
{%
\indexnofonts
\otherbackslash
+ \def\value##1{##1}%
\expandafter\global\expandafter\let\expandafter\thisrefX
\csname XR#1\endcsname
}%
@@ -9034,16 +9044,18 @@ end
#2% Output the suffix in any case.
}
-% This is the macro invoked by entries in the aux file. Usually it's
-% just a \def (we prepend XR to the control sequence name to avoid
-% collisions). But if this is a float type, we have more work to do.
+% This is the macro invoked by entries in the aux file. Define a control
+% sequence for a cross-reference target (we prepend XR to the control sequence
+% name to avoid collisions). The value is the page number. If this is a float
+% type, we have more work to do.
%
\def\xrdef#1#2{%
- {% The node name might contain 8-bit characters, which in our current
- % implementation are changed to commands like @'e. Don't let these
- % mess up the control sequence name.
+ {% Expand the node or anchor name to remove control sequences.
+ % \turnoffactive stops 8-bit characters being changed to commands
+ % like @'e. \refx does the same to retrieve the value in the definition.
\indexnofonts
\turnoffactive
+ \def\value##1{##1}%
\xdef\safexrefname{#1}%
}%
%
diff --git a/texk/dvipdfm-x/ChangeLog b/texk/dvipdfm-x/ChangeLog
index ab7dc97..d6af530 100644
--- a/texk/dvipdfm-x/ChangeLog
+++ b/texk/dvipdfm-x/ChangeLog
@@ -1,3 +1,16 @@
+2016-05-08 Masamichi HOSODA <trueroad@trueroad.jp>
+
+ * dvi.c, dvipdfmx.c, dvipdfmx.h, special.c: Add new specials to handle
+ command line options.
+ * spc_dvipdfmx.c, spc_dvipdfmx.h: Add for the new specials.
+ * Makefile.am, Makefile.in: Change for the added spc_dvipdfmx.c,
+ and spc_dvipdfmx.h.
+
+2016-05-06 Akira Kakuto <kakuto@fuk.kindai.ac.jp>
+
+ * pdffont.c: Avoid to crash for too large a value of SOURCE_DATE_EPOCH.
+ (w32 only).
+
2016-05-04 Akira Kakuto <kakuto@fuk.kindai.ac.jp>
* pdfdoc.c, pdfencrypt.c, pdffont.c, pdfobj.h, xbb.c: Improve the
diff --git a/texk/dvipdfm-x/Makefile.am b/texk/dvipdfm-x/Makefile.am
index 7f96ccf..3c3ec89 100644
--- a/texk/dvipdfm-x/Makefile.am
+++ b/texk/dvipdfm-x/Makefile.am
@@ -112,6 +112,8 @@ xdvipdfmx_SOURCES = \
sfnt.h \
spc_color.c \
spc_color.h \
+ spc_dvipdfmx.c \
+ spc_dvipdfmx.h \
spc_dvips.c \
spc_dvips.h \
spc_html.c \
diff --git a/texk/dvipdfm-x/Makefile.in b/texk/dvipdfm-x/Makefile.in
index b38db3d..929db45 100644
--- a/texk/dvipdfm-x/Makefile.in
+++ b/texk/dvipdfm-x/Makefile.in
@@ -151,15 +151,15 @@ am_xdvipdfmx_OBJECTS = agl.$(OBJEXT) bmpimage.$(OBJEXT) cff.$(OBJEXT) \
pdfobj.$(OBJEXT) pdfparse.$(OBJEXT) pdfresource.$(OBJEXT) \
pdfximage.$(OBJEXT) pkfont.$(OBJEXT) pngimage.$(OBJEXT) \
pst.$(OBJEXT) pst_obj.$(OBJEXT) sfnt.$(OBJEXT) \
- spc_color.$(OBJEXT) spc_dvips.$(OBJEXT) spc_html.$(OBJEXT) \
- spc_misc.$(OBJEXT) spc_pdfm.$(OBJEXT) spc_tpic.$(OBJEXT) \
- spc_util.$(OBJEXT) spc_xtx.$(OBJEXT) specials.$(OBJEXT) \
- subfont.$(OBJEXT) t1_char.$(OBJEXT) t1_load.$(OBJEXT) \
- tfm.$(OBJEXT) truetype.$(OBJEXT) tt_aux.$(OBJEXT) \
- tt_cmap.$(OBJEXT) tt_glyf.$(OBJEXT) tt_gsub.$(OBJEXT) \
- tt_post.$(OBJEXT) tt_table.$(OBJEXT) type0.$(OBJEXT) \
- type1.$(OBJEXT) type1c.$(OBJEXT) unicode.$(OBJEXT) \
- vf.$(OBJEXT) xbb.$(OBJEXT)
+ spc_color.$(OBJEXT) spc_dvipdfmx.$(OBJEXT) spc_dvips.$(OBJEXT) \
+ spc_html.$(OBJEXT) spc_misc.$(OBJEXT) spc_pdfm.$(OBJEXT) \
+ spc_tpic.$(OBJEXT) spc_util.$(OBJEXT) spc_xtx.$(OBJEXT) \
+ specials.$(OBJEXT) subfont.$(OBJEXT) t1_char.$(OBJEXT) \
+ t1_load.$(OBJEXT) tfm.$(OBJEXT) truetype.$(OBJEXT) \
+ tt_aux.$(OBJEXT) tt_cmap.$(OBJEXT) tt_glyf.$(OBJEXT) \
+ tt_gsub.$(OBJEXT) tt_post.$(OBJEXT) tt_table.$(OBJEXT) \
+ type0.$(OBJEXT) type1.$(OBJEXT) type1c.$(OBJEXT) \
+ unicode.$(OBJEXT) vf.$(OBJEXT) xbb.$(OBJEXT)
xdvipdfmx_OBJECTS = $(am_xdvipdfmx_OBJECTS)
xdvipdfmx_LDADD = $(LDADD)
xdvipdfmx_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
@@ -705,6 +705,8 @@ xdvipdfmx_SOURCES = \
sfnt.h \
spc_color.c \
spc_color.h \
+ spc_dvipdfmx.c \
+ spc_dvipdfmx.h \
spc_dvips.c \
spc_dvips.h \
spc_html.c \
@@ -1011,6 +1013,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pst_obj.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sfnt.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/spc_color.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/spc_dvipdfmx.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/spc_dvips.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/spc_html.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/spc_misc.Po@am__quote@
diff --git a/texk/dvipdfm-x/dvi.c b/texk/dvipdfm-x/dvi.c
index 87eca83..cea0ef0 100644
--- a/texk/dvipdfm-x/dvi.c
+++ b/texk/dvipdfm-x/dvi.c
@@ -2216,7 +2216,7 @@ scan_special (double *wd, double *ht, double *xo, double *yo, int *lm,
{
char *q;
const char *p = buf, *endptr;
- int ns_pdf = 0, error = 0;
+ int ns_pdf = 0, ns_dvipdfmx = 0, error = 0;
double tmp;
endptr = p + size;
@@ -2242,6 +2242,15 @@ scan_special (double *wd, double *ht, double *xo, double *yo, int *lm,
q = parse_c_ident(&p, endptr);
}
}
+ else if (q && !strcmp(q, "dvipdfmx")) {
+ skip_white(&p, endptr);
+ if (p < endptr && *p == ':') {
+ p++;
+ skip_white(&p, endptr);
+ RELEASE(q);
+ q = parse_c_ident(&p, endptr); ns_dvipdfmx = 1;
+ }
+ }
skip_white(&p, endptr);
if (q) {
@@ -2372,6 +2381,8 @@ scan_special (double *wd, double *ht, double *xo, double *yo, int *lm,
}
skip_white(&p, endptr);
}
+ } else if (ns_dvipdfmx && !strcmp(q, "config")) {
+ read_config_special(&p, endptr);
}
RELEASE(q);
}
diff --git a/texk/dvipdfm-x/dvipdfmx.c b/texk/dvipdfm-x/dvipdfmx.c
index 393de21..644c92c 100644
--- a/texk/dvipdfm-x/dvipdfmx.c
+++ b/texk/dvipdfm-x/dvipdfmx.c
@@ -705,6 +705,43 @@ read_config_file (const char *config)
MFCLOSE(fp);
}
+void
+read_config_special (const char **start, const char *end)
+{
+ char *option;
+ static char argv0[] = "config_special";
+ char *argv[3];
+ int argc = 1;
+
+ argv[0] = argv0;
+
+ skip_white (start, end);
+ if (*start >= end)
+ return;
+ /* Build up an argument list as if it were passed on the command
+ line */
+ if ((option = parse_ident (start, end))) {
+ argc = 2;
+ argv[1] = NEW (strlen(option)+2, char);
+ strcpy (argv[1]+1, option);
+ RELEASE (option);
+ *argv[1] = '-';
+ skip_white (start, end);
+ if (*start < end) {
+ argc += 1;
+ if (**start == '"') {
+ argv[2] = parse_c_string (start, end);
+ }
+ else
+ argv[2] = parse_ident (start, end);
+ }
+ }
+ do_args (argc, argv, argv0);
+ while (argc > 1) {
+ RELEASE (argv[--argc]);
+ }
+}
+
static void
system_default (void)
{
diff --git a/texk/dvipdfm-x/dvipdfmx.h b/texk/dvipdfm-x/dvipdfmx.h
index 85b5641..c32800a 100644
--- a/texk/dvipdfm-x/dvipdfmx.h
+++ b/texk/dvipdfm-x/dvipdfmx.h
@@ -31,5 +31,6 @@ extern int translate_origin;
extern const char *my_name;
extern int extractbb(int argc, char *argv[]);
+extern void read_config_special(const char **start, const char *end);
#endif /* _DVIPDFMX_H_ */
diff --git a/texk/dvipdfm-x/pdffont.c b/texk/dvipdfm-x/pdffont.c
index 7c8caca..b437096 100644
--- a/texk/dvipdfm-x/pdffont.c
+++ b/texk/dvipdfm-x/pdffont.c
@@ -107,8 +107,13 @@ get_unique_time_if_given(void)
if (source_date_epoch) {
errno = 0;
epoch = strtoll(source_date_epoch, &endptr, 10);
- if (!(epoch < 0 || *endptr != '\0' || errno != 0))
+ if (!(epoch < 0 || *endptr != '\0' || errno != 0)) {
ret = (time_t) epoch;
+#if defined(_MSC_VER)
+ if (ret > 32535291599ULL)
+ ret = 32535291599ULL;
+#endif
+ }
}
return ret;
}
diff --git a/texk/dvipdfm-x/spc_dvipdfmx.c b/texk/dvipdfm-x/spc_dvipdfmx.c
new file mode 100644
index 0000000..456d0fc
--- /dev/null
+++ b/texk/dvipdfm-x/spc_dvipdfmx.c
@@ -0,0 +1,104 @@
+/* This is dvipdfmx, an eXtended version of dvipdfm by Mark A. Wicks.
+
+ Copyright (C) 2002-2016 by Jin-Hwan Cho and Shunsaku Hirata,
+ the dvipdfmx project team.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+*/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <string.h>
+
+#include "system.h"
+#include "mem.h"
+#include "error.h"
+
+#include "dpxutil.h"
+#include "pdfparse.h"
+
+#include "specials.h"
+
+#include "spc_util.h"
+#include "spc_dvipdfmx.h"
+
+static int
+spc_handler_null (struct spc_env *spe, struct spc_arg *args)
+{
+ args->curptr = args->endptr;
+
+ return 0;
+}
+
+static struct spc_handler dvipdfmx_handlers[] = {
+ {"config", spc_handler_null}, /* handled at bop */
+};
+
+int
+spc_dvipdfmx_check_special (const char *buf, int len)
+{
+ int r = 0;
+ const char *p, *endptr;
+
+ p = buf;
+ endptr = p + len;
+
+ skip_white(&p, endptr);
+ if (p + strlen("dvipdfmx:") <= endptr &&
+ !memcmp(p, "dvipdfmx:", strlen("dvipdfmx:"))) {
+ r = 1;
+ }
+
+ return r;
+}
+
+int
+spc_dvipdfmx_setup_handler (struct spc_handler *sph,
+ struct spc_env *spe, struct spc_arg *ap)
+{
+ int error = -1, i;
+ char *q;
+
+ ASSERT(sph && spe && ap);
+
+ skip_white(&ap->curptr, ap->endptr);
+ if (ap->curptr + strlen("dvipdfmx:") >= ap->endptr ||
+ memcmp(ap->curptr, "dvipdfmx:", strlen("dvipdfmx:"))) {
+ spc_warn(spe, "Not dvipdfmx: special???");
+ return -1;
+ }
+ ap->curptr += strlen("dvipdfmx:");
+
+ skip_white(&ap->curptr, ap->endptr);
+ q = parse_c_ident(&ap->curptr, ap->endptr);
+ if (q) {
+ for (i = 0;
+ i < sizeof(dvipdfmx_handlers) / sizeof(struct spc_handler); i++) {
+ if (!strcmp(q, dvipdfmx_handlers[i].key)) {
+ ap->command = dvipdfmx_handlers[i].key;
+ sph->key = "dvipdfmx:";
+ sph->exec = dvipdfmx_handlers[i].exec;
+ skip_white(&ap->curptr, ap->endptr);
+ error = 0;
+ break;
+ }
+ }
+ RELEASE(q);
+ }
+
+ return error;
+}
diff --git a/texk/dvipdfm-x/dvipdfmx.h b/texk/dvipdfm-x/spc_dvipdfmx.h
similarity index 58%
copy from texk/dvipdfm-x/dvipdfmx.h
copy to texk/dvipdfm-x/spc_dvipdfmx.h
index 85b5641..4a6c4c0 100644
--- a/texk/dvipdfm-x/dvipdfmx.h
+++ b/texk/dvipdfm-x/spc_dvipdfmx.h
@@ -1,11 +1,7 @@
-/* DVIPDFMx, an eXtended version of DVIPDFM by Mark A. Wicks.
+/* This is dvipdfmx, an eXtended version of dvipdfm by Mark A. Wicks.
- Copyright (C) 2002-2016 by Jin-Hwan Cho, Matthias Franz, and Shunsaku Hirata,
- the DVIPDFMx project team.
-
- Copyright (c) 2006 SIL. (xdvipdfmx extensions for XeTeX support)
-
- Copyright (C) 1998, 1999 by Mark A. Wicks <mwicks@kettering.edu>
+ Copyright (C) 2002-2016 by Jin-Hwan Cho and Shunsaku Hirata,
+ the dvipdfmx project team.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -22,14 +18,13 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*/
-#ifndef _DVIPDFMX_H_
-#define _DVIPDFMX_H_
+#ifndef _SPC_DVIPDFMX_H_
+#define _SPC_DVIPDFMX_H_
-extern int compat_mode;
-extern int is_xdv;
-extern int translate_origin;
-extern const char *my_name;
+#include "specials.h"
-extern int extractbb(int argc, char *argv[]);
+extern int spc_dvipdfmx_check_special (const char *buf, int len);
+extern int spc_dvipdfmx_setup_handler (struct spc_handler *sph,
+ struct spc_env *spe, struct spc_arg *ap);
-#endif /* _DVIPDFMX_H_ */
+#endif /* _SPC_DVIPDFMX_H_ */
diff --git a/texk/dvipdfm-x/specials.c b/texk/dvipdfm-x/specials.c
index 0e0b0ae..138df2c 100644
--- a/texk/dvipdfm-x/specials.c
+++ b/texk/dvipdfm-x/specials.c
@@ -47,6 +47,7 @@
#include "spc_misc.h"
#include "spc_color.h"
#include "spc_dvips.h"
+#include "spc_dvipdfmx.h"
#include "spc_xtx.h"
#include "specials.h"
@@ -384,6 +385,15 @@ static struct {
spc_xtx_setup_handler
},
+ {"dvipdfmx:",
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ spc_dvipdfmx_check_special,
+ spc_dvipdfmx_setup_handler
+ },
+
{"ps:",
spc_dvips_at_begin_document,
spc_dvips_at_end_document,
diff --git a/texk/dvipsk/ChangeLog b/texk/dvipsk/ChangeLog
index 004aa8f..75f023c 100644
--- a/texk/dvipsk/ChangeLog
+++ b/texk/dvipsk/ChangeLog
@@ -1,6 +1,6 @@
2016-05-06 Akira Kakuto <kakuto@fuk.kindai.ac.jp>
- * output.c: Avoid to crash for to large a value of SOURCE_DATE_EPOCH
+ * output.c: Avoid to crash for too large a value of SOURCE_DATE_EPOCH
(w32 only).
2016-05-04 Akira Kakuto <kakuto@fuk.kindai.ac.jp>
diff --git a/texk/texlive/linked_scripts/Makefile.am b/texk/texlive/linked_scripts/Makefile.am
index c430192..6d79c49 100644
--- a/texk/texlive/linked_scripts/Makefile.am
+++ b/texk/texlive/linked_scripts/Makefile.am
@@ -136,6 +136,7 @@ texmf_other_scripts = \
lilyglyphs/lily-rebuild-pdfs.py \
ltximg/ltximg.pl \
luaotfload/luaotfload-tool.lua \
+ m-tx/m-tx.lua \
makedtx/makedtx.pl \
make4ht/make4ht \
match_parens/match_parens \
@@ -157,6 +158,7 @@ texmf_other_scripts = \
pfarrei/pfarrei.tlu \
pkfix-helper/pkfix-helper \
pkfix/pkfix.pl \
+ pmx/pmx2pdf.lua \
pmxchords/pmxchords.lua \
pst2pdf/pst2pdf.pl \
ptex2pdf/ptex2pdf.lua \
diff --git a/texk/texlive/linked_scripts/Makefile.in b/texk/texlive/linked_scripts/Makefile.in
index 47d2634..009ea85 100644
--- a/texk/texlive/linked_scripts/Makefile.in
+++ b/texk/texlive/linked_scripts/Makefile.in
@@ -351,6 +351,7 @@ texmf_other_scripts = \
lilyglyphs/lily-rebuild-pdfs.py \
ltximg/ltximg.pl \
luaotfload/luaotfload-tool.lua \
+ m-tx/m-tx.lua \
makedtx/makedtx.pl \
make4ht/make4ht \
match_parens/match_parens \
@@ -372,6 +373,7 @@ texmf_other_scripts = \
pfarrei/pfarrei.tlu \
pkfix-helper/pkfix-helper \
pkfix/pkfix.pl \
+ pmx/pmx2pdf.lua \
pmxchords/pmxchords.lua \
pst2pdf/pst2pdf.pl \
ptex2pdf/ptex2pdf.lua \
diff --git a/texk/texlive/linked_scripts/epspdf/epspdf.tlu b/texk/texlive/linked_scripts/epspdf/epspdf.tlu
index 7a7c2d7..709a2d9 100755
--- a/texk/texlive/linked_scripts/epspdf/epspdf.tlu
+++ b/texk/texlive/linked_scripts/epspdf/epspdf.tlu
@@ -7,9 +7,10 @@ kpse.set_program_name('texlua')
-- 0.6.0: first texlua version
-- 0.6.1: allow TeX installation on path with spaces
-- 0.6.2: compatibility fix for luatex 0.81
+-- 0.6.3: compatibility fixes for luatex 0.9x
-ep_version = '0.6.2'
-ep_copyright = '2006, 2008, 2009, 2010, 2011, 2013, 2014, 2015'
+ep_version = '0.6.3'
+ep_copyright = '2006, 2008, 2009, 2010, 2011, 2013, 2014, 2015, 2016'
--[[
@@ -58,15 +59,6 @@ POSSIBLE EXTENSIONS
-- some general utilities and globals ---------------------------
---[[
-
-Simple-minded error handling. At most, we call a function which
-tries to write the error message to log before re-raising the error.
-
-When run from the Tcl/Tk gui, this gui will capture error messages.
-
---]]
-
-- early initializations
eol = false
@@ -88,9 +80,12 @@ from_gui = false -- whether epspdf is run from the epspsdtk gui
cwd = ''
--- Windows: miktex, TL or neither
+-- Windows: miktex, TL or neither.
+-- Actual values determined during system-dependent initialization
is_miktex = false
is_tl_w32 = false
+-- recent versions of miktex include pdftops
+auto_psp = true -- configuration of pdftops_prog not needed or not allowed
-- some global file- and directory names
gs_prog = false
@@ -128,6 +123,7 @@ function print_log(s)
print(s) -- intercepted by the gui
end
end
+
function write_log(s)
print_log(string.format('%s %s',
os.date('%Y/%m/%d %H:%M:%S', os.time()), s))
@@ -139,6 +135,11 @@ end
-- error- and debug -------------------------
+-- Simple-minded error handling. At most, we call a function which
+-- tries to write the error message to log before re-raising the error.
+
+-- When run from the Tcl/Tk gui, this gui will capture error messages.
+
function errror(mess)
if logfile then pcall(write_log, mess) end
-- ignore result of pcall: we can do nothing about failure
@@ -598,8 +599,8 @@ function write_settings (file)
end
else -- stdout to be captured by epspdftk
f = io.output()
- if os.type=='windows' and not is_tl_w32 then
- f:write('tl_w = no', eol)
+ if os.type=='windows' and not auto_psp then
+ f:write('psp_config = yes', eol)
end
end
for k, v in pairs(settings) do
@@ -732,7 +733,7 @@ end
-- boundingboxes ---------------------------------------------------
--- Bb.coords names now same as those of epdf PDFRectangle
+-- [HR]Bb.coords names now same as those of epdf PDFRectangle
Bb = {}
Bb.coords = {'x1', 'y1', 'x2', 'y2'}
@@ -777,7 +778,7 @@ function Bb:from_comment(s)
return Bb:from_rect(b)
end
---[[
+--[[ some no-longer-used bbox functions
function Bb:copy ()
local b = {}
@@ -807,7 +808,7 @@ function Bb:expand ()
end
end
--- no longer used: gs handles this
+-- gs handles this now
-- call this via pcall
function Bb:wrapper()
local fn = mktemp('ps')
@@ -1424,7 +1425,7 @@ function PsPdf:eps_crop()
return psp
end -- eps_crop
---[===[ real conversions involving a single call of gs or pdftops --------
+--[===[ real conversions involving a single call of gs, pdftops or texlua
Each conversion fullfills all options that it can: gray, bbox and
page. gray when converting to pdf, bbox when converting from eps or
@@ -1458,38 +1459,43 @@ function PsPdf:pdf_crop()
errror('PsPdf:pdf_crop called with non-existent page '.. options.page)
end
local pg = options.page or 1
- local bb, hrbb
- if options.bbox then
- bb, hrbb = self:bb_from_gs(pg)
- else
- -- dbg('about to use epdf')
- -- use [Trim|Crop|Media]Box instead
- -- if os.type=='windows' then waitasec() end
- local dummy = epdf.open(self.path)
- -- if os.type=='windows' then waitasec() end
- if not dummy then
+ local bb, hrbb, pgbox, pgboxname
+ do
+ local pdoc, pcat, ppage
+ -- we already have the pages, miver and maver properties
+ -- but need properties of the desired page as well
+ pdoc = epdf.open(self.path)
+ if not pdoc then
errror('Epdf: cannot open '..self.path)
end
-- dbg('about to get catalog')
- dummy = dummy:getCatalog()
- if not dummy then
+ pcat = pdoc:getCatalog()
+ if not pcat then
errror('Cannot open catalog of '..self.path)
end
-- dbg('got catalog')
- dummy = dummy:getPage(pg)
- if not dummy then
+ ppage = pcat:getPage(pg)
+ if not ppage then
errror('Epdf: cannot open page object '..tostring(pg)..' of '..self.path)
end
- hrbb = dummy:getTrimBox()
- if not hrbb then
- hrbb = dummy:getCropBox()
+ pgboxname = 'trimbox'
+ pgbox = ppage:getTrimBox()
+ if not pgbox then
+ pgboxname = 'cropbox'
+ pgbox = ppage:getCropBox()
end
- if not hrbb then
- hrbb = dummy:getMediaBox()
+ if not pgbox then
+ pgboxname = 'mediabox'
+ pgbox = ppage:getMediaBox()
end
- -- further checks, including for non-nil, by Bb:from_rect,
- -- which errors out on failures
- hrbb = HRBb:from_rect(hrbb)
+ -- normalization and further checks, including for non-nil,
+ -- by Bb:from_rect, which errors out on failures
+ pgbox = HRBb:from_rect(pgbox)
+ end
+ if options.bbox then
+ bb, hrbb = self:bb_from_gs(pg)
+ else
+ hrbb = pgbox
end
-- luatex on searchpath
@@ -1497,115 +1503,53 @@ function PsPdf:pdf_crop()
-- write TeX file which includes cropped pdf page
-- adapted from Heiko Oberdiek's pdfcrop utility.
- -- first, create a table with the component strings for the tex source
- dummy = {}
- dummy[1] = [[
-\catcode37 14 % percent
-\catcode33 12 % exclam
-\catcode34 12 % quote
-\catcode35 6 % hash
-\catcode39 12 % apostrophe
-\catcode40 12 % left parenthesis
-\catcode41 12 % right parenthesis
-\catcode45 12 % minus
-\catcode46 12 % period
-\catcode60 12 % less
-\catcode61 12 % equals
-\catcode62 12 % greater
-\catcode64 12 % at
-\catcode91 12 % left square
-\catcode93 12 % right square
-\catcode96 12 % back tick
-\catcode123 1 % left curly brace
-\catcode125 2 % right curly brace
-\catcode126 12 % tilde
-\catcode`\#=6 %
-\escapechar=92 %
-\def\IfUndefined#1#2#3{%
- \begingroup\expandafter\expandafter\expandafter\endgroup
- \expandafter\ifx\csname#1\endcsname\relax
- #2%
- \else
- #3%
- \fi
-}
-
-% future modification: \pdfoutput => \outputmode
-\begingroup\expandafter\expandafter\expandafter\endgroup
- \expandafter\ifx\csname pdfoutput\endcsname\relax
- \let\pdfoutput \outputmode
-\fi
-
-\begingroup
- \newlinechar=10 %
- \endlinechar=\newlinechar %
- \ifnum0%
- \directlua{%
- if tex.enableprimitives then
- tex.enableprimitives('TEST', {
- 'luatexversion',
- 'pdfoutput',
- 'pdfcompresslevel',
- 'pdfhorigin',
- 'pdfvorigin',
- 'pagewidth',
- 'pageheight',
- 'pdfmapfile',
- 'pdfximage',
- 'pdflastximage',
- 'pdfrefximage',
- 'pdfminorversion',
- 'pdfobjcompresslevel',
- })
- tex.print('1')
- end
- }%
- \ifx\TESTluatexversion\UnDeFiNeD\else 1\fi %
- =11 %
- \global\let\luatexversion\luatexversion %
- \global\let\pdfoutput\TESTpdfoutput %
- \global\let\pdfcompresslevel\TESTpdfcompresslevel %
- \global\let\pdfhorigin\TESTpdfhorigin %
- \global\let\pdfvorigin\TESTpdfvorigin %
- \global\let\pagewidth\TESTpagewidth %
- \global\let\pageheight\TESTpageheight %
- \global\let\pdfmapfile\TESTpdfmapfile %
- \global\let\pdfximage\TESTpdfximage %
- \global\let\pdflastximage\TESTpdflastximage %
- \global\let\pdfrefximage\TESTpdfrefximage %
- \global\let\pdfminorversion\TESTpdfminorversion %
- \global\let\pdfobjcompresslevel\TESTpdfobjcompresslevel %
- \else %
- \errmessage{%
- Missing \string\luatexversion %
- }%
- \fi %
-\endgroup %
-
-\pdfoutput=1 %
-\pdfcompresslevel=9 %
-\csname pdfmapfile\endcsname{}
-\def\setpdfversion#1#2{%
- \ifnum#2>1 %
- \pdfobjcompresslevel=2 %
- % including unsupported pdf version!
- \pdfinclusionerrorlevel=0
- \pdfminorversion=9\relax
- \else
- \ifnum#1>4 %
- \pdfobjcompresslevel=2 %
- \else
- \pdfobjcompresslevel=0 %
- \fi
- \pdfminorversion=#1\relax
- \fi
-}
+ -- the table `pieces' will contain the component strings for the tex source
+ -- first, for texlua <= 0.81
+ local pieces = {}
+ if status.luatex_version <= 80 then
+ pieces[1] = '\\pdfoutput=1\n'
+ else
+ pieces[1] = [[
+\edef\pdfminorversion {\pdfvariable minorversion}
+\edef\pdfcompresslevel {\pdfvariable compresslevel}
+\edef\pdfobjcompresslevel {\pdfvariable objcompresslevel}
+\edef\pdfdecimaldigits {\pdfvariable decimaldigits}
+\edef\pdfhorigin {\pdfvariable horigin}
+\edef\pdfvorigin {\pdfvariable vorigin}
+\let\pdfpagewidth\pagewidth
+\let\pdfpageheight\pageheight
+\let\pdfximage\saveimageresource
+\let\pdfrefximage\useimageresource
+\let\pdflastximage\lastsavedimageresourceindex
+
+\outputmode=1
+]]
+ end
+ if self.maver > 1 then
+ pieces[2] = '\\pdfminorversion=9\n'
+ else
+ pieces[2] = '\\pdfminorversion=' .. self.miver .. '\n'
+ end
+ if self.maver > 1 or self.miver > 4 then
+ pieces[3] = [[
+\pdfcompresslevel=9
+\pdfobjcompresslevel=2
+\pdfdecimaldigits=4
+]]
+ else
+ pieces[3] = [[
+\pdfcompresslevel=9
+\pdfobjcompresslevel=0
+\pdfdecimaldigits=4
+]]
+ end
+ pieces[4] = [[
\def\page #1 [#2 #3 #4 #5]{%
\count0=#1\relax
\setbox0=\hbox{%
\pdfximage page #1 mediabox{]]
- dummy[2] = self.path
- dummy[3] = [[}%
+ pieces[5] = self.path
+ pieces[6] = [[}%
\pdfrefximage\pdflastximage
}%
\pdfhorigin=-#2bp\relax
@@ -1618,33 +1562,19 @@ function PsPdf:pdf_crop()
\shipout\box0\relax
}
]]
- -- pdf minor version to write to tex header
- local tex_miver = false
- if settings.pdf_version=='default' then
- tex_miver = self.miver
- else
- -- in this case, gs should already have converted to
- -- a sufficiently low version
- tex_miver = tonumber(settings.pdf_version)
- if tex_miver>self.miver then
- errror('Pdf_crop: forgot to reduce pdf version')
- end
- end
- dummy[4] = string.format([[
-\setpdfversion{%d}{%d}
+ pieces[7] = string.format([[
\page %d [%f %f %f %f]
\csname @@end\endcsname
\end
]],
- tex_miver, self.maver, options.page or 1,
- hrbb.x1, hrbb.y1, hrbb.x2, hrbb.y2)
+ options.page or 1, hrbb.x1, hrbb.y1, hrbb.x2, hrbb.y2)
- local textemp = mktemp('tex') -- this also takes care of pdf:
+ local textemp = mktemp('tex') -- this also took care of pdf:
local pdftemp = string.gsub(textemp, 'tex$', 'pdf')
-- if os.type=='windows' then waitasec() end
local f = io.open(textemp, 'w')
-- if os.type=='windows' then waitasec() end
- f:write(table.concat(dummy, ''))
+ f:write(table.concat(pieces, ''))
f:close()
local cmd, res, psp
if os.type=='unix' then
@@ -2137,10 +2067,12 @@ if os.type == 'windows' then cwd = string.gsub(cwd, '\\', '/') end
-- prepend (lua)tex directory to searchpath, if not already there
maybe_add_path(os.selfdir, false)
--- Windows: miktex, TL or neither
+-- Windows: miktex, TL or neither. is_miktex, is_tl_w32, auto_psp
-- no support yet for separate ghostscript
is_miktex = false
is_tl_w32 = false
+auto_psp = true -- only false for old miktex without included pdftops
+
if os.type == 'windows' then
if string.find (string.lower(kpse.version()), 'miktex') then
is_miktex = true
@@ -2164,6 +2096,10 @@ if os.type == 'windows' then
'/release-texlive.txt; TeX installation not supported.', 0)
end -- if isfile
end -- if not miktex
+ -- recent miktex and any windows tl include pdftops
+ if not lfs.isfile(string.gsub(os.selfdir, '\\', '/') .. '/pdftops.exe') then
+ auto_psp = false
+ end
end -- if windows
-- without Ghostscript we are dead in the water.
@@ -2275,7 +2211,8 @@ settings.use_hires_bb = false
-- it will not be used for TeX Live and only be read and written on Windows.
settings.pdftops_prog = false
-descriptions.pdftops_prog = 'Full path to pdftops.exe (not used with TeX Live)'
+descriptions.pdftops_prog =
+ 'Full path to pdftops.exe (not used if TeX bin dir contains pdftops)'
settings.use_pdftops = true
descriptions.use_pdftops = 'Use pdftops if available'
@@ -2408,7 +2345,7 @@ do -- main program
help = descriptions.pdf_version
}
- if os.type=='windows' and not is_tl_w32 then
+ if os.type=='windows' and not auto_psp then
opts.pdftops_prog = {
type = 'string', val = nil,
forms = {'--pdftops'},
@@ -2497,7 +2434,7 @@ do -- main program
'pdftops_prog', 'use_pdftops', 'save', 'info', 'debug',
'version', 'help'}) do
local v = opts[o]
- if v~='pdftops_prog' or is_miktex then
+ if v~='pdftops_prog' or not auto_psp then
if v and v.help then
local synt = join(v.forms, ', ')
if v.type ~= 'boolean' then synt = synt .. ' ' .. v.placeholder end
@@ -2518,7 +2455,7 @@ do -- main program
end
end
end
- end -- ~=pdftops_prog or is_miktex
+ end -- ~=pdftops_prog or not auto_psp
end -- for
if mess then os.exit(1) else os.exit() end
end -- help
@@ -2660,13 +2597,13 @@ do -- main program
-- pdftops program; pdftops has already been been initialized to false
-- pdftops_prog as command-line option
- if os.type=='windows' and not is_tl_w32 and opts.pdftops_prog.val then
+ if os.type=='windows' and not auto_psp and
+ opts.pdftops_prog.val then
settings.pdftops_prog = is_prog(opts.pdftops_prog.val)
end
- -- pdftops should be on the path.
- -- for miktex, make it so if possible.
- if os.type=='windows' and not is_tl_w32 then
+ -- pdftops should be on the path. otherwise, make it so if possible.
+ if os.type=='windows' and not auto_psp then
if settings.use_pdftops then
pdftops = is_prog(settings.pdftops_prog)
if pdftops then
@@ -2700,7 +2637,7 @@ do -- main program
help()
end
- -- opts.info.val: need to get infile first
+ -- opts.info.val: do later; need to get infile first
if opts.version.val then
show_version()
diff --git a/texk/texlive/linked_scripts/epspdf/epspdftk.tcl b/texk/texlive/linked_scripts/epspdf/epspdftk.tcl
index e281188..7e4a7bc 100755
--- a/texk/texlive/linked_scripts/epspdf/epspdftk.tcl
+++ b/texk/texlive/linked_scripts/epspdf/epspdftk.tcl
@@ -3,7 +3,7 @@
# epspdf conversion utility, GUI frontend
#####
-# Copyright (C) 2006, 2008, 2009, 2010, 2011, 2013, 2014, 2015 Siep Kroonenberg
+# Copyright (C) 2006, 2008, 2009, 2010, 2011, 2013, 2014, 2015, 2016 Siep Kroonenberg
# n dot s dot kroonenberg at rug dot nl
#
# This program is free software, licensed under the GNU GPL, >=2.0.
@@ -95,7 +95,8 @@ proc is_prog {x} {
# create a global empty settings array
array set ::settings [list]
-set ::is_tl 1
+# windows: pdftops from tex distro?
+set ::psp_config 0
# ask epspdf.tlu for currently configured settings.
# this does not include automatically configured or transient settings.
@@ -107,7 +108,7 @@ proc getsettings {} {
# write_log "settings from epspdf.tlu:\n$set_str\n"
set l [split $set_str "\r\n"]
if {$::tcl_platform(platform) eq "windows"} {
- set ::is_tl 1
+ set ::psp_config 0
set settings(pdftops_prog) ""
}
foreach e $l {
@@ -121,8 +122,8 @@ proc getsettings {} {
set val [string trim [string range $e [expr $i+1] end]]
if {$val eq "true"} {set val 1}
if {$val eq "false"} {set val 0}
- if {$para eq "tl_w"} {
- set ::is_tl 0
+ if {$para eq "psp_config"} {
+ set ::psp_config 1
write_log "TL for Windows not detected by epspdf"
} else {
set ::settings($para) $val
@@ -503,7 +504,7 @@ spacing .config_t
packf [frame .config_t.psf] -ipadx 4 -fill x
pack [label .config_t.psf.l_ps -text "Conversion to EPS and PostScript" \
-font boldfont] -anchor w
-if {! $::is_tl} {
+if { $::psp_config} {
if {[string tolower [string range $::settings(pdftops_prog) end-3 end]] ne \
".exe"} {set ::settings(pdftops_prog) ""}
pack [label .config_t.psf.l_pdftops -text "Find pdftops"] -anchor w
diff --git a/texk/texlive/linked_scripts/m-tx/m-tx.lua b/texk/texlive/linked_scripts/m-tx/m-tx.lua
new file mode 100755
index 0000000..0a62d8f
--- /dev/null
+++ b/texk/texlive/linked_scripts/m-tx/m-tx.lua
@@ -0,0 +1,5 @@
+#!/usr/bin/env texlua
+
+print ("The m-tx[.lua] script has been retired; please switch")
+print ("to the musixtex script, which now processes .mtx files.")
+
diff --git a/texk/texlive/linked_scripts/pmx/pmx2pdf.lua b/texk/texlive/linked_scripts/pmx/pmx2pdf.lua
new file mode 100755
index 0000000..41cff58
--- /dev/null
+++ b/texk/texlive/linked_scripts/pmx/pmx2pdf.lua
@@ -0,0 +1,5 @@
+#!/usr/bin/env texlua
+
+print ("The pmx2pdf[.lua] script has been retired; please switch")
+print ("to the musixtex script, which now processes .pmx files.")
+
diff --git a/texk/texlive/linked_scripts/texlive/tlmgr.pl b/texk/texlive/linked_scripts/texlive/tlmgr.pl
index 244de84..64f9aed 100755
--- a/texk/texlive/linked_scripts/texlive/tlmgr.pl
+++ b/texk/texlive/linked_scripts/texlive/tlmgr.pl
@@ -1,13 +1,13 @@
#!/usr/bin/env perl
-# $Id: tlmgr.pl 40844 2016-05-02 23:46:44Z karl $
+# $Id: tlmgr.pl 40915 2016-05-06 10:04:53Z preining $
#
# Copyright 2008-2016 Norbert Preining
# This file is licensed under the GNU General Public License version 2
# or any later version.
#
-my $svnrev = '$Revision: 40844 $';
-my $datrev = '$Date: 2016-05-03 01:46:44 +0200 (Tue, 03 May 2016) $';
+my $svnrev = '$Revision: 40915 $';
+my $datrev = '$Date: 2016-05-06 12:04:53 +0200 (Fri, 06 May 2016) $';
my $tlmgrrevision;
my $prg;
if ($svnrev =~ m/: ([0-9]+) /) {
@@ -214,6 +214,10 @@ my %action_specification = (
"run-post" => 1,
"function" => \&action_install
},
+ "key" => {
+ "run-post" => 0,
+ "function" => \&action_key
+ },
"option" => {
"run-post" => 1,
"function" => \&action_option
@@ -339,6 +343,7 @@ sub main {
"usermode|user-mode" => 1,
"usertree|user-tree" => "=s",
"verify-downloads" => "!",
+ "require-verification" => "!",
"version" => 1,
);
@@ -378,9 +383,9 @@ sub main {
$action = shift @ARGV;
if (!defined($action)) {
- if ($opts{"gui"}) { # -gui = gui
+ if ($opts{"gui"}) { # -gui = gui
$action = "gui";
- } elsif ($opts{"print-platform"}) { # -print-arch = print-arch
+ } elsif ($opts{"print-platform"}) { # -print-arch = print-arch
$action = "print-platform";
} else {
$action = "";
@@ -594,31 +599,14 @@ for the full story.\n";
$::no_execute_actions = 1 if (defined($opts{'no-execute-actions'}));
# if we are asked to use persistent connections try to start it here
- {
- my $do_persistent;
- if (defined($opts{'persistent-downloads'})) {
- # a command line argument for persistent-downloads has been given,
- # either with --no-... or --... that overrides any other setting
- $do_persistent = $opts{'persistent-downloads'};
- } else {
- # check if it is set in the config file
- if (defined($config{'persistent-downloads'})) {
- $do_persistent = $config{'persistent-downloads'};
- }
- }
- # default method is doing persistent downloads:
- if (!defined($do_persistent)) {
- $do_persistent = 1;
- }
- ddebug("tlmgr:main: do persistent downloads = $do_persistent\n");
- if ($do_persistent) {
- TeXLive::TLUtils::setup_persistent_downloads() ;
- }
- if (!defined($::tldownload_server)) {
- debug("tlmgr:main: ::tldownload_server not defined\n");
- } else {
- debug("tlmgr:main: ::tldownload_server defined\n");
- }
+ debug("tlmgr:main: do persistent downloads = $opts{'persistent-downloads'}\n");
+ if ($opts{'persistent-downloads'}) {
+ TeXLive::TLUtils::setup_persistent_downloads() ;
+ }
+ if (!defined($::tldownload_server)) {
+ debug("tlmgr:main: ::tldownload_server not defined\n");
+ } else {
+ debug("tlmgr:main: ::tldownload_server defined\n");
}
my $ret = execute_action($action, @ARGV);
@@ -5630,6 +5618,92 @@ sub texconfig_conf_mimic {
}
+# Action key
+#
+# general key management
+#
+# tlmgr key list
+# tlmgr key add <filename>
+# tlmgr key delete <keyid>
+sub action_key {
+ my $arg = shift @ARGV;
+
+
+
+ if (!defined($arg)) {
+ tlwarn("missing arguments to action `key'\n");
+ return $F_ERROR;
+ }
+
+ $arg = lc($arg);
+ if ($arg =~ /^(add|delete|list)$/) {
+ handle_gpg_config_settings();
+ if (!$::gpg) {
+ tlwarn("gnupg is not found or setup, cannot continue with action `key'\n");
+ return $F_ERROR;
+ }
+ chomp (my $TEXMFSYSCONFIG = `kpsewhich -var-value=TEXMFSYSCONFIG`);
+ my $local_keyring = "$Master/tlpkg/gpg/repository-keys.gpg";
+ if ($arg eq 'list') {
+ debug("running $::gpg --list-keys\n");
+ system("$::gpg --list-keys");
+ return $F_OK;
+ } elsif ($arg eq 'delete') {
+ my $what = shift @ARGV;
+ if (!$what) {
+ tlwarn("missing argument to `key add'\n");
+ return $F_ERROR;
+ }
+ # we need to make sure that $local_keyring is existent!
+ if (! -r $local_keyring) {
+ tlwarn("no local keyring available, cannot delete anything!\n");
+ return $F_ERROR;
+ }
+ debug("running: $::gpg --primary-keyring repository-keys.gpg --delete-key $what\n");
+ my ($out, $ret) =
+ TeXLive::TLUtils::run_cmd("$::gpg --primary-keyring repository-keys.gpg --delete-key \"$what\" 2>&1");
+ if ($ret == 0) {
+ info("key successfully removed\n");
+ return $F_OK;
+ } else {
+ tlwarn("key removal failed, output:\n$out\n");
+ return $F_ERROR;
+ }
+
+ } elsif ($arg eq 'add') {
+ my $what = shift @ARGV;
+ if (!$what) {
+ tlwarn("missing argument to `key add'\n");
+ return $F_ERROR;
+ }
+ # we need to make sure that $local_keyring is existent!
+ if (! -r $local_keyring) {
+ open(FOO, ">$local_keyring") || die("Cannot create $local_keyring: $!");
+ close(FOO);
+ }
+ debug("running: $::gpg --primary-keyring repository-keys.gpg --import $what\n");
+ my ($out, $ret) =
+ TeXLive::TLUtils::run_cmd("$::gpg --primary-keyring repository-keys.gpg --import \"$what\" 2>&1");
+ if ($ret == 0) {
+ info("key successfully imported\n");
+ return $F_OK;
+ } else {
+ tlwarn("key import failed, output:\n$out\n");
+ return $F_ERROR;
+ }
+ } else {
+ tldie("should not be reached: tlmgr key $arg\n");
+ }
+
+ } else {
+ tlwarn("unknown directive `$arg' to action `key'\n");
+ return $F_ERROR;
+ }
+ return $F_OK;
+}
+
+
+
# Subroutines galore.
#
# set global $location variable.
@@ -5843,14 +5917,24 @@ END_NO_CHECKSUMS
# depend on it:
print "location-url\t$locstr\n" if $::machinereadable;
info("$prg: package repositories\n");
+ my $verstat = "";
+ if (!$remotetlpdb->virtual_get_tlpdb('main')->is_verified) {
+ $verstat = ": ";
+ $verstat .= $remotetlpdb->virtual_get_tlpdb('main')->verification_status;
+ }
info("\tmain = " . $repos{'main'} . " (" .
($remotetlpdb->virtual_get_tlpdb('main')->is_verified ? "" : "not ") .
- "verified)\n");
+ "verified$verstat)\n");
for my $t (@tags) {
if ($t ne 'main') {
+ $verstat = "";
+ if (!$remotetlpdb->virtual_get_tlpdb($t)->is_verified) {
+ $verstat = ": ";
+ $verstat .= $remotetlpdb->virtual_get_tlpdb($t)->verification_status;
+ }
info("\t$t = " . $repos{$t} . " (" .
($remotetlpdb->virtual_get_tlpdb($t)->is_verified ? "" : "not ") .
- "verified)\n");
+ "verified$verstat)\n");
}
}
return 1;
@@ -5881,14 +5965,18 @@ sub _init_tlmedia {
return(0, $errormsg);
}
-
# this "location-url" line should not be changed since GUI programs
# depend on it:
if ($::machinereadable) {
print "location-url\t$location\n";
} else {
+ my $verstat = "";
+ if (!$remotetlpdb->is_verified) {
+ $verstat = ": ";
+ $verstat .= $remotetlpdb->verification_status;
+ }
info("$prg: package repository $location (" .
- ($remotetlpdb->is_verified ? "" : "not ") . "verified)\n");
+ ($remotetlpdb->is_verified ? "" : "not ") . "verified$verstat)\n");
}
return 1;
}
@@ -5951,17 +6039,20 @@ END_NO_INTERNET
$local_copy_tlpdb_used = 1;
} elsif ($ret == -2) {
# the remote database has not be signed, warn
- debug("$0: remote database is not signed, continuing anyway!\n");
+ debug("$prg: remote database is not signed, continuing anyway!\n");
} elsif ($ret == -3) {
# no gpg available
- debug("$0: no gpg available for verification, continuing anyway!\n");
+ debug("$prg: no gpg available for verification, continuing anyway!\n");
+ } elsif ($ret == -4) {
+ # pubkey missing
+ debug("$prg: $msg, continuing anyway!\n");
} elsif ($ret == 1) {
# no problem, checksum is wrong, we need to get new tlpdb
} elsif ($ret == 2) {
# umpf, signature error
# TODO should we die here? Probably yes because one of
# checksum file or signature file has changed!
- tldie("$0: verification of checksum for $location failed: $msg\n");
+ tldie("$prg: verification of checksum for $location failed: $msg\n");
} elsif ($ret == 0) {
$remotetlpdb = TeXLive::TLPDB->new(root => $location,
tlpdbfile => $loc_copy_of_remote_tlpdb);
@@ -5969,7 +6060,7 @@ END_NO_INTERNET
# we did verify this tlpdb, make sure that is recorded
$remotetlpdb->is_verified(1);
} else {
- tldie("$0: unexpected return value from verify_checksum: $ret\n");
+ tldie("$prg: unexpected return value from verify_checksum: $ret\n");
}
}
}
@@ -5979,6 +6070,10 @@ END_NO_INTERNET
if (!defined($remotetlpdb)) {
return(undef, $loadmediasrcerror . $location);
}
+ if ($opts{"require-verification"} && !$remotetlpdb->is_verified) {
+ tldie("Remote TeX Live database ($location) is not verified, exiting.\n");
+ }
+
# we allow a range of years to be specified by the remote tlpdb
# for which it might work.
# the lower limit is TLPDB->config_minrelease
@@ -6101,13 +6196,10 @@ sub finish {
sub load_config_file {
#
# first set default values
- # the default for gui-expertmode is 1 since that is what we
- # have shipped till now
$config{"gui-expertmode"} = 1;
- #
- # by default we remove packages
$config{"auto-remove"} = 1;
- #
+ $config{"require-verification"} = 0;
+ $config{"persistent-downloads"} = 1;
# do NOT set this here, we distinguish between explicitly set in the config file
# or implicitly true
# $config{"verify-downloads"} = 1;
@@ -6124,6 +6216,14 @@ sub load_config_file {
$tlmgr_config_file = TeXLive::TLConfFile->new($fn, "#", "=");
load_options_from_config($tlmgr_config_file) if $tlmgr_config_file;
+ # set $opts{"key"} from $config{"key"} if not passed in on cmd line
+ if (!defined($opts{"require-verification"})) {
+ $opts{"require-verification"} = $config{"require-verification"};
+ }
+ if (!defined($opts{"persistent-downloads"})) {
+ $opts{"persistent-downloads"} = $config{"persistent-downloads"};
+ }
+
# switched names for this one after initial release.
if ($tlmgr_config_file->key_present("gui_expertmode")) {
$tlmgr_config_file->rename_key("gui_expertmode", "gui-expertmode");
@@ -6163,6 +6263,15 @@ sub load_options_from_config {
tlwarn("$prg: $fn: Unknown value for auto-remove: $val\n");
}
+ } elsif ($key eq "require-verification") {
+ if ($val eq "0") {
+ $config{"require-verification"} = 0;
+ } elsif ($val eq "1") {
+ $config{"require-verification"} = 1;
+ } else {
+ tlwarn("$prg: $fn: Unknown value for require-verification: $val\n");
+ }
+
} elsif ($key eq "verify-downloads") {
if ($val eq "0") {
$config{"verify-downloads"} = 0;
@@ -6535,6 +6644,15 @@ Change the pinning file location from C<TEXMFLOCAL/tlpkg/pinning.txt>
(see L</Pinning> below). Documented only for completeness, as this is
only useful in debugging.
+=item B<--require-verification>
+
+=item B<--no-require-verification>
+
+Instructs C<tlmgr> to only accept signed and verified remotes. In any
+other case C<tlmgr> will quit operation.
+See L<CRYPTOGRAPHIC VERIFICATION> below for details.
+
+
=item B<--usermode>
Activates user mode for this run of C<tlmgr>; see L<USER MODE> below.
@@ -6998,6 +7116,29 @@ C<--reinstall>, as in (using the C<fontspec> package as the example):
=back
+=head2 key I<args>
+
+=over 4
+
+=item B<key list>
+
+=item B<key add I<what>>
+
+=item B<key remove I<keyid>>
+
+The action C<key> allows listing, adding and removing additional keys
+to the set of trusted keys, that is those that are used to verify the
+TeX Live databases.
+
+With the C<list> argument lists all keys.
+
+The C<add> argument requires another argument, either a filename or
+C<-> for stdin, from which the key is added. The key is added to the
+local keyring C<GNUPGHOME/repository-keys.gpg>, which normally is
+C<tlpkg/gpg/repository-keys.gpg>.
+
+The C<delete> argument requires a key id and removes the requested id
+from the local keyring.
=head2 option
@@ -7652,6 +7793,9 @@ command-line option.
=item C<persistent-downloads>, value 0 or 1 (default 1), same as
command-line option.
+=item C<require-verification>, value 0 or 1 (default 1), same as
+command-line option.
+
=item C<verify-downloads>, value 0 or 1 (default 1), same as
command-line option.
@@ -7673,7 +7817,7 @@ make sense to set this.
=back
-The <no-checksums> key needs more explanation. By default, package
+The C<no-checksums> key needs more explanation. By default, package
checksums computed and stored on the server (in the TLPDB) are compared
to checksums computed locally after downloading. C<no-checksums>
disables this.
@@ -7694,7 +7838,10 @@ If a working GnuPG binary (C<gpg>) is found (see below for the search
method), by default verification of downloaded files is performed. This
can be suppressed by specifying C<--no-verify-downloads> on the command
line, or adding an entry C<verify-downloads = 0> to a tlmgr config file
-(described in L<CONFIGURATION FILE FOR TLMGR>).
+(described in L<CONFIGURATION FILE FOR TLMGR>). On the other hand,
+it is possible to B<require> verification by either specifying
+C<--require-verification> on the command line, or adding an entry
+C<require-verification = 1> to a tlmgr config file.
Verification is performed as follows: For each C<texlive.tlpdb> loaded
for a repository, the respective checksum C<texlive.tlpdb.sha512> is
@@ -7709,6 +7856,8 @@ is signed by Karl Berry's key 0x9DEB46C0 and Norbert Preining's key
0x6CACA448. All of these keys are obtainable from the standard key
servers.
+Additional trusted keys can be added using the C<key> action.
+
=head2 Configuration of GnuPG invocation
The executable used for GnuPG is searched as follows: If the environment
@@ -7790,6 +7939,10 @@ collection-context> would install C<collection-basic> and other
collections, while in user mode, I<only> the packages mentioned in
C<collection-context> are installed.
+If a package shipping map files is installed in user mode, a backup of
+the user's C<updmap.cfg> in C<USERTREE/web2c/> is made, and then this file
+regenerated from the list of installed packages.
+
=head2 User mode backup, restore, remove, update
In user mode, these actions check that all packages to be acted on are
diff --git a/texk/web2c/lib/ChangeLog b/texk/web2c/lib/ChangeLog
index 3fe4626..5994ef7 100644
--- a/texk/web2c/lib/ChangeLog
+++ b/texk/web2c/lib/ChangeLog
@@ -1,3 +1,8 @@
+2016-05-06 Akira Kakuto <kakuto@fuk.kinidai.ac.jp>
+
+ * texmfmp.c: Avoid to crash for too large a value of SOURCE_DATE_EPOCH.
+ (w32 only).
+
2016-05-06 Karl Berry <karl@tug.org>
* texmfmp.c (init_start_time, get_date_and_time) [onlyTeX]:
diff --git a/texk/web2c/lib/texmfmp.c b/texk/web2c/lib/texmfmp.c
index c56cd02..cd7953a 100644
--- a/texk/web2c/lib/texmfmp.c
+++ b/texk/web2c/lib/texmfmp.c
@@ -2222,6 +2222,10 @@ void init_start_time() {
FATAL1 ("invalid epoch-seconds-timezone value for environment variable $SOURCE_DATE_EPOCH: %s",
source_date_epoch);
}
+#if defined(_MSC_VER)
+ if (epoch > 32535291599ULL)
+ epoch = 32535291599ULL;
+#endif
start_time = epoch;
} else
#endif /* not onlyTeX */
diff --git a/utils/devnag/ChangeLog b/utils/devnag/ChangeLog
index 7f12523..1d7e05d 100644
--- a/utils/devnag/ChangeLog
+++ b/utils/devnag/ChangeLog
@@ -1,3 +1,13 @@
+2016-05-06 Ken Brown <kbrow1i@gmail.com>
+
+ * tests/*.tex: udpate version number.
+
+2016-05-03 Zdenek Wagner <zdenek.wagner@gmail.com>
+
+ * devnag.c: update version number to 2.16.
+ * NEWS, README: remove. The maintained README
+ is in the package's doc/ directory (in Master = CTAN).
+
2016-03-09 Karl Berry <karl@tug.org>
* devnag.1: new file, originally written by Norbert.
@@ -104,3 +114,4 @@
since its original release. It is based on version 1.6 (there are
no releases 1.7, 1.8 or 1.9).
+(This ChangeLog file is public domain.)
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-tex/texlive-bin.git
Reply to: