diff --git a/rpm/update-config-files.sh b/rpm/update-config-files.sh index 216d8d42e..8c1191aee 100755 --- a/rpm/update-config-files.sh +++ b/rpm/update-config-files.sh @@ -17,25 +17,19 @@ ensure() { then sed -i "/^#.*$2[[:blank:]].*=/a \ $2 = $3" $1 - else - echo "$2 = $3" >> $1 fi fi } # Common options enabled across all fedora, centos, rhel # TBD: Can these be enabled by default upstream? -ensure registries.conf short-name-mode \"enforcing\" +echo 'short-name-mode="enforcing"' >> registries.conf -ensure storage.conf driver \"overlay\" ensure storage.conf mountopt \"nodev,metacopy=on\" -ensure pkg/config/containers.conf runtime \"crun\" ensure pkg/config/containers.conf log_driver \"journald\" -# Enable seccomp support keyctl and socketcall -grep -q \"keyctl\", pkg/seccomp/seccomp.json || sed -i '/\"kill\",/i \ - "keyctl",' pkg/seccomp/seccomp.json +# Enable seccomp support socketcall grep -q \"socket\", pkg/seccomp/seccomp.json || sed -i '/\"socketcall\",/i \ "socket",' pkg/seccomp/seccomp.json @@ -54,11 +48,8 @@ if [[ -n "$FEDORA" ]] || [[ "$RHEL" -ge 10 ]]; then sed -i -e '/^additionalimagestores\ =\ \[/a "\/usr\/lib\/containers\/storage",' storage.conf fi -# Set these on Fedora Rawhide (41+) and RHEL 10+ +# Set these on Fedora 41+ and RHEL 10+ # regardless of distro if [[ "$FEDORA" -gt 40 ]] || [[ "$RHEL" -ge 10 ]]; then ensure pkg/config/containers.conf compression_format \"zstd:chunked\" - ensure storage.conf pull_options \{enable_partial_images\ =\ \"true\",\ use_hard_links\ =\ \"false\",\ ostree_repos=\"\",\ convert_images\ =\ \"false\"\} - # Leave composefs disabled - ensure storage.conf use_composefs \"false\" fi