reproduce-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[task #15682] maneage-lint: check for host system shebang lines in execu


From: Boud Roukema
Subject: [task #15682] maneage-lint: check for host system shebang lines in executable scripts
Date: Tue, 9 Jun 2020 14:21:58 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Firefox/68.0

Follow-up Comment #2, task #15682 (project reproduce):

Looking at this LWN article - https://lwn.net/Articles/779997/ - which is
pointed to by the direct Wikipedia article -
https://en.wikipedia.org/wiki/Shebang_(Unix) - "so well written, such that
they use the given 'SHELL' environment variable in their shebangs" suggests
not just a reproducibility bug, but a potential install bug on a GNU/Linux
system.

If someone has lots of subdirectories and installs a 'maneage' system in,
let's say, a 12-th level subdirectory, where the average character length of a
directory name is 9 characters, then that's already a 120-character string.
Add in _#!_ at the beginning and _software/installed/bin/bash_ at the end, and
the line will be over 128 characters. Which will almost certainly lead to
fatal errors if _egrep_, _fgrep_, _pod2texi_, or _texi2any_ are used.

Such as situation will probably be rare in practice, but it's the sort of
limit that's useful to keep in mind - just in case.

Having to write _.local/bin/<executable>_ everywhere seems like a very heavy
solution. Would doing this be worth it to increase portability and
reproducibility? The use of a relative path would  make the script only usable
from maneage root directory. For some specific cases this could make sense.

https://en.wikipedia.org/wiki/Shebang_(Unix) points out that "A common value
is /bin/sh, but some systems such as Solaris have the POSIX-compatible shell
at /usr/xpg4/bin/sh." It also suggests using _#!/usr/bin/env sh_ .

Certainly _#!/usr/bin/env python_ or _#!/usr/bin/env perl_ is safer than using
these directly - these are less fundamental languages to *NIX-like systems
than _bash_ .

Advice from people involved in comparing OSes and portability would probably
be useful here.


    _______________________________________________________

Reply to this item at:

  <https://savannah.nongnu.org/task/?15682>

_______________________________________________
  Message sent via Savannah
  https://savannah.nongnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]