From patchwork Sat Dec 4 02:16:11 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Thiago Jung Bauermann X-Patchwork-Id: 34948 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id BA22727BBEA; Sat, 4 Dec 2021 02:17:09 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 1F83C27BBE9 for ; Sat, 4 Dec 2021 02:17:09 +0000 (GMT) Received: from localhost ([::1]:53428 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mtKbs-0004DL-8O for patchwork@mira.cbaines.net; Fri, 03 Dec 2021 21:17:08 -0500 Received: from eggs.gnu.org ([209.51.188.92]:35954) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mtKbm-0004D4-FW for guix-patches@gnu.org; Fri, 03 Dec 2021 21:17:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:40966) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mtKbm-0007yg-6t for guix-patches@gnu.org; Fri, 03 Dec 2021 21:17:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mtKbm-0004ii-0F for guix-patches@gnu.org; Fri, 03 Dec 2021 21:17:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#52268] [PATCH core-updates-frozen] gnu: Add texlive-latex-luatex. Resent-From: Thiago Jung Bauermann Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 04 Dec 2021 02:17:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 52268 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 52268@debbugs.gnu.org Cc: Ricardo Wurmus , John Kehayias , 51252@debbugs.gnu.org, Robin Templeton , Thiago Jung Bauermann X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.163858421818130 (code B ref -1); Sat, 04 Dec 2021 02:17:01 +0000 Received: (at submit) by debbugs.gnu.org; 4 Dec 2021 02:16:58 +0000 Received: from localhost ([127.0.0.1]:52512 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mtKbh-0004iL-ST for submit@debbugs.gnu.org; Fri, 03 Dec 2021 21:16:58 -0500 Received: from lists.gnu.org ([209.51.188.17]:55080) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mtKbe-0004i5-LN for submit@debbugs.gnu.org; Fri, 03 Dec 2021 21:16:55 -0500 Received: from eggs.gnu.org ([209.51.188.92]:35930) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mtKbe-0004Ck-Fq for guix-patches@gnu.org; Fri, 03 Dec 2021 21:16:54 -0500 Received: from mx.kolabnow.com ([212.103.80.155]:12100) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mtKbZ-0007tI-Ep for guix-patches@gnu.org; Fri, 03 Dec 2021 21:16:52 -0500 Received: from localhost (unknown [127.0.0.1]) by mx.kolabnow.com (Postfix) with ESMTP id D16C116B2; Sat, 4 Dec 2021 03:16:44 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kolabnow.com; h= content-transfer-encoding:content-type:content-type:mime-version :message-id:date:date:subject:subject:from:from:received :received:received; s=dkim20160331; t=1638584203; x=1640398604; bh=+nEzC6Rmr63noJFY27eOrDqOicBnI7z1bZ9Evz6sPog=; b=tSaumSTd45hX geUssWW4oD4VcpohbFZ+qa8v2u/Yl56MCDXca9hhYAP5s56sOiqF6AMSoNU0NaJr 1auxZlAGw+fEDJXiwJR5y0GsVakb5+v3IXikJtPtUlnMlEQPlhtBODaczScGWOhs 5J9HVvAdmDt8RhS/nz+E5+BGAUYUOkevxDMEBts61vIDnqqgIWByCbIcHXSx+mGD Dse7+In9zUjCBvCYJknIQPiN28gXB4LWnw2lpORLlVp8sIihtTvz7HOC8Rfa1bky i/9S/ng3S9AhzQtYNDMMZ36/1m28I5NuB5gwpZVrH5KvTvusApVGXXZz2Ao4yddM woNUM6eW9ihaTDswG09VFUeSIzveMqU45yjeWSDqOV8lxvmOsIiJJ9uyZ+FJHYae FoG7LL6KKpFp/va5gSM7mvmqdxSRHTUslG69kDMoPXlPR/UJ1dP5R6KTuRQpLy8f HobZqI2hWQCZa72n96ooirftIOiVSbAfmeQJrQVqPhLu7vlKEq8uB1M7ZqJiwX2b Wix2N8/lMRX66fFuYpW+/29nFHV2awAb+ejGgcmMVl7XVBBbXEzCe1hlHi5E6gIb gqqO8AGkKHosOZv+y4pgObJYqTsPfTr476pNdOKjJWzdUhH8qt8q9xuEiNnglSIe R6LY4YYCj7LLSvYrgWzApkeWrXbrcW8= X-Virus-Scanned: amavisd-new at mykolab.com Received: from mx.kolabnow.com ([127.0.0.1]) by localhost (ext-mx-out001.mykolab.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id XW8NDx7Dkc7m; Sat, 4 Dec 2021 03:16:43 +0100 (CET) Received: from int-mx003.mykolab.com (unknown [10.9.13.3]) by mx.kolabnow.com (Postfix) with ESMTPS id A1BF9E60; Sat, 4 Dec 2021 03:16:43 +0100 (CET) Received: from ext-subm003.mykolab.com (unknown [10.9.6.3]) by int-mx003.mykolab.com (Postfix) with ESMTPS id 49194642D; Sat, 4 Dec 2021 03:16:41 +0100 (CET) Date: Fri, 3 Dec 2021 23:16:11 -0300 Message-Id: <20211204021611.80688-1-bauermann@kolabnow.com> MIME-Version: 1.0 Received-SPF: pass client-ip=212.103.80.155; envelope-from=bauermann@kolabnow.com; helo=mx.kolabnow.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" Reply-to: Thiago Jung Bauermann X-ACL-Warn: , Thiago Jung Bauermann via Guix-patches X-Patchwork-Original-From: Thiago Jung Bauermann via Guix-patches via From: Thiago Jung Bauermann X-getmail-retrieved-from-mailbox: Patches When TeX Live was updated to version 2021 the ‘lualatex’ format started being generated with the LuaHBTeX engine, but the ‘lualatex’ command still uses the LuaTeX engine. This causes the command to fail: user@popigai:~$ lualatex hello.tex This is LuaTeX, Version 1.13.0 (TeX Live 2021/GNU Guix) restricted system commands enabled. ---! lualatex.fmt was written by luahbtex (Fatal format file error; I'm stymied)user@popigai:~$ The correct way to fix this problem would be either to change texlive-bin to make ‘lualatex’ use the LuaHBTeX engine, or to change texlive-latex-base to generate ‘lualatex.fmt’ with LuaTeX. Both options would rebuild large parts of the world. Ricardo Wurmus suggested creating a new package to provide ‘lualatex.fmt’ for LuaTeX as a workaround. This is what this package does. Fixes https://issues.guix.gnu.org/51252. * gnu/packages/tex.scm (texlive-latex-luatex): New variable. --- Hello, Strictly speaking, this patch solves the problem reported in issue 51252, but I still cannot use ‘lualatex’ because of a problem with fonts: --8<---------------cut here---------------start------------->8--- user@popigai:~$ lualatex hello.tex This is LuaTeX, Version 1.13.0 (TeX Live 2021/GNU Guix) restricted system commands enabled. (./hello.tex LaTeX2e <2020-10-01> patch level 4 L3 programming layer <2021-02-18> (/home/user/.guix-profile/share/texmf-dist/tex/latex/base/article.cls Document Class: article 2020/04/10 v1.4m Standard LaTeX document class (/home/user/.guix-profile/share/texmf-dist/tex/latex/base/size10.clo luaotfload | db : Font names database not found, generating new one. luaotfload | db : This can take several minutes; please be patient. luaotfload | db : Reload initiated (formats: otf,ttf,ttc); reason: File not found: "lmroman10-regular". ! Font \TU/lmr/m/n/10=[lmroman10-regular]:+tlig; at 10pt not loadable: metric data not found or bad. relax l.54 \normalsize ? ! Emergency stop. relax l.54 \normalsize 307 words of node memory still in use: 1 hlist, 1 dir, 3 kern, 1 glyph, 1 attribute, 39 glue_spec, 1 attribute_list, 3 if_stack nodes avail lists: 2:7,3:3,4:1,5:1 ! ==> Fatal error occurred, no output PDF file produced! Transcript written on hello.log. --8<---------------cut here---------------end--------------->8--- This happens even though I have the packages texlive-base, texlive-lm and texlive-fonts-latex installed in the profile. I suspect this is a problem with luaotfload. I’ll poke at it a bit to see if I can find something out. The reporter of 51252 doesn’t seem to hit this font issue, so perhaps this patch will be enough for them. In the (hopefuly) near future, I’ll submit a patch for core-updates changing ‘lualatex’ to use the LuaHBTeX engine and deprecating this package. Thanks, Thiago gnu/packages/tex.scm | 65 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) base-commit: 6d4f260166eb499564fa31ce487ecf301f445e4e diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm index 910be212ac17..256fe7da90bc 100644 --- a/gnu/packages/tex.scm +++ b/gnu/packages/tex.scm @@ -3746,6 +3746,71 @@ (define-public texlive-luaotfload (define-deprecated-package texlive-luatex-luaotfload texlive-luaotfload) +;; FIXME: This package is a temporary workaround to provide ‘lualatex.fmt’ for +;; the LuaTeX engine. It is needed because it was discovered too late in the +;; core-updates-frozen cycle that texlive-latex-base only provides it for +;; LuaHBTeX. See https://issues.guix.gnu.org/51252. +(define-public texlive-latex-luatex + (package + (name "texlive-latex-luatex") + (version (number->string %texlive-revision)) + (source #f) + (build-system gnu-build-system) + (arguments + `(#:modules ((guix build gnu-build-system) + (guix build utils) + (ice-9 rdelim) + (ice-9 string-fun)) + #:phases + (modify-phases %standard-phases + (delete 'unpack) + (delete 'bootstrap) + (delete 'configure) + (delete 'check) + (replace 'build + (lambda* (#:key inputs #:allow-other-keys) + (mkdir "web2c") + (let ((fmtutil.cnf-in (open-file + (string-append + (assoc-ref inputs "texlive-kpathsea") + "/share/texmf-dist/web2c/fmtutil.cnf") + "r")) + (fmtutil.cnf-out (open-file "web2c/fmtutil.cnf" "w"))) + + ;; Copy ‘lualatex’ format lines to the new fmtutil.cnf, changing + ;; the engine from ‘luahbtex’ to ‘luatex’. + (do ((line "" (read-line fmtutil.cnf-in 'concat))) + ((eof-object? line)) + (when (string-prefix? "lualatex" line) + (display (string-replace-substring line "luahbtex" "luatex") + fmtutil.cnf-out))) + (close-port fmtutil.cnf-out) + (close-port fmtutil.cnf-in) + + (invoke "fmtutil" "--sys" "--all" "--fmtdir=web2c" + "--cnffile=web2c/fmtutil.cnf") + + ;; Don't risk this file interfering with anything else. + (delete-file "web2c/fmtutil.cnf")))) + (replace 'install + (lambda* (#:key outputs #:allow-other-keys) + (let ((web2c (string-append %output "/share/texmf-dist/web2c"))) + (mkdir-p web2c) + (copy-recursively "web2c" web2c))))))) + (native-inputs + `(("texlive-bin" ,texlive-bin) + ("texlive-babel" ,texlive-babel) + ("texlive-cm" ,texlive-cm) + ("texlive-fonts-latex" ,texlive-fonts-latex) + ("texlive-kpathsea" ,texlive-kpathsea) + ("texlive-latex-base" ,texlive-latex-base) + ("texlive-lm" ,texlive-lm) + ("texlive-tex-ini-files" ,texlive-tex-ini-files))) + (home-page (package-home-page texlive-latex-base)) + (synopsis "LuaLaTeX format files for LuaTeX") + (description "This package is necessary to use LaTeX with the LuaTeX engine.") + (license (package-license texlive-latex-base)))) + (define-public texlive-latex-amsmath (package (name "texlive-latex-amsmath")