Page MenuHomeFreeBSD

D10810.id28919.diff
No OneTemporary

D10810.id28919.diff

Index: head/share/mk/bsd.init.mk
===================================================================
--- head/share/mk/bsd.init.mk
+++ head/share/mk/bsd.init.mk
@@ -16,6 +16,33 @@
.include <bsd.own.mk>
.MAIN: all
+# Handle INSTALL_AS_USER here to maximize the chance that
+# it has final authority over fooOWN and fooGRP.
+.if ${MK_INSTALL_AS_USER} != "no"
+.if !defined(_uid)
+_uid!= id -u
+.export _uid
+.endif
+.if ${_uid} != 0
+.if !defined(USER)
+# Avoid exporting USER
+.if !defined(_USER)
+_USER!= id -un
+.export _USER
+.endif
+USER= ${_USER}
+.endif
+.if !defined(_gid)
+_gid!= id -g
+.export _gid
+.endif
+.for x in BIN CONF DOC DTB INFO KMOD LIB MAN NLS SHARE
+$xOWN= ${USER}
+$xGRP= ${_gid}
+.endfor
+.endif
+.endif
+
# Some targets need to know when something may build. This is used to
# optimize targets that are only needed when building something, such as
# (not) reading in depend files. For DIRDEPS_BUILD, it will only calculate
Index: head/share/mk/bsd.own.mk
===================================================================
--- head/share/mk/bsd.own.mk
+++ head/share/mk/bsd.own.mk
@@ -135,31 +135,6 @@
CTFCONVERT_CMD= @:
.endif
-.if ${MK_INSTALL_AS_USER} != "no"
-.if !defined(_uid)
-_uid!= id -u
-.export _uid
-.endif
-.if ${_uid} != 0
-.if !defined(USER)
-# Avoid exporting USER
-.if !defined(_USER)
-_USER!= id -un
-.export _USER
-.endif
-USER= ${_USER}
-.endif
-.if !defined(_gid)
-_gid!= id -g
-.export _gid
-.endif
-.for x in BIN CONF DOC DTB INFO KMOD LIB MAN NLS SHARE
-$xOWN= ${USER}
-$xGRP= ${_gid}
-.endfor
-.endif
-.endif
-
.endif # !_WITHOUT_SRCCONF
# Binaries

File Metadata

Mime Type
text/plain
Expires
Wed, Jul 1, 12:17 PM (6 h, 26 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
34559627
Default Alt Text
D10810.id28919.diff (1 KB)

Event Timeline