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