confirm bug still exists?

James Harrison oscartheduck at gmail.com
Wed Dec 30 13:12:05 UTC 2009


On Dec 30, 2009, at 1:26 AM 12/30/09, Stanislav Sedov wrote:

> On Wed, 30 Dec 2009 00:43:35 -0700
> James Harrison <oscartheduck at gmail.com> mentioned:
> 
>> http://www.freebsd.org/cgi/query-pr.cgi?pr=112818&cat=
>> 
>> I have an NFS server, /etc/exports reads:
>> 
>> [root at centos ~]# cat /etc/exports 
>> /home/james/portsold	172.16.128.133(rw)
>> 
>> 
>> I mount it on my FreeBSD box:
>> 
>> [root at server /usr]# mv ports portsold
>> [root at server /usr]# mkdir ports
>> [root at server /usr]# mount 172.16.128.137:/home/james/portsold ports
>> [root at server /usr]# ls -l | grep ports
>> drwxr-xr-x  69 500   500        4096 Dec 30 07:22 ports
>> 
>> On the FreeBSD server:
>> 
>> drwxr-xr-x 69 james james 4096 Dec 29  2009 portsold
>> 
>> 
>> Using portupgrade-devel:
>> 
>> [root at server /usr]# portupgrade -a
>> [Updating the portsdb <format:bdb_btree> in /var/db/pkg ... - 21055 port entries found ..........1000.........2000.........3000.........4000.........5000.........6000.........7000.........8000.........9000.........10000.........11000..........12000.........13000.........14000.........15000.........16000..........17000.........18000.........19000.........20000.........21000 ..... done]
>> --->  Upgrading 'mysql-client-5.0.88' to 'mysql-client-5.0.89' (databases/mysql50-client)
>> --->  Building '/usr/ports/databases/mysql50-client'
>> 
>> 
>> ...etc, etc, etc.
>> 
>> The /usr/ports directory isn't writeable:
>> 
>> [root at server /]# portsnap fetch update
>> Looking up us.portsnap.FreeBSD.org mirrors... 2 mirrors found.
>> Fetching snapshot tag from portsnap1.FreeBSD.org... done.
>> Fetching snapshot metadata... done.
>> Updating from Tue Dec 29 22:20:49 UTC 2009 to Wed Dec 30 05:02:19 UTC 2009.
>> Fetching 4 metadata patches... done.
>> Applying metadata patches... done.
>> Fetching 0 metadata files... done.
>> Fetching 2 patches.. done.
>> Applying patches... done.
>> Fetching 0 new ports or files... done.
>> portsnap: Directory is not writable: /usr/ports
>> [root at server /]# cd usr/ports
>> [root at server /usr/ports]# touch something
>> touch: something: Permission denied
>> 
>> 
>> However, it's true that I did do a little hinkying around to get stuff to partially build with an NFS mounted directory.
>> 
>> Anybody able to confirm that the bug still exists as described in the PR?
>> 
> 
> Hi!
> 
> I can't see how this refers to the PR you're pointing too?

The PR starts out that way, but devolves into this:

<---snip--->
"You are right: root could not write into $PORTSDIR even though it looked
as it should, but NFS root squashing hit even though the directory had
group wheel and was group-writeable. Making $PORTSDIR world writable
addressed this.

So I guess this mainly leaves the question how we can improve the failure
mode here?"
<---/snip--->

I was trying to reproduce the NFS root squashing to reproduce the failure mode, then I could implement:

<---snip--->
"1. Change "Fetching the ports index ... index file directory 
/sw/test/FreeBSD/ports not writable!"

to

"Fetching the ports index ... directory /sw/test/FreeBSD/ports not 
writable; consider setting INDEXDIR."

2. Abort portupgrade at that point, instead of running into problems
later on and issuing a Ruby backtrace.
<---/snip--->

And a little later, teh following is added:

<---snip--->
3. portupgrade ignores INDEXDIR.
<---/snip--->




> The problem described in PR was due to portupgrade creating
> database files with wrong permissions, which was fixed in
> portupgrade-devel.  Your problem seems to be irrelevant to
> portupgrade at all, or am I missing something?
> 

The discussion gets into the whole NFS root squash thing giving the impression of lousy permissions and whatnot., then asks for a change in how portupgrade fails.


> On the side not, please, show the output of mount command
> and ls -la /usr/ports on the server, which mounts that directory
> via NFS.  I suspect there's something wrong here.

Not sure if this'll help any longer, but for completeness' sake:


[root at server /usr/ports]# ls -la /usr/ports
total 60878
drwxr-xr-x    69 500   500        4096 Dec 30 07:22 .
drwxr-xr-x    19 root  wheel       512 Dec 30 07:35 ..
-rw-r--r--     1 500   500          19 Jul 14  1997 .cvsignore
-rw-r--r--     1 500   500     1801734 Dec 30 01:37 .portsnap.INDEX
-rw-r--r--     1 500   500       56245 Dec 25 18:27 CHANGES
-rw-r--r--     1 500   500        1499 Jan  1  2009 COPYRIGHT
-rw-r--r--     1 500   500        2215 Dec 28 11:38 GIDs
-rw-r--r--     1 500   500    17370624 Dec 30 01:38 INDEX-5
-rw-r--r--     1 500   500    20583212 Dec 30 01:38 INDEX-6
-rw-r--r--     1 500   500    20544533 Dec 30 01:38 INDEX-7
-rw-r--r--     1 500   500        4566 Oct  1 17:14 KNOBS
-rw-r--r--     1 500   500       33774 Nov 23 19:18 LEGAL
-rw-r--r--     1 500   500      318269 Dec 26 10:26 MOVED
-rw-r--r--     1 500   500        6018 Dec 18 14:28 Makefile
drwxr-xr-x     2 500   500        4096 Dec 30 01:25 Mk
-rw-r--r--     1 500   500        1298 May 22  2006 README
drwxr-xr-x     2 500   500        4096 Dec 30 01:25 Templates
drwxr-xr-x     4 500   500        4096 Dec 30 01:25 Tools
-rw-r--r--     1 500   500       11362 Dec 28 11:38 UIDs
-rw-r--r--     1 500   500      312890 Dec 27 14:27 UPDATING
drwxr-xr-x    27 500   500        4096 Dec 30 01:25 accessibility
drwxr-xr-x    12 500   500        4096 Dec 30 01:25 arabic
drwxr-xr-x   191 500   500        4096 Dec 30 01:25 archivers
drwxr-xr-x   110 500   500        4096 Dec 30 01:25 astro
drwxr-xr-x   845 500   500       28672 Dec 30 01:25 audio
drwxr-xr-x    66 500   500        4096 Dec 30 01:25 benchmarks
drwxr-xr-x    99 500   500        4096 Dec 30 01:25 biology
drwxr-xr-x    86 500   500        4096 Dec 30 01:25 cad
drwxr-xr-x   143 500   500        4096 Dec 30 01:26 chinese
drwxr-xr-x   161 500   500        4096 Dec 30 01:26 comms
drwxr-xr-x   132 500   500        4096 Dec 30 01:26 converters
drwxr-xr-x   701 500   500       28672 Dec 30 01:26 databases
drwxr-xr-x   283 500   500       12288 Dec 30 01:26 deskutils
drwxr-xr-x  3044 500   500       98304 Dec 30 01:27 devel
drwxr-xr-x     2 root  wheel      4096 Dec 30 07:19 distfiles
drwxr-xr-x   142 500   500        4096 Dec 30 01:27 dns
drwxr-xr-x   269 500   500       12288 Dec 30 01:27 editors
drwxr-xr-x   208 500   500        4096 Dec 30 01:27 emulators
drwxr-xr-x    89 500   500        4096 Dec 30 01:27 finance
drwxr-xr-x    31 500   500        4096 Dec 30 01:27 french
drwxr-xr-x   121 500   500        4096 Dec 30 01:27 ftp
drwxr-xr-x  1073 500   500       36864 Dec 30 01:28 games
drwxr-xr-x    44 500   500        4096 Dec 30 01:28 german
drwxr-xr-x   978 500   500       36864 Dec 30 01:28 graphics
drwxr-xr-x    10 500   500        4096 Dec 30 01:28 hebrew
drwxr-xr-x    12 500   500        4096 Dec 30 01:28 hungarian
drwxr-xr-x   145 500   500        4096 Dec 30 01:28 irc
drwxr-xr-x   385 500   500       12288 Dec 30 01:28 japanese
drwxr-xr-x   164 500   500        4096 Dec 30 01:28 java
drwxr-xr-x    61 500   500        4096 Dec 30 01:28 korean
drwxr-xr-x   371 500   500       12288 Dec 30 01:28 lang
drwxr-xr-x   737 500   500       24576 Dec 30 01:29 mail
drwxr-xr-x   527 500   500       20480 Dec 30 01:29 math
drwxr-xr-x    15 500   500        4096 Dec 30 01:29 mbone
drwxr-xr-x   560 500   500       20480 Dec 30 01:29 misc
drwxr-xr-x   320 500   500       12288 Dec 30 01:29 multimedia
drwxr-xr-x  1120 500   500       36864 Dec 30 01:30 net
drwxr-xr-x   169 500   500        4096 Dec 30 01:29 net-im
drwxr-xr-x   284 500   500       12288 Dec 30 01:29 net-mgmt
drwxr-xr-x   139 500   500        4096 Dec 30 01:29 net-p2p
drwxr-xr-x   105 500   500        4096 Dec 30 01:30 news
drwxr-xr-x    44 500   500        4096 Dec 30 01:30 palm
drwxr-xr-x    23 500   500        4096 Dec 30 01:30 polish
drwxr-xr-x    66 500   500        4096 Dec 30 01:30 ports-mgmt
drwxr-xr-x    19 500   500        4096 Dec 30 01:30 portuguese
drwxr-xr-x   350 500   500       12288 Dec 30 01:30 print
drwxr-xr-x    45 500   500        4096 Dec 30 01:30 russian
drwxr-xr-x   135 500   500        4096 Dec 30 01:30 science
drwxr-xr-x   869 500   500       28672 Dec 30 01:32 security
drwxr-xr-x    46 500   500        4096 Dec 30 01:32 shells
drwxr-xr-x   927 500   500       28672 Dec 30 01:33 sysutils
drwxr-xr-x  1249 500   500       45056 Dec 30 01:34 textproc
drwxr-xr-x    12 500   500        4096 Dec 30 01:34 ukrainian
drwxr-xr-x    23 500   500        4096 Dec 30 01:34 vietnamese
drwxr-xr-x  1884 500   500       69632 Dec 30 01:36 www
drwxr-xr-x   499 500   500       20480 Dec 30 01:37 x11
drwxr-xr-x    65 500   500        4096 Dec 30 01:36 x11-clocks
drwxr-xr-x    70 500   500        4096 Dec 30 01:36 x11-drivers
drwxr-xr-x    46 500   500        4096 Dec 30 01:36 x11-fm
drwxr-xr-x   146 500   500        4096 Dec 30 01:36 x11-fonts
drwxr-xr-x    12 500   500        4096 Dec 30 01:36 x11-servers
drwxr-xr-x   218 500   500       12288 Dec 30 01:36 x11-themes
drwxr-xr-x   319 500   500       12288 Dec 30 01:36 x11-toolkits
drwxr-xr-x   146 500   500        4096 Dec 30 01:36 x11-wm



More information about the freebsd-ruby mailing list