2021-01-12 16:15:47 +00:00
|
|
|
# Below definitions are used to deliver config files from a particular branch
|
|
|
|
# of c/image, c/common, c/storage vendored in all of Buildah, Podman and Skopeo.
|
2020-12-14 10:09:08 +00:00
|
|
|
# These vendored components must have the same version. If it is not the case,
|
|
|
|
# pick the oldest version on c/image, c/common, c/storage vendored in
|
2021-01-12 16:15:47 +00:00
|
|
|
# Buildah/Podman/Skopeo.
|
2021-06-10 12:54:54 +00:00
|
|
|
%global image_branch main
|
2024-01-05 10:42:55 +00:00
|
|
|
%global common_branch v%{version}
|
2021-06-10 12:50:45 +00:00
|
|
|
%global storage_branch main
|
|
|
|
%global shortnames_branch main
|
2021-01-12 15:24:12 +00:00
|
|
|
|
|
|
|
%global github_containers https://raw.githubusercontent.com/containers
|
2020-12-14 10:09:08 +00:00
|
|
|
|
2024-01-05 10:42:55 +00:00
|
|
|
Epoch: 5
|
2020-12-14 10:09:08 +00:00
|
|
|
Name: containers-common
|
2024-01-05 10:42:55 +00:00
|
|
|
Version: 0.57.1
|
2022-01-24 20:29:22 +00:00
|
|
|
Release: %autorelease
|
2023-02-14 12:47:26 +00:00
|
|
|
License: Apache-2.0
|
2020-12-14 10:09:08 +00:00
|
|
|
BuildArch: noarch
|
2024-01-29 01:02:41 +00:00
|
|
|
# for BuildRequires: go-md2man
|
|
|
|
ExclusiveArch: %{golang_arches} noarch
|
2022-05-18 17:56:21 +00:00
|
|
|
Summary: Common configuration and documentation for containers
|
2020-12-14 10:09:08 +00:00
|
|
|
BuildRequires: go-md2man
|
2021-03-19 14:19:00 +00:00
|
|
|
Provides: skopeo-containers = %{epoch}:%{version}-%{release}
|
2022-12-15 20:02:49 +00:00
|
|
|
Recommends: (container-selinux >= 2:2.162.1 if selinux-policy)
|
2022-10-06 19:15:06 +00:00
|
|
|
Recommends: fuse-overlayfs
|
|
|
|
Requires: (fuse-overlayfs if fedora-release-identity-server)
|
|
|
|
# SourceN files fetched from upstream
|
|
|
|
# GPG key and registry configs taken from RH
|
2021-01-28 16:04:13 +00:00
|
|
|
Source1: %{github_containers}/common/%{common_branch}/docs/containers.conf.5.md
|
|
|
|
Source2: %{github_containers}/common/%{common_branch}/pkg/config/containers.conf
|
|
|
|
Source3: %{github_containers}/common/%{common_branch}/pkg/seccomp/seccomp.json
|
|
|
|
Source4: %{github_containers}/common/%{common_branch}/pkg/subscriptions/mounts.conf
|
|
|
|
Source5: %{github_containers}/image/%{image_branch}/docs/containers-auth.json.5.md
|
|
|
|
Source6: %{github_containers}/image/%{image_branch}/docs/containers-certs.d.5.md
|
2021-01-28 14:55:19 +00:00
|
|
|
Source7: %{github_containers}/image/%{image_branch}/docs/containers-policy.json.5.md
|
2021-01-28 16:04:13 +00:00
|
|
|
Source8: %{github_containers}/image/%{image_branch}/docs/containers-registries.conf.5.md
|
|
|
|
Source9: %{github_containers}/image/%{image_branch}/docs/containers-registries.conf.d.5.md
|
|
|
|
Source10: %{github_containers}/image/%{image_branch}/docs/containers-registries.d.5.md
|
|
|
|
Source11: %{github_containers}/image/%{image_branch}/docs/containers-signature.5.md
|
|
|
|
Source12: %{github_containers}/image/%{image_branch}/docs/containers-transports.5.md
|
|
|
|
Source13: %{github_containers}/image/%{image_branch}/registries.conf
|
2021-06-10 12:50:45 +00:00
|
|
|
Source14: %{github_containers}/common/%{common_branch}/docs/containers-mounts.conf.5.md
|
2021-01-28 14:55:19 +00:00
|
|
|
Source15: %{github_containers}/shortnames/%{shortnames_branch}/shortnames.conf
|
2023-12-10 13:34:23 +00:00
|
|
|
Source16: %{github_containers}/image/%{image_branch}/default.yaml
|
|
|
|
Source17: %{github_containers}/image/%{image_branch}/default-policy.json
|
2021-01-28 16:04:13 +00:00
|
|
|
Source18: %{github_containers}/storage/%{storage_branch}/docs/containers-storage.conf.5.md
|
|
|
|
Source19: %{github_containers}/storage/%{storage_branch}/storage.conf
|
2021-07-26 17:45:21 +00:00
|
|
|
Source20: RPM-GPG-KEY-redhat-release
|
|
|
|
Source21: registry.access.redhat.com.yaml
|
|
|
|
Source22: registry.redhat.io.yaml
|
2022-03-23 14:48:56 +00:00
|
|
|
Source23: %{github_containers}/common/%{common_branch}/docs/Containerfile.5.md
|
|
|
|
Source24: %{github_containers}/common/%{common_branch}/docs/containerignore.5.md
|
|
|
|
Source25: %{github_containers}/common/%{common_branch}/docs/links/.containerignore.5
|
|
|
|
|
2020-12-14 10:09:08 +00:00
|
|
|
%description
|
|
|
|
This package contains common configuration files and documentation for container
|
2021-01-12 15:24:12 +00:00
|
|
|
tools ecosystem, such as Podman, Buildah and Skopeo.
|
2020-12-14 10:09:08 +00:00
|
|
|
|
|
|
|
It is required because the most of configuration files and docs come from projects
|
2021-01-12 15:24:12 +00:00
|
|
|
which are vendored into Podman, Buildah, Skopeo, etc. but they are not packaged
|
2020-12-14 10:09:08 +00:00
|
|
|
separately.
|
|
|
|
|
2022-10-06 19:15:06 +00:00
|
|
|
%package extra
|
|
|
|
Summary: Extra dependencies for Podman and Buildah
|
|
|
|
Requires: %{name} = %{epoch}:%{version}-%{release}
|
|
|
|
Requires: container-network-stack
|
|
|
|
Requires: oci-runtime
|
|
|
|
Recommends: crun
|
|
|
|
Requires: (crun if fedora-release-identity-server)
|
2023-04-12 12:18:10 +00:00
|
|
|
Recommends: netavark >= 1.6.0-1
|
|
|
|
Requires: (netavark >= 1.6.0-1 if fedora-release-identity-server)
|
2022-10-06 19:15:06 +00:00
|
|
|
Recommends: slirp4netns
|
|
|
|
Requires: (slirp4netns if fedora-release-identity-server)
|
2023-02-21 14:38:23 +00:00
|
|
|
Recommends: passt
|
|
|
|
Requires: (passt if fedora-release-identity-server)
|
2022-10-06 19:35:19 +00:00
|
|
|
Requires: iptables
|
|
|
|
Requires: nftables
|
2022-10-06 19:39:11 +00:00
|
|
|
Suggests: containernetworking-plugins >= 0.9.1-1
|
2023-01-31 12:17:38 +00:00
|
|
|
Recommends: qemu-user-static
|
|
|
|
Requires: (qemu-user-static-aarch64 if fedora-release-identity-server)
|
|
|
|
Requires: (qemu-user-static-arm if fedora-release-identity-server)
|
|
|
|
Requires: (qemu-user-static-x86 if fedora-release-identity-server)
|
2022-10-06 19:15:06 +00:00
|
|
|
|
|
|
|
%description extra
|
|
|
|
This subpackage will handle dependencies common to Podman and Buildah which are
|
|
|
|
not required by Skopeo.
|
|
|
|
|
2020-12-14 10:09:08 +00:00
|
|
|
%prep
|
2021-04-12 12:59:58 +00:00
|
|
|
cp %{SOURCE1} .
|
|
|
|
cp %{SOURCE2} .
|
|
|
|
cp %{SOURCE3} .
|
|
|
|
cp %{SOURCE4} .
|
|
|
|
cp %{SOURCE5} .
|
|
|
|
cp %{SOURCE6} .
|
|
|
|
cp %{SOURCE7} .
|
|
|
|
cp %{SOURCE8} .
|
|
|
|
cp %{SOURCE9} .
|
|
|
|
cp %{SOURCE10} .
|
|
|
|
cp %{SOURCE11} .
|
|
|
|
cp %{SOURCE12} .
|
|
|
|
cp %{SOURCE13} .
|
|
|
|
cp %{SOURCE14} .
|
2022-01-28 17:33:16 +00:00
|
|
|
cp %{SOURCE15} 000-shortnames.conf
|
2021-04-12 12:59:58 +00:00
|
|
|
cp %{SOURCE16} .
|
2022-01-28 17:33:16 +00:00
|
|
|
cp %{SOURCE17} policy.json
|
2021-04-12 12:59:58 +00:00
|
|
|
cp %{SOURCE18} .
|
|
|
|
cp %{SOURCE19} .
|
2021-07-26 17:45:21 +00:00
|
|
|
cp %{SOURCE20} .
|
|
|
|
cp %{SOURCE21} .
|
|
|
|
cp %{SOURCE22} .
|
2021-09-26 13:18:58 +00:00
|
|
|
cp %{SOURCE23} .
|
2021-10-01 19:17:19 +00:00
|
|
|
cp %{SOURCE24} .
|
2021-10-05 21:07:11 +00:00
|
|
|
cp %{SOURCE25} .
|
2020-12-14 10:09:08 +00:00
|
|
|
|
2022-03-15 15:07:27 +00:00
|
|
|
%if 0%{?rhel} <= 8
|
|
|
|
sed -i 's/log_driver = "journald"/#log_driver = "journald"/' containers.conf
|
|
|
|
%endif
|
|
|
|
|
2020-12-14 10:09:08 +00:00
|
|
|
%build
|
2022-01-28 19:04:09 +00:00
|
|
|
mkdir -p man5
|
2022-01-28 17:33:16 +00:00
|
|
|
for FILE in $(ls *.5.md); do
|
|
|
|
go-md2man -in $FILE -out man5/$(basename $FILE .md)
|
|
|
|
done
|
|
|
|
|
|
|
|
cp man5/containerignore.5 man5/.containerignore.5
|
2020-12-14 10:09:08 +00:00
|
|
|
|
|
|
|
%install
|
2021-01-13 01:22:23 +00:00
|
|
|
# install config and policy files for registries
|
2023-01-04 10:26:29 +00:00
|
|
|
install -dp %{buildroot}%{_sysconfdir}/containers/{certs.d,oci/hooks.d,systemd}
|
2020-12-14 10:09:08 +00:00
|
|
|
install -dp %{buildroot}%{_sharedstatedir}/containers/sigstore
|
2023-01-04 10:26:29 +00:00
|
|
|
install -dp %{buildroot}%{_datadir}/containers/systemd
|
2024-01-29 17:32:34 +00:00
|
|
|
install -dp -m 700 %{buildroot}%{_prefix}/lib/containers/storage/overlay-images
|
|
|
|
touch %{buildroot}%{_prefix}/lib/containers/storage/overlay-images/images.lock
|
|
|
|
install -dp -m 700 %{buildroot}%{_prefix}/lib/containers/storage/overlay-layers
|
|
|
|
touch %{buildroot}%{_prefix}/lib/containers/storage/overlay-layers/layers.lock
|
|
|
|
|
2022-01-28 17:33:16 +00:00
|
|
|
install -Dp -m0644 default.yaml -t %{buildroot}%{_sysconfdir}/containers/registries.d
|
|
|
|
install -Dp -m0644 storage.conf -t %{buildroot}%{_datadir}/containers
|
|
|
|
install -Dp -m0644 registries.conf -t %{buildroot}%{_sysconfdir}/containers
|
|
|
|
install -Dp -m0644 000-shortnames.conf -t %{buildroot}%{_sysconfdir}/containers/registries.conf.d
|
|
|
|
install -Dp -m0644 policy.json -t %{buildroot}%{_sysconfdir}/containers
|
2022-11-02 11:46:08 +00:00
|
|
|
# RPM-GPG-KEY-redhat-release already exists on rhel envs, install only on
|
|
|
|
# fedora and centos
|
|
|
|
%if 0%{?fedora} || 0%{?centos}
|
2022-01-28 17:33:16 +00:00
|
|
|
install -Dp -m0644 RPM-GPG-KEY-redhat-release -t %{buildroot}%{_sysconfdir}/pki/rpm-gpg
|
2022-11-02 11:46:08 +00:00
|
|
|
%endif
|
2022-01-28 17:33:16 +00:00
|
|
|
install -Dp -m0644 registry.access.redhat.com.yaml -t %{buildroot}%{_sysconfdir}/containers/registries.d
|
|
|
|
install -Dp -m0644 registry.redhat.io.yaml -t %{buildroot}%{_sysconfdir}/containers/registries.d
|
2020-12-14 10:09:08 +00:00
|
|
|
|
2022-06-13 15:28:16 +00:00
|
|
|
|
2021-01-13 01:22:23 +00:00
|
|
|
# install manpages
|
2022-01-28 17:33:16 +00:00
|
|
|
for FILE in $(ls -a man5 | grep 5); do
|
|
|
|
install -Dp -m0644 man5/$FILE -t %{buildroot}%{_mandir}/man5
|
|
|
|
done
|
2021-01-13 01:22:23 +00:00
|
|
|
|
|
|
|
# install config files for mounts, containers and seccomp
|
2021-04-12 12:59:58 +00:00
|
|
|
install -m0644 mounts.conf %{buildroot}%{_datadir}/containers/mounts.conf
|
|
|
|
install -m0644 seccomp.json %{buildroot}%{_datadir}/containers/seccomp.json
|
|
|
|
install -m0644 containers.conf %{buildroot}%{_datadir}/containers/containers.conf
|
2020-12-14 10:09:08 +00:00
|
|
|
|
|
|
|
# install secrets patch directory
|
|
|
|
install -d -p -m 755 %{buildroot}/%{_datadir}/rhel/secrets
|
|
|
|
# rhbz#1110876 - update symlinks for subscription management
|
2022-12-15 20:02:49 +00:00
|
|
|
ln -s ../../../..%{_sysconfdir}/pki/entitlement %{buildroot}%{_datadir}/rhel/secrets/etc-pki-entitlement
|
|
|
|
ln -s ../../../..%{_sysconfdir}/rhsm %{buildroot}%{_datadir}/rhel/secrets/rhsm
|
|
|
|
ln -s ../../../..%{_sysconfdir}/yum.repos.d/redhat.repo %{buildroot}%{_datadir}/rhel/secrets/redhat.repo
|
2020-12-14 10:09:08 +00:00
|
|
|
|
|
|
|
%files
|
|
|
|
%dir %{_sysconfdir}/containers
|
|
|
|
%dir %{_sysconfdir}/containers/certs.d
|
|
|
|
%dir %{_sysconfdir}/containers/oci
|
|
|
|
%dir %{_sysconfdir}/containers/oci/hooks.d
|
2021-01-28 14:55:19 +00:00
|
|
|
%dir %{_sysconfdir}/containers/registries.conf.d
|
|
|
|
%dir %{_sysconfdir}/containers/registries.d
|
2023-01-04 10:26:29 +00:00
|
|
|
%dir %{_sysconfdir}/containers/systemd
|
2023-12-10 13:34:23 +00:00
|
|
|
%dir %{_prefix}/lib/containers/storage
|
2024-01-29 17:32:34 +00:00
|
|
|
%dir %{_prefix}/lib/containers/storage/overlay-images
|
|
|
|
%dir %{_prefix}/lib/containers/storage/overlay-layers
|
|
|
|
%{_prefix}/lib/containers/storage/overlay-images/images.lock
|
|
|
|
%{_prefix}/lib/containers/storage/overlay-layers/layers.lock
|
|
|
|
|
2020-12-14 10:09:08 +00:00
|
|
|
%config(noreplace) %{_sysconfdir}/containers/policy.json
|
|
|
|
%config(noreplace) %{_sysconfdir}/containers/registries.conf
|
2021-02-18 15:19:40 +00:00
|
|
|
%config(noreplace) %{_sysconfdir}/containers/registries.conf.d/000-shortnames.conf
|
2022-11-02 11:46:08 +00:00
|
|
|
%if 0%{?fedora} || 0%{?centos}
|
2021-07-26 17:45:21 +00:00
|
|
|
%{_sysconfdir}/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
|
2022-11-02 11:46:08 +00:00
|
|
|
%endif
|
2021-01-28 14:55:19 +00:00
|
|
|
%config(noreplace) %{_sysconfdir}/containers/registries.d/default.yaml
|
2021-07-26 17:45:21 +00:00
|
|
|
%{_sysconfdir}/containers/registries.d/registry.redhat.io.yaml
|
|
|
|
%{_sysconfdir}/containers/registries.d/registry.access.redhat.com.yaml
|
2021-11-29 20:30:01 +00:00
|
|
|
%ghost %{_sysconfdir}/containers/storage.conf
|
2020-12-14 10:09:08 +00:00
|
|
|
%ghost %{_sysconfdir}/containers/containers.conf
|
|
|
|
%dir %{_sharedstatedir}/containers/sigstore
|
2022-02-01 20:45:14 +00:00
|
|
|
%{_mandir}/man5/Containerfile.5.gz
|
|
|
|
%{_mandir}/man5/containerignore.5.gz
|
|
|
|
%{_mandir}/man5/.containerignore.5.gz
|
|
|
|
%{_mandir}/man5/containers*.5.gz
|
2020-12-14 10:09:08 +00:00
|
|
|
%dir %{_datadir}/containers
|
2023-01-04 10:26:29 +00:00
|
|
|
%dir %{_datadir}/containers/systemd
|
2021-11-29 20:30:01 +00:00
|
|
|
%{_datadir}/containers/storage.conf
|
2021-01-28 14:55:19 +00:00
|
|
|
%{_datadir}/containers/containers.conf
|
2020-12-14 10:09:08 +00:00
|
|
|
%{_datadir}/containers/mounts.conf
|
|
|
|
%{_datadir}/containers/seccomp.json
|
|
|
|
%dir %{_datadir}/rhel/secrets
|
|
|
|
%{_datadir}/rhel/secrets/*
|
|
|
|
|
2022-10-06 19:15:06 +00:00
|
|
|
%files extra
|
|
|
|
|
2020-12-14 10:09:08 +00:00
|
|
|
%changelog
|
2022-01-24 20:29:22 +00:00
|
|
|
%autochangelog
|