pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/bootstrap Parameterize the root user, and provide an a...
details: https://anonhg.NetBSD.org/pkgsrc/rev/097f98b99a0f
branches: trunk
changeset: 470732:097f98b99a0f
user: tv <tv%pkgsrc.org@localhost>
date: Thu Mar 11 17:29:11 2004 +0000
description:
Parameterize the root user, and provide an alternative implementation
of the is_root() function for Interix only.
diffstat:
bootstrap/bootstrap | 21 ++++++++++++++++-----
bootstrap/mods/mk/bsd.own.mk.in | 16 ++++++++--------
2 files changed, 24 insertions(+), 13 deletions(-)
diffs (121 lines):
diff -r 0c58a5a22cca -r 097f98b99a0f bootstrap/bootstrap
--- a/bootstrap/bootstrap Thu Mar 11 17:28:11 2004 +0000
+++ b/bootstrap/bootstrap Thu Mar 11 17:29:11 2004 +0000
@@ -1,6 +1,6 @@
#! /bin/sh
-# $NetBSD: bootstrap,v 1.2 2004/03/11 13:08:06 grant Exp $
+# $NetBSD: bootstrap,v 1.3 2004/03/11 17:29:11 tv Exp $
#
#
# Copyright (c) 2001-2002 Alistair G. Crooks. All rights reserved.
@@ -172,6 +172,7 @@
echo_msg "bootstrap started: $build_start"
overpath=""
+root_user=root
case "$opsys" in
Darwin)
root_group=wheel
@@ -274,7 +275,13 @@
set_opsys=no
;;
Interix)
- ignoreusercheck=yes
+ is_root () {
+ if id -Gn | grep -q +Administrators; then
+ return 1
+ fi
+ return 0
+ }
+ root_user=`id -un`
root_group=+Administrators
need_pax=no
need_mtree=yes
@@ -335,7 +342,7 @@
is_root
if [ $? = 1 ]; then
- user=root
+ user=$root_user
group=$root_group
else
if [ $ignoreusercheck = "no" ]; then
@@ -429,10 +436,14 @@
run_cmd "$cpprog mods/mk/$opsys.bsd.man.mk $prefix/share/mk/bsd.man.mk"
fi
-if [ -f mods/mk/$opsys.bsd.prog.mk ] ; then
+if [ -f mods/mk/$opsys.bsd.own.mk ] ; then
run_cmd "$cpprog mods/mk/$opsys.bsd.own.mk $prefix/share/mk/bsd.own.mk"
else
- run_cmd "$sedprog -e 's|@ROOT_GROUP@|'$root_group'|g' mods/mk/bsd.own.mk.in > $prefix/share/mk/bsd.own.mk"
+ run_cmd "$sedprog -e 's|@ROOT_GROUP@|'$root_group'|g;s|@ROOT_USER@|'$root_user'|g' mods/mk/bsd.own.mk.in > $prefix/share/mk/bsd.own.mk"
+fi
+
+if [ -f mods/mk/$opsys.bsd.prog.mk ] ; then
+ run_cmd "$cpprog mods/mk/$opsys.bsd.prog.mk $prefix/share/mk/bsd.prog.mk"
fi
if [ -f mods/mk/$opsys.bsd.sys.mk ]; then
diff -r 0c58a5a22cca -r 097f98b99a0f bootstrap/mods/mk/bsd.own.mk.in
--- a/bootstrap/mods/mk/bsd.own.mk.in Thu Mar 11 17:28:11 2004 +0000
+++ b/bootstrap/mods/mk/bsd.own.mk.in Thu Mar 11 17:29:11 2004 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.own.mk.in,v 1.1.1.1 2004/03/11 13:04:00 grant Exp $
+# $NetBSD: bsd.own.mk.in,v 1.2 2004/03/11 17:29:11 tv Exp $
.if !defined(_BSD_OWN_MK_)
_BSD_OWN_MK_=1
@@ -18,7 +18,7 @@
BSDOBJDIR?= /usr/obj
BINGRP?= @ROOT_GROUP@
-BINOWN?= root
+BINOWN?= @ROOT_USER@
BINMODE?= 555
NONBINMODE?= 444
@@ -27,13 +27,13 @@
MANDIR?= /usr/share/man
MANGRP?= @ROOT_GROUP@
-MANOWN?= root
+MANOWN?= @ROOT_USER@
MANMODE?= ${NONBINMODE}
MANINSTALL?= maninstall catinstall
INFODIR?= /usr/share/info
INFOGRP?= @ROOT_GROUP@
-INFOOWN?= root
+INFOOWN?= @ROOT_USER@
INFOMODE?= ${NONBINMODE}
LIBDIR?= /usr/lib
@@ -45,22 +45,22 @@
DOCDIR?= /usr/share/doc
HTMLDOCDIR?= /usr/share/doc/html
DOCGRP?= @ROOT_GROUP@
-DOCOWN?= root
+DOCOWN?= @ROOT_USER@
DOCMODE?= ${NONBINMODE}
NLSDIR?= /usr/share/nls
NLSGRP?= @ROOT_GROUP@
-NLSOWN?= root
+NLSOWN?= @ROOT_USER@
NLSMODE?= ${NONBINMODE}
KMODDIR?= /usr/lkm
KMODGRP?= @ROOT_GROUP@
-KMODOWN?= root
+KMODOWN?= @ROOT_USER@
KMODMODE?= ${NONBINMODE}
LOCALEDIR?= /usr/share/locale
LOCALEGRP?= @ROOT_GROUP@
-LOCALEOWN?= root
+LOCALEOWN?= @ROOT_USER@
LOCALEMODE?= ${NONBINMODE}
COPY?= -c
Home |
Main Index |
Thread Index |
Old Index