2022-10-05 14:46:25 +00:00
|
|
|
%global built_tag v0.1.7
|
2022-10-07 17:22:06 +00:00
|
|
|
%global built_tag_strip %(b=%{built_tag}; echo ${b:1})
|
2022-10-05 14:46:25 +00:00
|
|
|
%global gen_version %(b=%{built_tag_strip}; echo ${b/-/"~"})
|
2020-04-29 13:35:16 +00:00
|
|
|
|
|
|
|
Name: catatonit
|
2022-10-07 17:22:06 +00:00
|
|
|
Version: %{gen_version}
|
2020-04-29 13:35:16 +00:00
|
|
|
Summary: A signal-forwarding process manager for containers
|
2023-03-06 11:01:46 +00:00
|
|
|
License: GPL-3.0-or-later
|
2022-05-27 13:32:23 +00:00
|
|
|
Release: %autorelease
|
2023-04-13 14:02:34 +00:00
|
|
|
%if 0%{?fedora}
|
2023-02-09 11:25:21 +00:00
|
|
|
ExclusiveArch: %{golang_arches_future}
|
2023-04-13 14:02:34 +00:00
|
|
|
%else
|
|
|
|
ExclusiveArch: aarch64 ppc64le s390x x86_64
|
|
|
|
%endif
|
2022-10-05 14:46:25 +00:00
|
|
|
URL: https://github.com/openSUSE/%{name}
|
|
|
|
# Tarball fetched from upstream
|
|
|
|
Source0: %{url}/archive/%{built_tag}.tar.gz
|
2020-04-29 13:35:16 +00:00
|
|
|
BuildRequires: autoconf
|
|
|
|
BuildRequires: automake
|
|
|
|
BuildRequires: file
|
2022-05-27 13:32:23 +00:00
|
|
|
BuildRequires: libtool
|
|
|
|
Provides: podman-%{name} = %{version}-%{release}
|
|
|
|
BuildRequires: gcc
|
|
|
|
BuildRequires: git-core
|
2020-04-29 13:35:16 +00:00
|
|
|
BuildRequires: glibc-static
|
2020-12-17 03:20:53 +00:00
|
|
|
BuildRequires: make
|
2020-04-29 13:35:16 +00:00
|
|
|
|
|
|
|
%description
|
2022-05-27 13:32:23 +00:00
|
|
|
Catatonit is a %{_sbindir}/init program for use within containers. It
|
2020-04-29 13:35:16 +00:00
|
|
|
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
|
2022-08-17 18:31:12 +00:00
|
|
|
%autosetup -Sgit %{name}-%{built_tag_strip}
|
2021-11-08 16:07:54 +00:00
|
|
|
sed -i '$d' configure.ac
|
2020-04-29 13:35:16 +00:00
|
|
|
|
|
|
|
%build
|
|
|
|
autoreconf -fi
|
|
|
|
%configure
|
2022-05-27 13:32:23 +00:00
|
|
|
CFLAGS="%{optflags} -fPIE -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE"
|
2020-04-29 13:35:16 +00:00
|
|
|
%{__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
|
2022-02-14 18:23:19 +00:00
|
|
|
%autochangelog
|