5c9f13
# Bellow definitions are used to deliver config files from a particular branch
5c9f13
# of c/image, c/common, c/storage vendored in all podman, skopeo, buildah.
5c9f13
# These vendored components must have the same version. If it is not the case,
5c9f13
# pick the oldest version on c/image, c/common, c/storage vendored in
5c9f13
# podman/skopeo/podman.
5c9f13
%global skopeo_branch main
5c9f13
%global image_branch v5.19.1
5c9f13
%global common_branch v0.47.4
5c9f13
%global storage_branch v1.38.2
5c9f13
%global shortnames_branch main
5c9f13
5c9f13
Epoch: 2
5c9f13
Name: containers-common
5c9f13
Version: 1
5c9f13
Release: 19%{?dist}
5c9f13
Summary: Common configuration and documentation for containers
5c9f13
License: ASL 2.0
5c9f13
BuildRequires: /usr/bin/go-md2man
5c9f13
Provides: skopeo-containers = %{epoch}:%{version}-%{release}
5c9f13
Requires: (container-selinux >= 2:2.162.1 if selinux-policy)
5c9f13
Requires: oci-runtime
5c9f13
%if 0%{?rhel} >= 9 || 0%{?fedora}
5c9f13
Requires: crun >= 0.19
5c9f13
%else
5c9f13
Requires: runc
5c9f13
%endif
5c9f13
Requires: system-release
5c9f13
Suggests: subscription-manager
5c9f13
Recommends: fuse-overlayfs
5c9f13
Recommends: slirp4netns
5c9f13
Source1: https://raw.githubusercontent.com/containers/storage/%{storage_branch}/storage.conf
5c9f13
Source2: https://raw.githubusercontent.com/containers/storage/%{storage_branch}/docs/containers-storage.conf.5.md
5c9f13
Source3: mounts.conf
5c9f13
Source4: https://raw.githubusercontent.com/containers/image/%{image_branch}/docs/containers-registries.conf.5.md
5c9f13
#Source5: https://raw.githubusercontent.com/containers/image/%%{image_branch}/registries.conf
5c9f13
Source5: registries.conf
5c9f13
Source6: https://raw.githubusercontent.com/containers/image/%{image_branch}/docs/containers-policy.json.5.md
5c9f13
Source7: https://raw.githubusercontent.com/containers/common/%{common_branch}/pkg/seccomp/seccomp.json
5c9f13
Source8: https://raw.githubusercontent.com/containers/common/%{common_branch}/docs/containers-mounts.conf.5.md
5c9f13
Source9: https://raw.githubusercontent.com/containers/image/%{image_branch}/docs/containers-signature.5.md
5c9f13
Source10: https://raw.githubusercontent.com/containers/image/%{image_branch}/docs/containers-transports.5.md
5c9f13
Source11: https://raw.githubusercontent.com/containers/image/%{image_branch}/docs/containers-certs.d.5.md
5c9f13
Source12: https://raw.githubusercontent.com/containers/image/%{image_branch}/docs/containers-registries.d.5.md
5c9f13
Source13: https://raw.githubusercontent.com/containers/common/%{common_branch}/pkg/config/containers.conf
5c9f13
Source14: https://raw.githubusercontent.com/containers/common/%{common_branch}/docs/containers.conf.5.md
5c9f13
Source15: https://raw.githubusercontent.com/containers/image/%{image_branch}/docs/containers-auth.json.5.md
5c9f13
Source16: https://raw.githubusercontent.com/containers/image/%{image_branch}/docs/containers-registries.conf.d.5.md
5c9f13
Source17: https://raw.githubusercontent.com/containers/shortnames/%{shortnames_branch}/shortnames.conf
5c9f13
Source19: 001-rhel-shortnames-pyxis.conf
5c9f13
Source20: 002-rhel-shortnames-overrides.conf
5c9f13
Source21: RPM-GPG-KEY-redhat-release
5c9f13
Source22: registry.access.redhat.com.yaml
5c9f13
Source23: registry.redhat.io.yaml
5c9f13
#Source24: https://raw.githubusercontent.com/containers/skopeo/%%{skopeo_branch}/default-policy.json
5c9f13
Source24: default-policy.json
5c9f13
Source25: https://raw.githubusercontent.com/containers/skopeo/%{skopeo_branch}/default.yaml
5c9f13
# scripts used for synchronization with upstream and shortname generation
5c9f13
Source100: update.sh
5c9f13
Source101: update-vendored.sh
5c9f13
Source102: pyxis.sh
5c9f13
5c9f13
%global aardvark_dns_version v1.0.0
5c9f13
%global aardvark_dns_commit0 5cd145d2ccf420cef739751e1c26e1ddca06d048
5c9f13
%global aardvark_dns_shortcommit0 %(c=%{aardvark_dns_commit0}; echo ${c:0:7})
5c9f13
Source200: https://github.com/containers/aardvark-dns/archive/%{aardvark_dns_commit0}/aardvark-dns-%{aardvark_dns_version}-%{aardvark_dns_shortcommit0}.tar.gz
5c9f13
5c9f13
%global netavark_version v1.0.0
5c9f13
%global netavark_commit0 1c7c51a53641fb363f3e07582d6646cbc844938a
5c9f13
%global netavark_shortcommit0 %(c=%{netavark_commit0}; echo ${c:0:7})
5c9f13
Source300: https://github.com/containers/netavark/archive/%{netavark_commit0}/netavark-%{netavark_version}-%{netavark_shortcommit0}.tar.gz
5c9f13
5c9f13
%description
5c9f13
This package contains common configuration files and documentation for container
5c9f13
tools ecosystem, such as Podman, Buildah and Skopeo.
5c9f13
5c9f13
It is required because the most of configuration files and docs come from projects
5c9f13
which are vendored into Podman, Buildah, Skopeo, etc. but they are not packaged
5c9f13
separately.
5c9f13
5c9f13
%package -n aardvark-dns
5c9f13
Version: 1.0.0
5c9f13
Release: 18%{?dist}
5c9f13
URL: https://github.com/containers/aardvark-dns
5c9f13
Summary: Authoritative DNS server for A/AAAA container records
5c9f13
License: ASL 2.0 and BSD and MIT
5c9f13
BuildRequires: cargo
5c9f13
BuildRequires: git-core
5c9f13
BuildRequires: make
5c9f13
BuildRequires: rust-srpm-macros
5c9f13
ExclusiveArch: %{rust_arches}
5c9f13
5c9f13
%description -n aardvark-dns
5c9f13
%{summary}
5c9f13
5c9f13
Forwards other request to configured resolvers.
5c9f13
Read more about configuration in `src/backend/mod.rs`.
5c9f13
5c9f13
%package -n netavark
5c9f13
Version: 1.0.0
5c9f13
Release: 18%{?dist}
5c9f13
URL: https://github.com/containers/netavark
5c9f13
Summary: OCI network stack
5c9f13
License: ASL 2.0 and BSD and MIT
5c9f13
BuildRequires: cargo
5c9f13
BuildRequires: make
5c9f13
BuildRequires: rust-srpm-macros
5c9f13
BuildRequires: git-core
5c9f13
BuildRequires: /usr/bin/go-md2man
5c9f13
Recommends: aardvark-dns
5c9f13
Provides: container-network-stack = 2
5c9f13
ExclusiveArch: %{rust_arches}
5c9f13
5c9f13
%description -n netavark
5c9f13
%{summary}
5c9f13
5c9f13
Netavark is a rust based network stack for containers. It is being
5c9f13
designed to work with Podman but is also applicable for other OCI
5c9f13
container management applications.
5c9f13
5c9f13
Netavark is a tool for configuring networking for Linux containers.
5c9f13
Its features include:
5c9f13
* Configuration of container networks via JSON configuration file
5c9f13
* Creation and management of required network interfaces,
5c9f13
    including MACVLAN networks
