[39296] branches/gsoc08-privileges/base
pmagrath at macports.org
pmagrath at macports.org
Sat Aug 16 06:46:51 PDT 2008
Revision: 39296
http://trac.macosforge.org/projects/macports/changeset/39296
Author: pmagrath at macports.org
Date: 2008-08-16 06:46:50 -0700 (Sat, 16 Aug 2008)
Log Message:
-----------
Add to ChangeLog all changes brought in by the branch. Change default of install.asroot to false. Update readme.
Modified Paths:
--------------
branches/gsoc08-privileges/base/ChangeLog
branches/gsoc08-privileges/base/README.txt
branches/gsoc08-privileges/base/src/port1.0/portinstall.tcl
Modified: branches/gsoc08-privileges/base/ChangeLog
===================================================================
--- branches/gsoc08-privileges/base/ChangeLog 2008-08-16 10:25:52 UTC (rev 39295)
+++ branches/gsoc08-privileges/base/ChangeLog 2008-08-16 13:46:50 UTC (rev 39296)
@@ -5,12 +5,50 @@
Unreleased:
+
+ - MacPorts now performs fetch, extract, patch, configure and build in a
+ user rather than system owned location. By default, this is
+ ~/.macports/opt. This allows MacPorts to do all but the install of the
+ port without root privileges. (gsoc08-privileges)
+
+ - MacPorts now automatically drops privileges whenever possible so as to
+ avoid running as root whenever possible. (gsoc08-privileges)
+
+ - MacPorts will prompt for the root password if you attempt to install a
+ port into the /opt hierarchy and did not start MacPorts with sudo. It
+ will not do so however until the install stage. The fetch, extract,
+ patch, configure and build will proceed first under the privileges
+ MacPorts is started with. (gsoc08-privileges)
+
+ - The Portfile format has a number of new boolean attributes to indicate
+ when an action should or should not be run with root privileges:
+ 'patch.asroot', 'build.asroot', 'configure.asroot', 'destroot.asroot',
+ and 'install.asroot'. The default for all is "no". If the prefix folder
+ (by default /opt/local) is not writable, MacPorts will attempt to
+ elevate privileges to root for the install phase. (gsoc08-privileges)
+
+ - A "make group" command has been added to the Makefile and a
+ "--with-shared-directory" switch to the configure script. Running "make
+ group" will create a macports group. "--with-shared-directory" will let
+ let the group specified by "--with-install-group" have full read write
+ access to the /opt/local hierarchy. This will allow users who are
+ members of the new macports group to have full write permissions to /opt
+ and its subfolders, and hence to install ports which only affect that
+ hierarchy to install those ports without requiring root privileges.
+ (gsoc08-privileges)
+
+ - A switch called "--with-no-root-privileges" has been added for use by
+ user installing MacPorts for their own use only. An example configure
+ command would be "./configure
+ --prefix=/Users/{your-user-name-here}/.macports/opt
+ --with-no-root-privileges" (gsoc08-privileges)
+
- Ruby port group now accepts a new (optional) last parameter for the
ruby.setup command, "implementation". It is "ruby" by default, and
can be set to "ruby19". It names the ruby-implementing port, and can
possibly support still other rubys in the future. (#15912, febeling
in 38683)
-
+
- Don't use build.nice for complex build.cmd commands (#16091)
- The buildmakejobs setting now also affects ports using the scons build
Modified: branches/gsoc08-privileges/base/README.txt
===================================================================
--- branches/gsoc08-privileges/base/README.txt 2008-08-16 10:25:52 UTC (rev 39295)
+++ branches/gsoc08-privileges/base/README.txt 2008-08-16 13:46:50 UTC (rev 39296)
@@ -29,7 +29,7 @@
3) MacPorts will prompt for the root password if you attempt to install a port into the /opt hierarchy and did not start MacPorts with sudo. It will not do so however until the install stage. The fetch, extract, patch, configure and build will proceed first under the privileges MacPorts is started with.
-4) The Portfile format has a number of new boolean attributes to indicate when an action should or should not be run with root privileges: 'patch.asroot', 'build.asroot', 'configure.asroot', 'destroot.asroot', and 'install.asroot'. The default for all is "no" except for 'install.asroot', which defaults to "yes".
+4) The Portfile format has a number of new boolean attributes to indicate when an action should or should not be run with root privileges: 'patch.asroot', 'build.asroot', 'configure.asroot', 'destroot.asroot', and 'install.asroot'. The default for all is "no". If the prefix folder (by default /opt/local) is not writable, MacPorts will attempt to elevate privileges to root for the install phase.
5) MacPorts now supports two new, additional, installation options. Each of these is a distinct alternative to the current standard installation option.
(a) A "make group" command has been added to the Makefile and a "--with-shared-directory" switch to the configure script. Running "make group" will create a macports group. "--with-shared-directory" will let let the group specified by "--with-install-group" have full read write access to the /opt/local hierarchy. This will allow users who are members of the new macports group to have full write permissions to /opt and its subfolders, and hence to install ports which only affect that hierarchy to install those ports without requiring root privileges.
Modified: branches/gsoc08-privileges/base/src/port1.0/portinstall.tcl
===================================================================
--- branches/gsoc08-privileges/base/src/port1.0/portinstall.tcl 2008-08-16 10:25:52 UTC (rev 39295)
+++ branches/gsoc08-privileges/base/src/port1.0/portinstall.tcl 2008-08-16 13:46:50 UTC (rev 39296)
@@ -48,19 +48,22 @@
options install.asroot
# Set defaults
-default install.asroot yes
+default install.asroot no
set_ui_prefix
proc install_start {args} {
global UI_PREFIX portname portversion portrevision variations portvariants
- global install.asroot
+ global install.asroot prefix
ui_msg "$UI_PREFIX [format [msgcat::mc "Installing %s @%s_%s%s"] $portname $portversion $portrevision $portvariants]"
# start gsoc08-privileges
if { [tbool install.asroot] } {
- # if port isn't marked as not needing root
+ # if port is marked as needing root
elevateToRoot "install"
+ } elseif { ![file writable $prefix] } {
+ # if install location is not writable, need root privileges to install
+ elevateToRoot "install"
}
# end gsoc08-privileges
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-changes/attachments/20080816/dbdf05b4/attachment.html
More information about the macports-changes
mailing list