diff options
author | Bruce Ashfield <bruce.ashfield@gmail.com> | 2025-07-20 22:25:45 -0400 |
---|---|---|
committer | Bruce Ashfield <bruce.ashfield@gmail.com> | 2025-07-20 22:36:08 -0400 |
commit | 69c32e6e65b0d73b76692f9998781e9cfd80236b (patch) | |
tree | f77228aea696fafd794cade6227cad54ad5fc2ce | |
parent | 3b773f4477b358dc2f69344c3529de6d41f0a091 (diff) | |
download | meta-virtualization-69c32e6e65b0d73b76692f9998781e9cfd80236b.tar.gz |
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 <bruce.ashfield@gmail.com>
-rw-r--r-- | recipes-containers/tini/tini/0001-Support-POSIX-basename-from-musl-libc.patch | 76 | ||||
-rw-r--r-- | recipes-containers/tini/tini/0001-tini.c-a-function-declaration-without-a-prototype-is.patch | 74 | ||||
-rw-r--r-- | recipes-containers/tini/tini_git.bb (renamed from recipes-containers/tini/tini_0.19.0.bb) | 5 |
3 files changed, 2 insertions, 153 deletions
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 @@ | |||
1 | From 10479a6eef32f8e64fd5bf894dee9c7a6f21ce4c Mon Sep 17 00:00:00 2001 | ||
2 | From: Hauke Mehrtens <hauke@hauke-m.de> | ||
3 | Date: Sun, 14 Apr 2024 15:33:51 +0200 | ||
4 | Subject: [PATCH] Support POSIX basename() from musl libc | ||
5 | |||
6 | Musl libc 1.2.5 removed the definition of the basename() function from | ||
7 | string.h and only provides it in libgen.h as the POSIX standard | ||
8 | defines it. | ||
9 | |||
10 | This change fixes compilation with musl libc 1.2.5. | ||
11 | ```` | ||
12 | build_dir/target-mips_24kc_musl/tini-0.19.0/src/tini.c:227:36: error: implicit declaration of function 'basename' [-Wimplicit-function-declaration] | ||
13 | 227 | fprintf(file, "%s (%s)\n", basename(name), TINI_VERSION_STRING); | ||
14 | 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=] | ||
15 | 227 | fprintf(file, "%s (%s)\n", basename(name), TINI_VERSION_STRING); | ||
16 | | ~^ ~~~~~~~~~~~~~~ | ||
17 | | | | | ||
18 | | char * int | ||
19 | | %d | ||
20 | |||
21 | ```` | ||
22 | |||
23 | basename() modifies the input string, copy it first with strdup(), If | ||
24 | strdup() returns NULL the code will handle it. | ||
25 | |||
26 | Upstream-Status: Submitted [https://github.com/krallin/tini/pull/223] | ||
27 | |||
28 | Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> | ||
29 | --- | ||
30 | src/tini.c | 15 +++++++++++---- | ||
31 | 1 file changed, 11 insertions(+), 4 deletions(-) | ||
32 | |||
33 | diff --git a/src/tini.c b/src/tini.c | ||
34 | index 7914d3a..41d1506 100644 | ||
35 | --- a/src/tini.c | ||
36 | +++ b/src/tini.c | ||
37 | @@ -14,6 +14,7 @@ | ||
38 | #include <stdlib.h> | ||
39 | #include <unistd.h> | ||
40 | #include <stdbool.h> | ||
41 | +#include <libgen.h> | ||
42 | |||
43 | #include "tiniConfig.h" | ||
44 | #include "tiniLicense.h" | ||
45 | @@ -224,14 +225,19 @@ int spawn(const signal_configuration_t* const sigconf_ptr, char* const argv[], i | ||
46 | } | ||
47 | |||
48 | void print_usage(char* const name, FILE* const file) { | ||
49 | - fprintf(file, "%s (%s)\n", basename(name), TINI_VERSION_STRING); | ||
50 | + char *dirc, *bname; | ||
51 | + | ||
52 | + dirc = strdup(name); | ||
53 | + bname = basename(dirc); | ||
54 | + | ||
55 | + fprintf(file, "%s (%s)\n", bname, TINI_VERSION_STRING); | ||
56 | |||
57 | #if TINI_MINIMAL | ||
58 | - fprintf(file, "Usage: %s PROGRAM [ARGS] | --version\n\n", basename(name)); | ||
59 | + fprintf(file, "Usage: %s PROGRAM [ARGS] | --version\n\n", bname); | ||
60 | #else | ||
61 | - fprintf(file, "Usage: %s [OPTIONS] PROGRAM -- [ARGS] | --version\n\n", basename(name)); | ||
62 | + fprintf(file, "Usage: %s [OPTIONS] PROGRAM -- [ARGS] | --version\n\n", bname); | ||
63 | #endif | ||
64 | - fprintf(file, "Execute a program under the supervision of a valid init process (%s)\n\n", basename(name)); | ||
65 | + fprintf(file, "Execute a program under the supervision of a valid init process (%s)\n\n", bname); | ||
66 | |||
67 | fprintf(file, "Command line options:\n\n"); | ||
68 | |||
69 | @@ -261,6 +267,7 @@ void print_usage(char* const name, FILE* const file) { | ||
70 | fprintf(file, " %s: Send signals to the child's process group.\n", KILL_PROCESS_GROUP_GROUP_ENV_VAR); | ||
71 | |||
72 | fprintf(file, "\n"); | ||
73 | + free(dirc); | ||
74 | } | ||
75 | |||
76 | 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 @@ | |||
1 | From 66d0b5fd94fafe1e15bf21a1b73618ca23de078f Mon Sep 17 00:00:00 2001 | ||
2 | From: Jose Quaresma <jose.quaresma@foundries.io> | ||
3 | Date: Fri, 23 Sep 2022 16:31:33 +0000 | ||
4 | Subject: [PATCH] tini.c: a function declaration without a prototype is | ||
5 | deprecated in all versions of C | ||
6 | |||
7 | | /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] | ||
8 | | int isolate_child() { | ||
9 | | ^ | ||
10 | | void | ||
11 | | /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] | ||
12 | | int parse_env() { | ||
13 | | ^ | ||
14 | | void | ||
15 | | /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] | ||
16 | | int register_subreaper () { | ||
17 | | ^ | ||
18 | | void | ||
19 | | /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] | ||
20 | | void reaper_check () { | ||
21 | | ^ | ||
22 | | void | ||
23 | | 4 errors generated. | ||
24 | |||
25 | Upstream-Status: Submitted [https://github.com/krallin/tini/pull/198] | ||
26 | |||
27 | Signed-off-by: Jose Quaresma <jose.quaresma@foundries.io> | ||
28 | --- | ||
29 | src/tini.c | 8 ++++---- | ||
30 | 1 file changed, 4 insertions(+), 4 deletions(-) | ||
31 | |||
32 | diff --git a/src/tini.c b/src/tini.c | ||
33 | index 2c873f9..7914d3a 100644 | ||
34 | --- a/src/tini.c | ||
35 | +++ b/src/tini.c | ||
36 | @@ -147,7 +147,7 @@ int restore_signals(const signal_configuration_t* const sigconf_ptr) { | ||
37 | return 0; | ||
38 | } | ||
39 | |||
40 | -int isolate_child() { | ||
41 | +int isolate_child(void) { | ||
42 | // Put the child into a new process group. | ||
43 | if (setpgid(0, 0) < 0) { | ||
44 | PRINT_FATAL("setpgid failed: %s", strerror(errno)); | ||
45 | @@ -392,7 +392,7 @@ int parse_args(const int argc, char* const argv[], char* (**child_args_ptr_ptr)[ | ||
46 | return 0; | ||
47 | } | ||
48 | |||
49 | -int parse_env() { | ||
50 | +int parse_env(void) { | ||
51 | #if HAS_SUBREAPER | ||
52 | if (getenv(SUBREAPER_ENV_VAR) != NULL) { | ||
53 | subreaper++; | ||
54 | @@ -413,7 +413,7 @@ int parse_env() { | ||
55 | |||
56 | |||
57 | #if HAS_SUBREAPER | ||
58 | -int register_subreaper () { | ||
59 | +int register_subreaper (void) { | ||
60 | if (subreaper > 0) { | ||
61 | if (prctl(PR_SET_CHILD_SUBREAPER, 1)) { | ||
62 | if (errno == EINVAL) { | ||
63 | @@ -431,7 +431,7 @@ int register_subreaper () { | ||
64 | #endif | ||
65 | |||
66 | |||
67 | -void reaper_check () { | ||
68 | +void reaper_check (void) { | ||
69 | /* Check that we can properly reap zombies */ | ||
70 | #if HAS_SUBREAPER | ||
71 | int bit = 0; | ||
72 | -- | ||
73 | 2.34.1 | ||
74 | |||
diff --git a/recipes-containers/tini/tini_0.19.0.bb b/recipes-containers/tini/tini_git.bb index c3ca25d0..09ad21fb 100644 --- a/recipes-containers/tini/tini_0.19.0.bb +++ b/recipes-containers/tini/tini_git.bb | |||
@@ -4,12 +4,11 @@ DESCRIPTION = "Tini is the simplest init you could think of. All Tini does is \ | |||
4 | spawn a single child (Tini is meant to be run in a container), and wait for \ | 4 | spawn a single child (Tini is meant to be run in a container), and wait for \ |
5 | it to exit all the while reaping zombies and performing signal forwarding. " | 5 | it to exit all the while reaping zombies and performing signal forwarding. " |
6 | 6 | ||
7 | SRCREV = "b9f42a0e7bb46efea0c9e3d8610c96ab53b467f8" | 7 | PV = "v0.19.0+git" |
8 | SRCREV = "369448a167e8b3da4ca5bca0b3307500c3371828" | ||
8 | SRC_URI = " \ | 9 | SRC_URI = " \ |
9 | git://github.com/krallin/tini.git;branch=master;protocol=https \ | 10 | git://github.com/krallin/tini.git;branch=master;protocol=https \ |
10 | file://0001-Do-not-strip-the-output-binary-allow-yocto-to-do-thi.patch \ | 11 | file://0001-Do-not-strip-the-output-binary-allow-yocto-to-do-thi.patch \ |
11 | file://0001-tini.c-a-function-declaration-without-a-prototype-is.patch \ | ||
12 | file://0001-Support-POSIX-basename-from-musl-libc.patch \ | ||
13 | " | 12 | " |
14 | 13 | ||
15 | LICENSE = "MIT" | 14 | LICENSE = "MIT" |