2024-01-05 10:42:55 +00:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
set -eox pipefail
|
2021-01-20 20:16:15 +00:00
|
|
|
|
|
|
|
spectool -fg containers-common.spec
|
|
|
|
|
2024-01-05 10:42:55 +00:00
|
|
|
if [[ $(git rev-parse --abbrev-ref HEAD) == "rawhide" ]]; then
|
|
|
|
sed -i -e 's/^driver.*=.*/driver = "overlay"/' -e 's/^mountopt.*=.*/mountopt = "nodev,metacopy=on"/' \
|
|
|
|
-e 's/^pull_options.*=.*/pull_options = {enable_partial_images = \"true\", use_hard_links = \"false\", ostree_repos=""}/' \
|
|
|
|
storage.conf
|
|
|
|
else
|
|
|
|
sed -i -e 's/^driver.*=.*/driver = "overlay"/' -e 's/^mountopt.*=.*/mountopt = "nodev,metacopy=on"/' \
|
|
|
|
-e '/additionalimage.*/a "/usr/lib/containers/storage",' \
|
|
|
|
storage.conf
|
|
|
|
fi
|
2021-01-20 20:16:15 +00:00
|
|
|
|
|
|
|
[ `grep "keyctl" seccomp.json | wc -l` == 0 ] && sed -i '/\"kill\",/i \
|
|
|
|
"keyctl",' seccomp.json
|
|
|
|
sed -i '/\"socketcall\",/i \
|
|
|
|
"socket",' seccomp.json
|
|
|
|
|
2021-02-15 19:12:49 +00:00
|
|
|
sed -i 's/^#.*unqualified-search-registries.*=.*/unqualified-search-registries = ["registry.fedoraproject.org", "registry.access.redhat.com", "docker.io", "quay.io"]/g' \
|
2021-01-20 20:16:15 +00:00
|
|
|
registries.conf
|
|
|
|
|
2021-02-18 15:19:40 +00:00
|
|
|
grep '\nshort-name-mode="enforcing"' registries.conf
|
|
|
|
if [[ $? == 1 ]]; then
|
|
|
|
echo -e '\nshort-name-mode="enforcing"' >> registries.conf
|
|
|
|
fi
|
2021-05-11 16:18:59 +00:00
|
|
|
|
2024-01-05 11:02:53 +00:00
|
|
|
sed -i -e 's/^#.*log_driver.*=.*/log_driver = "journald"/' \
|
|
|
|
containers.conf
|
|
|
|
|
2021-09-20 18:56:51 +00:00
|
|
|
git checkout origin default-policy.json
|