Subject: Unpriviledged installs (was Re: CVS commit: sharesrc)
To: None <mcr@netbsd.org>
From: Simon Burge <simonb@netbsd.org>
List: tech-install
Date: 08/15/1999 01:46:21
Michael Richardson wrote:

> 
> Module Name:	sharesrc
> Committed By:	mcr
> Date:		Tue Aug 10 00:43:38 UTC 1999
> 
> Modified Files:
> 
> 	sharesrc/share/mk [mortalinstall]: bsd.README bsd.doc.mk bsd.files.mk
> 	    bsd.inc.mk bsd.kinc.mk bsd.kmod.mk bsd.lib.mk bsd.man.mk bsd.nls.mk
> 	    bsd.prog.mk
> 
> Log Message:
> 
> 	added Makefile flag "MORTALINSTALL" which removes -o/-g from
> 	install arguments:
> MORTALINSTALL	If "yes", then omit setting group and ownership on
> 		all files that are installed. This can be used to
> 		permit non-root to install files, particularly
> 		useful when working across NFS, or when $DESTDIR
> 		is local. Do not use on production systems.
> 
> 	This relates to PR bin/3563.
> 	These files are being checked into a branch because I want
> 	them carefully reviewed by various parties, and because they
> 	are not fully tested.

In bsd.doc.mk and bsd.files.mk "${INSTALL} ${RENAME} ${PRESERVE}" has
changed to "${INSTALL} ${PRESERVE}".  Is there a reason for this?  The
other files seem ok.


That said, wouldn't it be easier to use the -U option of install?  I'm
pretty sure that -U came well after PR #3563.  From the install(1)
manpage:

     -U      Indicate that install is running unpriviledged, and that it
             should not try to change the owner or the group of the destina-
             tion.  A future version of this file may log the owner/group in-
             formation elsewhere; currently, it's just discarded.

Then we could just stick

	UNPRIVILEDGED?=

in bsd.own.mk and use that on all the install commands...


Simon.