Skip to contentSkip to conversation

package/catatonit: update, and use as init or docker init (branch yem/docker-init)

PATCH In review Yann E. MORIN 3 participants 10 messages Feb 15, 2025 – Mar 15, 2025

lore
Share & tools
lore
#0 lore raw

cover package/catatonit: update, and use as init or docker init (branch yem/docker-init)

Hello All!

This samall series brings catatonit to the same level of support as the other init systems, and especially as a docker-engine init system, like tini.

Tested with the following defconfig (based on qemu_x86_64_defconfig):

    BR2_x86_64=y
    BR2_TOOLCHAIN_EXTERNAL=y
    BR2_GLOBAL_PATCH_DIR="board/qemu/patches"
    BR2_DOWNLOAD_FORCE_CHECK_HASHES=y
    BR2_PER_PACKAGE_DIRECTORIES=y
    BR2_SYSTEM_DHCP="eth0"
    BR2_ROOTFS_POST_BUILD_SCRIPT="board/qemu/x86_64/post-build.sh"
    BR2_ROOTFS_POST_IMAGE_SCRIPT="board/qemu/post-image.sh"
    BR2_ROOTFS_POST_SCRIPT_ARGS="$(BR2_DEFCONFIG)"
    BR2_LINUX_KERNEL=y
    BR2_LINUX_KERNEL_CUSTOM_VERSION=y
    BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.12.9"
    BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
    BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/qemu/x86_64/linux.config"
    BR2_LINUX_KERNEL_NEEDS_HOST_LIBELF=y
    BR2_PACKAGE_CA_CERTIFICATES=y
    BR2_PACKAGE_DOCKER_CLI=y
    BR2_PACKAGE_DOCKER_ENGINE=y
    BR2_PACKAGE_DOCKER_ENGINE_DOCKER_INIT_CATATONIT=y
    BR2_TARGET_ROOTFS_EXT2=y
    BR2_TARGET_ROOTFS_EXT2_SIZE="252M"
    BR2_TARGET_ROOTFS_EXT2_RESBLKS=1
    BR2_TARGET_ROOTFS_EXT2_MKFS_OPTIONS=""
    # BR2_TARGET_ROOTFS_TAR is not set
    BR2_PACKAGE_HOST_GO_BIN=y

And then, in the VM, after login:

    # ls -l /usr/libexec/docker/
    lrwxrwxrwx    1 root     root            19 Feb 15 09:34 docker-init -> ../../bin/catatonit
    # docker container run -ti --init busybox:latest
    [...]
    / # ps
    PID   USER     TIME  COMMAND
        1 root      0:00 /sbin/docker-init -- sh
        6 root      0:00 sh
        7 root      0:00 ps
    / # ls -l /proc/1/exe
    lrwxrwxrwx    1 root     root             0 Feb 15 09:35 /proc/1/exe -> /sbin/docker-init

Replacing BR2_PACKAGE_DOCKER_ENGINE_DOCKER_INIT_CATATONIT=y with BR2_PACKAGE_DOCKER_ENGINE_DOCKER_INIT_TINI=y still works as previously, with the init symlink being to tini instead of catatonit.

Regards,
Yann E. MORIN.

----------------------------------------------------------------
Yann E. MORIN (4):
package/docker-engine: carry the tini init symlink package/docker-engine: add option to support catatonit as init package/catatonit: update to version 0.2.1
system: add catatonit as init system

 Config.in.legacy                                   |  9 ++++
 .../catatonit/0001-fix-build-with-kernel-5.9.patch | 49 ----------------------
 package/catatonit/catatonit.hash                   |  2 +-
 package/catatonit/catatonit.mk                     |  2 +-
 package/docker-engine/Config.in                    | 32 +++++++++++---
 package/docker-engine/docker-engine.mk             | 10 +++++
 package/tini/tini.mk                               |  2 -
 system/Config.in                                   | 10 +++++
 8 files changed, 58 insertions(+), 58 deletions(-)
 delete mode 100644 package/catatonit/0001-fix-build-with-kernel-5.9.patch

--
.-----------------.--------------------.------------------.--------------------.

|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |

'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

#1 lore raw

PATCH 1/4 package/docker-engine: carry the tini init symlink

tini can be used standalone, not just as an init injected by docker. As such, creating the docker-engine's init symlink does not belong to tini itself, but to docker-engine.

