-
Notifications
You must be signed in to change notification settings - Fork 115
Packit: initial enablement #30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -5,45 +5,45 @@ | |
| set -exo pipefail | ||
|
|
||
| ensure() { | ||
| if [[ ! -f $1 ]]; then | ||
| echo "File not found:" $1 | ||
| if [[ ! -f "$1" ]]; then | ||
| echo "File not found:" "$1" | ||
| exit 1 | ||
| fi | ||
| if grep ^$2[[:blank:]].*= $1 > /dev/null | ||
| if grep "^$2[[:blank:]].*=" "$1" > /dev/null | ||
| then | ||
| sed -i "s;^$2[[:blank:]]=.*;$2 = $3;" $1 | ||
| sed -i "s;^$2[[:blank:]]=.*;$2 = $3;" "$1" | ||
| else | ||
| if grep ^\#.*$2[[:blank:]].*= $1 > /dev/null | ||
| if grep "^\#.*$2[[:blank:]].*=" "$1" > /dev/null | ||
| then | ||
| sed -i "/^#.*$2[[:blank:]].*=/a \ | ||
| $2 = $3" $1 | ||
| $2 = $3" "$1" | ||
| else | ||
| echo "$2 = $3" >> $1 | ||
| 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\" | ||
| ensure image/registries.conf short-name-mode \"enforcing\" | ||
|
|
||
| ensure storage.conf driver \"overlay\" | ||
| ensure storage.conf mountopt \"nodev,metacopy=on\" | ||
| ensure storage/storage.conf driver \"overlay\" | ||
| ensure storage/storage.conf mountopt \"nodev,metacopy=on\" | ||
|
|
||
| ensure pkg/config/containers.conf runtime \"crun\" | ||
| ensure pkg/config/containers.conf log_driver \"journald\" | ||
| ensure common/pkg/config/containers.conf runtime \"crun\" | ||
| ensure common/pkg/config/containers.conf log_driver \"journald\" | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was some … discussion in #4 about how packaging happens. Does this risk interfering with downstream RPMs?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This has been happening already in containers-common rpm that was done from the c/common repo and shipped to Fedora for quite sometime now. Only the path was updated to match monorepo. The final list of files installed is not being changed (after I remove the additional docs stuff that you commented about) |
||
|
|
||
| FEDORA=$(rpm --eval '%{?fedora}') | ||
| RHEL=$(rpm --eval '%{?rhel}') | ||
|
|
||
| # Set search registries | ||
| if [[ -n "$FEDORA" ]]; then | ||
| ensure registries.conf unqualified-search-registries [\"registry.fedoraproject.org\",\ \"registry.access.redhat.com\",\ \"docker.io\"] | ||
| ensure image/registries.conf unqualified-search-registries [\"registry.fedoraproject.org\",\ \"registry.access.redhat.com\",\ \"docker.io\"] | ||
| else | ||
| ensure registries.conf unqualified-search-registries [\"registry.access.redhat.com\",\ \"registry.redhat.io\",\ \"docker.io\"] | ||
| ensure image/registries.conf unqualified-search-registries [\"registry.access.redhat.com\",\ \"registry.redhat.io\",\ \"docker.io\"] | ||
| fi | ||
|
|
||
| # Set these on all Fedora and RHEL 10+ | ||
| if [[ -n "$FEDORA" ]] || [[ "$RHEL" -ge 10 ]]; then | ||
| sed -i -e '/^additionalimagestores\ =\ \[/a "\/usr\/lib\/containers\/storage",' storage.conf | ||
| sed -i -e '/^additionalimagestores\ =\ \[/a "\/usr\/lib\/containers\/storage",' storage/storage.conf | ||
| fi | ||
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I assume that change is intentional?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, this one is intentional. We're not doing centos stream official updates via packit atm.