sys-process/tini: Sync with Gentoo

It's from Gentoo commit 86bb4af29fee8a1c83ca9f30f885e0e0b4147329.
This commit is contained in:
Flatcar Buildbot 2025-03-17 07:12:19 +00:00 committed by Krzesimir Nowak
parent 1c9bf8dd56
commit 89ef5d69f3
2 changed files with 16 additions and 1 deletions

View File

@ -0,0 +1,13 @@
diff --git a/src/tini.c b/src/tini.c
index eb62015..0e7d5da 100644
--- a/src/tini.c
+++ b/src/tini.c
@@ -18,6 +18,8 @@
#include "tiniConfig.h"
#include "tiniLicense.h"
+#define basename(name) (strrchr((name),'/') ? strrchr((name),'/')+1 : (name))
+
#if TINI_MINIMAL
#define PRINT_FATAL(...) fprintf(stderr, __VA_ARGS__); fprintf(stderr, "\n");
#define PRINT_WARNING(...) if (verbosity > 0) { fprintf(stderr, __VA_ARGS__); fprintf(stderr, "\n"); }

View File

@ -1,4 +1,4 @@
# Copyright 1999-2022 Gentoo Authors
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@ -19,6 +19,8 @@ SLOT="0"
KEYWORDS="amd64 arm arm64 hppa ppc64 ~riscv ~x86"
IUSE="+args +static"
PATCHES=("${FILESDIR}/tini-0.19.0-musl-basename.patch")
src_prepare() {
[[ -z ${GIT_COMMIT} ]] && die "forgetful maintainer! please define GIT_COMMIT_${PV//./} on bump"