This will also help later, when we allow docker-engine to use another init alternative, catatonit (already paclkaged in Buildroot, but not integrated with docker).

Cc Christian Stewart <[email protected]>
Cc Fiona Klute (WIWA) <[email protected]>
---
 package/docker-engine/docker-engine.mk | 8 ++++++++
 package/tini/tini.mk                   | 2 --
 2 files changed, 8 insertions(+), 2 deletions(-)
package/docker-engine/docker-engine.mk +8 -0
index ba4e7a4ae0..7467f13b39 100644
@@ -35,6 +35,14 @@ DOCKER_ENGINE_DEPENDENCIES += systemd
 DOCKER_ENGINE_TAGS += systemd journald
 endif
 
+ifeq ($(BR2_PACKAGE_DOCKER_ENGINE_DOCKER_INIT),y)
+define DOCKER_ENGINE_INIT
+	mkdir -p $(TARGET_DIR)/usr/libexec/docker
+	ln -sf ../../bin/tini $(TARGET_DIR)/usr/libexec/docker/docker-init
+endef
+DOCKER_ENGINE_POST_INSTALL_TARGET_HOOKS += DOCKER_ENGINE_INIT
+endif
+
 ifneq ($(BR2_PACKAGE_DOCKER_ENGINE_DRIVER_BTRFS),y)
 DOCKER_ENGINE_TAGS += exclude_graphdriver_btrfs
 endif
package/tini/tini.mk +0 -2
index 83e86237d4..c195c69023 100644
@@ -31,8 +31,6 @@ endef
 
 define TINI_INSTALL_TARGET_CMDS
 	$(INSTALL) -D -m 0755 $(@D)/bin/tini $(TARGET_DIR)/usr/bin/tini
-	mkdir -p $(TARGET_DIR)/usr/libexec/docker
-	ln -sf ../../bin/tini $(TARGET_DIR)/usr/libexec/docker/docker-init
 endef
 
 # Tini's CMakeLists.txt is not suitable for Buildroot.
Signature · 6 lines
2.47.0

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Tested-by Fiona Klute (WIWA) on v1 1/4
#2 lore raw

Re: [Buildroot] [PATCH 1/4] package/docker-engine: carry the tini init symlink

Am 15.02.25 um 11:33 schrieb Yann E. MORIN:

Quoted 11 lines

tini can be used standalone, not just as an init injected by docker. As such, creating the docker-engine's init symlink does not belong to tini itself, but to docker-engine.

This will also help later, when we allow docker-engine to use another init alternative, catatonit (already paclkaged in Buildroot, but not integrated with docker).

Cc Christian Stewart <[email protected]>
Cc Fiona Klute (WIWA) <[email protected]>

Thanks!

Quoted 29 lines
---
  package/docker-engine/docker-engine.mk | 8 ++++++++
  package/tini/tini.mk                   | 2 --
  2 files changed, 8 insertions(+), 2 deletions(-)
package/docker-engine/docker-engine.mk +8 -0
index ba4e7a4ae0..7467f13b39 100644
@@ -35,6 +35,14 @@ DOCKER_ENGINE_DEPENDENCIES += systemd
  DOCKER_ENGINE_TAGS += systemd journald
  endif
 
+ifeq ($(BR2_PACKAGE_DOCKER_ENGINE_DOCKER_INIT),y)
+define DOCKER_ENGINE_INIT
+	mkdir -p $(TARGET_DIR)/usr/libexec/docker
+	ln -sf ../../bin/tini $(TARGET_DIR)/usr/libexec/docker/docker-init
+endef
+DOCKER_ENGINE_POST_INSTALL_TARGET_HOOKS += DOCKER_ENGINE_INIT
+endif
+
  ifneq ($(BR2_PACKAGE_DOCKER_ENGINE_DRIVER_BTRFS),y)
  DOCKER_ENGINE_TAGS += exclude_graphdriver_btrfs
  endif
package/tini/tini.mk +0 -0
index 83e86237d4..c195c69023 100644

package/tini/tini.mk endef · line 36

Quoted 8 lines
package/tini/tini.mk +0 -2
@@ -31,8 +31,6 @@ endef
 
  define TINI_INSTALL_TARGET_CMDS
  	$(INSTALL) -D -m 0755 $(@D)/bin/tini $(TARGET_DIR)/usr/bin/tini
