From 8ade87b6a0cec4ca6b20059e7e8192484d5afe9e Mon Sep 17 00:00:00 2001 From: Justin Bronder Date: Wed, 26 May 2021 11:04:45 -0400 Subject: [PATCH] New package: catatonit-0.1.5 --- .../use-environ-instead-of-__environ.patch | 29 +++++++++++++++++++ srcpkgs/catatonit/template | 27 +++++++++++++++++ 2 files changed, 56 insertions(+) create mode 100644 srcpkgs/catatonit/patches/use-environ-instead-of-__environ.patch create mode 100644 srcpkgs/catatonit/template diff --git a/srcpkgs/catatonit/patches/use-environ-instead-of-__environ.patch b/srcpkgs/catatonit/patches/use-environ-instead-of-__environ.patch new file mode 100644 index 000000000000..c32276f9cbc6 --- /dev/null +++ b/srcpkgs/catatonit/patches/use-environ-instead-of-__environ.patch @@ -0,0 +1,29 @@ +From 75014b1c3099245b7d0f44f24d7f6dc4888a45fd Mon Sep 17 00:00:00 2001 +From: Andrey Golovizin +Date: Mon, 1 Mar 2021 18:41:42 +0100 +Subject: [PATCH] Use environ instead of __environ + +The `__environ` variable is internal and undocumented. It also breaks +compilation with musl. + +Signed-off-by: Andrey Golovizin +--- + catatonit.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/catatonit.c b/catatonit.c +index a05451e..fd746bb 100644 +--- a/catatonit.c ++++ b/catatonit.c +@@ -216,7 +216,7 @@ static int spawn_pid1(char *file, char **argv, sigset_t *sigmask) + if (sigprocmask(SIG_SETMASK, sigmask, NULL) < 0) + bail("failed to reset sigmask: %m"); + +- execvpe(file, argv, __environ); ++ execvpe(file, argv, environ); + bail("failed to exec pid1: %m"); + } + +-- +2.31.1 + diff --git a/srcpkgs/catatonit/template b/srcpkgs/catatonit/template new file mode 100644 index 000000000000..445d384baa75 --- /dev/null +++ b/srcpkgs/catatonit/template @@ -0,0 +1,27 @@ +# Template file for 'catatonit' +pkgname=catatonit +version=0.1.5 +revision=1 +build_style=gnu-configure +hostmakedepends="automake libtool" +short_desc="Container init that is so simple it's effectively brain-dead" +maintainer="Justin Bronder " +license="GPL-3.0-or-later" +homepage="https://github.com/openSUSE/catatonit" +distfiles="https://github.com/openSUSE/catatonit/releases/download/v${version}/catatonit.tar.xz" +checksum=4c45e2230235751731da3daabe130abce70b3ef37d0b1936cbc90a46b475cf08 +patch_args=-Np1 + +pre_configure() { + autoreconf -fi +} + +do_install() { + vmkdir usr/libexec/catatonit + vinstall catatonit 0755 usr/libexec/catatonit + + # Following suit with Fedora/Ubuntu, podman-run will default to looking + # for catatonit here when passed the "--init" argument + vmkdir usr/libexec/podman + ln -sf ../catatonit/catatonit "${DESTDIR}/usr/libexec/podman" +}