Accepting request 1170171 from home:danishprakash:branches:devel:microos
Introduce new subpackage that ships registries.conf which uses registry.suse.com as the only unqualified registry while pulling images on SL Micro. (SMO-376) OBS-URL: https://build.opensuse.org/request/show/1170171 OBS-URL: https://build.opensuse.org/package/show/devel:microos/libcontainers-common?expand=0&rev=35
This commit is contained in:
parent
58ad780bfe
commit
7aa566c44d
@ -1,3 +1,10 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Apr 24 14:56:17 UTC 2024 - Danish Prakash <danish.prakash@suse.com>
|
||||||
|
|
||||||
|
- Introduce new subpackage that ships registries.conf which uses
|
||||||
|
registry.suse.com as the only unqualified registry while pulling images on
|
||||||
|
SL Micro. (SMO-376)
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Mon Apr 8 15:15:18 UTC 2024 - Danish Prakash <danish.prakash@suse.com>
|
Mon Apr 8 15:15:18 UTC 2024 - Danish Prakash <danish.prakash@suse.com>
|
||||||
|
|
||||||
|
@ -58,6 +58,11 @@ Requires(post): %{_bindir}/sed
|
|||||||
Requires: (libcontainers-sles-mounts if (product(SUSE_SLE) or product(SLE-Micro)))
|
Requires: (libcontainers-sles-mounts if (product(SUSE_SLE) or product(SLE-Micro)))
|
||||||
Requires: libcontainers-policy >= %{version}
|
Requires: libcontainers-policy >= %{version}
|
||||||
Suggests: (libcontainers-policy-openSUSE if openSUSE-release)
|
Suggests: (libcontainers-policy-openSUSE if openSUSE-release)
|
||||||
|
# Default to SUSE registry on SL Micro,
|
||||||
|
# keep SUSE, openSUSE and dockerhub registries otherwise.
|
||||||
|
# (SMO-376)
|
||||||
|
Requires: registries-conf >= %{version}
|
||||||
|
Suggests: (registries-conf-sl-micro if product(SL-Micro))
|
||||||
Provides: libcontainers-image = %{version}
|
Provides: libcontainers-image = %{version}
|
||||||
Provides: libcontainers-storage = %{version}
|
Provides: libcontainers-storage = %{version}
|
||||||
Obsoletes: libcontainers-image < %{version}
|
Obsoletes: libcontainers-image < %{version}
|
||||||
@ -94,6 +99,25 @@ Conflicts: libcontainers-openSUSE-policy
|
|||||||
%description -n libcontainers-default-policy
|
%description -n libcontainers-default-policy
|
||||||
This package ships the default /etc/containers/policy.json
|
This package ships the default /etc/containers/policy.json
|
||||||
|
|
||||||
|
%package -n registries-conf-sl-micro
|
||||||
|
Summary: Defaults to SUSE Registry on SL Micro
|
||||||
|
Provides: registries-conf = %{version}-%{release}
|
||||||
|
RemovePathPostfixes: .sl-micro
|
||||||
|
Conflicts: registries-conf-default
|
||||||
|
Requires: product(SL-Micro)
|
||||||
|
|
||||||
|
%description -n registries-conf-sl-micro
|
||||||
|
Ships registries.conf that uses registry.suse.com as the only unqualified registry on SL Micro.
|
||||||
|
|
||||||
|
%package -n registries-conf-default
|
||||||
|
Summary: Add SUSE and openSUSE registries to be used to pull images along with dockerhub
|
||||||
|
Provides: registries-conf = %{version}-%{release}
|
||||||
|
RemovePathPostfixes: .default
|
||||||
|
Conflicts: registries-conf-sl-micro
|
||||||
|
|
||||||
|
%description -n registries-conf-default
|
||||||
|
Modifes registries.conf to allow SUSE and openSUSE registries to be used to pull images along with dockerhub.
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
cp %{SOURCE9} .
|
cp %{SOURCE9} .
|
||||||
# Apply CNI config on streams other than ALP (bsc#1213556)
|
# Apply CNI config on streams other than ALP (bsc#1213556)
|
||||||
@ -139,6 +163,9 @@ cat >>%{SOURCE5} <<EOL
|
|||||||
%{_sysconfdir}/zypp/credentials.d/SCCcredentials:%{_sysconfdir}/zypp/credentials.d/SCCcredentials
|
%{_sysconfdir}/zypp/credentials.d/SCCcredentials:%{_sysconfdir}/zypp/credentials.d/SCCcredentials
|
||||||
EOL
|
EOL
|
||||||
|
|
||||||
|
# Default to SUSE registry on SL Micro
|
||||||
|
sed 's/unqualified-search-registries.*/unqualified-search-registries = \["registry.suse.com"\]/' %{SOURCE6} > registries.conf.sl-micro
|
||||||
|
|
||||||
cd common-%{commonver}
|
cd common-%{commonver}
|
||||||
%make_build docs
|
%make_build docs
|
||||||
cd ..
|
cd ..
|
||||||
@ -158,7 +185,6 @@ install -D -m 0644 %{SOURCE3} %{buildroot}/%{_sysconfdir}/containers/policy.json
|
|||||||
install -D -m 0644 %{SOURCE4} %{buildroot}/%{_sysconfdir}/containers/storage.conf
|
install -D -m 0644 %{SOURCE4} %{buildroot}/%{_sysconfdir}/containers/storage.conf
|
||||||
install -D -m 0644 %{SOURCE5} %{buildroot}/%{_datadir}/containers/mounts.conf
|
install -D -m 0644 %{SOURCE5} %{buildroot}/%{_datadir}/containers/mounts.conf
|
||||||
install -D -m 0644 %{SOURCE5} %{buildroot}/%{_sysconfdir}/containers/mounts.conf
|
install -D -m 0644 %{SOURCE5} %{buildroot}/%{_sysconfdir}/containers/mounts.conf
|
||||||
install -D -m 0644 %{SOURCE6} %{buildroot}/%{_sysconfdir}/containers/registries.conf
|
|
||||||
install -D -m 0644 %{SOURCE11} %{buildroot}/%{_sysconfdir}/containers/registries.conf.d/000-shortnames.conf
|
install -D -m 0644 %{SOURCE11} %{buildroot}/%{_sysconfdir}/containers/registries.conf.d/000-shortnames.conf
|
||||||
install -D -m 0644 %{SOURCE7} %{buildroot}/%{_sysconfdir}/containers/registries.d/default.yaml
|
install -D -m 0644 %{SOURCE7} %{buildroot}/%{_sysconfdir}/containers/registries.d/default.yaml
|
||||||
install -D -m 0644 %_builddir/containers.conf %{buildroot}/%{_datadir}/containers/containers.conf
|
install -D -m 0644 %_builddir/containers.conf %{buildroot}/%{_datadir}/containers/containers.conf
|
||||||
@ -178,6 +204,9 @@ install -D -m 0644 common-%{commonver}/docs/containers.conf.5 %{buildroot}/%{_ma
|
|||||||
install -D -m 0644 %{SOURCE12} %{buildroot}/%{_sysconfdir}/containers/policy.json.openSUSE
|
install -D -m 0644 %{SOURCE12} %{buildroot}/%{_sysconfdir}/containers/policy.json.openSUSE
|
||||||
install -D -m 0644 %{SOURCE3} %{buildroot}/%{_sysconfdir}/containers/policy.json.default
|
install -D -m 0644 %{SOURCE3} %{buildroot}/%{_sysconfdir}/containers/policy.json.default
|
||||||
|
|
||||||
|
install -D -m 0644 %{SOURCE6} %{buildroot}/%{_sysconfdir}/containers/registries.conf.default
|
||||||
|
install -D -m 0644 registries.conf.sl-micro %{buildroot}/%{_sysconfdir}/containers/registries.conf.sl-micro
|
||||||
|
|
||||||
%post
|
%post
|
||||||
# Comment out ostree_repo if it's blank [boo#1189893]
|
# Comment out ostree_repo if it's blank [boo#1189893]
|
||||||
sed -i 's/ostree_repo = ""/\#ostree_repo = ""/g' %{_sysconfdir}/containers/storage.conf
|
sed -i 's/ostree_repo = ""/\#ostree_repo = ""/g' %{_sysconfdir}/containers/storage.conf
|
||||||
@ -195,7 +224,6 @@ sed -i 's/ostree_repo = ""/\#ostree_repo = ""/g' %{_sysconfdir}/containers/stora
|
|||||||
%dir %{_datadir}/containers/systemd
|
%dir %{_datadir}/containers/systemd
|
||||||
|
|
||||||
%config(noreplace) %{_sysconfdir}/containers/storage.conf
|
%config(noreplace) %{_sysconfdir}/containers/storage.conf
|
||||||
%config(noreplace) %{_sysconfdir}/containers/registries.conf
|
|
||||||
%config(noreplace) %{_sysconfdir}/containers/seccomp.json
|
%config(noreplace) %{_sysconfdir}/containers/seccomp.json
|
||||||
%config(noreplace) %{_sysconfdir}/containers/registries.d/default.yaml
|
%config(noreplace) %{_sysconfdir}/containers/registries.d/default.yaml
|
||||||
%config(noreplace) %{_sysconfdir}/containers/registries.conf.d/000-shortnames.conf
|
%config(noreplace) %{_sysconfdir}/containers/registries.conf.d/000-shortnames.conf
|
||||||
@ -216,4 +244,10 @@ sed -i 's/ostree_repo = ""/\#ostree_repo = ""/g' %{_sysconfdir}/containers/stora
|
|||||||
%files -n libcontainers-default-policy
|
%files -n libcontainers-default-policy
|
||||||
%config(noreplace) %{_sysconfdir}/containers/policy.json.default
|
%config(noreplace) %{_sysconfdir}/containers/policy.json.default
|
||||||
|
|
||||||
|
%files -n registries-conf-sl-micro
|
||||||
|
%config(noreplace) %{_sysconfdir}/containers/registries.conf.sl-micro
|
||||||
|
|
||||||
|
%files -n registries-conf-default
|
||||||
|
%config(noreplace) %{_sysconfdir}/containers/registries.conf.default
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
Loading…
Reference in New Issue
Block a user