2020-09-02 12:59:53 +00:00
|
|
|
%global with_debug 1
|
2019-09-11 17:22:49 +00:00
|
|
|
|
|
|
|
%if 0%{?with_debug}
|
|
|
|
%global _find_debuginfo_dwz_opts %{nil}
|
|
|
|
%global _dwz_low_mem_die_limit 0
|
|
|
|
%else
|
|
|
|
%global debug_package %{nil}
|
|
|
|
%endif
|
|
|
|
|
2022-11-15 15:21:56 +00:00
|
|
|
%if 0%{?rhel}
|
|
|
|
%bcond_with docs
|
|
|
|
%else
|
|
|
|
%bcond_without docs
|
|
|
|
%endif
|
|
|
|
|
2023-09-20 13:35:16 +00:00
|
|
|
%global built_tag v2.1.8
|
2022-10-07 17:25:25 +00:00
|
|
|
%global built_tag_strip %(b=%{built_tag}; echo ${b:1})
|
2022-10-06 12:14:32 +00:00
|
|
|
%global gen_version %(b=%{built_tag_strip}; echo ${b/-/"~"})
|
2019-09-11 17:22:49 +00:00
|
|
|
|
2021-08-16 19:03:14 +00:00
|
|
|
Name: conmon
|
2019-09-11 17:22:49 +00:00
|
|
|
Epoch: 2
|
2022-10-07 17:25:25 +00:00
|
|
|
Version: %{gen_version}
|
2023-03-06 11:03:28 +00:00
|
|
|
License: Apache-2.0
|
2022-01-26 19:47:16 +00:00
|
|
|
Release: %autorelease
|
2019-09-11 17:22:49 +00:00
|
|
|
Summary: OCI container runtime monitor
|
2022-05-18 18:23:34 +00:00
|
|
|
URL: https://github.com/containers/%{name}
|
2022-10-06 12:14:32 +00:00
|
|
|
# Tarball fetched from upstream
|
|
|
|
Source0: %{url}/archive/%{built_tag}.tar.gz
|
2022-11-15 15:21:56 +00:00
|
|
|
%if %{with docs}
|
2023-02-09 11:04:30 +00:00
|
|
|
ExclusiveArch: %{golang_arches_future}
|
2022-05-18 18:23:34 +00:00
|
|
|
BuildRequires: go-md2man
|
2022-11-15 15:21:56 +00:00
|
|
|
%endif
|
2022-05-18 18:23:34 +00:00
|
|
|
BuildRequires: gcc
|
|
|
|
BuildRequires: git-core
|
2019-09-11 17:22:49 +00:00
|
|
|
BuildRequires: glib2-devel
|
2021-09-22 14:43:35 +00:00
|
|
|
BuildRequires: libseccomp-devel
|
2020-09-18 13:34:43 +00:00
|
|
|
BuildRequires: systemd-devel
|
|
|
|
BuildRequires: systemd-libs
|
2020-12-17 03:51:10 +00:00
|
|
|
BuildRequires: make
|
2020-05-25 13:00:04 +00:00
|
|
|
Requires: glib2
|
2020-09-18 13:34:43 +00:00
|
|
|
Requires: systemd-libs
|
2021-09-22 14:43:35 +00:00
|
|
|
Requires: libseccomp
|
2019-09-11 17:22:49 +00:00
|
|
|
|
|
|
|
%description
|
|
|
|
%{summary}.
|
|
|
|
|
|
|
|
%prep
|
2022-08-17 18:33:13 +00:00
|
|
|
%autosetup -Sgit %{name}-%{built_tag_strip}
|
2021-02-16 16:34:22 +00:00
|
|
|
sed -i 's/install.bin: bin\/conmon/install.bin:/' Makefile
|
|
|
|
sed -i 's/install.crio: bin\/conmon/install.crio:/' Makefile
|
2019-09-11 17:22:49 +00:00
|
|
|
|
|
|
|
%build
|
2021-05-14 15:26:09 +00:00
|
|
|
%{__make} DEBUGFLAG="-g" bin/conmon
|
2022-11-15 15:21:56 +00:00
|
|
|
|
|
|
|
%if %{with docs}
|
2021-02-16 16:34:22 +00:00
|
|
|
%{__make} GOMD2MAN=go-md2man -C docs
|
2022-11-15 15:21:56 +00:00
|
|
|
%endif
|
2019-09-11 17:22:49 +00:00
|
|
|
|
|
|
|
%install
|
2021-02-16 16:34:22 +00:00
|
|
|
%{__make} PREFIX=%{buildroot}%{_prefix} install.bin install.crio
|
2022-11-15 15:21:56 +00:00
|
|
|
|
|
|
|
%if %{with docs}
|
2021-02-16 16:34:22 +00:00
|
|
|
%{__make} PREFIX=%{buildroot}%{_prefix} -C docs install
|
2022-11-15 15:21:56 +00:00
|
|
|
%endif
|
2019-09-11 17:22:49 +00:00
|
|
|
|
|
|
|
#define license tag if not already defined
|
|
|
|
%{!?_licensedir:%global license %doc}
|
|
|
|
|
|
|
|
%files
|
|
|
|
%license LICENSE
|
|
|
|
%doc README.md
|
|
|
|
%{_bindir}/%{name}
|
2019-10-22 01:20:38 +00:00
|
|
|
%{_libexecdir}/crio/%{name}
|
2021-05-27 15:38:36 +00:00
|
|
|
%dir %{_libexecdir}/crio
|
2022-11-15 15:21:56 +00:00
|
|
|
|
|
|
|
%if %{with docs}
|
2021-02-16 16:07:09 +00:00
|
|
|
%{_mandir}/man8/%{name}.8.gz
|
2022-11-15 15:21:56 +00:00
|
|
|
%endif
|
2019-09-11 17:22:49 +00:00
|
|
|
|
|
|
|
%changelog
|
2022-01-26 19:47:16 +00:00
|
|
|
%autochangelog
|