2021-01-12 16:15:47 +00:00
|
|
|
# Below definitions are used to deliver config files from a particular branch
|
2024-07-29 08:52:48 +00:00
|
|
|
# of c/image, c/storage and c/shortnames 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,
|
2024-07-29 08:52:48 +00:00
|
|
|
# pick the oldest version on c/image, c/storage and c/shortnames vendored in
|
2021-01-12 16:15:47 +00:00
|
|
|
# Buildah/Podman/Skopeo.
|
2024-07-29 08:52:48 +00:00
|
|
|
|
|
|
|
# Packit will automatically update the image and storage versions on Fedora and
|
|
|
|
# CentOS Stream dist-git PRs.
|
2024-08-26 12:31:42 +00:00
|
|
|
%global image_branch v5.32.2
|
|
|
|
%global storage_branch v1.55.0
|
2021-06-10 12:50:45 +00:00
|
|
|
%global shortnames_branch main
|
2021-01-12 15:24:12 +00:00
|
|
|
|
2024-07-29 08:52:48 +00:00
|
|
|
%global project containers
|
|
|
|
%global repo common
|
|
|
|
|
|
|
|
%global raw_github_url https://raw.githubusercontent.com/%{project}
|
|
|
|
|
|
|
|
%if %{defined copr_username}
|
|
|
|
%define copr_build 1
|
|
|
|
%endif
|
|
|
|
|
|
|
|
# See https://github.com/containers/netavark/blob/main/rpm/netavark.spec
|
|
|
|
# for netavark epoch
|
|
|
|
%if %{defined copr_build}
|
|
|
|
%define netavark_epoch 102
|
|
|
|
%else
|
|
|
|
%define netavark_epoch 2
|
|
|
|
%endif
|
2020-12-14 10:09:08 +00:00
|
|
|
|
|
|
|
Name: containers-common
|
2024-07-29 08:52:48 +00:00
|
|
|
%if %{defined copr_build}
|
|
|
|
Epoch: 102
|
|
|
|
%else
|
2024-08-27 08:46:44 +00:00
|
|
|
Epoch: 5
|
2024-07-29 08:52:48 +00:00
|
|
|
%endif
|
|
|
|
# DO NOT TOUCH the Version string!
|
|
|
|
# The TRUE source of this specfile is:
|
|
|
|
# https://github.com/containers/common/blob/main/rpm/containers-common.spec
|
|
|
|
# If that's what you're reading, Version must be 0, and will be updated by Packit for
|
|
|
|
# copr and koji builds.
|
|
|
|
# If you're reading this on dist-git, the version is automatically filled in by Packit.
|
2024-08-26 12:31:42 +00:00
|
|
|
Version: 0.60.2
|
2024-09-05 09:39:49 +00:00
|
|
|
Release: 4%{?dist}
|
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
|
2024-07-29 08:52:48 +00:00
|
|
|
BuildRequires: git-core
|
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}
|
2024-07-29 08:52:48 +00:00
|
|
|
Requires: (container-selinux >= 2:2.162.1 if selinux-policy)
|
2024-08-28 08:21:15 +00:00
|
|
|
Requires: netavark
|
|
|
|
Obsoletes: containernetworking-plugins < 2
|
2024-07-29 08:52:48 +00:00
|
|
|
Suggests: fuse-overlayfs
|
|
|
|
URL: https://github.com/%{project}/%{repo}
|
|
|
|
Source0: %{url}/archive/v%{version_no_tilde}.tar.gz
|
|
|
|
Source1: %{raw_github_url}/image/%{image_branch}/docs/containers-auth.json.5.md
|
|
|
|
Source2: %{raw_github_url}/image/%{image_branch}/docs/containers-certs.d.5.md
|
|
|
|
Source3: %{raw_github_url}/image/%{image_branch}/docs/containers-policy.json.5.md
|
|
|
|
Source4: %{raw_github_url}/image/%{image_branch}/docs/containers-registries.conf.5.md
|
|
|
|
Source5: %{raw_github_url}/image/%{image_branch}/docs/containers-registries.conf.d.5.md
|
|
|
|
Source6: %{raw_github_url}/image/%{image_branch}/docs/containers-registries.d.5.md
|
|
|
|
Source7: %{raw_github_url}/image/%{image_branch}/docs/containers-signature.5.md
|
|
|
|
Source8: %{raw_github_url}/image/%{image_branch}/docs/containers-transports.5.md
|
|
|
|
Source9: %{raw_github_url}/storage/%{storage_branch}/docs/containers-storage.conf.5.md
|
|
|
|
Source10: %{raw_github_url}/shortnames/%{shortnames_branch}/shortnames.conf
|
|
|
|
Source11: %{raw_github_url}/image/%{image_branch}/default.yaml
|
|
|
|
Source12: default-policy.json
|
|
|
|
Source13: %{raw_github_url}/image/%{image_branch}/registries.conf
|
|
|
|
Source14: %{raw_github_url}/storage/%{storage_branch}/storage.conf
|
|
|
|
# Fetch RPM-GPG-KEY-redhat-release from the authoritative source instead of storing
|
|
|
|
# a copy in repo or dist-git. Depending on distribution-gpg-keys rpm is also
|
|
|
|
# not an option because that package doesn't exist on CentOS Stream.
|
|
|
|
Source15: https://access.redhat.com/security/data/fd431d51.txt
|
2022-03-23 14:48:56 +00:00
|
|
|
|
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
|
2024-07-29 08:52:48 +00:00
|
|
|
Requires: nftables
|
|
|
|
Requires: passt
|
|
|
|
%if %{defined fedora}
|
|
|
|
Requires: iptables
|
|
|
|
Conflicts: podman < 5:5.0.0~rc4-1
|
|
|
|
Recommends: composefs
|
2022-10-06 19:15:06 +00:00
|
|
|
Recommends: crun
|
|
|
|
Requires: (crun if fedora-release-identity-server)
|
2024-07-29 08:52:48 +00:00
|
|
|
Requires: netavark >= %{netavark_epoch}:1.10.3-1
|
|
|
|
Suggests: slirp4netns
|
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)
|
2024-07-29 08:52:48 +00:00
|
|
|
%endif
|
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
|
2024-07-29 08:52:48 +00:00
|
|
|
%autosetup -Sgit -n %{repo}-%{version_no_tilde}
|
|
|
|
|
|
|
|
# Copy manpages to docs subdir in builddir to build before installing.
|
|
|
|
cp %{SOURCE1} docs/.
|
|
|
|
cp %{SOURCE2} docs/.
|
|
|
|
cp %{SOURCE3} docs/.
|
|
|
|
cp %{SOURCE4} docs/.
|
|
|
|
cp %{SOURCE5} docs/.
|
|
|
|
cp %{SOURCE6} docs/.
|
|
|
|
cp %{SOURCE7} docs/.
|
|
|
|
cp %{SOURCE8} docs/.
|
|
|
|
cp %{SOURCE9} docs/.
|
|
|
|
|
|
|
|
# Copy config files to builddir to patch them before installing.
|
|
|
|
# Currently, only registries.conf and storage.conf files are patched before
|
|
|
|
# installing.
|
|
|
|
cp %{SOURCE10} shortnames.conf
|
|
|
|
cp %{SOURCE13} registries.conf
|
|
|
|
cp %{SOURCE14} storage.conf
|
|
|
|
|
|
|
|
# Fine-grain distro- and release-specific tuning of config files,
|
|
|
|
# e.g., seccomp, composefs, registries on different RHEL/Fedora versions
|
|
|
|
bash rpm/update-config-files.sh
|
2022-03-15 15:07:27 +00:00
|
|
|
|
2020-12-14 10:09:08 +00:00
|
|
|
%build
|
2022-01-28 19:04:09 +00:00
|
|
|
mkdir -p man5
|
2024-07-29 08:52:48 +00:00
|
|
|
for i in docs/*.5.md; do
|
|
|
|
go-md2man -in $i -out man5/$(basename $i .md)
|
2022-01-28 17:33:16 +00:00
|
|
|
done
|
|
|
|
|
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-07-29 08:52:48 +00:00
|
|
|
install -dp %{buildroot}%{_prefix}/lib/containers/storage
|
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
|
|
|
|
|
2024-07-29 08:52:48 +00:00
|
|
|
install -Dp -m0644 shortnames.conf %{buildroot}%{_sysconfdir}/containers/registries.conf.d/000-shortnames.conf
|
|
|
|
install -Dp -m0644 %{SOURCE11} %{buildroot}%{_sysconfdir}/containers/registries.d/default.yaml
|
|
|
|
install -Dp -m0644 %{SOURCE12} %{buildroot}%{_sysconfdir}/containers/policy.json
|
|
|
|
install -Dp -m0644 registries.conf %{buildroot}%{_sysconfdir}/containers/registries.conf
|
|
|
|
install -Dp -m0644 storage.conf %{buildroot}%{_datadir}/containers/storage.conf
|
|
|
|
|
2022-11-02 11:46:08 +00:00
|
|
|
# RPM-GPG-KEY-redhat-release already exists on rhel envs, install only on
|
|
|
|
# fedora and centos
|
2024-07-29 08:52:48 +00:00
|
|
|
%if %{defined fedora} || %{defined centos}
|
|
|
|
install -Dp -m0644 %{SOURCE15} %{buildroot}%{_sysconfdir}/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
|
2022-11-02 11:46:08 +00:00
|
|
|
%endif
|
2020-12-14 10:09:08 +00:00
|
|
|
|
2024-07-29 08:52:48 +00:00
|
|
|
install -Dp -m0644 contrib/redhat/registry.access.redhat.com.yaml -t %{buildroot}%{_sysconfdir}/containers/registries.d
|
|
|
|
install -Dp -m0644 contrib/redhat/registry.redhat.io.yaml -t %{buildroot}%{_sysconfdir}/containers/registries.d
|
2022-06-13 15:28:16 +00:00
|
|
|
|
2021-01-13 01:22:23 +00:00
|
|
|
# install manpages
|
2024-07-29 08:52:48 +00:00
|
|
|
install -dp %{buildroot}%{_mandir}/man5
|
|
|
|
for i in man5/*.5; do
|
|
|
|
install -Dp -m0644 $i -t %{buildroot}%{_mandir}/man5
|
2022-01-28 17:33:16 +00:00
|
|
|
done
|
2024-07-29 08:52:48 +00:00
|
|
|
ln -s containerignore.5 %{buildroot}%{_mandir}/man5/.containerignore.5
|
2021-01-13 01:22:23 +00:00
|
|
|
|
|
|
|
# install config files for mounts, containers and seccomp
|
2024-07-29 08:52:48 +00:00
|
|
|
install -m0644 pkg/subscriptions/mounts.conf %{buildroot}%{_datadir}/containers/mounts.conf
|
|
|
|
install -m0644 pkg/seccomp/seccomp.json %{buildroot}%{_datadir}/containers/seccomp.json
|
|
|
|
install -m0644 pkg/config/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
|
2024-07-29 08:52:48 +00:00
|
|
|
%dir %{_prefix}/lib/containers
|
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
|
2024-07-29 08:52:48 +00:00
|
|
|
%config(noreplace) %{_sysconfdir}/containers/registries.d/registry.redhat.io.yaml
|
|
|
|
%config(noreplace) %{_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
|
2024-07-29 08:52:48 +00:00
|
|
|
%dir %{_datadir}/rhel
|
2020-12-14 10:09:08 +00:00
|
|
|
%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
|
2024-09-05 09:39:49 +00:00
|
|
|
* Thu Sep 05 2024 Jindrich Novy <jnovy@redhat.com> - 5:0.60.2-4
|
|
|
|
- update update.sh script and set logdriver to file
|
|
|
|
- Resolves: RHEL-57101
|
|
|
|
|
2024-08-28 08:37:28 +00:00
|
|
|
* Wed Aug 28 2024 Jindrich Novy <jnovy@redhat.com> - 5:0.60.2-3
|
|
|
|
- Obsolete containernetworking-plugins
|
|
|
|
- Resolves: RHEL-39410
|