summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--INSTALL2
-rw-r--r--Makefile11
-rwxr-xr-xconfigure25
-rw-r--r--doc/s6-linux-init-maker.html4
-rw-r--r--package/targets.mak4
5 files changed, 22 insertions, 24 deletions
diff --git a/INSTALL b/INSTALL
index 74bb27f..02867d9 100644
--- a/INSTALL
+++ b/INSTALL
@@ -32,7 +32,7 @@ scripts will not run properly on another OS.
./configure && make && sudo make install
will work for most users.
- It will install the s6-linux-init-maker binary in /sbin.
+ It will install the binaries in /bin.
You can strip the binaries and libraries of their extra symbols via
"make strip" before the "make install" phase. It will shave a few bytes
diff --git a/Makefile b/Makefile
index 67fb474..bffc468 100644
--- a/Makefile
+++ b/Makefile
@@ -50,7 +50,7 @@ RANLIB := $(CROSS_COMPILE)ranlib
STRIP := $(CROSS_COMPILE)strip
INSTALL := ./tools/install.sh
-ALL_BINS := $(LIBEXEC_TARGETS) $(BIN_TARGETS) $(SBIN_TARGETS)
+ALL_BINS := $(LIBEXEC_TARGETS) $(BIN_TARGETS)
ALL_LIBS := $(SHARED_LIBS) $(STATIC_LIBS) $(INTERNAL_LIBS)
ALL_INCLUDES := $(wildcard src/include/$(package)/*.h)
@@ -78,11 +78,10 @@ ifneq ($(strip $(ALL_BINS)$(SHARED_LIBS)),)
exec $(STRIP) -R .note -R .comment -R .note.GNU-stack $(ALL_BINS) $(SHARED_LIBS)
endif
-install: install-dynlib install-libexec install-bin install-sbin install-lib install-include
+install: install-dynlib install-libexec install-bin install-lib install-include
install-dynlib: $(SHARED_LIBS:lib%.so.xyzzy=$(DESTDIR)$(dynlibdir)/lib%.so)
install-libexec: $(LIBEXEC_TARGETS:%=$(DESTDIR)$(libexecdir)/%)
install-bin: $(BIN_TARGETS:%=$(DESTDIR)$(bindir)/%)
-install-sbin: $(SBIN_TARGETS:%=$(DESTDIR)$(sbindir)/%)
install-lib: $(STATIC_LIBS:lib%.a.xyzzy=$(DESTDIR)$(libdir)/lib%.a)
install-include: $(ALL_INCLUDES:src/include/$(package)/%.h=$(DESTDIR)$(includedir)/$(package)/%.h)
install-data: $(ALL_DATA:src/etc/%=$(DESTDIR)$(datadir)/%)
@@ -94,7 +93,7 @@ $(DESTDIR)$(exthome): $(DESTDIR)$(home)
update: $(DESTDIR)$(exthome)
-global-links: $(DESTDIR)$(exthome) $(SHARED_LIBS:lib%.so.xyzzy=$(DESTDIR)$(sproot)/library.so/lib%.so.$(version_M)) $(BIN_TARGETS:%=$(DESTDIR)$(sproot)/command/%) $(SBIN_TARGETS:%=$(DESTDIR)$(sproot)/command/%)
+global-links: $(DESTDIR)$(exthome) $(SHARED_LIBS:lib%.so.xyzzy=$(DESTDIR)$(sproot)/library.so/lib%.so.$(version_M)) $(BIN_TARGETS:%=$(DESTDIR)$(sproot)/command/%)
$(DESTDIR)$(sproot)/command/%: $(DESTDIR)$(home)/command/%
exec $(INSTALL) -D -l ..$(subst $(sproot),,$(exthome))/command/$(<F) $@
@@ -115,7 +114,7 @@ $(DESTDIR)$(dynlibdir)/lib%.so: lib%.so.xyzzy
$(INSTALL) -l $(@F).$(version_m) $@.$(version_M) && \
exec $(INSTALL) -l $(@F).$(version_M) $@
-$(DESTDIR)$(libexecdir)/% $(DESTDIR)$(bindir)/% $(DESTDIR)$(sbindir)/%: % package/modes
+$(DESTDIR)$(libexecdir)/% $(DESTDIR)$(bindir)/%: % package/modes
exec $(INSTALL) -D -m 600 $< $@
grep -- ^$(@F) < package/modes | { read name mode owner && \
if [ x$$owner != x ] ; then chown -- $$owner $@ ; fi && \
@@ -143,6 +142,6 @@ lib%.a.xyzzy:
lib%.so.xyzzy:
exec $(REALCC) -o $@ $(CFLAGS_ALL) $(CFLAGS_SHARED) $(LDFLAGS_ALL) $(LDFLAGS_SHARED) -Wl,-soname,$(patsubst lib%.so.xyzzy,lib%.so.$(version_M),$@) $^ $(EXTRA_LIBS) $(LDLIBS)
-.PHONY: it all clean distclean tgz strip install install-dynlib install-bin install-sbin install-lib install-include install-data
+.PHONY: it all clean distclean tgz strip install install-dynlib install-bin install-lib install-include install-data
.DELETE_ON_ERROR:
diff --git a/configure b/configure
index 0d5867a..47de6bd 100755
--- a/configure
+++ b/configure
@@ -19,7 +19,6 @@ Installation directories:
Fine tuning of the installation directories:
--dynlibdir=DIR shared library files [PREFIX/lib]
--bindir=BINDIR user executables [EPREFIX/bin]
- --sbindir=DIR admin executables [EPREFIX/sbin]
--libexecdir=DIR package-scoped executables [EPREFIX/libexec]
--libdir=DIR static library files [PREFIX/lib/$package]
--includedir=DIR C header files [PREFIX/include]
@@ -42,6 +41,8 @@ Optional features:
--disable-allstatic do not prefer linking against static libraries [enabled]
--enable-static-libc make entirely static binaries [disabled]
--enable-slashpackage[=ROOT] assume /package installation at ROOT [disabled]
+ --enable-absolute-paths do not rely on PATH to access this package's binaries,
+ hardcode absolute BINDIR/foobar paths instead [disabled]
EOF
exit 0
@@ -129,7 +130,6 @@ exec_prefix='$prefix'
dynlibdir='$prefix/lib'
libexecdir='$exec_prefix/libexec'
bindir='$exec_prefix/bin'
-sbindir='$exec_prefix/sbin'
libdir='$prefix/lib/$package'
includedir='$prefix/include'
sysdeps='$prefix/lib/skalibs/sysdeps'
@@ -137,6 +137,7 @@ manualsysdeps=false
shared=false
static=true
slashpackage=false
+abspath=false
sproot=
home=
exthome=
@@ -157,7 +158,6 @@ for arg ; do
--dynlibdir=*) dynlibdir=${arg#*=} ;;
--libexecdir=*) libexecdir=${arg#*=} ;;
--bindir=*) bindir=${arg#*=} ;;
- --sbindir=*) sbindir=${arg#*=} ;;
--libdir=*) libdir=${arg#*=} ;;
--includedir=*) includedir=${arg#*=} ;;
--with-sysdeps=*) sysdeps=${arg#*=} manualsysdeps=true ;;
@@ -175,6 +175,8 @@ for arg ; do
--enable-slashpackage=*) sproot=${arg#*=} ; slashpackage=true ; ;;
--enable-slashpackage) sproot= ; slashpackage=true ;;
--disable-slashpackage) sproot= ; slashpackage=false ;;
+ --enable-absolute-paths|--enable-absolute-paths=yes) abspath=true ;;
+ --disable-absolute-paths|--enable-absolute-paths=no) abspath=false ;;
--enable-*|--disable-*|--with-*|--without-*|--*dir=*) ;;
--host=*|--target=*) target=${arg#*=} ;;
--build=*) build=${arg#*=} ;;
@@ -199,7 +201,7 @@ fi
# Expand installation directories
stripdir prefix
-for i in exec_prefix dynlibdir libexecdir bindir sbindir libdir includedir sysdeps sproot ; do
+for i in exec_prefix dynlibdir libexecdir bindir libdir includedir sysdeps sproot ; do
eval tmp=\${$i}
eval $i=$tmp
stripdir $i
@@ -228,13 +230,11 @@ if $slashpackage ; then
else
sysdeps=${sproot}/package/prog/skalibs/sysdeps
fi
- binprefix=${home}/command
extbinprefix=${exthome}/command
dynlibdir=${home}/library.so
- libexecdir=$binprefix
- bindir=$binprefix
- sbindir=$binprefix
+ bindir=${home}/command
libdir=${home}/library
+ libexecdir=$bindir
includedir=${home}/include
while read dep ; do
addincpath="$addincpath -I${sproot}${dep}/include"
@@ -352,7 +352,6 @@ exec_prefix := $exec_prefix
dynlibdir := $dynlibdir
libexecdir := $libexecdir
bindir := $bindir
-sbindir := $sbindir
libdir := $libdir
includedir := $includedir
sysdeps := $sysdeps
@@ -412,14 +411,16 @@ cat <<EOF
#define ${package_macro_name}_VERSION "$version"
EOF
if $slashpackage ; then
- echo "#define ${package_macro_name}_BINPREFIX \"$binprefix/\""
+ echo "#define ${package_macro_name}_BINPREFIX \"$bindir/\""
echo "#define ${package_macro_name}_EXTBINPREFIX \"$extbinprefix/\""
- echo "#define ${package_macro_name}_LIBEXECPREFIX \"$binprefix/\""
+elif $abspath ; then
+ echo "#define ${package_macro_name}_BINPREFIX \"$bindir/\""
+ echo "#define ${package_macro_name}_EXTBINPREFIX \"$bindir/\""
else
echo "#define ${package_macro_name}_BINPREFIX \"\""
echo "#define ${package_macro_name}_EXTBINPREFIX \"\""
- echo "#define ${package_macro_name}_LIBEXECPREFIX \"$libexecdir/\""
fi
+echo "#define ${package_macro_name}_LIBEXECPREFIX \"$libexecdir/\""
echo
echo "#endif"
exec 1>&3 3>&-
diff --git a/doc/s6-linux-init-maker.html b/doc/s6-linux-init-maker.html
index cc18bf4..426896b 100644
--- a/doc/s6-linux-init-maker.html
+++ b/doc/s6-linux-init-maker.html
@@ -326,7 +326,7 @@ absolutely necessary for
<a href="http://skarnet.org/software/s6-linux-utils/">s6-linux-utils</a>
binaries to be accessible via <em>initial_path</em>, else the machine
will not boot. Default is
-<strong><tt>/usr/bin:/usr/sbin:/bin:/sbin</tt></strong>. </li> <p />
+<strong><tt>/usr/bin:/bin</tt></strong>. </li> <p />
<li> <tt>-m</tt>&nbsp;<em>initial_umask</em>&nbsp;: the value of
the initial file umask for all the starting processes, in octal.
@@ -360,7 +360,7 @@ variables into the <em>env_store</em> directory, via the
program, before erasing them. <em>env_store</em> should obviously be
a writable directory, so it should be located under <em>tmpfsdir</em>!
If this option is not given (which is the default), the environment
-inherited from the kernel isn't saved anywhere. </li>
+inherited from the kernel isn't saved anywhere. </li> <p />
<li> <tt>-e</tt>&nbsp;<em>initial_envvar</em>&nbsp;: this option
can be repeated. For every <em>initial_envvar</em>, s6-linux-init-maker
diff --git a/package/targets.mak b/package/targets.mak
index 83ed8c5..26ef489 100644
--- a/package/targets.mak
+++ b/package/targets.mak
@@ -1,6 +1,4 @@
-BIN_TARGETS :=
-
-SBIN_TARGETS := \
+BIN_TARGETS := \
s6-linux-init-maker \
s6-halt \
s6-poweroff \