-	mkdir -p $(TARGET_DIR)/usr/libexec/docker
-	ln -sf ../../bin/tini $(TARGET_DIR)/usr/libexec/docker/docker-init
  endef
 
  # Tini's CMakeLists.txt is not suitable for Buildroot.

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

#3 lore raw

Re: [Buildroot] [PATCH 1/4] package/docker-engine: carry the tini init symlink

In reply to Yann E. MORIN
Quoted 11 lines · Yann E. MORIN

tini can be used standalone, not just as an init injected by docker. As such, creating the docker-engine's init symlink does not belong to tini itself, but to docker-engine.

This will also help later, when we allow docker-engine to use another init alternative, catatonit (already paclkaged in Buildroot, but not integrated with docker).

Cc Christian Stewart <[email protected]>
Cc Fiona Klute (WIWA) <[email protected]>

Series applied to next, thanks.
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

#4 lore raw

PATCH 2/4 package/docker-engine: add option to support catatonit as init

In reply to Yann E. MORIN

currently, docker-engine can only use tini as injected init. catatonit as a package exists, but it does not create the symlink that would be needed at runtime [0].

Add a choice at the docker-engine level, for which injected init to use, bringing catatonit to the integration level of tini.

[0] that could be done in a post-build script, but that's not practical.

Cc Christian Stewart <[email protected]>
Cc Fiona Klute (WIWA) <[email protected]>
---
 Config.in.legacy                       |  9 ++++++++
 package/docker-engine/Config.in        | 32 ++++++++++++++++++++++----
 package/docker-engine/docker-engine.mk |  6 +++--
 3 files changed, 40 insertions(+), 7 deletions(-)
Config.in.legacy +9 -0
index c302b73423..eaf4d708d0 100644
@@ -146,6 +146,15 @@ endif
 
 comment "Legacy options removed in 2025.02"
 
+# BR2_PACKAGE_DOCKER_ENGINE_DOCKER_INIT is still referenced in docker-engine
+config BR2_PACKAGE_DOCKER_ENGINE_DOCKER_INIT
+	bool "docker-engine init support is now a choice"
+	select BR2_LEGACY
+	help
+	  docker-engine init support is now a choice. The original
+	  setting has been adapted; be sure to review it in the
+	  docker-engine package.
+
 config BR2_PACKAGE_LATENCYTOP
 	bool "latencytop has been removed"
 	select BR2_LEGACY
package/docker-engine/Config.in +27 -5
index e03ecceeff..6338eeeef1 100644
@@ -48,16 +48,38 @@ config BR2_PACKAGE_DOCKER_ENGINE_DRIVER_VFS
 	help
 	  Build the vfs filesystem driver for Docker.
 
-config BR2_PACKAGE_DOCKER_ENGINE_DOCKER_INIT
+choice
 	bool "support docker-init"
+	default BR2_PACKAGE_DOCKER_ENGINE_DOCKER_INIT_TINI if BR2_PACKAGE_DOCKER_ENGINE_DOCKER_INIT  # legacy
+	help
+	  Support providing a minimal init process for containers.
+	  Required to use "docker run --init".
+
+config BR2_PACKAGE_DOCKER_ENGINE_DOCKER_INIT_NONE
+	bool "none"
+	help
+	  Do not support docker-init.
+
+config BR2_PACKAGE_DOCKER_ENGINE_DOCKER_INIT_CATATONIT
+	bool "catatonit"
+	select BR2_PACKAGE_CATATONIT # runtime
+	help
+	  Support providing a minimal init process for containers,
+	  using catatonit.
+
+config BR2_PACKAGE_DOCKER_ENGINE_DOCKER_INIT_TINI
+	bool "tini"
 	select BR2_PACKAGE_TINI # runtime
 	help
 	  Support providing a minimal init process for containers,
-	  using tini. Required to use "docker run --init".
+	  using tini.
 
-	  This does not change the Docker engine build, the
-	  docker-init symlink is provided by the tini package
-	  itself. This option only adds the dependency.
+endchoice
+
+config BR2_PACKAGE_DOCKER_ENGINE_DOCKER_INIT_NAME
+	string
+	default "tini" if BR2_PACKAGE_DOCKER_ENGINE_DOCKER_INIT_TINI
+	default "catatonit" if BR2_PACKAGE_DOCKER_ENGINE_DOCKER_INIT_CATATONIT
 
 endif
 
