pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/mk Remove USERADD and GROUPADD definitions from OSes w...
details: https://anonhg.NetBSD.org/pkgsrc/rev/23a4e609047e
branches: trunk
changeset: 486353:23a4e609047e
user: jlam <jlam%pkgsrc.org@localhost>
date: Mon Dec 27 06:41:50 2004 +0000
description:
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:
mk/bsd.pkg.install.mk | 9 +++------
mk/bsd.pkg.mk | 4 +---
mk/install/header | 5 ++++-
mk/platform/AIX.mk | 11 +----------
mk/platform/BSDOS.mk | 5 +----
mk/platform/DragonFly.mk | 11 +----------
mk/platform/FreeBSD.mk | 11 +----------
mk/platform/IRIX.mk | 4 +---
mk/platform/OpenBSD.mk | 11 +----------
9 files changed, 14 insertions(+), 57 deletions(-)
diffs (207 lines):
diff -r e17a2bf4619c -r 23a4e609047e mk/bsd.pkg.install.mk
--- a/mk/bsd.pkg.install.mk Mon Dec 27 06:14:40 2004 +0000
+++ b/mk/bsd.pkg.install.mk Mon Dec 27 06:41:50 2004 +0000
@@ -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 @@
. 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 -r e17a2bf4619c -r 23a4e609047e mk/bsd.pkg.mk
--- a/mk/bsd.pkg.mk Mon Dec 27 06:14:40 2004 +0000
+++ b/mk/bsd.pkg.mk Mon Dec 27 06:41:50 2004 +0000
@@ -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 @@
.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 -r e17a2bf4619c -r 23a4e609047e mk/install/header
--- a/mk/install/header Mon Dec 27 06:14:40 2004 +0000
+++ b/mk/install/header Mon Dec 27 06:41:50 2004 +0000
@@ -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 @@
_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 -r e17a2bf4619c -r 23a4e609047e mk/platform/AIX.mk
--- a/mk/platform/AIX.mk Mon Dec 27 06:14:40 2004 +0000
+++ b/mk/platform/AIX.mk Mon Dec 27 06:41:50 2004 +0000
@@ -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 @@
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 -r e17a2bf4619c -r 23a4e609047e mk/platform/BSDOS.mk
--- a/mk/platform/BSDOS.mk Mon Dec 27 06:14:40 2004 +0000
+++ b/mk/platform/BSDOS.mk Mon Dec 27 06:41:50 2004 +0000
@@ -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 @@
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 -r e17a2bf4619c -r 23a4e609047e mk/platform/DragonFly.mk
--- a/mk/platform/DragonFly.mk Mon Dec 27 06:14:40 2004 +0000
+++ b/mk/platform/DragonFly.mk Mon Dec 27 06:41:50 2004 +0000
@@ -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 @@
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 -r e17a2bf4619c -r 23a4e609047e mk/platform/FreeBSD.mk
--- a/mk/platform/FreeBSD.mk Mon Dec 27 06:14:40 2004 +0000
+++ b/mk/platform/FreeBSD.mk Mon Dec 27 06:41:50 2004 +0000
@@ -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 @@
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 -r e17a2bf4619c -r 23a4e609047e mk/platform/IRIX.mk
--- a/mk/platform/IRIX.mk Mon Dec 27 06:14:40 2004 +0000
+++ b/mk/platform/IRIX.mk Mon Dec 27 06:41:50 2004 +0000
@@ -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 @@
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 @@
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 -r e17a2bf4619c -r 23a4e609047e mk/platform/OpenBSD.mk
--- a/mk/platform/OpenBSD.mk Mon Dec 27 06:14:40 2004 +0000
+++ b/mk/platform/OpenBSD.mk Mon Dec 27 06:41:50 2004 +0000
@@ -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 @@
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"
Home |
Main Index |
Thread Index |
Old Index