Opened 15 years ago
Closed 15 years ago
#20887 closed defect (fixed)
could not set attributes of share/man/man1/foo.1.gz : permission denied (--with-no-root-privileges)
Reported by: | jonthn+macports@… | Owned by: | macports-tickets@… |
---|---|---|---|
Priority: | Normal | Milestone: | MacPorts 1.8.1 |
Component: | base | Version: | 1.8.0 |
Keywords: | Cc: | ryandesign (Ryan Carsten Schmidt), raphael@…, blb@… | |
Port: |
Description
Today I installed Snow Leopard and fetch the source file of MacPorts 1.8.0.
In that case I created a fresh new user called "build" with no Admin rights. Configured MacPorts like this :
./configure --prefix=$HOME/package --with-universal_archs="x86_64 i386" --with-no-root-privileges
And when I try to install expat I got this error :
---> Installing expat @2.0.1_0+universal DEBUG: Executing org.macports.install (expat) DEBUG: installing file: /Users/build/package/var/macports/software/expat/2.0.1_0+universal/Users/build/package/bin/xmlwf DEBUG: installing file: /Users/build/package/var/macports/software/expat/2.0.1_0+universal/Users/build/package/include/expat.h DEBUG: installing file: /Users/build/package/var/macports/software/expat/2.0.1_0+universal/Users/build/package/include/expat_external.h DEBUG: installing link: /Users/build/package/var/macports/software/expat/2.0.1_0+universal/Users/build/package/lib/libexpat.0.dylib DEBUG: installing file: /Users/build/package/var/macports/software/expat/2.0.1_0+universal/Users/build/package/lib/libexpat.1.5.2.dylib DEBUG: installing link: /Users/build/package/var/macports/software/expat/2.0.1_0+universal/Users/build/package/lib/libexpat.1.dylib DEBUG: installing file: /Users/build/package/var/macports/software/expat/2.0.1_0+universal/Users/build/package/lib/libexpat.a DEBUG: installing link: /Users/build/package/var/macports/software/expat/2.0.1_0+universal/Users/build/package/lib/libexpat.dylib DEBUG: installing file: /Users/build/package/var/macports/software/expat/2.0.1_0+universal/Users/build/package/lib/libexpat.la DEBUG: installing file: /Users/build/package/var/macports/software/expat/2.0.1_0+universal/Users/build/package/share/doc/expat-2.0.1/COPYING DEBUG: installing file: /Users/build/package/var/macports/software/expat/2.0.1_0+universal/Users/build/package/share/doc/expat-2.0.1/Changes DEBUG: installing file: /Users/build/package/var/macports/software/expat/2.0.1_0+universal/Users/build/package/share/doc/expat-2.0.1/README DEBUG: installing file: /Users/build/package/var/macports/software/expat/2.0.1_0+universal/Users/build/package/share/doc/expat-2.0.1/html/expat.png DEBUG: installing file: /Users/build/package/var/macports/software/expat/2.0.1_0+universal/Users/build/package/share/doc/expat-2.0.1/html/reference.html DEBUG: installing file: /Users/build/package/var/macports/software/expat/2.0.1_0+universal/Users/build/package/share/doc/expat-2.0.1/html/style.css DEBUG: installing file: /Users/build/package/var/macports/software/expat/2.0.1_0+universal/Users/build/package/share/doc/expat-2.0.1/html/valid-xhtml10.png DEBUG: installing file: /Users/build/package/var/macports/software/expat/2.0.1_0+universal/Users/build/package/share/doc/expat-2.0.1/html/xmlwf.1 DEBUG: installing file: /Users/build/package/var/macports/software/expat/2.0.1_0+universal/Users/build/package/share/doc/expat-2.0.1/html/xmlwf.sgml DEBUG: installing file: /Users/build/package/var/macports/software/expat/2.0.1_0+universal/Users/build/package/share/man/man1/xmlwf.1.gz Error: Target org.macports.install returned: could not set attributes of "/Users/build/package/var/macports/software/expat/2.0.1_0+universal/Users/build/package/share/man/man1/xmlwf.1.gz": permission denied DEBUG: Backtrace: could not set attributes of "/Users/build/package/var/macports/software/expat/2.0.1_0+universal/Users/build/package/share/man/man1/xmlwf.1.gz": permission denied while executing "file attributes $dst_element -group staff -owner build -permissions 00444 -readonly 0 -creator {} -type {} -hidden 0 -rsrclength 0" ("eval" body line 1) invoked from within "eval file attributes {$dst_element} [file attributes $src_element]" (procedure "install_element" line 11) invoked from within "install_element $src_element $dst_element" (procedure "directory_dig" line 32) invoked from within "directory_dig $rootdir $name $regref [file join $cwd $name]" (procedure "directory_dig" line 39) invoked from within "directory_dig $rootdir $name $regref [file join $cwd $name]" (procedure "directory_dig" line 39) invoked from within "directory_dig $rootdir $name $regref [file join $cwd $name]" (procedure "directory_dig" line 39) invoked from within "directory_dig $rootdir $name $regref [file join $cwd $name]" (procedure "directory_dig" line 39) invoked from within "directory_dig $rootdir $name $regref [file join $cwd $name]" (procedure "directory_dig" line 39) invoked from within "directory_dig $rootdir $name $regref [file join $cwd $name]" (procedure "directory_dig" line 39) invoked from within "directory_dig ${destroot} ${destroot} ${regref}" (procedure "portinstall::install_main" line 8) invoked from within "$procedure $targetname" Warning: the following items did not execute (for expat): org.macports.activate org.macports.install
Attachments (1)
Change History (6)
comment:1 Changed 15 years ago by ryandesign (Ryan Carsten Schmidt)
Cc: | ryandesign@… added |
---|---|
Component: | ports → base |
Summary: | Cannot install expat "permission denied" (MacPorts --with-no-root-privileges) → could not set attributes of share/man/man1/foo.1.gz : permission denied (--with-no-root-privileges) |
Changed 15 years ago by jonthn+macports@…
Attachment: | file-attributes-no-root.diff added |
---|
Patch that permits to install expat
comment:2 Changed 15 years ago by jonthn+macports@…
I've added a patch (that should have be named portinstall.tcl-file-attributes-no-root.diff) that solves this problem (or at least seems so).
What I've done is transformed the one-liner for setting up attributes to one-line for each attribute. It's most probably an ugly patch but perhaps it'll help you make something better.
comment:4 Changed 15 years ago by ryandesign (Ryan Carsten Schmidt)
Milestone: | → MacPorts 1.8.1 |
---|
Through mailing list discussion and more testing it seems this issue is unique to Snow Leopard. It does not occur in my testing on Tiger or Leopard, though a different issue does: #20896.
Regarding the patch Jonathan submitted above, I would very much like to first know what revision caused the problem, since this all used to work in MacPorts 1.7.1. Then, once we see what change caused the issue, we can think about how best to solve it. The script I attached to this message could help test for the issue.
comment:5 Changed 15 years ago by ryandesign (Ryan Carsten Schmidt)
Cc: | blb@… added |
---|---|
Resolution: | → fixed |
Status: | new → closed |
I see it too, but it's not an expat issue; it occurs with zlib too, and I assume most any other port that installs a manpage that MacPorts will compress.