package/docker-engine/docker-engine.mk +4 -2
index 7467f13b39..c39dc2b440 100644
@@ -35,10 +35,12 @@ DOCKER_ENGINE_DEPENDENCIES += systemd
 DOCKER_ENGINE_TAGS += systemd journald
 endif
 
-ifeq ($(BR2_PACKAGE_DOCKER_ENGINE_DOCKER_INIT),y)
+DOCKER_ENGINE_INIT_NAME = $(call qstrip,$(BR2_PACKAGE_DOCKER_ENGINE_DOCKER_INIT_NAME))
+ifneq ($(DOCKER_ENGINE_INIT_NAME),)
 define DOCKER_ENGINE_INIT
 	mkdir -p $(TARGET_DIR)/usr/libexec/docker
-	ln -sf ../../bin/tini $(TARGET_DIR)/usr/libexec/docker/docker-init
+	ln -sf ../../bin/$(DOCKER_ENGINE_INIT_NAME) \
+		$(TARGET_DIR)/usr/libexec/docker/docker-init
 endef
 DOCKER_ENGINE_POST_INSTALL_TARGET_HOOKS += DOCKER_ENGINE_INIT
 endif
Signature · 6 lines
2.47.0

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Tested-by Fiona Klute (WIWA) on v1 2/4
#5 lore raw

Re: [Buildroot] [PATCH 2/4] package/docker-engine: add option to support catatonit as init

Am 15.02.25 um 11:33 schrieb Yann E. MORIN:

Quoted 4 lines

currently, docker-engine can only use tini as injected init. catatonit as a package exists, but it does not create the symlink that would be needed at runtime [0].

Quoted 8 lines

Add a choice at the docker-engine level, for which injected init to use, bringing catatonit to the integration level of tini.

[0] that could be done in a post-build script, but that's not practical.

Cc Christian Stewart <[email protected]>
Cc Fiona Klute (WIWA) <[email protected]>

Thanks!

Quoted 83 lines
---
  Config.in.legacy                       |  9 ++++++++
  package/docker-engine/Config.in        | 32 ++++++++++++++++++++++----
  package/docker-engine/docker-engine.mk |  6 +++--
  3 files changed, 40 insertions(+), 7 deletions(-)
Config.in.legacy +9 -0
index c302b73423..eaf4d708d0 100644
@@ -146,6 +146,15 @@ endif
 
  comment "Legacy options removed in 2025.02"
 
+# BR2_PACKAGE_DOCKER_ENGINE_DOCKER_INIT is still referenced in docker-engine
+config BR2_PACKAGE_DOCKER_ENGINE_DOCKER_INIT
+	bool "docker-engine init support is now a choice"
+	select BR2_LEGACY
+	help
+	  docker-engine init support is now a choice. The original
+	  setting has been adapted; be sure to review it in the
+	  docker-engine package.
+
  config BR2_PACKAGE_LATENCYTOP
  	bool "latencytop has been removed"
  	select BR2_LEGACY
package/docker-engine/Config.in +27 -5
index e03ecceeff..6338eeeef1 100644
@@ -48,16 +48,38 @@ config BR2_PACKAGE_DOCKER_ENGINE_DRIVER_VFS
  	help
  	  Build the vfs filesystem driver for Docker.
 
-config BR2_PACKAGE_DOCKER_ENGINE_DOCKER_INIT
+choice
  	bool "support docker-init"
+	default BR2_PACKAGE_DOCKER_ENGINE_DOCKER_INIT_TINI if BR2_PACKAGE_DOCKER_ENGINE_DOCKER_INIT  # legacy
+	help
+	  Support providing a minimal init process for containers.
+	  Required to use "docker run --init".
+
+config BR2_PACKAGE_DOCKER_ENGINE_DOCKER_INIT_NONE
+	bool "none"
+	help
+	  Do not support docker-init.
+
+config BR2_PACKAGE_DOCKER_ENGINE_DOCKER_INIT_CATATONIT
+	bool "catatonit"
+	select BR2_PACKAGE_CATATONIT # runtime
+	help
+	  Support providing a minimal init process for containers,
+	  using catatonit.
+
+config BR2_PACKAGE_DOCKER_ENGINE_DOCKER_INIT_TINI
+	bool "tini"
  	select BR2_PACKAGE_TINI # runtime
  	help
  	  Support providing a minimal init process for containers,
