Accepting request 1183023 from home:danishprakash:branches:devel:microos
While migrating config files from /etc/containers/ to /usr/share/containers/, preserve config files *if* modified by the user. OBS-URL: https://build.opensuse.org/request/show/1183023 OBS-URL: https://build.opensuse.org/package/show/devel:microos/libcontainers-common?expand=0&rev=42
This commit is contained in:
parent
a3a7402ad0
commit
0a22d0ce3f
@ -1,3 +1,9 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Jun 24 13:32:55 UTC 2024 - Danish Prakash <danish.prakash@suse.com>
|
||||||
|
|
||||||
|
- While migrating config files from /etc/containers/ to /usr/share/containers/,
|
||||||
|
preserve config files *if* modified by the user.
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Mon Jun 24 07:46:23 UTC 2024 - Dan Čermák <dcermak@suse.com>
|
Mon Jun 24 07:46:23 UTC 2024 - Dan Čermák <dcermak@suse.com>
|
||||||
|
|
||||||
|
@ -208,10 +208,20 @@ install -D -m 0644 %{SOURCE3} %{buildroot}/%{_sysconfdir}/containers/policy.json
|
|||||||
install -D -m 0644 %{SOURCE6} %{buildroot}/%{_sysconfdir}/containers/registries.conf.default
|
install -D -m 0644 %{SOURCE6} %{buildroot}/%{_sysconfdir}/containers/registries.conf.default
|
||||||
install -D -m 0644 registries.conf.suse %{buildroot}/%{_sysconfdir}/containers/registries.conf.suse
|
install -D -m 0644 registries.conf.suse %{buildroot}/%{_sysconfdir}/containers/registries.conf.suse
|
||||||
|
|
||||||
|
%pre
|
||||||
|
for i in %{_sysconfdir}/containers/{mounts.conf,seccomp.json,storage.conf} ; do
|
||||||
|
test -f ${i}.rpmsave && mv -v ${i}.rpmsave ${i}.rpmsave.old ||:
|
||||||
|
done
|
||||||
|
|
||||||
%post
|
%post
|
||||||
# Comment out ostree_repo if it's blank [boo#1189893]
|
# Comment out ostree_repo if it's blank [boo#1189893]
|
||||||
if [ -f %{_sysconfdir}/containers/storage.conf ]; then sed -i 's/ostree_repo = ""/\#ostree_repo = ""/g' %{_sysconfdir}/containers/storage.conf; fi
|
if [ -f %{_sysconfdir}/containers/storage.conf ]; then sed -i 's/ostree_repo = ""/\#ostree_repo = ""/g' %{_sysconfdir}/containers/storage.conf; fi
|
||||||
|
|
||||||
|
%posttrans
|
||||||
|
for i in %{_sysconfdir}/containers/{mounts.conf,seccomp.json,storage.conf} ; do
|
||||||
|
test -f ${i}.rpmsave && mv -v ${i}.rpmsave ${i} ||:
|
||||||
|
done
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%dir %{_sysconfdir}/containers
|
%dir %{_sysconfdir}/containers
|
||||||
%dir %{_sysconfdir}/containers/oci
|
%dir %{_sysconfdir}/containers/oci
|
||||||
|
Loading…
Reference in New Issue
Block a user