From 6cd13aba0d95ccc8ebd244cb68389694acf33b1d Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Thu, 10 Mar 2016 22:18:27 +0000 Subject: Change default SKALIBS_DEFAULTPATH to /usr/bin:/usr/sbin:/bin:/sbin to accommodate s6-linux-init. Also add /command on slashpackage installations. --- configure | 15 +++++++++++---- doc/flags.html | 14 ++++++++++++-- 2 files changed, 23 insertions(+), 6 deletions(-) diff --git a/configure b/configure index 04eab09..dfaa30d 100755 --- a/configure +++ b/configure @@ -46,7 +46,7 @@ $package options: --enable-clock use clock_gettime() instead of gettimeofday() [disabled] --enable-monotonic count time with CLOCK_MONOTONIC instead of CLOCK_REALTIME --enable-force-devr assume /dev/random exists and is valid [autodetection takes time] - --with-default-path=PATH default executable search path [/usr/bin:/bin] + --with-default-path=PATH default executable search path [/usr/bin:/usr/sbin:/bin:/sbin] EOF exit 0 @@ -191,7 +191,9 @@ taiclock=false clockrt=false clockmon=false forcedevr=false -defaultpath=/usr/bin:/bin +ddefaultpath=/usr/bin:/usr/sbin:/bin:/sbin +defaultpath=$ddefaultpath +dpathorig=true sproot= home= exthome= @@ -242,8 +244,8 @@ for arg ; do --disable-monotonic|--enable-monotonic=no) clockmon=false ;; --enable-force-devr|--enable-force-devr=yes) forcedevr=true ;; --disable-force-devr|--enable-force-devr=no) forcedevr=false ;; - --with-default-path=*) defaultpath=${arg#*=} ;; - --without-default-path) defaultpath=/usr/bin:/bin ;; + --with-default-path=*) defaultpath=${arg#*=} ; dpathorig=false ;; + --without-default-path) defaultpath=$ddefaultpath ; dpathorig=true ;; --enable-*|--disable-*|--with-*|--without-*|--*dir=*|--build=*) ;; --host=*|--target=*) target=${arg#*=} ;; -* ) echo "$0: unknown option $arg" ;; @@ -298,6 +300,11 @@ if $slashpackage ; then dynlibdir=${home}/library.so libdir=${home}/library includedir=${home}/include + if $dpathorig ; then + if echo $defaultpath | tr : '\n' | grep -q '^/command$' ; then : ; else + defaultpath="/command:$defaultpath" + fi + fi fi # Find a C compiler to use diff --git a/doc/flags.html b/doc/flags.html index e2db5ba..5dfcffd 100644 --- a/doc/flags.html +++ b/doc/flags.html @@ -34,7 +34,17 @@ If you enable it, and $v is the version of skalibs you're compiling, /package/prog/skalibs-$v/library, the dynamic libraries in /package/prog/skalibs-$v/library.so and the data files in /package/prog/skalibs-$v/etc, all prefixed by sproot -if present. It will also add two more "make" targets: +if present. +

+ +

+ It will also prepend the default path with /command, unless an +explicit default path has been given via the +--with-default-path option. +

+ +

+ Additionally, it will add two more "make" targets: