Description of problem:
Installed texlive-2019-5.fc32.noarch, found output PDF is always letter size. Trying to change it to A4paper, but some errors occured, and unable to change paper size.
Version-Release number of selected component (if applicable):
Always, tested on fedora 32 rawhide on both aarch64 and x86_64
Steps to Reproduce:
1.Use xelatex/pdflatex to compile any tex source file.(in a newly installed latex environment)
2.Run "sudo tlmgr paper a4"
3.Use xelatex/pdflatex to compile any tex source file again.
The texfile didn't specify output paper size, if set to a4paper, it will give a4 output.
1.Get PDF file in letter size
[yan@localhost ~]$ sudo tlmgr paper a4
tlmgr: setting paper size for context to a4: /usr/share/texlive/texmf-config/tex/context/user/cont-sys.tex
tlmgr: setting paper size for dvipdfmx to a4: /usr/share/texlive/texmf-config/dvipdfmx/dvipdfmx.cfg
tlmgr: setting paper size for dvips to a4: /usr/share/texlive/texmf-config/dvips/config/config.ps
tlmgr: setting paper size for pdftex to a4: /usr/share/texlive/texmf-config/tex/generic/config/pdftexconfig.tex
tlmgr: setting paper size for xdvi to a4: /usr/share/texlive/texmf-config/xdvi/XDvi
tlmgr: An error has occurred. See above messages. Exiting.
But I can't found what went wrong here. /var/lib/texmf/web2c/tlmgr.log is empty, and tlmgr didn't provide any option to give verbose output(as far as i know)
3.Get PDF file in letter size
Default paper size should be changed.
texconfig paper a4 don't work either, that is no strange because texconfig calls tlmgr to change settings.
And I checked some configuration such as "/usr/share/texlive/texmf-config/dvips/config/config.ps", configuration there is correctly set to a4, and that don't work. even after "sudo fmtutil-sys --no-error-if-no-engine=luajittex,mfluajit --all"
This one is fun, because if you look at the files it references in the verbose output, it is _actually working_.
I had to tear into the perl code to figure out why this is erroring out, and it is because it is trying to set the paper size for a _sixth_ file:
That file doesn't exist currently on Fedora.
TeXLive has a fork of psutils which we had never built or packaged, because we have the upstream version of psutils (in the psutils package), but they forked their psutils code to read papersize from a config file.
So... the quickest way to handle this is to package up the TL fork of psutils as "texlive-psutils" and namespace out their binaries with a tl- prefix to avoid conflicts. We also need to add a Requires: texlive-psutils to texlive-collection-fontutils.
It is plausible that someone who invokes psutils from within TL might end up with the wrong paper size (if they use the system copy vs the namespaced copy of psutils), but this is a short term risk anyway, since upstream psutils has moved to perl code instead of C code, and there is already an issue open asking them to implement a config file for papersize so that TeXLive can use it:
FEDORA-2019-88ffe47587 has been submitted as an update to Fedora 31. https://bodhi.fedoraproject.org/updates/FEDORA-2019-88ffe47587
texlive-2019-6.fc31, texlive-base-20190410-6.fc31 has been pushed to the Fedora 31 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2019-88ffe47587
texlive-2019-6.fc31, texlive-base-20190410-6.fc31 has been pushed to the Fedora 31 stable repository. If problems still persist, please make note of it in this bug report.