#6 Fix xindy build by eliminating race to create latex.fmt.
Merged 4 years ago by spot. Opened 4 years ago by jjames.
Unknown source master  into  master

file modified
+16 -26
@@ -15,13 +15,9 @@

  # We do not want exec perms changing.

  %global __brp_mangle_shebangs_exclude ^$

  

- # Not ppc64, not s390x, not aarch64 due to lack of clisp

- # code SIGSEGV's on armv7hl

- %global xindy_arches empty

- 

  Name: %{shortname}-base

  Version: %{source_date}

- Release: 35%{?dist}

+ Release: 36%{?dist}

  Epoch: 7

  Summary: TeX formatting system

  # The only files in the base package are directories, cache, and license texts
@@ -440,10 +436,8 @@

  # This is really for macros.

  BuildRequires: python3-devel

  # This is for xindy

- %ifarch %{xindy_arches}

  BuildRequires: clisp-devel

  BuildRequires: texlive-cyrillic, texlive-latex, texlive-metafont, texlive-cm-super, texlive-ec

- %endif

  # Cleanup Provides/Obsoletes

  # texlive-cjk-gs-integrate (depackaged 2018-03-09)

  Provides: texlive-cjk-gs-integrate = %{epoch}:%{source_date}-%{release}
@@ -6305,7 +6299,6 @@

  XeTeX is now part of the standard TeX distribution TeXLive and works well with

  TeX macro packages like LaTeX and ConTeXt.

  

- %ifarch %{xindy_arches}

  %package -n %{shortname}-xindy

  Provides: tex-xindy = %{epoch}:%{source_date}-%{release}

  Provides: tex-xindy-bin = %{epoch}:%{source_date}-%{release}
@@ -6329,7 +6322,6 @@

  using (La)TeX, Nroff family and SGML-based languages. Xindy is

  highly configurable, both in markup terms and in terms of the

  collating order of the text being processed.

- %endif

  

  %package -n %{shortname}-xmltex

  Provides: tex-xmltex = %{epoch}:%{source_date}-%{release}
@@ -6425,6 +6417,17 @@

  %global mysources %{lua: for index,value in ipairs(sources) do if index >= 16 then print(value.." ") end end}

  

  %build

+ # Make texlive generate latex.fmt, so that multiple threads do not race to

+ # make it during the xindy build.

+ cat > dummy.tex << EOF

+ \documentclass{article}

+ \begin{document}

+ This is a document.

+ \end{document}

+ EOF

+ latex dummy.tex

+ rm -f dummy.*

+ 

  export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing -Werror=format-security"

  export CXXFLAGS="$RPM_OPT_FLAGS -std=c++11 -fno-strict-aliasing -Werror=format-security"

  # When redhat-rpm-config is updated in all stable targets, this conditional can go away
@@ -6447,11 +6450,7 @@

  %ifarch aarch64 %{mips} %{power64} s390 s390x

  --disable-luajittex --disable-mfluajit \

  %endif

- %ifarch %{xindy_arches}

  --enable-xindy --disable-xindy-docs --disable-xindy-make-rules \

- %else

- --disable-xindy --disable-xindy-docs --disable-xindy-make-rules \

- %endif

  --disable-rpath

  

  # disable rpath
@@ -6706,17 +6705,6 @@

  find %{buildroot}%{_texdir}/texmf-dist/doc/man -type f | xargs rm -f

  mv %{buildroot}%{_texdir}/texmf-dist/doc/info/* %{buildroot}%{_infodir}/

  

- %ifarch %{xindy_arches}

- # nothing to do here

- %else

- rm -rf %{buildroot}%{_mandir}/man1/xindy.1*

- rm -rf %{buildroot}%{_mandir}/man1/texindy.1*

- rm -rf %{buildroot}%{_mandir}/man1/tex2xindy.1*

- rm -rf %{buildroot}%{_texdir}/texmf-dist/scripts/xindy

- rm -rf %{buildroot}%{_texdir}/texmf-dist/xindy

- rm -rf %{buildroot}%{_texdir}/texmf-dist/doc/xindy

- %endif

- 

  # Remove cjk-gs-integrate files

  # Yes, we probably should remove the source, but there is a possibility that we will

  # re-add this subpackage at some point.
@@ -8736,7 +8724,6 @@

  %{fmtutil_cnf_d}/xetex

  %doc %{_texdir}/texmf-dist/doc/xetex/

  

- %ifarch %{xindy_arches}

  %files -n %{shortname}-xindy

  %license gpl.txt

  %{_bindir}/tex2xindy
@@ -8749,7 +8736,6 @@

  %{_texdir}/texmf-dist/scripts/xindy/

  %{_texdir}/texmf-dist/xindy/

  %doc %{_texdir}/texmf-dist/doc/xindy/

- %endif

  

  %files -n %{shortname}-xmltex

  %license lppl1.txt
@@ -8767,6 +8753,10 @@

  %doc %{_texdir}/texmf-dist/doc/latex/yplan/

  

  %changelog

+ * Wed May 15 2019 Jerry James <loganjerry@gmail.com> - 7:20180414-36

+ - Fix xindy build by eliminating race to create latex.fmt

+ - Build xindy on all supported arches

+ 

  * Tue Mar 19 2019 Tom Callaway <spot@fedoraproject.org> - 7:20180414-35

  - do not throw no file error in synctex

  

Also, build xindy on all supported arches.

So, the fix for the xindy build makes sense, but we know that xindy doesn't work properly on all architectures, so enabling it everywhere does not.

Ah, I thought the only problem was its sporadic build failures. Sorry for the misunderstanding. Can you tell me which architectures have been problematic in the past? I'll see if I can figure out what the issues are.

My comment in the spec says:

Not ppc64, not s390x, not aarch64 due to lack of clisp

... but this looks to be outdated looking at the clisp spec file.

code SIGSEGV's on armv7hl

Maybe this isn't true anymore?

Well, it doesn't segfault during the build. I'll try to use it on one of the ARM test machines and see if it behaves.

The texlive-xindy package needs to have "Requires: clisp". It tries to invoke /usr/bin/clisp. After installing clisp by hand, I ran through all of the examples in the xindy style tutorial, plus a few permutations they don't mention in the actual tutorial. All worked fine; no segfaults. It looks like the ARM build is at least minimally okay.

Pull-Request has been merged by spot

4 years ago