From 69c32e6e65b0d73b76692f9998781e9cfd80236b Mon Sep 17 00:00:00 2001 From: Bruce Ashfield Date: Sun, 20 Jul 2025 22:25:45 -0400 Subject: tini: update to v0.19.0 We also switch to _git and add PV to the recipe as we don't need to exactly track a tag. We drop patches that have been merged upstream. Bumping tini to version v0.19.0-15-g369448a, which comprises the following commits: 369448a Document TINI_KILL_PROCESS_GROUP environment variable 37ff361 Update README.md.in 924c4bd Support POSIX basename() from musl libc 7724cbe Update "ENV key value" format in README 071c715 chore: allow CMake though to 3.10 0b44d36 chore: bump minimum CMake to 2.8.12 a49fdd3 tini.c: a function declaration without a prototype is deprecated in all versions of C 378bbbc Update keyserver recommendation to Ubuntu b9f42a0 Indicate that -e can be repeated Signed-off-by: Bruce Ashfield --- ...001-Support-POSIX-basename-from-musl-libc.patch | 76 ---------------------- ...nction-declaration-without-a-prototype-is.patch | 74 --------------------- recipes-containers/tini/tini_0.19.0.bb | 32 --------- recipes-containers/tini/tini_git.bb | 31 +++++++++ 4 files changed, 31 insertions(+), 182 deletions(-) delete mode 100644 recipes-containers/tini/tini/0001-Support-POSIX-basename-from-musl-libc.patch delete mode 100644 recipes-containers/tini/tini/0001-tini.c-a-function-declaration-without-a-prototype-is.patch delete mode 100644 recipes-containers/tini/tini_0.19.0.bb create mode 100644 recipes-containers/tini/tini_git.bb diff --git a/recipes-containers/tini/tini/0001-Support-POSIX-basename-from-musl-libc.patch b/recipes-containers/tini/tini/0001-Support-POSIX-basename-from-musl-libc.patch deleted file mode 100644 index b504c37a..00000000 --- a/recipes-containers/tini/tini/0001-Support-POSIX-basename-from-musl-libc.patch +++ /dev/null @@ -1,76 +0,0 @@ -From 10479a6eef32f8e64fd5bf894dee9c7a6f21ce4c Mon Sep 17 00:00:00 2001 -From: Hauke Mehrtens -Date: Sun, 14 Apr 2024 15:33:51 +0200 -Subject: [PATCH] Support POSIX basename() from musl libc - -Musl libc 1.2.5 removed the definition of the basename() function from -string.h and only provides it in libgen.h as the POSIX standard -defines it. - -This change fixes compilation with musl libc 1.2.5. -```` -build_dir/target-mips_24kc_musl/tini-0.19.0/src/tini.c:227:36: error: implicit declaration of function 'basename' [-Wimplicit-function-declaration] - 227 | fprintf(file, "%s (%s)\n", basename(name), TINI_VERSION_STRING); -build_dir/target-mips_24kc_musl/tini-0.19.0/src/tini.c:227:25: error: format '%s' expects argument of type 'char *', but argument 3 has type 'int' [-Werror=format=] - 227 | fprintf(file, "%s (%s)\n", basename(name), TINI_VERSION_STRING); - | ~^ ~~~~~~~~~~~~~~ - | | | - | char * int - | %d - -```` - -basename() modifies the input string, copy it first with strdup(), If -strdup() returns NULL the code will handle it. - -Upstream-Status: Submitted [https://github.com/krallin/tini/pull/223] - -Signed-off-by: Hauke Mehrtens ---- - src/tini.c | 15 +++++++++++---- - 1 file changed, 11 insertions(+), 4 deletions(-) - -diff --git a/src/tini.c b/src/tini.c -index 7914d3a..41d1506 100644 ---- a/src/tini.c -+++ b/src/tini.c -@@ -14,6 +14,7 @@ - #include - #include - #include -+#include - - #include "tiniConfig.h" - #include "tiniLicense.h" -@@ -224,14 +225,19 @@ int spawn(const signal_configuration_t* const sigconf_ptr, char* const argv[], i - } - - void print_usage(char* const name, FILE* const file) { -- fprintf(file, "%s (%s)\n", basename(name), TINI_VERSION_STRING); -+ char *dirc, *bname; -+ -+ dirc = strdup(name); -+ bname = basename(dirc); -+ -+ fprintf(file, "%s (%s)\n", bname, TINI_VERSION_STRING); - - #if TINI_MINIMAL -- fprintf(file, "Usage: %s PROGRAM [ARGS] | --version\n\n", basename(name)); -+ fprintf(file, "Usage: %s PROGRAM [ARGS] | --version\n\n", bname); - #else -- fprintf(file, "Usage: %s [OPTIONS] PROGRAM -- [ARGS] | --version\n\n", basename(name)); -+ fprintf(file, "Usage: %s [OPTIONS] PROGRAM -- [ARGS] | --version\n\n", bname); - #endif -- fprintf(file, "Execute a program under the supervision of a valid init process (%s)\n\n", basename(name)); -+ fprintf(file, "Execute a program under the supervision of a valid init process (%s)\n\n", bname); - - fprintf(file, "Command line options:\n\n"); - -@@ -261,6 +267,7 @@ void print_usage(char* const name, FILE* const file) { - fprintf(file, " %s: Send signals to the child's process group.\n", KILL_PROCESS_GROUP_GROUP_ENV_VAR); - - fprintf(file, "\n"); -+ free(dirc); - } - - void print_license(FILE* const file) { diff --git a/recipes-containers/tini/tini/0001-tini.c-a-function-declaration-without-a-prototype-is.patch b/recipes-containers/tini/tini/0001-tini.c-a-function-declaration-without-a-prototype-is.patch deleted file mode 100644 index 8834f175..00000000 --- a/recipes-containers/tini/tini/0001-tini.c-a-function-declaration-without-a-prototype-is.patch +++ /dev/null @@ -1,74 +0,0 @@ -From 66d0b5fd94fafe1e15bf21a1b73618ca23de078f Mon Sep 17 00:00:00 2001 -From: Jose Quaresma -Date: Fri, 23 Sep 2022 16:31:33 +0000 -Subject: [PATCH] tini.c: a function declaration without a prototype is - deprecated in all versions of C - -| /srv/oe/build/tmp-lmp/work/corei7-64-lmp-linux/tini/0.19.0-r0/git/src/tini.c:150:18: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes] -| int isolate_child() { -| ^ -| void -| /srv/oe/build/tmp-lmp/work/corei7-64-lmp-linux/tini/0.19.0-r0/git/src/tini.c:395:14: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes] -| int parse_env() { -| ^ -| void -| /srv/oe/build/tmp-lmp/work/corei7-64-lmp-linux/tini/0.19.0-r0/git/src/tini.c:416:24: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes] -| int register_subreaper () { -| ^ -| void -| /srv/oe/build/tmp-lmp/work/corei7-64-lmp-linux/tini/0.19.0-r0/git/src/tini.c:434:19: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes] -| void reaper_check () { -| ^ -| void -| 4 errors generated. - -Upstream-Status: Submitted [https://github.com/krallin/tini/pull/198] - -Signed-off-by: Jose Quaresma ---- - src/tini.c | 8 ++++---- - 1 file changed, 4 insertions(+), 4 deletions(-) - -diff --git a/src/tini.c b/src/tini.c -index 2c873f9..7914d3a 100644 ---- a/src/tini.c -+++ b/src/tini.c -@@ -147,7 +147,7 @@ int restore_signals(const signal_configuration_t* const sigconf_ptr) { - return 0; - } - --int isolate_child() { -+int isolate_child(void) { - // Put the child into a new process group. - if (setpgid(0, 0) < 0) { - PRINT_FATAL("setpgid failed: %s", strerror(errno)); -@@ -392,7 +392,7 @@ int parse_args(const int argc, char* const argv[], char* (**child_args_ptr_ptr)[ - return 0; - } - --int parse_env() { -+int parse_env(void) { - #if HAS_SUBREAPER - if (getenv(SUBREAPER_ENV_VAR) != NULL) { - subreaper++; -@@ -413,7 +413,7 @@ int parse_env() { - - - #if HAS_SUBREAPER --int register_subreaper () { -+int register_subreaper (void) { - if (subreaper > 0) { - if (prctl(PR_SET_CHILD_SUBREAPER, 1)) { - if (errno == EINVAL) { -@@ -431,7 +431,7 @@ int register_subreaper () { - #endif - - --void reaper_check () { -+void reaper_check (void) { - /* Check that we can properly reap zombies */ - #if HAS_SUBREAPER - int bit = 0; --- -2.34.1 - diff --git a/recipes-containers/tini/tini_0.19.0.bb b/recipes-containers/tini/tini_0.19.0.bb deleted file mode 100644 index c3ca25d0..00000000 --- a/recipes-containers/tini/tini_0.19.0.bb +++ /dev/null @@ -1,32 +0,0 @@ -HOMEPAGE = "http://github.com/krallin/tini" -SUMMARY = "Minimal init for containers" -DESCRIPTION = "Tini is the simplest init you could think of. All Tini does is \ -spawn a single child (Tini is meant to be run in a container), and wait for \ -it to exit all the while reaping zombies and performing signal forwarding. " - -SRCREV = "b9f42a0e7bb46efea0c9e3d8610c96ab53b467f8" -SRC_URI = " \ - git://github.com/krallin/tini.git;branch=master;protocol=https \ - file://0001-Do-not-strip-the-output-binary-allow-yocto-to-do-thi.patch \ - file://0001-tini.c-a-function-declaration-without-a-prototype-is.patch \ - file://0001-Support-POSIX-basename-from-musl-libc.patch \ - " - -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://LICENSE;md5=ffc9091894702bc5dcf4cc0085561ef5" - -BBCLASSEXTEND = "native" - -# tini links with -static, so no PIE for us -SECURITY_CFLAGS:pn-${PN} = "${SECURITY_NO_PIE_CFLAGS}" - -inherit cmake - -do_install() { - mkdir -p ${D}/${bindir} - install -m 0755 ${B}/tini-static ${D}/${bindir}/docker-init -} - -# Tini is the currently the provider for docker-init -PROVIDES += "docker-init" -RPROVIDES:${PN} = "docker-init" diff --git a/recipes-containers/tini/tini_git.bb b/recipes-containers/tini/tini_git.bb new file mode 100644 index 00000000..09ad21fb --- /dev/null +++ b/recipes-containers/tini/tini_git.bb @@ -0,0 +1,31 @@ +HOMEPAGE = "http://github.com/krallin/tini" +SUMMARY = "Minimal init for containers" +DESCRIPTION = "Tini is the simplest init you could think of. All Tini does is \ +spawn a single child (Tini is meant to be run in a container), and wait for \ +it to exit all the while reaping zombies and performing signal forwarding. " + +PV = "v0.19.0+git" +SRCREV = "369448a167e8b3da4ca5bca0b3307500c3371828" +SRC_URI = " \ + git://github.com/krallin/tini.git;branch=master;protocol=https \ + file://0001-Do-not-strip-the-output-binary-allow-yocto-to-do-thi.patch \ + " + +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=ffc9091894702bc5dcf4cc0085561ef5" + +BBCLASSEXTEND = "native" + +# tini links with -static, so no PIE for us +SECURITY_CFLAGS:pn-${PN} = "${SECURITY_NO_PIE_CFLAGS}" + +inherit cmake + +do_install() { + mkdir -p ${D}/${bindir} + install -m 0755 ${B}/tini-static ${D}/${bindir}/docker-init +} + +# Tini is the currently the provider for docker-init +PROVIDES += "docker-init" +RPROVIDES:${PN} = "docker-init" -- cgit v1.2.3-54-g00ecf