* [Buildroot] [PATCH 0/9] Introducing service supervision/management with s6
@ 2016-08-08 21:02 Eric Le Bihan
2016-08-08 21:02 ` [Buildroot] [PATCH 1/9] skalibs: new package Eric Le Bihan
` (9 more replies)
0 siblings, 10 replies; 19+ messages in thread
From: Eric Le Bihan @ 2016-08-08 21:02 UTC (permalink / raw)
To: buildroot
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
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Buildroot] [PATCH 1/9] skalibs: new package
2016-08-08 21:02 [Buildroot] [PATCH 0/9] Introducing service supervision/management with s6 Eric Le Bihan
@ 2016-08-08 21:02 ` Eric Le Bihan
2016-08-09 8:06 ` Thomas Petazzoni
2016-08-08 21:02 ` [Buildroot] [PATCH 2/9] execline: " Eric Le Bihan
` (8 subsequent siblings)
9 siblings, 1 reply; 19+ messages in thread
From: Eric Le Bihan @ 2016-08-08 21:02 UTC (permalink / raw)
To: buildroot
This new package provides skalibs, a collection of free software / open
source C development files used for building all software from
skarnet.org.
Signed-off-by: Eric Le Bihan <eric.le.bihan.dev@free.fr>
---
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
diff --git a/package/Config.in b/package/Config.in
index 645fa29..ecda732 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -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"
diff --git a/package/skalibs/Config.in b/package/skalibs/Config.in
new file mode 100644
index 0000000..db35681
--- /dev/null
+++ b/package/skalibs/Config.in
@@ -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
diff --git a/package/skalibs/skalibs-0001-No-runtime-tests-for-type-sizes-nor-endianness.patch b/package/skalibs/skalibs-0001-No-runtime-tests-for-type-sizes-nor-endianness.patch
new file mode 100644
index 0000000..7680840
--- /dev/null
+++ b/package/skalibs/skalibs-0001-No-runtime-tests-for-type-sizes-nor-endianness.patch
@@ -0,0 +1,127 @@
+From bb3505b564b4aba061c9f3167dbcc1460c690501 Mon Sep 17 00:00:00 2001
+From: Eric Le Bihan <eric.le.bihan.dev@free.fr>
+Date: Mon, 14 Sep 2015 12:43:27 +0200
+Subject: [PATCH] No runtime tests for type sizes nor endianness
+
+Replace build and execution of runtime test programs for determining
+some type sizes and the endianness of the target with compile time test
+programs.
+
+This improves support for cross-compilation.
+
+Signed-off-by: Eric Le Bihan <eric.le.bihan.dev@free.fr>
+---
+ configure | 38 ++++++++++++++++++++++++++++++++------
+ src/sysdeps/trybigendian.c | 16 ++++++++++++++++
+ src/sysdeps/trylittleendian.c | 16 ++++++++++++++++
+ 3 files changed, 64 insertions(+), 6 deletions(-)
+ create mode 100644 src/sysdeps/trybigendian.c
+ create mode 100644 src/sysdeps/trylittleendian.c
+
+diff --git a/configure b/configure
+index 910fb7b..4503178 100755
+--- a/configure
++++ b/configure
+@@ -155,10 +155,28 @@ choose () {
+
+ 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
++ 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
+@@ -432,12 +450,20 @@ EOF
+ fi
+
+ echo "Checking system endianness..."
+- $CC_AUTO $CPPFLAGS_AUTO $CFLAGS_AUTO -o tryendianness src/sysdeps/tryendianness.c
+- endianness=$(./tryendianness) || fail "$0: unable to determine endianness"
++ if $CC_AUTO $CPPFLAGS_AUTO $CFLAGS_AUTO -o trybigendian src/sysdeps/trybigendian.c 2>/dev/null; then
++ endianness=big
++ else
++ if $CC_AUTO $CPPFLAGS_AUTO $CFLAGS_AUTO -o trylittleendian src/sysdeps/trylittleendian.c 2>/dev/null; then
++ endianness=little
++ else
++ fail "$0: unable to determine endianness"
++ fi
++ fi
++
+ echo "endianness: $endianness" >> $sysdeps/sysdeps
+ echo "#define ${package_macro_name}_ENDIANNESS \"$endianness\"" >> $sysdeps/sysdeps.h
+ echo " ... $endianness"
+- rm -f tryendianness
++ rm -f trybigendian trylittleendian
+
+ trytypesize ushort USHORT "unsigned short"
+ trytypesize uint UINT "unsigned int"
+diff --git a/src/sysdeps/trybigendian.c b/src/sysdeps/trybigendian.c
+new file mode 100644
+index 0000000..d857572
+--- /dev/null
++++ b/src/sysdeps/trybigendian.c
+@@ -0,0 +1,16 @@
++#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__)
++#define YEAH
++#else
++#error "not big endian"
++#endif
++
++int main(void)
++{
++ return 0;
++}
+diff --git a/src/sysdeps/trylittleendian.c b/src/sysdeps/trylittleendian.c
+new file mode 100644
+index 0000000..eba065a
+--- /dev/null
++++ b/src/sysdeps/trylittleendian.c
+@@ -0,0 +1,16 @@
++#if defined(__BYTE_ORDER) && (__BYTE_ORDER == __LITTLE_ENDIAN) || \
++ defined(__BYTE_ORDER__) && (__BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__) || \
++ defined(__LITTLE_ENDIAN) || \
++ defined(__ARMEL__) || \
++ defined(__THUMBEL__) || \
++ defined(__AARCH64EL__) || \
++ defined(_MIPSEL) || defined(__MIPSEL) || defined(__MIPSEL__)
++#define YEAH
++#else
++#error "not little endian"
++#endif
++
++int main(void)
++{
++ return 0;
++}
+--
+2.5.1
+
diff --git a/package/skalibs/skalibs.mk b/package/skalibs/skalibs.mk
new file mode 100644
index 0000000..8567458
--- /dev/null
+++ b/package/skalibs/skalibs.mk
@@ -0,0 +1,59 @@
+################################################################################
+#
+# skalibs
+#
+################################################################################
+
+SKALIBS_VERSION = v2.3.10.0
+SKALIBS_SITE = git://git.skarnet.org/skalibs.git
+SKALIBS_LICENSE = ISC
+SKALIBS_LICENSE_FILES = COPYING
+SKALIBS_INSTALL_STAGING = YES
+
+SKALIBS_CONFIGURE_OPTS = \
+ --prefix=/usr \
+ --enable-force-devr \
+ --with-default-path=/sbin:/usr/sbin:/bin:/usr/bin
+
+ifeq ($(BR2_STATIC_LIBS),y)
+SKALIBS_CONFIGURE_OPTS += --enable-static --disable-shared
+else
+SKALIBS_CONFIGURE_OPTS += --disable-static --enable-shared --disable-allstatic
+endif
+
+define SKALIBS_CONFIGURE_CMDS
+ (cd $(@D); $(TARGET_CONFIGURE_OPTS) ./configure $(SKALIBS_CONFIGURE_OPTS))
+endef
+
+define SKALIBS_BUILD_CMDS
+ $(TARGET_MAKE_ENV) $(MAKE) -C $(@D)
+endef
+
+define SKALIBS_INSTALL_TARGET_CMDS
+ $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) DESTDIR=$(TARGET_DIR) install
+endef
+
+define SKALIBS_INSTALL_STAGING_CMDS
+ $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) DESTDIR=$(STAGING_DIR) install
+endef
+
+HOST_SKALIBS_CONFIGURE_OPTS = \
+ --prefix=/usr \
+ --disable-static \
+ --enable-shared \
+ --disable-allstatic
+
+define HOST_SKALIBS_CONFIGURE_CMDS
+ (cd $(@D); $(HOST_CONFIGURE_OPTS) ./configure $(HOST_SKALIBS_CONFIGURE_OPTS))
+endef
+
+define HOST_SKALIBS_BUILD_CMDS
+ $(HOST_MAKE_ENV) $(MAKE) -C $(@D) DESTDIR=$(HOST_DIR)
+endef
+
+define HOST_SKALIBS_INSTALL_CMDS
+ $(HOST_MAKE_ENV) $(MAKE) -C $(@D) DESTDIR=$(HOST_DIR) install
+endef
+
+$(eval $(generic-package))
+$(eval $(host-generic-package))
--
2.4.11
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [Buildroot] [PATCH 2/9] execline: new package
2016-08-08 21:02 [Buildroot] [PATCH 0/9] Introducing service supervision/management with s6 Eric Le Bihan
2016-08-08 21:02 ` [Buildroot] [PATCH 1/9] skalibs: new package Eric Le Bihan
@ 2016-08-08 21:02 ` Eric Le Bihan
2016-08-09 8:09 ` Thomas Petazzoni
2016-08-08 21:02 ` [Buildroot] [PATCH 3/9] s6: " Eric Le Bihan
` (7 subsequent siblings)
9 siblings, 1 reply; 19+ messages in thread
From: Eric Le Bihan @ 2016-08-08 21:02 UTC (permalink / raw)
To: buildroot
This package provides execline, a (non-interactive) scripting language,
like sh, used in the s6 supervision system.
Signed-off-by: Eric Le Bihan <eric.le.bihan.dev@free.fr>
---
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
diff --git a/package/Config.in b/package/Config.in
index ecda732..d35ee3f 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -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"
diff --git a/package/execline/Config.in b/package/execline/Config.in
new file mode 100644
index 0000000..a9e0a88
--- /dev/null
+++ b/package/execline/Config.in
@@ -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
diff --git a/package/execline/Config.in.host b/package/execline/Config.in.host
new file mode 100644
index 0000000..4e188e1
--- /dev/null
+++ b/package/execline/Config.in.host
@@ -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/
diff --git a/package/execline/execline.mk b/package/execline/execline.mk
new file mode 100644
index 0000000..592195e
--- /dev/null
+++ b/package/execline/execline.mk
@@ -0,0 +1,67 @@
+################################################################################
+#
+# execline
+#
+################################################################################
+
+EXECLINE_VERSION = v2.1.5.0
+EXECLINE_SITE = git://git.skarnet.org/execline.git
+EXECLINE_LICENSE = ISC
+EXECLINE_LICENSE_FILES = COPYING
+EXECLINE_INSTALL_STAGING = YES
+EXECLINE_DEPENDENCIES = skalibs
+
+EXECLINE_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)
+EXECLINE_CONFIGURE_OPTS += --enable-static --disable-shared
+else
+EXECLINE_CONFIGURE_OPTS += --disable-static --enable-shared --disable-allstatic
+endif
+
+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
+endef
+
+define EXECLINE_INSTALL_STAGING_CMDS
+ $(TARGET_MAKE_ENV) $(MAKE1) -C $(@D) DESTDIR=$(STAGING_DIR) install
+endef
+
+HOST_EXECLINE_DEPENDENCIES = host-skalibs
+
+HOST_EXECLINE_CONFIGURE_OPTS = \
+ --prefix=/usr \
+ --with-sysdeps=$(HOST_DIR)/usr/lib/skalibs/sysdeps \
+ --with-include=$(HOST_DIR)/usr/include \
+ --with-dynlib=$(HOST_DIR)/usr/lib \
+ --disable-static \
+ --enable-shared \
+ --disable-allstatic
+
+define HOST_EXECLINE_CONFIGURE_CMDS
+ (cd $(@D); $(HOST_CONFIGURE_OPTS) ./configure $(HOST_EXECLINE_CONFIGURE_OPTS))
+endef
+
+define HOST_EXECLINE_BUILD_CMDS
+ $(HOST_MAKE_ENV) $(MAKE) -C $(@D) DESTDIR=$(HOST_DIR)
+endef
+
+define HOST_EXECLINE_INSTALL_CMDS
+ $(HOST_MAKE_ENV) $(MAKE) -C $(@D) DESTDIR=$(HOST_DIR) install
+endef
+
+$(eval $(generic-package))
+$(eval $(host-generic-package))
--
2.4.11
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [Buildroot] [PATCH 3/9] s6: new package
2016-08-08 21:02 [Buildroot] [PATCH 0/9] Introducing service supervision/management with s6 Eric Le Bihan
2016-08-08 21:02 ` [Buildroot] [PATCH 1/9] skalibs: new package Eric Le Bihan
2016-08-08 21:02 ` [Buildroot] [PATCH 2/9] execline: " Eric Le Bihan
@ 2016-08-08 21:02 ` Eric Le Bihan
2016-08-08 21:02 ` [Buildroot] [PATCH 4/9] s6-dns: " Eric Le Bihan
` (6 subsequent siblings)
9 siblings, 0 replies; 19+ messages in thread
From: Eric Le Bihan @ 2016-08-08 21:02 UTC (permalink / raw)
To: buildroot
This 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.
Signed-off-by: Eric Le Bihan <eric.le.bihan.dev@free.fr>
---
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
diff --git a/package/Config.in b/package/Config.in
index d35ee3f..4fa2380 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -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"
diff --git a/package/s6/Config.in b/package/s6/Config.in
new file mode 100644
index 0000000..6434175
--- /dev/null
+++ b/package/s6/Config.in
@@ -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
diff --git a/package/s6/s6.mk b/package/s6/s6.mk
new file mode 100644
index 0000000..428561d
--- /dev/null
+++ b/package/s6/s6.mk
@@ -0,0 +1,70 @@
+################################################################################
+#
+# s6
+#
+################################################################################
+
+S6_VERSION = v2.3.0.0
+S6_SITE = git://git.skarnet.org/s6.git
+S6_LICENSE = ISC
+S6_LICENSE_FILES = COPYING
+S6_INSTALL_STAGING = YES
+S6_DEPENDENCIES = execline
+
+S6_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/skalibs
+
+ifeq ($(BR2_STATIC_LIBS),y)
+S6_CONFIGURE_OPTS += --enable-static --disable-shared
+else
+S6_CONFIGURE_OPTS += --disable-static --enable-shared --disable-allstatic
+endif
+
+define S6_CONFIGURE_CMDS
+ (cd $(@D); $(TARGET_CONFIGURE_OPTS) ./configure $(S6_CONFIGURE_OPTS))
+endef
+
+define S6_BUILD_CMDS
+ $(TARGET_MAKE_ENV) $(MAKE1) -C $(@D)
+endef
+
+define S6_INSTALL_TARGET_CMDS
+ $(TARGET_MAKE_ENV) $(MAKE1) -C $(@D) DESTDIR=$(TARGET_DIR) install
+endef
+
+define S6_INSTALL_STAGING_CMDS
+ $(TARGET_MAKE_ENV) $(MAKE1) -C $(@D) DESTDIR=$(STAGING_DIR) install
+endef
+
+HOST_S6_DEPENDENCIES = host-execline
+
+HOST_S6_CONFIGURE_OPTS = \
+ --prefix=/usr \
+ --with-sysdeps=$(HOST_DIR)/usr/lib/skalibs/sysdeps \
+ --with-include=$(HOST_DIR)/usr/include \
+ --with-dynlib=$(HOST_DIR)/usr/lib \
+ --disable-static \
+ --enable-shared \
+ --disable-allstatic
+
+define HOST_S6_CONFIGURE_CMDS
+ (cd $(@D); $(HOST_CONFIGURE_OPTS) ./configure $(HOST_S6_CONFIGURE_OPTS))
+endef
+
+define HOST_S6_BUILD_CMDS
+ $(HOST_MAKE_ENV) $(MAKE) -C $(@D) DESTDIR=$(HOST_DIR)
+endef
+
+define HOST_S6_INSTALL_CMDS
+ $(HOST_MAKE_ENV) $(MAKE) -C $(@D) DESTDIR=$(HOST_DIR) \
+ install-dynlib \
+ install-include
+endef
+
+$(eval $(generic-package))
+$(eval $(host-generic-package))
--
2.4.11
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [Buildroot] [PATCH 4/9] s6-dns: new package
2016-08-08 21:02 [Buildroot] [PATCH 0/9] Introducing service supervision/management with s6 Eric Le Bihan
` (2 preceding siblings ...)
2016-08-08 21:02 ` [Buildroot] [PATCH 3/9] s6: " Eric Le Bihan
@ 2016-08-08 21:02 ` Eric Le Bihan
2016-08-08 21:02 ` [Buildroot] [PATCH 5/9] s6-networking: " Eric Le Bihan
` (5 subsequent siblings)
9 siblings, 0 replies; 19+ messages in thread
From: Eric Le Bihan @ 2016-08-08 21:02 UTC (permalink / raw)
To: buildroot
This 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.
Signed-off-by: Eric Le Bihan <eric.le.bihan.dev@free.fr>
---
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
diff --git a/package/Config.in b/package/Config.in
index 4fa2380..6ce4c31 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -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"
diff --git a/package/s6-dns/Config.in b/package/s6-dns/Config.in
new file mode 100644
index 0000000..45db9fd
--- /dev/null
+++ b/package/s6-dns/Config.in
@@ -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
diff --git a/package/s6-dns/s6-dns.mk b/package/s6-dns/s6-dns.mk
new file mode 100644
index 0000000..c0bc961
--- /dev/null
+++ b/package/s6-dns/s6-dns.mk
@@ -0,0 +1,43 @@
+################################################################################
+#
+# s6-dns
+#
+################################################################################
+
+S6_DNS_VERSION = v2.0.1.0
+S6_DNS_SITE = git://git.skarnet.org/s6-dns.git
+S6_DNS_LICENSE = ISC
+S6_DNS_LICENSE_FILES = COPYING
+S6_DNS_INSTALL_STAGING = YES
+S6_DNS_DEPENDENCIES = skalibs
+
+S6_DNS_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_DNS_CONFIGURE_OPTS += --enable-static --disable-shared
+else
+S6_DNS_CONFIGURE_OPTS += --disable-static --enable-shared --disable-allstatic
+endif
+
+define S6_DNS_CONFIGURE_CMDS
+ (cd $(@D); $(TARGET_CONFIGURE_OPTS) ./configure $(S6_DNS_CONFIGURE_OPTS))
+endef
+
+define S6_DNS_BUILD_CMDS
+ $(TARGET_MAKE_ENV) $(MAKE1) -C $(@D)
+endef
+
+define S6_DNS_INSTALL_TARGET_CMDS
+ $(TARGET_MAKE_ENV) $(MAKE1) -C $(@D) DESTDIR=$(TARGET_DIR) install
+endef
+
+define S6_DNS_INSTALL_STAGING_CMDS
+ $(TARGET_MAKE_ENV) $(MAKE1) -C $(@D) DESTDIR=$(STAGING_DIR) install
+endef
+
+$(eval $(generic-package))
--
2.4.11
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [Buildroot] [PATCH 5/9] s6-networking: new package
2016-08-08 21:02 [Buildroot] [PATCH 0/9] Introducing service supervision/management with s6 Eric Le Bihan
` (3 preceding siblings ...)
2016-08-08 21:02 ` [Buildroot] [PATCH 4/9] s6-dns: " Eric Le Bihan
@ 2016-08-08 21:02 ` Eric Le Bihan
2016-08-08 21:02 ` [Buildroot] [PATCH 6/9] s6-rc: " Eric Le Bihan
` (4 subsequent siblings)
9 siblings, 0 replies; 19+ messages in thread
From: Eric Le Bihan @ 2016-08-08 21:02 UTC (permalink / raw)
To: buildroot
This new package provides s6-networking, a suite of small networking
utilities for Unix systems.
Signed-off-by: Eric Le Bihan <eric.le.bihan.dev@free.fr>
---
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
diff --git a/package/Config.in b/package/Config.in
index 6ce4c31..60229a5 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -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"
diff --git a/package/s6-networking/Config.in b/package/s6-networking/Config.in
new file mode 100644
index 0000000..1591ca9
--- /dev/null
+++ b/package/s6-networking/Config.in
@@ -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
diff --git a/package/s6-networking/s6-networking.mk b/package/s6-networking/s6-networking.mk
new file mode 100644
index 0000000..b38958c
--- /dev/null
+++ b/package/s6-networking/s6-networking.mk
@@ -0,0 +1,46 @@
+################################################################################
+#
+# s6-networking
+#
+################################################################################
+
+S6_NETWORKING_VERSION = v2.1.1.0
+S6_NETWORKING_SITE = git://git.skarnet.org/s6-networking.git
+S6_NETWORKING_LICENSE = ISC
+S6_NETWORKING_LICENSE_FILES = COPYING
+S6_NETWORKING_INSTALL_STAGING = YES
+S6_NETWORKING_DEPENDENCIES = s6-dns s6
+
+S6_NETWORKING_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/s6-dns \
+ --with-lib=$(STAGING_DIR)/usr/lib/skalibs
+
+ifeq ($(BR2_STATIC_LIBS),y)
+S6_NETWORKING_CONFIGURE_OPTS += --enable-static --disable-shared
+else
+S6_NETWORKING_CONFIGURE_OPTS += --disable-static --enable-shared --disable-allstatic
+endif
+
+define S6_NETWORKING_CONFIGURE_CMDS
+ (cd $(@D); $(TARGET_CONFIGURE_OPTS) ./configure $(S6_NETWORKING_CONFIGURE_OPTS))
+endef
+
+define S6_NETWORKING_BUILD_CMDS
+ $(TARGET_MAKE_ENV) $(MAKE1) -C $(@D)
+endef
+
+define S6_NETWORKING_INSTALL_TARGET_CMDS
+ $(TARGET_MAKE_ENV) $(MAKE1) -C $(@D) DESTDIR=$(TARGET_DIR) install
+endef
+
+define S6_NETWORKING_INSTALL_STAGING_CMDS
+ $(TARGET_MAKE_ENV) $(MAKE1) -C $(@D) DESTDIR=$(STAGING_DIR) install
+endef
+
+$(eval $(generic-package))
--
2.4.11
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [Buildroot] [PATCH 6/9] s6-rc: new package
2016-08-08 21:02 [Buildroot] [PATCH 0/9] Introducing service supervision/management with s6 Eric Le Bihan
` (4 preceding siblings ...)
2016-08-08 21:02 ` [Buildroot] [PATCH 5/9] s6-networking: " Eric Le Bihan
@ 2016-08-08 21:02 ` Eric Le Bihan
2016-08-08 21:02 ` [Buildroot] [PATCH 7/9] s6-portable-utils: " Eric Le Bihan
` (3 subsequent siblings)
9 siblings, 0 replies; 19+ messages in thread
From: Eric Le Bihan @ 2016-08-08 21:02 UTC (permalink / raw)
To: buildroot
This 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.
Signed-off-by: Eric Le Bihan <eric.le.bihan.dev@free.fr>
---
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
diff --git a/package/Config.in b/package/Config.in
index 60229a5..18bd2fd 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -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"
diff --git a/package/s6-rc/Config.in b/package/s6-rc/Config.in
new file mode 100644
index 0000000..c91b707
--- /dev/null
+++ b/package/s6-rc/Config.in
@@ -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
diff --git a/package/s6-rc/Config.in.host b/package/s6-rc/Config.in.host
new file mode 100644
index 0000000..d4e55c8
--- /dev/null
+++ b/package/s6-rc/Config.in.host
@@ -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/
diff --git a/package/s6-rc/s6-rc.mk b/package/s6-rc/s6-rc.mk
new file mode 100644
index 0000000..38f0b1d
--- /dev/null
+++ b/package/s6-rc/s6-rc.mk
@@ -0,0 +1,72 @@
+################################################################################
+#
+# s6-rc
+#
+################################################################################
+
+S6_RC_VERSION = v0.0.3.0
+S6_RC_SITE = git://git.skarnet.org/s6-rc.git
+S6_RC_LICENSE = ISC
+S6_RC_LICENSE_FILES = COPYING
+S6_RC_INSTALL_STAGING = YES
+S6_RC_DEPENDENCIES = s6
+
+S6_RC_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_RC_CONFIGURE_OPTS += --enable-static --disable-shared
+else
+S6_RC_CONFIGURE_OPTS += --disable-static --enable-shared --disable-allstatic
+endif
+
+define S6_RC_CONFIGURE_CMDS
+ (cd $(@D); $(TARGET_CONFIGURE_OPTS) ./configure $(S6_RC_CONFIGURE_OPTS))
+endef
+
+define S6_RC_BUILD_CMDS
+ $(TARGET_MAKE_ENV) $(MAKE1) -C $(@D)
+endef
+
+define S6_RC_INSTALL_TARGET_CMDS
+ $(TARGET_MAKE_ENV) $(MAKE1) -C $(@D) DESTDIR=$(TARGET_DIR) install
+endef
+
+define S6_RC_INSTALL_STAGING_CMDS
+ $(TARGET_MAKE_ENV) $(MAKE1) -C $(@D) DESTDIR=$(STAGING_DIR) install
+endef
+
+HOST_S6_RC_DEPENDENCIES = host-s6
+
+HOST_S6_RC_CONFIGURE_OPTS = \
+ --prefix=/usr \
+ --with-sysdeps=$(HOST_DIR)/usr/lib/skalibs/sysdeps \
+ --with-include=$(HOST_DIR)/usr/include \
+ --with-dynlib=$(HOST_DIR)/usr/lib \
+ --disable-static \
+ --enable-shared \
+ --disable-allstatic
+
+define HOST_S6_RC_CONFIGURE_CMDS
+ (cd $(@D); $(HOST_CONFIGURE_OPTS) ./configure $(HOST_S6_RC_CONFIGURE_OPTS))
+endef
+
+define HOST_S6_RC_BUILD_CMDS
+ $(HOST_MAKE_ENV) $(MAKE) -C $(@D) DESTDIR=$(HOST_DIR)
+endef
+
+define HOST_S6_RC_INSTALL_CMDS
+ $(HOST_MAKE_ENV) $(MAKE) -C $(@D) DESTDIR=$(HOST_DIR) \
+ install-dynlib \
+ install-bin
+ rm -f $(HOST_DIR)/usr/bin/s6-rc-dryrun
+endef
+
+$(eval $(generic-package))
+$(eval $(host-generic-package))
--
2.4.11
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [Buildroot] [PATCH 7/9] s6-portable-utils: new package
2016-08-08 21:02 [Buildroot] [PATCH 0/9] Introducing service supervision/management with s6 Eric Le Bihan
` (5 preceding siblings ...)
2016-08-08 21:02 ` [Buildroot] [PATCH 6/9] s6-rc: " Eric Le Bihan
@ 2016-08-08 21:02 ` Eric Le Bihan
2016-08-08 21:02 ` [Buildroot] [PATCH 8/9] s6-linux-utils: " Eric Le Bihan
` (2 subsequent siblings)
9 siblings, 0 replies; 19+ messages in thread
From: Eric Le Bihan @ 2016-08-08 21:02 UTC (permalink / raw)
To: buildroot
This 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.
Signed-off-by: Eric Le Bihan <eric.le.bihan.dev@free.fr>
---
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
diff --git a/package/Config.in b/package/Config.in
index 18bd2fd..b0ef7f7 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -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"
diff --git a/package/s6-portable-utils/Config.in b/package/s6-portable-utils/Config.in
new file mode 100644
index 0000000..c17181f
--- /dev/null
+++ b/package/s6-portable-utils/Config.in
@@ -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
diff --git a/package/s6-portable-utils/s6-portable-utils.mk b/package/s6-portable-utils/s6-portable-utils.mk
new file mode 100644
index 0000000..2ffbcbe
--- /dev/null
+++ b/package/s6-portable-utils/s6-portable-utils.mk
@@ -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))
--
2.4.11
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [Buildroot] [PATCH 8/9] s6-linux-utils: new package
2016-08-08 21:02 [Buildroot] [PATCH 0/9] Introducing service supervision/management with s6 Eric Le Bihan
` (6 preceding siblings ...)
2016-08-08 21:02 ` [Buildroot] [PATCH 7/9] s6-portable-utils: " Eric Le Bihan
@ 2016-08-08 21:02 ` Eric Le Bihan
2016-08-08 21:02 ` [Buildroot] [PATCH 9/9] s6-linux-init: " Eric Le Bihan
2016-08-09 4:14 ` [Buildroot] [PATCH 0/9] Introducing service supervision/management with s6 Waldemar Brodkorb
9 siblings, 0 replies; 19+ messages in thread
From: Eric Le Bihan @ 2016-08-08 21:02 UTC (permalink / raw)
To: buildroot
This new package provides s6-linux-utils, a set of minimalistic
Linux-specific system utilities.
Signed-off-by: Eric Le Bihan <eric.le.bihan.dev@free.fr>
---
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
diff --git a/package/Config.in b/package/Config.in
index b0ef7f7..e7bfd94 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -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"
diff --git a/package/s6-linux-utils/Config.in b/package/s6-linux-utils/Config.in
new file mode 100644
index 0000000..bb46d3d
--- /dev/null
+++ b/package/s6-linux-utils/Config.in
@@ -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
diff --git a/package/s6-linux-utils/s6-linux-utils.mk b/package/s6-linux-utils/s6-linux-utils.mk
new file mode 100644
index 0000000..f59b428
--- /dev/null
+++ b/package/s6-linux-utils/s6-linux-utils.mk
@@ -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))
--
2.4.11
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [Buildroot] [PATCH 9/9] s6-linux-init: new package
2016-08-08 21:02 [Buildroot] [PATCH 0/9] Introducing service supervision/management with s6 Eric Le Bihan
` (7 preceding siblings ...)
2016-08-08 21:02 ` [Buildroot] [PATCH 8/9] s6-linux-utils: " Eric Le Bihan
@ 2016-08-08 21:02 ` Eric Le Bihan
2016-08-09 4:14 ` [Buildroot] [PATCH 0/9] Introducing service supervision/management with s6 Waldemar Brodkorb
9 siblings, 0 replies; 19+ messages in thread
From: Eric Le Bihan @ 2016-08-08 21:02 UTC (permalink / raw)
To: buildroot
This 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.
Signed-off-by: Eric Le Bihan <eric.le.bihan.dev@free.fr>
---
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
diff --git a/package/Config.in b/package/Config.in
index e7bfd94..41f19c3 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -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"
diff --git a/package/s6-linux-init/Config.in b/package/s6-linux-init/Config.in
new file mode 100644
index 0000000..a472929
--- /dev/null
+++ b/package/s6-linux-init/Config.in
@@ -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
diff --git a/package/s6-linux-init/s6-linux-init.mk b/package/s6-linux-init/s6-linux-init.mk
new file mode 100644
index 0000000..c02916c
--- /dev/null
+++ b/package/s6-linux-init/s6-linux-init.mk
@@ -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))
--
2.4.11
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [Buildroot] [PATCH 0/9] Introducing service supervision/management with s6
2016-08-08 21:02 [Buildroot] [PATCH 0/9] Introducing service supervision/management with s6 Eric Le Bihan
` (8 preceding siblings ...)
2016-08-08 21:02 ` [Buildroot] [PATCH 9/9] s6-linux-init: " Eric Le Bihan
@ 2016-08-09 4:14 ` Waldemar Brodkorb
2016-08-09 19:54 ` Eric Le Bihan
9 siblings, 1 reply; 19+ messages in thread
From: Waldemar Brodkorb @ 2016-08-09 4:14 UTC (permalink / raw)
To: buildroot
Hi Eric,
Eric Le Bihan wrote,
> 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
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Buildroot] [PATCH 1/9] skalibs: new package
2016-08-08 21:02 ` [Buildroot] [PATCH 1/9] skalibs: new package Eric Le Bihan
@ 2016-08-09 8:06 ` Thomas Petazzoni
2016-08-09 20:16 ` Eric Le Bihan
[not found] ` <20160809221532.3f36d369@itchy>
0 siblings, 2 replies; 19+ messages in thread
From: Thomas Petazzoni @ 2016-08-09 8:06 UTC (permalink / raw)
To: buildroot
Hello,
On Mon, 8 Aug 2016 23:02:12 +0200, Eric Le Bihan wrote:
> diff --git a/package/skalibs/Config.in b/package/skalibs/Config.in
> new file mode 100644
> index 0000000..db35681
> --- /dev/null
> +++ b/package/skalibs/Config.in
> @@ -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?
> +comment "skalibs need an (e)glibc or musl toolchain"
Use just "glibc" instead of "(e)glibc", we have removed eglibc support.
> + 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
> ++ 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
> ++#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?
> +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.
> +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.
> +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
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Buildroot] [PATCH 2/9] execline: new package
2016-08-08 21:02 ` [Buildroot] [PATCH 2/9] execline: " Eric Le Bihan
@ 2016-08-09 8:09 ` Thomas Petazzoni
2016-08-09 20:22 ` Eric Le Bihan
0 siblings, 1 reply; 19+ messages in thread
From: Thomas Petazzoni @ 2016-08-09 8:09 UTC (permalink / raw)
To: buildroot
Hello,
On Mon, 8 Aug 2016 23:02:13 +0200, Eric Le Bihan wrote:
> This package provides execline, a (non-interactive) scripting language,
> like sh, used in the s6 supervision system.
>
> Signed-off-by: Eric Le Bihan <eric.le.bihan.dev@free.fr>
> ---
> 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?
> diff --git a/package/execline/Config.in b/package/execline/Config.in
> new file mode 100644
> index 0000000..a9e0a88
> --- /dev/null
> +++ b/package/execline/Config.in
> @@ -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"
(e)glibc -> glibc
> +EXECLINE_VERSION = v2.1.5.0
> +EXECLINE_SITE = git://git.skarnet.org/execline.git
Please use the tarball.
> +EXECLINE_LICENSE = ISC
> +EXECLINE_LICENSE_FILES = COPYING
> +EXECLINE_INSTALL_STAGING = YES
> +EXECLINE_DEPENDENCIES = skalibs
> +
> +EXECLINE_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)
> +EXECLINE_CONFIGURE_OPTS += --enable-static --disable-shared
> +else
> +EXECLINE_CONFIGURE_OPTS += --disable-static --enable-shared --disable-allstatic
> +endif
Handle the shared+static case.
> +
> +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
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Buildroot] [PATCH 0/9] Introducing service supervision/management with s6
2016-08-09 4:14 ` [Buildroot] [PATCH 0/9] Introducing service supervision/management with s6 Waldemar Brodkorb
@ 2016-08-09 19:54 ` Eric Le Bihan
0 siblings, 0 replies; 19+ messages in thread
From: Eric Le Bihan @ 2016-08-09 19:54 UTC (permalink / raw)
To: buildroot
Hi!
Le Tue, 9 Aug 2016 06:14:44 +0200,
Waldemar Brodkorb <wbx@openadk.org> a ?crit :
> > 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?
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.
> 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,
--
ELB
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Buildroot] [PATCH 1/9] skalibs: new package
2016-08-09 8:06 ` Thomas Petazzoni
@ 2016-08-09 20:16 ` Eric Le Bihan
2016-08-09 20:35 ` Thomas Petazzoni
[not found] ` <20160809221532.3f36d369@itchy>
1 sibling, 1 reply; 19+ messages in thread
From: Eric Le Bihan @ 2016-08-09 20:16 UTC (permalink / raw)
To: buildroot
Hi!
Le Tue, 9 Aug 2016 10:06:22 +0200,
Thomas Petazzoni <thomas.petazzoni@free-electrons.com> a ?crit :
> On Mon, 8 Aug 2016 23:02:12 +0200, Eric Le Bihan wrote:
>
> > diff --git a/package/skalibs/Config.in b/package/skalibs/Config.in
> > new file mode 100644
> > index 0000000..db35681
> > --- /dev/null
> > +++ b/package/skalibs/Config.in
> > @@ -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?
>
> > +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.
> > + 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
> > ++ 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
I did not know about this. Thanks for the suggestion. I'll rework the
patch.
> > ++#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?
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.
> > +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.
Will do!
> > +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.
OK. I'll handle this new case.
> > +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.
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,
--
ELB
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Buildroot] [PATCH 2/9] execline: new package
2016-08-09 8:09 ` Thomas Petazzoni
@ 2016-08-09 20:22 ` Eric Le Bihan
2016-08-09 20:36 ` Thomas Petazzoni
0 siblings, 1 reply; 19+ messages in thread
From: Eric Le Bihan @ 2016-08-09 20:22 UTC (permalink / raw)
To: buildroot
Hi!
Le Tue, 9 Aug 2016 10:09:12 +0200,
Thomas Petazzoni <thomas.petazzoni@free-electrons.com> a ?crit :
> On Mon, 8 Aug 2016 23:02:13 +0200, Eric Le Bihan wrote:
> > This package provides execline, a (non-interactive) scripting
> > language, like sh, used in the s6 supervision system.
> >
> > Signed-off-by: Eric Le Bihan <eric.le.bihan.dev@free.fr>
> > ---
> > 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.
> > +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?
This looks like a copy paste/error...
Best regards,
--
ELB
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Buildroot] [PATCH 1/9] skalibs: new package
2016-08-09 20:16 ` Eric Le Bihan
@ 2016-08-09 20:35 ` Thomas Petazzoni
0 siblings, 0 replies; 19+ messages in thread
From: Thomas Petazzoni @ 2016-08-09 20:35 UTC (permalink / raw)
To: buildroot
Hello,
On Tue, 9 Aug 2016 22:16:26 +0200, Eric Le Bihan wrote:
> > 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!
> > 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
>
> 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.
> 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
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Buildroot] [PATCH 2/9] execline: new package
2016-08-09 20:22 ` Eric Le Bihan
@ 2016-08-09 20:36 ` Thomas Petazzoni
0 siblings, 0 replies; 19+ messages in thread
From: Thomas Petazzoni @ 2016-08-09 20:36 UTC (permalink / raw)
To: buildroot
Hello,
On Tue, 9 Aug 2016 22:22:51 +0200, Eric Le Bihan wrote:
> > 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
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Buildroot] [PATCH 1/9] skalibs: new package
[not found] ` <20160809221532.3f36d369@itchy>
@ 2016-12-04 18:08 ` Eric Le Bihan
0 siblings, 0 replies; 19+ messages in thread
From: Eric Le Bihan @ 2016-12-04 18:08 UTC (permalink / raw)
To: buildroot
On 16-08-09 22:15:32, Eric Le Bihan wrote:
> Hi!
>
> Le Tue, 9 Aug 2016 10:06:22 +0200,
> Thomas Petazzoni <thomas.petazzoni@free-electrons.com> a ?crit :
>
> > On Mon, 8 Aug 2016 23:02:12 +0200, Eric Le Bihan wrote:
[...]
> > > + 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
> > > ++ 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
>
> 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
^ permalink raw reply [flat|nested] 19+ messages in thread
end of thread, other threads:[~2016-12-04 18:08 UTC | newest]
Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-08 21:02 [Buildroot] [PATCH 0/9] Introducing service supervision/management with s6 Eric Le Bihan
2016-08-08 21:02 ` [Buildroot] [PATCH 1/9] skalibs: new package Eric Le Bihan
2016-08-09 8:06 ` Thomas Petazzoni
2016-08-09 20:16 ` Eric Le Bihan
2016-08-09 20:35 ` Thomas Petazzoni
[not found] ` <20160809221532.3f36d369@itchy>
2016-12-04 18:08 ` Eric Le Bihan
2016-08-08 21:02 ` [Buildroot] [PATCH 2/9] execline: " Eric Le Bihan
2016-08-09 8:09 ` Thomas Petazzoni
2016-08-09 20:22 ` Eric Le Bihan
2016-08-09 20:36 ` Thomas Petazzoni
2016-08-08 21:02 ` [Buildroot] [PATCH 3/9] s6: " Eric Le Bihan
2016-08-08 21:02 ` [Buildroot] [PATCH 4/9] s6-dns: " Eric Le Bihan
2016-08-08 21:02 ` [Buildroot] [PATCH 5/9] s6-networking: " Eric Le Bihan
2016-08-08 21:02 ` [Buildroot] [PATCH 6/9] s6-rc: " Eric Le Bihan
2016-08-08 21:02 ` [Buildroot] [PATCH 7/9] s6-portable-utils: " Eric Le Bihan
2016-08-08 21:02 ` [Buildroot] [PATCH 8/9] s6-linux-utils: " Eric Le Bihan
2016-08-08 21:02 ` [Buildroot] [PATCH 9/9] s6-linux-init: " Eric Le Bihan
2016-08-09 4:14 ` [Buildroot] [PATCH 0/9] Introducing service supervision/management with s6 Waldemar Brodkorb
2016-08-09 19:54 ` Eric Le Bihan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox