On Oct 18 20:04:18, Landry Breuil wrote: > i'm struggling to make my ports-tree usable on all my machines, it > seems that in my configuration -maproot=root in /etc/exports doesn't > work: > > on the server (4.1 stable), /etc/exports contains : > /usr/ports -maproot=root client > perms : drwxrwxr-x 47 root wsrc 1024 Oct 18 19:40 /usr/ports
This exports the port tree rw; imagine one client doing 'make install' while another client runs 'make clean' in the same port. Export the ports tree -ro and instruct clients to (man ports and) properly set WRKOBJDIR and friends. http://openbsd.org/faq/faq15.html#PortsConfig > on the client (-current), /etc/fstab contains : > server:/usr/ports /usr/ports nfs rw,nosuid 0 0 > perms : drwxrwxr-x 47 root wsrc 1024 Oct 18 19:40 /usr/ports > > Nfs mount works fine, showmount -a is fine (i have client:/usr/ports > line), as a normal user (i'm in wsrc group) i can create files in > remote ports-tree, but as root it seems impossible, either using sudo > touch, sudo -u root touch or su - then touch, i'm always getting > touch: /usr/ports/test: Permission denied > As ports-tree uses extensively sudo, i'm kinda blocked.. Again: set WRKOBJDIR on the client side and you don't need to be writing in the remotely mounted tree at all. Another advantage of that is that when you build some port that requires e.g. the X11 to be installed, you only need it installed on the machine that performs the port build, that is, the (one) client that actually needs it. > What if you share a directory on the server from a partition that has > the nosuid flag set in fstab? I don't think any suid bits are set in the ports tree. find /usr/ports -perm -04000 | xargs -r ls -l > /usr/ports is not a separate partition, i only have / on this box > (on a 13gb disk..).. so i can't test this option. > /dev/wd0a / ffs rw 1 1 It's better to have exported filesystems on separate partitions. Then you can e.g. mount the ro-exported ones read-only on the server, too. If you really want to have a central "ports server", in an enviroment where it is actually worth it[*], then you surely can dedicate a small disk to it. No idea about the original -maproot question, though :-) Jan [*] http://openbsd.org/faq/faq15.html#NoFun Note that you should be running ports from the port tree that matches your system version. So the assumption that this is actually worth it also means that you have a large number of machines running the same version of obsd.