[MacPorts] #31827: MacPorts should make ${workpath}/home and set HOME to it

MacPorts noreply at macports.org
Sun Jan 15 08:43:18 PST 2012


#31827: MacPorts should make ${workpath}/home and set HOME to it
----------------------------------+-----------------------------------------
 Reporter:  ecronin@…             |       Owner:  macports-tickets@…                   
     Type:  defect                |      Status:  new                                  
 Priority:  Normal                |   Milestone:  MacPorts Future                      
Component:  base                  |     Version:  2.0.3                                
 Keywords:                        |        Port:                                       
----------------------------------+-----------------------------------------

Comment(by ecronin@…):

 Since it looks like we might be ramping up for a new release soon, can we
 get some sort of fix for this in then?

 Ryan's suggestion of a per-build ${workpath}/home is probably a more
 complete solution, but I think just globally setting ${HOME} to /var/empty
 before spawning any subprocesses would be no more broken than the current
 situation, and would fix at least 95% of the 'bad' ports without breaking
 any that currently work.  The only ports that actually need
 ${workpath}/home over an unwritable /var/empty are ones that write to
 ${HOME} and fail hard if they are unable to do so, and maybe non-standard
 Portfiles in external port trees that intentionally depend on access to
 the user's home directory, e.g. to access .svn login info for a private
 repo.  If the port works with read-only access to the user's ${HOME} it
 should work with read-only access to an empty ${HOME}

 The full solution would probably be something like a (default empty)
 ${prefix}/etc/macports/mpuser.skel directory (to allow intentionally
 tweaking the mpuser's environment) which is copied to ${workpath}/home
 each time and ${HOME} set to point to that.  But just setting ${HOME} to
 /var/empty is probably a single line change and 5 minutes to the person
 who already knows the right spot in base to stick that line.

-- 
Ticket URL: <https://trac.macports.org/ticket/31827#comment:7>
MacPorts <http://www.macports.org/>
Ports system for Mac OS


More information about the macports-tickets mailing list