Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

texlive: Retain updmap.cfg #58220

Merged
merged 1 commit into from May 10, 2019
Merged

texlive: Retain updmap.cfg #58220

merged 1 commit into from May 10, 2019

Conversation

clefru
Copy link
Contributor

@clefru clefru commented Mar 24, 2019

Motivation for this change

As discussed in
#58026 (comment)

Things done

Ran pdflatex on a standard document.
Also I retain a private override which saves updmap.cfg before its deletion, and I have been running this for quite some time now, using pdflatex and xetex. I haven't noticed anything wrong with my setup by the presence of updmap.cfg and as this is part of the standard texlive distribution, I can't imagine this to be a problem.

  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nix-review --run "nix-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Assured whether relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@clefru
Copy link
Contributor Author

clefru commented Mar 24, 2019

@veprbl FYI :)

@veprbl
Copy link
Member

veprbl commented Mar 24, 2019

@clefru Did you investigate what this updmap invocation does
https://github.com/NixOS/nixpkgs/blob/c3165cba3a995b9c6852082b0cde4445ec91228a/pkgs/tools/typesetting/tex/texlive/combine.nix#L217
after you apply this?

@veprbl veprbl added the 6.topic: TeX Issues regarding texlive and TeX in general label Mar 24, 2019
@grahamc
Copy link
Member

grahamc commented Mar 24, 2019

@veprbl would you be interested in adding this TeX label to https://github.com/NixOS/ofborg/blob/released/config.public.json#L94 ?

@clefru
Copy link
Contributor Author

clefru commented Mar 25, 2019

@clefru Did you investigate what this updmap invocation does
nixpkgs/pkgs/tools/typesetting/tex/texlive/combine.nix

Line 217 in c3165cb

 perl `type -P updmap.pl` --sys --syncwithtrees --force 

after you apply this?

Good catch, and interesting case:

With updmap.cfg remove we got this during the build:

updmap will read the following updmap.cfg files (in precedence order):
updmap may write changes to the following updmap.cfg file:
  /nix/store/qm36rdipar6synlxhnj6612v0avr5qw1-texlive-combined-2018/share/texmf-config/web2c/updmap.cfg

As there are no updmap.cfg files read, this is a no-op, and no changes are written. With updmap NOT removed, so after this commit, we get this:

updmap will read the following updmap.cfg files (in precedence order):
  /nix/store/d8izs8l0yrpnmb5vd2pkhsjjhi0n8m2q-texlive-combined-2018/share/texmf/web2c/updmap.cfg
updmap may write changes to the following updmap.cfg file:
  /nix/store/d8izs8l0yrpnmb5vd2pkhsjjhi0n8m2q-texlive-combined-2018/share/texmf-config/web2c/updmap.cfg
updmap [WARNING]: generated map uptex-ko-baekmuk.map (from uptex-ko-@koEmbed@.map) does not exist, not activating it!
updmap [WARNING]: generated map uptex-ipaex.map (from uptex-@jaEmbed@@jaVariant@.map) does not exist, not activating it!
updmap [WARNING]: generated map otf-ko-baekmuk.map (from otf-ko-@koEmbed@.map) does not exist, not activating it!
updmap [WARNING]: generated map ptex-ipaex.map (from ptex-@jaEmbed@@jaVariant@.map) does not exist, not activating it!
updmap [WARNING]: generated map otf-sc-arphic.map (from otf-sc-@scEmbed@.map) does not exist, not activating it!
updmap [WARNING]: generated map otf-tc-arphic.map (from otf-tc-@tcEmbed@.map) does not exist, not activating it!
updmap [WARNING]: generated map otf-ipaex.map (from otf-@jaEmbed@.map) does not exist, not activating it!
updmap [WARNING]: generated map uptex-sc-arphic.map (from uptex-sc-@scEmbed@.map) does not exist, not activating it!
updmap [WARNING]: generated map uptex-tc-arphic.map (from uptex-tc-@tcEmbed@.map) does not exist, not activating it!
updmap [WARNING]: generated map otf-up-ipaex.map (from otf-up-@jaEmbed@.map) does not exist, not activating it!
Missing map files found, disabling
        Acorn.map (in /nix/store/d8izs8l0yrpnmb5vd2pkhsjjhi0n8m2q-texlive-combined-2018/share/texmf/web2c/updmap.cfg)
        Alegreya.map (in /nix/store/d8izs8l0yrpnmb5vd2pkhsjjhi0n8m2q-texlive-combined-2018/share/texmf/web2c/updmap.cfg)
        AnnSton.map (in /nix/store/d8izs8l0yrpnmb5vd2pkhsjjhi0n8m2q-texlive-combined-2018/share/texmf/web2c/updmap.cfg)
