Opened 10 years ago

Closed 10 years ago

Last modified 8 years ago

#44240 closed defect (fixed)

tracelib: resource forks not handled correctly

Reported by: Ionic (Mihai Moldovan) Owned by: macports-tickets@…
Priority: Normal Milestone: MacPorts 2.4.0
Component: base Version: 2.3.99
Keywords: tracemode Cc: neverpanic (Clemens Lang), nerdling (Jeremy Lavergne), cooljeanius (Eric Gallager)
Port:

Description

tracelib is not handling resource forks correctly.

Example from python27's destroot phase:

:info:destroot DYLD_FRAMEWORK_PATH=/opt/local/var/macports/build/_opt_local_var_macports_sources_macports.rsync.ionic.de_release_ports_lang_python27/python27/work/Python-2.7.8  ../python.exe ./scripts/cachersrc.py -v /opt/local/var/macports/build/_opt_local_var_macports_sources_macports.rsync.ionic.de_release_ports_lang_python27/python27/work/destroot/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac /opt/local/var/macports/build/_opt_local_var_macports_sources_macports.rsync.ionic.de_release_ports_lang_python27/python27/work/destroot/opt/local/Library/Frameworks/Python.framework/Versions/2.7/Mac/Tools
:info:destroot Traceback (most recent call last):
:info:destroot   File "./scripts/cachersrc.py", line 44, in <module>
:info:destroot     main()
:info:destroot   File "./scripts/cachersrc.py", line 41, in main
:info:destroot     os.path.walk(dir, handler, (verbose, force))
:info:destroot   File "/opt/local/var/macports/build/_opt_local_var_macports_sources_macports.rsync.ionic.de_release_ports_lang_python27/python27/work/Python-2.7.8/Mac/../Lib/posixpath.py", line 238, in walk
:info:destroot     func(arg, top, names)
:info:destroot   File "./scripts/cachersrc.py", line 23, in handler
:info:destroot     macresource.open_pathname(os.path.join(dirname, fn), verbose=verbose)
:info:destroot   File "/opt/local/var/macports/build/_opt_local_var_macports_sources_macports.rsync.ionic.de_release_ports_lang_python27/python27/work/Python-2.7.8/Lib/plat-mac/macresource.py", line 84, in open_pathname
:info:destroot     refno = Res.FSOpenResourceFile(pathname, u'', 1)
:info:destroot MacOS.Error: (-43, 'Mac OS error code -43')
[...]
:warn:destroot An activity was attempted outside sandbox: /.vol/16777218/20139854/HIToolbox.rsrc
:warn:destroot An activity was attempted outside sandbox: /.vol/16777218/20139854/HIToolbox.rsrc/..namedfork/rsrc
:warn:destroot An activity was attempted outside sandbox: /.vol/16777218/20142168/Localized.rsrc
:warn:destroot An activity was attempted outside sandbox: /.vol/16777218/20142168/Localized.rsrc/..namedfork/rsrc
:warn:destroot An activity was attempted outside sandbox: /.vol/16777218/53126995/python.exe/..namedfork/rsrc
:warn:destroot An activity was attempted outside sandbox: /.vol/16777218/53130438/errors.rsrc
:warn:destroot An activity was attempted outside sandbox: /.vol/16777218/53136261/dialogs.rsrc

For python.exe, denying access to the resource fork leads to a build failure.

The /.vol/.../ path should be resolved to the real one and checks performed against that.

Change History (8)

comment:1 Changed 10 years ago by neverpanic (Clemens Lang)

Keywords: trace mode added

comment:2 Changed 10 years ago by neverpanic (Clemens Lang)

Keywords: tracemode added; trace mode removed

comment:3 Changed 10 years ago by nerdling (Jeremy Lavergne)

Cc: snc@… added

Cc Me!

comment:4 Changed 10 years ago by neverpanic (Clemens Lang)

VolFS paths are correctly handled as of r127033, the Python build in trace mode is fixed with r127024.

Dealing with resource forks (i.e. stripping /..namedfork/* from the path if present) still needs to be done.

comment:5 Changed 10 years ago by neverpanic (Clemens Lang)

Resolution: fixed
Status: newclosed

Resource forks should be handled correctly as of r127673.

comment:6 Changed 10 years ago by neverpanic (Clemens Lang)

Milestone: MacPorts Future

comment:7 Changed 10 years ago by cooljeanius (Eric Gallager)

Cc: egall@… added

Cc Me!

comment:8 Changed 8 years ago by jmroot (Joshua Root)

Milestone: MacPorts FutureMacPorts 2.4.0
Note: See TracTickets for help on using tickets.