diff options
author | Karl Berry <karl@freefriends.org> | 2023-02-16 21:35:01 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2023-02-16 21:35:01 +0000 |
commit | 1538cbdea74c4293bdab159355aff01352830ae6 (patch) | |
tree | 66874e3d48381a7f75e812af5b29f2b52deae1ef | |
parent | 56382445de8a6a31771c01a758ee6eddfd332233 (diff) |
l3build (16feb23)
git-svn-id: svn://tug.org/texlive/trunk@65852 c570f23f-e606-0410-a88d-b1316a301751
-rwxr-xr-x | Build/source/texk/texlive/linked_scripts/epspdf/epspdf.tlu | 107 | ||||
-rw-r--r-- | Build/source/texk/texlive/linked_scripts/l3build/l3build.lua | 2 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/l3build/CHANGELOG.md | 12 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/l3build/README.md | 2 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/l3build/l3build.pdf | bin | 741562 -> 742232 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/man/man1/l3build.1 | 2 | ||||
-rw-r--r-- | Master/texmf-dist/doc/man/man1/l3build.man1.pdf | bin | 14821 -> 14932 bytes | |||
-rw-r--r-- | Master/texmf-dist/scripts/l3build/l3build-check.lua | 19 | ||||
-rw-r--r-- | Master/texmf-dist/scripts/l3build/l3build-manifest.lua | 2 | ||||
-rw-r--r-- | Master/texmf-dist/scripts/l3build/l3build-typesetting.lua | 23 | ||||
-rwxr-xr-x | Master/texmf-dist/scripts/l3build/l3build.lua | 2 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/l3build/l3build.dtx | 8 |
12 files changed, 83 insertions, 96 deletions
diff --git a/Build/source/texk/texlive/linked_scripts/epspdf/epspdf.tlu b/Build/source/texk/texlive/linked_scripts/epspdf/epspdf.tlu index 1dba171bf18..93f0415014c 100755 --- a/Build/source/texk/texlive/linked_scripts/epspdf/epspdf.tlu +++ b/Build/source/texk/texlive/linked_scripts/epspdf/epspdf.tlu @@ -13,8 +13,11 @@ epspdf conversion utility some refactoring; better handling of some corner cases 0.6.5: eliminate .setpdfwrite from ghostscript commandlines, since this is now considered obsolete +0.6.5.1: eliminate faulty check for writability system_tmpdir; + just error out when no tempdir for epspdf can be created. + Avoid spawn for MiKTeX. -Copyright (C) 2006-2020 Siep Kroonenberg +Copyright (C) 2006-2023 Siep Kroonenberg siepo at bitmuis nl @@ -304,40 +307,8 @@ function find_on_path (prog) return false end -- find_on_path -function dir_writable(d) - -- because directory attributes do not tell the whole story, - -- we actually try to create a file in the directory. - if not lfs.isdir(d) then - return false - end - -- try to create a new file, write to it and delete it afterwards - for i=1,1000 do - local s = d .. '/' .. tostring(i) - if not lfs.isfile(s) then - local fh = io.open(s, "w") - if fh then - fh:write('test') - fh:close() - if lfs.isfile(s) then - if lfs.attributes(s, 'size') > 0 then - os.remove(s) - return true - else - os.remove(s) - return false -- open and write resulted in empty file - end -- lfs.attributes - else - return false -- open and write did not result in a file - end -- lfs.isfile - end -- fh - return false -- filename available; could not open for write - end -- not lfs.isfile - end -- for - return false -end - function system_tempdir () - local d + local d = false if os.type=='windows' then d = os.getenv('TEMP') if not d then @@ -350,9 +321,6 @@ function system_tempdir () end end -- cygwin: $TEMP=/tmp, root '/' being root of cygwin installation - if d and not dir_writable(d) then - d = false - end return d end @@ -403,6 +371,20 @@ function tab_combine (t) return res end -- tab_combine +-- workaround for miktex spawn problem +function spawnexec(cmd) + if is_miktex then + if type(cmd)=='table' then + return os.execute(table.concat(cmd, ' ')) + -- there is no need for quoting in the cases used + else + return os.execute(cmd) + end + else + return os.spawn(cmd) + end +end + -- files ---------------------------------------------------- -- Copy a file in chunks, with optional length and offset. -- Since files may be very large, we copy them piecemeal. @@ -1547,13 +1529,7 @@ function PsPdf:pdf_crop() -- if os.type=='unix' then cmd = {luatex_prog, '--safer', '--no-shell-escape', textemp} log_cmd(cmd) - res = os.spawn(cmd) - -- else - -- cmd = luatex_prog..' --safer --no-shell-escape '..textemp - -- log_cmd({cmd}) - -- -- os.execute('timeout /t 1 /nobreak >nul') - -- res = os.execute(cmd) - -- end + res = spawnexec(cmd) if res and res==0 and lfs.attributes(pdftemp, 'size')>0 then psp = PsPdf:from_path(pdftemp) options.bbox = false @@ -1583,7 +1559,7 @@ function PsPdf:eps_to_pdf() cmd = tab_combine({cmd, pdf_tail_options}) table.insert(cmd, self.path) log_cmd(cmd) - local res = os.spawn(cmd) + local res = spawnexec(cmd) if res and res==0 and lfs.attributes(psp.path, 'size')>0 then psp.pages, psp.miver, psp.maver = pdf_props(psp.path) options.gray = false @@ -1623,7 +1599,7 @@ function PsPdf:pdf_to_pdf() cmd = tab_combine({cmd, pdf_tail_options}) table.insert(cmd, self.path) log_cmd(cmd) - local res = os.spawn(cmd) + local res = spawnexec(cmd) if res and res==0 and lfs.attributes(psp.path, 'size')>0 then psp.pages, psp.miver, psp.maver = pdf_props(psp.path) options.gray = false @@ -1655,10 +1631,9 @@ function PsPdf:pdf_to_eps() -- which are usually harmless and for which I know no easy fix -- pdftops -q does not do the trick on Windows, -- and redirection to logfile gives access denied under miktex - -- res = os.spawn({'cmd', '/c', table.concat(cmd, ' ')..' 2>>'..log_bsl}) res = os.execute(table.concat(cmd, ' ')..' 2>nul') else - res = os.spawn(cmd) + res = spawnexec(cmd) end if res and res==0 and lfs.attributes(psp.path, 'size')>0 then psp.pages = 1 @@ -1732,7 +1707,7 @@ function PsPdf:pdf_to_eps() table.insert(cmd, '-sOutputFile='..psp.path) table.insert(cmd, self.path) log_cmd(cmd) - res = os.spawn(cmd) + res = spawnexec(cmd) if res and res==0 and lfs.attributes(psp.path, 'size')>0 then psp.pages = 1 options.page = false @@ -1762,7 +1737,7 @@ function PsPdf:ps_to_pdf() cmd = tab_combine({cmd, pdf_tail_options}) table.insert(cmd, self.path) log_cmd(cmd) - local res = os.spawn(cmd) + local res = spawnexec(cmd) if res and res==0 and lfs.attributes(psp.path, 'size')>0 then psp.pages, psp.miver, psp.maver = pdf_props(psp.path) options.gray = false @@ -1805,10 +1780,9 @@ function PsPdf:pdf_to_ps() -- which are usually harmless and for which I know no easy fix -- pdftops -q does not do the trick on Windows, -- and redirection to logfile gives access denied under miktex - -- res = os.spawn({'cmd', '/c', table.concat(cmd, ' ')..' 2>>'..log_bsl}) res = os.execute(table.concat(cmd, ' ')..' 2>nul') else - res = os.spawn(cmd) + res = spawnexec(cmd) end if res and res==0 and lfs.attributes(psp.path, 'size')>0 then options.page = false @@ -1833,7 +1807,7 @@ function PsPdf:ps_to_ps() table.insert(cmd, '-sOutputFile#'..psp.path) table.insert(cmd, self.path) log_cmd(cmd) - local res = os.spawn(cmd) + local res = spawnexec(cmd) if res and res==0 and lfs.attributes(psp.path, 'size')>0 then options.gray = false return psp @@ -1901,9 +1875,12 @@ function any_to_any() if settings.pdf_target and (settings.pdf_target~='default') then table.insert(pdf_options, '-dPDFSETTINGS#/'..settings.pdf_target) end - if settings.pdf_target~='screen' and settings.pdf_target~='ebook' then - pdf_tail_options = { - '-c', '<</NeverEmbed [ ] >> setdistillerparams', '-f'} + if not is_miktex then + -- options below cause trouble with unpacked cmd table + if settings.pdf_target~='screen' and settings.pdf_target~='ebook' then + pdf_tail_options = { + '-c', '<</NeverEmbed [ ] >> setdistillerparams', '-f'} + end end end @@ -2063,7 +2040,7 @@ function any_to_any() end if (not need_gs) and options.page then psp = psp:pdf_crop() - -- less invasive that page selection by gs + -- less invasive than page selection by gs end if need_gs then psp = psp:pdf_to_pdf() -- will handle page selection too @@ -2395,7 +2372,7 @@ do -- main program -- a couple of functions only available during command-line parsing local function show_version () - print('Epspdf version 0.6.4\nCopyright (c) 2006-2019 Siep Kroonenberg') + print('Epspdf version 0.6.5.1\nCopyright (c) 2006-2023 Siep Kroonenberg') end local function help (mess) -- requires opts array @@ -2649,10 +2626,16 @@ do -- main program -- a directory under a dedicated temp directory, which has a better chance -- of getting cleaned up by the system. - lfs.chdir(system_tempdir() or out_dir) - -- no check for failure; we create a subdirectory in - -- whatever is the current directory - tempdir = os.tmpdir() + for i, d in pairs({system_tempdir(), out_dir}) do + if not lfs.chdir(d) then + io.stdout:write('cannot cd into '..d..'\n') + goto continue + end + tempdir = os.tmpdir() + if not tempdir then goto continue end + break + ::continue:: + end if not tempdir then errror('Cannot create directory for temporary files') end diff --git a/Build/source/texk/texlive/linked_scripts/l3build/l3build.lua b/Build/source/texk/texlive/linked_scripts/l3build/l3build.lua index d0657cfd702..110d3947720 100644 --- a/Build/source/texk/texlive/linked_scripts/l3build/l3build.lua +++ b/Build/source/texk/texlive/linked_scripts/l3build/l3build.lua @@ -25,7 +25,7 @@ for those people who are interested. --]] -- Version information -release_date = "2022-11-10" +release_date = "2023-02-16" -- File operations are aided by the LuaFileSystem module local lfs = require("lfs") diff --git a/Master/texmf-dist/doc/latex/l3build/CHANGELOG.md b/Master/texmf-dist/doc/latex/l3build/CHANGELOG.md index 700a00e85d9..f14e4db1a0b 100644 --- a/Master/texmf-dist/doc/latex/l3build/CHANGELOG.md +++ b/Master/texmf-dist/doc/latex/l3build/CHANGELOG.md @@ -7,6 +7,15 @@ this project uses date-based 'snapshot' version identifiers. ## [Unreleased] +## [2023-02-16] + +### Changed +- Drop a redundant setup line for upTeX +- Normalise more Lua stack trace data (may require `.tlg` rebuild) + +### Fixed +- Ensure `texmf.cnf` work correctly for `dvips` + ## [2022-11-10] ### Changed @@ -611,7 +620,8 @@ this project uses date-based 'snapshot' version identifiers. - Rationalise short option names: removed `-d`, `-E`, `-r` - Target `cmdcheck`: specific to LaTeX kernel work -[Unreleased]: https://github.com/latex3/l3build/compare/2022-11-10...HEAD +[Unreleased]: https://github.com/latex3/l3build/compare/2023-02-16...HEAD +[2023-02-16]: https://github.com/latex3/l3build/compare/2022-11-10...2023-02-16 [2022-11-10]: https://github.com/latex3/l3build/compare/2022-09-15...2022-11-10 [2022-09-15]: https://github.com/latex3/l3build/compare/2022-04-19...2022-09-15 [2022-04-19]: https://github.com/latex3/l3build/compare/2022-04-12...2022-04-19 diff --git a/Master/texmf-dist/doc/latex/l3build/README.md b/Master/texmf-dist/doc/latex/l3build/README.md index 99412794229..e33fee32292 100644 --- a/Master/texmf-dist/doc/latex/l3build/README.md +++ b/Master/texmf-dist/doc/latex/l3build/README.md @@ -1,7 +1,7 @@ l3build: a testing and building system for LaTeX ================================================= -Release 2022-11-10 +Release 2023-02-16 Overview -------- diff --git a/Master/texmf-dist/doc/latex/l3build/l3build.pdf b/Master/texmf-dist/doc/latex/l3build/l3build.pdf Binary files differindex 617ecb459d1..5172226c843 100644 --- a/Master/texmf-dist/doc/latex/l3build/l3build.pdf +++ b/Master/texmf-dist/doc/latex/l3build/l3build.pdf diff --git a/Master/texmf-dist/doc/man/man1/l3build.1 b/Master/texmf-dist/doc/man/man1/l3build.1 index 7ae1070e1a0..f36d695a069 100644 --- a/Master/texmf-dist/doc/man/man1/l3build.1 +++ b/Master/texmf-dist/doc/man/man1/l3build.1 @@ -1,4 +1,4 @@ -.TH l3build 1 "2022-11-10" +.TH l3build 1 "2023-02-16" .SH NAME l3build \- Checking and building packages .SH SYNOPSIS diff --git a/Master/texmf-dist/doc/man/man1/l3build.man1.pdf b/Master/texmf-dist/doc/man/man1/l3build.man1.pdf Binary files differindex e52a56f48f4..ceef5be0598 100644 --- a/Master/texmf-dist/doc/man/man1/l3build.man1.pdf +++ b/Master/texmf-dist/doc/man/man1/l3build.man1.pdf diff --git a/Master/texmf-dist/scripts/l3build/l3build-check.lua b/Master/texmf-dist/scripts/l3build/l3build-check.lua index 7b3191aa204..d6d68086bcc 100644 --- a/Master/texmf-dist/scripts/l3build/l3build-check.lua +++ b/Master/texmf-dist/scripts/l3build/l3build-check.lua @@ -1,6 +1,6 @@ --[[ -File l3build-check.lua Copyright (C) 2018-2022 The LaTeX Project +File l3build-check.lua Copyright (C) 2018-2023 The LaTeX Project It may be distributed and/or modified under the conditions of the LaTeX Project Public License (LPPL), either version 1.3c of this @@ -126,8 +126,8 @@ local function normalize_log(content,engine,errlevels) -- Zap line numbers from \show, \showbox, \box_show and the like: -- do this before wrapping lines line = gsub(line, "^l%.%d+ ", "l. ...") - -- Also from lua stack traces. - line = gsub(line, "lua:%d+: in function", "lua:...: in function") + -- Also from Lua stack traces + line = gsub(line, "lua:%d+:", "lua:...:") -- Allow for wrapped lines: preserve the content and wrap -- Skip lines that have an explicit marker for truncation if len(line) == maxprintline and @@ -778,8 +778,7 @@ function runtest(name, engine, hide, ext, test_type, breakout) rmfile(testdir,name .. logext) local errlevels = {} for i = 1, checkruns do - errlevels[i] = run( - testdir, + errlevels[i] = runcmd( -- No use of localdir here as the files get copied to testdir: -- avoids any paths in the logs os_setenv .. " TEXINPUTS=." .. localtexmf() @@ -788,13 +787,6 @@ function runtest(name, engine, hide, ext, test_type, breakout) os_setenv .. " LUAINPUTS=." .. localtexmf() .. (checksearch and os_pathsep or "") .. os_concat .. - -- Avoid spurious output from (u)pTeX - os_setenv .. " GUESS_INPUT_KANJI_ENCODING=0" - .. os_concat .. - -- Allow for local texmf files - os_setenv .. " TEXMFCNF=." .. os_pathsep - .. os_concat .. - set_epoch_cmd(epoch, forcecheckepoch) .. -- Ensure lines are of a known length os_setenv .. " max_print_line=" .. maxprintline .. os_concat .. @@ -803,7 +795,8 @@ function runtest(name, engine, hide, ext, test_type, breakout) .. setup(lvtfile) .. (hide and (" > " .. os_null) or "") .. os_concat .. - runtest_tasks(jobname(lvtfile),i) + runtest_tasks(jobname(lvtfile),i), + testdir ) -- Break the loop if the result is stable if breakout and i < checkruns then diff --git a/Master/texmf-dist/scripts/l3build/l3build-manifest.lua b/Master/texmf-dist/scripts/l3build/l3build-manifest.lua index 8f3e5ef4217..5642c91c432 100644 --- a/Master/texmf-dist/scripts/l3build/l3build-manifest.lua +++ b/Master/texmf-dist/scripts/l3build/l3build-manifest.lua @@ -58,6 +58,8 @@ function manifest() printline = "Manifest written to " .. manifestfile print((printline:gsub(".","*"))) print(printline) print((printline:gsub(".","*"))) + return 0 + end --[[ diff --git a/Master/texmf-dist/scripts/l3build/l3build-typesetting.lua b/Master/texmf-dist/scripts/l3build/l3build-typesetting.lua index c173b2593b1..7f5327b5a26 100644 --- a/Master/texmf-dist/scripts/l3build/l3build-typesetting.lua +++ b/Master/texmf-dist/scripts/l3build/l3build-typesetting.lua @@ -35,18 +35,6 @@ local match = string.match local os_type = os.type -function dvitopdf(name, dir, engine, hide) - run( - dir, - set_epoch_cmd(epoch, forcecheckepoch) .. - "dvips " .. name .. dviext - .. (hide and (" > " .. os_null) or "") - .. os_concat .. - "ps2pdf " .. ps2pdfopt .. name .. psext - .. (hide and (" > " .. os_null) or "") - ) -end - -- An auxiliary used to set up the environmental variables function runcmd(cmd,dir,vars) dir = dir or "." @@ -67,6 +55,17 @@ function runcmd(cmd,dir,vars) return run(dir,set_epoch_cmd(epoch, forcedocepoch) .. env .. os_concat .. cmd) end +function dvitopdf(name, dir, engine, hide) + runcmd( + "dvips " .. name .. dviext + .. (hide and (" > " .. os_null) or "") + .. os_concat .. + "ps2pdf " .. ps2pdfopt .. name .. psext + .. (hide and (" > " .. os_null) or ""), + dir + ) +end + function biber(name,dir) if fileexists(dir .. "/" .. name .. ".bcf") then return diff --git a/Master/texmf-dist/scripts/l3build/l3build.lua b/Master/texmf-dist/scripts/l3build/l3build.lua index d0657cfd702..110d3947720 100755 --- a/Master/texmf-dist/scripts/l3build/l3build.lua +++ b/Master/texmf-dist/scripts/l3build/l3build.lua @@ -25,7 +25,7 @@ for those people who are interested. --]] -- Version information -release_date = "2022-11-10" +release_date = "2023-02-16" -- File operations are aided by the LuaFileSystem module local lfs = require("lfs") diff --git a/Master/texmf-dist/source/latex/l3build/l3build.dtx b/Master/texmf-dist/source/latex/l3build/l3build.dtx index 215ce3d6315..435036c8bf2 100644 --- a/Master/texmf-dist/source/latex/l3build/l3build.dtx +++ b/Master/texmf-dist/source/latex/l3build/l3build.dtx @@ -1,6 +1,6 @@ % \iffalse % -% File l3build.dtx (C) Copyright 2014-2022 The LaTeX Project +% File l3build.dtx (C) Copyright 2014-2023 The LaTeX Project % % It may be distributed and/or modified under the conditions of the % LaTeX Project Public License (LPPL), either version 1.3c of this @@ -236,7 +236,7 @@ % }^^A % } % -% \date{Released 2022-11-10} +% \date{Released 2023-02-16} % % \maketitle % \tableofcontents @@ -1129,7 +1129,7 @@ % if run == 1 then % return "biber " .. name % else -% return 0 +% return "" % end % end % \end{lstlisting} @@ -1553,7 +1553,7 @@ % the zip file to be uploaded. You may wish to specify that this file % is ignored by any version control in that directory (using % |.gitignore| or similar). Or alternatively you can use the -% |uploadconfig.curl_file| field in the |build.lua| file to specify an +% |uploadconfig.curlopt_file| field in the |build.lua| file to specify an % alternative name or location for this file. % % \paragraph{Validating} |