pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/pkgtools/pkg_tarup 1.6.4: Fix "su" logic to match that...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/1bb6c3ad9d54
branches:  trunk
changeset: 482539:1bb6c3ad9d54
user:      tv <tv%pkgsrc.org@localhost>
date:      Fri Oct 29 14:51:41 2004 +0000

description:
1.6.4: Fix "su" logic to match that in bsd.pkg.mk.
Makes "make replace" work correctly on Interix.

diffstat:

 pkgtools/pkg_tarup/Makefile        |  10 ++++++----
 pkgtools/pkg_tarup/files/pkg_tarup |  14 ++++++++------
 2 files changed, 14 insertions(+), 10 deletions(-)

diffs (70 lines):

diff -r d68bad80b01d -r 1bb6c3ad9d54 pkgtools/pkg_tarup/Makefile
--- a/pkgtools/pkg_tarup/Makefile       Fri Oct 29 14:32:38 2004 +0000
+++ b/pkgtools/pkg_tarup/Makefile       Fri Oct 29 14:51:41 2004 +0000
@@ -1,6 +1,6 @@
-# $NetBSD: Makefile,v 1.23 2004/10/06 15:27:28 erh Exp $
+# $NetBSD: Makefile,v 1.24 2004/10/29 14:51:41 tv Exp $
 
-DISTNAME=      pkg_tarup-1.6.3
+DISTNAME=      pkg_tarup-1.6.4
 CATEGORIES=    pkgtools
 MASTER_SITES=  # empty
 DISTFILES=     # empty
@@ -17,6 +17,7 @@
 # Set SCRIPT_SUBST to substitute "@VARIABLE@" with "value"
 SCRIPT_SUBST+= \
                ECHO=${ECHO:Q}                          \
+               ECHO_N=${ECHO_N:Q}                      \
                GREP=${GREP:Q}                          \
                HEAD=${HEAD:Q}                          \
                ID=${ID:Q}                              \
@@ -24,9 +25,10 @@
                PKG_SUFX=${PKG_SUFX:Q}                  \
                PREFIX=${PREFIX:Q}                      \
                PKG_TOOLS_BIN=${PKG_TOOLS_BIN:Q}        \
-               SED=${SED:Q}                    \
+               ROOT_USER=${ROOT_USER:Q}                \
+               SED=${SED:Q}                            \
                SH=${SH:Q}                              \
-               SU=${SU:Q}                              \
+               SU_CMD=${SU_CMD:Q}                      \
                XARGS=${XARGS:Q}
 
 SCRIPT_SUBST_SED=      ${SCRIPT_SUBST:S/=/@!/:S/$/!g/:S/^/ -e s!@/}
diff -r d68bad80b01d -r 1bb6c3ad9d54 pkgtools/pkg_tarup/files/pkg_tarup
--- a/pkgtools/pkg_tarup/files/pkg_tarup        Fri Oct 29 14:32:38 2004 +0000
+++ b/pkgtools/pkg_tarup/files/pkg_tarup        Fri Oct 29 14:51:41 2004 +0000
@@ -1,6 +1,6 @@
 #! @SH@
 #
-# $Id: pkg_tarup,v 1.17 2004/10/13 23:18:35 xtraeme Exp $
+# $Id: pkg_tarup,v 1.18 2004/10/29 14:51:41 tv Exp $
 #
 # Tar up installed package
 #
@@ -17,18 +17,20 @@
 OS=`uname -s`
 
 ECHO=${ECHO:-@ECHO@}
+ECHO_N=${ECHO_N:-@ECHO_N@}
 HEAD=${HEAD:-@HEAD@}
 ID=${ID:-@ID@}
+ROOT_USER=${ROOT_USER:-@ROOT_USER@}
 SED=${SED:-@SED@}
-SU=${SU:-@SU@}
+SU_CMD=${SU_CMD:-@SU_CMD@}
 GREP=${GREP:-@GREP@}
 XARGS=${XARGS:-@XARGS@}
 
-if [ `${ID} -u` != 0 ]; then
-       ${ECHO} "Becoming root@`/bin/hostname` to create a binary package"
-       ${ECHO} -n "`${ECHO} ${SU} | ${SED} -e's/[[:space:]].*//'` ";\
+if [ `${ID} -u` != `${ID} -u ${ROOT_USER}` ]; then
+       ${ECHO} "Becoming ${ROOT_USER}@`/bin/hostname` to create a binary package"
+       ${ECHO_N} "`${ECHO} ${SU_CMD} | ${SED} -e's/[[:space:]].*//'` ";\
        ( for arg in "$@"; do echo \"${arg}\"; done ) |
-       ${SU} root -c "exec ${XARGS} \"$0\""
+       ${SU_CMD} "exec ${XARGS} \"$0\""
        exit $?
 fi
 



Home | Main Index | Thread Index | Old Index