diff --git a/catatonit.spec b/catatonit.spec new file mode 100644 index 0000000000000000000000000000000000000000..26d30dc4acaef94b489d17d23cfb8a9ce14b3fbc --- /dev/null +++ b/catatonit.spec @@ -0,0 +1,63 @@ +%define built_tag v0.1.7 +%define built_tag_strip %(b=%{built_tag}; echo ${b:1}) +%define download_url %{url}/archive/%{built_tag}.tar.gz + +Name: catatonit +Version: 0.1.7 +Release: 1 +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 +BuildRequires: make + +%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 +* Mon Nov 22 2021 Li Jingwei - 0.1.7-1 +- package init diff --git a/v0.1.7.tar.gz b/v0.1.7.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..b4309d46af152b9175dd7f0172e8a3dc6bb37f0e Binary files /dev/null and b/v0.1.7.tar.gz differ