containers-common-4:1-10

- install shortnames.conf as 000-shrotnames.conf

Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
This commit is contained in:
Lokesh Mandvekar 2021-02-18 10:19:40 -05:00
parent e066d169ce
commit 575d270498
2 changed files with 10 additions and 5 deletions

View File

@ -15,7 +15,7 @@
Epoch: 4
Name: containers-common
Version: 1
Release: 9%{?dist}
Release: 10%{?dist}
Summary: Common configuration and documentation for containers
License: ASL 2.0
BuildArch: noarch
@ -61,7 +61,7 @@ install -dp %{buildroot}%{_sharedstatedir}/containers/sigstore
install -m0644 %{_sourcedir}/default.yaml %{buildroot}%{_sysconfdir}/containers/registries.d/default.yaml
install -m0644 %{_sourcedir}/storage.conf %{buildroot}%{_sysconfdir}/containers/storage.conf
install -m0644 %{_sourcedir}/registries.conf %{buildroot}%{_sysconfdir}/containers/registries.conf
install -m0644 %{_sourcedir}/shortnames.conf %{buildroot}%{_sysconfdir}/containers/registries.conf.d/shortnames.conf
install -m0644 %{_sourcedir}/shortnames.conf %{buildroot}%{_sysconfdir}/containers/registries.conf.d/000-shortnames.conf
install -m0644 %{_sourcedir}/default-policy.json %{buildroot}%{_sysconfdir}/containers/policy.json
# install manpages
@ -100,7 +100,7 @@ ln -s %{_sysconfdir}/yum.repos.d/redhat.repo %{buildroot}%{_datadir}/rhel/secret
%dir %{_sysconfdir}/containers/registries.d
%config(noreplace) %{_sysconfdir}/containers/policy.json
%config(noreplace) %{_sysconfdir}/containers/registries.conf
%config(noreplace) %{_sysconfdir}/containers/registries.conf.d/shortnames.conf
%config(noreplace) %{_sysconfdir}/containers/registries.conf.d/000-shortnames.conf
%config(noreplace) %{_sysconfdir}/containers/registries.d/default.yaml
%config(noreplace) %{_sysconfdir}/containers/storage.conf
%ghost %{_sysconfdir}/containers/containers.conf
@ -114,6 +114,9 @@ ln -s %{_sysconfdir}/yum.repos.d/redhat.repo %{buildroot}%{_datadir}/rhel/secret
%{_datadir}/rhel/secrets/*
%changelog
* Thu Feb 18 2021 Lokesh Mandvekar <lsm5@fedoraproject.org> - 4:1-10
- install shortnames.conf as 000-shrotnames.conf
* Mon Feb 15 2021 Dan Walsh <dwalsh@fedoraproject.org> - 4:1-9
- Remove registry.centos.org and add quay.io from registries.conf

View File

@ -16,5 +16,7 @@ echo "Changing registries.conf..."
sed -i 's/^#.*unqualified-search-registries.*=.*/unqualified-search-registries = ["registry.fedoraproject.org", "registry.access.redhat.com", "docker.io", "quay.io"]/g' \
registries.conf
echo '' >> registries.conf
echo 'short-name-mode="enforcing"' >> registries.conf
grep '\nshort-name-mode="enforcing"' registries.conf
if [[ $? == 1 ]]; then
echo -e '\nshort-name-mode="enforcing"' >> registries.conf
fi