-	  using tini. Required to use "docker run --init".
+	  using tini.
 
-	  This does not change the Docker engine build, the
-	  docker-init symlink is provided by the tini package
-	  itself. This option only adds the dependency.
+endchoice
+
+config BR2_PACKAGE_DOCKER_ENGINE_DOCKER_INIT_NAME
+	string
+	default "tini" if BR2_PACKAGE_DOCKER_ENGINE_DOCKER_INIT_TINI
+	default "catatonit" if BR2_PACKAGE_DOCKER_ENGINE_DOCKER_INIT_CATATONIT
 
  endif
 
package/docker-engine/docker-engine.mk +0 -1
index 7467f13b39..c39dc2b440 100644
@@ -35,10 +35,12 @@ DOCKER_ENGINE_DEPENDENCIES += systemd
  DOCKER_ENGINE_TAGS += systemd journald
  endif
 
-ifeq ($(BR2_PACKAGE_DOCKER_ENGINE_DOCKER_INIT),y)

package/docker-engine/docker-engine.mk DOCKER_ENGINE_DEPENDENCIES += systemd · line 46

Quoted 10 lines
package/docker-engine/docker-engine.mk +4 -1
+DOCKER_ENGINE_INIT_NAME = $(call qstrip,$(BR2_PACKAGE_DOCKER_ENGINE_DOCKER_INIT_NAME))
+ifneq ($(DOCKER_ENGINE_INIT_NAME),)
  define DOCKER_ENGINE_INIT
  	mkdir -p $(TARGET_DIR)/usr/libexec/docker
-	ln -sf ../../bin/tini $(TARGET_DIR)/usr/libexec/docker/docker-init
+	ln -sf ../../bin/$(DOCKER_ENGINE_INIT_NAME) \
+		$(TARGET_DIR)/usr/libexec/docker/docker-init
  endef
  DOCKER_ENGINE_POST_INSTALL_TARGET_HOOKS += DOCKER_ENGINE_INIT
  endif

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

#6 lore raw

PATCH 3/4 package/catatonit: update to version 0.2.1

In reply to Yann E. MORIN
Cc Christian Stewart <[email protected]>
---
 .../0001-fix-build-with-kernel-5.9.patch      | 49 -------------------
 package/catatonit/catatonit.hash              |  2 +-
 package/catatonit/catatonit.mk                |  2 +-
 3 files changed, 2 insertions(+), 51 deletions(-)
 delete mode 100644 package/catatonit/0001-fix-build-with-kernel-5.9.patch
package/catatonit/0001-fix-build-with-kernel-5.9.patch deleted +0 -49
deleted file mode 100644
index 37def8e546..0000000000
@@ -1,49 +0,0 @@
-From 65e1b96bd40cb14b3729ac56bb9f1fcb77254403 Mon Sep 17 00:00:00 2001
-From: Fabrice Fontaine <[email protected]>
-Date: Tue, 1 Nov 2022 14:16:01 +0100
-Subject: [PATCH] fix build with kernel < 5.9
-
-linux/close_range.h is only available since kernel 5.9 and
-https://github.com/torvalds/linux/commit/60997c3d45d9a67daf01c56d805ae4fec37e0bd8
-resulting in the following build failure:
-
-catatonit.c:39:11: fatal error: linux/close_range.h: No such file or directory
-   39 | # include <linux/close_range.h>
-      |           ^~~~~~~~~~~~~~~~~~~~~
-
-Fixes:
- - http://autobuild.buildroot.org/results/ed9a847905083175c7fcb2f2df28f9ac5b9c3313
-
-Signed-off-by: Fabrice Fontaine <[email protected]>
-Upstream: https://github.com/openSUSE/catatonit/commit/663ad1670689143f65af3a288f90cecb7feed54f
----
- catatonit.c  | 2 +-
- configure.ac | 2 +-
- 2 files changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/catatonit.c b/catatonit.c
-index a33f4cd..b10d9b0 100644
---- a/catatonit.c
-+++ b/catatonit.c
-@@ -36,7 +36,7 @@
- #include <limits.h>
- #include <dirent.h>
- 
--#ifdef HAVE_CLOSE_RANGE
-+#ifdef HAVE_LINUX_CLOSE_RANGE_H
- # include <linux/close_range.h>
- #else
- # include <sys/syscall.h>
-diff --git a/configure.ac b/configure.ac
-index 69e89f0..b37f146 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -24,7 +24,7 @@ LT_PREREQ([2.4.2])
- LT_INIT([disable-shared])
- 
- AC_CHECK_HEADERS([errno.h fcntl.h signal.h stdarg.h stdio.h stdlib.h unistd.h])
--AC_CHECK_HEADERS([sys/prctl.h sys/signalfd.h sys/stat.h sys/types.h sys/wait.h])
-+AC_CHECK_HEADERS([linux/close_range.h sys/prctl.h sys/signalfd.h sys/stat.h sys/types.h sys/wait.h])
- 
- AC_CHECK_FUNCS([close_range])
- 
package/catatonit/catatonit.hash +1 -1
index 9940309c76..7b13100a33 100644
@@ -1,3 +1,3 @@
 # Locally computed
