bugGNU roff - Bugs: bug #64058, stop endorsing the shebang line...

 
 

bug #64058: stop endorsing the shebang line space myth

Submitter:  G. Branden Robinson <gbranden>
Submitted:  Mon 17 Apr 2023 12:45:14 AM UTC
   
 
Category:  General Severity:  2 - Minor
Item Group:  Lint Status:  Fixed
Privacy:  Public Assigned to:  gbranden
Open/Closed:  Closed Planned Release:  1.24.0
* Mandatory Fields

Add a New Comment Rich Markup
   

Wed 19 Jul 2023 11:26:34 PM UTC, comment #3: 


comment #2:

>   Imported scripts should not be changed, like "bootstrap".


I'm not fussed about it.  Either it will be regressed in the future or it won't be (because upstream will similarly cease endorsing the myth).

You could consider reporting the issue to gnulib.

G. Branden Robinson <gbranden>
Group administrator
Wed 19 Jul 2023 11:24:02 PM UTC, comment #2: 

  Imported scripts should not be changed, like "bootstrap".

Bjarni Ingi Gislason <bjarniig>
Tue 18 Jul 2023 03:03:57 PM UTC, comment #1: 


commit 20051ef338e4098b99c1e201546e7763177809f6
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
Date:   Mon Jul 17 03:50:41 2023 -0500

    Fix Savannah #64058 (shebang line space myth).

    * arch/djgpp/config.site:
    * arch/misc/shdeps.sh:
    * bootstrap:
    * contrib/chem/chem.pl:
    * contrib/eqn2graph/eqn2graph.sh:
    * contrib/gdiffmk/tests/runtests.sh:
    * contrib/glilypond/glilypond.pl:
    * contrib/gperl/gperl.pl:
    * contrib/gpinyin/gpinyin.pl:
    * contrib/grap2graph/grap2graph.sh:
    * contrib/pdfmark/pdfroff.sh:
    * contrib/pic2graph/pic2graph.sh:
    * font/devdvi/generate/CompileFonts:
    * font/devps/generate/afmname:
    * font/devps/generate/make-zapfdr:
    * font/util/make-Rproto:
    * gendef.sh:
    * m4/groff.m4:
    * mdate.pl:
    * src/devices/grops/grops.1.man:
    * src/devices/xditview/ad2c:
    * src/libs/libgroff/config.charset:
    * src/libs/libgroff/make-uniuni:
    * src/preproc/eqn/neqn.sh:
    * src/roff/nroff/nroff.sh:
    * src/utils/afmtodit/make-afmtodit-tables:
    * test-groff.in:
    * tmac/hyphenex.pl: Stop endorsing shebang line space myth.  Fixes
      <https://savannah.gnu.org/bugs/?64058>.


G. Branden Robinson <gbranden>
Group administrator
Mon 17 Apr 2023 12:45:14 AM UTC, original submission:  

https://web.archive.org/web/20170215070707/http://www.in-ulm.de/~mascheck/various/shebang/#details


There is a rumor, that a very few and very special, earlier Unix
versions (particularly 4.2BSD derivatives) require you to separate
the "#!" from the following path with a blank.

You may also read, that (allegedly) such a kernel parses "#! /" as
a 32-bit (long) magic. But it turns out that it is virtually
impossible to find a Unix which actually required this.

4.2BSD in fact doesn't require it, although previous versions of
the GNU autoconf tutorial wrongly claimed this ("10. Portable
Shell Programming", corrected with release 2.64, 2009-07-26).
But instead, see 4.2BSD, /usr/src/sys/sys/kern_exec.c (the first
regular occurence). A blank is accepted but not required.
All this pointed out by Gunnar Ritter in
<3B5B0BA4.XY112IX2@bigfoot.de> (and thanks to the new Caldera
license, the code can be cited here now.)

Instead, the origin of this myth "of the required blank" might be
a particular release of 4.1 BSD: There is a manpage in a
"4.1.snap" snapshot of 4.1BSD on the CSRG CDs,
/usr/man/man2/exec.2 (4/1/81), where a space/tab after the #! is
mentioned as mandatory. However, this is not true: the source
itself remained unchanged.

(Hint to the existence of such a manpage from Bruce Barnett in
<ae3m9l$rti$0@208.20.133.66>).

It's not clear whether this is a bug or confusion in documentation
or if Berkeley planned to modify the BSD source but eventually
did not.

DYNIX is mentioned in the autoconf documentation, too. It's
unclear if this variant might have implemented it in a few
releases (perhaps following the abovementioned manual page). At
least Dynix 3.2.0 or Dynix PTS 1.2.0 were actually 4.2 BSD derived
and did not require the blank.

I asked David MacKenzie, the author of the autoconf documentation,
about the actual origin of the autoconf note. But unfortunately
neither the reporting author nor the very system are recorded
anymore.

Even intensive search of usenet archives didn't reveal any further
hints to me.

Blank forbidden?

I found no evidence yet, that there's an implementation which
forbids a blank after #!


Change our scripts to stop doing this.  The Autoconf manual indeed no longer endorses or even mentions this, and when I went looking for what happened to it, I found the foregoing.

G. Branden Robinson <gbranden>
Group administrator

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by bjarniig (Posted a comment)
  • -email is unavailable- added by gbranden (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2023-07-18 gbranden StatusIn Progress Fixed
        Open/ClosedOpen Closed
        Planned ReleaseNone 1.24.0
    2023-07-17 gbranden StatusNone In Progress

    Back to the top

    Powered by Savane 3.13-758e.
    Corresponding source code