Test failure when running distcheck from out-of-tree build

  • Done
  • quality assurance status badge
Details
4 participants
  • Chet Ramey
  • Ludovic Courtès
  • Taylan Ulrich Bay?rl? /Kammer
  • Greg Wooledge
Owner
unassigned
Submitted by
Taylan Ulrich Bay?rl? /Kammer
Severity
normal
T
T
Taylan Ulrich Bay?rl? /Kammer wrote on 12 Jan 2016 10:14
(address . bug-guix@gnu.org)
87r3hnuple.fsf@T420.taylan
If one runs distcheck from within the build directory of an out-of-tree
build (perhaps a strange combination), the guix-environment.sh test
fails with the following log snippet.

(From the file $builddir/guix-0.9.1/_build/sub/test-suite.log, where
$builddir is the directory of the original out-of-tree build.)

FAIL: tests/guix-environment
============================

+ set -e
+ guix environment --version
guix environment (GNU Guix) 0.9.1
Copyright (C) 2016 the Guix authors
License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
+ tmpdir=t-guix-environment-19708
+ trap 'rm -r "$tmpdir"' EXIT
+ mkdir t-guix-environment-19708
+ export SHELL
+ guix environment --ad-hoc guile-bootstrap --pure --search-paths
accepted connection from pid 19724, user taylan
+ guix environment --ad-hoc guile-bootstrap:out --pure --search-paths
accepted connection from pid 19740, user taylan
+ grep -E '^export PATH=.*guile-bootstrap-[0-9.]+/bin' t-guix-environment-19708/a
export PATH="/home/taylan/src/guix/build/guix-0.9.1/_build/sub/test-tmp/store/5z1c5ra796r2aazparvyl8d8qjknnscx-guile-bootstrap-2.0/bin"
++ wc -l
+ test 1 = 1
+ cmp t-guix-environment-19708/a t-guix-environment-19708/b
+ guix environment --ad-hoc guile-bootstrap --pure -- guile -c '(exit 42)'
accepted connection from pid 19757, user taylan
+ test 42 = 42
+ guix environment --ad-hoc guile-bootstrap --pure -E 'guile -c '\''(exit 42)'\'''
accepted connection from pid 19765, user taylan
+ test 42 = 42
+ guile -c '(getaddrinfo "www.gnu.org" "80" AI_NUMERICSERV)'
+ guix environment -e '(@@ (gnu packages commencement) gnu-make-boot0)' --no-substitutes --search-paths --pure
accepted connection from pid 19776, user taylan
The following derivations will be built:
/home/taylan/src/guix/build/guix-0.9.1/_build/sub/test-tmp/store/0sc9c2v62hi2d7ba647yhlkg3hhqnpn8-make-4.1.tar.xz.drv
/home/taylan/src/guix/build/guix-0.9.1/_build/sub/test-tmp/store/nfv4ps7ngk7c0kb7b2hzzxmn8wv031sr-make-4.1.tar.bz2.drv

Starting download of /home/taylan/src/guix/build/guix-0.9.1/_build/sub/test-tmp/store/564xh24mjgl5w31f5kbl1ja7cg3lkwsn-make-4.1.tar.bz2
make-4.1.tar.bz2 1.3MiB 2.7MiB/s 00:00 [####################] 100.0%
/home/taylan/src/guix/build/guix-0.9.1/_build/sub/test-tmp/store/d41iyl2gyk0rwd9z2ddgph9nyg48f3p0-bootstrap-binaries-0/bin/tar: unrecognized option '--sort=name'
Try 'tar --help' or 'tar --usage' for more information.
make-4.1/
make-4.1/vmsfunctions.c
make-4.1/getopt.h
make-4.1/make.1
make-4.1/job.c
make-4.1/COPYING
make-4.1/output.c
make-4.1/remake.c
make-4.1/commands.h
make-4.1/README
make-4.1/rule.c
make-4.1/config.ami
make-4.1/misc.c
make-4.1/gettext.h
make-4.1/config.h.W32
make-4.1/Makefile.DOS
make-4.1/build_w32.bat
make-4.1/make.lnk
make-4.1/vmsify.c
make-4.1/glob/
make-4.1/glob/glob.h
make-4.1/glob/COPYING.LIB
make-4.1/glob/fnmatch.h
make-4.1/glob/fnmatch.c
make-4.1/glob/SCOPTIONS
make-4.1/glob/Makefile.am
make-4.1/glob/SMakefile
make-4.1/glob/configure.bat
make-4.1/glob/Makefile.ami
make-4.1/glob/Makefile.in
make-4.1/glob/glob.c
make-4.1/glob/ChangeLog
make-4.1/subproc.bat
make-4.1/README.W32
make-4.1/getopt.c
make-4.1/read.c
make-4.1/load.c
make-4.1/makeint.h
make-4.1/debug.h
make-4.1/amiga.c
make-4.1/version.c
make-4.1/dir.c
make-4.1/make_msvc_net2003.sln
make-4.1/hash.c
make-4.1/w32/
make-4.1/w32/pathstuff.c
make-4.1/w32/include/
make-4.1/w32/include/dirent.h
make-4.1/w32/include/dlfcn.h
make-4.1/w32/include/w32err.h
make-4.1/w32/include/pathstuff.h
make-4.1/w32/include/sub_proc.h
make-4.1/w32/Makefile.am
make-4.1/w32/compat/
make-4.1/w32/compat/posixfcn.c
make-4.1/w32/compat/dirent.c
make-4.1/w32/Makefile.in
make-4.1/w32/subproc/
make-4.1/w32/subproc/w32err.c
make-4.1/w32/subproc/misc.c
make-4.1/w32/subproc/NMakefile
make-4.1/w32/subproc/proc.h
make-4.1/w32/subproc/sub_proc.c
make-4.1/w32/subproc/build.bat
make-4.1/gnumake.h
make-4.1/dep.h
make-4.1/output.h
make-4.1/file.c
make-4.1/guile.c
make-4.1/loadapi.c
make-4.1/job.h
make-4.1/NMakefile
make-4.1/variable.h
make-4.1/expand.c
make-4.1/dosbuild.bat
make-4.1/amiga.h
make-4.1/filedef.h
make-4.1/make_msvc_net2003.vcproj
make-4.1/configh.dos
make-4.1/strcache.c
make-4.1/doc/
make-4.1/doc/make.info
make-4.1/doc/make.info-1
make-4.1/doc/stamp-vti
make-4.1/doc/make.info-2
make-4.1/doc/fdl.texi
make-4.1/doc/Makefile.am
make-4.1/doc/version.texi
make-4.1/doc/make-stds.texi
make-4.1/doc/Makefile.in
make-4.1/doc/make.texi
make-4.1/signame.c
make-4.1/function.c
make-4.1/variable.c
make-4.1/ABOUT-NLS
make-4.1/INSTALL
make-4.1/makefile.vms
make-4.1/config/
make-4.1/config/install-sh
make-4.1/config/lib-prefix.m4
make-4.1/config/lib-ld.m4
make-4.1/config/texinfo.tex
make-4.1/config/mdate-sh
make-4.1/config/gettext.m4
make-4.1/config/compile
make-4.1/config/dospaths.m4
make-4.1/config/config.rpath
make-4.1/config/iconv.m4
make-4.1/config/lib-link.m4
make-4.1/config/depcomp
make-4.1/config/progtest.m4
make-4.1/config/Makefile.am
make-4.1/config/po.m4
make-4.1/config/Makefile.in
make-4.1/config/config.sub
make-4.1/config/intlmacosx.m4
make-4.1/config/nls.m4
make-4.1/config/config.guess
make-4.1/config/ar-lib
make-4.1/config/missing
make-4.1/SCOPTIONS
make-4.1/alloca.c
make-4.1/makefile.com
make-4.1/configure
make-4.1/hash.h
make-4.1/acinclude.m4
make-4.1/arscan.c
make-4.1/rule.h
make-4.1/NEWS
make-4.1/configure.ac
make-4.1/Makefile.am
make-4.1/po/
make-4.1/po/gl.gmo
make-4.1/po/en@quot.header
make-4.1/po/stamp-po
make-4.1/po/nl.gmo
make-4.1/po/cs.gmo
make-4.1/po/id.po
make-4.1/po/it.po
make-4.1/po/pl.po
make-4.1/po/es.po
make-4.1/po/LINGUAS
make-4.1/po/cs.po
make-4.1/po/Makevars
make-4.1/po/sv.po
make-4.1/po/he.gmo
make-4.1/po/sv.gmo
make-4.1/po/ja.gmo
make-4.1/po/ru.po
make-4.1/po/ko.gmo
make-4.1/po/ko.po
make-4.1/po/ja.po
make-4.1/po/Makefile.in.in
make-4.1/po/de.gmo
make-4.1/po/es.gmo
make-4.1/po/be.po
make-4.1/po/pt_BR.po
make-4.1/po/be.gmo
make-4.1/po/vi.po
make-4.1/po/it.gmo
make-4.1/po/uk.po
make-4.1/po/tr.po
make-4.1/po/hr.gmo
make-4.1/po/POTFILES.in
make-4.1/po/fr.po
make-4.1/po/da.gmo
make-4.1/po/tr.gmo
make-4.1/po/he.po
make-4.1/po/nl.po
make-4.1/po/make.pot
make-4.1/po/vi.gmo
make-4.1/po/zh_CN.gmo
make-4.1/po/fi.po
make-4.1/po/ga.gmo
make-4.1/po/insert-header.sin
make-4.1/po/remove-potcdate.sin
make-4.1/po/quot.sed
make-4.1/po/fi.gmo
make-4.1/po/hr.po
make-4.1/po/id.gmo
make-4.1/po/ru.gmo
make-4.1/po/fr.gmo
make-4.1/po/lt.po
make-4.1/po/en@boldquot.header
make-4.1/po/pt_BR.gmo
make-4.1/po/Rules-quot
make-4.1/po/de.po
make-4.1/po/boldquot.sed
make-4.1/po/lt.gmo
make-4.1/po/da.po
make-4.1/po/ga.po
make-4.1/po/uk.gmo
make-4.1/po/gl.po
make-4.1/po/pl.gmo
make-4.1/po/zh_CN.po
make-4.1/README.customs
make-4.1/commands.c
make-4.1/vpath.c
make-4.1/remote-stub.c
make-4.1/SMakefile
make-4.1/tests/
make-4.1/tests/COPYING
make-4.1/tests/README
make-4.1/tests/mkshadow
make-4.1/tests/config_flags_pm.com
make-4.1/tests/config-flags.pm.in
make-4.1/tests/guile.supp
make-4.1/tests/test_driver.pl
make-4.1/tests/config-flags.pm
make-4.1/tests/ChangeLog.1
make-4.1/tests/run_make_tests.pl
make-4.1/tests/NEWS
make-4.1/tests/scripts/
make-4.1/tests/scripts/misc/
make-4.1/tests/scripts/misc/general1
make-4.1/tests/scripts/misc/general3
make-4.1/tests/scripts/misc/close_stdout
make-4.1/tests/scripts/misc/fopen-fail
make-4.1/tests/scripts/misc/bs-nl
make-4.1/tests/scripts/misc/general2
make-4.1/tests/scripts/misc/general4
make-4.1/tests/scripts/misc/utf8
make-4.1/tests/scripts/variables/
make-4.1/tests/scripts/variables/undefine
make-4.1/tests/scripts/variables/CURDIR
make-4.1/tests/scripts/variables/MAKEFILES
make-4.1/tests/scripts/variables/flavors
make-4.1/tests/scripts/variables/LIBPATTERNS
make-4.1/tests/scripts/variables/INCLUDE_DIRS
make-4.1/tests/scripts/variables/MFILE_LIST
make-4.1/tests/scripts/variables/define
make-4.1/tests/scripts/variables/negative
make-4.1/tests/scripts/variables/MAKELEVEL
make-4.1/tests/scripts/variables/private
make-4.1/tests/scripts/variables/DEFAULT_GOAL
make-4.1/tests/scripts/variables/automatic
make-4.1/tests/scripts/variables/MAKE_RESTARTS
make-4.1/tests/scripts/variables/MAKEFLAGS
make-4.1/tests/scripts/variables/MAKE
make-4.1/tests/scripts/variables/special
make-4.1/tests/scripts/variables/SHELL
make-4.1/tests/scripts/variables/MAKECMDGOALS
make-4.1/tests/scripts/variables/GNUMAKEFLAGS
make-4.1/tests/scripts/functions/
make-4.1/tests/scripts/functions/if
make-4.1/tests/scripts/functions/dir
make-4.1/tests/scripts/functions/addsuffix
make-4.1/tests/scripts/functions/error
make-4.1/tests/scripts/functions/file
make-4.1/tests/scripts/functions/foreach
make-4.1/tests/scripts/functions/wildcard
make-4.1/tests/scripts/functions/andor
make-4.1/tests/scripts/functions/findstring
make-4.1/tests/scripts/functions/join
make-4.1/tests/scripts/functions/call
make-4.1/tests/scripts/functions/basename
make-4.1/tests/scripts/functions/shell
make-4.1/tests/scripts/functions/filter-out
make-4.1/tests/scripts/functions/addprefix
make-4.1/tests/scripts/functions/sort
make-4.1/tests/scripts/functions/abspath
make-4.1/tests/scripts/functions/origin
make-4.1/tests/scripts/functions/word
make-4.1/tests/scripts/functions/notdir
make-4.1/tests/scripts/functions/flavor
make-4.1/tests/scripts/functions/guile
make-4.1/tests/scripts/functions/warning
make-4.1/tests/scripts/functions/eval
make-4.1/tests/scripts/functions/realpath
make-4.1/tests/scripts/functions/substitution
make-4.1/tests/scripts/functions/value
make-4.1/tests/scripts/functions/suffix
make-4.1/tests/scripts/functions/strip
make-4.1/tests/scripts/targets/
make-4.1/tests/scripts/targets/FORCE
make-4.1/tests/scripts/targets/INTERMEDIATE
make-4.1/tests/scripts/targets/PHONY
make-4.1/tests/scripts/targets/DEFAULT
make-4.1/tests/scripts/targets/ONESHELL
make-4.1/tests/scripts/targets/POSIX
make-4.1/tests/scripts/targets/SECONDARY
make-4.1/tests/scripts/targets/SILENT
make-4.1/tests/scripts/targets/clean
make-4.1/tests/scripts/options/
make-4.1/tests/scripts/options/dash-e
make-4.1/tests/scripts/options/dash-f
make-4.1/tests/scripts/options/warn-undefined-variables
make-4.1/tests/scripts/options/dash-q
make-4.1/tests/scripts/options/dash-C
make-4.1/tests/scripts/options/dash-B
make-4.1/tests/scripts/options/print-directory
make-4.1/tests/scripts/options/dash-I
make-4.1/tests/scripts/options/symlinks
make-4.1/tests/scripts/options/dash-k
make-4.1/tests/scripts/options/eval
make-4.1/tests/scripts/options/dash-l
make-4.1/tests/scripts/options/dash-t
make-4.1/tests/scripts/options/dash-W
make-4.1/tests/scripts/options/dash-n
make-4.1/tests/scripts/options/general
make-4.1/tests/scripts/features/
make-4.1/tests/scripts/features/echoing
make-4.1/tests/scripts/features/mult_rules
make-4.1/tests/scripts/features/output-sync
make-4.1/tests/scripts/features/patternrules
make-4.1/tests/scripts/features/comments
make-4.1/tests/scripts/features/se_implicit
make-4.1/tests/scripts/features/escape
make-4.1/tests/scripts/features/order_only
make-4.1/tests/scripts/features/vpath3
make-4.1/tests/scripts/features/statipattrules
make-4.1/tests/scripts/features/shell_assignment
make-4.1/tests/scripts/features/vpathplus
make-4.1/tests/scripts/features/vpath
make-4.1/tests/scripts/features/quoting
make-4.1/tests/scripts/features/varnesting
make-4.1/tests/scripts/features/override
make-4.1/tests/scripts/features/include
make-4.1/tests/scripts/features/export
make-4.1/tests/scripts/features/rule_glob
make-4.1/tests/scripts/features/recursion
make-4.1/tests/scripts/features/patspecific_vars
make-4.1/tests/scripts/features/loadapi
make-4.1/tests/scripts/features/default_names
make-4.1/tests/scripts/features/archives
make-4.1/tests/scripts/features/load
make-4.1/tests/scripts/features/jobserver
make-4.1/tests/scripts/features/mult_targets
make-4.1/tests/scripts/features/vpath2
make-4.1/tests/scripts/features/reinvoke
make-4.1/tests/scripts/features/conditionals
make-4.1/tests/scripts/features/se_explicit
make-4.1/tests/scripts/features/se_statpat
make-4.1/tests/scripts/features/double_colon
make-4.1/tests/scripts/features/errors
make-4.1/tests/scripts/features/parallelism
make-4.1/tests/scripts/features/utf8
make-4.1/tests/scripts/features/vpathgpath
make-4.1/tests/scripts/features/targetvars
make-4.1/tests/scripts/test_template
make-4.1/tests/run_make_tests
make-4.1/tests/run_make_tests.com
make-4.1/configure.bat
make-4.1/ar.c
make-4.1/Makefile.ami
make-4.1/config.h.in
make-4.1/config.h-vms
make-4.1/aclocal.m4
make-4.1/README.Amiga
make-4.1/getloadavg.c
make-4.1/build.sh.in
make-4.1/implicit.c
make-4.1/vmsjobs.c
make-4.1/Makefile.in
make-4.1/getopt1.c
make-4.1/README.DOS
make-4.1/vmsdir.h
make-4.1/gmk-default.h
make-4.1/README.VMS
make-4.1/AUTHORS
make-4.1/default.c
make-4.1/main.c
make-4.1/README.OS2
make-4.1/remote-cstms.c
make-4.1/gmk-default.scm
patching file read.c
Hunk #1 succeeded at 110 (offset 11 lines).
patching file remake.c
Hunk #1 succeeded at 1549 with fuzz 1 (offset 97 lines).
/home/taylan/src/guix/build/guix-0.9.1/_build/sub/test-tmp/store/d41iyl2gyk0rwd9z2ddgph9nyg48f3p0-bootstrap-binaries-0/bin/tar: Option --mtime: Treating date '@0' as 1970-01-01 01:00:00
make-4.1/
make-4.1/ABOUT-NLS
make-4.1/AUTHORS
make-4.1/COPYING
make-4.1/INSTALL
make-4.1/Makefile.DOS
make-4.1/Makefile.am
make-4.1/Makefile.ami
make-4.1/Makefile.in
make-4.1/NEWS
make-4.1/NMakefile
make-4.1/README
make-4.1/README.Amiga
make-4.1/README.DOS
make-4.1/README.OS2
make-4.1/README.VMS
make-4.1/README.W32
make-4.1/README.customs
make-4.1/SCOPTIONS
make-4.1/SMakefile
make-4.1/acinclude.m4
make-4.1/aclocal.m4
make-4.1/alloca.c
make-4.1/amiga.c
make-4.1/amiga.h
make-4.1/ar.c
make-4.1/arscan.c
make-4.1/build.sh.in
make-4.1/build_w32.bat
make-4.1/commands.c
make-4.1/commands.h
make-4.1/config/
make-4.1/config.ami
make-4.1/config.h-vms
make-4.1/config.h.W32
make-4.1/config.h.in
make-4.1/config/Makefile.am
make-4.1/config/Makefile.in
make-4.1/config/ar-lib
make-4.1/config/compile
make-4.1/config/config.guess
make-4.1/config/config.rpath
make-4.1/config/config.sub
make-4.1/config/depcomp
make-4.1/config/dospaths.m4
make-4.1/config/gettext.m4
make-4.1/config/iconv.m4
make-4.1/config/install-sh
make-4.1/config/intlmacosx.m4
make-4.1/config/lib-ld.m4
make-4.1/config/lib-link.m4
make-4.1/config/lib-prefix.m4
make-4.1/config/mdate-sh
make-4.1/config/missing
make-4.1/config/nls.m4
make-4.1/config/po.m4
make-4.1/config/progtest.m4
make-4.1/config/texinfo.tex
make-4.1/configh.dos
make-4.1/configure
make-4.1/configure.ac
make-4.1/configure.bat
make-4.1/debug.h
make-4.1/default.c
make-4.1/dep.h
make-4.1/dir.c
make-4.1/doc/
make-4.1/doc/Makefile.am
make-4.1/doc/Makefile.in
make-4.1/doc/fdl.texi
make-4.1/doc/make-stds.texi
make-4.1/doc/make.info
make-4.1/doc/make.info-1
make-4.1/doc/make.info-2
make-4.1/doc/make.texi
make-4.1/doc/stamp-vti
make-4.1/doc/version.texi
make-4.1/dosbuild.bat
make-4.1/expand.c
make-4.1/file.c
make-4.1/filedef.h
make-4.1/function.c
make-4.1/getloadavg.c
make-4.1/getopt.c
make-4.1/getopt.h
make-4.1/getopt1.c
make-4.1/gettext.h
make-4.1/glob/
make-4.1/glob/COPYING.LIB
make-4.1/glob/ChangeLog
make-4.1/glob/Makefile.am
make-4.1/glob/Makefile.ami
make-4.1/glob/Makefile.in
make-4.1/glob/SCOPTIONS
make-4.1/glob/SMakefile
make-4.1/glob/configure.bat
make-4.1/glob/fnmatch.c
make-4.1/glob/fnmatch.h
make-4.1/glob/glob.c
make-4.1/glob/glob.h
make-4.1/gmk-default.h
make-4.1/gmk-default.scm
make-4.1/gnumake.h
make-4.1/guile.c
make-4.1/hash.c
make-4.1/hash.h
make-4.1/implicit.c
make-4.1/job.c
make-4.1/job.h
make-4.1/load.c
make-4.1/loadapi.c
make-4.1/main.c
make-4.1/make.1
make-4.1/make.lnk
make-4.1/make_msvc_net2003.sln
make-4.1/make_msvc_net2003.vcproj
make-4.1/makefile.com
make-4.1/makefile.vms
make-4.1/makeint.h
make-4.1/misc.c
make-4.1/output.c
make-4.1/output.h
make-4.1/po/
make-4.1/po/LINGUAS
make-4.1/po/Makefile.in.in
make-4.1/po/Makevars
make-4.1/po/POTFILES.in
make-4.1/po/Rules-quot
make-4.1/po/be.gmo
make-4.1/po/be.po
make-4.1/po/boldquot.sed
make-4.1/po/cs.gmo
make-4.1/po/cs.po
make-4.1/po/da.gmo
make-4.1/po/da.po
make-4.1/po/de.gmo
make-4.1/po/de.po
make-4.1/po/en@boldquot.header
make-4.1/po/en@quot.header
make-4.1/po/es.gmo
make-4.1/po/es.po
make-4.1/po/fi.gmo
make-4.1/po/fi.po
make-4.1/po/fr.gmo
make-4.1/po/fr.po
make-4.1/po/ga.gmo
make-4.1/po/ga.po
make-4.1/po/gl.gmo
make-4.1/po/gl.po
make-4.1/po/he.gmo
make-4.1/po/he.po
make-4.1/po/hr.gmo
make-4.1/po/hr.po
make-4.1/po/id.gmo
make-4.1/po/id.po
make-4.1/po/insert-header.sin
make-4.1/po/it.gmo
make-4.1/po/it.po
make-4.1/po/ja.gmo
make-4.1/po/ja.po
make-4.1/po/ko.gmo
make-4.1/po/ko.po
make-4.1/po/lt.gmo
make-4.1/po/lt.po
make-4.1/po/make.pot
make-4.1/po/nl.gmo
make-4.1/po/nl.po
make-4.1/po/pl.gmo
make-4.1/po/pl.po
make-4.1/po/pt_BR.gmo
make-4.1/po/pt_BR.po
make-4.1/po/quot.sed
make-4.1/po/remove-potcdate.sin
make-4.1/po/ru.gmo
make-4.1/po/ru.po
make-4.1/po/stamp-po
make-4.1/po/sv.gmo
make-4.1/po/sv.po
make-4.1/po/tr.gmo
make-4.1/po/tr.po
make-4.1/po/uk.gmo
make-4.1/po/uk.po
make-4.1/po/vi.gmo
make-4.1/po/vi.po
make-4.1/po/zh_CN.gmo
make-4.1/po/zh_CN.po
make-4.1/read.c
make-4.1/read.c.orig
make-4.1/remake.c
make-4.1/remake.c.orig
make-4.1/remote-cstms.c
make-4.1/remote-stub.c
make-4.1/rule.c
make-4.1/rule.h
make-4.1/signame.c
make-4.1/strcache.c
make-4.1/subproc.bat
make-4.1/tests/
make-4.1/tests/COPYING
make-4.1/tests/ChangeLog.1
make-4.1/tests/NEWS
make-4.1/tests/README
make-4.1/tests/config-flags.pm
make-4.1/tests/config-flags.pm.in
make-4.1/tests/config_flags_pm.com
make-4.1/tests/guile.supp
make-4.1/tests/mkshadow
make-4.1/tests/run_make_tests
make-4.1/tests/run_make_tests.com
make-4.1/tests/run_make_tests.pl
make-4.1/tests/scripts/
make-4.1/tests/scripts/features/
make-4.1/tests/scripts/features/archives
make-4.1/tests/scripts/features/comments
make-4.1/tests/scripts/features/conditionals
make-4.1/tests/scripts/features/default_names
make-4.1/tests/scripts/features/double_colon
make-4.1/tests/scripts/features/echoing
make-4.1/tests/scripts/features/errors
make-4.1/tests/scripts/features/escape
make-4.1/tests/scripts/features/export
make-4.1/tests/scripts/features/include
make-4.1/tests/scripts/features/jobserver
make-4.1/tests/scripts/features/load
make-4.1/tests/scripts/features/loadapi
make-4.1/tests/scripts/features/mult_rules
make-4.1/tests/scripts/features/mult_targets
make-4.1/tests/scripts/features/order_only
make-4.1/tests/scripts/features/output-sync
make-4.1/tests/scripts/features/override
make-4.1/tests/scripts/features/parallelism
make-4.1/tests/scripts/features/patspecific_vars
make-4.1/tests/scripts/features/patternrules
make-4.1/tests/scripts/features/quoting
make-4.1/tests/scripts/features/recursion
make-4.1/tests/scripts/features/reinvoke
make-4.1/tests/scripts/features/rule_glob
make-4.1/tests/scripts/features/se_explicit
make-4.1/tests/scripts/features/se_implicit
make-4.1/tests/scripts/features/se_statpat
make-4.1/tests/scripts/features/shell_assignment
make-4.1/tests/scripts/features/statipattrules
make-4.1/tests/scripts/features/targetvars
make-4.1/tests/scripts/features/utf8
make-4.1/tests/scripts/features/varnesting
make-4.1/tests/scripts/features/vpath
make-4.1/tests/scripts/features/vpath2
make-4.1/tests/scripts/features/vpath3
make-4.1/tests/scripts/features/vpathgpath
make-4.1/tests/scripts/features/vpathplus
make-4.1/tests/scripts/functions/
make-4.1/tests/scripts/functions/abspath
make-4.1/tests/scripts/functions/addprefix
make-4.1/tests/scripts/functions/addsuffix
make-4.1/tests/scripts/functions/andor
make-4.1/tests/scripts/functions/basename
make-4.1/tests/scripts/functions/call
make-4.1/tests/scripts/functions/dir
make-4.1/tests/scripts/functions/error
make-4.1/tests/scripts/functions/eval
make-4.1/tests/scripts/functions/file
make-4.1/tests/scripts/functions/filter-out
make-4.1/tests/scripts/functions/findstring
make-4.1/tests/scripts/function
This message was truncated. Download the full message here.
L
L
Ludovic Courtès wrote on 12 Jan 2016 17:51
(name . Taylan Ulrich "Bay?rl? /Kammer")(address . taylanbayirli@gmail.com)(address . 22354-done@debbugs.gnu.org)
87ziwan3kx.fsf@gnu.org
taylanbayirli@gmail.com (Taylan Ulrich "Bay?rl?/Kammer") skribis:

Toggle quote (4 lines)
> If one runs distcheck from within the build directory of an out-of-tree
> build (perhaps a strange combination), the guix-environment.sh test
> fails with the following log snippet.

[...]

Toggle quote (2 lines)
> ./configure: ./config.status: /home/taylan/src/guix/build/guix-0.9.1/_build/sub/test-tmp/store/d41iyl2gyk0r: bad interpreter: No such file or directory

I think you’re hitting the shebang limit (127 chars) that prevents you
from running test from that build tree. ./configure emits a warning in
this case, which you should see in ‘config.log’.

So, not a bug, but it would have been nicer if ‘make check’ had failed
directly. Commit bb25130 does that.

Though now that I look again at the error above, I see that we’re below
the 127 char limit. Weird.

Thanks,
Ludo’.
Closed
T
T
Taylan Ulrich Bay?rl? /Kammer wrote on 12 Jan 2016 20:40
(name . Ludovic Courtès)(address . ludo@gnu.org)(address . 22354-done@debbugs.gnu.org)
87mvsavb61.fsf@T420.taylan
ludo@gnu.org (Ludovic Courtès) writes:

Toggle quote (20 lines)
> taylanbayirli@gmail.com (Taylan Ulrich "Bay?rl?/Kammer") skribis:
>
>> If one runs distcheck from within the build directory of an out-of-tree
>> build (perhaps a strange combination), the guix-environment.sh test
>> fails with the following log snippet.
>
> [...]
>
>> ./configure: ./config.status: /home/taylan/src/guix/build/guix-0.9.1/_build/sub/test-tmp/store/d41iyl2gyk0r: bad interpreter: No such file or directory
>
> I think you’re hitting the shebang limit (127 chars) that prevents you
> from running test from that build tree. ./configure emits a warning in
> this case, which you should see in ‘config.log’.
>
> So, not a bug, but it would have been nicer if ‘make check’ had failed
> directly. Commit bb25130 does that.
>
> Though now that I look again at the error above, I see that we’re below
> the 127 char limit. Weird.

Hmm, that commit didn't fix the issue.

I guess the problem is that this happens in some nested build process
started by guix-environment.sh (that of make-4.1), and not our own build
process?


I'm also puzzled by the cut-off of the shebang string at 77 characters
in the error message, so I looked into it a bit, but nothing strange
here from what I can tell: the ./configure of make-4.1 is called with
SHELL and CONFIG_SHELL set to

/home/taylan/src/guix/build/guix-0.9.1/_build/sub/test-tmp/store/d41iyl2gyk0rwd9z2ddgph9nyg48f3p0-bootstrap-binaries-0/bin/bash

which is exactly 127 characters, but add #! and you have 129. This ends
up being the shebang of config.status, which is why it fails while
trying to call that. Only the error message is broken.

Taylan
Closed
L
L
Ludovic Courtès wrote on 12 Jan 2016 21:54
(name . Taylan Ulrich "Bay?rl? /Kammer")(address . taylanbayirli@gmail.com)(address . 22354-done@debbugs.gnu.org)
87k2nea582.fsf@gnu.org
taylanbayirli@gmail.com (Taylan Ulrich "Bay?rl?/Kammer") skribis:

Toggle quote (24 lines)
> ludo@gnu.org (Ludovic Courtès) writes:
>
>> taylanbayirli@gmail.com (Taylan Ulrich "Bay?rl?/Kammer") skribis:
>>
>>> If one runs distcheck from within the build directory of an out-of-tree
>>> build (perhaps a strange combination), the guix-environment.sh test
>>> fails with the following log snippet.
>>
>> [...]
>>
>>> ./configure: ./config.status: /home/taylan/src/guix/build/guix-0.9.1/_build/sub/test-tmp/store/d41iyl2gyk0r: bad interpreter: No such file or directory
>>
>> I think you’re hitting the shebang limit (127 chars) that prevents you
>> from running test from that build tree. ./configure emits a warning in
>> this case, which you should see in ‘config.log’.
>>
>> So, not a bug, but it would have been nicer if ‘make check’ had failed
>> directly. Commit bb25130 does that.
>>
>> Though now that I look again at the error above, I see that we’re below
>> the 127 char limit. Weird.
>
> Hmm, that commit didn't fix the issue.

You mean it doesn’t error out directly upon ‘make check’? Could you
run “grep length …/_build/config.log”?

Toggle quote (11 lines)
> I'm also puzzled by the cut-off of the shebang string at 77 characters
> in the error message, so I looked into it a bit, but nothing strange
> here from what I can tell: the ./configure of make-4.1 is called with
> SHELL and CONFIG_SHELL set to
>
> /home/taylan/src/guix/build/guix-0.9.1/_build/sub/test-tmp/store/d41iyl2gyk0rwd9z2ddgph9nyg48f3p0-bootstrap-binaries-0/bin/bash
>
> which is exactly 127 characters, but add #! and you have 129. This ends
> up being the shebang of config.status, which is why it fails while
> trying to call that.

So the diagnostic was correct.

Toggle quote (2 lines)
> Only the error message is broken.

Would be interesting to see which is the piece of software that has an
even lower limit here.

Ludo’.
Closed
T
T
Taylan Ulrich Bay?rl? /Kammer wrote on 13 Jan 2016 10:00
(name . Ludovic Courtès)(address . ludo@gnu.org)(address . 22354-done@debbugs.gnu.org)
87io2xvooo.fsf@T420.taylan
ludo@gnu.org (Ludovic Courtès) writes:

Toggle quote (29 lines)
> taylanbayirli@gmail.com (Taylan Ulrich "Bay?rl?/Kammer") skribis:
>
>> ludo@gnu.org (Ludovic Courtès) writes:
>>
>>> taylanbayirli@gmail.com (Taylan Ulrich "Bay?rl?/Kammer") skribis:
>>>
>>>> If one runs distcheck from within the build directory of an out-of-tree
>>>> build (perhaps a strange combination), the guix-environment.sh test
>>>> fails with the following log snippet.
>>>
>>> [...]
>>>
>>>> ./configure: ./config.status: /home/taylan/src/guix/build/guix-0.9.1/_build/sub/test-tmp/store/d41iyl2gyk0r: bad interpreter: No such file or directory
>>>
>>> I think you’re hitting the shebang limit (127 chars) that prevents you
>>> from running test from that build tree. ./configure emits a warning in
>>> this case, which you should see in ‘config.log’.
>>>
>>> So, not a bug, but it would have been nicer if ‘make check’ had failed
>>> directly. Commit bb25130 does that.
>>>
>>> Though now that I look again at the error above, I see that we’re below
>>> the 127 char limit. Weird.
>>
>> Hmm, that commit didn't fix the issue.
>
> You mean it doesn’t error out directly upon ‘make check’? Could you
> run “grep length …/_build/config.log”?

Yes, it still goes through the tests and fails at guix-environment.sh
with the same error. I repeated all steps from a new clone of master.

taylan@T420:~/src/guix/build$ grep length guix-0.9.1/_build/sub/config.log
configure:6946: checking the length of the installed socket file name
configure:6969: checking the length of the socket file name used in tests
configure:6980: checking the length of a typical hash bang line
configure:6992: checking the length of a hash bang line used in tests
ac_cv_guix_hash_bang_length=73
ac_cv_guix_socket_file_name_length=74
ac_cv_guix_test_hash_bang_length=127
ac_cv_guix_test_socket_file_name_length=90

Toggle quote (18 lines)
>> I'm also puzzled by the cut-off of the shebang string at 77 characters
>> in the error message, so I looked into it a bit, but nothing strange
>> here from what I can tell: the ./configure of make-4.1 is called with
>> SHELL and CONFIG_SHELL set to
>>
>> /home/taylan/src/guix/build/guix-0.9.1/_build/sub/test-tmp/store/d41iyl2gyk0rwd9z2ddgph9nyg48f3p0-bootstrap-binaries-0/bin/bash
>>
>> which is exactly 127 characters, but add #! and you have 129. This ends
>> up being the shebang of config.status, which is why it fails while
>> trying to call that.
>
> So the diagnostic was correct.
>
>> Only the error message is broken.
>
> Would be interesting to see which is the piece of software that has an
> even lower limit here.

For what it's worth, I confirmed that on my system (Debian 8), using
/bin/bash (in case it should be relevant):

- the hash bang limit of a called script is 127 characters, and

- when I pass the limit, I get an error message where the path is
truncated to 77 characters.

Maybe it's something in Linux or in glibc. I don't know what other
parts of the system are involved here.

Toggle quote (2 lines)
> Ludo’.

Taylan
Closed
L
L
Ludovic Courtès wrote on 13 Jan 2016 11:13
(name . Taylan Ulrich "Bay?rl? /Kammer")(address . taylanbayirli@gmail.com)(address . 22354-done@debbugs.gnu.org)
871t9l949a.fsf@gnu.org
taylanbayirli@gmail.com (Taylan Ulrich "Bay?rl?/Kammer") skribis:

Toggle quote (6 lines)
> ludo@gnu.org (Ludovic Courtès) writes:
>
>> taylanbayirli@gmail.com (Taylan Ulrich "Bay?rl?/Kammer") skribis:

>>>>> ./configure: ./config.status: /home/taylan/src/guix/build/guix-0.9.1/_build/sub/test-tmp/store/d41iyl2gyk0r: bad interpreter: No such file or directory

[...]

Toggle quote (18 lines)
>>> Hmm, that commit didn't fix the issue.
>>
>> You mean it doesn’t error out directly upon ‘make check’? Could you
>> run “grep length …/_build/config.log”?
>
> Yes, it still goes through the tests and fails at guix-environment.sh
> with the same error. I repeated all steps from a new clone of master.
>
> taylan@T420:~/src/guix/build$ grep length guix-0.9.1/_build/sub/config.log
> configure:6946: checking the length of the installed socket file name
> configure:6969: checking the length of the socket file name used in tests
> configure:6980: checking the length of a typical hash bang line
> configure:6992: checking the length of a hash bang line used in tests
> ac_cv_guix_hash_bang_length=73
> ac_cv_guix_socket_file_name_length=74
> ac_cv_guix_test_hash_bang_length=127
> ac_cv_guix_test_socket_file_name_length=90

Arff, I see. I’ve change LINUX_HASH_BANG_LIMIT in guix.m4 to 127
instead of 128 to account for the trailing zero.

This time it should detect the problem early.

Toggle quote (13 lines)
>>> Only the error message is broken.
>>
>> Would be interesting to see which is the piece of software that has an
>> even lower limit here.
>
> For what it's worth, I confirmed that on my system (Debian 8), using
> /bin/bash (in case it should be relevant):
>
> - the hash bang limit of a called script is 127 characters, and
>
> - when I pass the limit, I get an error message where the path is
> truncated to 77 characters.

The “bad interpreter” message comes from Bash, in execute_cmd.c.

However, that file does this:

Toggle snippet (15 lines)
char sample[80];

[…]

#if defined (HAVE_HASH_BANG_EXEC)
READ_SAMPLE_BUF (command, sample, sample_len);
sample[sample_len - 1] = '\0';
if (sample_len > 2 && sample[0] == '#' && sample[1] == '!')
{
char *interp;
int ilen;

interp = getinterp (sample, sample_len, (int *)NULL);

where READ_SAMPLE_BUF is:

Toggle snippet (15 lines)
#define READ_SAMPLE_BUF(file, buf, len) \
do \
{ \
fd = open(file, O_RDONLY); \
if (fd >= 0) \
{ \
len = read (fd, buf, 80); \
close (fd); \
} \
else \
len = -1; \
} \
while (0)

Now we know. :-)

Ludo’.
Closed
L
L
Ludovic Courtès wrote on 13 Jan 2016 11:25
Hash-bang line length
(address . bug-bash@gnu.org)(address . 22354@debbugs.gnu.org)
87lh7t7p4w.fsf@gnu.org
Hello,

The ‘READ_SAMPLE_BUF’ macro in execute_cmd.c reads at most 80 bytes from
the hash-bang line. This is less than the already-small 128-byte limit
in the Linux kernel¹ and can quite easily be hit².

What about changing it to 128 bytes (as well as the ‘sample’ array) to
at least match Linux?

(It might even make sense to make it bigger so that Bash might succeed
when the kernel simply fails.)

Thanks,
Ludo’.

T
T
Taylan Ulrich Bay?rl? /Kammer wrote on 13 Jan 2016 11:42
Re: bug#22354: Test failure when running distcheck from out-of-tree build
(name . Ludovic Courtès)(address . ludo@gnu.org)(address . 22354-done@debbugs.gnu.org)
87egdlvjzr.fsf@T420.taylan
ludo@gnu.org (Ludovic Courtès) writes:

Toggle quote (20 lines)
> taylanbayirli@gmail.com (Taylan Ulrich "Bay?rl?/Kammer") skribis:
>
>> Yes, it still goes through the tests and fails at guix-environment.sh
>> with the same error. I repeated all steps from a new clone of master.
>>
>> taylan@T420:~/src/guix/build$ grep length guix-0.9.1/_build/sub/config.log
>> configure:6946: checking the length of the installed socket file name
>> configure:6969: checking the length of the socket file name used in tests
>> configure:6980: checking the length of a typical hash bang line
>> configure:6992: checking the length of a hash bang line used in tests
>> ac_cv_guix_hash_bang_length=73
>> ac_cv_guix_socket_file_name_length=74
>> ac_cv_guix_test_hash_bang_length=127
>> ac_cv_guix_test_socket_file_name_length=90
>
> Arff, I see. I’ve change LINUX_HASH_BANG_LIMIT in guix.m4 to 127
> instead of 128 to account for the trailing zero.
>
> This time it should detect the problem early.

Indeed, it fails with a meaningful error message at the beginning of the
check phase now.

Toggle quote (36 lines)
> The “bad interpreter” message comes from Bash, in execute_cmd.c.
>
> However, that file does this:
>
> char sample[80];
>
> […]
>
> #if defined (HAVE_HASH_BANG_EXEC)
> READ_SAMPLE_BUF (command, sample, sample_len);
> sample[sample_len - 1] = '\0';
> if (sample_len > 2 && sample[0] == '#' && sample[1] == '!')
> {
> char *interp;
> int ilen;
>
> interp = getinterp (sample, sample_len, (int *)NULL);
>
> where READ_SAMPLE_BUF is:
>
> #define READ_SAMPLE_BUF(file, buf, len) \
> do \
> { \
> fd = open(file, O_RDONLY); \
> if (fd >= 0) \
> { \
> len = read (fd, buf, 80); \
> close (fd); \
> } \
> else \
> len = -1; \
> } \
> while (0)
>
> Now we know. :-)

Yay for hard-coded limits! :P

Toggle quote (2 lines)
> Ludo’.

Taylan
Closed
G
G
Greg Wooledge wrote on 13 Jan 2016 14:19
Re: Hash-bang line length
(name . Ludovic Courtès)(address . ludo@gnu.org)
20160113131902.GU27325@eeg.ccf.org
On Wed, Jan 13, 2016 at 11:25:03AM +0100, Ludovic Court�s wrote:
Toggle quote (6 lines)
> Hello,
>
> The ???READ_SAMPLE_BUF??? macro in execute_cmd.c reads at most 80 bytes from
> the hash-bang line. This is less than the already-small 128-byte limit
> in the Linux kernel� and can quite easily be hit�.

That's actually much bigger than one expects for shebang handling on
any traditional Unix system.

authoritative source on the topic, and it shows limits of 16 to 32
bytes for the first implementations. Later, it mentions that Linux's
implementation started at 1022, then was changed to 127.
L
L
Ludovic Courtès wrote on 13 Jan 2016 14:52
(name . Greg Wooledge)(address . wooledg@eeg.ccf.org)
87y4bt60zb.fsf@gnu.org
Greg Wooledge <wooledg@eeg.ccf.org> skribis:

Toggle quote (10 lines)
> On Wed, Jan 13, 2016 at 11:25:03AM +0100, Ludovic Courtès wrote:
>> Hello,
>>
>> The ???READ_SAMPLE_BUF??? macro in execute_cmd.c reads at most 80 bytes from
>> the hash-bang line. This is less than the already-small 128-byte limit
>> in the Linux kernel¹ and can quite easily be hit².
>
> That's actually much bigger than one expects for shebang handling on
> any traditional Unix system.

Sure, but the fact that it’s smaller than that of the kernel Linux is
problematic: when a hash-bang line > 127 chars is encountered, ‘execve’
fails with ENOENT, so Bash’s fallback code is executed, fails as well,
but it prints a misleading error message with an even more truncated
hash-bang line.

Ludo’.
G
G
Greg Wooledge wrote on 13 Jan 2016 15:04
(name . Ludovic Courtès)(address . ludo@gnu.org)
20160113140441.GZ27325@eeg.ccf.org
On Wed, Jan 13, 2016 at 02:52:08PM +0100, Ludovic Court�s wrote:
Toggle quote (6 lines)
> Sure, but the fact that it???s smaller than that of the kernel Linux is
> problematic: when a hash-bang line > 127 chars is encountered, ???execve???
> fails with ENOENT, so Bash???s fallback code is executed, fails as well,
> but it prints a misleading error message with an even more truncated
> hash-bang line.

Let's suppose bash is changed to read a shebang line of unlimited length.
In your scenario, the script with the 150 character shebang fails at the
kernel level with ENOENT, so bash's fallback code runs, and the script
is executed by a new instance of bash.

This just masks the problem. Now, your script ONLY works when you
run it from a bash shell. Not from any other shell, not via C's exec(),
not via find -exec, etc.

That said, it's not bash's place to try to guess how the host system's
kernel will handle the shebang. I certainly wouldn't expect bash to
tell me "Hey, this is Linux, so your shebang won't work because it's
more than 127 bytes."

I'm not sure what error message or behavior you think bash should employ
in this scenario. I don't see any clear "best" choice here.
C
C
Chet Ramey wrote on 13 Jan 2016 17:18
569678DE.7020503@case.edu
On 1/13/16 5:25 AM, Ludovic Courtès wrote:
Toggle quote (6 lines)
> Hello,
>
> The ‘READ_SAMPLE_BUF’ macro in execute_cmd.c reads at most 80 bytes from
> the hash-bang line. This is less than the already-small 128-byte limit
> in the Linux kernel¹ and can quite easily be hit².

That limit is huge compared to other Unixes, btw.

Toggle quote (6 lines)
> What about changing it to 128 bytes (as well as the ‘sample’ array) to
> at least match Linux?
>
> (It might even make sense to make it bigger so that Bash might succeed
> when the kernel simply fails.)

If the kernel returns an errno other than ENOEXEC, bash isn't going to
`succeed'. This is entirely a cosmetic issue concerning the error message
bash prints when execve fails.

--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU chet@case.edu http://cnswww.cns.cwru.edu/~chet/
C
C
Chet Ramey wrote on 13 Jan 2016 17:21
56967976.2080908@case.edu
On 1/13/16 8:52 AM, Ludovic Courtès wrote:
Toggle quote (16 lines)
> Greg Wooledge <wooledg@eeg.ccf.org> skribis:
>
>> On Wed, Jan 13, 2016 at 11:25:03AM +0100, Ludovic Courtès wrote:
>>> Hello,
>>>
>>> The ???READ_SAMPLE_BUF??? macro in execute_cmd.c reads at most 80 bytes from
>>> the hash-bang line. This is less than the already-small 128-byte limit
>>> in the Linux kernel¹ and can quite easily be hit².
>>
>> That's actually much bigger than one expects for shebang handling on
>> any traditional Unix system.
>
> Sure, but the fact that it’s smaller than that of the kernel Linux is
> problematic: when a hash-bang line > 127 chars is encountered, ‘execve’
> fails with ENOENT, so Bash’s fallback code is executed, fails as well,

No. Since the execve fails with ENOENT, bash just prints an error
message.

Toggle quote (3 lines)
> but it prints a misleading error message with an even more truncated
> hash-bang line.

Again, it's only a cosmetic issue. I don't have a problem with increasing
the buffer size, but let's not pretend it's anything but that.

--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU chet@case.edu http://cnswww.cns.cwru.edu/~chet/
C
C
Chet Ramey wrote on 13 Jan 2016 17:23
56967A06.8040104@case.edu
On 1/13/16 9:04 AM, Greg Wooledge wrote:
Toggle quote (12 lines)
> On Wed, Jan 13, 2016 at 02:52:08PM +0100, Ludovic Courtès wrote:
>> Sure, but the fact that it???s smaller than that of the kernel Linux is
>> problematic: when a hash-bang line > 127 chars is encountered, ???execve???
>> fails with ENOENT, so Bash???s fallback code is executed, fails as well,
>> but it prints a misleading error message with an even more truncated
>> hash-bang line.
>
> Let's suppose bash is changed to read a shebang line of unlimited length.
> In your scenario, the script with the 150 character shebang fails at the
> kernel level with ENOENT, so bash's fallback code runs, and the script
> is executed by a new instance of bash.

No, it isn't. The execve fails with ENOENT, so bash just prints an error
message containing the interpreter name, which Ludo is reporting is
truncated.

--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU chet@case.edu http://cnswww.cns.cwru.edu/~chet/
G
G
Greg Wooledge wrote on 13 Jan 2016 17:39
(name . Chet Ramey)(address . chet.ramey@case.edu)
20160113163917.GB27325@eeg.ccf.org
On Wed, Jan 13, 2016 at 11:23:34AM -0500, Chet Ramey wrote:
Toggle quote (17 lines)
> On 1/13/16 9:04 AM, Greg Wooledge wrote:
> > On Wed, Jan 13, 2016 at 02:52:08PM +0100, Ludovic Court�s wrote:
> >> Sure, but the fact that it???s smaller than that of the kernel Linux is
> >> problematic: when a hash-bang line > 127 chars is encountered, ???execve???
> >> fails with ENOENT, so Bash???s fallback code is executed, fails as well,
> >> but it prints a misleading error message with an even more truncated
> >> hash-bang line.
> >
> > Let's suppose bash is changed to read a shebang line of unlimited length.
> > In your scenario, the script with the 150 character shebang fails at the
> > kernel level with ENOENT, so bash's fallback code runs, and the script
> > is executed by a new instance of bash.
>
> No, it isn't. The execve fails with ENOENT, so bash just prints an error
> message containing the interpreter name, which Ludo is reporting is
> truncated.

Ah. You're right, and I should have double-checked Ludo's understanding
of the code before responding. I assumed Ludo's assertion was correct,
but it's not.

The "fallback code" is only executed when execve() fails with ENOEXEC.
L
L
Ludovic Courtès wrote on 13 Jan 2016 18:41
(name . Chet Ramey)(address . chet.ramey@case.edu)
87vb6x2x7u.fsf@gnu.org
Chet Ramey <chet.ramey@case.edu> skribis:

Toggle quote (20 lines)
> On 1/13/16 8:52 AM, Ludovic Courtès wrote:
>> Greg Wooledge <wooledg@eeg.ccf.org> skribis:
>>
>>> On Wed, Jan 13, 2016 at 11:25:03AM +0100, Ludovic Courtès wrote:
>>>> Hello,
>>>>
>>>> The ???READ_SAMPLE_BUF??? macro in execute_cmd.c reads at most 80 bytes from
>>>> the hash-bang line. This is less than the already-small 128-byte limit
>>>> in the Linux kernel¹ and can quite easily be hit².
>>>
>>> That's actually much bigger than one expects for shebang handling on
>>> any traditional Unix system.
>>
>> Sure, but the fact that it’s smaller than that of the kernel Linux is
>> problematic: when a hash-bang line > 127 chars is encountered, ‘execve’
>> fails with ENOENT, so Bash’s fallback code is executed, fails as well,
>
> No. Since the execve fails with ENOENT, bash just prints an error
> message.

Right, sorry for the confusion.

Toggle quote (6 lines)
>> but it prints a misleading error message with an even more truncated
>> hash-bang line.
>
> Again, it's only a cosmetic issue. I don't have a problem with increasing
> the buffer size, but let's not pretend it's anything but that.

Exactly. I was talking about the “bad interpreter” error message
specifically.

Ludo’.
C
C
Chet Ramey wrote on 13 Jan 2016 21:47
(name . Ludovic Courtès)(address . ludo@gnu.org)
5696B7FE.5080508@case.edu
On 1/13/16 12:41 PM, Ludovic Courtès wrote:

Toggle quote (9 lines)
>>> but it prints a misleading error message with an even more truncated
>>> hash-bang line.
>>
>> Again, it's only a cosmetic issue. I don't have a problem with increasing
>> the buffer size, but let's not pretend it's anything but that.
>
> Exactly. I was talking about the “bad interpreter” error message
> specifically.

OK, we'll try it. Can't hurt.

--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU chet@case.edu http://cnswww.cns.cwru.edu/~chet/
?