Set umask to 0002 for ostree operations

See https://github.com/ostreedev/ostree/pull/1984 where OSTree was
changed to try to set group write on directories. We need to set a more
permissive umask to take advantage of it.

This is all done to support writing to the OSTree repo from OpenShift
projects that run as a random UID, but have ftpsync (gid:263) in their
supplemental groups. For more context see: https://pagure.io/releng/issue/8811#comment-629051

Signed-off-by: Mohan Boddu <mboddu@bhujji.com>
This commit is contained in:
Mohan Boddu 2020-04-08 17:22:57 -04:00
parent aeef32b50d
commit 95fb8fd49c

View File

@ -187,6 +187,10 @@ $RSYNCPREFIX rm "$RSYNCSECTARGET/.composeinfo"
$RSYNCPREFIX ./releng/scripts/build_composeinfo "$RSYNCSECTARGET/" --name "$NEWCOMPOSE_ID"
# sync Silverblue to the unified ostree repo
# Set the umask to so directories can get group write
# https://pagure.io/releng/issue/8811
old_umask=$(umask)
umask 0002
for arch in x86_64 ppc64le aarch64; do
ref="fedora/rawhide/${arch}/silverblue"
if ! ostree --repo=$OSTREESRCREPO rev-parse "${ref}"; then continue; fi
@ -194,6 +198,8 @@ for arch in x86_64 ppc64le aarch64; do
ostree pull-local --repo=$OSTREEDESTREPO $OSTREESRCREPO --depth=-1 "${ref}"
ostree summary -u --repo=$OSTREEDESTREPO # update summary file
done
# Set to old umask
umask $old_umask
# Push rawhide base container image to fedora registry
pushd ./releng