Introducing service supervision/management with s6
cover Introducing service supervision/management with s6
Hi!
This series provides all the packages for programs and libraries to build an embedded system with service supervision and management using s6 from
http://skarnet.org.
Note that these packages only provide the mechanism for supervising/managing services using s6, not the policy. Packages to provide a policy suitable for Buildroot-based embedded systems, using s6 as init (instead of SysV or systemd), will be provided later. An example is available in the buildroot-s6 demo project [1].
[1] https://github.com/elebihan/buildroot-s6/
Best regards,
ELB
Eric Le Bihan (9):
skalibs: new package
execline: new package
s6: new package
s6-dns: new package
s6-networking: new package
s6-rc: new package
s6-portable-utils: new package
s6-linux-utils: new package
s6-linux-init: new package
package/Config.in | 9 ++ package/execline/Config.in | 15 +++ package/execline/Config.in.host | 7 ++ package/execline/execline.mk | 67 +++++++++++ package/s6-dns/Config.in | 12 ++ package/s6-dns/s6-dns.mk | 43 +++++++ package/s6-linux-init/Config.in | 15 +++ package/s6-linux-init/s6-linux-init.mk | 40 +++++++ package/s6-linux-utils/Config.in | 12 ++ package/s6-linux-utils/s6-linux-utils.mk | 38 ++++++ package/s6-networking/Config.in | 15 +++ package/s6-networking/s6-networking.mk | 46 ++++++++ package/s6-portable-utils/Config.in | 14 +++ package/s6-portable-utils/s6-portable-utils.mk | 38 ++++++ package/s6-rc/Config.in | 14 +++ package/s6-rc/Config.in.host | 6 + package/s6-rc/s6-rc.mk | 72 ++++++++++++ package/s6/Config.in | 13 +++ package/s6/s6.mk | 70 ++++++++++++ package/skalibs/Config.in | 12 ++ ...ntime-tests-for-type-sizes-nor-endianness.patch | 127 +++++++++++++++++++++ package/skalibs/skalibs.mk | 59 ++++++++++ 22 files changed, 744 insertions(+) create mode 100644 package/execline/Config.in create mode 100644 package/execline/Config.in.host create mode 100644 package/execline/execline.mk create mode 100644 package/s6-dns/Config.in create mode 100644 package/s6-dns/s6-dns.mk create mode 100644 package/s6-linux-init/Config.in create mode 100644 package/s6-linux-init/s6-linux-init.mk create mode 100644 package/s6-linux-utils/Config.in create mode 100644 package/s6-linux-utils/s6-linux-utils.mk create mode 100644 package/s6-networking/Config.in create mode 100644 package/s6-networking/s6-networking.mk create mode 100644 package/s6-portable-utils/Config.in create mode 100644 package/s6-portable-utils/s6-portable-utils.mk create mode 100644 package/s6-rc/Config.in create mode 100644 package/s6-rc/Config.in.host create mode 100644 package/s6-rc/s6-rc.mk create mode 100644 package/s6/Config.in create mode 100644 package/s6/s6.mk create mode 100644 package/skalibs/Config.in create mode 100644 package/skalibs/skalibs-0001-No-runtime-tests-for-type-sizes-nor-endianness.patch create mode 100644 package/skalibs/skalibs.mk
--
2.4.11
PATCH 1/9 skalibs: new package
This new package provides skalibs, a collection of free software / open source C development files used for building all software from skarnet.org.
--- package/Config.in | 1 + package/skalibs/Config.in | 12 ++ ...ntime-tests-for-type-sizes-nor-endianness.patch | 127 +++++++++++++++++++++ package/skalibs/skalibs.mk | 59 ++++++++++ 4 files changed, 199 insertions(+) create mode 100644 package/skalibs/Config.in create mode 100644 package/skalibs/skalibs-0001-No-runtime-tests-for-type-sizes-nor-endianness.patch create mode 100644 package/skalibs/skalibs.mk
package/Config.in +1 -0
@@ -1333,6 +1333,7 @@ endif source "package/protobuf-c/Config.in" source "package/qhull/Config.in" source "package/qlibc/Config.in" + source "package/skalibs/Config.in" source "package/sphinxbase/Config.in" source "package/startup-notification/Config.in" source "package/tinycbor/Config.in"
package/skalibs/Config.in new file +12 -0
@@ -0,0 +1,12 @@ +config BR2_PACKAGE_SKALIBS + bool "skalibs" + depends on BR2_TOOLCHAIN_USES_GLIBC || BR2_TOOLCHAIN_USES_MUSL + help + skalibs is a package centralizing the free software / open source C + development files used for building all software at skarnet.org: + it contains essentially general-purpose libraries. + + http://skarnet.org/software/skalibs/ + +comment "skalibs need an (e)glibc or musl toolchain" + depends on !BR2_TOOLCHAIN_USES_GLIBC && !BR2_TOOLCHAIN_USES_MUSL
package/skalibs/skalibs-0001-No-runtime-tests-for-type-sizes-nor-endianness.patch new file +127 -0
127 lines not on this page · raw message
package/skalibs/skalibs.mk new file +59 -0
59 lines not on this page · raw message
Signature · 1 line
2.4.11
PATCH 2/9 execline: new package
In reply to Eric Le BihanThis package provides execline, a (non-interactive) scripting language, like sh, used in the s6 supervision system.
--- package/Config.in | 1 + package/execline/Config.in | 15 +++++++++ package/execline/Config.in.host | 7 +++++ package/execline/execline.mk | 67 +++++++++++++++++++++++++++++++++++++++++ 4 files changed, 90 insertions(+) create mode 100644 package/execline/Config.in create mode 100644 package/execline/Config.in.host create mode 100644 package/execline/execline.mk
package/Config.in +1 -0
@@ -498,6 +498,7 @@ menu "Erlang libraries/modules" source "package/erlang-p1-zlib/Config.in" endmenu endif + source "package/execline/Config.in" source "package/ficl/Config.in" source "package/gauche/Config.in" source "package/guile/Config.in"
package/execline/Config.in new file +15 -0
@@ -0,0 +1,15 @@ +config BR2_PACKAGE_EXECLINE + bool "execline" + depends on BR2_TOOLCHAIN_USES_GLIBC || BR2_TOOLCHAIN_USES_MUSL + select BR2_PACKAGE_SKALIBS + help + execline is a (non-interactive) scripting language, like sh ; but its + syntax is quite different from a traditional shell syntax. + The execlineb program is meant to be used as an interpreter for a text + file; the other commands are essentially useful inside an execlineb + script. + + http://skarnet.org/software/execline/ + +comment "execline needs an (e)glibc or musl toolchain" + depends on !BR2_TOOLCHAIN_USES_GLIBC && !BR2_TOOLCHAIN_USES_MUSL
package/execline/Config.in.host new file +7 -0
@@ -0,0 +1,7 @@ +config BR2_PACKAGE_HOST_EXECLINE + bool "host execline" + help + Host version of execline, a (non-interactive) scripting language, + like sh. + + http://skarnet.org/software/execline/
package/execline/execline.mk new file +67 -0
67 lines not on this page · raw message
Signature · 1 line
2.4.11
PATCH 3/9 s6: new package
In reply to Eric Le BihanThis new package provides s6, a small suite of programs for UNIX, designed to allow process supervision (a.k.a service supervision), in the line of daemontools and runit.
--- package/Config.in | 1 + package/s6/Config.in | 13 ++++++++++ package/s6/s6.mk | 70 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 84 insertions(+) create mode 100644 package/s6/Config.in create mode 100644 package/s6/s6.mk
package/Config.in +1 -0
@@ -1718,6 +1718,7 @@ menu "System tools" source "package/quota/Config.in" source "package/rsyslog/Config.in" source "package/runc/Config.in" + source "package/s6/Config.in" source "package/scrub/Config.in" source "package/scrypt/Config.in" source "package/smack/Config.in"
package/s6/Config.in new file +13 -0
@@ -0,0 +1,13 @@ +config BR2_PACKAGE_S6 + bool "s6" + depends on BR2_TOOLCHAIN_USES_GLIBC || BR2_TOOLCHAIN_USES_MUSL + select BR2_PACKAGE_EXECLINE + help + s6 is a small suite of programs for UNIX, designed to allow process + supervision (a.k.a service supervision), in the line of daemontools + and runit, as well as various operations on processes and daemons. + + http://skarnet.org/software/s6/ + +comment "s6 needs an (e)glibc or musl toolchain" + depends on !BR2_TOOLCHAIN_USES_GLIBC && !BR2_TOOLCHAIN_USES_MUSL
package/s6/s6.mk new file +70 -0
70 lines not on this page · raw message
Signature · 1 line
2.4.11
PATCH 4/9 s6-dns: new package
In reply to Eric Le BihanThis new package provides s6-dns, a suite of DNS client programs and libraries for Unix systems, as an alternative to the BIND, djbdns or other DNS clients.
--- package/Config.in | 1 + package/s6-dns/Config.in | 12 ++++++++++++ package/s6-dns/s6-dns.mk | 43 +++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 56 insertions(+) create mode 100644 package/s6-dns/Config.in create mode 100644 package/s6-dns/s6-dns.mk
package/Config.in +1 -0
@@ -1566,6 +1566,7 @@ endif source "package/rsync/Config.in" source "package/rtorrent/Config.in" source "package/rtptools/Config.in" + source "package/s6-dns/Config.in" source "package/samba4/Config.in" source "package/sconeserver/Config.in" source "package/ser2net/Config.in"
package/s6-dns/Config.in new file +12 -0
@@ -0,0 +1,12 @@ +config BR2_PACKAGE_S6_DNS + bool "s6-dns" + depends on BR2_TOOLCHAIN_USES_GLIBC || BR2_TOOLCHAIN_USES_MUSL + select BR2_PACKAGE_SKALIBS + help + s6-dns is a suite of DNS client programs and libraries for Unix + systems, as an alternative to the BIND, djbdns or other DNS clients. + + http://skarnet.org/software/s6-dns/ + +comment "s6-dns needs an (e)glibc or musl toolchain" + depends on !BR2_TOOLCHAIN_USES_GLIBC && !BR2_TOOLCHAIN_USES_MUSL
package/s6-dns/s6-dns.mk new file +43 -0
43 lines not on this page · raw message
Signature · 1 line
2.4.11
PATCH 5/9 s6-networking: new package
In reply to Eric Le BihanThis new package provides s6-networking, a suite of small networking utilities for Unix systems.
--- package/Config.in | 1 + package/s6-networking/Config.in | 15 +++++++++++ package/s6-networking/s6-networking.mk | 46 ++++++++++++++++++++++++++++++++++ 3 files changed, 62 insertions(+) create mode 100644 package/s6-networking/Config.in create mode 100644 package/s6-networking/s6-networking.mk
package/Config.in +1 -0
@@ -1567,6 +1567,7 @@ endif source "package/rtorrent/Config.in" source "package/rtptools/Config.in" source "package/s6-dns/Config.in" + source "package/s6-networking/Config.in" source "package/samba4/Config.in" source "package/sconeserver/Config.in" source "package/ser2net/Config.in"
package/s6-networking/Config.in new file +15 -0
@@ -0,0 +1,15 @@ +config BR2_PACKAGE_S6_NETWORKING + bool "s6-networking" + depends on BR2_TOOLCHAIN_USES_GLIBC || BR2_TOOLCHAIN_USES_MUSL + select BR2_PACKAGE_S6_DNS + select BR2_PACKAGE_S6 + help + s6-networking is a suite of small networking utilities for Unix + systems. It includes command-line client and server management, TCP + access control, privilege escalation across UNIX domain sockets, + IDENT protocol management and clock synchronization. + + http://skarnet.org/software/s6-networking/ + +comment "s6-networking needs an (e)glibc or musl toolchain" + depends on !BR2_TOOLCHAIN_USES_GLIBC && !BR2_TOOLCHAIN_USES_MUSL
package/s6-networking/s6-networking.mk new file +46 -0
46 lines not on this page · raw message
Signature · 1 line
2.4.11
PATCH 6/9 s6-rc: new package
In reply to Eric Le BihanThis new package provides s6-rc, a service manager for s6-based systems, i.e. a suite of programs that can start and stop services, both long-running daemons and one-time initialization scripts, in the proper order according to a dependency tree.
--- package/Config.in | 1 + package/s6-rc/Config.in | 14 +++++++++ package/s6-rc/Config.in.host | 6 ++++ package/s6-rc/s6-rc.mk | 72 ++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 93 insertions(+) create mode 100644 package/s6-rc/Config.in create mode 100644 package/s6-rc/Config.in.host create mode 100644 package/s6-rc/s6-rc.mk
package/Config.in +1 -0
@@ -1721,6 +1721,7 @@ menu "System tools" source "package/rsyslog/Config.in" source "package/runc/Config.in" source "package/s6/Config.in" + source "package/s6-rc/Config.in" source "package/scrub/Config.in" source "package/scrypt/Config.in" source "package/smack/Config.in"
package/s6-rc/Config.in new file +14 -0
@@ -0,0 +1,14 @@ +config BR2_PACKAGE_S6_RC + bool "s6-rc" + depends on BR2_TOOLCHAIN_USES_GLIBC || BR2_TOOLCHAIN_USES_MUSL + select BR2_PACKAGE_S6 + help + s6-rc is a service manager for s6-based systems, i.e. a suite of + programs that can start and stop services, both long-running daemons + and one-time initialization scripts, in the proper order according to + a dependency tree. + + http://skarnet.org/software/s6-rc/ + +comment "s6-rc needs an (e)glibc or musl toolchain" + depends on !BR2_TOOLCHAIN_USES_GLIBC && !BR2_TOOLCHAIN_USES_MUSL
package/s6-rc/Config.in.host new file +6 -0
@@ -0,0 +1,6 @@ +config BR2_PACKAGE_HOST_S6_RC + bool "host s6-rc tools" + help + Host tools from s6-rc for managing the service database. + + http://skarnet.org/software/s6-rc/
package/s6-rc/s6-rc.mk new file +72 -0
72 lines not on this page · raw message
Signature · 1 line
2.4.11
PATCH 7/9 s6-portable-utils: new package
In reply to Eric Le BihanThis new package provides s6-portable-utils, a set of tiny general Unix utilities, often performing well-known tasks such as cut and grep, but optimized for simplicity and small size.
--- package/Config.in | 1 + package/s6-portable-utils/Config.in | 14 ++++++++++ package/s6-portable-utils/s6-portable-utils.mk | 38 ++++++++++++++++++++++++++ 3 files changed, 53 insertions(+) create mode 100644 package/s6-portable-utils/Config.in create mode 100644 package/s6-portable-utils/s6-portable-utils.mk
package/Config.in +1 -0
@@ -1721,6 +1721,7 @@ menu "System tools" source "package/rsyslog/Config.in" source "package/runc/Config.in" source "package/s6/Config.in" + source "package/s6-portable-utils/Config.in" source "package/s6-rc/Config.in" source "package/scrub/Config.in" source "package/scrypt/Config.in"
package/s6-portable-utils/Config.in new file +14 -0
@@ -0,0 +1,14 @@ +config BR2_PACKAGE_S6_PORTABLE_UTILS + bool "s6-portable-utils" + depends on BR2_TOOLCHAIN_USES_GLIBC || BR2_TOOLCHAIN_USES_MUSL + select BR2_PACKAGE_SKALIBS + help + s6-portable-utils is a set of tiny general Unix utilities, often + performing well-known tasks such as cut and grep, but optimized for + simplicity and small size. They were designed for embedded systems + and other constrained environments, but they work everywhere. + + http://skarnet.org/software/s6-portable-utils/ + +comment "s6-portable-utils needs an (e)glibc or musl toolchain" + depends on !BR2_TOOLCHAIN_USES_GLIBC && !BR2_TOOLCHAIN_USES_MUSL
package/s6-portable-utils/s6-portable-utils.mk new file +38 -0
@@ -0,0 +1,38 @@ +################################################################################ +# +# s6-portable-utils +# +################################################################################ + +S6_PORTABLE_UTILS_VERSION = v2.0.6.0 +S6_PORTABLE_UTILS_SITE = git://git.skarnet.org/s6-portable-utils.git +S6_PORTABLE_UTILS_LICENSE = ISC +S6_PORTABLE_UTILS_LICENSE_FILES = COPYING +S6_PORTABLE_UTILS_DEPENDENCIES = skalibs + +S6_PORTABLE_UTILS_CONFIGURE_OPTS = \ + --prefix=/usr \ + --with-sysdeps=$(STAGING_DIR)/usr/lib/skalibs/sysdeps \ + --with-include=$(STAGING_DIR)/usr/include \ + --with-dynlib=$(STAGING_DIR)/usr/lib \ + --with-lib=$(STAGING_DIR)/usr/lib/skalibs + +ifeq ($(BR2_STATIC_LIBS),y) +S6_PORTABLE_UTILS_CONFIGURE_OPTS += --enable-static --disable-shared +else +S6_PORTABLE_UTILS_CONFIGURE_OPTS += --disable-static --enable-shared --disable-allstatic +endif + +define S6_PORTABLE_UTILS_CONFIGURE_CMDS + (cd $(@D); $(TARGET_CONFIGURE_OPTS) ./configure $(S6_PORTABLE_UTILS_CONFIGURE_OPTS)) +endef + +define S6_PORTABLE_UTILS_BUILD_CMDS + $(TARGET_MAKE_ENV) $(MAKE1) -C $(@D) +endef + +define S6_PORTABLE_UTILS_INSTALL_TARGET_CMDS + $(TARGET_MAKE_ENV) $(MAKE1) -C $(@D) DESTDIR=$(TARGET_DIR) install +endef + +$(eval $(generic-package))
Signature · 1 line
2.4.11
PATCH 8/9 s6-linux-utils: new package
In reply to Eric Le BihanThis new package provides s6-linux-utils, a set of minimalistic Linux-specific system utilities.
--- package/Config.in | 1 + package/s6-linux-utils/Config.in | 12 ++++++++++ package/s6-linux-utils/s6-linux-utils.mk | 38 ++++++++++++++++++++++++++++++++ 3 files changed, 51 insertions(+) create mode 100644 package/s6-linux-utils/Config.in create mode 100644 package/s6-linux-utils/s6-linux-utils.mk
package/Config.in +1 -0
@@ -1721,6 +1721,7 @@ menu "System tools" source "package/rsyslog/Config.in" source "package/runc/Config.in" source "package/s6/Config.in" + source "package/s6-linux-utils/Config.in" source "package/s6-portable-utils/Config.in" source "package/s6-rc/Config.in" source "package/scrub/Config.in"
package/s6-linux-utils/Config.in new file +12 -0
@@ -0,0 +1,12 @@ +config BR2_PACKAGE_S6_LINUX_UTILS + bool "s6-linux-utils" + depends on BR2_TOOLCHAIN_USES_GLIBC || BR2_TOOLCHAIN_USES_MUSL + select BR2_PACKAGE_SKALIBS + help + s6-linux-utils is a set of minimalistic Linux-specific system + utilities. + + http://skarnet.org/software/s6-linux-utils/ + +comment "s6-linux-utils needs an (e)glibc or musl toolchain" + depends on !BR2_TOOLCHAIN_USES_GLIBC && !BR2_TOOLCHAIN_USES_MUSL
package/s6-linux-utils/s6-linux-utils.mk new file +38 -0
@@ -0,0 +1,38 @@ +################################################################################ +# +# s6-linux-utils +# +################################################################################ + +S6_LINUX_UTILS_VERSION = v2.1.0.0 +S6_LINUX_UTILS_SITE = git://git.skarnet.org/s6-linux-utils.git +S6_LINUX_UTILS_LICENSE = ISC +S6_LINUX_UTILS_LICENSE_FILES = COPYING +S6_LINUX_UTILS_DEPENDENCIES = skalibs + +S6_LINUX_UTILS_CONFIGURE_OPTS = \ + --prefix=/usr \ + --with-sysdeps=$(STAGING_DIR)/usr/lib/skalibs/sysdeps \ + --with-include=$(STAGING_DIR)/usr/include \ + --with-dynlib=$(STAGING_DIR)/usr/lib \ + --with-lib=$(STAGING_DIR)/usr/lib/skalibs + +ifeq ($(BR2_STATIC_LIBS),y) +S6_LINUX_UTILS_CONFIGURE_OPTS += --enable-static --disable-shared +else +S6_LINUX_UTILS_CONFIGURE_OPTS += --disable-static --enable-shared --disable-allstatic +endif + +define S6_LINUX_UTILS_CONFIGURE_CMDS + (cd $(@D); $(TARGET_CONFIGURE_OPTS) ./configure $(S6_LINUX_UTILS_CONFIGURE_OPTS)) +endef + +define S6_LINUX_UTILS_BUILD_CMDS + $(TARGET_MAKE_ENV) $(MAKE1) -C $(@D) +endef + +define S6_LINUX_UTILS_INSTALL_TARGET_CMDS + $(TARGET_MAKE_ENV) $(MAKE1) -C $(@D) DESTDIR=$(TARGET_DIR) install +endef + +$(eval $(generic-package))
Signature · 1 line
2.4.11
PATCH 9/9 s6-linux-init: new package
In reply to Eric Le BihanThis new package provides s6-linux-init, a set of minimalistic tools to create a s6-based init system, including a /sbin/init program, on a machine running a Linux kernel.
--- package/Config.in | 1 + package/s6-linux-init/Config.in | 15 +++++++++++++ package/s6-linux-init/s6-linux-init.mk | 40 ++++++++++++++++++++++++++++++++++ 3 files changed, 56 insertions(+) create mode 100644 package/s6-linux-init/Config.in create mode 100644 package/s6-linux-init/s6-linux-init.mk
package/Config.in +1 -0
@@ -1721,6 +1721,7 @@ menu "System tools" source "package/rsyslog/Config.in" source "package/runc/Config.in" source "package/s6/Config.in" + source "package/s6-linux-init/Config.in" source "package/s6-linux-utils/Config.in" source "package/s6-portable-utils/Config.in" source "package/s6-rc/Config.in"
package/s6-linux-init/Config.in new file +15 -0
@@ -0,0 +1,15 @@ +config BR2_PACKAGE_S6_LINUX_INIT + bool "s6-linux-init" + depends on BR2_TOOLCHAIN_USES_GLIBC || BR2_TOOLCHAIN_USES_MUSL + select BR2_PACKAGE_S6 + select BR2_PACKAGE_S6_LINUX_UTILS + select BR2_PACKAGE_S6_PORTABLE_UTILS + help + s6-linux-init is a set of minimalistic tools to create a s6-based + init system, including a /sbin/init program, on a machine running + a Linux kernel. + + http://skarnet.org/software/s6-linux-init/ + +comment "s6-linux-init needs an (e)glibc or musl toolchain" + depends on !BR2_TOOLCHAIN_USES_GLIBC && !BR2_TOOLCHAIN_USES_MUSL
package/s6-linux-init/s6-linux-init.mk new file +40 -0
@@ -0,0 +1,40 @@ +################################################################################ +# +# s6-linux-init +# +################################################################################ + +S6_LINUX_INIT_VERSION = v0.1.0.0 +S6_LINUX_INIT_SITE = git://git.skarnet.org/s6-linux-init.git +S6_LINUX_INIT_LICENSE = ISC +S6_LINUX_INIT_LICENSE_FILES = COPYING +S6_LINUX_INIT_DEPENDENCIES = s6 s6-linux-utils s6-portable-utils + +S6_LINUX_INIT_CONFIGURE_OPTS = \ + --prefix=/usr \ + --with-sysdeps=$(STAGING_DIR)/usr/lib/skalibs/sysdeps \ + --with-include=$(STAGING_DIR)/usr/include \ + --with-dynlib=$(STAGING_DIR)/usr/lib \ + --with-lib=$(STAGING_DIR)/usr/lib/execline \ + --with-lib=$(STAGING_DIR)/usr/lib/s6 \ + --with-lib=$(STAGING_DIR)/usr/lib/skalibs + +ifeq ($(BR2_STATIC_LIBS),y) +S6_LINUX_INIT_CONFIGURE_OPTS += --enable-static --disable-shared +else +S6_LINUX_INIT_CONFIGURE_OPTS += --disable-static --enable-shared --disable-allstatic +endif + +define S6_LINUX_INIT_CONFIGURE_CMDS + (cd $(@D); $(TARGET_CONFIGURE_OPTS) ./configure $(S6_LINUX_INIT_CONFIGURE_OPTS)) +endef + +define S6_LINUX_INIT_BUILD_CMDS + $(TARGET_MAKE_ENV) $(MAKE1) -C $(@D) +endef + +define S6_LINUX_INIT_INSTALL_TARGET_CMDS + $(TARGET_MAKE_ENV) $(MAKE1) -C $(@D) DESTDIR=$(TARGET_DIR) install +endef + +$(eval $(generic-package))
Signature · 1 line
2.4.11
cover Introducing service supervision/management with s6
In reply to Eric Le BihanHi Eric,
Eric Le Bihan wrote,
Quoted 11 lines
Hi!
This series provides all the packages for programs and libraries to build an embedded system with service supervision and management using s6 from
http://skarnet.org.Note that these packages only provide the mechanism for supervising/managing services using s6, not the policy. Packages to provide a policy suitable for Buildroot-based embedded systems, using s6 as init (instead of SysV or systemd), will be provided later. An example is available in the buildroot-s6 demo project [1].
Is there a reason s6 series depends on glibc or musl?
I once played with s6, but was scared about pre-configring for all architectures. Do you think your patch to skalibs has any chance to be upstreamed?
best regards
Waldemar
PATCH 1/9 skalibs: new package
In reply to Eric Le BihanHello,
package/skalibs/Config.in line 3
Quoted 9 lines · Eric Le Bihan
package/skalibs/Config.in new file +3
-0@@ -0,0 +1,12 @@ +config BR2_PACKAGE_SKALIBS + bool "skalibs" + depends on BR2_TOOLCHAIN_USES_GLIBC || BR2_TOOLCHAIN_USES_MUSL
Can you add a quick comment that explains why uClibc cannot build this package?
package/skalibs/Config.in line 11
Quoted 1 line
package/skalibs/Config.in new file +1
-0+comment "skalibs need an (e)glibc or musl toolchain"
Use just "glibc" instead of "(e)glibc", we have removed eglibc support.
Quoted 20 lines
package/skalibs/Config.in new file +20
-0+ trytypesize() { + echo "Checking size of $3..." +- $CC_AUTO $CPPFLAGS_AUTO $CFLAGS_AUTO $LDFLAGS_AUTO -o trysizeof$1 src/sysdeps/trysizeof$1.c +- type_size=$(./trysizeof$1) || fail "$0: unable to determine size of $3" ++ r=false ++ type_size=0 ++ while true; do ++ cat<<EOF>trysizeof$1.c ++#include <sys/types.h> ++ ++int main(void) ++{ ++ static int v = 1 / !!((sizeof($3) == $type_size)); ++ return 0; ++} ++EOF ++ if $CC_AUTO $CPPFLAGS_AUTO $CFLAGS_AUTO $LDFLAGS_AUTO -o trysizeof$1 trysizeof$1.c 2>/dev/null; then ++ r=true ++ break ++ fi
package/skalibs/Config.in
Quoted 10 lines
package/skalibs/Config.in new file +10
-0++ type_size=$(expr $type_size + 1) ++ test $type_size -le 16 || break ++ done ++ test $r = true || fail "$0: unable to determine size of $3" + type_bits=$(expr 8 \* $type_size) +- rm -f trysizeof$1 ++ rm -f trysizeof$1 trysizeof$1.c + echo "sizeof$1: $type_size" >> $sysdeps/sysdeps + echo "#define ${package_macro_name}_SIZEOF$2 $type_size" >> $sysdeps/sysdeps.h + echo "#define ${package_macro_name}_$2_BITS $type_bits" >> $sysdeps/sysdeps.h
Instead of doing this loop to find the size of the different types, what about using the following compiler pre-built defines (like you're doing for little endian vs. big endian detection below) :
$ sparc-linux-gcc -dM -E - </dev/null | grep SIZEOF #define __SIZEOF_INT__ 4 #define __SIZEOF_POINTER__ 4 #define __SIZEOF_LONG__ 4 #define __SIZEOF_LONG_DOUBLE__ 16 #define __SIZEOF_SIZE_T__ 4 #define __SIZEOF_WINT_T__ 4 #define __SIZEOF_PTRDIFF_T__ 4 #define __SIZEOF_FLOAT__ 4 #define __SIZEOF_SHORT__ 2 #define __SIZEOF_WCHAR_T__ 4 #define __SIZEOF_DOUBLE__ 8 #define __SIZEOF_LONG_LONG__ 8
Quoted 7 lines
++#if
defined(__BYTE_ORDER)&& (__BYTE_ORDER==__BIG_ENDIAN) || \
++defined(__BYTE_ORDER__)&& (__BYTE_ORDER__==__ORDER_BIG_ENDIAN__) || \
++defined(__BIG_ENDIAN)|| \
++defined(__ARMEB__)|| \
++defined(__THUMBEB__)|| \
++defined(__AARCH64EB__)|| \
++defined(_MIPSEB)||defined(__MIPSEB)||defined(__MIPSEB__)
Is there a reason why __BYTE_ORDER == __BIG_ENDIAN is not sufficient? It's not available for all compilers/compiler versions?
package/skalibs/Config.in
Quoted 2 lines
package/skalibs/Config.in new file +2
-0+SKALIBS_VERSION = v2.3.10.0 +SKALIBS_SITE = git://git.skarnet.org/skalibs.git
Please use the tarball at
http://skarnet.org/software/skalibs/skalibs-2.3.10.0.tar.gz instead and add a hash file.
package/skalibs/Config.in
Quoted 5 lines
package/skalibs/Config.in new file +5
-0+ifeq ($(BR2_STATIC_LIBS),y) +SKALIBS_CONFIGURE_OPTS += --enable-static --disable-shared +else +SKALIBS_CONFIGURE_OPTS += --disable-static --enable-shared --disable-allstatic +endif
You forget the BR2_SHARED_STATIC_LIBS case, where we want both the shared and static libraries.
package/skalibs/Config.in
Quoted 5 lines
package/skalibs/Config.in new file +5
-0+HOST_SKALIBS_CONFIGURE_OPTS = \ + --prefix=/usr \ + --disable-static \ + --enable-shared \ + --disable-allstatic
You're adding of host variants of the packages, but I haven't yet understood why.
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com
PATCH 2/9 execline: new package
In reply to Eric Le BihanHello,
Quoted 8 lines · Eric Le Bihan
This package provides execline, a (non-interactive) scripting language, like sh, used in the s6 supervision system.
Signed-off-by Eric Le Bihan <[email protected]>--- package/Config.in | 1 + package/execline/Config.in | 15 +++++++++ package/execline/Config.in.host | 7 +++++
Why do we need an option visible in menuconfig to enable this as a host package? Why do we need the host package at all?
Quoted 10 lines
package/execline/Config.in new file +4
-0@@ -0,0 +1,15 @@ +config BR2_PACKAGE_EXECLINE + bool "execline" + depends on BR2_TOOLCHAIN_USES_GLIBC || BR2_TOOLCHAIN_USES_MUSL + select BR2_PACKAGE_SKALIBS
package/execline/Config.in line 14
Quoted 10 lines
package/execline/Config.in new file +10
-0+ help + execline is a (non-interactive) scripting language, like sh ; but its + syntax is quite different from a traditional shell syntax. + The execlineb program is meant to be used as an interpreter for a text + file; the other commands are essentially useful inside an execlineb + script. + + http://skarnet.org/software/execline/ + +comment "execline needs an (e)glibc or musl toolchain"
(e)glibc -> glibc
package/execline/Config.in
Quoted 2 lines
package/execline/Config.in new file +2
-0+EXECLINE_VERSION = v2.1.5.0 +EXECLINE_SITE = git://git.skarnet.org/execline.git
Please use the tarball.
Quoted 7 lines
package/execline/Config.in new file +7
-0+EXECLINE_LICENSE = ISC +EXECLINE_LICENSE_FILES = COPYING +EXECLINE_INSTALL_STAGING = YES +EXECLINE_DEPENDENCIES = skalibs + +EXECLINE_CONFIGURE_OPTS = \ + --prefix=/usr \
package/execline/Config.in
Quoted 10 lines
package/execline/Config.in new file +10
-0+ --with-sysdeps=$(STAGING_DIR)/usr/lib/skalibs/sysdeps \ + --with-include=$(STAGING_DIR)/usr/include \ + --with-dynlib=$(STAGING_DIR)/usr/lib \ + --with-lib=$(STAGING_DIR)/usr/lib/skalibs + +ifeq ($(BR2_STATIC_LIBS),y) +EXECLINE_CONFIGURE_OPTS += --enable-static --disable-shared +else +EXECLINE_CONFIGURE_OPTS += --disable-static --enable-shared --disable-allstatic +endif
Handle the shared+static case.
package/execline/Config.in
Quoted 11 lines
package/execline/Config.in new file +11
-0+ +define EXECLINE_CONFIGURE_CMDS + (cd $(@D); $(TARGET_CONFIGURE_OPTS) ./configure $(EXECLINE_CONFIGURE_OPTS)) +endef + +define EXECLINE_BUILD_CMDS + $(TARGET_MAKE_ENV) $(MAKE1) -C $(@D) +endef + +define EXECLINE_INSTALL_TARGET_CMDS + $(TARGET_MAKE_ENV) $(MAKE1) -C $(@D) DESTDIR=$(TARGET_DIR) install
You're using MAKE1 to build the target variant, but MAKE to build the host variant. Is this expected?
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com
cover Introducing service supervision/management with s6
In reply to Waldemar BrodkorbHi!
Le Tue, 9 Aug 2016 06:14:44 +0200,
Waldemar Brodkorb <[email protected]> a ?crit :
Quoted 4 lines
Quoted 4 lines
This series provides all the packages for programs and libraries to build an embedded system with service supervision and management using s6 from http://skarnet.org.
Quoted 8 lines
Quoted 6 lines
Note that these packages only provide the mechanism for supervising/managing services using s6, not the policy. Packages to provide a policy suitable for Buildroot-based embedded systems, using s6 as init (instead of SysV or systemd), will be provided later. An example is available in the buildroot-s6 demo project [1].
Is there a reason s6 series depends on glibc or musl?
The problem with uclibc-ng is twofold:
1. a compilation issue.
2. a runtime lock-up.
I've finally found time to tackle these issues ;-).
When configuring skalibs, a runtime test is created to check if posix_spawnp() is present. For whichever reason, when using uclib-ng. this function is provided by librt. So by default the test fails and instead of using posix_spawnp(), the function child_spawn0() from skalibs falls back to a fork/execve homegrown version. This fallback function is buggy but this has been fixed [0], but this is not available in skalibs 2.3.10.0.
Anyway, the ./configure script from skalibs can be patched to check for posix_spawnp() in librt. But then, for each package skarnet program/library, this extra library should be passed to the build process (e.g. execline):
``` ifeq ($(BR2_TOOLCHAIN_USES_UCLIBC),y) EXECLINE_MAKE_OPTS = EXTRA_LIBS="-lrt" endif ```
Unfortunately, posix_spawnp() is buggy, which results in the if command from execline going into an infinite loop. This due to a incorrect pointer update in __spawni(). I sent a patch upstream to fix this [2].
So the limitation can now be removed, provided I add one patch for skalibs and one for uclibc-ng. I'll check with the skalibs maintainer to see if there is a cleaner way to handle the uclibc-ng librt issue, because I'd prefer to avoid using the EXTRA_LIBS variable trick in all the skarnet packages.
Or I can also backport [1] as a temporary workaround.
Quoted 3 lines
I once played with s6, but was scared about pre-configring for all architectures. Do you think your patch to skalibs has any chance to be upstreamed?
The patch for detecting the endianness was previously discussed [3]. As Thomas P. suggested some improvements for type size checks, I'll bump the topic once this part has been reworked.
[1]
http://git.skarnet.org/cgi-bin/cgit.cgi/skalibs/commit/?id=2dc76616b2b0884f0203cf36b58f94c5656c0c81
[2]
http://mailman.uclibc-ng.org/pipermail/devel/2016-August/001126.html
[3]
http://www.mail-archive.com/supervision at list.skarnet.org/msg01034.html
Best regards,
Signature · 1 line
ELB
PATCH 1/9 skalibs: new package
In reply to Thomas PetazzoniHi!
Le Tue, 9 Aug 2016 10:06:22 +0200,
Thomas Petazzoni <[email protected]> a ?crit :
Quoted 16 lines · Eric Le Bihan
Quoted 11 lines
package/skalibs/Config.in new file +3
-0@@ -0,0 +1,12 @@ +config BR2_PACKAGE_SKALIBS + bool "skalibs" + depends on BR2_TOOLCHAIN_USES_GLIBC ||
BR2_TOOLCHAIN_USES_MUSLCan you add a quick comment that explains why uClibc cannot build this package?
Quoted 4 lines
Quoted 1 line
+comment "skalibs need an (e)glibc or musl toolchain"
Use just "glibc" instead of "(e)glibc", we have removed eglibc support.
As explained in my reply to Waldemar B. [1], I've found a fix, so this limitation will be removed.
Quoted 37 lines
Quoted 29 lines
+
trytypesize(){
+ echo "Checking size of $3..."
+- $CC_AUTO $CPPFLAGS_AUTO $CFLAGS_AUTO $LDFLAGS_AUTO -o trysizeof$1src/sysdeps/trysizeof$1.c+- type_size=$(./trysizeof$1) || fail "$0: unable to determine size of $3" ++ r=false ++ type_size=0
++ while true; do
++ cat<<EOF>trysizeof$1.c
++#include <sys/types.h>
++
++int main(void)
++{
++ static int v = 1 / !!((sizeof($3) == $type_size)); ++ return 0;
++}
++EOF
++ if $CC_AUTO $CPPFLAGS_AUTO $CFLAGS_AUTO $LDFLAGS_AUTO -o
trysizeof$1 trysizeof$1.c 2>/dev/null; then ++ r=true
++ break++ fi ++ type_size=$(expr $type_size + 1) ++ test $type_size -le 16 || break++ done
++ test $r = true || fail "$0: unable to determine size of $3"package/skalibs/Config.in new file +5
-0+ type_bits=$(expr 8 \* $type_size) +- rm -f trysizeof$1 ++ rm -f trysizeof$1 trysizeof$1.c + echo "sizeof$1: $type_size" >> $sysdeps/sysdeps + echo "#define ${package_macro_name}_SIZEOF$2 $type_size" >>Quoted 3 lines
$sysdeps/sysdeps.h
+ echo "#define ${package_macro_name}_$2_BITS $type_bits" >>$sysdeps/sysdeps.hInstead of doing this loop to find the size of the different types, what about using the following compiler pre-built defines (like you're doing for little endian vs. big endian detection below) :
Quoted 13 lines
$ sparc-linux-gcc -dM -E - </dev/null | grep SIZEOF #define __SIZEOF_INT__ 4 #define __SIZEOF_POINTER__ 4 #define __SIZEOF_LONG__ 4 #define __SIZEOF_LONG_DOUBLE__ 16 #define __SIZEOF_SIZE_T__ 4 #define __SIZEOF_WINT_T__ 4 #define __SIZEOF_PTRDIFF_T__ 4 #define __SIZEOF_FLOAT__ 4 #define __SIZEOF_SHORT__ 2 #define __SIZEOF_WCHAR_T__ 4 #define __SIZEOF_DOUBLE__ 8 #define __SIZEOF_LONG_LONG__ 8
I did not know about this. Thanks for the suggestion. I'll rework the patch.
Quoted 11 lines
Quoted 10 lines
++#if
defined(__BYTE_ORDER)&& (__BYTE_ORDER==__BIG_ENDIAN)|| \ ++ defined(__BYTE_ORDER__) && (__BYTE_ORDER__ == __ORDER_BIG_ENDIAN__) || \ ++ defined(__BIG_ENDIAN) || \ ++ defined(__ARMEB__) || \ ++ defined(__THUMBEB__) || \ ++ defined(__AARCH64EB__) || \ ++ defined(_MIPSEB) || defined(__MIPSEB) || defined(__MIPSEB__)
Quoted 2 lines
Is there a reason why
__BYTE_ORDER==__BIG_ENDIANis not sufficient? It's not available for all compilers/compiler versions?
This check was written using information from [2], which lists all the pre-defined endian macros. Maybe now GCC and Clang have a broader support for __BIG_ENDIAN. I'll check.
Quoted 6 lines
package/skalibs/Config.in
Quoted 2 lines
package/skalibs/Config.in new file +2
-0+SKALIBS_VERSION = v2.3.10.0 +SKALIBS_SITE = git://git.skarnet.org/skalibs.gitPlease use the tarball at
http://skarnet.org/software/skalibs/skalibs-2.3.10.0.tar.gz instead and add a hash file.
Will do!
Quoted 8 lines
package/skalibs/Config.in
Quoted 5 lines
package/skalibs/Config.in new file +4
-1+ifeq ($(BR2_STATIC_LIBS),y) +SKALIBS_CONFIGURE_OPTS += --enable-static --disable-shared +else +SKALIBS_CONFIGURE_OPTS += --disable-static --enable-shared --disable-allstatic +endifYou forget the
BR2_SHARED_STATIC_LIBScase, where we want both the shared and static libraries.
OK. I'll handle this new case.
Quoted 8 lines
package/skalibs/Config.in
Quoted 5 lines
package/skalibs/Config.in new file +5
-0+HOST_SKALIBS_CONFIGURE_OPTS = \ + --prefix=/usr \ + --disable-static \ + --enable-shared \ + --disable-allstaticYou're adding of host variants of the packages, but I haven't yet understood why.
s6-rc is the service management program. The definitions of the services and their dependencies are written in plain text files, then compiled as a binary database. As it is not sensible to compile this on the device, I provide a host variant of the compiler (s6-rc-compile) to build the binary database during TARGET_FINALIZE_HOOKS. The host variant of s6-rc requires the host variant of skalibs, execline and s6.
[1] http://lists.busybox.net/pipermail/buildroot/2016-August/169523.html
[2] https://sourceforge.net/p/predef/wiki/Endianness/
Thanks for the review!
Best regards,
Signature · 1 line
ELB
PATCH 2/9 execline: new package
In reply to Thomas PetazzoniHi!
Le Tue, 9 Aug 2016 10:09:12 +0200,
Thomas Petazzoni <[email protected]> a ?crit :
Quoted 12 lines · Eric Le Bihan
Quoted 8 lines
This package provides execline, a (non-interactive) scripting language, like sh, used in the s6 supervision system.
Signed-off-by Eric Le Bihan <[email protected]>--- package/Config.in | 1 + package/execline/Config.in | 15 +++++++++ package/execline/Config.in.host | 7 +++++Why do we need an option visible in menuconfig to enable this as a host package? Why do we need the host package at all?
I made the host variant of execline visible in menuconfig so the end user knows it can be used to write post-build script (same goes for the host variant of s6-rc). Anyway, if this is supefluous, I will remove it.
Quoted 6 lines
Quoted 6 lines
(quoted diff) +2
-0+define EXECLINE_CONFIGURE_CMDS + (cd $(@D); $(TARGET_CONFIGURE_OPTS) ./configure$(EXECLINE_CONFIGURE_OPTS)) +endef
package/execline/execline.mk new file +3
-0+ +define EXECLINE_BUILD_CMDS + $(TARGET_MAKE_ENV) $(MAKE1) -C $(@D)
Quoted 8 lines
Quoted 5 lines
package/execline/execline.mk new file +4
-0+endef + +define EXECLINE_INSTALL_TARGET_CMDS + $(TARGET_MAKE_ENV) $(MAKE1) -C $(@D) DESTDIR=$(TARGET_DIR)install
You're using MAKE1 to build the target variant, but MAKE to build the host variant. Is this expected?
This looks like a copy paste/error...
Best regards,
Signature · 1 line
ELB
PATCH 1/9 skalibs: new package
In reply to Eric Le BihanHello,
Quoted 5 lines · Eric Le Bihan
Quoted 2 lines
Use just "glibc" instead of "(e)glibc", we have removed eglibc support.
As explained in my reply to Waldemar B. [1], I've found a fix, so this limitation will be removed.
Great!
Quoted 18 lines
Quoted 4 lines
Instead of doing this loop to find the size of the different types, what about using the following compiler pre-built defines (like you're doing for little endian vs. big endian detection below) :
Quoted 13 lines
$ sparc-linux-gcc -dM -E - </dev/null | grep SIZEOF #define __SIZEOF_INT__ 4 #define __SIZEOF_POINTER__ 4 #define __SIZEOF_LONG__ 4 #define __SIZEOF_LONG_DOUBLE__ 16 #define __SIZEOF_SIZE_T__ 4 #define __SIZEOF_WINT_T__ 4 #define __SIZEOF_PTRDIFF_T__ 4 #define __SIZEOF_FLOAT__ 4 #define __SIZEOF_SHORT__ 2 #define __SIZEOF_WCHAR_T__ 4 #define __SIZEOF_DOUBLE__ 8 #define __SIZEOF_LONG_LONG__ 8
Quoted 2 lines
I did not know about this. Thanks for the suggestion. I'll rework the patch.
Note that I have no idea if this is supported by all gcc versions, or by other compilers.
Quoted 6 lines
s6-rc is the service management program. The definitions of the services and their dependencies are written in plain text files, then compiled as a binary database. As it is not sensible to compile this on the device, I provide a host variant of the compiler (s6-rc-compile) to build the binary database during
TARGET_FINALIZE_HOOKS. The host variant of s6-rc requires the host variant of skalibs, execline and s6.
Thanks for the information. It would be useful to have this information part of the commit log.
However, your explanation also means that there is no need to have any of those host packages in menuconfig.
Thanks for your feedback!
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com
PATCH 2/9 execline: new package
In reply to Eric Le BihanHello,
Quoted 7 lines · Eric Le Bihan
Quoted 2 lines
Why do we need an option visible in menuconfig to enable this as a host package? Why do we need the host package at all?
I made the host variant of execline visible in menuconfig so the end user knows it can be used to write post-build script (same goes for the host variant of s6-rc). Anyway, if this is supefluous, I will remove it.
I'm not sure it's very likely to have users using the execline scripting language. Maybe we should wait and see if some people need that?
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com
PATCH 1/9 skalibs: new package
In reply to a message not in the archiveQuoted 6 lines · Eric Le Bihan
Hi!
Le Tue, 9 Aug 2016 10:06:22 +0200,
Thomas Petazzoni <[email protected]> a ?crit :Quoted 1 line · Eric Le Bihan
[...]
Quoted 51 lines
Quoted 37 lines
Quoted 29 lines
+
trytypesize(){
+ echo "Checking size of $3..."
+- $CC_AUTO $CPPFLAGS_AUTO $CFLAGS_AUTO $LDFLAGS_AUTO -o trysizeof$1src/sysdeps/trysizeof$1.c+- type_size=$(./trysizeof$1) || fail "$0: unable to determine size of $3" ++ r=false ++ type_size=0
++ while true; do
++ cat<<EOF>trysizeof$1.c
++#include <sys/types.h>
++
++int main(void)
++{
++ static int v = 1 / !!((sizeof($3) == $type_size)); ++ return 0;
++}
++EOF
++ if $CC_AUTO $CPPFLAGS_AUTO $CFLAGS_AUTO $LDFLAGS_AUTO -o
trysizeof$1 trysizeof$1.c 2>/dev/null; then ++ r=true
++ break++ fi ++ type_size=$(expr $type_size + 1) ++ test $type_size -le 16 || break++ done
++ test $r = true || fail "$0: unable to determine size of $3"package/skalibs/skalibs-0001-No-runtime-tests-for-type-sizes-nor-endianness.patch new file +5
-0+ type_bits=$(expr 8 \* $type_size) +- rm -f trysizeof$1 ++ rm -f trysizeof$1 trysizeof$1.c + echo "sizeof$1: $type_size" >> $sysdeps/sysdeps + echo "#define ${package_macro_name}_SIZEOF$2 $type_size" >>Quoted 3 lines
$sysdeps/sysdeps.h
+ echo "#define ${package_macro_name}_$2_BITS $type_bits" >>$sysdeps/sysdeps.hInstead of doing this loop to find the size of the different types, what about using the following compiler pre-built defines (like you're doing for little endian vs. big endian detection below) :
Quoted 13 lines
$ sparc-linux-gcc -dM -E - </dev/null | grep SIZEOF #define __SIZEOF_INT__ 4 #define __SIZEOF_POINTER__ 4 #define __SIZEOF_LONG__ 4 #define __SIZEOF_LONG_DOUBLE__ 16 #define __SIZEOF_SIZE_T__ 4 #define __SIZEOF_WINT_T__ 4 #define __SIZEOF_PTRDIFF_T__ 4 #define __SIZEOF_FLOAT__ 4 #define __SIZEOF_SHORT__ 2 #define __SIZEOF_WCHAR_T__ 4 #define __SIZEOF_DOUBLE__ 8 #define __SIZEOF_LONG_LONG__ 8
Quoted 2 lines
I did not know about this. Thanks for the suggestion. I'll rework the patch.
I've done some tests: the preprocessor solution is OK for C types like 'unsigned short' and co, but it does not work for some system types like gid_t and time_t. So I'll keep the loop based solution in my upcoming respin of this series.
Best regards,
--
ELB