Bug 140376

Summary: [build] installworld fails trying to use 'chflags schg' on NFS DESTDIR
Product: Base System Reporter: Greg A. Woods <woods-FreeBSD.org>
Component: miscAssignee: freebsd-bugs mailing list <bugs>
Status: Open ---    
Severity: Affects Only Me    
Priority: Normal    
Version: unspecified   
Hardware: Any   
OS: Any   

Description Greg A. Woods 2009-11-08 00:40:01 UTC
I'm building the FreeBSD/mips project using a (virtual) machine running
FreeBSD-8.0-RC2 with source, obj, and destdir NFS mounted (from a NetBSD
server).

During the "installworld" phase, being run as root (sigh, why must I do
any of the build as root?), I encounter the following error:

install -s -o root -g wheel -m 4555   chpass /once/rest/work/freebsd-mips//usr/bin
/once/rest/work/freebsd-mips//usr/bin/chfn -> /once/rest/work/freebsd-mips//usr/bin/chpass
/once/rest/work/freebsd-mips//usr/bin/chsh -> /once/rest/work/freebsd-mips//usr/bin/chpass
chflags schg /once/rest/work/freebsd-mips//usr/bin/chpass
chflags: /once/rest/work/freebsd-mips//usr/bin/chpass: Operation not supported
*** Error code 1

Stop in /once/rest/work/woods/m-FreeBSD-mips/usr.bin/chpass.

Fix: 

Don't ever run any of the build or install as root.
(at least not when building install media, or doing
cross-compile builds, etc.)

Do chflags operations during final install only!
How-To-Repeat: run installworld to an NFS-mounted DESTDIR?
Comment 1 Eitan Adler freebsd_committer freebsd_triage 2017-12-31 08:01:36 UTC
For bugs matching the following criteria:

Status: In Progress Changed: (is less than) 2014-06-01

Reset to default assignee and clear in-progress tags.

Mail being skipped