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
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion src/cmdlib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -273,10 +273,16 @@ 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, which may
# or may not exist. ostree doesn't support comments in statoverride
# files, but we do.
touch "${TMPDIR}/overlay/statoverride"
echo -n "Committing ${name}: ${path} ... "
ostree commit --repo="${tmprepo}" --tree=dir="${TMPDIR}/overlay" -b "${name}" \
--owner-uid 0 --owner-gid 0 --no-xattrs --no-bindings --parent=none \
--mode-ro-executables --timestamp "${git_timestamp}"
--mode-ro-executables --timestamp "${git_timestamp}" \
--statoverride <(sed -e '/^#/d' "${TMPDIR}/overlay/statoverride") \
--skip-list <(echo /statoverride)
}

# Implement support for automatic local overrides:
Expand Down