[tlbuild] running into problems with "prefix", for starters.

Amos a.goo0h at gmail.com
Mon Feb 4 02:45:28 CET 2019


Background/Disclaimer:


This is not the first time that I've built the TeX suite.  I built it for
our site before tetex, and then tetex came along and that was cool.  Now
thought I'd try TeXLive.

We deploy some things in a local repo for things we build for whatever
reason, and I like using spec files because they are self-documenting as to
how it was built, and what needs to be done (via %post) at installation
time.  For example, updating ld cache, if necessary.

I tend to install these internally-built RPMs under /usr/local, out of
historical precedence, but also it's handy to clearly show what in fact has
been distributed locally.

I realize a lot has changed with TeXLive, so please excuse my ignorance.
I'm only now resorting to posting because even after many hours working on
this and reading the docs, it's still not clear to me what I may be doing
wrong.


Questions/Observations:


1) "prefix" not always honored?  When I try building like so:

----vvvv---- excerpt ----vvvv----

%define prefix          /usr/local
%define texmf_dist_root         %{prefix}/share

%build
mkdir -p work
cd work
../configure --disable-xindy --disable-dvisvgm
--disable-native-texlive-build

%install
## unpack the texmf stuff
mkdir -p %{buildroot}%{texmf_dist_root}
pushd %{buildroot}%{texmf_dist_root}
xzcat %{SOURCE1} | tar xf -
pushd texlive-*-texmf
find texmf-dist/* | cpio -pdm %{buildroot}%{texmf_dist_root}
popd
rm -rf texlive-*-texmf
popd

cd work
%__make install DESTDIR=%{buildroot}

----^^^^---- excerpt ----^^^^----

Then I install this rpm, and try things:

$ kpsewhich --all texmf.cnf
/usr/local/share/texmf-dist/web2c/texmf.cnf

However, when I try to actually process any files, I'm greeted with:

Can't locate mktexlsr.pl in @INC (@INC contains: /usr/tlpkg
/usr/texmf-dist/scripts/texlive
/usr/local/lib/perl5/site_perl/5.26.2/x86_64-linux
/usr/local/lib/perl5/site_perl/5.26.2
/usr/local/lib/perl5/5.26.2/x86_64-linux /usr/local/lib/perl5/5.26.2) at
/usr/local/bin/mktexfmt line 23.
BEGIN failed--compilation aborted at /usr/local/bin/mktexfmt line 25.
I can't find the format file `latex.fmt'!

This tells me that the default prefix isn't being correctly defined in all
the binaries/scripts.


2) OK, so I change things up to use internally defined configure RPM
macros. This has the side effect of setting "prefix" to "/usr".

----vvvv---- excerpt ----vvvv----

%define prefix          /usr
%define texmf_dist_root         %{prefix}/share

%build
mkdir -p work
cd work

%global _configure ../configure

%configure --disable-xindy --disable-dvisvgm --disable-native-texlive-build

%install
## unpack the texmf stuff
mkdir -p %{buildroot}%{texmf_dist_root}
pushd %{buildroot}%{texmf_dist_root}
xzcat %{SOURCE1} | tar xf -
pushd texlive-*-texmf
find texmf-dist/* | cpio -pdm %{buildroot}%{texmf_dist_root}
popd
rm -rf texlive-*-texmf
popd

cd work
%__make install DESTDIR=%{buildroot}

----^^^^---- excerpt ----^^^^----

This did result in a collision with /usr/bin/man, which seems pretty odd.
Turns out it was a sym link to "../share/texmf-dist/doc/man".  Anyway,
getting past that, I still have problems with "prefix" getting messed up.

$ kpsewhich --all texmf.cnf
/usr/share/texmf-dist/web2c/texmf.cnf

$ latex small2e.tex
This is TeXk, Version 3.14159265 (TeX Live 2018) (preloaded format=latex)
 restricted \write18 enabled.

kpathsea: Running mktexfmt latex.fmt
Can't locate mktexlsr.pl in @INC (@INC contains: //tlpkg
//texmf-dist/scripts/texlive
/usr/local/lib/perl5/site_perl/5.26.2/x86_64-linux
/usr/local/lib/perl5/site_perl/5.26.2
/usr/local/lib/perl5/5.26.2/x86_64-linux /usr/local/lib/perl5/5.26.2) at
/usr/bin/mktexfmt line 23.
BEGIN failed--compilation aborted at /usr/bin/mktexfmt line 25.
I can't find the format file `latex.fmt'!



3) Installing TeXLive in this manner, there's no "latex" nor "pdflatex"
commands.  Why?  I can sym link them to tex and pdftex, respectively. (I
believe that's the correct thing to do.) However, I'm wondering why this
isn't done as part of the "make install".


Thanks in advance to any pointers.

Amos
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://tug.org/pipermail/tlbuild/attachments/20190203/c9d9d734/attachment.html>


More information about the tlbuild mailing list