2018-02-15 13:23:04 +01:00
|
|
|
#
|
|
|
|
# spec file for package libcontainers-common
|
|
|
|
#
|
2022-11-25 13:09:20 +01:00
|
|
|
# Copyright (c) 2022 SUSE LLC
|
2018-02-15 13:23:04 +01:00
|
|
|
#
|
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
2018-09-05 13:46:19 +02:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2018-02-15 13:23:04 +01:00
|
|
|
#
|
|
|
|
|
2020-10-18 16:18:12 +02:00
|
|
|
|
2020-07-30 09:58:12 +02:00
|
|
|
# commonver - version from containers/common
|
2022-11-25 13:09:20 +01:00
|
|
|
%define commonver 0.50.1
|
2019-01-30 11:43:13 +01:00
|
|
|
# storagever - version from containers/storage
|
2022-11-25 13:09:20 +01:00
|
|
|
%define storagever 1.44.0
|
2019-01-30 11:43:13 +01:00
|
|
|
# imagever - version from containers/image
|
2022-11-25 13:09:20 +01:00
|
|
|
%define imagever 5.23.1
|
2018-02-15 13:23:04 +01:00
|
|
|
Name: libcontainers-common
|
2022-11-25 13:09:20 +01:00
|
|
|
Version: 20221122
|
2018-02-15 13:23:04 +01:00
|
|
|
Release: 0
|
|
|
|
Summary: Configuration files common to github.com/containers
|
2020-10-18 16:18:12 +02:00
|
|
|
License: Apache-2.0 AND GPL-3.0-or-later
|
2018-02-15 13:23:04 +01:00
|
|
|
Group: System/Management
|
2018-09-05 13:46:19 +02:00
|
|
|
URL: https://github.com/containers
|
2019-01-30 11:43:13 +01:00
|
|
|
Source0: image-%{imagever}.tar.xz
|
|
|
|
Source1: storage-%{storagever}.tar.xz
|
2018-09-05 13:46:19 +02:00
|
|
|
Source2: LICENSE
|
|
|
|
Source3: policy.json
|
2019-02-04 15:33:02 +01:00
|
|
|
Source4: storage.conf
|
2018-09-05 13:46:19 +02:00
|
|
|
Source5: mounts.conf
|
|
|
|
Source6: registries.conf
|
2022-11-25 13:09:20 +01:00
|
|
|
Source7: default.yaml
|
|
|
|
Source8: common-%{commonver}.tar.xz
|
|
|
|
Source9: containers.conf
|
|
|
|
Source10: %{name}.rpmlintrc
|
|
|
|
Source11: shortnames.conf
|
|
|
|
Source12: container-storage-driver.sh
|
2018-09-05 13:46:19 +02:00
|
|
|
BuildRequires: go-go-md2man
|
2022-11-25 13:09:20 +01:00
|
|
|
Requires(post): %{_bindir}/grep
|
|
|
|
Requires(post): %{_bindir}/sed
|
2022-11-28 13:26:36 +01:00
|
|
|
Requires: util-linux-systemd
|
2022-11-25 13:09:20 +01:00
|
|
|
Requires(post): util-linux-systemd
|
2021-07-02 13:26:44 +02:00
|
|
|
Provides: libcontainers-image = %{version}
|
|
|
|
Provides: libcontainers-storage = %{version}
|
|
|
|
Obsoletes: libcontainers-image < %{version}
|
|
|
|
Obsoletes: libcontainers-storage < %{version}
|
2018-09-05 13:46:19 +02:00
|
|
|
BuildArch: noarch
|
2018-02-15 13:23:04 +01:00
|
|
|
|
|
|
|
%description
|
2018-09-05 13:46:19 +02:00
|
|
|
Configuration files and manpages shared by tools that are based on the
|
|
|
|
github.com/containers libraries, such as Buildah, CRI-O, Podman and Skopeo.
|
2018-02-15 13:23:04 +01:00
|
|
|
|
|
|
|
%prep
|
2022-11-25 13:09:20 +01:00
|
|
|
%setup -q -Tcq -b0 -b1 -b8
|
2018-09-05 13:46:19 +02:00
|
|
|
# copy the LICENSE file in the build root
|
|
|
|
cp %{SOURCE2} .
|
2018-02-15 13:23:04 +01:00
|
|
|
|
|
|
|
%build
|
2018-09-05 13:46:19 +02:00
|
|
|
cd ..
|
|
|
|
pwd
|
|
|
|
# compile containers/image manpages
|
2019-01-30 11:43:13 +01:00
|
|
|
cd image-%{imagever}
|
2018-09-05 13:46:19 +02:00
|
|
|
for md in docs/*.md
|
|
|
|
do
|
|
|
|
go-md2man -in $md -out $md
|
|
|
|
done
|
|
|
|
rename '.5.md' '.5' docs/*
|
|
|
|
rename '.md' '.1' docs/*
|
|
|
|
cd ..
|
|
|
|
# compile containers/storage manpages
|
2019-01-30 11:43:13 +01:00
|
|
|
cd storage-%{storagever}
|
2019-07-22 12:17:10 +02:00
|
|
|
for md in docs/*.md
|
2018-09-05 13:46:19 +02:00
|
|
|
do
|
|
|
|
go-md2man -in $md -out $md
|
|
|
|
done
|
|
|
|
rename '.5.md' '.5' docs/*
|
2019-07-22 12:17:10 +02:00
|
|
|
rename '.md' '.1' docs/*
|
2018-09-05 13:46:19 +02:00
|
|
|
cd ..
|
2022-11-25 13:09:20 +01:00
|
|
|
# compile subset of containers/common manpages
|
|
|
|
cd common-%{commonver}
|
2018-11-26 10:12:24 +01:00
|
|
|
go-md2man -in pkg/hooks/docs/oci-hooks.5.md -out pkg/hooks/docs/oci-hooks.5
|
|
|
|
cd ..
|
2018-02-15 13:23:04 +01:00
|
|
|
|
2021-03-29 18:21:19 +02:00
|
|
|
%if 0%{?is_opensuse}
|
|
|
|
# no default mounts
|
|
|
|
%else
|
|
|
|
cat >>%{SOURCE5} <<EOL
|
2022-11-25 13:09:20 +01:00
|
|
|
%{_sysconfdir}/SUSEConnect:%{_sysconfdir}/SUSEConnect
|
|
|
|
%{_sysconfdir}/zypp/credentials.d/SCCcredentials:%{_sysconfdir}/zypp/credentials.d/SCCcredentials
|
2021-03-29 18:21:19 +02:00
|
|
|
EOL
|
|
|
|
%endif
|
|
|
|
|
2020-07-30 09:58:12 +02:00
|
|
|
cd common-%{commonver}
|
2022-11-25 13:09:20 +01:00
|
|
|
%make_build docs
|
2020-07-30 09:58:12 +02:00
|
|
|
cd ..
|
|
|
|
|
2018-02-15 13:23:04 +01:00
|
|
|
%install
|
2018-09-05 13:46:19 +02:00
|
|
|
cd ..
|
2018-02-15 13:23:04 +01:00
|
|
|
install -d -m 0755 %{buildroot}/%{_sysconfdir}/containers
|
2018-04-17 11:09:20 +02:00
|
|
|
install -d -m 0755 %{buildroot}/%{_sysconfdir}/containers/oci/hooks.d
|
2018-09-05 13:46:19 +02:00
|
|
|
install -d -m 0755 %{buildroot}/%{_datadir}/containers/oci/hooks.d
|
|
|
|
install -d -m 0755 %{buildroot}/%{_sysconfdir}/containers/registries.d
|
2022-08-05 14:52:03 +02:00
|
|
|
install -d -m 0755 %{buildroot}/%{_sysconfdir}/containers/registries.conf.d
|
2018-09-05 13:46:19 +02:00
|
|
|
|
|
|
|
install -D -m 0644 %{SOURCE3} %{buildroot}/%{_sysconfdir}/containers/policy.json
|
2019-02-04 15:33:02 +01:00
|
|
|
install -D -m 0644 %{SOURCE4} %{buildroot}/%{_sysconfdir}/containers/storage.conf
|
2018-09-05 13:46:19 +02:00
|
|
|
install -D -m 0644 %{SOURCE5} %{buildroot}/%{_datadir}/containers/mounts.conf
|
|
|
|
install -D -m 0644 %{SOURCE5} %{buildroot}/%{_sysconfdir}/containers/mounts.conf
|
|
|
|
install -D -m 0644 %{SOURCE6} %{buildroot}/%{_sysconfdir}/containers/registries.conf
|
2022-11-25 13:09:20 +01:00
|
|
|
install -D -m 0644 %{SOURCE11} %{buildroot}/%{_sysconfdir}/containers/registries.conf.d/000-shortnames.conf
|
|
|
|
%if 0%{?suse_version} == 1500
|
|
|
|
# /usr/etc/ does not work on Leap & SLE
|
|
|
|
install -D -m 0644 %{SOURCE12} %{buildroot}%{_sysconfdir}/profile.d/libcontainers-common-storage.sh
|
|
|
|
%else
|
|
|
|
install -D -m 0644 %{SOURCE12} %{buildroot}%{_prefix}%{_sysconfdir}/profile.d/libcontainers-common-storage.sh
|
|
|
|
%endif
|
|
|
|
install -D -m 0644 %{SOURCE7} %{buildroot}/%{_sysconfdir}/containers/registries.d/default.yaml
|
|
|
|
sed -e 's-@LIBEXECDIR@-%{_libexecdir}-g' -i %{SOURCE9}
|
|
|
|
install -D -m 0644 %{SOURCE9} %{buildroot}/%{_datadir}/containers/containers.conf
|
2021-01-19 15:59:37 +01:00
|
|
|
install -D -m 0644 common-%{commonver}/pkg/seccomp/seccomp.json %{buildroot}/%{_datadir}/containers/seccomp.json
|
|
|
|
install -D -m 0644 common-%{commonver}/pkg/seccomp/seccomp.json %{buildroot}/%{_sysconfdir}/containers/seccomp.json
|
2018-09-05 13:46:19 +02:00
|
|
|
|
|
|
|
install -d %{buildroot}/%{_mandir}/man1
|
|
|
|
install -d %{buildroot}/%{_mandir}/man5
|
2019-01-30 11:43:13 +01:00
|
|
|
install -D -m 0644 image-%{imagever}/docs/*.1 %{buildroot}/%{_mandir}/man1/
|
2019-07-22 12:17:10 +02:00
|
|
|
install -D -m 0644 image-%{imagever}/docs/*.5 %{buildroot}/%{_mandir}/man5/
|
|
|
|
install -D -m 0644 storage-%{storagever}/docs/*.1 %{buildroot}/%{_mandir}/man1/
|
2019-01-30 11:43:13 +01:00
|
|
|
install -D -m 0644 storage-%{storagever}/docs/*.5 %{buildroot}/%{_mandir}/man5/
|
2022-11-25 13:09:20 +01:00
|
|
|
install -D -m 0644 common-%{commonver}/pkg/hooks/docs/oci-hooks.5 %{buildroot}/%{_mandir}/man5/
|
2021-09-30 23:43:00 +02:00
|
|
|
install -D -m 0644 common-%{commonver}/docs/containers-mounts.conf.5 %{buildroot}/%{_mandir}/man5/
|
2020-07-30 09:58:12 +02:00
|
|
|
install -D -m 0644 common-%{commonver}/docs/containers.conf.5 %{buildroot}/%{_mandir}/man5/
|
2019-01-30 11:43:13 +01:00
|
|
|
|
|
|
|
%post
|
2021-09-21 21:12:27 +02:00
|
|
|
# Comment out ostree_repo if it's blank [boo#1189893]
|
2022-11-25 13:09:20 +01:00
|
|
|
sed -i 's/ostree_repo = ""/\#ostree_repo = ""/g' %{_sysconfdir}/containers/storage.conf
|
2018-02-15 13:23:04 +01:00
|
|
|
|
|
|
|
%files
|
|
|
|
%dir %{_sysconfdir}/containers
|
2018-04-17 11:09:20 +02:00
|
|
|
%dir %{_sysconfdir}/containers/oci
|
|
|
|
%dir %{_sysconfdir}/containers/oci/hooks.d
|
2018-09-05 13:46:19 +02:00
|
|
|
%dir %{_sysconfdir}/containers/registries.d
|
2022-08-05 14:52:03 +02:00
|
|
|
%dir %{_sysconfdir}/containers/registries.conf.d
|
2018-09-05 13:46:19 +02:00
|
|
|
%dir %{_datadir}/containers
|
|
|
|
%dir %{_datadir}/containers/oci
|
|
|
|
%dir %{_datadir}/containers/oci/hooks.d
|
|
|
|
|
2018-03-24 16:05:27 +01:00
|
|
|
%config(noreplace) %{_sysconfdir}/containers/policy.json
|
2018-09-05 13:46:19 +02:00
|
|
|
%config(noreplace) %{_sysconfdir}/containers/storage.conf
|
|
|
|
%config(noreplace) %{_sysconfdir}/containers/mounts.conf
|
2022-11-25 13:09:20 +01:00
|
|
|
%if 0%{?suse_version} == 1500
|
|
|
|
%{_sysconfdir}/profile.d/libcontainers-common-storage.sh
|
|
|
|
%else
|
|
|
|
%{_prefix}%{_sysconfdir}/profile.d/libcontainers-common-storage.sh
|
|
|
|
%endif
|
2018-09-05 13:46:19 +02:00
|
|
|
%{_datadir}/containers/mounts.conf
|
|
|
|
%config(noreplace) %{_sysconfdir}/containers/registries.conf
|
|
|
|
%config(noreplace) %{_sysconfdir}/containers/seccomp.json
|
2019-08-10 23:44:05 +02:00
|
|
|
%config(noreplace) %{_sysconfdir}/containers/registries.d/default.yaml
|
2022-08-05 14:52:03 +02:00
|
|
|
%config(noreplace) %{_sysconfdir}/containers/registries.conf.d/000-shortnames.conf
|
2018-09-05 13:46:19 +02:00
|
|
|
%{_datadir}/containers/seccomp.json
|
2020-07-30 09:58:12 +02:00
|
|
|
%{_datadir}/containers/containers.conf
|
2018-09-05 13:46:19 +02:00
|
|
|
|
|
|
|
%{_mandir}/man1/*.1%{?ext_man}
|
|
|
|
%{_mandir}/man5/*.5%{?ext_man}
|
|
|
|
%license LICENSE
|
2018-02-15 13:23:04 +01:00
|
|
|
|
2019-02-04 15:33:02 +01:00
|
|
|
%changelog
|