diff options
-rw-r--r-- | INSTALL | 6 | ||||
-rw-r--r-- | NEWS | 6 | ||||
-rw-r--r-- | doc/index.html | 8 | ||||
-rw-r--r-- | doc/s6-linux-init-maker.html | 32 | ||||
-rw-r--r-- | doc/upgrade.html | 14 | ||||
-rw-r--r-- | package/info | 2 | ||||
-rw-r--r-- | src/init/s6-linux-init-maker.c | 66 | ||||
-rw-r--r-- | src/shutdown/deps-exe/s6-linux-init-shutdownd | 1 | ||||
-rw-r--r-- | src/shutdown/s6-linux-init-shutdownd.c | 1 |
9 files changed, 30 insertions, 106 deletions
@@ -6,11 +6,11 @@ Build Instructions - A Linux-based system with a standard C development environment - GNU make version 3.81 or later - - skalibs version 2.13.0.0 or later: https://skarnet.org/software/skalibs/ + - skalibs version 2.13.1.0 or later: https://skarnet.org/software/skalibs/ - Optional: nsss version 0.2.0.2 or later: https://skarnet.org/software/nsss/ - Optional: utmps version 0.1.2.1 or later: https://skarnet.org/software/utmps/ - - execline version 2.9.1.0 or later: https://skarnet.org/software/execline/ - - s6 version 2.11.2.0 or later: https://skarnet.org/software/s6/ + - execline version 2.9.2.0 or later: https://skarnet.org/software/execline/ + - s6 version 2.11.3.0 or later: https://skarnet.org/software/s6/ This software is Linux-specific. It will run on a Linux kernel, version 2.6.32 or later. However, it should not be too hard to port to @@ -1,5 +1,11 @@ Changelog for s6-linux-init. +In 1.1.0.0 +---------- + + - Early utmpd script removed, for symmetry. + + In 1.0.8.1 ---------- diff --git a/doc/index.html b/doc/index.html index 141bdcb..7d61315 100644 --- a/doc/index.html +++ b/doc/index.html @@ -73,16 +73,16 @@ kernel command line </li> <li> A Linux-based system with a standard C development environment </li> <li> GNU make, version 3.81 or later </li> <li> <a href="//skarnet.org/software/skalibs/">skalibs</a> version -2.13.0.0 or later. It's a build-time requirement. It's also a run-time +2.13.1.0 or later. It's a build-time requirement. It's also a run-time requirement (for <a href="s6-linux-init-maker.html">s6-linux-init-maker</a>) as well as a boot-time requirement (i.e. a run-time requirement for the programs used when you boot a system created with <a href="s6-linux-init-maker.html">s6-linux-init-maker</a>) if you link against the shared version of the skalibs library. </li> <li> <a href="//skarnet.org/software/execline/">execline</a> version -2.9.1.0 or later. It is a build-time and boot-time requirement. </li> +2.9.2.0 or later. It is a build-time and boot-time requirement. </li> <li> <a href="//skarnet.org/software/s6/">s6</a> version -2.11.2.0 or later. It is a build-time and boot-time requirement. </li> +2.11.3.0 or later. It is a build-time and boot-time requirement. </li> </ul> <p> @@ -110,7 +110,7 @@ want nsswitch-like functionality: <ul> <li> The current released version of s6-linux-init is -<a href="s6-linux-init-1.0.8.1.tar.gz">1.0.8.1</a>. </li> +<a href="s6-linux-init-1.1.0.0.tar.gz">1.1.0.0</a>. </li> <li> Alternatively, you can checkout a copy of the <a href="//git.skarnet.org/cgi-bin/cgit.cgi/s6-linux-init/">s6-linux-init git repository</a>: diff --git a/doc/s6-linux-init-maker.html b/doc/s6-linux-init-maker.html index 00a9722..1390781 100644 --- a/doc/s6-linux-init-maker.html +++ b/doc/s6-linux-init-maker.html @@ -61,7 +61,6 @@ machine</em>. If it is not the case, the system will fail to boot. [ -D <em>initdefault</em> ] \ [ -n | -N ] \ [ -f <em>skeldir</em> ] \ - [ -U <em>utmp_user</em> ] \ [ -C ] \ [ -B ] \ [ -S ] \ @@ -320,20 +319,6 @@ build time. This option is typically useful when distributions run <tt>s6-linux-init-maker</tt> in packaging scripts, when preparing files in a staging directory. </li> <br /> - <li> <tt>-U</tt> <em>utmp_user</em> : this option is only -available when the s6-linux-init package has been built with the -<tt>--enable-utmps</tt> configure option, that enables support for the -<a href="//skarnet.org/software/utmps/">utmps</a> package. The option -defines the user that the <tt>utmpd</tt> service -will run as, and activates this service. (Note that you will still -have to create a <tt>wtmpd</tt> service yourself and activate it -later in the boot sequence, after a writable filesystem is mounted, -because the wtmp database is supposed to be persistent and should live -on a real filesystem. -s6-linux-init cannot do that for you, because it only handles the -early part of the boot sequence, before filesystems are mounted.) -Default is <strong>no utmpd service</strong>. </li> <br /> - <li> <tt>-C</tt> : create a set of scripts that is suitable for running <em>in a container</em>. This modifies some behaviours: <ul> @@ -467,23 +452,6 @@ given. </li> </ul> </li> </ul> -<p> - If s6-linux-init has been built with -<a href="//skarnet.org/software/utmps/">utmps</a> support, some more -directories may exist: -</p> - -<ul> - <li> A directory somewhere under <tt>run-image</tt>, by default <tt>utmps</tt>, -that is the location where the utmp files will be created. </li> - <li> An additional early service named <tt>utmpd</tt>, which is -a part of the <a href="//skarnet.org/software/utmps/">utmps</a> way of -providing secure utmp functionality. A similar <tt>wtmpd</tt> service -should also be created and run later in the boot sequence by the -service manager; it is not s6-linux-init's job to do it because -<tt>wtmp</tt> requires a real, writable filesystem. </li> -</ul> - <h2> Notes </h2> <p> diff --git a/doc/upgrade.html b/doc/upgrade.html index 3cb3b56..8dc841e 100644 --- a/doc/upgrade.html +++ b/doc/upgrade.html @@ -18,6 +18,20 @@ <h1> What has changed in s6-linux-init </h1> +<h2> in 1.1.0.0 </h2> + +<ul> + <li> <a href="//skarnet.org/software/skalibs/">skalibs</a> +dependency bumped to 2.13.1.0. </li> + <li> <a href="//skarnet.org/software/execline/">execline</a> +dependency bumped to 2.9.2.0. </li> + <li> <a href="//skarnet.org/software/s6/">s6</a> +dependency bumped to 2.11.3.0. </li> + <li> <a href="s6-linux-init-maker.html">s6-linux-init-maker</a> +does not create early utmpd scripts anymore. Users are expected +to handle utmpd at the same time as wtmpd, i.e. first thing in stage 2. </li> +</ul> + <h2> in 1.0.8.1 </h2> <ul> diff --git a/package/info b/package/info index 5d72cd6..ed1e732 100644 --- a/package/info +++ b/package/info @@ -1,4 +1,4 @@ package=s6-linux-init -version=1.0.8.1 +version=1.1.0.0 category=admin package_macro_name=S6_LINUX_INIT diff --git a/src/init/s6-linux-init-maker.c b/src/init/s6-linux-init-maker.c index 6f01d1e..bc094e3 100644 --- a/src/init/s6-linux-init-maker.c +++ b/src/init/s6-linux-init-maker.c @@ -26,13 +26,7 @@ #include "defaults.h" #include "initctl.h" -#ifdef S6_LINUX_INIT_UTMPD_PATH -# include <utmps/config.h> -# define USAGE "s6-linux-init-maker [ -c basedir ] [ -u log_user ] [ -G early_getty_cmd ] [ -1 ] [ -L ] [ -p initial_path ] [ -m initial_umask ] [ -t timestamp_style ] [ -d slashdev ] [ -s env_store ] [ -e initial_envvar ... ] [ -q default_grace_time ] [ -D initdefault ] [ -n | -N ] [ -f skeldir ] [ -U utmp_user ] [ -C ] [ -B ] dir" -# define OPTION_STRING "c:u:G:1Lp:m:t:d:s:e:E:q:D:nNf:U:CBS" -# define UTMPS_DIR "utmps" -#else -# define USAGE "s6-linux-init-maker [ -c basedir ] [ -u log_user ] [ -G early_getty_cmd ] [ -1 ] [ -L ] [ -p initial_path ] [ -m initial_umask ] [ -t timestamp_style ] [ -d slashdev ] [ -s env_store ] [ -e initial_envvar ... ] [ -q default_grace_time ] [ -D initdefault ] [ -n | -N ] [ -f skeldir ] [ -C ] [ -B ] dir" +#define USAGE "s6-linux-init-maker [ -c basedir ] [ -u log_user ] [ -G early_getty_cmd ] [ -1 ] [ -L ] [ -p initial_path ] [ -m initial_umask ] [ -t timestamp_style ] [ -d slashdev ] [ -s env_store ] [ -e initial_envvar ... ] [ -q default_grace_time ] [ -D initdefault ] [ -n | -N ] [ -f skeldir ] [ -C ] [ -B ] dir" # define OPTION_STRING "c:u:G:1Lp:m:t:d:s:e:E:q:D:nNf:CBS" #endif @@ -61,10 +55,6 @@ static int nologger = 0 ; static uid_t myuid = -1 ; static gid_t mygid = -1 ; -#ifdef S6_LINUX_INIT_UTMPD_PATH -static char const *utmp_user = 0 ; -#endif - typedef int writetobuf_func (buffer *, char const *) ; typedef writetobuf_func *writetobuf_func_ref ; @@ -510,51 +500,6 @@ static void getug (char const *base, char const *s, uid_t *uid, gid_t *gid) } } -#ifdef S6_LINUX_INIT_UTMPD_PATH - -static int utmpd_script (buffer *b, char const *aux) -{ - size_t sabase = satmp.len ; - if (!put_shebang(b) - || buffer_puts(b, - EXECLINE_EXTBINPREFIX "fdmove -c 2 1\n") < 0) return 0 ; - if (utmp_user) - { - if (buffer_puts(b, S6_EXTBINPREFIX "s6-setuidgid ") < 0 - || !string_quote(&satmp, utmp_user, strlen(utmp_user))) return 0 ; - if (buffer_put(b, satmp.s + sabase, satmp.len - sabase) < 0) goto err ; - satmp.len = sabase ; - if (buffer_put(b, "\n", 1) < 0) return 0 ; - } - if (buffer_puts(b, - EXECLINE_EXTBINPREFIX "cd " S6_LINUX_INIT_TMPFS "/" UTMPS_DIR "\n" - EXECLINE_EXTBINPREFIX "fdmove 1 3\n" - S6_EXTBINPREFIX "s6-ipcserver -1 -c 1000 -- " UTMPS_UTMPD_PATH "\n" - UTMPS_EXTBINPREFIX "utmps-utmpd\n") < 0) return 0 ; - (void)aux ; - return 1 ; - - err: - satmp.len = sabase ; - return 0 ; -} - -static inline void make_utmps (char const *base) -{ - auto_dir(base, "run-image/" S6_LINUX_INIT_SCANDIR "/utmpd", 0, 0, 0755) ; - auto_file(base, "run-image/" S6_LINUX_INIT_SCANDIR "/utmpd/notification-fd", "3\n", 2) ; - auto_script(base, "run-image/" S6_LINUX_INIT_SCANDIR "/utmpd/run", &utmpd_script, 0) ; - { - uid_t uid ; - gid_t gid ; - getug(base, utmp_user, &uid, &gid) ; - auto_dir(base, "run-image/" UTMPS_DIR, uid, gid, 0755) ; - auto_dir_internal(base, "run-image/" S6_LINUX_INIT_UTMPD_PATH, uid, gid, 0755, 6) ; - } -} - -#endif - static inline void make_image (char const *base) { auto_dir_internal(base, "run-image/" S6_LINUX_INIT_SCANDIR "/.s6-svscan", 0, 0, 0755, 3) ; @@ -611,10 +556,6 @@ static inline void make_image (char const *base) auto_dir(base, "run-image/" S6_LINUX_INIT_SCANDIR "/" EARLYGETTY_SERVICEDIR, 0, 0, 0755) ; auto_script(base, "run-image/" S6_LINUX_INIT_SCANDIR "/" EARLYGETTY_SERVICEDIR "/run", &line_script, early_getty) ; } - -#ifdef S6_LINUX_INIT_UTMPD_PATH - if (utmp_user) make_utmps(base) ; -#endif } static inline void make_scripts (char const *base) @@ -644,7 +585,7 @@ int main (int argc, char const *const *argv, char const *const *envp) subgetopt l = SUBGETOPT_ZERO ; for (;;) { - int opt = subgetopt_r(argc, argv, OPTION_STRING, &l) ; + int opt = subgetopt_r(argc, argv, "c:u:G:1Lp:m:t:d:s:e:E:q:D:nNf:CBS", &l) ; if (opt == -1) break ; switch (opt) { @@ -664,9 +605,6 @@ int main (int argc, char const *const *argv, char const *const *envp) case 'n' : mounttype = 2 ; break ; case 'N' : mounttype = 0 ; break ; case 'f' : skeldir = l.arg ; break ; -#ifdef S6_LINUX_INIT_UTMPD_PATH - case 'U' : utmp_user = l.arg ; break ; -#endif case 'C' : inns = 1 ; break ; case 'B' : nologger = 1 ; break ; case 'S' : innssync = 1 ; break ; diff --git a/src/shutdown/deps-exe/s6-linux-init-shutdownd b/src/shutdown/deps-exe/s6-linux-init-shutdownd index 30e8bf7..503fe21 100644 --- a/src/shutdown/deps-exe/s6-linux-init-shutdownd +++ b/src/shutdown/deps-exe/s6-linux-init-shutdownd @@ -1,5 +1,4 @@ -ls6 -${LIBUTMPS} -lskarnet ${SYSCLOCK_LIB} ${SOCKET_LIB} diff --git a/src/shutdown/s6-linux-init-shutdownd.c b/src/shutdown/s6-linux-init-shutdownd.c index 9b019e5..be84baf 100644 --- a/src/shutdown/s6-linux-init-shutdownd.c +++ b/src/shutdown/s6-linux-init-shutdownd.c @@ -33,7 +33,6 @@ #include <s6-linux-init/config.h> #include "defaults.h" #include "initctl.h" -#include "hpr.h" #define STAGE4_FILE "stage 4" #define SCANPREFIX SCANDIRFULL "/" |