5c9f13
* All required firewall configuration to perform NAT and port
5c9f13
    forwarding as required for containers
5c9f13
* Support for iptables and firewalld at present, with support
5c9f13
    for nftables planned in a future release
5c9f13
* Support for rootless containers
5c9f13
* Support for IPv4 and IPv6
5c9f13
* Support for container DNS resolution via aardvark-dns.
5c9f13
5c9f13
%prep
5c9f13
tar fx %{SOURCE200}
5c9f13
tar fx %{SOURCE300}
5c9f13
5c9f13
%build
5c9f13
pushd aardvark-dns-%{aardvark_dns_commit0}
5c9f13
%__scm_setup_git -q
5c9f13
%{__make} build
5c9f13
popd
5c9f13
5c9f13
pushd netavark-%{netavark_commit0}
5c9f13
%__scm_setup_git -q
5c9f13
%{__make} build
5c9f13
pushd docs
5c9f13
go-md2man -in netavark.1.md -out netavark.1
5c9f13
popd
5c9f13
%{__make} DESTDIR=%{buildroot} PREFIX=%{_prefix} install
5c9f13
popd
5c9f13
5c9f13
%install
5c9f13
pushd aardvark-dns-%{aardvark_dns_commit0}
5c9f13
%{__make} DESTDIR=%{buildroot} PREFIX=%{_prefix} install
5c9f13
popd
5c9f13
5c9f13
pushd netavark-%{netavark_commit0}
5c9f13
%{__make} DESTDIR=%{buildroot} PREFIX=%{_prefix} install
5c9f13
popd
5c9f13
5c9f13
install -dp %{buildroot}%{_sysconfdir}/containers/{certs.d,oci/hooks.d,registries.d,registries.conf.d}
5c9f13
install -m0644 %{SOURCE1} %{buildroot}%{_sysconfdir}/containers/storage.conf
5c9f13
install -m0644 %{SOURCE5} %{buildroot}%{_sysconfdir}/containers/registries.conf
5c9f13
install -m0644 %{SOURCE17} %{buildroot}%{_sysconfdir}/containers/registries.conf.d/000-shortnames.conf
5c9f13
install -m0644 %{SOURCE19} %{buildroot}%{_sysconfdir}/containers/registries.conf.d/001-rhel-shortnames.conf
5c9f13
install -m0644 %{SOURCE20} %{buildroot}%{_sysconfdir}/containers/registries.conf.d/002-rhel-shortnames-overrides.conf
5c9f13
5c9f13
# for signature verification
5c9f13
%if !0%{?rhel} || 0%{?centos}
5c9f13
install -dp %{buildroot}%{_sysconfdir}/pki/rpm-gpg
5c9f13
install -m0644 %{SOURCE21} %{buildroot}%{_sysconfdir}/pki/rpm-gpg
5c9f13
%endif
5c9f13
install -dp %{buildroot}%{_sysconfdir}/containers/registries.d
5c9f13
install -m0644 %{SOURCE22} %{buildroot}%{_sysconfdir}/containers/registries.d
5c9f13
install -m0644 %{SOURCE23} %{buildroot}%{_sysconfdir}/containers/registries.d
5c9f13
install -m0644 %{SOURCE24} %{buildroot}%{_sysconfdir}/containers/policy.json
5c9f13
install -dp %{buildroot}%{_sharedstatedir}/containers/sigstore
5c9f13
install -m0644 %{SOURCE25} %{buildroot}%{_sysconfdir}/containers/registries.d/default.yaml
5c9f13
5c9f13
# for containers-common
5c9f13
install -dp %{buildroot}%{_mandir}/man5
5c9f13
go-md2man -in %{SOURCE2} -out %{buildroot}%{_mandir}/man5/containers-storage.conf.5
5c9f13
go-md2man -in %{SOURCE4} -out %{buildroot}%{_mandir}/man5/containers-registries.conf.5
5c9f13
go-md2man -in %{SOURCE6} -out %{buildroot}%{_mandir}/man5/containers-policy.json.5
5c9f13
go-md2man -in %{SOURCE8} -out %{buildroot}%{_mandir}/man5/containers-mounts.conf.5
5c9f13
go-md2man -in %{SOURCE9} -out %{buildroot}%{_mandir}/man5/containers-signature.5
5c9f13
go-md2man -in %{SOURCE10} -out %{buildroot}%{_mandir}/man5/containers-transports.5
5c9f13
go-md2man -in %{SOURCE11} -out %{buildroot}%{_mandir}/man5/containers-certs.d.5
5c9f13
go-md2man -in %{SOURCE12} -out %{buildroot}%{_mandir}/man5/containers-registries.d.5
5c9f13
go-md2man -in %{SOURCE14} -out %{buildroot}%{_mandir}/man5/containers.conf.5
5c9f13
go-md2man -in %{SOURCE15} -out %{buildroot}%{_mandir}/man5/containers-auth.json.5
5c9f13
go-md2man -in %{SOURCE16} -out %{buildroot}%{_mandir}/man5/containers-registries.conf.d.5
5c9f13
5c9f13
install -dp %{buildroot}%{_datadir}/containers
5c9f13
install -m0644 %{SOURCE3} %{buildroot}%{_datadir}/containers/mounts.conf
5c9f13
install -m0644 %{SOURCE7} %{buildroot}%{_datadir}/containers/seccomp.json
5c9f13
install -m0644 %{SOURCE13} %{buildroot}%{_datadir}/containers/containers.conf
5c9f13
5c9f13
# install secrets patch directory
5c9f13
install -d -p -m 755 %{buildroot}/%{_datadir}/rhel/secrets
5c9f13
# rhbz#1110876 - update symlinks for subscription management
5c9f13
ln -s %{_sysconfdir}/pki/entitlement %{buildroot}%{_datadir}/rhel/secrets/etc-pki-entitlement
5c9f13
ln -s %{_sysconfdir}/rhsm %{buildroot}%{_datadir}/rhel/secrets/rhsm
5c9f13
ln -s %{_sysconfdir}/yum.repos.d/redhat.repo %{buildroot}%{_datadir}/rhel/secrets/redhat.repo
5c9f13
5c9f13
# ship preconfigured /etc/containers/registries.d/ files with containers-common - #1903813
5c9f13
cat <<EOF > %{buildroot}%{_sysconfdir}/containers/registries.d/registry.access.redhat.com.yaml
5c9f13
docker:
5c9f13
     registry.access.redhat.com:
