[tlbuild] Broken shebangs in TeX Live scripts

Henri Menke henri at henrimenke.de
Sat Apr 9 18:02:46 CEST 2022


On Sat, 2022-04-09 at 16:50 +0100, Ken Moffat wrote:
> On Sat, Apr 09, 2022 at 03:56:16PM +0200, Henri Menke wrote:
> > Dear builders,
> > 
> > I've checked the shebangs in the scripts shipped with TeX Live for
> > x86_64-linux and discovered some problems. There are some shebangs
> > that
> > are outright broken like "#!perl -w" and others that hardcode the
> > path
> > to the executable like /bin/bash or /usr/bin/python. This won't
> > work on
> > systems which have /bin merged into /usr/bin where no /bin/bash
> > exists
> > or for people who use Python or Perl installations in non-standard
> > paths, e.g. /usr/local/bin.
> > 
> 
> For /bin/bash : any sane merged-usr system symlinks /usr/bin to
> /bin. I have read of an alternative where everything in /bin is a
> symlink, e.g. /bin/bash -> /usr/bin/bash, but I cannot conceive of a
> linux system where some form of /bin/bash does not exist.

NixOS does not have /bin/bash and macOS might not have bash at all and
since /bin and /usr are read-only on macOS, user will have to install
it into /opt/local (or whatever).

Kind regards,
Henri

> 
> ĸen
> > 
> > Below you can find a probably non-exhaustive list of problematic
> > scripts in TeX Live 2022.
> > 
> > Kind regards,
> > Henri
> > 
> > 
> > 
> > $ 2>/dev/null grep '^#!' /opt/texlive/2022/bin/x86_64-linux/* |
> > grep -v -e '/usr/bin/env' -e '/bin/sh'
> > /opt/texlive/2022/bin/x86_64-linux/a2ping:#!perl -w
> > /opt/texlive/2022/bin/x86_64-linux/bibexport:#!/bin/bash
> > /opt/texlive/2022/bin/x86_64-linux/ctan-o-mat:#!/usr/bin/perl -w
> > /opt/texlive/2022/bin/x86_64-linux/ctanupload:#!/usr/bin/perl
> > /opt/texlive/2022/bin/x86_64-linux/de-macro:#!/usr/bin/python -O
> > /opt/texlive/2022/bin/x86_64-linux/dtxgen:#!/bin/bash
> > /opt/texlive/2022/bin/x86_64-linux/exceltex:#!/usr/bin/perl -w
> > /opt/texlive/2022/bin/x86_64-linux/findhyph:#!/usr/bin/perl
> > /opt/texlive/2022/bin/x86_64-linux/fragmaster:#!/usr/bin/perl -w
> > /opt/texlive/2022/bin/x86_64-linux/git-latexdiff:#!/bin/bash
> > /opt/texlive/2022/bin/x86_64-linux/installfont-tl:#!/bin/bash
> > /opt/texlive/2022/bin/x86_64-linux/latex2man:#!/usr/bin/perl -w
> > /opt/texlive/2022/bin/x86_64-linux/latexpand:#!/usr/bin/perl
> > /opt/texlive/2022/bin/x86_64-linux/listbib:#!/bin/bash
> > /opt/texlive/2022/bin/x86_64-linux/ltxfileinfo:#!/bin/bash
> > /opt/texlive/2022/bin/x86_64-linux/makedtx:#!/usr/bin/perl
> > /opt/texlive/2022/bin/x86_64-linux/mathspic:#!/usr/bin/perl
> > /opt/texlive/2022/bin/x86_64-linux/mkt1font:#!/usr/bin/perl
> > /opt/texlive/2022/bin/x86_64-
> > linux/multibibliography:#!/usr/bin/perl
> > /opt/texlive/2022/bin/x86_64-linux/pamphletangler:#!/usr/bin/perl -
> > w
> > /opt/texlive/2022/bin/x86_64-linux/pdflatexpicscale:#!/usr/bin/perl
> > -w
> > /opt/texlive/2022/bin/x86_64-linux/pdftex-quiet:#!/bin/bash
> > /opt/texlive/2022/bin/x86_64-linux/pdfxup:#!/bin/bash
> > /opt/texlive/2022/bin/x86_64-linux/pn2pdf:#!/usr/bin/perl
> > /opt/texlive/2022/bin/x86_64-linux/splitindex:#! /usr/bin/perl -w
> > /opt/texlive/2022/bin/x86_64-linux/svn-multi:#!/usr/bin/perl
> > /opt/texlive/2022/bin/x86_64-linux/tlcockpit:#!/bin/bash
> > /opt/texlive/2022/bin/x86_64-linux/ulqda:#!/usr/bin/perl
> > /opt/texlive/2022/bin/x86_64-linux/urlbst:#! /usr/bin/perl -w
> > /opt/texlive/2022/bin/x86_64-linux/vpl2ovp:#!/usr/bin/perl
> > /opt/texlive/2022/bin/x86_64-linux/vpl2vpl:#!/usr/bin/perl
> > /opt/texlive/2022/bin/x86_64-linux/yplan:#!/usr/bin/perl
> 



More information about the tlbuild mailing list.