[MacPorts] #31827: fetch.type bzr: permission issues due to incorrect ${HOME}

MacPorts noreply at macports.org
Sat Oct 29 14:46:58 PDT 2011


#31827: fetch.type bzr: permission issues due to incorrect ${HOME}
----------------------------------+-----------------------------------------
 Reporter:  ecronin@…             |       Owner:  macports-tickets@…                   
     Type:  defect                |      Status:  new                                  
 Priority:  Normal                |   Milestone:                                       
Component:  base                  |     Version:  2.0.3                                
 Keywords:                        |        Port:                                       
----------------------------------+-----------------------------------------
 Ports using fetch.type bzr don't seem to reset ${HOME} to /var/empty
 before executing the fetch command.  This results in bzr trying to read
 ${home}/.bazaar (warning if it doesn't exist; fatal error if it exists but
 is unreadable by the macports user) and write ${HOME}/.bzr.log (warning if
 it can't be written).

 Unless I move aside ~/.bazaar before installing/upgrading the fetch stage
 fails because bzr errors out.  If I set HOME=/var/empty before running
 port it succeeds even with ~/.bazaar present.

 Failure:
 {{{
 [buster] ecronin% ls -ld ~/.bazaar
 drwx------  6 ecronin  staff  204 Jul 30 21:55 /Users/ecronin/.bazaar/
 [buster] ecronin% sudo port clean inkscape-devel
 --->  Cleaning inkscape-devel
 [buster] ecronin% sudo port -d fetch inkscape-devel 2>&1 | tail -25
 DEBUG: euid/egid changed to: 502/501
 DEBUG: Executing proc-pre-org.macports.fetch-fetch-0
 --->  Fetching source from bzr repository: this may take a while
 DEBUG: Executing org.macports.fetch (inkscape-devel)
 DEBUG: Environment: CPATH='/opt/local/include'
 CC_PRINT_OPTIONS_FILE='/opt/local/var/macports/build
 /_Users_ecronin_Source_macports_dports_graphics_inkscape-devel/inkscape-
 devel/work/.CC_PRINT_OPTIONS' LIBRARY_PATH='/opt/local/lib'
 CC_PRINT_OPTIONS='YES' MACOSX_DEPLOYMENT_TARGET='10.7'
 DEBUG: Assembled command: 'cd "/opt/local/var/macports/build
 /_Users_ecronin_Source_macports_dports_graphics_inkscape-devel/inkscape-
 devel/work" && /opt/local/bin/bzr --builtin --no-aliases checkout
 --lightweight -r 10696 lp:inkscape inkscape-devel-0.48.99.10696'
 DEBUG: Executing command line:  cd "/opt/local/var/macports/build
 /_Users_ecronin_Source_macports_dports_graphics_inkscape-devel/inkscape-
 devel/work" && /opt/local/bin/bzr --builtin --no-aliases checkout
 --lightweight -r 10696 lp:inkscape inkscape-devel-0.48.99.10696 2>&1
 failed to open trace file: [Errno 13] Permission denied:
 '/Users/ecronin/.bzr.log'
 [85004] 2011-10-29 17:33:59.519 WARNING: You have not informed bzr of your
 Launchpad ID, and you must do this to
 write to Launchpad or access private data.  See "bzr help launchpad-
 login".
 You have not informed bzr of your Launchpad ID, and you must do this to
 write to Launchpad or access private data.  See "bzr help launchpad-
 login".
 bzr: ERROR: Permission denied: "/Users/ecronin/.bazaar/locations.conf":
 [Errno 13] Permission denied: u'/Users/ecronin/.bazaar/locations.conf'
 shell command " cd "/opt/local/var/macports/build
 /_Users_ecronin_Source_macports_dports_graphics_inkscape-devel/inkscape-
 devel/work" && /opt/local/bin/bzr --builtin --no-aliases checkout
 --lightweight -r 10696 lp:inkscape inkscape-devel-0.48.99.10696 2>&1"
 returned error 3
 Error: Target org.macports.fetch returned: Bazaar checkout failed
 DEBUG: Backtrace: Bazaar checkout failed
     while executing
 "bzrfetch"
     (procedure "portfetch::fetch_main" line 11)
     invoked from within
 "$procedure $targetname"
 Warning: the following items did not execute (for inkscape-devel):
 org.macports.fetch
 Log for inkscape-devel is at: /opt/local/var/macports/logs
 /_Users_ecronin_Source_macports_dports_graphics_inkscape-devel/inkscape-
 devel/main.log
 Error: Status 1 encountered during processing.
 To report a bug, see <http://guide.macports.org/#project.tickets>
 }}}


 Success:
 {{{
 [buster] ecronin% ls -ld ~/.bazaar
 drwx------  6 ecronin  staff  204 Jul 30 21:55 /Users/ecronin/.bazaar/
 [buster] ecronin% sudo port clean inkscape-devel
 --->  Cleaning inkscape-devel
 [buster] ecronin% HOME=/var/empty sudo port -d fetch inkscape-devel 2>&1 |
 tail -25
 DEBUG: Requested variant atlas is not provided by port py27-pyrex.
 DEBUG: No need to upgrade! py27-pyrex 0.9.9_0 >= py27-pyrex 0.9.9_0
 --->  Computing dependencies for inkscape-devel
 DEBUG: Searching for dependency: bzr
 DEBUG: Found Dependency: receipt exists for bzr
 DEBUG: Executing org.macports.main (inkscape-devel)
 DEBUG: changing euid/egid - current euid: 0 - current egid: 0
 DEBUG: egid changed to: 501
 DEBUG: euid changed to: 502
 DEBUG: fetch phase started at Sat Oct 29 17:34:31 EDT 2011
 --->  Fetching inkscape-devel
 DEBUG: euid/egid changed to: 0/0
 DEBUG: chowned /opt/local/var/macports/distfiles/inkscape-devel to
 macports
 DEBUG: euid/egid changed to: 502/501
 DEBUG: Executing proc-pre-org.macports.fetch-fetch-0
 --->  Fetching source from bzr repository: this may take a while
 DEBUG: Executing org.macports.fetch (inkscape-devel)
 DEBUG: Environment: CPATH='/opt/local/include'
 CC_PRINT_OPTIONS_FILE='/opt/local/var/macports/build
 /_Users_ecronin_Source_macports_dports_graphics_inkscape-devel/inkscape-
 devel/work/.CC_PRINT_OPTIONS' LIBRARY_PATH='/opt/local/lib'
 CC_PRINT_OPTIONS='YES' MACOSX_DEPLOYMENT_TARGET='10.7'
 DEBUG: Assembled command: 'cd "/opt/local/var/macports/build
 /_Users_ecronin_Source_macports_dports_graphics_inkscape-devel/inkscape-
 devel/work" && /opt/local/bin/bzr --builtin --no-aliases checkout
 --lightweight -r 10696 lp:inkscape inkscape-devel-0.48.99.10696'
 DEBUG: Executing command line:  cd "/opt/local/var/macports/build
 /_Users_ecronin_Source_macports_dports_graphics_inkscape-devel/inkscape-
 devel/work" && /opt/local/bin/bzr --builtin --no-aliases checkout
 --lightweight -r 10696 lp:inkscape inkscape-devel-0.48.99.10696 2>&1
 failed to open trace file: [Errno 13] Permission denied:
 '/var/empty/.bzr.log'
 [85018] 2011-10-29 17:34:32.547 WARNING: You have not informed bzr of your
 Launchpad ID, and you must do this to
 write to Launchpad or access private data.  See "bzr help launchpad-
 login".
 You have not informed bzr of your Launchpad ID, and you must do this to
 write to Launchpad or access private data.  See "bzr help launchpad-
 login".
 [buster] ecronin% HOME=/var/empty sudo port -d fetch inkscape-devel 2>&1 |
 tail -25
 Password:
 DEBUG: No need to upgrade! py27-distribute 0.6.24_0 >= py27-distribute
 0.6.24_0
 DEBUG: epoch: in tree: 0 installed: 0
 DEBUG: py27-pyrex 0.9.9_0 exists in the ports tree
 DEBUG: py27-pyrex 0.9.9_0  is the latest installed
 DEBUG: py27-pyrex 0.9.9_0  is active
 DEBUG: Merging existing variants '' into variants
 DEBUG: new fully merged portvariants: atlas -
 DEBUG: Changing to port directory:
 /Users/ecronin/Source/macports/dports/python/py27-pyrex
 DEBUG: OS darwin/11.2.0 (Mac OS X 10.7) arch i386
 DEBUG: org.macports.load registered provides 'load', a pre-existing
 procedure. Target override will not be provided
 DEBUG: org.macports.unload registered provides 'unload', a pre-existing
 procedure. Target override will not be provided
 DEBUG: org.macports.distfiles registered provides 'distfiles', a pre-
 existing procedure. Target override will not be provided
 DEBUG: Using group file
 /Users/ecronin/Source/macports/dports/_resources/port1.0/group/python27-1.0.tcl
 DEBUG: adding the default universal variant
 DEBUG: Reading variant descriptions from
 /Users/ecronin/Source/macports/dports/_resources/port1.0/variant_descriptions.conf
 DEBUG: Requested variant atlas is not provided by port py27-pyrex.
 DEBUG: No need to upgrade! py27-pyrex 0.9.9_0 >= py27-pyrex 0.9.9_0
 --->  Computing dependencies for inkscape-devel
 DEBUG: Searching for dependency: bzr
 DEBUG: Found Dependency: receipt exists for bzr
 DEBUG: Executing org.macports.main (inkscape-devel)
 DEBUG: changing euid/egid - current euid: 0 - current egid: 0
 DEBUG: egid changed to: 501
 DEBUG: euid changed to: 502
 DEBUG: Skipping completed org.macports.fetch (inkscape-devel)
 }}}

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


More information about the macports-tickets mailing list