[Rt-commit] rt branch, 4.2/configure-primary-group, created. rt-4.2.3-29-g8f73c12
Alex Vandiver
alexmv at bestpractical.com
Wed Mar 12 21:03:40 EDT 2014
The branch, 4.2/configure-primary-group has been created
at 8f73c120ec3af8c95bca9751eb963ce939e461f6 (commit)
- Log -----------------------------------------------------------------
commit 8f73c120ec3af8c95bca9751eb963ce939e461f6
Author: Alex Vandiver <alexmv at bestpractical.com>
Date: Wed Mar 12 21:02:50 2014 -0400
Switch to a portable implementation of `id -gn`
The ouput of `groups` may not list the primary group first -- and while
`id -gn` works in most Unix-like platforms, it does not work on Solaris.
Re-implement it using $PERL, for portability.
diff --git a/configure.ac b/configure.ac
index 457d952..cd55c3e 100755
--- a/configure.ac
+++ b/configure.ac
@@ -212,9 +212,7 @@ AC_ARG_WITH(rt-group,
AC_SUBST(RTGROUP)
dnl INSTALL AS ME
-# XXX TODO: The command below to figure out the group brokenly relies on
-# output order (and "id -gn" doesn't work on all platforms).
-my_group=$(groups|cut -f1 -d' ')
+my_group=$($PERL -MPOSIX=getgid -le 'print scalar getgrgid getgid')
my_user=${USER:-$LOGNAME}
AC_ARG_WITH(my-user-group,
AC_HELP_STRING([--with-my-user-group],
-----------------------------------------------------------------------
More information about the rt-commit
mailing list