summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--AUTHORS2
-rw-r--r--CONTRIBUTING2
-rw-r--r--COPYING2
-rw-r--r--INSTALL31
-rw-r--r--Makefile19
-rw-r--r--NEWS4
-rw-r--r--package/deps.mak36
-rw-r--r--package/info2
-rw-r--r--package/targets.mak41
-rw-r--r--s6-linux-init/scripts/rc.init14
-rw-r--r--s6-linux-init/scripts/rc.shutdown5
-rw-r--r--s6-linux-init/scripts/rc.shutdown.final1
-rwxr-xr-xtools/gen-deps.sh18
-rwxr-xr-xtools/gen-targets.sh49
14 files changed, 104 insertions, 122 deletions
diff --git a/AUTHORS b/AUTHORS
index 1d835d3..f0a7c0c 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -1,5 +1,5 @@
Main author:
- Paul Sopka <psopka@sopka.ch>
+ PS <p@0x53.net>
Contributors:
diff --git a/CONTRIBUTING b/CONTRIBUTING
index 6279422..2e43fb3 100644
--- a/CONTRIBUTING
+++ b/CONTRIBUTING
@@ -1,4 +1,4 @@
- Please add a Signed-Off-By: line at the end of your commit,
+Please add a Signed-Off-By: line at the end of your commit,
which certifies that you have the right and authority to pass
it on as an open-source patch, as explicited in the Developer's
Certificate of Origin available in this project's DCO file,
diff --git a/COPYING b/COPYING
index 2dec60d..7a331b3 100644
--- a/COPYING
+++ b/COPYING
@@ -1,4 +1,4 @@
-Copyright (c) 2024-2025 Paul Sopka <psopka@sopka.ch>
+Copyright (c) 2024-2026 PS <p@0x53.net>
Permission to use, copy, modify, and distribute this software for any
purpose with or without fee is hereby granted, provided that the above
diff --git a/INSTALL b/INSTALL
index 19c0276..36548c2 100644
--- a/INSTALL
+++ b/INSTALL
@@ -4,48 +4,47 @@ Build Instructions
* Requirements
------------
- - A POSIX-compliant set of utils
- - A set of OS specific utils
+ - A set POSIX-compliant and OS specific utils, see https://0x53.net/software/requirements.html
+ - execline https://skarnet.org/software/execline/
- s6 https://skarnet.org/software/s6/
- s6-rc https://skarnet.org/software/s6-rc/
- - execline https://skarnet.org/software/execline/
+ - s6-linux-init https://skarnet.org/software/s6-linux-init/
- This software will run on any operating system that implements
-POSIX.1-2008, available at:
- https://pubs.opengroup.org/onlinepubs/9699919799/
+This software will run on any operating system
+that runs the requirements above.
* Standard usage
--------------
- ./configure && make && sudo make install
+ ./configure && make && make install
- will work for most users.
+will work for most users.
* Customization
-------------
- You can customize paths via flags given to configure.
- See ./configure --help for a list of all available configure options.
+You can customize paths via flags given to configure.
+See ./configure --help for a list of all available configure options.
* Make variables
--------------
- You can invoke make with a few variables for more configuration.
+You can invoke make with a few variables for more configuration.
- INSTALL can be overridden on the make command line. This is
+INSTALL can be overridden on the make command line. This is
an even bigger hammer than running ./configure with environment
variables, so it is advised to only do this when it is the only way of
obtaining the behaviour you want.
- DESTDIR can be given on the "make install" command line in order to
+DESTDIR can be given on the "make install" command line in order to
install to a staging directory.
* The slashpackage convention
---------------------------
- The slashpackage convention (http://cr.yp.to/slashpackage.html)
+The slashpackage convention (http://cr.yp.to/slashpackage.html)
is a package installation scheme that provides a few guarantees
over other conventions such as the FHS, for instance fixed
absolute pathnames. skarnet.org packages support it: use the
@@ -66,7 +65,7 @@ location in the filesystem)
--prefix is pretty much ignored when you use --enable-slashpackage.
You should probably not use both --enable-slashpackage and --prefix.
- When using slashpackage, two additional Makefile targets are
+When using slashpackage, two additional Makefile targets are
available after "make install":
- "make update" changes the default version of the software to the
freshly installed one. (This is useful when you have several installed
@@ -78,6 +77,6 @@ default version of the binaries and shared libraries.
* Out-of-tree builds
------------------
- This package does not support out-of-tree builds. It
+This package does not support out-of-tree builds. It
is small, so it does not cost much to duplicate the entire
source tree if parallel builds are needed.
diff --git a/Makefile b/Makefile
index 0e68c25..4ad8c64 100644
--- a/Makefile
+++ b/Makefile
@@ -36,11 +36,12 @@ distclean: clean
tgz: distclean
@. package/info && \
- rm -rf /tmp/$$package-$$version && \
- cp -a . /tmp/$$package-$$version && \
- cd /tmp && \
- tar -zpcv --owner=0 --group=0 --numeric-owner --exclude=.git* -f /tmp/$$package-$$version.tar.gz $$package-$$version && \
- exec rm -rf /tmp/$$package-$$version
+ rm -rf ../../stage/$$package-$$version && \
+ cp -a . ../../stage/$$package-$$version && \
+ cd ../../stage && \
+ tar -zpcv --owner=0 --group=0 --numeric-owner --exclude=.git* -f $$package-$$version.tar.gz $$package-$$version && \
+ sha256sum $$package-$$version.tar.gz > $$package-$$version.tar.gz.sha256 && \
+ exec rm -rf $$package-$$version
install: $(INSTALL_BINS) $(INSTALL_LIBS) $(INSTALL_EXTRAS)
@@ -62,7 +63,7 @@ $(ALL_BINS) $(ALL_LIBS):
-- $^ > $@
$(INSTALL_BINS) $(INSTALL_LIBS):
- exec $(INSTALL) -D -m 644 $^ $@
+ exec $(INSTALL) -D -m 644 $^ $(DESTDIR)/$@
grep -F -- $^ - < package/modes | { read name mode owner && \
if [ x$${mode} != x ] ; then chmod $${mode} $@ ; fi && \
if [ x$${owner} != x ] ; then chown -- $${owner} $@ ; fi ; } || exit 0
@@ -72,15 +73,11 @@ $(DESTDIR)$(exthome):
exec $(INSTALL) -D -l $(package)-$(version) $@
$(SLASHCOMMAND_BINS):
- exec $(INSTALL) -D -l $(exthome)/command/$$(basename $@) $@
+ exec $(INSTALL) -D -l $(DESTDIR)$(exthome)/command/$$(basename $@) $@
update: $(DESTDIR)$(exthome)
global-links: $(SLASHCOMMAND_BINS)
-uninstall:
- exec rm -f $(INSTALL_BINS) $(SLASHCOMMAND_BINS)
- exec rm -Rf $(libdir)
-
.PHONY: \
it all clean distclean tgz update global-links \
install uninstall \
diff --git a/NEWS b/NEWS
index 843464f..6ebf749 100644
--- a/NEWS
+++ b/NEWS
@@ -1,6 +1,6 @@
-Changelog for goetia-base.
+Changelog for goetia-s6-linux-init.
-In 0.0.0.1
+In 0.3.0.0
----------
- Initial release
diff --git a/package/deps.mak b/package/deps.mak
index b6f8836..6620290 100644
--- a/package/deps.mak
+++ b/package/deps.mak
@@ -3,38 +3,38 @@
#
system-init: src/bin/system-init
-$(DESTDIR)$(bindir)/system-init: system-init
+$(bindir)/system-init: system-init
system-shutdown: src/bin/system-shutdown
-$(DESTDIR)$(bindir)/system-shutdown: system-shutdown
+$(bindir)/system-shutdown: system-shutdown
s6-linux-init/scripts/rc.init: src/lib/s6-linux-init/scripts/rc.init
-$(DESTDIR)$(libdir)/s6-linux-init/scripts/rc.init: s6-linux-init/scripts/rc.init
+$(libdir)/s6-linux-init/scripts/rc.init: s6-linux-init/scripts/rc.init
s6-linux-init/scripts/rc.shutdown.final: src/lib/s6-linux-init/scripts/rc.shutdown.final
-$(DESTDIR)$(libdir)/s6-linux-init/scripts/rc.shutdown.final: s6-linux-init/scripts/rc.shutdown.final
+$(libdir)/s6-linux-init/scripts/rc.shutdown.final: s6-linux-init/scripts/rc.shutdown.final
s6-linux-init/scripts/rc.shutdown: src/lib/s6-linux-init/scripts/rc.shutdown
-$(DESTDIR)$(libdir)/s6-linux-init/scripts/rc.shutdown: s6-linux-init/scripts/rc.shutdown
+$(libdir)/s6-linux-init/scripts/rc.shutdown: s6-linux-init/scripts/rc.shutdown
service/system/s6-linux-init-runleveld/run: src/lib/service/system/s6-linux-init-runleveld/run
-$(DESTDIR)$(libdir)/service/system/s6-linux-init-runleveld/run: service/system/s6-linux-init-runleveld/run
+$(libdir)/service/system/s6-linux-init-runleveld/run: service/system/s6-linux-init-runleveld/run
service/system/s6-linux-init-runleveld/notification-fd: src/lib/service/system/s6-linux-init-runleveld/notification-fd
-$(DESTDIR)$(libdir)/service/system/s6-linux-init-runleveld/notification-fd: service/system/s6-linux-init-runleveld/notification-fd
+$(libdir)/service/system/s6-linux-init-runleveld/notification-fd: service/system/s6-linux-init-runleveld/notification-fd
service/system/.s6-svscan/crash: src/lib/service/system/.s6-svscan/crash
-$(DESTDIR)$(libdir)/service/system/.s6-svscan/crash: service/system/.s6-svscan/crash
+$(libdir)/service/system/.s6-svscan/crash: service/system/.s6-svscan/crash
service/system/.s6-svscan/SIGUSR1: src/lib/service/system/.s6-svscan/SIGUSR1
-$(DESTDIR)$(libdir)/service/system/.s6-svscan/SIGUSR1: service/system/.s6-svscan/SIGUSR1
+$(libdir)/service/system/.s6-svscan/SIGUSR1: service/system/.s6-svscan/SIGUSR1
service/system/.s6-svscan/finish: src/lib/service/system/.s6-svscan/finish
-$(DESTDIR)$(libdir)/service/system/.s6-svscan/finish: service/system/.s6-svscan/finish
+$(libdir)/service/system/.s6-svscan/finish: service/system/.s6-svscan/finish
service/system/.s6-svscan/SIGQUIT: src/lib/service/system/.s6-svscan/SIGQUIT
-$(DESTDIR)$(libdir)/service/system/.s6-svscan/SIGQUIT: service/system/.s6-svscan/SIGQUIT
+$(libdir)/service/system/.s6-svscan/SIGQUIT: service/system/.s6-svscan/SIGQUIT
service/system/.s6-svscan/SIGINT: src/lib/service/system/.s6-svscan/SIGINT
-$(DESTDIR)$(libdir)/service/system/.s6-svscan/SIGINT: service/system/.s6-svscan/SIGINT
+$(libdir)/service/system/.s6-svscan/SIGINT: service/system/.s6-svscan/SIGINT
service/system/.s6-svscan/SIGUSR2: src/lib/service/system/.s6-svscan/SIGUSR2
-$(DESTDIR)$(libdir)/service/system/.s6-svscan/SIGUSR2: service/system/.s6-svscan/SIGUSR2
+$(libdir)/service/system/.s6-svscan/SIGUSR2: service/system/.s6-svscan/SIGUSR2
service/system/.s6-svscan/SIGWINCH: src/lib/service/system/.s6-svscan/SIGWINCH
-$(DESTDIR)$(libdir)/service/system/.s6-svscan/SIGWINCH: service/system/.s6-svscan/SIGWINCH
+$(libdir)/service/system/.s6-svscan/SIGWINCH: service/system/.s6-svscan/SIGWINCH
service/system/.s6-svscan/SIGTERM: src/lib/service/system/.s6-svscan/SIGTERM
-$(DESTDIR)$(libdir)/service/system/.s6-svscan/SIGTERM: service/system/.s6-svscan/SIGTERM
+$(libdir)/service/system/.s6-svscan/SIGTERM: service/system/.s6-svscan/SIGTERM
service/system/.s6-svscan/SIGPWR: src/lib/service/system/.s6-svscan/SIGPWR
-$(DESTDIR)$(libdir)/service/system/.s6-svscan/SIGPWR: service/system/.s6-svscan/SIGPWR
+$(libdir)/service/system/.s6-svscan/SIGPWR: service/system/.s6-svscan/SIGPWR
service/system/s6-linux-init-shutdownd/run: src/lib/service/system/s6-linux-init-shutdownd/run
-$(DESTDIR)$(libdir)/service/system/s6-linux-init-shutdownd/run: service/system/s6-linux-init-shutdownd/run
+$(libdir)/service/system/s6-linux-init-shutdownd/run: service/system/s6-linux-init-shutdownd/run
service/system/s6-linux-init-shutdownd/notification-fd: src/lib/service/system/s6-linux-init-shutdownd/notification-fd
-$(DESTDIR)$(libdir)/service/system/s6-linux-init-shutdownd/notification-fd: service/system/s6-linux-init-shutdownd/notification-fd
+$(libdir)/service/system/s6-linux-init-shutdownd/notification-fd: service/system/s6-linux-init-shutdownd/notification-fd
diff --git a/package/info b/package/info
index b5bda5a..fcc580d 100644
--- a/package/info
+++ b/package/info
@@ -1,4 +1,4 @@
package=goetia-s6-linux-init
-version=0.0.0.1
+version=0.3.0.0
category=admin
package_macro_name=GOETIA-S6-LINUX-INIT
diff --git a/package/targets.mak b/package/targets.mak
index d70a6ed..440f78a 100644
--- a/package/targets.mak
+++ b/package/targets.mak
@@ -7,12 +7,12 @@ ALL_BINS ::= \
system-shutdown \
INSTALL_BINS ::= \
- $(DESTDIR)$(bindir)/system-init \
- $(DESTDIR)$(bindir)/system-shutdown \
+ $(bindir)/system-init \
+ $(bindir)/system-shutdown \
SLASHCOMMAND_BINS ::= \
- $(DESTDIR)$(sproot)/command/system-init \
- $(DESTDIR)$(sproot)/command/system-shutdown \
+ $(sproot)/command/system-init \
+ $(sproot)/command/system-shutdown \
ALL_LIBS ::= \
s6-linux-init/scripts/rc.init \
@@ -33,20 +33,19 @@ ALL_LIBS ::= \
service/system/s6-linux-init-shutdownd/notification-fd \
INSTALL_LIBS ::= \
- $(DESTDIR)$(libdir)/s6-linux-init/scripts/rc.init \
- $(DESTDIR)$(libdir)/s6-linux-init/scripts/rc.shutdown.final \
- $(DESTDIR)$(libdir)/s6-linux-init/scripts/rc.shutdown \
- $(DESTDIR)$(libdir)/service/system/s6-linux-init-runleveld/run \
- $(DESTDIR)$(libdir)/service/system/s6-linux-init-runleveld/notification-fd \
- $(DESTDIR)$(libdir)/service/system/.s6-svscan/crash \
- $(DESTDIR)$(libdir)/service/system/.s6-svscan/SIGUSR1 \
- $(DESTDIR)$(libdir)/service/system/.s6-svscan/finish \
- $(DESTDIR)$(libdir)/service/system/.s6-svscan/SIGQUIT \
- $(DESTDIR)$(libdir)/service/system/.s6-svscan/SIGINT \
- $(DESTDIR)$(libdir)/service/system/.s6-svscan/SIGUSR2 \
- $(DESTDIR)$(libdir)/service/system/.s6-svscan/SIGWINCH \
- $(DESTDIR)$(libdir)/service/system/.s6-svscan/SIGTERM \
- $(DESTDIR)$(libdir)/service/system/.s6-svscan/SIGPWR \
- $(DESTDIR)$(libdir)/service/system/s6-linux-init-shutdownd/run \
- $(DESTDIR)$(libdir)/service/system/s6-linux-init-shutdownd/notification-fd \
-
+ $(libdir)/s6-linux-init/scripts/rc.init \
+ $(libdir)/s6-linux-init/scripts/rc.shutdown.final \
+ $(libdir)/s6-linux-init/scripts/rc.shutdown \
+ $(libdir)/service/system/s6-linux-init-runleveld/run \
+ $(libdir)/service/system/s6-linux-init-runleveld/notification-fd \
+ $(libdir)/service/system/.s6-svscan/crash \
+ $(libdir)/service/system/.s6-svscan/SIGUSR1 \
+ $(libdir)/service/system/.s6-svscan/finish \
+ $(libdir)/service/system/.s6-svscan/SIGQUIT \
+ $(libdir)/service/system/.s6-svscan/SIGINT \
+ $(libdir)/service/system/.s6-svscan/SIGUSR2 \
+ $(libdir)/service/system/.s6-svscan/SIGWINCH \
+ $(libdir)/service/system/.s6-svscan/SIGTERM \
+ $(libdir)/service/system/.s6-svscan/SIGPWR \
+ $(libdir)/service/system/s6-linux-init-shutdownd/run \
+ $(libdir)/service/system/s6-linux-init-shutdownd/notification-fd \
diff --git a/s6-linux-init/scripts/rc.init b/s6-linux-init/scripts/rc.init
deleted file mode 100644
index b34a2ef..0000000
--- a/s6-linux-init/scripts/rc.init
+++ /dev/null
@@ -1,14 +0,0 @@
-#!@shebangdir@/execlineb -WS1
-
-# ISC license.
-
-if -x0 -n { eltest -d /run//s6-rc }
-foreground { echo "\ninit!\n" }
-if {
- s6-rc-init
- -c /etc/goetia/system/compiled
- -l /run//system/s6-rc
- /run//system/service
-}
-foreground { echo "\nStarting bundle ${1}...\n" }
-s6-rc -b -l /run//system/s6-rc -v2 -t10000 -up change ${1}
diff --git a/s6-linux-init/scripts/rc.shutdown b/s6-linux-init/scripts/rc.shutdown
deleted file mode 100644
index 18da7d6..0000000
--- a/s6-linux-init/scripts/rc.shutdown
+++ /dev/null
@@ -1,5 +0,0 @@
-#!@shebangdir@/execlineb -P
-
-# ISC license.
-
-s6-rc -b -l /run//system/s6-rc -v2 -Da -t10000 change
diff --git a/s6-linux-init/scripts/rc.shutdown.final b/s6-linux-init/scripts/rc.shutdown.final
deleted file mode 100644
index eae8c35..0000000
--- a/s6-linux-init/scripts/rc.shutdown.final
+++ /dev/null
@@ -1 +0,0 @@
-#!@shebangdir@/execlineb -P
diff --git a/tools/gen-deps.sh b/tools/gen-deps.sh
index fafb347..23cd98f 100755
--- a/tools/gen-deps.sh
+++ b/tools/gen-deps.sh
@@ -2,17 +2,17 @@
. package/info
-echo '#'
-echo '# This file has been generated by tools/gen-deps.sh'
-echo '#'
-echo
+printf '#\n'
+printf '# This file has been generated by tools/gen-deps.sh\n'
+printf '#\n'
+printf '\n'
if test -d src/bin
then
cd src/bin
for FILE in $(find * -type f 2> /dev/null); do
- echo "${FILE}: src/bin/${FILE}"
- echo "\$(DESTDIR)\$(bindir)/${FILE}: ${FILE}"
+ printf "${FILE}: src/bin/${FILE}\n"
+ printf "\$(bindir)/${FILE}: ${FILE}\n"
done
cd ../..
fi
@@ -21,8 +21,8 @@ if test -d src/lib
then
cd src/lib
for FILE in $(find * -type f 2> /dev/null); do
- echo "${FILE}: src/lib/${FILE}"
- echo "\$(DESTDIR)\$(libdir)/${FILE}: ${FILE}"
+ printf "${FILE}: src/lib/${FILE}\n"
+ printf "\$(libdir)/${FILE}: ${FILE}\n"
done
cd ../..
fi
@@ -30,6 +30,6 @@ fi
if test -f package/extras
then
for EXTRA in $(cat package/extras); do
- echo "\$(DESTDIR)\$(libdir)/${EXTRA}: ${EXTRA}"
+ printf "\$(libdir)/${EXTRA}: ${EXTRA}\n"
done
fi
diff --git a/tools/gen-targets.sh b/tools/gen-targets.sh
index 3280748..f772754 100755
--- a/tools/gen-targets.sh
+++ b/tools/gen-targets.sh
@@ -2,55 +2,62 @@
. package/info
-echo '#'
-echo '# This file has been generated by tools/gen-targets.sh'
-echo '#'
-echo
+printf '#\n'
+printf '# This file has been generated by tools/gen-targets.sh\n'
+printf '#\n'
+printf '\n'
if test -d src/bin
then
cd src/bin
- echo "ALL_BINS ::= \\"
+ printf "ALL_BINS ::= \\"
+ printf "\n"
for FILE in $(find * -type f 2> /dev/null) ; do
- echo "\t${FILE} \\"
+ printf "\t${FILE} \\"
+ printf "\n"
done
- echo
- echo "INSTALL_BINS ::= \\"
+ printf "\n"
+ printf "INSTALL_BINS ::= \\"
+ printf "\n"
for FILE in $(find * -type f 2> /dev/null) ; do
- echo "\t\$(DESTDIR)\$(bindir)/${FILE} \\"
+ printf "\t\$(bindir)/${FILE} \\"
+ printf "\n"
done
- echo
- echo "SLASHCOMMAND_BINS ::= \\"
+ printf "\n"
+ printf "SLASHCOMMAND_BINS ::= \\"
+ printf "\n"
for FILE in $(find * -type f 2> /dev/null) ; do
- echo "\t\$(DESTDIR)\$(sproot)/command/${FILE} \\"
+ printf "\t\$(sproot)/command/${FILE} \\"
+ printf "\n"
done
cd ../..
- echo
+ printf "\n"
fi
if test -d src/lib
then
cd src/lib
- echo "ALL_LIBS ::= \\"
+ printf "ALL_LIBS ::= \\"
+ printf "\n"
for FILE in $(find * -type f 2> /dev/null) ; do
- echo "\t${FILE} \\"
+ printf "\t${FILE} \\"
+ printf "\n"
done
- echo
+ printf "\n"
- echo "INSTALL_LIBS ::= \\"
+ printf "INSTALL_LIBS ::= \\"
+ printf "\n"
for FILE in $(find * -type f 2> /dev/null) ; do
- echo "\t\$(DESTDIR)\$(libdir)/${FILE} \\"
+ printf "\t\$(libdir)/${FILE} \\"
+ printf "\n"
done
-
- cd ../..
- echo
fi