You cannot build a port as root using an NFS-mounted /usr/ports if the server maps root to a UID other than root. When extracting the source, tar thinks that it is root and attempts to chown the files that it extracts to the owner in the tar file. The chown fails, tar fails and thus the build fails. Fix: Put tar's attempt to change ownership under control of the same EXTRACT_PRESERVE_OWNERSHIP variable: How-To-Repeat: Mount /usr/ports on a client from a server with the following in /etc/exports: /usr/ports -maproot=ports:src (where the ports directory tree is writeable by ports:src). From a client machiine, mount /usr/ports over NFS then choose any port and do (as root): make EXTRACT_PRESERVE_OWNERSHIP=yes extract It will fails with messages that tar cannot change ownership of the files that it extracts. (EXTRACT_PRESERVE_OWNERSHIP needs to be defined to prevent bsd.port.mk from chowning the extracted tree to root).
Responsible Changed From-To: freebsd-ports-bugs->portmgr portmgr territory
Obviously I goofed the PR somehow. The intended severity ended up at the end: > Unformatted > > >fails Severity: non-critical It is clearly not "serious".
State Changed From-To: open->feedback Can't you just set EXTRACT_AFTER_ARGS instead of adding a special-case single-purpose variable to bsd.port.mk? That is after all why those variables are set with ?= instead of =.
On Thu, 2 Oct 2003 18:48:45 -0700 (PDT) Kris Kennaway <kris@FreeBSD.org> wrote: > Can't you just set EXTRACT_AFTER_ARGS instead of adding a > special-case single-purpose variable to bsd.port.mk? That is > after all why those variables are set with ?= instead of =. 1. EXTRACT_PRESERVE_OWNERSHIP is not a new variable; it already exists in bsd.port.mk to stop it from attempting to change the ownership of the extracted tree *back* to 0:0 (after tar has helpfully set it). Stopping tar from trying to change ownership in the first place seems to logically belong under the control of this already-existing variable. If I prevent tar from failing by setting EXTRACT_AFTER_ARGS, then I would have to set *both* EXTRACT_AFTER_ARGS *and* EXTRACT_PRESERVE_OWNERSHIP to make the build as a whole work. 2. EXTRACT_AFTER_ARGS is set in bsd.port.mk depending on values that might be set by the port's Makefile (eg USE_ZIP). If I just blindly set it to "tar-xf - --no-same-owner" then I will lose if the port's sources come in a .zip. With my patch, I can just set EXTRACT_PRESERVE_OWNERSHIP=yes for all my port builds and it will work. IMHO.
State Changed From-To: feedback->open Feedback was received some time ago
State Changed From-To: open->analyzed Accepted for a test build on the cluster.
State Changed From-To: analyzed->closed Committed, thanks.