GNU bug report logs - #36513
texlive-union: Build missing font maps.

Previous Next

Package: guix-patches;

Reported by: Ricardo Wurmus <rekado <at> elephly.net>

Date: Fri, 5 Jul 2019 15:56:01 UTC

Severity: normal

Done: Ricardo Wurmus <rekado <at> elephly.net>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 36513 in the body.
You can then email your comments to 36513 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#36513; Package guix-patches. (Fri, 05 Jul 2019 15:56:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Ricardo Wurmus <rekado <at> elephly.net>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Fri, 05 Jul 2019 15:56:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Ricardo Wurmus <rekado <at> elephly.net>
To: guix-patches <at> gnu.org
Cc: ludo <at> gnu.org
Subject: texlive-union: Build missing font maps.
Date: Fri, 05 Jul 2019 17:54:54 +0200
[Message part 1 (text/plain, inline)]
Hi Guix,

this patch causes texlive-union to include pdftex.map, among other font
map files.  This is achieved by running updmap in the builder.

This should fix a couple of problems.

Unfortunately, this doesn’t fix the same problem with the profile hook,
so I think this means that the profile hook should be using
texlive-union to avoid duplication.

What do you think?

--
Ricardo

[0001-gnu-texlive-union-Build-font-maps.patch (text/x-patch, inline)]
From 11900d109a617d07e0085a25e747da76fcb12c2e Mon Sep 17 00:00:00 2001
From: Ricardo Wurmus <rekado <at> elephly.net>
Date: Fri, 5 Jul 2019 17:48:45 +0200
Subject: [PATCH] gnu: texlive-union: Build font maps.

* gnu/packages/tex.scm (texlive-union)[arguments]: Execute updmap to generate
missing font maps.
[native-inputs]: Add coreutils, sed, and updmap.cfg.
---
 gnu/packages/tex.scm | 38 ++++++++++++++++++++++++++++++++++----
 1 file changed, 34 insertions(+), 4 deletions(-)

diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index ec35315f22..85c72e006a 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -2387,16 +2387,18 @@ standard LaTeX packages."
            #:builder
            (begin
              (use-modules (ice-9 match)
+                          (ice-9 popen)
                           (srfi srfi-26)
                           (guix build union)
                           (guix build utils)
                           (guix build texlive-build-system))
              (let* ((out       (assoc-ref %outputs "out"))
                     (texmf.cnf (string-append out "/share/texmf-dist/web2c/texmf.cnf")))
-               ;; Build a modifiable union of all inputs (but exclude bash)
+               ;; Build a modifiable union of all inputs (but exclude bash and
+               ;; the updmap.cfg file)
                (match (filter (match-lambda
                                 ((name . _)
-                                 (not (string=? "bash" name))))
+                                 (not (member name '("bash" "updmap.cfg")))))
                               %build-inputs)
                  (((names . directories) ...)
                   (union-build (assoc-ref %outputs "out")
@@ -2413,19 +2415,47 @@ standard LaTeX packages."
                   (string-append "TEXMFROOT = " out "/share\n"))
                  (("^TEXMF = .*")
                   "TEXMF = $TEXMFROOT/share/texmf-dist\n"))
-               (setenv "PATH" (string-append (assoc-ref %build-inputs "bash")
-                                             "/bin"))
+               (setenv "PATH" (string-append
+                               (assoc-ref %build-inputs "bash") "/bin:"
+                               (assoc-ref %build-inputs "coreutils") "/bin:"
+                               (string-append out "/bin")))
                (for-each
                 (cut wrap-program <>
                      `("TEXMFCNF" ":" suffix (,(dirname texmf.cnf)))
                      `("TEXMF"    ":" suffix (,(string-append out "/share/texmf-dist"))))
                 (find-files (string-append out "/bin") ".*"))
+
+               ;; Remove invalid maps from config file.
+               (let ((port (open-pipe* OPEN_WRITE "updmap-sys"
+                                       "--syncwithtrees"
+                                       "--nohash"
+                                       (assoc-ref %build-inputs "updmap.cfg"))))
+                 (display "Y\n" port)
+                 (when (not (zero? (status:exit-val (close-pipe port))))
+                   (error "failed to filter updmap.cfg")))
+               ;; Generate maps.
+               (invoke "updmap-sys" "--force"
+                       (string-append out "/share/texmf-config/web2c/updmap.cfg"))
                #t))))
         (inputs
          `(("bash" ,bash)
            ,@(map (lambda (package)
                     (list (package-name package) package))
                   (append default-packages packages))))
+        (native-inputs
+         `(("coreutils" ,coreutils)
+           ("sed" ,sed)
+           ("updmap.cfg"
+            ,(origin
+               (method url-fetch)
+               (uri (string-append "https://tug.org/svn/texlive/tags/"
+                                   %texlive-tag "/Master/texmf-dist/web2c/updmap.cfg"
+                                   "?revision=" (number->string %texlive-revision)))
+               (file-name (string-append "updmap.cfg-"
+                                         (number->string %texlive-revision)))
+               (sha256
+                (base32
+                 "06mwpy5i218g5k3sf4gba0fmxgas82hkzx9fhwn67z5ik37d8apq"))))))
         (home-page (package-home-page texlive-bin))
         (synopsis "Union of TeX Live packages")
         (description "This package provides a subset of the TeX Live
-- 
2.21.0


Information forwarded to guix-patches <at> gnu.org:
bug#36513; Package guix-patches. (Mon, 15 Jul 2019 20:33:02 GMT) Full text and rfc822 format available.

Message #8 received at 36513 <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: Ricardo Wurmus <rekado <at> elephly.net>
Cc: 36513 <at> debbugs.gnu.org
Subject: Re: [bug#36513] texlive-union: Build missing font maps.
Date: Mon, 15 Jul 2019 22:31:47 +0200
Hello,

Ricardo Wurmus <rekado <at> elephly.net> skribis:

>>From 11900d109a617d07e0085a25e747da76fcb12c2e Mon Sep 17 00:00:00 2001
> From: Ricardo Wurmus <rekado <at> elephly.net>
> Date: Fri, 5 Jul 2019 17:48:45 +0200
> Subject: [PATCH] gnu: texlive-union: Build font maps.
>
> * gnu/packages/tex.scm (texlive-union)[arguments]: Execute updmap to generate
> missing font maps.
> [native-inputs]: Add coreutils, sed, and updmap.cfg.

I’m blissfully ignorant about TeX’s font maps, but I can say that this
fixes a warning about missing font maps that I had when using a
‘texlive-union’ as a package input.

Now, that probably leads to a big rebuild.  Can we estimate the number
of dependents?

Thank you!

Ludo’.




Information forwarded to guix-patches <at> gnu.org:
bug#36513; Package guix-patches. (Mon, 15 Jul 2019 20:48:01 GMT) Full text and rfc822 format available.

Message #11 received at 36513 <at> debbugs.gnu.org (full text, mbox):

From: Ricardo Wurmus <rekado <at> elephly.net>
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: Pierre Neidhardt <mail <at> ambrevar.xyz>, 36513 <at> debbugs.gnu.org
Subject: Re: [bug#36513] texlive-union: Build missing font maps.
Date: Mon, 15 Jul 2019 22:47:11 +0200
Hi Ludo,

> Ricardo Wurmus <rekado <at> elephly.net> skribis:
>
>>>From 11900d109a617d07e0085a25e747da76fcb12c2e Mon Sep 17 00:00:00 2001
>> From: Ricardo Wurmus <rekado <at> elephly.net>
>> Date: Fri, 5 Jul 2019 17:48:45 +0200
>> Subject: [PATCH] gnu: texlive-union: Build font maps.
>>
>> * gnu/packages/tex.scm (texlive-union)[arguments]: Execute updmap to generate
>> missing font maps.
>> [native-inputs]: Add coreutils, sed, and updmap.cfg.
>
> I’m blissfully ignorant about TeX’s font maps, but I can say that this
> fixes a warning about missing font maps that I had when using a
> ‘texlive-union’ as a package input.
>
> Now, that probably leads to a big rebuild.  Can we estimate the number
> of dependents?

In addition to this change I just pushed to wip-texlive a number of
changes that may lead to an even bigger number of rebuilds due to
changes in the svn fetcher and even more TeX packages.

(I noticed that the branch name “wip-texlive” was already taken by the
attempt to add a new importer, so I just cherry-picked that commit and
replaced the branch.)

I don’t know yet if it leads to practical improvements for users, but at
least it greatly simplifies the definition of texlive-* packages.

I have yet to double check the often unclear licenses of the
texlive-hyphen-* packages.  Other than that and the WIP commit by Pierre
at the tip I think these changes are very close to their final form.

--
Ricardo





Information forwarded to guix-patches <at> gnu.org:
bug#36513; Package guix-patches. (Fri, 19 Jul 2019 12:05:02 GMT) Full text and rfc822 format available.

Message #14 received at 36513 <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: Ricardo Wurmus <rekado <at> elephly.net>
Cc: Pierre Neidhardt <mail <at> ambrevar.xyz>, 36513 <at> debbugs.gnu.org
Subject: Re: [bug#36513] texlive-union: Build missing font maps.
Date: Fri, 19 Jul 2019 14:04:24 +0200
Hello,

Ricardo Wurmus <rekado <at> elephly.net> skribis:

> In addition to this change I just pushed to wip-texlive a number of
> changes that may lead to an even bigger number of rebuilds due to
> changes in the svn fetcher and even more TeX packages.
>
> (I noticed that the branch name “wip-texlive” was already taken by the
> attempt to add a new importer, so I just cherry-picked that commit and
> replaced the branch.)
>
> I don’t know yet if it leads to practical improvements for users, but at
> least it greatly simplifies the definition of texlive-* packages.
>
> I have yet to double check the often unclear licenses of the
> texlive-hyphen-* packages.  Other than that and the WIP commit by Pierre
> at the tip I think these changes are very close to their final form.

Yay, very nice!

When it’s ready, we can ask berlin to build it as a separate branch and
merge it once it’s done.

Thanks a lot!

Ludo’.




Information forwarded to guix-patches <at> gnu.org:
bug#36513; Package guix-patches. (Mon, 22 Jul 2019 19:29:01 GMT) Full text and rfc822 format available.

Message #17 received at 36513 <at> debbugs.gnu.org (full text, mbox):

From: Ricardo Wurmus <rekado <at> elephly.net>
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: Pierre Neidhardt <mail <at> ambrevar.xyz>, 36513 <at> debbugs.gnu.org
Subject: Re: [bug#36513] texlive-union: Build missing font maps.
Date: Mon, 22 Jul 2019 21:28:00 +0200
Hi,

Ludovic Courtès <ludo <at> gnu.org> writes:

> Ricardo Wurmus <rekado <at> elephly.net> skribis:
>
>> In addition to this change I just pushed to wip-texlive a number of
>> changes that may lead to an even bigger number of rebuilds due to
>> changes in the svn fetcher and even more TeX packages.
>>
>> (I noticed that the branch name “wip-texlive” was already taken by the
>> attempt to add a new importer, so I just cherry-picked that commit and
>> replaced the branch.)
>>
>> I don’t know yet if it leads to practical improvements for users, but at
>> least it greatly simplifies the definition of texlive-* packages.
>>
>> I have yet to double check the often unclear licenses of the
>> texlive-hyphen-* packages.  Other than that and the WIP commit by Pierre
>> at the tip I think these changes are very close to their final form.
>
> Yay, very nice!
>
> When it’s ready, we can ask berlin to build it as a separate branch and
> merge it once it’s done.

The “wip-texlive” branch is now being built on Berlin.

(I removed the WIP importer from “wip-texlive” and pushed it to a new
“wip-texlive-importer” branch instead.)

--
Ricardo





Information forwarded to guix-patches <at> gnu.org:
bug#36513; Package guix-patches. (Mon, 22 Jul 2019 20:20:01 GMT) Full text and rfc822 format available.

Message #20 received at 36513 <at> debbugs.gnu.org (full text, mbox):

From: Pierre Neidhardt <mail <at> ambrevar.xyz>
To: Ricardo Wurmus <rekado <at> elephly.net>, Ludovic Courtès
 <ludo <at> gnu.org>
Cc: 36513 <at> debbugs.gnu.org
Subject: Re: [bug#36513] texlive-union: Build missing font maps.
Date: Mon, 22 Jul 2019 22:19:07 +0200
[Message part 1 (text/plain, inline)]
Thanks for making progress on this! :)

Out of curiosity, why bother renaming the branches and not simply choose
a different name, e.g. wip-texlive-union?  Is there something special with
the "wip-texlive" name?

-- 
Pierre Neidhardt
https://ambrevar.xyz/
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#36513; Package guix-patches. (Mon, 22 Jul 2019 21:30:02 GMT) Full text and rfc822 format available.

Message #23 received at 36513 <at> debbugs.gnu.org (full text, mbox):

From: Ricardo Wurmus <rekado <at> elephly.net>
To: Pierre Neidhardt <mail <at> ambrevar.xyz>
Cc: Ludovic Courtès <ludo <at> gnu.org>, 36513 <at> debbugs.gnu.org
Subject: Re: [bug#36513] texlive-union: Build missing font maps.
Date: Mon, 22 Jul 2019 23:27:48 +0200
Pierre Neidhardt <mail <at> ambrevar.xyz> writes:

> Thanks for making progress on this! :)
>
> Out of curiosity, why bother renaming the branches and not simply choose
> a different name, e.g. wip-texlive-union?  Is there something special with
> the "wip-texlive" name?

No.  It’s just the name I picked.

At first I thought I could include the importer but then noticed that it
isn’t close enough to finished, so I moved it out again.  Had I known
this earlier I would have picked a different branch for my work in the
first place.

-- 
Ricardo





Information forwarded to guix-patches <at> gnu.org:
bug#36513; Package guix-patches. (Wed, 04 Sep 2019 13:38:02 GMT) Full text and rfc822 format available.

Message #26 received at 36513 <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: Ricardo Wurmus <rekado <at> elephly.net>
Cc: Pierre Neidhardt <mail <at> ambrevar.xyz>, 36513 <at> debbugs.gnu.org
Subject: Re: [bug#36513] texlive-union: Build missing font maps.
Date: Wed, 04 Sep 2019 15:37:47 +0200
Hey!

Ricardo Wurmus <rekado <at> elephly.net> skribis:

> Ludovic Courtès <ludo <at> gnu.org> writes:
>
>> Ricardo Wurmus <rekado <at> elephly.net> skribis:
>>
>>> In addition to this change I just pushed to wip-texlive a number of
>>> changes that may lead to an even bigger number of rebuilds due to
>>> changes in the svn fetcher and even more TeX packages.

[...]

> The “wip-texlive” branch is now being built on Berlin.

We’ll probably need to rebase it now, but otherwise it seemed to be in
good shape: <https://berlin.guixsd.org/jobset/wip-texlive>.

Thoughts?

Ludo’.




Information forwarded to guix-patches <at> gnu.org:
bug#36513; Package guix-patches. (Wed, 04 Sep 2019 14:18:02 GMT) Full text and rfc822 format available.

Message #29 received at 36513 <at> debbugs.gnu.org (full text, mbox):

From: Ricardo Wurmus <rekado <at> elephly.net>
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: Pierre Neidhardt <mail <at> ambrevar.xyz>, 36513 <at> debbugs.gnu.org
Subject: Re: [bug#36513] texlive-union: Build missing font maps.
Date: Wed, 04 Sep 2019 16:17:21 +0200
Ludovic Courtès <ludo <at> gnu.org> writes:

> Ricardo Wurmus <rekado <at> elephly.net> skribis:
>
>> Ludovic Courtès <ludo <at> gnu.org> writes:
>>
>>> Ricardo Wurmus <rekado <at> elephly.net> skribis:
>>>
>>>> In addition to this change I just pushed to wip-texlive a number of
>>>> changes that may lead to an even bigger number of rebuilds due to
>>>> changes in the svn fetcher and even more TeX packages.
>
> [...]
>
>> The “wip-texlive” branch is now being built on Berlin.
>
> We’ll probably need to rebase it now, but otherwise it seemed to be in
> good shape: <https://berlin.guixsd.org/jobset/wip-texlive>.

It has already been merged some time ago.  I did however notice a couple
more problems with our TeX Live packages that will require some deep
rebuilds again.

I’m very close to fixing these problems, but I’m currently stuck with a
confusing search path issue that I have yet to fully understand.  Once
that’s done I’ll push my work to wip-texlive and have Berlin build it
again.

My fixes should finally solve the font problems.  (I’m using my WIP
package for “guile-cv” as a test case, which currently cannot be built
as it fails to find certain fonts.)

--
Ricardo





Information forwarded to guix-patches <at> gnu.org:
bug#36513; Package guix-patches. (Wed, 04 Sep 2019 14:52:01 GMT) Full text and rfc822 format available.

Message #32 received at 36513 <at> debbugs.gnu.org (full text, mbox):

From: Pierre Neidhardt <mail <at> ambrevar.xyz>
To: Ricardo Wurmus <rekado <at> elephly.net>, Ludovic Courtès
 <ludo <at> gnu.org>
Cc: 36513 <at> debbugs.gnu.org
Subject: Re: [bug#36513] texlive-union: Build missing font maps.
Date: Wed, 04 Sep 2019 16:51:04 +0200
[Message part 1 (text/plain, inline)]
Ricardo Wurmus <rekado <at> elephly.net> writes:

> My fixes should finally solve the font problems.  (I’m using my WIP
> package for “guile-cv” as a test case, which currently cannot be built
> as it fails to find certain fonts.)

Is this font problem related to LaTeX's "tabular" not working?

(And sorry for not helping much on this, I'd love to but really no time
at the moment.)

-- 
Pierre Neidhardt
https://ambrevar.xyz/
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#36513; Package guix-patches. (Wed, 04 Sep 2019 16:08:02 GMT) Full text and rfc822 format available.

Message #35 received at 36513 <at> debbugs.gnu.org (full text, mbox):

From: Ricardo Wurmus <rekado <at> elephly.net>
To: Pierre Neidhardt <mail <at> ambrevar.xyz>
Cc: Ludovic Courtès <ludo <at> gnu.org>, 36513 <at> debbugs.gnu.org
Subject: Re: [bug#36513] texlive-union: Build missing font maps.
Date: Wed, 04 Sep 2019 18:07:24 +0200
Pierre Neidhardt <mail <at> ambrevar.xyz> writes:

> Ricardo Wurmus <rekado <at> elephly.net> writes:
>
>> My fixes should finally solve the font problems.  (I’m using my WIP
>> package for “guile-cv” as a test case, which currently cannot be built
>> as it fails to find certain fonts.)
>
> Is this font problem related to LaTeX's "tabular" not working?

I haven’t even looked at “tabular”, but broken font maps can lead to all
sorts of problems.  I had made a rather silly mistake in running updmap,
which had no effect at all on the list of enabled font maps.

Another problem is that certain files are missing from one of the
packages.  (This was reported on IRC shortly after merging wip-texlive.)

--
Ricardo





Information forwarded to guix-patches <at> gnu.org:
bug#36513; Package guix-patches. (Thu, 05 Sep 2019 08:36:02 GMT) Full text and rfc822 format available.

Message #38 received at 36513 <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: Ricardo Wurmus <rekado <at> elephly.net>
Cc: Pierre Neidhardt <mail <at> ambrevar.xyz>, 36513 <at> debbugs.gnu.org
Subject: Re: [bug#36513] texlive-union: Build missing font maps.
Date: Thu, 05 Sep 2019 10:35:01 +0200
Moin!

Ricardo Wurmus <rekado <at> elephly.net> skribis:

> Ludovic Courtès <ludo <at> gnu.org> writes:
>
>> Ricardo Wurmus <rekado <at> elephly.net> skribis:
>>
>>> Ludovic Courtès <ludo <at> gnu.org> writes:
>>>
>>>> Ricardo Wurmus <rekado <at> elephly.net> skribis:
>>>>
>>>>> In addition to this change I just pushed to wip-texlive a number of
>>>>> changes that may lead to an even bigger number of rebuilds due to
>>>>> changes in the svn fetcher and even more TeX packages.
>>
>> [...]
>>
>>> The “wip-texlive” branch is now being built on Berlin.
>>
>> We’ll probably need to rebase it now, but otherwise it seemed to be in
>> good shape: <https://berlin.guixsd.org/jobset/wip-texlive>.
>
> It has already been merged some time ago.  I did however notice a couple
> more problems with our TeX Live packages that will require some deep
> rebuilds again.
>
> I’m very close to fixing these problems, but I’m currently stuck with a
> confusing search path issue that I have yet to fully understand.  Once
> that’s done I’ll push my work to wip-texlive and have Berlin build it
> again.

Ah OK, sounds good.

> My fixes should finally solve the font problems.  (I’m using my WIP
> package for “guile-cv” as a test case, which currently cannot be built
> as it fails to find certain fonts.)

Cool, thanks for explaining!

Ludo’.




Reply sent to Ricardo Wurmus <rekado <at> elephly.net>:
You have taken responsibility. (Sat, 17 Oct 2020 10:06:01 GMT) Full text and rfc822 format available.

Notification sent to Ricardo Wurmus <rekado <at> elephly.net>:
bug acknowledged by developer. (Sat, 17 Oct 2020 10:06:02 GMT) Full text and rfc822 format available.

Message #43 received at 36513-done <at> debbugs.gnu.org (full text, mbox):

From: Ricardo Wurmus <rekado <at> elephly.net>
To: 36513-done <at> debbugs.gnu.org
Subject: texlive-union: Build missing font maps.
Date: Sat, 17 Oct 2020 12:07:17 +0200
The wip-texlive branch has already been merged.  Closing!

-- 
Ricardo




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 14 Nov 2020 12:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 3 years and 162 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.