5c9f13
         sigstore: https://access.redhat.com/webassets/docker/content/sigstore
5c9f13
EOF
5c9f13
5c9f13
cat <<EOF > %{buildroot}%{_sysconfdir}/containers/registries.d/registry.redhat.io.yaml
5c9f13
docker:
5c9f13
     registry.redhat.io:
5c9f13
         sigstore: https://registry.redhat.io/containers/sigstore
5c9f13
EOF
5c9f13
5c9f13
%files
5c9f13
%dir %{_sysconfdir}/containers
5c9f13
%dir %{_sysconfdir}/containers/certs.d
5c9f13
%dir %{_sysconfdir}/containers/registries.d
5c9f13
%{_sysconfdir}/containers/registries.d/registry.redhat.io.yaml
5c9f13
%{_sysconfdir}/containers/registries.d/registry.access.redhat.com.yaml
5c9f13
%dir %{_sysconfdir}/containers/oci
5c9f13
%dir %{_sysconfdir}/containers/oci/hooks.d
5c9f13
%dir %{_sysconfdir}/containers/registries.conf.d
5c9f13
%if !0%{?rhel} || 0%{?centos}
5c9f13
%{_sysconfdir}/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
5c9f13
%endif
5c9f13
%config(noreplace) %{_sysconfdir}/containers/policy.json
5c9f13
%config(noreplace) %{_sysconfdir}/containers/registries.d/default.yaml
5c9f13
%config(noreplace) %{_sysconfdir}/containers/storage.conf
5c9f13
%config(noreplace) %{_sysconfdir}/containers/registries.conf
5c9f13
%config(noreplace) %{_sysconfdir}/containers/registries.conf.d/*.conf
5c9f13
%config(noreplace) %{_sysconfdir}/containers/registries.d/*.yaml
5c9f13
%ghost %{_sysconfdir}/containers/containers.conf
5c9f13
%dir %{_sharedstatedir}/containers/sigstore
5c9f13
%{_mandir}/man5/*
5c9f13
%dir %{_datadir}/containers
5c9f13
%{_datadir}/containers/mounts.conf
5c9f13
%{_datadir}/containers/seccomp.json
5c9f13
%{_datadir}/containers/containers.conf
5c9f13
%dir %{_datadir}/rhel/secrets
5c9f13
%{_datadir}/rhel/secrets/*
5c9f13
5c9f13
%files -n aardvark-dns
5c9f13
%license aardvark-dns-%{aardvark_dns_commit0}/LICENSE
5c9f13
%dir %{_libexecdir}/podman
5c9f13
%{_libexecdir}/podman/aardvark-dns
5c9f13
5c9f13
%files -n netavark
5c9f13
%license netavark-%{netavark_commit0}/LICENSE
5c9f13
%dir %{_libexecdir}/podman
5c9f13
%{_libexecdir}/podman/netavark
5c9f13
%{_mandir}/man1/netavark.1*
5c9f13
5c9f13
%changelog
5c9f13
* Mon Feb 21 2022 Lokesh Mandvekar <lsm5@redhat.com> - 2:1-19
5c9f13
- do not specify infra_image in containers.conf
5c9f13
- needed to resolve gating test failures
5c9f13
- Related: #2001445
5c9f13
5c9f13
* Fri Feb 18 2022 Jindrich Novy <jnovy@redhat.com> - 2:1-18
5c9f13
- update to netavark-1.0.0 and aardvark-dns-1.0.0
5c9f13
- Related: #2001445
5c9f13
5c9f13
* Thu Feb 10 2022 Jindrich Novy <jnovy@redhat.com> - 2:1-17
5c9f13
- update vendored components and configuration files
5c9f13
- Related: #2001445
5c9f13
5c9f13
* Thu Feb 10 2022 Jindrich Novy <jnovy@redhat.com> - 2:1-16
5c9f13
- sync vendored components
5c9f13
- Related: #2001445
5c9f13
5c9f13
* Thu Feb 10 2022 Jindrich Novy <jnovy@redhat.com> - 2:1-15
5c9f13
- update vendored components and configuration files
5c9f13
- Related: #2001445
5c9f13
5c9f13
* Fri Feb 04 2022 Jindrich Novy <jnovy@redhat.com> - 2:1-14
5c9f13
- sync vendored components
5c9f13
- Related: #2001445
5c9f13
5c9f13
* Fri Feb 04 2022 Jindrich Novy <jnovy@redhat.com> - 2:1-13
5c9f13
- sync vendored components
5c9f13
- Related: #2001445
5c9f13
5c9f13
* Fri Jan 21 2022 Jindrich Novy <jnovy@redhat.com> - 2:1-12
5c9f13
- update shortnames from Pyxis
5c9f13
- Related: #2001445
5c9f13
5c9f13
* Fri Dec 10 2021 Jindrich Novy <jnovy@redhat.com> - 2:1-11
5c9f13
- do not allow broken content from Pyxis to land in shortnames.conf
5c9f13
- Related: #2001445
5c9f13
5c9f13
* Wed Dec 08 2021 Jindrich Novy <jnovy@redhat.com> - 2:1-10
5c9f13
- sync vendored components
5c9f13
- update shortnames from Pyxis
5c9f13
- Related: #2001445
5c9f13
5c9f13
* Wed Dec 01 2021 Jindrich Novy <jnovy@redhat.com> - 2:1-9
5c9f13
- use log_driver = "journald" and events_logger = "journald" for RHEL9
5c9f13
- Related: #2001445
5c9f13
5c9f13
* Tue Nov 16 2021 Jindrich Novy <jnovy@redhat.com> - 2:1-8
5c9f13
- consume seccomp.json from the oldest vendored version of c/common,
5c9f13
  not main branch
5c9f13
- Related: #2001445
5c9f13
5c9f13
* Mon Nov 15 2021 Jindrich Novy <jnovy@redhat.com> - 2:1-7
5c9f13
- update vendored components
5c9f13
- Related: #2001445
5c9f13
5c9f13
* Wed Oct 13 2021 Jindrich Novy <jnovy@redhat.com> - 2:1-6
5c9f13
- sync vendored components
5c9f13
- Related: #2001445
5c9f13
5c9f13
* Wed Sep 29 2021 Jindrich Novy <jnovy@redhat.com> - 2:1-5
5c9f13
- update to the new vendored components
5c9f13
- Related: #2001445
5c9f13
5c9f13
* Fri Sep 24 2021 Jindrich Novy <jnovy@redhat.com> - 2:1-4
5c9f13
- update to the new vendored components
5c9f13
- Related: #2001445
5c9f13
5c9f13
* Fri Sep 10 2021 Jindrich Novy <jnovy@redhat.com> - 2:1-3
5c9f13
- update to the new vendored components
5c9f13
- Related: #2001445
5c9f13
5c9f13
* Wed Aug 11 2021 Jindrich Novy <jnovy@redhat.com> - 2:1-2
5c9f13
- synchronize config files for RHEL-8.5
5c9f13
- Related: #1934415
5c9f13
5c9f13
* Wed Aug 11 2021 Jindrich Novy <jnovy@redhat.com> - 2:1-1
5c9f13
- initial import
5c9f13
- Related: #1934415