summaryrefslogtreecommitdiff
path: root/mk
diff options
context:
space:
mode:
authorjlam <jlam@pkgsrc.org>2004-12-27 06:41:50 +0000
committerjlam <jlam@pkgsrc.org>2004-12-27 06:41:50 +0000
commit25b81680beab3016c878ab754d8135911cd66e57 (patch)
tree652a8b6305260ff589456126c6b6ddc26201c1e8 /mk
parent34a211b1e3516b3b164281be72140c0d1a288913 (diff)
downloadpkgsrc-25b81680beab3016c878ab754d8135911cd66e57.tar.gz
Remove USERADD and GROUPADD definitions from OSes where the useradd
and groupadd commands won't follow the calling conventions of the NetBSD useradd/groupadd. Modify the INSTALL scripts to *never* create users or groups if there is no available ${USERADD} or ${GROUPADD} command, but will warn the user of users and groups that need to be created before the package can be installed.
Diffstat (limited to 'mk')
-rw-r--r--mk/bsd.pkg.install.mk9
-rw-r--r--mk/bsd.pkg.mk4
-rw-r--r--mk/install/header5
-rw-r--r--mk/platform/AIX.mk11
-rw-r--r--mk/platform/BSDOS.mk5
-rw-r--r--mk/platform/DragonFly.mk11
-rw-r--r--mk/platform/FreeBSD.mk11
-rw-r--r--mk/platform/IRIX.mk4
-rw-r--r--mk/platform/OpenBSD.mk11
9 files changed, 14 insertions, 57 deletions
diff --git a/mk/bsd.pkg.install.mk b/mk/bsd.pkg.install.mk
index d18a141bda7..6e9d4fba8d2 100644
--- a/mk/bsd.pkg.install.mk
+++ b/mk/bsd.pkg.install.mk
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.pkg.install.mk,v 1.65 2004/10/11 22:04:19 reed Exp $
+# $NetBSD: bsd.pkg.install.mk,v 1.66 2004/12/27 06:41:50 jlam Exp $
#
# This Makefile fragment is included by bsd.pkg.mk to use the common
# INSTALL/DEINSTALL scripts. To use this Makefile fragment, simply:
@@ -118,11 +118,8 @@ BROKEN:= "User and group '${user:C/:.*//}' cannot have the same name on Interix
. endfor
.endif
-.if !empty(PKG_USERS)
-USE_USERADD= YES
-.endif
-.if !empty(PKG_GROUPS)
-USE_GROUPADD= YES
+.if !empty(PKG_USERS) || !empty(PKG_GROUPS)
+DEPENDS+= ${_USER_DEPENDS}
.endif
# SPECIAL_PERMS are lists that look like:
diff --git a/mk/bsd.pkg.mk b/mk/bsd.pkg.mk
index 8a3c0625184..e6399cc2a95 100644
--- a/mk/bsd.pkg.mk
+++ b/mk/bsd.pkg.mk
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.pkg.mk,v 1.1549 2004/12/21 17:30:07 agc Exp $
+# $NetBSD: bsd.pkg.mk,v 1.1550 2004/12/27 06:41:50 jlam Exp $
#
# This file is in the public domain.
#
@@ -376,8 +376,6 @@ _ULIMIT_CMD+= ${ULIMIT_CMD_${__tmp__}} ;
.endif
CPPFLAGS+= ${CPP_PRECOMP_FLAGS}
-DEPENDS+= ${USE_USERADD:D${_USER_DEPENDS}}
-DEPENDS+= ${USE_GROUPADD:D${_USER_DEPENDS}}
# If GNU_CONFIGURE is defined, then pass LIBS to the GNU configure script.
# also pass in a CONFIG_SHELL to avoid picking up bash
diff --git a/mk/install/header b/mk/install/header
index a81d0cad664..17d41cbd972 100644
--- a/mk/install/header
+++ b/mk/install/header
@@ -2,7 +2,7 @@
#
# start of header
#
-# $NetBSD: header,v 1.26 2004/04/27 18:31:08 tv Exp $
+# $NetBSD: header,v 1.27 2004/12/27 06:41:50 jlam Exp $
PKGNAME=$1
STAGE=$2
@@ -112,6 +112,9 @@ case "${PKG_CREATE_USERGROUP:-@PKG_CREATE_USERGROUP@}" in
_PKG_CREATE_USERGROUP=NO
;;
esac
+if [ -z "${USERADD}" -o -z "${GROUPADD}" ]; then
+ _PKG_CREATE_USERGROUP=NO
+fi
case "${PKG_CONFIG:-@PKG_CONFIG@}" in
[Yy][Ee][Ss]|[Tt][Rr][Uu][Ee]|[Oo][Nn]|1)
diff --git a/mk/platform/AIX.mk b/mk/platform/AIX.mk
index 62a4638c35e..f4ff35403fe 100644
--- a/mk/platform/AIX.mk
+++ b/mk/platform/AIX.mk
@@ -1,4 +1,4 @@
-# $NetBSD: AIX.mk,v 1.4 2004/11/16 18:04:00 tv Exp $
+# $NetBSD: AIX.mk,v 1.5 2004/12/27 06:41:50 jlam Exp $
#
# Variable definitions for the AIX operating system.
@@ -107,15 +107,6 @@ TYPE?= type # Shell builtin
WC?= /usr/bin/wc
XARGS?= /usr/bin/xargs
-.if exists(/usr/sbin/user)
-USERADD?= /usr/sbin/useradd
-GROUPADD?= /usr/sbin/groupadd
-.else
-USERADD?= ${LOCALBASE}/sbin/useradd
-GROUPADD?= ${LOCALBASE}/sbin/groupadd
-_USER_DEPENDS= user>=20000313:../../sysutils/user
-.endif
-
CPP_PRECOMP_FLAGS?= # unset
DEF_UMASK?= 0022
EXPORT_SYMBOLS_LDFLAGS?=-Wl,-E # add symbols to the dynamic symbol table
diff --git a/mk/platform/BSDOS.mk b/mk/platform/BSDOS.mk
index 3cb893ad497..9dbc0222170 100644
--- a/mk/platform/BSDOS.mk
+++ b/mk/platform/BSDOS.mk
@@ -1,4 +1,4 @@
-# $NetBSD: BSDOS.mk,v 1.4 2004/11/16 18:04:00 tv Exp $
+# $NetBSD: BSDOS.mk,v 1.5 2004/12/27 06:41:50 jlam Exp $
#
# Variable definitions for the BSD/OS operating system.
@@ -95,9 +95,6 @@ TYPE?= which
WC?= /usr/bin/wc
XARGS?= /usr/bin/xargs
-USERADD?= /usr/sbin/adduser
-GROUPADD?= /usr/sbin/addgroup
-
CPP_PRECOMP_FLAGS?= # unset
DEF_UMASK?= 0022
.if ${OBJECT_FMT} == "ELF"
diff --git a/mk/platform/DragonFly.mk b/mk/platform/DragonFly.mk
index 3dc2f635c59..fd0b22a6bc1 100644
--- a/mk/platform/DragonFly.mk
+++ b/mk/platform/DragonFly.mk
@@ -1,4 +1,4 @@
-# $NetBSD: DragonFly.mk,v 1.5 2004/12/21 13:52:26 grant Exp $
+# $NetBSD: DragonFly.mk,v 1.6 2004/12/27 06:41:50 jlam Exp $
#
# Variable definitions for the DragonFly operating system.
@@ -87,15 +87,6 @@ TYPE?= type # Shell builtin
WC?= /usr/bin/wc
XARGS?= /usr/bin/xargs
-.if exists(/usr/sbin/user)
-USERADD?= /usr/sbin/useradd
-GROUPADD?= /usr/sbin/groupadd
-.else
-USERADD?= ${LOCALBASE}/sbin/useradd
-GROUPADD?= ${LOCALBASE}/sbin/groupadd
-_USER_DEPENDS= user>=20000313:../../sysutils/user
-.endif
-
CPP_PRECOMP_FLAGS?= # unset
DEF_UMASK?= 0022
.if ${OBJECT_FMT} == "ELF"
diff --git a/mk/platform/FreeBSD.mk b/mk/platform/FreeBSD.mk
index a3370cf7ab1..e1a3b3c5307 100644
--- a/mk/platform/FreeBSD.mk
+++ b/mk/platform/FreeBSD.mk
@@ -1,4 +1,4 @@
-# $NetBSD: FreeBSD.mk,v 1.4 2004/11/16 18:04:00 tv Exp $
+# $NetBSD: FreeBSD.mk,v 1.5 2004/12/27 06:41:50 jlam Exp $
#
# Variable definitions for the FreeBSD operating system.
@@ -87,15 +87,6 @@ TYPE?= type # Shell builtin
WC?= /usr/bin/wc
XARGS?= /usr/bin/xargs
-.if exists(/usr/sbin/user)
-USERADD?= /usr/sbin/useradd
-GROUPADD?= /usr/sbin/groupadd
-.else
-USERADD?= ${LOCALBASE}/sbin/useradd
-GROUPADD?= ${LOCALBASE}/sbin/groupadd
-_USER_DEPENDS= user>=20000313:../../sysutils/user
-.endif
-
CPP_PRECOMP_FLAGS?= # unset
DEF_UMASK?= 0022
.if ${OBJECT_FMT} == "ELF"
diff --git a/mk/platform/IRIX.mk b/mk/platform/IRIX.mk
index 8db8bd16731..d064b7c7238 100644
--- a/mk/platform/IRIX.mk
+++ b/mk/platform/IRIX.mk
@@ -1,4 +1,4 @@
-# $NetBSD: IRIX.mk,v 1.6 2004/11/16 18:04:00 tv Exp $
+# $NetBSD: IRIX.mk,v 1.7 2004/12/27 06:41:50 jlam Exp $
#
# Variable definitions for the IRIX operating system.
@@ -96,7 +96,6 @@ CPP_PRECOMP_FLAGS?= # unset
DEF_UMASK?= 022
DEFAULT_SERIAL_DEVICE?= /dev/null
EXPORT_SYMBOLS_LDFLAGS?= # Don't add symbols to the dynamic symbol table
-GROUPADD?= ${FALSE}
MOTIF_TYPE_DEFAULT?= dt # default 2.0 compatible libs type
NOLOGIN?= ${FALSE}
ROOT_CMD?= ${SU} - root -c
@@ -106,7 +105,6 @@ SERIAL_DEVICES?= /dev/null
ULIMIT_CMD_datasize?= ulimit -d `ulimit -H -d`
ULIMIT_CMD_stacksize?= ulimit -s `ulimit -H -s`
ULIMIT_CMD_memorysize?= ulimit -v `ulimit -H -v`
-USERADD?= ${FALSE}
# imake installs manpages in weird places
IMAKE_MAN_SOURCE_PATH= catman/u_man/cat
diff --git a/mk/platform/OpenBSD.mk b/mk/platform/OpenBSD.mk
index 1957aa5816f..466b6c9361a 100644
--- a/mk/platform/OpenBSD.mk
+++ b/mk/platform/OpenBSD.mk
@@ -1,4 +1,4 @@
-# $NetBSD: OpenBSD.mk,v 1.7 2004/11/20 04:38:09 grant Exp $
+# $NetBSD: OpenBSD.mk,v 1.8 2004/12/27 06:41:50 jlam Exp $
#
# Variable definitions for the OpenBSD operating system.
@@ -78,15 +78,6 @@ TYPE?= type # Shell builtin
WC?= /usr/bin/wc
XARGS?= /usr/bin/xargs
-.if exists(/usr/sbin/user)
-USERADD?= /usr/sbin/useradd
-GROUPADD?= /usr/sbin/groupadd
-.else
-USERADD?= ${LOCALBASE}/sbin/useradd
-GROUPADD?= ${LOCALBASE}/sbin/groupadd
-_USER_DEPENDS= user>=20000313:../../sysutils/user
-.endif
-
CPP_PRECOMP_FLAGS?= # unset
DEF_UMASK?= 0022
.if ${OBJECT_FMT} == "ELF"