From da4228e1636d17c024db6adfb882634983ff6e48 Mon Sep 17 00:00:00 2001 From: Mohan Boddu Date: Wed, 8 Apr 2020 17:22:57 -0400 Subject: [PATCH] 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 --- nightly.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/nightly.sh b/nightly.sh index e9a6cbc..72f3a4c 100755 --- a/nightly.sh +++ b/nightly.sh @@ -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/32/${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 # Tell interested persons that the rsync is done. send_fedmsg "${fedmsg_json_done}" ${RELEASE} rsync.complete