Subject: CVS commit: pkgsrc
To: None <pkgsrc-changes@netbsd.org>
From: Johnny C. Lam <jlam@netbsd.org>
List: pkgsrc-changes
Date: 06/20/2002 23:15:51
Module Name:	pkgsrc
Committed By:	jlam
Date:		Thu Jun 20 20:15:50 UTC 2002

Modified Files:
	pkgsrc: Packages.txt
	pkgsrc/mk: bsd.pkg.install.mk bsd.pkg.mk
	pkgsrc/mk/install: deinstall header install

Log Message:
In order to solve the following problems:

    (1) Admins want to create users/groups on their own (pkg/17183).
    (2) Admins don't want packages to setup an initial configuration.

The bsd.pkg.install.mk-generated INSTALL/DEINSTALL scripts have been
modified to check certain PKG_* environment variables to tune their
behaviour.  This works whether installing from "make install" or from a
binary package.

PKG_CREATE_USERGROUP indicates whether the INSTALL script should
	automatically add any needed users/groups to the system using
	useradd/groupadd.  It is either YES or NO, and defaults to YES.

PKG_CONFIG indicates whether the INSTALL/DEINSTALL scripts should do
	automatic config file and directory handling, or if it should
	merely inform the admin of the list of required files and
	directories needed to use the package.  It is either YES or NO,
	and defaults to YES.

The make(1) variable INSTALL_RCD_SCRIPTS is removed.  The package rc.d
script is now handled like other config files for the package, and is
copied into place if PKG_CONFIG=YES.

The default values above reflect the current behaviour.  Setting
PKG_CREATE_USERGROUP=NO solves problem (1), and setting PKG_CONFIG=NO
solves problem (2).

To simply matters for users installing directly from pkgsrc, these
variables may also be defined in /etc/mk.conf, but behaviour at deinstall
time may be surprising.  It is *HIGHLY* recommended that these values be
set in the shell environment instead.


To generate a diff of this commit:
cvs rdiff -r1.250 -r1.251 pkgsrc/Packages.txt
cvs rdiff -r1.18 -r1.19 pkgsrc/mk/bsd.pkg.install.mk
cvs rdiff -r1.992 -r1.993 pkgsrc/mk/bsd.pkg.mk
cvs rdiff -r1.8 -r1.9 pkgsrc/mk/install/deinstall pkgsrc/mk/install/install
cvs rdiff -r1.7 -r1.8 pkgsrc/mk/install/header

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.