[37844] branches/gsoc08-privileges/base
pmagrath at macports.org
pmagrath at macports.org
Wed Jun 25 13:46:39 PDT 2008
Revision: 37844
http://trac.macosforge.org/projects/macports/changeset/37844
Author: pmagrath at macports.org
Date: 2008-06-25 13:46:39 -0700 (Wed, 25 Jun 2008)
Log Message:
-----------
Added a "make group" command to the Makefile and a "--with-shared-directory" switch to the configure script. Running "make group" will create a macports group with the gid of 441. "--with-shared-directory" will let let the group specified by "--with-install-group" have full read write access to the /opt/local hierarchy.
Modified Paths:
--------------
branches/gsoc08-privileges/base/Makefile.in
branches/gsoc08-privileges/base/aclocal.m4
branches/gsoc08-privileges/base/configure
branches/gsoc08-privileges/base/configure.ac
Modified: branches/gsoc08-privileges/base/Makefile.in
===================================================================
--- branches/gsoc08-privileges/base/Makefile.in 2008-06-25 20:40:39 UTC (rev 37843)
+++ branches/gsoc08-privileges/base/Makefile.in 2008-06-25 20:46:39 UTC (rev 37844)
@@ -36,12 +36,19 @@
include Mk/macports.subdir.mk
-install::
+install::
@echo ""; echo "Congratulations, you have successfully installed the MacPorts system. To get the Portfiles and update the system, run:"; echo ""
@echo "sudo port -v selfupdate"; echo ""
@echo "Please read \"man port\", the MacPorts guide at http://guide.macports.org/ and Wiki at http://trac.macports.org/ for full documentation."; echo ""
@echo "Stray sources might have been left in the legacy ${localstatedir}/db/dports directory after this upgrade, which moved most of what it could to ${localstatedir}/macports, so you might want to look in the former and cleanup manually."; echo ""
+group::
+ @echo "creating a macports group with gid 441..." && sudo dscl . create groups/macports && sudo dscl . create groups/macports gid 441 && echo "done! use './configure --with-install-group=macports --with-shared-directory' "
+
+rmgroup::
+ @echo "deleting macports group..." && sudo dscl . delete groups/macports && sudo dscl . create groups/macports gid 401 && echo "done! use 'make group' to re-create"
+
+
clean::
distclean::
Modified: branches/gsoc08-privileges/base/aclocal.m4
===================================================================
--- branches/gsoc08-privileges/base/aclocal.m4 2008-06-25 20:40:39 UTC (rev 37843)
+++ branches/gsoc08-privileges/base/aclocal.m4 2008-06-25 20:46:39 UTC (rev 37844)
@@ -292,6 +292,7 @@
# MP_CHECK_NOROOTPRIVILEGES
#-------------------------------------------------
AC_DEFUN([MP_CHECK_NOROOTPRIVILEGES],[
+ dnl if with user specifies --with-no-root-privileges,
dnl use current user and group.
dnl use ~/Library/Tcl as Tcl package directory
AC_REQUIRE([MP_PATH_MPCONFIGDIR])
@@ -320,14 +321,33 @@
TCL_PACKAGE_DIR=${PACKAGE_DIR_NATIVE}
AC_SUBST(TCL_PACKAGE_DIR)
if test x"${ac_cv_c_tclpkgd}" = x ; then
- AC_MSG_ERROR(Tcl package directory not found. Please specify its location with --with-tclpackage)
+ AC_MSG_ERROR(Tcl package directory not found. Please specify its location with --with-tclpackage)
else
- AC_MSG_RESULT(${ac_cv_c_tclpkgd})
+ AC_MSG_RESULT(${ac_cv_c_tclpkgd})
fi
fi
])
+
+# MP_SHARED_DIRECTORY
+#-------------------------------------------------
+AC_DEFUN([MP_SHARED_DIRECTORY],[
+ dnl if with user specifies --with-shared-directory,
+ dnl use 0775 permissions for ${prefix} directories
+ AC_REQUIRE([MP_PATH_MPCONFIGDIR])
+
+ AC_ARG_WITH(shared-directory, [AC_HELP_STRING([--with-shared-directory], [Use 0775 permissions for installed directories])], [ SHAREDIR=$withval ] )
+
+ if test "${SHAREDIR+set}" = set; then
+ AC_MSG_CHECKING([whether to share the install directory with all members of the install group])
+ DSTMODE=0775
+
+ AC_MSG_RESULT([$DSTMODE])
+ AC_SUBST(DSTMODE)
+ fi
+])
+
# MP_CHECK_INSTALLUSER
#-------------------------------------------------
AC_DEFUN([MP_CHECK_INSTALLUSER],[
Modified: branches/gsoc08-privileges/base/configure
===================================================================
--- branches/gsoc08-privileges/base/configure 2008-06-25 20:40:39 UTC (rev 37843)
+++ branches/gsoc08-privileges/base/configure 2008-06-25 20:46:39 UTC (rev 37844)
@@ -1405,6 +1405,7 @@
Specify group ownership of installed files
--with-directory-mode=MODE
Specify directory mode of installed directories
+ --with-shared-directory Use 0775 permissions for installed directories
--with-applications-dir Applications installation directory.
--with-frameworks-dir Frameworks installation directory.
--with-universal-target=MDT
@@ -6751,7 +6752,7 @@
# Set install-user to current user
{ echo "$as_me:$LINENO: checking for install user" >&5
echo $ECHO_N "checking for install user... $ECHO_C" >&6; }
- DSTUSR=`whoami`
+ DSTUSR=`id -un`
{ echo "$as_me:$LINENO: result: $DSTUSR" >&5
echo "${ECHO_T}$DSTUSR" >&6; }
@@ -6759,7 +6760,7 @@
# Set install-group to current user
{ echo "$as_me:$LINENO: checking for install group" >&5
echo $ECHO_N "checking for install group... $ECHO_C" >&6; }
- DSTGRP=`whoami`
+ DSTGRP=`id -gn`
{ echo "$as_me:$LINENO: result: $DSTGRP" >&5
echo "${ECHO_T}$DSTGRP" >&6; }
@@ -6773,11 +6774,11 @@
TCL_PACKAGE_DIR=${PACKAGE_DIR_NATIVE}
if test x"${ac_cv_c_tclpkgd}" = x ; then
- { { echo "$as_me:$LINENO: error: Tcl package directory not found. Please specify its location with --with-tclpackage" >&5
+ { { echo "$as_me:$LINENO: error: Tcl package directory not found. Please specify its location with --with-tclpackage" >&5
echo "$as_me: error: Tcl package directory not found. Please specify its location with --with-tclpackage" >&2;}
{ (exit 1); exit 1; }; }
else
- { echo "$as_me:$LINENO: result: ${ac_cv_c_tclpkgd}" >&5
+ { echo "$as_me:$LINENO: result: ${ac_cv_c_tclpkgd}" >&5
echo "${ECHO_T}${ac_cv_c_tclpkgd}" >&6; }
fi
fi
@@ -6860,6 +6861,26 @@
+
+
+
+# Check whether --with-shared-directory was given.
+if test "${with_shared_directory+set}" = set; then
+ withval=$with_shared_directory; SHAREDIR=$withval
+fi
+
+
+ if test "${SHAREDIR+set}" = set; then
+ { echo "$as_me:$LINENO: checking whether to share the install directory with all members of the install group" >&5
+echo $ECHO_N "checking whether to share the install directory with all members of the install group... $ECHO_C" >&6; }
+ DSTMODE=0775
+
+ { echo "$as_me:$LINENO: result: $DSTMODE" >&5
+echo "${ECHO_T}$DSTMODE" >&6; }
+
+ fi
+
+
# Check for default directories
Modified: branches/gsoc08-privileges/base/configure.ac
===================================================================
--- branches/gsoc08-privileges/base/configure.ac 2008-06-25 20:40:39 UTC (rev 37843)
+++ branches/gsoc08-privileges/base/configure.ac 2008-06-25 20:46:39 UTC (rev 37844)
@@ -141,6 +141,7 @@
MP_CHECK_INSTALLUSER
MP_CHECK_INSTALLGROUP
MP_DIRECTORY_MODE
+MP_SHARED_DIRECTORY
# Check for default directories
MP_PATH_APPLICATIONS
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-changes/attachments/20080625/80e28480/attachment-0001.htm
More information about the macports-changes
mailing list