pkgsrc-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: pkg/36618 (./bootstrap --unprivileged failes on Interix)
The following reply was made to PR pkg/36618; it has been noted by GNATS.
From: Ryo ONODERA <ryo_on%yk.rim.or.jp@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc:
Subject: Re: pkg/36618 (./bootstrap --unprivileged failes on Interix)
Date: Sun, 26 Aug 2012 15:55:31 +0900 (JST)
From: Ryo ONODERA <ryo_on%yk.rim.or.jp@localhost>, Date: Sun, 26 Aug 2012
04:26:58 +0900 (JST)
> My patch probably have a problem when user have joined to many groups.
> I will fix later.
I have fixed the problem.
http://www.netbsd.org/~ryoon/36618-2.diff
diff --git a/bootstrap/bootstrap b/bootstrap/bootstrap
index bfb439b..5ef9a3d 100755
--- a/bootstrap/bootstrap
+++ b/bootstrap/bootstrap
@@ -229,7 +229,7 @@ opsys_finish()
fi
if [ `uname -r` -lt 6 ]; then
echo_msg "Installing fake ldd script"
- run_cmd "$install_sh -c -o $user -g $group -m 755
$pkgsrcdir/pkgtools/bootstrap-extras/files/fakeldd $prefix/sbin"
+ run_cmd "$install_sh -c -o '$user' -g '$group' -m 755
$pkgsrcdir/pkgtools/bootstrap-extras/files/fakeldd $prefix/sbin"
need_extras=yes
echo "LDD= $prefix/sbin/fakeldd"
>> ${TARGET_MKCONF}
fi
@@ -275,7 +275,7 @@ run_cmd()
mkdir_p()
{
for dir in $@; do
- run_cmd "$install_sh -d -o $user -g $group $dir"
+ run_cmd "$install_sh -d -o '$user' -g '$group' $dir"
done
}
Darwin)
@@ -581,8 +580,6 @@ Interix)
need_xargs=no
;;
esac
- # only used for unprivileged builds
- groupsprog="id -gn"
# for bootstrap only; pkgsrc uses CPPFLAGS
CC="gcc -D_ALL_SOURCE"; export CC
ac_cv_header_poll_h=no; export ac_cv_header_poll_h
@@ -685,7 +682,6 @@ QNX)
need_awk=yes
need_sed=yes
set_opsys=no
- groupsprog="id -gn"
whoamiprog="id -un"
machine_arch=`uname -p | sed -e 's/x86/i386/'`
;;
@@ -718,7 +714,6 @@ SunOS)
fi
set_opsys=no
idprog="/usr/xpg4/bin/id"
- groupsprog="${idprog} -gn"
whoamiprog="${idprog} -un"
machine_arch=`uname -p | sed -e 's/i86pc/i386/'`
check_compiler=yes
@@ -790,8 +785,9 @@ if [ -n "$ID" ]; then
idprog="$ID"
else
check_prog idprog id
+ groupsprog="${idprog} -gn"
fi
-check_prog groupsprog groups
+
check_prog lnprog ln
check_prog lsprog ls
check_prog rmdirprog rmdir
@@ -843,24 +839,24 @@ install_sh="$shprog $wrkdir/bin/install-sh"
is_root
if [ $? = 1 ]; then
- user=$root_user
- group=$root_group
+ user="$root_user"
+ group="$root_group"
else
if [ $unprivileged = "no" ]; then
die "You must be either root to install bootstrap-pkgsrc or use
the --unprivileged option."
fi
- user=`$whoamiprog`
- group=`$groupsprog | $awkprog '{print $1}'`
+ user="`$whoamiprog`"
+ group="`$groupsprog`"
echo_msg "building as unprivileged user $user/$group"
# force bmake install target to use $user and $group
- echo "BINOWN=$user
-BINGRP=$group
-LIBOWN=$user
-LIBGRP=$group
-MANOWN=$user
-MANGRP=$group" > ${wrkdir}/Makefile.inc
+ echo 'BINOWN="$user"
+BINGRP="$group"
+LIBOWN="$user"
+LIBGRP="$group"
+MANOWN="$user"
+MANGRP="$group"' > ${wrkdir}/Makefile.inc
fi
# export the proper environment
@@ -942,8 +938,8 @@ if [ "$need_bsd_install" = "yes" ]; then
fi
if [ "$need_fixed_strip" = "yes" ] ; then
- echo_msg "Installing fixed strip script"
- run_cmd "$install_sh -c -o $user -g $group -m 755
$pkgsrcdir/pkgtools/bootstrap-extras/files/strip-sh $wrkdir/bin/strip"
+ cho_msg "Installing fixed strip script"
+ run_cmd "$install_sh -c -o '$user' -g '$group' -m 755
$pkgsrcdir/pkgtools/bootstrap-extras/files/strip-sh $wrkdir/bin/strip"
echo "TOOLS_PLATFORM.strip?= $prefix/bin/strip" >>
${TARGET_MKCONF}
echo "TOOLS_PLATFORM.strip?= $wrkdir/bin/strip" >>
${BOOTSTRAP_MKCONF}
need_extras=yes
@@ -951,7 +947,7 @@ fi
if [ "$need_mkdir" = "yes" -a -z "$MKDIR" ]; then
echo_msg "Installing fixed mkdir script \"mkdir-sh\""
- run_cmd "$install_sh -c -o $user -g $group -m 755
$pkgsrcdir/pkgtools/bootstrap-extras/files/mkdir-sh $wrkdir/bin/mkdir-sh"
+ run_cmd "$install_sh -c -o '$user' -g '$group' -m 755
$pkgsrcdir/pkgtools/bootstrap-extras/files/mkdir-sh $wrkdir/bin/mkdir-sh"
echo "TOOLS_PLATFORM.mkdir?= $prefix/bin/mkdir-sh -p" >>
${TARGET_MKCONF}
echo "TOOLS_PLATFORM.mkdir?= $wrkdir/bin/mkdir-sh -p" >>
${BOOTSTRAP_MKCONF}
need_extras=yes
@@ -959,7 +955,7 @@ fi
if [ "$need_xargs" = "yes" ]; then
echo_msg "Installing fixed xargs script"
- run_cmd "$install_sh -c -o $user -g $group -m 755
$pkgsrcdir/pkgtools/bootstrap-extras/files/xargs-sh $wrkdir/bin/xargs"
+ run_cmd "$install_sh -c -o '$user' -g '$group' -m 755
$pkgsrcdir/pkgtools/bootstrap-extras/files/xargs-sh $wrkdir/bin/xargs"
echo "TOOLS_PLATFORM.xargs?= $prefix/bin/xargs" >>
${TARGET_MKCONF}
echo "TOOLS_PLATFORM.xargs?= $wrkdir/bin/xargs" >>
${BOOTSTRAP_MKCONF}
need_extras=yes
@@ -967,15 +963,15 @@ fi
echo_msg "Bootstrapping mk-files"
run_cmd "(cd ${pkgsrcdir}/pkgtools/bootstrap-mk-files/files && env
CP=${cpprog} \
- OPSYS=${opsys} MK_DST=${wrkdir}/share/mk ROOT_GROUP=${root_group} \
-ROOT_USER=${root_user} SED=${sedprog} SYSCONFDIR=${sysconfdir} \
+ OPSYS=${opsys} MK_DST=${wrkdir}/share/mk ROOT_GROUP=\"${root_group}\" \
+ROOT_USER=\"${root_user}\" SED=${sedprog} SYSCONFDIR=${sysconfdir} \
$shprog ./bootstrap.sh)"
bootstrap_bmake() {
echo_msg "Bootstrapping bmake"
copy_src $pkgsrcdir/devel/bmake/files bmake
run_cmd "(cd $wrkdir/bmake && env $bmakexenv $shprog ./boot-strap
$configure_quiet_flags -q -o bootstrap.$opsys --prefix=$wrkdir
--sysconfdir=$wrkdir --mksrc none --with-default-sys-path="$wrkdir/share/mk"
$bmakexargs)"
- run_cmd "$install_sh -c -o $user -g $group -m 755
$wrkdir/bmake/bootstrap.$opsys/bmake $wrkdir/bin/bmake"
+ run_cmd "$install_sh -c -o '$user' -g '$group' -m 755
$wrkdir/bmake/bootstrap.$opsys/bmake $wrkdir/bin/bmake"
}
bootstrap_bmake
@@ -992,7 +988,7 @@ yes) echo_msg "Bootstrapping ksh"
copy_src $pkgsrcdir/shells/pdksh/files ksh
test -n "$CC" || CC=gcc # default to gcc if no compiler is specified
run_cmd "(cd $wrkdir/ksh && env $BSTRAP_ENV $shprog ./configure
$configure_quiet_flags --prefix=$prefix --mandir=$mandir
--sysconfdir=$sysconfdir && $bmake)"
- run_cmd "$install_sh -c -o $user -g $group -m 755 $wrkdir/ksh/ksh
$wrkdir/bin/pdksh"
+ run_cmd "$install_sh -c -o '$user' -g '$group' -m 755 $wrkdir/ksh/ksh
$wrkdir/bin/pdksh"
echo "TOOLS_PLATFORM.sh?= $prefix/bin/pdksh" >>
${TARGET_MKCONF}
echo "TOOLS_PLATFORM.sh?= $wrkdir/bin/pdksh" >>
${BOOTSTRAP_MKCONF}
echo "TOOLS_PLATFORM.ksh?= $prefix/bin/pdksh" >>
${TARGET_MKCONF}
@@ -1010,7 +1006,7 @@ yes) echo_msg "Bootstrapping awk"
copy_src $pkgsrcdir/lang/nawk/files awk
test -n "$CC" || CC=gcc # default to gcc if no compiler is specified
run_cmd "(cd $wrkdir/awk && $bmake -f Makefile CC=\"${CC}\"
CFLAGS=\"${CFLAGS}\")"
- run_cmd "$install_sh -c -o $user -g $group -m 755 $wrkdir/awk/a.out
$wrkdir/bin/nawk"
+ run_cmd "$install_sh -c -o '$user' -g '$group' -m 755 $wrkdir/awk/a.out
$wrkdir/bin/nawk"
echo "TOOLS_PLATFORM.awk?= $prefix/bin/nawk" >>
${TARGET_MKCONF}
echo "TOOLS_PLATFORM.awk?= $wrkdir/bin/nawk" >>
${BOOTSTRAP_MKCONF}
;;
@@ -1021,7 +1017,7 @@ case "$need_sed" in
yes) echo_msg "Bootstrapping sed"
copy_src $pkgsrcdir/textproc/nbsed/files sed
run_cmd "(cd $wrkdir/sed; env $BSTRAP_ENV CPPFLAGS='$CPPFLAGS
-I../libnbcompat' LDFLAGS='$LDFLAGS -L../libnbcompat' LIBS='$LIBS -lnbcompat'
$shprog ./configure $configure_quiet_flags -C --prefix=$prefix --mandir=$mandir
--sysconfdir=$sysconfdir --program-transform-name='s,sed,nbsed,' && $bmake)"
- run_cmd "$install_sh -c -o $user -g $group -m 755 $wrkdir/sed/sed
$wrkdir/bin/sed"
+ run_cmd "$install_sh -c -o '$user' -g '$group' -m 755 $wrkdir/sed/sed
$wrkdir/bin/sed"
echo "TOOLS_PLATFORM.sed?= $prefix/bin/nbsed" >>
${TARGET_MKCONF}
echo "TOOLS_PLATFORM.sed?= $wrkdir/bin/sed" >>
${BOOTSTRAP_MKCONF}
;;
@@ -1036,9 +1032,9 @@ LDFLAGS='$LDFLAGS -L../libnbcompat -L../../libnbcompat' \
LIBS='$LIBS -lnbcompat' $shprog ./configure $configure_quiet_flags -C \
--enable-bootstrap --prefix=$prefix --sysconfdir=$sysconfdir \
--with-pkgdbdir=$pkgdbdir --mandir=$mandir $pkg_install_args && $bmake)"
-run_cmd "$install_sh -c -o $user -g $group -m 755
$wrkdir/pkg_install/admin/pkg_admin $wrkdir/sbin/pkg_admin"
-run_cmd "$install_sh -c -o $user -g $group -m 755
$wrkdir/pkg_install/create/pkg_create $wrkdir/sbin/pkg_create"
-run_cmd "$install_sh -c -o $user -g $group -m 755
$wrkdir/pkg_install/info/pkg_info $wrkdir/sbin/pkg_info"
+run_cmd "$install_sh -c -o '$user' -g '$group' -m 755
$wrkdir/pkg_install/admin/pkg_admin $wrkdir/sbin/pkg_admin"
+run_cmd "$install_sh -c -o '$user' -g '$group' -m 755
$wrkdir/pkg_install/create/pkg_create $wrkdir/sbin/pkg_create"
+run_cmd "$install_sh -c -o '$user' -g '$group' -m 755
$wrkdir/pkg_install/info/pkg_info $wrkdir/sbin/pkg_info"
echo "PKG_ADMIN_CMD?= $wrkdir/sbin/pkg_admin" >>
${BOOTSTRAP_MKCONF}
echo "PKG_CREATE_CMD?= $wrkdir/sbin/pkg_create" >>
${BOOTSTRAP_MKCONF}
echo "PKG_INFO_CMD?= $wrkdir/sbin/pkg_info" >>
${BOOTSTRAP_MKCONF}
diff --git a/mk/bsd.pkg.mk b/mk/bsd.pkg.mk
index 15944e0..ed13f51 100644
--- a/mk/bsd.pkg.mk
+++ b/mk/bsd.pkg.mk
@@ -99,9 +99,9 @@ SVR4_PKGNAME?= ${PKGNAME}
WRKSRC?= ${WRKDIR}/${DISTNAME}
# Override for SU_CMD user check
-_SU_ROOT_USER?= ${ROOT_USER}
-REAL_ROOT_USER?= ${ROOT_USER}
-REAL_ROOT_GROUP?= ${ROOT_GROUP}
+_SU_ROOT_USER?= "${ROOT_USER}"
+REAL_ROOT_USER?= "${ROOT_USER}"
+REAL_ROOT_GROUP?= "${ROOT_GROUP}"
.if (defined(INSTALL_UNSTRIPPED) && !empty(INSTALL_UNSTRIPPED:M[yY][eE][sS]))
|| defined(DEBUG_FLAGS)
_INSTALL_UNSTRIPPED= # set (flag used by platform/*.mk)
@@ -177,11 +177,11 @@ ALL_ENV+= PREFIX=${PREFIX}
# This variable can be added to MAKE_ENV to ease installation of packages
# that use BSD-style Makefiles.
-BSD_MAKE_ENV= BINOWN=${BINOWN} BINGRP=${BINGRP}
-BSD_MAKE_ENV+= GAMEOWN=${GAMEOWN} GAMEGRP=${GAMEGRP}
-BSD_MAKE_ENV+= MANOWN=${MANOWN} MANGRP=${MANGRP}
-BSD_MAKE_ENV+= SHAREOWN=${SHAREOWN} SHAREGRP=${SHAREGRP}
-BSD_MAKE_ENV+= DOCOWN=${DOCOWN} DOCGRP=${DOCGRP}
+BSD_MAKE_ENV= BINOWN="${BINOWN}" BINGRP="${BINGRP}"
+BSD_MAKE_ENV+= GAMEOWN="${GAMEOWN}" GAMEGRP="${GAMEGRP}"
+BSD_MAKE_ENV+= MANOWN="${MANOWN}" MANGRP="${MANGRP}"
+BSD_MAKE_ENV+= SHAREOWN="${SHAREOWN}" SHAREGRP="${SHAREGRP}"
+BSD_MAKE_ENV+= DOCOWN="${DOCOWN}" DOCGRP="${DOCGRP}"
BSD_MAKE_ENV+= BINMODE=${BINMODE} NONBINMODE=${NONBINMODE}
BSD_MAKE_ENV+= BINDIR=${PREFIX}/bin
BSD_MAKE_ENV+= INCSDIR=${PREFIX}/include
@@ -239,31 +239,31 @@ TOUCH_FLAGS?= -f
# A few aliases for *-install targets
INSTALL= ${TOOLS_INSTALL} # XXX override sys.mk
INSTALL_PROGRAM?= \
- ${INSTALL} ${COPY} ${_STRIPFLAG_INSTALL} -o ${BINOWN} -g ${BINGRP} -m
${BINMODE}
+ ${INSTALL} ${COPY} ${_STRIPFLAG_INSTALL} -o "${BINOWN}" -g "${BINGRP}"
-m ${BINMODE}
INSTALL_GAME?= \
- ${INSTALL} ${COPY} ${_STRIPFLAG_INSTALL} -o ${GAMEOWN} -g ${GAMEGRP} -m
${GAMEMODE}
+ ${INSTALL} ${COPY} ${_STRIPFLAG_INSTALL} -o "${GAMEOWN}" -g
"${GAMEGRP}" -m ${GAMEMODE}
INSTALL_SCRIPT?= \
- ${INSTALL} ${COPY} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE}
+ ${INSTALL} ${COPY} -o "${BINOWN}" -g "${BINGRP}" -m ${BINMODE}
INSTALL_LIB?= \
- ${INSTALL} ${COPY} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE}
+ ${INSTALL} ${COPY} -o "${BINOWN}" -g "${BINGRP}" -m ${BINMODE}
INSTALL_DATA?= \
- ${INSTALL} ${COPY} -o ${SHAREOWN} -g ${SHAREGRP} -m ${SHAREMODE}
+ ${INSTALL} ${COPY} -o "${SHAREOWN}" -g "${SHAREGRP}" -m ${SHAREMODE}
INSTALL_GAME_DATA?= \
- ${INSTALL} ${COPY} -o ${GAMEOWN} -g ${GAMEGRP} -m ${GAMEDATAMODE}
+ ${INSTALL} ${COPY} -o "${GAMEOWN}" -g "${GAMEGRP}" -m ${GAMEDATAMODE}
INSTALL_MAN?= \
- ${INSTALL} ${COPY} -o ${MANOWN} -g ${MANGRP} -m ${MANMODE}
+ ${INSTALL} ${COPY} -o "${MANOWN}" -g "${MANGRP}" -m ${MANMODE}
INSTALL_PROGRAM_DIR?= \
- ${INSTALL} -d -o ${BINOWN} -g ${BINGRP} -m ${PKGDIRMODE}
+ ${INSTALL} -d -o "${BINOWN}" -g "${BINGRP}" -m ${PKGDIRMODE}
INSTALL_GAME_DIR?= \
- ${INSTALL} -d -o ${GAMEOWN} -g ${GAMEGRP} -m ${GAMEDIRMODE}
+ ${INSTALL} -d -o "${GAMEOWN}" -g "${GAMEGRP}" -m ${GAMEDIRMODE}
INSTALL_SCRIPT_DIR?= \
${INSTALL_PROGRAM_DIR}
INSTALL_LIB_DIR?= \
${INSTALL_PROGRAM_DIR}
INSTALL_DATA_DIR?= \
- ${INSTALL} -d -o ${SHAREOWN} -g ${SHAREGRP} -m ${PKGDIRMODE}
+ ${INSTALL} -d -o "${SHAREOWN}" -g "${SHAREGRP}" -m ${PKGDIRMODE}
INSTALL_MAN_DIR?= \
- ${INSTALL} -d -o ${MANOWN} -g ${MANGRP} -m ${PKGDIRMODE}
+ ${INSTALL} -d -o "${MANOWN}" -g "${MANGRP}" -m ${PKGDIRMODE}
INSTALL_MACROS= BSD_INSTALL_PROGRAM=${INSTALL_PROGRAM:Q}
\
BSD_INSTALL_SCRIPT=${INSTALL_SCRIPT:Q} \
diff --git a/mk/configure/configure.mk b/mk/configure/configure.mk
index 6ca30bb..782cef8 100644
--- a/mk/configure/configure.mk
+++ b/mk/configure/configure.mk
@@ -192,7 +192,7 @@ do-configure-post-hook:
### do-configure-script runs the configure script to configure the
### software for building.
###
-_CONFIGURE_SCRIPT_ENV+= INSTALL=${INSTALL:Q}\ -c\ -o\ ${BINOWN}\ -g\
${BINGRP}
+_CONFIGURE_SCRIPT_ENV+= INSTALL=${INSTALL:Q}\ -c\ -o\ "${BINOWN}"\ -g\
"${BINGRP}"
_CONFIGURE_SCRIPT_ENV+= INSTALL_PROGRAM=${INSTALL_PROGRAM:Q}
_CONFIGURE_SCRIPT_ENV+= INSTALL_SCRIPT=${INSTALL_SCRIPT:Q}
_CONFIGURE_SCRIPT_ENV+= INSTALL_DATA=${INSTALL_DATA:Q}
diff --git a/mk/configure/gnu-configure.mk b/mk/configure/gnu-configure.mk
index 0dcc9da..800ba4e 100644
--- a/mk/configure/gnu-configure.mk
+++ b/mk/configure/gnu-configure.mk
@@ -15,7 +15,7 @@ INSTALL_SH_OVERRIDE?= # empty
CONFIGURE_ENV+= CONFIG_SHELL=${CONFIG_SHELL:Q}
CONFIGURE_ENV+= LIBS=${LIBS:M*:Q}
-CONFIGURE_ENV+= ac_given_INSTALL=${INSTALL:Q}\ -c\ -o\ ${BINOWN}\ -g\
${BINGRP}
+CONFIGURE_ENV+= ac_given_INSTALL=${INSTALL:Q}\ -c\ -o\ "${BINOWN}"\ -g\
"${BINGRP}"
.if (defined(USE_LIBTOOL) || !empty(PKGPATH:Mdevel/libtool-base)) && \
defined(_OPSYS_MAX_CMDLEN_CMD)
diff --git a/pkgtools/bootstrap-mk-files/Makefile
b/pkgtools/bootstrap-mk-files/Makefile
index e9f9814..1824a7a 100644
--- a/pkgtools/bootstrap-mk-files/Makefile
+++ b/pkgtools/bootstrap-mk-files/Makefile
@@ -36,9 +36,9 @@ do-configure:
else \
own_mk=mods/bsd.own.mk.in; \
fi; \
- ${SED} -e 's|@ROOT_GROUP@|'${REAL_ROOT_GROUP}'|g'
\
- -e 's|@ROOT_USER@|'${REAL_ROOT_USER}'|g'
\
- -e 's|@SYSCONFDIR@|'${PKG_SYSCONFDIR}'|g' \
+ ${SED} -e 's|@ROOT_GROUP@|"${REAL_ROOT_GROUP}"|g' \
+ -e 's|@ROOT_USER@|"${REAL_ROOT_USER}"|g' \
+ -e 's|@SYSCONFDIR@|${PKG_SYSCONFDIR}|g' \
$$own_mk > bsd.own.mk
do-install:
diff --git a/pkgtools/libnbcompat/inplace.mk b/pkgtools/libnbcompat/inplace.mk
index 34b84b7..bd15cf5 100644
--- a/pkgtools/libnbcompat/inplace.mk
+++ b/pkgtools/libnbcompat/inplace.mk
@@ -45,9 +45,9 @@ libnbcompat-build:
cd ${LIBNBCOMPAT_SRCDIR} && ${SETENV} \
AWK=${AWK:Q} CC=${CC:Q} CFLAGS=${CFLAGS:M*:Q} \
CPPFLAGS=${CPPFLAGS:M*:Q} \
- ${CONFIGURE_ENV:NLIBS=*} ${CONFIG_SHELL} \
+ ${CONFIGURE_ENV:NLIBS=*:Q} ${CONFIG_SHELL} \
${CONFIGURE_SCRIPT} ${NBCOMPAT_CONFIGURE_ARGS} && \
- ${SETENV} ${MAKE_ENV} ${MAKE}
+ ${SETENV} ${MAKE_ENV:Q} ${MAKE}
.if !empty(LIBNBCOMPAT_USE_PIC:M[Yy][Ee][Ss])
@${STEP_MSG} "Configuring and building libnbcompat (PIC version)"
${RUN} ${_ULIMIT_CMD} \
diff --git a/pkgtools/pkg_install/files/add/Makefile.in
b/pkgtools/pkg_install/files/add/Makefile.in
index 9185cd7..73cc770 100644
--- a/pkgtools/pkg_install/files/add/Makefile.in
+++ b/pkgtools/pkg_install/files/add/Makefile.in
@@ -26,8 +26,6 @@ LIBS+= -lcrypto
.endif
LIBS+= @LIBS@
-INSTALL= @INSTALL@
-
PROG= pkg_add
OBJS= main.o perform.o
@@ -44,11 +42,11 @@ clean:
rm -f $(OBJS) $(PROG)
install:
- $(INSTALL) -m 755 -d ${DESTDIR}$(sbindir)
- $(INSTALL) -m 755 -d ${DESTDIR}$(man1dir)
- $(INSTALL) $(PROG) ${DESTDIR}$(sbindir)/$(PROG)
- $(INSTALL) -m 444 $(PROG).1 ${DESTDIR}$(man1dir)/$(PROG).1
+ $(BSD_INSTALL_PROGRAM_DIR) ${DESTDIR}$(sbindir)
+ $(BSD_INSTALL_MAN_DIR) ${DESTDIR}$(man1dir)
+ $(BSD_INSTALL_PROGRAM) $(PROG) ${DESTDIR}$(sbindir)/$(PROG)
+ $(BSD_INSTALL_MAN) $(PROG).1 ${DESTDIR}$(man1dir)/$(PROG).1
.if defined(MANINSTALL) && !empty(MANINSTALL:Mcatinstall)
- $(INSTALL) -m 755 -d ${DESTDIR}$(cat1dir)
- $(INSTALL) -m 444 $(PROG).cat ${DESTDIR}$(cat1dir)/$(PROG).0
+ $(BSD_INSTALL_MAN_DIR) -d ${DESTDIR}$(cat1dir)
+ $(BSD_INSTALL_MAN) $(PROG).cat ${DESTDIR}$(cat1dir)/$(PROG).0
.endif
diff --git a/pkgtools/pkg_install/files/admin/Makefile.in
b/pkgtools/pkg_install/files/admin/Makefile.in
index 92e4f0f..8089b03 100644
--- a/pkgtools/pkg_install/files/admin/Makefile.in
+++ b/pkgtools/pkg_install/files/admin/Makefile.in
@@ -22,8 +22,6 @@ DEFS= @DEFS@
CFLAGS= @CFLAGS@
LDFLAGS= @LDFLAGS@ -L../lib
-INSTALL= @INSTALL@
-
PROG= pkg_admin
SCRIPTS= audit-packages download-vulnerability-list
@@ -54,20 +52,20 @@ clean:
rm -f $(OBJS) $(PROG)
install:
- $(INSTALL) -m 755 -d ${DESTDIR}$(sbindir)
- $(INSTALL) -m 755 -d ${DESTDIR}$(man1dir)
- $(INSTALL) -m 755 -d ${DESTDIR}$(man8dir)
- $(INSTALL) $(PROG) ${DESTDIR}$(sbindir)/$(PROG)
- $(INSTALL) -m 555 $(SCRIPTS) ${DESTDIR}$(sbindir)
- $(INSTALL) -m 444 $(PROG).1 ${DESTDIR}$(man1dir)/$(PROG).1
- $(INSTALL) -m 444 audit-packages.8 ${DESTDIR}$(man8dir)/
- $(INSTALL) -m 444 download-vulnerability-list.8 ${DESTDIR}$(man8dir)/
+ $(BSD_INSTALL_PROGRAM_DIR) ${DESTDIR}$(sbindir)
+ $(BSD_INSTALL_MAN_DIR) ${DESTDIR}$(man1dir)
+ $(BSD_INSTALL_MAN_DIR) ${DESTDIR}$(man8dir)
+ $(BSD_INSTALL_PROGRAM) $(PROG) ${DESTDIR}$(sbindir)/$(PROG)
+ $(BSD_INSTALL_SCRIPT) $(SCRIPTS) ${DESTDIR}$(sbindir)
+ $(BSD_INSTALL_MAN) $(PROG).1 ${DESTDIR}$(man1dir)/$(PROG).1
+ $(BSD_INSTALL_MAN) audit-packages.8 ${DESTDIR}$(man8dir)/
+ $(BSD_INSTALL_MAN) download-vulnerability-list.8 ${DESTDIR}$(man8dir)/
.if defined(MANINSTALL) && !empty(MANINSTALL:Mcatinstall)
- $(INSTALL) -m 755 -d ${DESTDIR}$(cat1dir)
- $(INSTALL) -m 755 -d ${DESTDIR}$(cat8dir)
- $(INSTALL) -m 444 $(PROG).cat ${DESTDIR}$(cat1dir)/$(PROG).0
- $(INSTALL) -m 444 audit-packages.cat
${DESTDIR}$(cat8dir)/audit-packages.0
- $(INSTALL) -m 444 download-vulnerability-list.cat
${DESTDIR}$(cat8dir)/download-vulnerability-list.0
+ $(BSD_INSTALL_MAN_DIR) ${DESTDIR}$(cat1dir)
+ $(BSD_INSTALL_MAN_DIR) ${DESTDIR}$(cat8dir)
+ $(BSD_INSTALL_MAN) $(PROG).cat ${DESTDIR}$(cat1dir)/$(PROG).0
+ $(BSD_INSTALL_MAN) audit-packages.cat
${DESTDIR}$(cat8dir)/audit-packages.0
+ $(BSD_INSTALL_MAN) download-vulnerability-list.cat
${DESTDIR}$(cat8dir)/download-vulnerability-list.0
.endif
audit-packages: audit-packages.sh.in
diff --git a/pkgtools/pkg_install/files/create/Makefile.in
b/pkgtools/pkg_install/files/create/Makefile.in
index 70ae4575..2f9dd5c 100644
--- a/pkgtools/pkg_install/files/create/Makefile.in
+++ b/pkgtools/pkg_install/files/create/Makefile.in
@@ -19,8 +19,6 @@ DEFS= @DEFS@
CFLAGS= @CFLAGS@
LDFLAGS= @LDFLAGS@ -L../lib
-INSTALL= @INSTALL@
-
PROG= pkg_create
.if empty(BOOTSTRAP)
@@ -45,11 +43,11 @@ clean:
rm -f $(OBJS) $(PROG)
install:
- $(INSTALL) -m 755 -d ${DESTDIR}$(sbindir)
- $(INSTALL) -m 755 -d ${DESTDIR}$(man1dir)
- $(INSTALL) $(PROG) ${DESTDIR}$(sbindir)/$(PROG)
- $(INSTALL) -m 444 $(PROG).1 ${DESTDIR}$(man1dir)/$(PROG).1
+ $(BSD_INSTALL_PROGRAM_DIR) ${DESTDIR}$(sbindir)
+ $(BSD_INSTALL_MAN_DIR) ${DESTDIR}$(man1dir)
+ $(BSD_INSTALL_PROGRAM) $(PROG) ${DESTDIR}$(sbindir)/$(PROG)
+ $(BSD_INSTALL_MAN) $(PROG).1 ${DESTDIR}$(man1dir)/$(PROG).1
.if defined(MANINSTALL) && !empty(MANINSTALL:Mcatinstall)
- $(INSTALL) -m 755 -d ${DESTDIR}$(cat1dir)
- $(INSTALL) -m 444 $(PROG).cat ${DESTDIR}$(cat1dir)/$(PROG).0
+ $(BSD_INSTALL_MAN_DIR) ${DESTDIR}$(cat1dir)
+ $(BSD_INSTALL_MAN) $(PROG).cat ${DESTDIR}$(cat1dir)/$(PROG).0
.endif
diff --git a/pkgtools/pkg_install/files/delete/Makefile.in
b/pkgtools/pkg_install/files/delete/Makefile.in
index e1b2483..6dcad2b 100644
--- a/pkgtools/pkg_install/files/delete/Makefile.in
+++ b/pkgtools/pkg_install/files/delete/Makefile.in
@@ -19,8 +19,6 @@ DEFS= @DEFS@
CFLAGS= @CFLAGS@
LDFLAGS= @LDFLAGS@ -L../lib
-INSTALL= @INSTALL@
-
PROG= pkg_delete
OBJS= pkg_delete.o
@@ -37,11 +35,11 @@ clean:
rm -f $(OBJS) $(PROG)
install:
- $(INSTALL) -m 755 -d ${DESTDIR}$(sbindir)
- $(INSTALL) -m 755 -d ${DESTDIR}$(man1dir)
- $(INSTALL) $(PROG) ${DESTDIR}$(sbindir)/$(PROG)
- $(INSTALL) -m 444 $(PROG).1 ${DESTDIR}$(man1dir)/$(PROG).1
+ $(BSD_INSTALL_PROGRAM_DIR) ${DESTDIR}$(sbindir)
+ $(BSD_INSTALL_MAN_DIR) ${DESTDIR}$(man1dir)
+ $(BSD_INSTALL_PROGRAM) $(PROG) ${DESTDIR}$(sbindir)/$(PROG)
+ $(BSD_INSTALL_MAN) $(PROG).1 ${DESTDIR}$(man1dir)/$(PROG).1
.if defined(MANINSTALL) && !empty(MANINSTALL:Mcatinstall)
- $(INSTALL) -m 755 -d ${DESTDIR}$(cat1dir)
- $(INSTALL) -m 444 $(PROG).cat ${DESTDIR}$(cat1dir)/$(PROG).0
+ $(BSD_INSTALL_MAN_DIR) ${DESTDIR}$(cat1dir)
+ $(BSD_INSTALL_MAN) $(PROG).cat ${DESTDIR}$(cat1dir)/$(PROG).0
.endif
diff --git a/pkgtools/pkg_install/files/info/Makefile.in
b/pkgtools/pkg_install/files/info/Makefile.in
index ddf6759..c636e3d 100644
--- a/pkgtools/pkg_install/files/info/Makefile.in
+++ b/pkgtools/pkg_install/files/info/Makefile.in
@@ -30,8 +30,6 @@ DEFS= @DEFS@
CFLAGS= @CFLAGS@
LDFLAGS= @LDFLAGS@ -L../lib
-INSTALL= @INSTALL@
-
PROG= pkg_info
OBJS= main.o perform.o show.o
@@ -48,11 +46,11 @@ clean:
rm -f $(OBJS) $(PROG)
install:
- $(INSTALL) -m 755 -d ${DESTDIR}$(sbindir)
- $(INSTALL) -m 755 -d ${DESTDIR}$(man1dir)
- $(INSTALL) $(PROG) ${DESTDIR}$(sbindir)/$(PROG)
- $(INSTALL) -m 444 $(PROG).1 ${DESTDIR}$(man1dir)/$(PROG).1
+ $(BSD_INSTALL_PROGRAM_DIR) ${DESTDIR}$(sbindir)
+ $(BSD_INSTALL_MAN_DIR) ${DESTDIR}$(man1dir)
+ $(BSD_INSTALL_PROGRAM) $(PROG) ${DESTDIR}$(sbindir)/$(PROG)
+ $(BSD_INSTALL_MAN) $(PROG).1 ${DESTDIR}$(man1dir)/$(PROG).1
.if defined(MANINSTALL) && !empty(MANINSTALL:Mcatinstall)
- $(INSTALL) -m 755 -d ${DESTDIR}$(cat1dir)
- $(INSTALL) -m 444 $(PROG).cat ${DESTDIR}$(cat1dir)/$(PROG).0
+ $(BSD_INSTALL_MAN_DIR) ${DESTDIR}$(cat1dir)
+ $(BSD_INSTALL_MAN) $(PROG).cat ${DESTDIR}$(cat1dir)/$(PROG).0
.endif
diff --git a/pkgtools/pkg_install/files/lib/Makefile.in
b/pkgtools/pkg_install/files/lib/Makefile.in
index 2613315..7ce5aab 100644
--- a/pkgtools/pkg_install/files/lib/Makefile.in
+++ b/pkgtools/pkg_install/files/lib/Makefile.in
@@ -22,8 +22,6 @@ CPPFLAGS= @CPPFLAGS@ -I. -I$(srcdir)
DEFS= @DEFS@ -DDEF_LOG_DIR=\"$(pkgdbdir)\"
CFLAGS= @CFLAGS@
-INSTALL= @INSTALL@
-
LIB= libinstall.a
OBJS= automatic.o conflicts.o dewey.o fexec.o file.o \
@@ -57,15 +55,15 @@ clean:
rm -f $(OBJS) $(LIB)
install:
- $(INSTALL) -m 755 -d ${DESTDIR}$(man5dir)
- $(INSTALL) -m 755 -d ${DESTDIR}$(man7dir)
- $(INSTALL) -m 444 pkg_summary.5 ${DESTDIR}$(man5dir)/pkg_summary.5
- $(INSTALL) -m 444 pkg_install.conf.5
${DESTDIR}$(man5dir)/pkg_install.conf.5
- $(INSTALL) -m 444 pkgsrc.7 ${DESTDIR}$(man7dir)/pkgsrc.7
+ $(BSD_INSTALL_MAN_DIR) ${DESTDIR}$(man5dir)
+ $(BSD_INSTALL_MAN_DIR) ${DESTDIR}$(man7dir)
+ $(BSD_INSTALL_MAN) pkg_summary.5 ${DESTDIR}$(man5dir)/pkg_summary.5
+ $(BSD_INSTALL_MAN) pkg_install.conf.5
${DESTDIR}$(man5dir)/pkg_install.conf.5
+ $(BSD_INSTALL_MAN) pkgsrc.7 ${DESTDIR}$(man7dir)/pkgsrc.7
.if defined(MANINSTALL) && !empty(MANINSTALL:Mcatinstall)
- $(INSTALL) -m 755 -d ${DESTDIR}$(cat5dir)
- $(INSTALL) -m 755 -d ${DESTDIR}$(cat7dir)
- $(INSTALL) -m 444 pkg_summary.cat ${DESTDIR}$(cat5dir)/pkg_summary.0
- $(INSTALL) -m 444 pkg_install.conf.cat
${DESTDIR}$(cat5dir)/pkg_install.conf.0
- $(INSTALL) -m 444 pkgsrc.cat ${DESTDIR}$(cat7dir)/pkgsrc.0
+ $(BSD_INSTALL_MAN_DIR) ${DESTDIR}$(cat5dir)
+ $(BSD_INSTALL_MAN_DIR) ${DESTDIR}$(cat7dir)
+ $(BSD_INSTALL_MAN) pkg_summary.cat ${DESTDIR}$(cat5dir)/pkg_summary.0
+ $(BSD_INSTALL_MAN) pkg_install.conf.cat
${DESTDIR}$(cat5dir)/pkg_install.conf.0
+ $(BSD_INSTALL_MAN) pkgsrc.cat ${DESTDIR}$(cat7dir)/pkgsrc.0
.endif
diff --git a/pkgtools/pkg_install/files/view/Makefile.in
b/pkgtools/pkg_install/files/view/Makefile.in
index 1f11af0..8c98a11 100644
--- a/pkgtools/pkg_install/files/view/Makefile.in
+++ b/pkgtools/pkg_install/files/view/Makefile.in
@@ -20,16 +20,16 @@ clean:
@true # do nothing
install:
- $(INSTALL) -m 755 -d ${DESTDIR}$(sbindir)
- $(INSTALL) -m 755 -d ${DESTDIR}$(man1dir)
- $(INSTALL) -m 755 -d ${DESTDIR}$(cat1dir)
+ $(BSD_INSTALL_PROGRAM_DIR) ${DESTDIR}$(sbindir)
+ $(BSD_INSTALL_MAN_DIR) ${DESTDIR}$(man1dir)
+ $(BSD_INSTALL_MAN_DIR) ${DESTDIR}$(cat1dir)
@for script in $(SCRIPTS); do \
- echo "$(INSTALL) $$script.sh ${DESTDIR}$(sbindir)/$$script"; \
- $(INSTALL) $$script.sh ${DESTDIR}$(sbindir)/$$script; \
+ echo "$(BSD_INSTALL_SCRIPT) $$script.sh
${DESTDIR}$(sbindir)/$$script"; \
+ $(BSD_INSTALL_SCRIPT) $$script.sh
${DESTDIR}$(sbindir)/$$script; \
done
@for script in $(SCRIPTS); do \
- echo "$(INSTALL) -m 444 $$script.1
${DESTDIR}$(man1dir)/$$script.1"; \
- $(INSTALL) -m 444 $$script.1 ${DESTDIR}$(man1dir)/$$script.1; \
- echo "$(INSTALL) -m 444 $$script.cat1
${DESTDIR}$(cat1dir)/$$script.0"; \
- $(INSTALL) -m 444 $$script.cat1
${DESTDIR}$(cat1dir)/$$script.0; \
+ echo "$(BSD_INSTALL_MAN) $$script.1
${DESTDIR}$(man1dir)/$$script.1"; \
+ $(BSD_INSTALL_MAN) $$script.1 ${DESTDIR}$(man1dir)/$$script.1; \
+ echo "$(BSD_INSTALL_MAN) $$script.cat1
${DESTDIR}$(cat1dir)/$$script.0"; \
+ $(BSD_INSTALL_MAN) $$script.cat1
${DESTDIR}$(cat1dir)/$$script.0; \
done
diff --git a/sysutils/install-sh/Makefile b/sysutils/install-sh/Makefile
index 62d7d1c..efcc575 100644
--- a/sysutils/install-sh/Makefile
+++ b/sysutils/install-sh/Makefile
@@ -1,6 +1,6 @@
# $NetBSD: Makefile,v 1.8 2010/10/08 19:57:05 tez Exp $
-DISTNAME= install-sh-20100824
+DISTNAME= install-sh-20120823
CATEGORIES= sysutils
MASTER_SITES= # empty
DISTFILES= # empty
@@ -17,9 +17,9 @@ NO_BUILD= yes
# issues.
#
INSTALL_SCRIPT= \
- ${SH} ${WRKSRC}/install-sh -c -o ${BINOWN} -g ${BINGRP} -m ${BINMODE}
+ ${SH} ${WRKSRC}/install-sh -c -o "${BINOWN}" -g "${BINGRP}" -m
${BINMODE}
INSTALL_SCRIPT_DIR= \
- ${SH} ${WRKSRC}/install-sh -d -o ${BINOWN} -g ${BINGRP} -m ${PKGDIRMODE}
+ ${SH} ${WRKSRC}/install-sh -d -o "${BINOWN}" -g "${BINGRP}" -m
${PKGDIRMODE}
do-extract:
@${CP} -R ${FILESDIR} ${WRKSRC}
diff --git a/sysutils/install-sh/files/install-sh.in
b/sysutils/install-sh/files/install-sh.in
index 003f8db..01b5e3d 100644
--- a/sysutils/install-sh/files/install-sh.in
+++ b/sysutils/install-sh/files/install-sh.in
@@ -90,12 +90,12 @@ while [ x"$1" != x ]; do
shift
continue;;
- -o) chowncmd="$chownprog $2"
+ -o) chownuser="$2"
shift
shift
continue;;
- -g) chgrpcmd="$chgrpprog $2"
+ -g) chgrpgroup="$2"
shift
shift
continue;;
@@ -213,8 +213,8 @@ while [ $# -ne 0 ] ; do
if [ ! -d "${pathcomp}" ] ;
then
$doit $mkdirprog "${pathcomp}"
- if [ x"$chowncmd" != x ]; then $doit $chowncmd "${pathcomp}";
else true ; fi &&
- if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd "${pathcomp}";
else true ; fi &&
+ if [ x"$chownuser" != x ]; then $doit $chownprog "$chownuser"
"${pathcomp}"; else true ; fi &&
+ if [ x"$chgrpgroup" != x ]; then $doit $chgrpprog "$chgrpgroup"
"${pathcomp}"; else true ; fi &&
if [ x"$pathcompchmodcmd" != x ]; then $doit $pathcompchmodcmd
"${pathcomp}"; else true ; fi
else
@@ -232,8 +232,8 @@ fi
else
$doit $mkdirprog "$dstarg" &&
- if [ x"$chowncmd" != x ]; then $doit $chowncmd
"$dstarg"; else true ; fi &&
- if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd
"$dstarg"; else true ; fi &&
+ if [ x"$chownuser" != x ]; then $doit $chownprog
"$chownuser" "$dstarg"; else true ; fi &&
+ if [ x"$chgrpgroup" != x ]; then $doit $chgrpprog
"$chgrpgroup" "$dstarg"; else true ; fi &&
if [ x"$chmodcmd" != x ]; then $doit $chmodcmd
"$dstarg"; else true ; fi
fi
else
Home |
Main Index |
Thread Index |
Old Index