From ee58ab5397c7b5a1d0142d6ce3f17fcc33b7e60d Mon Sep 17 00:00:00 2001 From: Lokesh Mandvekar Date: Wed, 29 Apr 2020 09:35:16 -0400 Subject: [PATCH] catatonit-0.1.5-2 Resolves: #1804768 - first upload Signed-off-by: Lokesh Mandvekar --- .gitignore | 1 + catatonit.spec | 70 ++++++++++++++++++++++++++++++++++++++++++++++++++ sources | 1 + 3 files changed, 72 insertions(+) create mode 100644 .gitignore create mode 100644 catatonit.spec create mode 100644 sources diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..302721f --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/v0.1.5.tar.gz diff --git a/catatonit.spec b/catatonit.spec new file mode 100644 index 0000000..eb8ae67 --- /dev/null +++ b/catatonit.spec @@ -0,0 +1,70 @@ +%define built_tag v0.1.5 +%define built_tag_strip %(b=%{built_tag}; echo ${b:1}) +%define download_url %{url}/archive/%{built_tag}.tar.gz + +Name: catatonit +Version: 0.1.5 +Release: 2%{?dist} +Summary: A signal-forwarding process manager for containers +License: GPLv3+ +URL: https://github.com/openSUSE/catatonit +Source0: %{download_url} +BuildRequires: autoconf +BuildRequires: automake +BuildRequires: file +BuildRequires: gcc +BuildRequires: git +BuildRequires: glibc-static +BuildRequires: libtool + +%description +Catatonit is a /sbin/init program for use within containers. It +forwards (almost) all signals to the spawned child, tears down +the container when the spawned child exits, and otherwise +cleans up other exited processes (zombies). + +This is a reimplementation of other container init programs (such as +"tini" or "dumb-init"), but uses modern Linux facilities (such as +signalfd(2)) and has no additional features. + +%prep +%autosetup -Sgit -n %{name}-%{built_tag_strip} + +%build +autoreconf -fi +%configure +%{__make} %{?_smp_mflags} + +# Make sure we *always* build a static binary. Otherwise we'll break containers +# that don't have the necessary shared libs. +file ./%{name} | grep 'statically linked' +if [ $? != 0 ]; then + echo "ERROR: %{name} binary must be statically linked!" + exit 1 +fi + +%install +install -dp %{buildroot}%{_libexecdir}/%{name} +install -p %{name} %{buildroot}%{_libexecdir}/%{name} +install -dp %{buildroot}%{_libexecdir}/podman +ln -s %{_libexecdir}/%{name}/%{name} %{buildroot}%{_libexecdir}/podman/%{name} + +%files +%license COPYING +%doc README.md +%dir %{_libexecdir}/%{name} +%{_libexecdir}/%{name}/%{name} +%dir %{_libexecdir}/podman +%{_libexecdir}/podman/%{name} + +%changelog +* Wed Apr 29 2020 Lokesh Mandvekar - 0.1.5-2 +- complain if not statically linked, patch from Jindrich Novy + +* Wed Apr 29 2020 Lokesh Mandvekar - 0.1.5-1 +- bump to v0.1.5 +- static binary to not break containers that don't have necessary shared libs + +* Wed Feb 19 2020 Lokesh Mandvekar - 0.1.4-1 +- first build for review +- source copied from openSUSE @ https://build.opensuse.org/package/show/openSUSE:Factory/catatonit diff --git a/sources b/sources new file mode 100644 index 0000000..4f8ba56 --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (v0.1.5.tar.gz) = 75387cf9c611222ef0afc9f688cefb3e4a4ec388cfa9d2329ee7860cb2ad83afa9311f53c1047f92f7adde27b7eb07f5501ee602334e610a3227104d8894486b