-sha256  d0cf1feffdc89c9fb52af20fc10127887a408bbd99e0424558d182b310a3dc92  catatonit-0.2.0.tar.gz
+sha256  771385049516fdd561fbb9164eddf376075c4c7de3900a8b18654660172748f1  catatonit-0.2.1.tar.gz
 sha256  8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643  COPYING
package/catatonit/catatonit.mk +1 -1
index a308ea6471..aa7e60f697 100644
@@ -4,7 +4,7 @@
 #
 ################################################################################
 
-CATATONIT_VERSION = 0.2.0
+CATATONIT_VERSION = 0.2.1
 CATATONIT_SITE = $(call github,openSUSE,catatonit,v$(CATATONIT_VERSION))
 CATATONIT_LICENSE = GPL-2.0+
 CATATONIT_LICENSE_FILES = COPYING
Signature · 6 lines
2.47.0

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Tested-by Fiona Klute (WIWA) on v1 3/4
#7 lore raw

Re: [Buildroot] [PATCH 3/4] package/catatonit: update to version 0.2.1

Am 15.02.25 um 11:33 schrieb Yann E. MORIN:

Quoted 2 lines
Cc Christian Stewart <[email protected]>

Thanks!

Quoted 76 lines
---
  .../0001-fix-build-with-kernel-5.9.patch      | 49 -------------------
  package/catatonit/catatonit.hash              |  2 +-
  package/catatonit/catatonit.mk                |  2 +-
  3 files changed, 2 insertions(+), 51 deletions(-)

delete mode 100644 package/catatonit/0001-fix-build-with-kernel-5.9.patch

package/catatonit/0001-fix-build-with-kernel-5.9.patch deleted +0 -49
deleted file mode 100644
index 37def8e546..0000000000
@@ -1,49 +0,0 @@
-From 65e1b96bd40cb14b3729ac56bb9f1fcb77254403 Mon Sep 17 00:00:00 2001
-From: Fabrice Fontaine <[email protected]>
-Date: Tue, 1 Nov 2022 14:16:01 +0100
-Subject: [PATCH] fix build with kernel < 5.9
-
-linux/close_range.h is only available since kernel 5.9 and
-https://github.com/torvalds/linux/commit/60997c3d45d9a67daf01c56d805ae4fec37e0bd8
-resulting in the following build failure:
-
-catatonit.c:39:11: fatal error: linux/close_range.h: No such file or directory
-   39 | # include <linux/close_range.h>
-      |           ^~~~~~~~~~~~~~~~~~~~~
-
-Fixes:
- - http://autobuild.buildroot.org/results/ed9a847905083175c7fcb2f2df28f9ac5b9c3313
-
-Signed-off-by: Fabrice Fontaine <[email protected]>
-Upstream: https://github.com/openSUSE/catatonit/commit/663ad1670689143f65af3a288f90cecb7feed54f
----
- catatonit.c  | 2 +-
- configure.ac | 2 +-
- 2 files changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/catatonit.c b/catatonit.c
-index a33f4cd..b10d9b0 100644
---- a/catatonit.c
-+++ b/catatonit.c
-@@ -36,7 +36,7 @@
- #include <limits.h>
- #include <dirent.h>
-
--#ifdef HAVE_CLOSE_RANGE
-+#ifdef HAVE_LINUX_CLOSE_RANGE_H
- # include <linux/close_range.h>
- #else
- # include <sys/syscall.h>
-diff --git a/configure.ac b/configure.ac
-index 69e89f0..b37f146 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -24,7 +24,7 @@ LT_PREREQ([2.4.2])
- LT_INIT([disable-shared])
-
- AC_CHECK_HEADERS([errno.h fcntl.h signal.h stdarg.h stdio.h stdlib.h unistd.h])
--AC_CHECK_HEADERS([sys/prctl.h sys/signalfd.h sys/stat.h sys/types.h sys/wait.h])
-+AC_CHECK_HEADERS([linux/close_range.h sys/prctl.h sys/signalfd.h sys/stat.h sys/types.h sys/wait.h])
-
- AC_CHECK_FUNCS([close_range])
-
package/catatonit/catatonit.hash +1 -1
index 9940309c76..7b13100a33 100644
@@ -1,3 +1,3 @@
  # Locally computed
