@@ -23,6 +23,7 @@ if [ $# -gt 1 ]; then
2323 echo " install_rpms"
2424 echo " make_and_makeinstall"
2525 echo " patch_osbuild"
26+ echo " fixup_file_permissions"
2627 exit 1
2728fi
2829
@@ -112,16 +113,6 @@ install_rpms() {
112113 ln -s {/usr/share/distribution-gpg-keys/centos,/etc/pki/rpm-gpg}/RPM-GPG-KEY-CentOS-SIG-Virtualization
113114 fi
114115
115- # Allow group write permissions on /usr/ because in upstream project's
116- # CI we want to overwrite software for testing. The directories
117- # are typically owned by root:root and CI runs in openshift as a user
118- # that is a member of the `root` (GID: 0) group.
119- # See https://github.com/coreos/coreos-installer/pull/1716
120- chmod -R g+w /usr/
121- # And also one exception for /etc/grub.d (on arches that support
122- # grub) since ostree upstream tries to put a symlink in this directory.
123- [ -d /etc/grub.d ] && chmod g+rwx /etc/grub.d
124-
125116 # Further cleanup
126117 yum clean all
127118}
@@ -225,6 +216,19 @@ patch_osbuild() {
225216 # #mkdir -p /usr/lib/osbuild/osbuild
226217}
227218
219+ fixup_file_permissions () {
220+ # Allow group write permissions on /usr/ because in upstream project's
221+ # CI we want to overwrite software for testing. The directories
222+ # are typically owned by root:root and CI runs in openshift as a user
223+ # that is a member of the `root` (GID: 0) group.
224+ # See https://github.com/coreos/coreos-installer/pull/1716
225+ chmod -R g+w /usr/
226+ # And also one exception for /etc/grub.d (on arches that support
227+ # grub) since ostree upstream tries to put a symlink in this directory.
228+ [ -d /etc/grub.d ] && chmod g+rwx /etc/grub.d
229+
230+ }
231+
228232if [ $# -ne 0 ]; then
229233 # Run the function specified by the calling script
230234 ${1}
240244 trust_redhat_gpg_keys
241245 configure_user
242246 patch_osbuild
247+ fixup_file_permissions
243248fi
0 commit comments