diff options
-rw-r--r-- | INSTALL | 4 | ||||
-rw-r--r-- | NEWS | 6 | ||||
-rw-r--r-- | doc/index.html | 6 | ||||
-rw-r--r-- | doc/upgrade.html | 7 | ||||
-rw-r--r-- | package/deps.mak | 7 | ||||
-rw-r--r-- | package/info | 2 | ||||
-rw-r--r-- | src/include/s6-rc/s6rc-utils.h | 3 | ||||
-rw-r--r-- | src/libs6rc/deps-lib/s6rc | 1 | ||||
-rw-r--r-- | src/libs6rc/s6rc_livedir_canon.c | 25 | ||||
-rw-r--r-- | src/s6-rc/s6-rc-init.c | 2 | ||||
-rw-r--r-- | src/s6-rc/s6-rc-update.c | 3 |
11 files changed, 55 insertions, 11 deletions
@@ -6,9 +6,9 @@ Build Instructions - A POSIX-compliant C development environment - GNU make version 3.81 or later - - skalibs version 2.14.2.0 or later: https://skarnet.org/software/skalibs/ + - skalibs version 2.14.3.0 or later: https://skarnet.org/software/skalibs/ - execline version 2.9.6.0 or later: https://skarnet.org/software/execline/ - - s6 version 2.13.0.0 or later: https://skarnet.org/software/s6/ + - s6 version 2.13.0.1 or later: https://skarnet.org/software/s6/ This software will run on any operating system that implements POSIX.1-2008, available at: @@ -1,5 +1,11 @@ Changelog for s6-rc. +In 0.5.5.0 +---------- + + - Bugfixes. These include a new API in libs6rc. + + In 0.5.4.3 ---------- diff --git a/doc/index.html b/doc/index.html index fe803e3..687764d 100644 --- a/doc/index.html +++ b/doc/index.html @@ -48,12 +48,12 @@ scripts are also run in a controlled environment. <li> A POSIX-compliant 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.14.2.0 or later. It's a build-time requirement. It's also a run-time +2.14.3.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. </li> <li> <a href="//skarnet.org/software/execline/">execline</a> version 2.9.6.0 or later. It's a build-time <em>and</em> run-time requirement. </li> <li> <a href="//skarnet.org/software/s6/">s6</a> version -2.13.0.0 or later. It's a build-time <em>and</em> run-time requirement. </li> +2.13.0.1 or later. It's a build-time <em>and</em> run-time requirement. </li> </ul> <h3> Licensing </h3> @@ -67,7 +67,7 @@ requirement if you link against the shared version of the skalibs library. </li> <ul> <li> The current released version of s6-rc is -<a href="s6-rc-0.5.4.4.tar.gz">0.5.4.4</a>. </li> +<a href="s6-rc-0.5.5.0.tar.gz">0.5.5.0</a>. </li> <li> Alternatively, you can checkout a copy of the <a href="//git.skarnet.org/cgi-bin/cgit.cgi/s6-rc/">s6-rc git repository</a>: diff --git a/doc/upgrade.html b/doc/upgrade.html index 9d85be0..8ba3b49 100644 --- a/doc/upgrade.html +++ b/doc/upgrade.html @@ -30,10 +30,13 @@ minor and bugfix version changes. <h1> What has changed in s6-rc </h1> -<h2> in 0.5.4.4 </h2> +<h2> in 0.5.5.0 </h2> <ul> - <li> No functional changes. </li> + <li> <a href="//skarnet.org/software/skalibs/">skalibs</a> +dependency bumped to 2.14.3.0. </li> + <li> <a href="//skarnet.org/software/s6/">s6</a> +dependency bumped to 2.13.0.1. </li> </ul> <h2> in 0.5.4.3 </h2> diff --git a/package/deps.mak b/package/deps.mak index ffc9644..e743262 100644 --- a/package/deps.mak +++ b/package/deps.mak @@ -11,6 +11,7 @@ src/libs6rc/s6rc_db_read.o src/libs6rc/s6rc_db_read.lo: src/libs6rc/s6rc_db_read src/libs6rc/s6rc_db_read_sizes.o src/libs6rc/s6rc_db_read_sizes.lo: src/libs6rc/s6rc_db_read_sizes.c src/include/s6-rc/s6rc-db.h src/libs6rc/s6rc_db_read_uint32.o src/libs6rc/s6rc_db_read_uint32.lo: src/libs6rc/s6rc_db_read_uint32.c src/include/s6-rc/s6rc-db.h src/libs6rc/s6rc_graph_closure.o src/libs6rc/s6rc_graph_closure.lo: src/libs6rc/s6rc_graph_closure.c src/include/s6-rc/s6rc-db.h src/include/s6-rc/s6rc-utils.h +src/libs6rc/s6rc_livedir_canon.o src/libs6rc/s6rc_livedir_canon.lo: src/libs6rc/s6rc_livedir_canon.c src/include/s6-rc/s6rc-utils.h src/libs6rc/s6rc_livedir_create.o src/libs6rc/s6rc_livedir_create.lo: src/libs6rc/s6rc_livedir_create.c src/include/s6-rc/s6rc-utils.h src/libs6rc/s6rc_livedir_prefix.o src/libs6rc/s6rc_livedir_prefix.lo: src/libs6rc/s6rc_livedir_prefix.c src/include/s6-rc/s6rc-utils.h src/libs6rc/s6rc_livedir_prefixsize.o src/libs6rc/s6rc_livedir_prefixsize.lo: src/libs6rc/s6rc_livedir_prefixsize.c src/include/s6-rc/s6rc-utils.h @@ -36,12 +37,12 @@ src/s6-rc/s6-rc-update.o src/s6-rc/s6-rc-update.lo: src/s6-rc/s6-rc-update.c src src/s6-rc/s6-rc.o src/s6-rc/s6-rc.lo: src/s6-rc/s6-rc.c src/include/s6-rc/config.h src/include/s6-rc/s6rc.h ifeq ($(strip $(STATIC_LIBS_ARE_PIC)),) -libs6rc.a.xyzzy: src/libs6rc/s6rc_db_check_depcycles.o src/libs6rc/s6rc_db_check_pipelines.o src/libs6rc/s6rc_db_check_revdeps.o src/libs6rc/s6rc_db_read.o src/libs6rc/s6rc_db_read_sizes.o src/libs6rc/s6rc_db_read_uint32.o src/libs6rc/s6rc_graph_closure.o src/libs6rc/s6rc_livedir_create.o src/libs6rc/s6rc_livedir_prefix.o src/libs6rc/s6rc_livedir_prefixsize.o src/libs6rc/s6rc_lock.o src/libs6rc/s6rc_read_uint.o src/libs6rc/s6rc_sanitize_dir.o src/libs6rc/s6rc_servicedir_internal.o src/libs6rc/s6rc_servicedir_block.o src/libs6rc/s6rc_servicedir_unblock.o src/libs6rc/s6rc_servicedir_copy_offline.o src/libs6rc/s6rc_servicedir_copy_online.o src/libs6rc/s6rc_servicedir_manage.o src/libs6rc/s6rc_servicedir_unsupervise.o +libs6rc.a.xyzzy: src/libs6rc/s6rc_db_check_depcycles.o src/libs6rc/s6rc_db_check_pipelines.o src/libs6rc/s6rc_db_check_revdeps.o src/libs6rc/s6rc_db_read.o src/libs6rc/s6rc_db_read_sizes.o src/libs6rc/s6rc_db_read_uint32.o src/libs6rc/s6rc_graph_closure.o src/libs6rc/s6rc_livedir_canon.o src/libs6rc/s6rc_livedir_create.o src/libs6rc/s6rc_livedir_prefix.o src/libs6rc/s6rc_livedir_prefixsize.o src/libs6rc/s6rc_lock.o src/libs6rc/s6rc_read_uint.o src/libs6rc/s6rc_sanitize_dir.o src/libs6rc/s6rc_servicedir_internal.o src/libs6rc/s6rc_servicedir_block.o src/libs6rc/s6rc_servicedir_unblock.o src/libs6rc/s6rc_servicedir_copy_offline.o src/libs6rc/s6rc_servicedir_copy_online.o src/libs6rc/s6rc_servicedir_manage.o src/libs6rc/s6rc_servicedir_unsupervise.o else -libs6rc.a.xyzzy: src/libs6rc/s6rc_db_check_depcycles.lo src/libs6rc/s6rc_db_check_pipelines.lo src/libs6rc/s6rc_db_check_revdeps.lo src/libs6rc/s6rc_db_read.lo src/libs6rc/s6rc_db_read_sizes.lo src/libs6rc/s6rc_db_read_uint32.lo src/libs6rc/s6rc_graph_closure.lo src/libs6rc/s6rc_livedir_create.lo src/libs6rc/s6rc_livedir_prefix.lo src/libs6rc/s6rc_livedir_prefixsize.lo src/libs6rc/s6rc_lock.lo src/libs6rc/s6rc_read_uint.lo src/libs6rc/s6rc_sanitize_dir.lo src/libs6rc/s6rc_servicedir_internal.lo src/libs6rc/s6rc_servicedir_block.lo src/libs6rc/s6rc_servicedir_unblock.lo src/libs6rc/s6rc_servicedir_copy_offline.lo src/libs6rc/s6rc_servicedir_copy_online.lo src/libs6rc/s6rc_servicedir_manage.lo src/libs6rc/s6rc_servicedir_unsupervise.lo +libs6rc.a.xyzzy: src/libs6rc/s6rc_db_check_depcycles.lo src/libs6rc/s6rc_db_check_pipelines.lo src/libs6rc/s6rc_db_check_revdeps.lo src/libs6rc/s6rc_db_read.lo src/libs6rc/s6rc_db_read_sizes.lo src/libs6rc/s6rc_db_read_uint32.lo src/libs6rc/s6rc_graph_closure.lo src/libs6rc/s6rc_livedir_canon.lo src/libs6rc/s6rc_livedir_create.lo src/libs6rc/s6rc_livedir_prefix.lo src/libs6rc/s6rc_livedir_prefixsize.lo src/libs6rc/s6rc_lock.lo src/libs6rc/s6rc_read_uint.lo src/libs6rc/s6rc_sanitize_dir.lo src/libs6rc/s6rc_servicedir_internal.lo src/libs6rc/s6rc_servicedir_block.lo src/libs6rc/s6rc_servicedir_unblock.lo src/libs6rc/s6rc_servicedir_copy_offline.lo src/libs6rc/s6rc_servicedir_copy_online.lo src/libs6rc/s6rc_servicedir_manage.lo src/libs6rc/s6rc_servicedir_unsupervise.lo endif libs6rc.so.xyzzy: EXTRA_LIBS := -ls6 -lskarnet -libs6rc.so.xyzzy: src/libs6rc/s6rc_db_check_depcycles.lo src/libs6rc/s6rc_db_check_pipelines.lo src/libs6rc/s6rc_db_check_revdeps.lo src/libs6rc/s6rc_db_read.lo src/libs6rc/s6rc_db_read_sizes.lo src/libs6rc/s6rc_db_read_uint32.lo src/libs6rc/s6rc_graph_closure.lo src/libs6rc/s6rc_livedir_create.lo src/libs6rc/s6rc_livedir_prefix.lo src/libs6rc/s6rc_livedir_prefixsize.lo src/libs6rc/s6rc_lock.lo src/libs6rc/s6rc_read_uint.lo src/libs6rc/s6rc_sanitize_dir.lo src/libs6rc/s6rc_servicedir_internal.lo src/libs6rc/s6rc_servicedir_block.lo src/libs6rc/s6rc_servicedir_unblock.lo src/libs6rc/s6rc_servicedir_copy_offline.lo src/libs6rc/s6rc_servicedir_copy_online.lo src/libs6rc/s6rc_servicedir_manage.lo src/libs6rc/s6rc_servicedir_unsupervise.lo +libs6rc.so.xyzzy: src/libs6rc/s6rc_db_check_depcycles.lo src/libs6rc/s6rc_db_check_pipelines.lo src/libs6rc/s6rc_db_check_revdeps.lo src/libs6rc/s6rc_db_read.lo src/libs6rc/s6rc_db_read_sizes.lo src/libs6rc/s6rc_db_read_uint32.lo src/libs6rc/s6rc_graph_closure.lo src/libs6rc/s6rc_livedir_canon.lo src/libs6rc/s6rc_livedir_create.lo src/libs6rc/s6rc_livedir_prefix.lo src/libs6rc/s6rc_livedir_prefixsize.lo src/libs6rc/s6rc_lock.lo src/libs6rc/s6rc_read_uint.lo src/libs6rc/s6rc_sanitize_dir.lo src/libs6rc/s6rc_servicedir_internal.lo src/libs6rc/s6rc_servicedir_block.lo src/libs6rc/s6rc_servicedir_unblock.lo src/libs6rc/s6rc_servicedir_copy_offline.lo src/libs6rc/s6rc_servicedir_copy_online.lo src/libs6rc/s6rc_servicedir_manage.lo src/libs6rc/s6rc_servicedir_unsupervise.lo s6-rc: EXTRA_LIBS := -ls6 -lskarnet ${SYSCLOCK_LIB} ${SPAWN_LIB} s6-rc: src/s6-rc/s6-rc.o ${LIBS6RC} s6-rc-bundle: EXTRA_LIBS := -lexecline -lskarnet diff --git a/package/info b/package/info index d743b80..c802ca4 100644 --- a/package/info +++ b/package/info @@ -1,4 +1,4 @@ package=s6-rc -version=0.5.4.4 +version=0.5.5.0 category=admin package_macro_name=S6RC diff --git a/src/include/s6-rc/s6rc-utils.h b/src/include/s6-rc/s6rc-utils.h index 8f67920..841e026 100644 --- a/src/include/s6-rc/s6rc-utils.h +++ b/src/include/s6-rc/s6rc-utils.h @@ -4,7 +4,9 @@ #define S6RC_UTILS_H #include <sys/types.h> + #include <skalibs/stralloc.h> + #include <s6-rc/s6rc-db.h> extern void s6rc_graph_closure (s6rc_db_t const *, unsigned char *, unsigned int, int) ; @@ -15,5 +17,6 @@ extern int s6rc_sanitize_dir (stralloc *, char const *, size_t *) ; extern int s6rc_livedir_prefixsize (char const *, size_t *) ; extern ssize_t s6rc_livedir_prefix (char const *, char *, size_t) ; extern int s6rc_livedir_create (stralloc *, char const *, char const *, char const *, char const *, char const *, unsigned char const *, unsigned int, size_t *) ; +extern int s6rc_livedir_canon (char const **) ; #endif diff --git a/src/libs6rc/deps-lib/s6rc b/src/libs6rc/deps-lib/s6rc index 52c220f..5dbb4de 100644 --- a/src/libs6rc/deps-lib/s6rc +++ b/src/libs6rc/deps-lib/s6rc @@ -5,6 +5,7 @@ s6rc_db_read.o s6rc_db_read_sizes.o s6rc_db_read_uint32.o s6rc_graph_closure.o +s6rc_livedir_canon.o s6rc_livedir_create.o s6rc_livedir_prefix.o s6rc_livedir_prefixsize.o diff --git a/src/libs6rc/s6rc_livedir_canon.c b/src/libs6rc/s6rc_livedir_canon.c new file mode 100644 index 0000000..db5d3a1 --- /dev/null +++ b/src/libs6rc/s6rc_livedir_canon.c @@ -0,0 +1,25 @@ +/* ISC license. */ + +#include <string.h> +#include <errno.h> + +#include <skalibs/alloc.h> + +#include <s6-rc/s6rc-utils.h> + +int s6rc_livedir_canon (char const **live) +{ + size_t llen = strlen(*live) ; + size_t n = llen ; + while (n && (*live)[n - 1] == '/') --n ; + if (!n) return (errno = EINVAL, 0) ; + if (n < llen) + { + char *x = alloc(n + 1) ; + if (!x) return 0 ; + memcpy(x, *live, n) ; + x[n] = 0 ; + *live = x ; + } + return 1 ; +} diff --git a/src/s6-rc/s6-rc-init.c b/src/s6-rc/s6-rc-init.c index e90211f..ea52255 100644 --- a/src/s6-rc/s6-rc-init.c +++ b/src/s6-rc/s6-rc-init.c @@ -73,6 +73,8 @@ int main (int argc, char const *const *argv) tain_now_set_stopwatch_g() ; tain_add_g(&deadline, &deadline) ; + if (!s6rc_livedir_canon(&live)) + strerr_diefu1sys(111, "canonicalize livedir") ; if (deref) { char *x = realpath(compiled, 0) ; diff --git a/src/s6-rc/s6-rc-update.c b/src/s6-rc/s6-rc-update.c index 830214d..fd13f8a 100644 --- a/src/s6-rc/s6-rc-update.c +++ b/src/s6-rc/s6-rc-update.c @@ -594,6 +594,9 @@ int main (int argc, char const *const *argv, char const *const *envp) strerr_dief2x(100, live, " is not an absolute path") ; if (argv[0][0] != '/') strerr_dief2x(100, argv[0], " is not an absolute path") ; + + if (!s6rc_livedir_canon(&live)) + strerr_diefu1sys(111, "canonicalize livedir") ; livelen = strlen(live) ; { |