Changeset 37844


Ignore:
Timestamp:
Jun 25, 2008, 8:46:39 PM (12 years ago)
Author:
pmagrath@…
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.

Location:
branches/gsoc08-privileges/base
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • branches/gsoc08-privileges/base/Makefile.in

    r34251 r37844  
    3737include Mk/macports.subdir.mk
    3838
    39 install::
     39install::       
    4040        @echo ""; echo "Congratulations, you have successfully installed the MacPorts system. To get the Portfiles and update the system, run:"; echo ""
    4141        @echo "sudo port -v selfupdate"; echo ""
    4242        @echo "Please read \"man port\", the MacPorts guide at http://guide.macports.org/ and Wiki at http://trac.macports.org/ for full documentation."; echo ""
    4343        @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 ""
     44
     45group::
     46        @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' "
     47
     48rmgroup::
     49        @echo "deleting macports group..." && sudo dscl . delete groups/macports && sudo dscl . create groups/macports gid 401 && echo "done! use 'make group' to re-create"
     50
    4451
    4552clean::
  • branches/gsoc08-privileges/base/aclocal.m4

    r37804 r37844  
    293293#-------------------------------------------------
    294294AC_DEFUN([MP_CHECK_NOROOTPRIVILEGES],[
     295        dnl if with user specifies --with-no-root-privileges,
    295296        dnl use current user and group.
    296297        dnl use ~/Library/Tcl as Tcl package directory
     
    321322            AC_SUBST(TCL_PACKAGE_DIR)
    322323                if test x"${ac_cv_c_tclpkgd}" = x ; then
    323                 AC_MSG_ERROR(Tcl package directory not found.  Please specify its location with --with-tclpackage)
     324                        AC_MSG_ERROR(Tcl package directory not found.  Please specify its location with --with-tclpackage)
    324325            else
    325                 AC_MSG_RESULT(${ac_cv_c_tclpkgd})
     326                        AC_MSG_RESULT(${ac_cv_c_tclpkgd})
    326327            fi
    327328        fi
    328329
     330])
     331
     332
     333# MP_SHARED_DIRECTORY
     334#-------------------------------------------------
     335AC_DEFUN([MP_SHARED_DIRECTORY],[
     336        dnl if with user specifies --with-shared-directory,
     337        dnl use 0775 permissions for ${prefix} directories
     338        AC_REQUIRE([MP_PATH_MPCONFIGDIR])
     339
     340        AC_ARG_WITH(shared-directory, [AC_HELP_STRING([--with-shared-directory], [Use 0775 permissions for installed directories])], [ SHAREDIR=$withval ] )
     341
     342        if test "${SHAREDIR+set}" = set; then   
     343                AC_MSG_CHECKING([whether to share the install directory with all members of the install group])
     344            DSTMODE=0775
     345
     346                AC_MSG_RESULT([$DSTMODE])
     347                AC_SUBST(DSTMODE)
     348        fi
    329349])
    330350
  • branches/gsoc08-privileges/base/configure

    r37742 r37844  
    14061406  --with-directory-mode=MODE
    14071407                          Specify directory mode of installed directories
     1408  --with-shared-directory Use 0775 permissions for installed directories
    14081409  --with-applications-dir Applications installation directory.
    14091410  --with-frameworks-dir   Frameworks installation directory.
     
    67526753                { echo "$as_me:$LINENO: checking for install user" >&5
    67536754echo $ECHO_N "checking for install user... $ECHO_C" >&6; }
    6754                 DSTUSR=`whoami`
     6755                DSTUSR=`id -un`
    67556756                { echo "$as_me:$LINENO: result: $DSTUSR" >&5
    67566757echo "${ECHO_T}$DSTUSR" >&6; }
     
    67606761                { echo "$as_me:$LINENO: checking for install group" >&5
    67616762echo $ECHO_N "checking for install group... $ECHO_C" >&6; }
    6762                 DSTGRP=`whoami`
     6763                DSTGRP=`id -gn`
    67636764                { echo "$as_me:$LINENO: result: $DSTGRP" >&5
    67646765echo "${ECHO_T}$DSTGRP" >&6; }
     
    67746775
    67756776                if test x"${ac_cv_c_tclpkgd}" = x ; then
    6776                 { { echo "$as_me:$LINENO: error: Tcl package directory not found.  Please specify its location with --with-tclpackage" >&5
     6777                        { { echo "$as_me:$LINENO: error: Tcl package directory not found.  Please specify its location with --with-tclpackage" >&5
    67776778echo "$as_me: error: Tcl package directory not found.  Please specify its location with --with-tclpackage" >&2;}
    67786779   { (exit 1); exit 1; }; }
    67796780            else
    6780                 { echo "$as_me:$LINENO: result: ${ac_cv_c_tclpkgd}" >&5
     6781                        { echo "$as_me:$LINENO: result: ${ac_cv_c_tclpkgd}" >&5
    67816782echo "${ECHO_T}${ac_cv_c_tclpkgd}" >&6; }
    67826783            fi
     
    68596860echo "${ECHO_T}$DSTMODE" >&6; }
    68606861
     6862
     6863
     6864
     6865
     6866
     6867# Check whether --with-shared-directory was given.
     6868if test "${with_shared_directory+set}" = set; then
     6869  withval=$with_shared_directory;  SHAREDIR=$withval
     6870fi
     6871
     6872
     6873        if test "${SHAREDIR+set}" = set; then
     6874                { echo "$as_me:$LINENO: checking whether to share the install directory with all members of the install group" >&5
     6875echo $ECHO_N "checking whether to share the install directory with all members of the install group... $ECHO_C" >&6; }
     6876            DSTMODE=0775
     6877
     6878                { echo "$as_me:$LINENO: result: $DSTMODE" >&5
     6879echo "${ECHO_T}$DSTMODE" >&6; }
     6880
     6881        fi
    68616882
    68626883
  • branches/gsoc08-privileges/base/configure.ac

    r37620 r37844  
    142142MP_CHECK_INSTALLGROUP
    143143MP_DIRECTORY_MODE
     144MP_SHARED_DIRECTORY
    144145
    145146# Check for default directories
Note: See TracChangeset for help on using the changeset viewer.