12 | | Paul is also available in #macports on FreeNode as '''pmagrath'''. |
| 10 | I'm available in #macports on FreeNode as '''pmagrath'''. |
| 11 | |
| 12 | |
| 13 | == branches/gsoc08-privileges == |
| 14 | |
| 15 | === Summary === |
| 16 | To implement facility to reduce need to execute MacPorts as root. |
| 17 | |
| 18 | |
| 19 | === The Plan === |
| 20 | The proposal is to implement a number of improvements to the MacPorts code base in order to reduce the need to execute MacPorts with root privileges. |
| 21 | |
| 22 | Firstly, MacPort operations which do not explicitly need root privileges will be re-coded so that they will run with normal user privileges. Examples would include fetching, extracting and building the port. |
| 23 | |
| 24 | Secondly, the portfile format shall be extended with an additional attribute to mark those ports that can not be installed without root privileges, such as those requiring StartupItems. |
| 25 | |
| 26 | Thirdly, MacPort will allow users with full write permissions to /opt and its subfolders to install ports which only affect that hierarchy to install those ports without requiring root privileges. |
| 27 | |
| 28 | Finally, MacPort will allow users to install packages into their own ~/opt instead of /opt when non root users wish to install a package for their own use only. |
| 29 | |
| 30 | A stretch goal would be to modify MacPorts to drop root privileges for all but the install part of the port installation process. |
| 31 | |
| 32 | I would feel that the best behavior for if MacPorts is requested to perform a privileged operation for a port, if it currently has no privileged access would be for the user to be given the choice of elevating privileges (by evoking sudo), installing in a fakeroot or aborting. The complications are that there is currently no way of knowing whether a port needs privileges, creating a fakeroot mechanism, cleanly elevating and de-elevating privileges. |
| 33 | |
| 34 | |
| 35 | === Goals === |
| 36 | 1) Implementation of each of the four improvements mentioned above.[[BR]] |
| 37 | 2) Ability to easily install common packages without root privileges.[[BR]] |
| 38 | 3) (Long term) Use of MacPorts without root user account activation.[[BR]] |
| 39 | |