Improvements to path resolution in tlmgr and other scripts using kpathsea

Daniel Nachun daniel.nachun at
Tue Sep 21 05:20:40 CEST 2021

Hi Norbert,

Thanks for the quick and helpful response.  We'd definitely appreciate upstream feedback on how to package TeXLive right, and I've pinged you in the PR on GitHub in case you want to provide feedback there.

There are a few differences between the way Homebrew and Debian are maintained that are worth noting:
1) Homebrew tries to avoid carrying patches ourselves as much as possible.  We do not have dedicated maintainers for specific packages so it's not efficient or easy for us to maintain patches.  For that reason we try to find solutions that require minimal patching, or try to upstream patches when possible.
2) Every package exists in its own subdirectory in HOMEBREW_PREFIX/Cellar/PACKAGE_NAME/VERSION, so the root directory for TeXLive would be HOMEBREW_PREFIX/Cellar/texlive/58837.  Ideally we'd be able to treat HOMEBREW_PREFIX/Cellar/texlive/58837 like /usr/ is on Debian, though that does not work at the moment for the reasons mentioned in my previous email.
3) We don't typically split packages up the way Debian and other distros do for some large packages like TeXLive or Qt.  This is done for ease of maintenance, in exchange for packages like TeXLive being larger.

It is most certainly possible to test our formula on Linux by using our Docker image, which should be identical to what is used in our Linux CI.  It can be started with docker run -it homebrew/ubuntu16.04:master.  The differences between macOS and Linux for this formula are trivial - basically just disabling X.  So whatever you test in Linux will be equally applicable on macOS.  Let me know if further guidance is needed on how to do the testing in Docker as I use it all the time.

Daniel Nachun

On 9/20/21, 18:16, "Norbert Preining" <norbert at> wrote:

    Hi Daniel,

    (intro: author of tlmgr and texlive infra, and maintainer of texlive-*
    in Debian)

    > We are currently attempting to package TeXLive in Homebrew:

    Interesting. I have written one recipe for homebrew/linuxbrew but never
    tried to do that for TeX Live!

    > kpsewhich –var-value SELFAUTOPARENT.  

    We have the same problem in Debian, and we patch out the whole BEGIN
    block and auto-switch to user mode in Debian, see:
    There are some other patches you might want to look into.
    Our (Debian) layout is
    	/usr/bin/*	binaries and scripts linked
    	/usr/share/texlive/texmf-dist	main tree

    I can surely help you with the homebrew adaption (if testing is possible
    on linux with linuxbrew, I don't have macs around). Feel free to ping



    PREINING Norbert                    
    Fujitsu Research  +  IFMGA Guide  +  TU Wien  +  TeX Live  + Debian Dev
    GPG: 0x860CDC13   fp: F7D8 A928 26E3 16A1 9FA0 ACF0 6CAC A448 860C DC13

More information about the tex-live mailing list.