Skip to content
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

cmdlib: support statoverride file in root of an overlay.d directory #2293

Merged
merged 1 commit into from
Jul 15, 2021
Merged

cmdlib: support statoverride file in root of an overlay.d directory #2293

merged 1 commit into from
Jul 15, 2021

Conversation

bgilbert
Copy link
Contributor

@bgilbert bgilbert commented Jul 14, 2021

If an overlay.d directory contains a file called statoverride at the root, pass it to ostree. This allows overlay files to have permission bits that aren't tracked by Git.

statoverride files don't support comments. For convenience, filter out lines starting with #.

@bgilbert
Copy link
Contributor Author

/retest

Copy link
Member

@jlebon jlebon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool, thanks for picking this up! Need to appease ShellCheck at least.

Otherwise, some optional bits but LGTM overall.

src/cmdlib.sh Outdated
@@ -273,10 +273,22 @@ commit_overlay() {
# using ostree's --statoverride when dealing with executable files. See:
# https://github.com/ostreedev/ostree/issues/2368
rm -rf "${TMPDIR}/overlay" && (umask 0022 && cp -r "${respath}" "${TMPDIR}/overlay")
# Apply statoverrides from a file in the root of the overlay. ostree
# doesn't support comments in statoverride files, but we do.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ahh yeah, I think it'd make sense to support comments in that file.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If an overlay.d directory contains a file called "statoverride" at the
root, pass it to ostree.  This allows overlay files to have permission
bits that aren't tracked by Git.

statoverride files don't support comments.  For convenience, filter out
lines starting with "#".
Copy link
Member

@jlebon jlebon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/override ci/prow/sanity

@openshift-ci
Copy link

openshift-ci bot commented Jul 15, 2021

@jlebon: Overrode contexts on behalf of jlebon: ci/prow/sanity

In response to this:

/override ci/prow/sanity

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@jlebon jlebon merged commit f26e869 into coreos:main Jul 15, 2021
@bgilbert bgilbert deleted the statoverride branch July 15, 2021 17:45
jlebon pushed a commit to coreos/fedora-coreos-config that referenced this pull request Jul 15, 2021
This is a no-op, but helps document the functionality.

Part of coreos/coreos-assembler#2293.
HuijingHei pushed a commit to HuijingHei/fedora-coreos-config that referenced this pull request Oct 10, 2023
This is a no-op, but helps document the functionality.

Part of coreos/coreos-assembler#2293.
HuijingHei pushed a commit to HuijingHei/fedora-coreos-config that referenced this pull request Oct 10, 2023
This is a no-op, but helps document the functionality.

Part of coreos/coreos-assembler#2293.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants