On Tuesday, 28 August 2018 07.07.19 WEST Cor Blom wrote:
> LyX 2.3.1 builds fine on openSUSE.
> 
> Maybe you are interested in warnings and errors that the buildsystem
> used by openSUSE report:

I also a couple of them from building in Fedora. :-)
 
> [ 1130s] RPMLINT report:
> [ 1130s] ===============
> [ 1139s] lyx.x86_64: W: empty-%post
> [ 1139s] lyx.x86_64: W: empty-%postun

Those are harmless and useless, a common pattern among linters :-)

> [ 1139s] lyx.x86_64: W: non-executable-script
> /usr/share/lyx/lyx2lyx/profiling.py 644 /usr/bin/env python

I have changed all cases in the development branch from "/usr/bin/env python" 
to /usr/bin/python3

With stackexchange to the rescue there is a good discussion here of the 
advantages and disadvantages of this approach:
https://unix.stackexchange.com/questions/29608/why-is-it-better-to-use-usr-bin-env-name-instead-of-path-to-name-as-my/29620

I would say that the modern thinking is to discard the /usr/bin/env without 
being too proselyte. Specially because in the context of lyx we always call

/path/to/pythonx.y

so that the shebang line is always ignored. So in basic terms we are 
discussing how many angels fit in the top of a needle.

> [ 1139s] lyx.x86_64: W: non-executable-script
> /usr/share/lyx/scripts/prefTest.pl.in 644 /usr/bin/env perl
> [ 1139s] This text file contains a shebang or is located in a path dedicated
> for [ 1139s] executables, but lacks the executable bits and cannot thus be
> executed.  If
> [ 1139s] the file is meant to be an executable script, add the executable
> bits, [ 1139s] otherwise remove the shebang or move the file elsewhere.
> [ 1139s]

I could probably do the same for perl. Is there any objection?

> [ 1139s] lyx.x86_64: W: position-independent-executable-suggested
> /usr/bin/lyx [ 1139s] lyx.x86_64: W:
> position-independent-executable-suggested
> /usr/bin/lyxclient
> [ 1139s] lyx.x86_64: W: position-independent-executable-suggested
> /usr/bin/tex2lyx
> [ 1139s] This executable should be position independent (all binaries
> should).  Check
> [ 1139s] that it is built with -fPIE/-fpie in compiler flags and -pie
> in linker flags.
> [ 1139s]
> [ 1139s] lyx.x86_64: W: script-without-shebang
> /usr/share/lyx/scripts/TeXFiles.py
> [ 1139s] lyx.x86_64: W: script-without-shebang
> /usr/share/lyx/scripts/clean_dvi.py
> [ 1139s] lyx.x86_64: W: script-without-shebang
> /usr/share/lyx/scripts/convertDefault.py
> [ 1139s] lyx.x86_64: W: script-without-shebang
> /usr/share/lyx/scripts/convert_pdf.py
> [ 1139s] lyx.x86_64: W: script-without-shebang

Fixed in development.

> /usr/share/lyx/scripts/csv2lyx.py [ 1139s] lyx.x86_64: W:
> script-without-shebang
> /usr/share/lyx/scripts/ext_copy.py
> [ 1139s] lyx.x86_64: W: script-without-shebang
> /usr/share/lyx/scripts/fen2ascii.py
> [ 1139s] lyx.x86_64: W: script-without-shebang
> /usr/share/lyx/scripts/fig2pdftex.py
> [ 1139s] lyx.x86_64: W: script-without-shebang
> /usr/share/lyx/scripts/fig2pstex.py
> [ 1139s] lyx.x86_64: W: script-without-shebang
> /usr/share/lyx/scripts/fig_copy.py
> [ 1139s] lyx.x86_64: W: script-without-shebang
> /usr/share/lyx/scripts/html2latexwrapper.py
> [ 1139s] lyx.x86_64: W: script-without-shebang
> /usr/share/lyx/scripts/include_bib.py
> [ 1139s] lyx.x86_64: W: script-without-shebang
> /usr/share/lyx/scripts/layout2layout.py
> [ 1139s] lyx.x86_64: W: script-without-shebang
> /usr/share/lyx/scripts/legacy_lyxpreview2ppm.py
> [ 1139s] lyx.x86_64: W: script-without-shebang
> /usr/share/lyx/scripts/lyxpak.py [ 1139s] lyx.x86_64: W:
> script-without-shebang
> /usr/share/lyx/scripts/lyxpreview2bitmap.py
> [ 1139s] lyx.x86_64: W: script-without-shebang
> /usr/share/lyx/scripts/lyxpreview_tools.py
> [ 1139s] lyx.x86_64: W: script-without-shebang
> /usr/share/lyx/scripts/prefs2prefs.py
> [ 1139s] lyx.x86_64: W: script-without-shebang
> /usr/share/lyx/scripts/prefs2prefs_lfuns.py
> [ 1139s] lyx.x86_64: W: script-without-shebang
> /usr/share/lyx/scripts/prefs2prefs_prefs.py
> [ 1139s] lyx.x86_64: W: script-without-shebang
> /usr/share/lyx/scripts/tex_copy.py
> [ 1139s] This text file has executable bits set or is located in a
> path dedicated for
> [ 1139s] executables, but lacks a shebang and cannot thus be executed.
> If the file is
> [ 1140s] meant to be an executable script, add the shebang, otherwise remove
> the [ 1140s] executable bits or move the file elsewhere.
> [ 1140s]

Here I suspect that rpmlint is using an heuristics where it decides that the 
files in a directory called scripts are... scripts and thus should be 
executable, we disagree with the conclusion.

> [ 1140s] lyx.x86_64: W: suse-filelist-forbidden-bashcomp-userdirs
> /etc/bash_completion.d/lyx is not allowed in SUSE
> [ 1140s] This directory is for user files,                       use
> /usr/share/bash-
> [ 1140s] completion/completions/
> [ 1140s]
> [ 1140s] lyx.x86_64: E: env-script-interpreter (Badness: 9)
> /usr/share/lyx/configure.py /usr/bin/env python
> [ 1140s] lyx.x86_64: E: env-script-interpreter (Badness: 9)
> /usr/share/lyx/lyx2lyx/lyx2lyx /usr/bin/env python
> [ 1140s] lyx.x86_64: E: env-script-interpreter (Badness: 9)
> /usr/share/lyx/scripts/listerrors /usr/bin/env python
> [ 1140s] lyx.x86_64: E: env-script-interpreter (Badness: 9)
> /usr/share/lyx/scripts/svg2pdftex.py /usr/bin/env python
> [ 1140s] lyx.x86_64: E: env-script-interpreter (Badness: 9)
> /usr/share/lyx/scripts/svg2pstex.py /usr/bin/env python
> [ 1140s] This script uses 'env' as an interpreter. For the rpm runtime
> dependency
> [ 1140s] detection to work, the shebang #!/usr/bin/env python  needs
> to be patched into
> [ 1140s] #!/usr/bin/python  otherwise the package dependency generator
> merely adds a
> [ 1140s] dependency on /usr/bin/env rather than the actual interpreter
> /usr/bin/python.
> [ 1140s] Alternatively, if the file should not be executed, then
> ensure that it is not
> [ 1140s] marked as executable or don't install it in a path that is reserved
> for [ 1140s] executables.
This part got fixed in development.
https://www.lyx.org/trac/changeset?
reponame=lyxgit&old=cac27076ead10684270520670adc6bd004793361%40lib&new=c480889077b630c56d13dcb01c55bff7374a3aba
%40lib

-- 
José Abílio


Reply via email to