-sha256  d0cf1feffdc89c9fb52af20fc10127887a408bbd99e0424558d182b310a3dc92  catatonit-0.2.0.tar.gz
+sha256  771385049516fdd561fbb9164eddf376075c4c7de3900a8b18654660172748f1  catatonit-0.2.1.tar.gz
  sha256  8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643  COPYING
package/catatonit/catatonit.mk +0 -0
index a308ea6471..aa7e60f697 100644

package/catatonit/catatonit.mk line 10

Quoted 8 lines
package/catatonit/catatonit.mk +1 -1
@@ -4,7 +4,7 @@
  #
  ################################################################################
 
-CATATONIT_VERSION = 0.2.0
+CATATONIT_VERSION = 0.2.1
  CATATONIT_SITE = $(call github,openSUSE,catatonit,v$(CATATONIT_VERSION))
  CATATONIT_LICENSE = GPL-2.0+
  CATATONIT_LICENSE_FILES = COPYING

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

#8 lore raw

PATCH 4/4 system: add catatonit as init system

In reply to Yann E. MORIN

Like the existing tini, catatonit can be used as minimal init to be usd as PID-1.

Add it to the list of init systems, like was done for tini in 24cac9c4e6a3 (system: add tini as init system) and tinyinit in c1daa35cd950 (package/tinyinit: new package).

Unlike the "main" init systems, there is no historical preference for those minilist init systems, so just keep them alphabetically ordered.

---
 system/Config.in | 10 ++++++++++
 1 file changed, 10 insertions(+)
system/Config.in +10 -0
index 8f3579b7e0..8ff6c7213e 100644
@@ -149,6 +149,16 @@ comment "systemd highly recommends Linux >= 4.15"
 
 comment "Special purpose (read help)"
 
+config BR2_INIT_CATATONIT
+	bool "catatonit"
+	select BR2_PACKAGE_CATATONIT
+	select BR2_PACKAGE_SKELETON_INIT_NONE if BR2_ROOTFS_SKELETON_DEFAULT
+	help
+	  A container init that is so simple it's effectively
+	  brain-dead.
+
+	  https://github.com/openSUSE/catatonit
+
 config BR2_INIT_TINI
 	bool "tini"
 	depends on BR2_USE_MMU  # tini
Signature · 6 lines
2.47.0

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Reviewed-by Christian Stewart on the v1 series
#9 lore raw
In reply to Yann E. MORIN

Hi Yann,

Quoted 7 lines · Yann E. MORIN

----------------------------------------------------------------
Yann E. MORIN (4):
package/docker-engine: carry the tini init symlink package/docker-engine: add option to support catatonit as init package/catatonit: update to version 0.2.1
system: add catatonit as init system

Quoted 12 lines
 Config.in.legacy                                   |  9 ++++
 .../catatonit/0001-fix-build-with-kernel-5.9.patch | 49
----------------------
 package/catatonit/catatonit.hash                   |  2 +-
 package/catatonit/catatonit.mk                     |  2 +-
 package/docker-engine/Config.in                    | 32 +++++++++++---
 package/docker-engine/docker-engine.mk             | 10 +++++
 package/tini/tini.mk                               |  2 -
 system/Config.in                                   | 10 +++++
 8 files changed, 58 insertions(+), 58 deletions(-)
 delete mode 100644 package/catatonit/0001-fix-build-with-kernel-5.9.patch

Patch series lgtm. Thanks!

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot