From f2206da976508c2ad81c3e0949ecd311a5a06709 Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Tue, 22 Aug 2017 10:56:01 +0000 Subject: Optimize to xpathexec ; prepare for 2.3.0.2 --- COPYING | 2 +- INSTALL | 29 +++++++++++++++++------------ NEWS | 6 ++++++ doc/index.html | 12 ++++++------ doc/upgrade.html | 10 ++++++++++ package/info | 2 +- src/conn-tools/s6-tcpclient.c | 3 +-- src/conn-tools/s6-tcpserver-access.c | 6 ++---- src/conn-tools/s6-tcpserver.c | 3 +-- src/conn-tools/s6-tcpserver4-socketbinder.c | 3 +-- src/conn-tools/s6-tcpserver4.c | 3 +-- src/conn-tools/s6-tcpserver6-socketbinder.c | 3 +-- src/conn-tools/s6-tcpserver6.c | 3 +-- src/conn-tools/s6-tlsclient.c | 3 +-- src/conn-tools/s6-tlsserver.c | 3 +-- src/sbearssl/sbearssl_cert_readbigpem.c | 2 +- 16 files changed, 52 insertions(+), 41 deletions(-) diff --git a/COPYING b/COPYING index f496e31..cc344f1 100644 --- a/COPYING +++ b/COPYING @@ -1,4 +1,4 @@ -Copyright (c) 2011-2016 Laurent Bercot +Copyright (c) 2011-2017 Laurent Bercot 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 de597dc..c301344 100644 --- a/INSTALL +++ b/INSTALL @@ -6,13 +6,13 @@ Build Instructions - A POSIX-compliant C development environment - GNU make version 3.81 or later - - skalibs version 2.5.1.0 or later: http://skarnet.org/software/skalibs/ - - execline version 2.3.0.1 or later: http://skarnet.org/software/execline/ - - s6 version 2.5.1.0 or later: http://skarnet.org/software/s6/ - - s6-dns version 2.2.0.0 or later: http://skarnet.org/software/s6-dns/ + - skalibs version 2.6.0.0 or later: http://skarnet.org/software/skalibs/ + - execline version 2.3.0.2 or later: http://skarnet.org/software/execline/ + - s6 version 2.6.1.0 or later: http://skarnet.org/software/s6/ + - s6-dns version 2.2.0.1 or later: http://skarnet.org/software/s6-dns/ - Depending on whether you build the SSL tools, libressl version 2.4.5 or later: http://libressl.org/ - or bearssl version 0.4 or later: http://bearssl.org/ + or bearssl version 0.5 or later: http://bearssl.org/ (BearSSL support is experimental for now, I encourage you to use it but be aware it's bleeding-edge and APIs may change.) @@ -30,6 +30,12 @@ POSIX.1-2008, available at: It will install the binaries in /bin and the static libraries in /usr/lib/s6-networking. + Please note that static libraries in /usr/lib/s6-networking *will not* +be found by a default linker invocation: you need -L/usr/lib/s6-networking. +Other skarnet.org software automatically handles that case if the +default configuration is used, but if you change the configuration, +remember to use the appropriate --with-lib configure option. + 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 off them. @@ -208,10 +214,9 @@ against it, you can override the CRYPTO_LIB make variable. By default, CRYPTO_LIB is "-lbearssl" when building against BearSSL, and "-ltls -lssl -lcrypto" when building against LibreSSL. - As of 2017-05-21, please note that BearSSL is experimental and not -considered production-ready by its author yet. Nevertheless, it's an -incredibly promising library with high-quality interfaces and likely -high-quality implementation. When statically linked against BearSSL, -the s6-tlsc and s6-tlsd binaries are 1/10th the size of what they are -when statically linked against LibreSSL, with a smaller RAM footprint -too. + As of 2017-08-22, please note that BearSSL is considered beta quality +by its author, so use with caution. Nevertheless, it's an incredibly +promising library with high-quality interfaces and implementation. +When statically linked against BearSSL, the s6-tlsc and s6-tlsd binaries +are 1/10th the size of what they are when statically linked against LibreSSL, +with a smaller RAM footprint too. diff --git a/NEWS b/NEWS index 1ae4916..3aa5d7d 100644 --- a/NEWS +++ b/NEWS @@ -1,5 +1,11 @@ Changelog for s6-networking. +In 2.3.0.2 +---------- + + - Bugfix release. + + In 2.3.0.1 ---------- diff --git a/doc/index.html b/doc/index.html index 3f83db3..c6033bc 100644 --- a/doc/index.html +++ b/doc/index.html @@ -44,22 +44,22 @@ compiled with IPv6 support, s6-networking is IPv6-ready.
  • A POSIX-compliant system with a standard C development environment
  • GNU make, version 3.81 or later
  • skalibs version -2.5.1.0 or later. It's a build-time requirement. It's also a run-time +2.6.0.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.
  • execline version -2.3.0.1 or later. It's a build-time and run-time requirement.
  • +2.3.0.2 or later. It's a build-time and run-time requirement.
  • s6 version -2.5.1.0 or later. It's a build-time and run-time requirement.
  • +2.6.1.0 or later. It's a build-time and run-time requirement.
  • s6-dns version -2.2.0.0 or later. It's a build-time requirement. It's also a run-time +2.2.0.1 or later. It's a build-time requirement. It's also a run-time requirement if you link against the shared version of the s6-dns libraries.
  • If you want to build the secure communication tools:
    • Either LibreSSL version 2.4.5 or later
    • -
    • Or BearSSL version 0.4 +
    • Or BearSSL version 0.5 or later. This is experimental.
    The chosen library is a build-time requirement, and also a run-time requirement if you link against its shared version.
  • @@ -76,7 +76,7 @@ run-time requirement if you link against its shared version.
    • The current released version of s6-networking is -2.3.0.1.
    • +2.3.0.2.
    • Alternatively, you can checkout a copy of the s6-networking git repository: diff --git a/doc/upgrade.html b/doc/upgrade.html index 6d1b559..2023470 100644 --- a/doc/upgrade.html +++ b/doc/upgrade.html @@ -18,6 +18,16 @@

      What has changed in s6-networking

      +

      in 2.3.0.2

      + +
        +
      • BearSSL dependency bumped to 0.5.
      • +
      • skalibs dependency bumped to 2.6.0.0.
      • +
      • execline dependency bumped to 2.3.0.2.
      • +
      • s6 dependency bumped to 2.6.1.0.
      • +
      • s6-dns dependency bumped to 2.2.0.1.
      • +
      +

      in 2.3.0.1

        diff --git a/package/info b/package/info index f69475f..14e206b 100644 --- a/package/info +++ b/package/info @@ -1,4 +1,4 @@ package=s6-networking -version=2.3.0.1 +version=2.3.0.2 category=net package_macro_name=S6_NETWORKING diff --git a/src/conn-tools/s6-tcpclient.c b/src/conn-tools/s6-tcpclient.c index 47be4a7..062047c 100644 --- a/src/conn-tools/s6-tcpclient.c +++ b/src/conn-tools/s6-tcpclient.c @@ -374,6 +374,5 @@ int main (int argc, char const *const *argv) if (fd_move(6, s) < 0) strerr_diefu2sys(111, "set up fd ", "6") ; if (fd_copy(7, 6) < 0) strerr_diefu2sys(111, "set up fd ", "7") ; - pathexec(argv+2) ; - strerr_dieexec(111, argv[2]) ; + xpathexec(argv+2) ; } diff --git a/src/conn-tools/s6-tcpserver-access.c b/src/conn-tools/s6-tcpserver-access.c index e16fe08..720da7e 100644 --- a/src/conn-tools/s6-tcpserver-access.c +++ b/src/conn-tools/s6-tcpserver-access.c @@ -379,12 +379,10 @@ int main (int argc, char const *const *argv, char const *const *envp) if (params.exec.len) { char *specialargv[4] = { EXECLINE_EXTBINPREFIX "execlineb", "-c", params.exec.s, 0 } ; - pathexec_r((char const *const *)specialargv, envp, env_len(envp), params.env.s, params.env.len) ; - strerr_dieexec(111, specialargv[0]) ; + xpathexec_r((char const *const *)specialargv, envp, env_len(envp), params.env.s, params.env.len) ; } - pathexec_r(argv, envp, env_len(envp), params.env.s, params.env.len) ; - strerr_dieexec(111, argv[0]) ; + xpathexec_r(argv, envp, env_len(envp), params.env.s, params.env.len) ; reject: if (verbosity >= 2) diff --git a/src/conn-tools/s6-tcpserver.c b/src/conn-tools/s6-tcpserver.c index 3866b75..1143af7 100644 --- a/src/conn-tools/s6-tcpserver.c +++ b/src/conn-tools/s6-tcpserver.c @@ -130,7 +130,6 @@ int main (int argc, char const *const *argv, char const *const *envp) newargv[m++] = "--" ; while (*argv) newargv[m++] = *argv++ ; newargv[m++] = 0 ; - pathexec_run(newargv[0], newargv, envp) ; - strerr_dieexec(111, newargv[0]) ; + xpathexec_run(newargv[0], newargv, envp) ; } } diff --git a/src/conn-tools/s6-tcpserver4-socketbinder.c b/src/conn-tools/s6-tcpserver4-socketbinder.c index cc97486..e32eb4f 100644 --- a/src/conn-tools/s6-tcpserver4-socketbinder.c +++ b/src/conn-tools/s6-tcpserver4-socketbinder.c @@ -48,6 +48,5 @@ int main (int argc, char const *const *argv, char const *const *envp) if (backlog && socket_listen(0, backlog) < 0) strerr_diefu5sys(111, "listen to ", argv[0], ":", argv[1], " ") ; - pathexec_run(argv[2], argv + 2, envp) ; - strerr_dieexec(111, argv[2]) ; + xpathexec_run(argv[2], argv + 2, envp) ; } diff --git a/src/conn-tools/s6-tcpserver4.c b/src/conn-tools/s6-tcpserver4.c index 6860871..f97d307 100644 --- a/src/conn-tools/s6-tcpserver4.c +++ b/src/conn-tools/s6-tcpserver4.c @@ -123,7 +123,6 @@ int main (int argc, char const *const *argv, char const *const *envp) newargv[m++] = "--" ; while (*argv) newargv[m++] = *argv++ ; newargv[m++] = 0 ; - pathexec_run(newargv[0], newargv, envp) ; - strerr_dieexec(111, newargv[0]) ; + xpathexec_run(newargv[0], newargv, envp) ; } } diff --git a/src/conn-tools/s6-tcpserver6-socketbinder.c b/src/conn-tools/s6-tcpserver6-socketbinder.c index 4fc3ab4..143bfe9 100644 --- a/src/conn-tools/s6-tcpserver6-socketbinder.c +++ b/src/conn-tools/s6-tcpserver6-socketbinder.c @@ -48,6 +48,5 @@ int main (int argc, char const *const *argv, char const *const *envp) if (backlog && socket_listen(0, backlog) < 0) strerr_diefu5sys(111, "listen to ", argv[0], ":", argv[1], " ") ; - pathexec_run(argv[2], argv + 2, envp) ; - strerr_dieexec(111, argv[2]) ; + xpathexec_run(argv[2], argv + 2, envp) ; } diff --git a/src/conn-tools/s6-tcpserver6.c b/src/conn-tools/s6-tcpserver6.c index 8648e8e..f96d45b 100644 --- a/src/conn-tools/s6-tcpserver6.c +++ b/src/conn-tools/s6-tcpserver6.c @@ -123,7 +123,6 @@ int main (int argc, char const *const *argv, char const *const *envp) newargv[m++] = "--" ; while (*argv) newargv[m++] = *argv++ ; newargv[m++] = 0 ; - pathexec_run(newargv[0], newargv, envp) ; - strerr_dieexec(111, newargv[0]) ; + xpathexec_run(newargv[0], newargv, envp) ; } } diff --git a/src/conn-tools/s6-tlsclient.c b/src/conn-tools/s6-tlsclient.c index 5bcc7e7..267f457 100644 --- a/src/conn-tools/s6-tlsclient.c +++ b/src/conn-tools/s6-tlsclient.c @@ -197,7 +197,6 @@ int main (int argc, char const *const *argv, char const *const *envp) newargv[m++] = "--" ; while (*argv) newargv[m++] = *argv++ ; newargv[m++] = 0 ; - pathexec_run(newargv[0], newargv, envp) ; - strerr_dieexec(111, newargv[0]) ; + xpathexec_run(newargv[0], newargv, envp) ; } } diff --git a/src/conn-tools/s6-tlsserver.c b/src/conn-tools/s6-tlsserver.c index d6c84f5..fa36226 100644 --- a/src/conn-tools/s6-tlsserver.c +++ b/src/conn-tools/s6-tlsserver.c @@ -242,7 +242,6 @@ int main (int argc, char const *const *argv, char const *const *envp) } while (*argv) newargv[m++] = *argv++ ; newargv[m++] = 0 ; - pathexec_run(newargv[0], newargv, envp) ; - strerr_dieexec(111, newargv[0]) ; + xpathexec_run(newargv[0], newargv, envp) ; } } diff --git a/src/sbearssl/sbearssl_cert_readbigpem.c b/src/sbearssl/sbearssl_cert_readbigpem.c index 9df5ebd..64ce139 100644 --- a/src/sbearssl/sbearssl_cert_readbigpem.c +++ b/src/sbearssl/sbearssl_cert_readbigpem.c @@ -25,8 +25,8 @@ int sbearssl_cert_readbigpem (char const *fn, genalloc *certs, stralloc *sa) int r ; if (fd < 0) return -1 ; r = sbearssl_pem_decode_from_buffer(&b, &pems, sa) ; - if (r) { fd_close(fd) ; return r ; } fd_close(fd) ; + if (r) return r ; p = genalloc_s(sbearssl_pemobject, &pems) ; n = genalloc_len(sbearssl_pemobject, &pems) ; for (; i < n ; i++) -- cgit v1.2.3