[...]
        yvt.map (in /nix/store/d8izs8l0yrpnmb5vd2pkhsjjhi0n8m2q-texlive-combined-2018/share/texmf/web2c/updmap.cfg)
        zi4.map (in /nix/store/d8izs8l0yrpnmb5vd2pkhsjjhi0n8m2q-texlive-combined-2018/share/texmf/web2c/updmap.cfg)
in /nix/store/d8izs8l0yrpnmb5vd2pkhsjjhi0n8m2q-texlive-combined-2018/share/texmf-config/web2c/updmap.cfg
Do you really want to continue (y/N)? answer =n=
Please fix manually before running updmap(-sys) again!

As you can see the default answer is N, so this does nothing again. In my private postBuild hacks, I do

       yes | perl `type -P updmap.pl` --sys --syncwithtrees --force || true

to get this to work. However, now we are really starting to affect the texlive derivation output by much more than just a file. We are moving updmap.cfg to a different location, namely texmf-config, and all map files are potentially updated now. I do think that this is good and correct behaviour. However, I am not an expert.

@clefru
Copy link
Contributor Author

clefru commented Mar 25, 2019

I updated the PR to add "echo y" for "updmap --syncwithtrees", so that it actually does something. See above.

@clefru
Copy link
Contributor Author

clefru commented Apr 19, 2019

Friendly ping for merge

@veprbl
Copy link
Member

veprbl commented Apr 24, 2019

Sorry for delay. I have some questions about effects of this change. I'm wondering if this updmap.cfg that comes with texlive.pkgs.tetex is consistent with the pre-generated maps that we ship. In the latest revision you enable map regeneration, I am wondering if this changes any maps or not.

My understanding is that regenerating maps doesn't really help anything you do. If we wanted to keep things simple, we would just drop that "updmap" call.

@clefru
Copy link
Contributor Author

clefru commented Apr 25, 2019

I am not sure what you mean "pre-generated maps" that we ship. If you use

texLive.combine {

}

then you might get a different updmap in your derivation depending on the fonts you put into your package selection. So there isn't really a "standard", other than maybe the standard derivations that we provide with texlive.scheme-{minimal|basic|medium|tetex|....}.

Also I looked at the updmap.cfg in the texlive.tetex.pkgs derivation and it's pretty complete. Is there something special about this updmap.cfg? I could look into all updmap.cfg that might exist in all the tex packages (around 8000), but that rests on the hypothesis that "updmap.cfg --syncwithtrees" does the wrong thing somehow with one of those updmap.cfg. I do believe that updmap.cfg --syncwithtrees always is the right thing.

@clefru
Copy link
Contributor Author

clefru commented May 3, 2019

I am not that good at mentally reloading the context of this PR with long pauses in between comments. Can we move this faster?

Copy link
Member

@veprbl veprbl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This appears to be an valid change. "updmap −−syncwithtrees" filters the existing updmap.cfg to disable unavailable maps, it seems to work as expected. No maps are regenerated by doing this, so, in principle, this affects nothing for almost all of the users. This should enable users to blindly do "updmap --user" which seem to have a potential to cause some problems for them down the line. I was thinking about instead keeping "rm updmap.cfg" and additionally completely dropping "updmap --sys --syncwithtrees" call so that texlive.combine gets slightly more simplified.

@veprbl veprbl merged commit 5d14340 into NixOS:master May 10, 2019
tadeokondrak pushed a commit to tadeokondrak/nixpkgs that referenced this pull request May 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants