From 2ef2f3d77b9b56373fdb26300ebd260fdeb48806 Mon Sep 17 00:00:00 2001 From: Bruce Potter Date: Wed, 6 Nov 2013 10:15:13 -0500 Subject: [PATCH] fix chgrp problem in build scripts on aix --- buildcore.sh | 17 ++++++----------- builddep.sh | 13 ++++--------- 2 files changed, 10 insertions(+), 20 deletions(-) diff --git a/buildcore.sh b/buildcore.sh index 0b59d4895..b3d2e7887 100755 --- a/buildcore.sh +++ b/buildcore.sh @@ -137,8 +137,10 @@ SRCD=core-snap-srpms # currently aix builds ppc rpms, but someday it should build noarch if [ "$OSNAME" = "AIX" ]; then NOARCH=ppc + SYSGRP=system else NOARCH=noarch + SYSGRP=root fi function setversionvars { @@ -369,20 +371,13 @@ if [ "$OSNAME" != "AIX" ]; then fi fi -# make everything have a group of xcat, so anyone can manage them once they get on SF +# set group and permissions correctly on the built rpms if [ "$OSNAME" = "AIX" ]; then - if ! lsgroup xcat >/dev/null 2>&1; then - mkgroup xcat - fi chmod +x $DESTDIR/instxcat -else # linux - if ! $GREP xcat /etc/group; then - groupadd xcat - fi fi -chgrp -R root $DESTDIR +chgrp -R $SYSGRP $DESTDIR chmod -R g+w $DESTDIR -chgrp -R root $SRCDIR +chgrp -R $SYSGRP $SRCDIR chmod -R g+w $SRCDIR else # end of very long if-not-promote @@ -442,7 +437,7 @@ if [ "$OSNAME" = "AIX" ]; then else tar $verboseflag -hjcf $TARNAME $XCATCORE fi -chgrp root $TARNAME +chgrp $SYSGRP $TARNAME chmod g+w $TARNAME # Decide whether to upload or not diff --git a/builddep.sh b/builddep.sh index 3291ebad2..f5959c8bf 100755 --- a/builddep.sh +++ b/builddep.sh @@ -201,18 +201,13 @@ EOF chmod +x instoss fi -# Get the permissions correct. Have to have all dirs/files with a group of xcat -# and have them writeable by group, so any member of the xcat can build. +# Get the permissions and group correct if [ "$OSNAME" == "AIX" ]; then - if ! lsgroup xcat >/dev/null 2>&1; then - mkgroup xcat - fi + SYSGRP=system else - if ! $GREP xcat /etc/group; then - groupadd xcat - fi + SYSGRP=root fi -chgrp -R root * +chgrp -R $SYSGRP * chmod -R g+w * # Build the tarball