diff --git a/src/cmdlib.sh b/src/cmdlib.sh index 58323ac26d..92f53f7f57 100755 --- a/src/cmdlib.sh +++ b/src/cmdlib.sh @@ -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: