From 31694907dde18fc70d7b3e3813e5183d35f0e5db Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Wed, 9 Oct 2019 17:24:15 +0000 Subject: Add --enable-pedantic-posix, posix-cd, prepare for 2.5.3.0 Also make wait posix-compliant and update doc. --- .gitignore | 1 + INSTALL | 2 +- NEWS | 10 +++ configure | 11 +++- doc/cd.html | 12 ++-- doc/index.html | 5 +- doc/posix-cd.html | 62 ++++++++++++++++++ doc/upgrade.html | 10 +++ doc/wait.html | 10 +++ package/deps.mak | 3 + package/info | 2 +- package/modes | 1 + package/targets.mak | 9 +++ src/execline/wait.c | 54 ++++++++++----- src/posix/deps-exe/posix-cd | 1 + src/posix/posix-cd.c | 155 ++++++++++++++++++++++++++++++++++++++++++++ 16 files changed, 324 insertions(+), 24 deletions(-) create mode 100644 doc/posix-cd.html create mode 100644 src/posix/deps-exe/posix-cd create mode 100644 src/posix/posix-cd.c diff --git a/.gitignore b/.gitignore index 4c9e807..0631586 100644 --- a/.gitignore +++ b/.gitignore @@ -42,6 +42,7 @@ /multisubstitute /pipeline /piperw +/posix-cd /redirfd /runblock /shift diff --git a/INSTALL b/INSTALL index 0534bbe..4dc76f4 100644 --- a/INSTALL +++ b/INSTALL @@ -6,7 +6,7 @@ Build Instructions - A POSIX-compliant C development environment - GNU make version 3.81 or later - - skalibs version 2.9.0.0 or later: http://skarnet.org/software/skalibs/ + - skalibs version 2.9.1.0 or later: http://skarnet.org/software/skalibs/ This software will run on any operating system that implements POSIX.1-2008, available at: diff --git a/NEWS b/NEWS index 35ce3d4..e0492aa 100644 --- a/NEWS +++ b/NEWS @@ -1,5 +1,15 @@ Changelog for execline. +In 2.5.3.0 +---------- + + - New configure option: --enable-pedantic-posix. This +makes the "cd" program a symbolic link to a "posix-cd" program +which is fully POSIX compliant. This makes distributions unable +to use the "execline breaks POSIX" pretext to refuse to package +execline correctly. + + In 2.5.2.0 ---------- diff --git a/configure b/configure index 0013e53..ce3939d 100755 --- a/configure +++ b/configure @@ -47,6 +47,7 @@ Optional features: --enable-absolute-paths do not rely on PATH to access this package's binaries, hardcode absolute BINDIR/foobar paths instead [disabled] --enable-nsss use the nsss library for user information [disabled] + --enable-pedantic-posix use pedantically POSIX-compatible binaries [disabled] EOF exit 0 @@ -152,6 +153,7 @@ allpic=true slashpackage=false abspath=false usensss=false +pposix=false sproot= home= exthome= @@ -196,6 +198,9 @@ for arg ; do --disable-absolute-paths|--enable-absolute-paths=no) abspath=false ;; --enable-nsss|--enable-nsss=yes) usensss=true ;; --disable-nsss|--enable-nsss=no) usensss=false ;; + --enable-pedantic-posix|--enable-pedantic-posix=yes) pposix=true ;; + --disable-pedantic-posix|--enable-pedantic-posix=no) pposix=false ;; + --enable-*|--disable-*|--with-*|--without-*|--*dir=*) ;; --enable-*|--disable-*|--with-*|--without-*|--*dir=*) ;; --host=*|--target=*) target=${arg#*=} ;; --build=*) build=${arg#*=} ;; @@ -455,7 +460,11 @@ else echo "LIBNSSS :=" echo "MAYBEPTHREAD_LIB :=" fi - +if $pposix ; then + echo "PEDANTIC_POSIX := 1" +else + echo "PEDANTIC_POSIX :=" +fi exec 1>&3 3>&- echo " ... done." diff --git a/doc/cd.html b/doc/cd.html index c412e5e..fe64c19 100644 --- a/doc/cd.html +++ b/doc/cd.html @@ -37,10 +37,14 @@ system call on dir, then execs into prog....

Notes

-

-cd is a standard shell builtin. Be careful if you want to -use the cd command outside of an execline script. -

+ + diff --git a/doc/index.html b/doc/index.html index 193f476..0a3643c 100644 --- a/doc/index.html +++ b/doc/index.html @@ -51,7 +51,7 @@ shell's syntax, and has no security issues.
  • A POSIX-compliant system with a standard C development environment
  • GNU make, version 3.81 or later.
  • skalibs version -2.9.0.0 or later. It's a build-time requirement. It's also a run-time +2.9.1.0 or later. It's a build-time requirement. It's also a run-time requirement if you link against the shared version of the skalibs library.
  • @@ -66,7 +66,7 @@ library.

    Download