pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/pkgtools/pkg_install add --with-{ftp,mtree,pax,tar} to...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/321eefd2bbe4
branches:  trunk
changeset: 461876:321eefd2bbe4
user:      grant <grant%pkgsrc.org@localhost>
date:      Tue Sep 23 07:44:48 2003 +0000

description:
add --with-{ftp,mtree,pax,tar} to allow overriding the commands that
pkg_install calls, and pass the full path for each from the pkg Makefile.

fixes issue with pkg_add and pkg_create calling non-existent or
less-than-functional tools since it relied on $PATH.

diffstat:

 pkgtools/pkg_install/Makefile                  |   6 +-
 pkgtools/pkg_install/files/add/Makefile.in     |   4 +-
 pkgtools/pkg_install/files/configure           |  92 ++++++++++++++-----------
 pkgtools/pkg_install/files/configure.ac        |  27 +++++++-
 pkgtools/pkg_install/files/create/Makefile.in  |   6 +-
 pkgtools/pkg_install/files/lib/Makefile.in     |   7 +-
 pkgtools/pkg_install/files/view/pkg_view.sh.in |   4 +-
 7 files changed, 93 insertions(+), 53 deletions(-)

diffs (290 lines):

diff -r 10b6bf7d825a -r 321eefd2bbe4 pkgtools/pkg_install/Makefile
--- a/pkgtools/pkg_install/Makefile     Tue Sep 23 07:26:22 2003 +0000
+++ b/pkgtools/pkg_install/Makefile     Tue Sep 23 07:44:48 2003 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.86 2003/09/18 23:43:37 grant Exp $
+# $NetBSD: Makefile,v 1.87 2003/09/23 07:44:48 grant Exp $
 
 # Notes to package maintainers:
 #
@@ -19,6 +19,10 @@
 
 GNU_CONFIGURE=         # defined
 CONFIGURE_ARGS+=       --with-pkgdbdir=${PKG_DBDIR}
+CONFIGURE_ARGS+=       --with-ftp=${FETCH_CMD}
+CONFIGURE_ARGS+=       --with-mtree=${MTREE}
+CONFIGURE_ARGS+=       --with-pax=${PAX}
+CONFIGURE_ARGS+=       --with-tar=${TAR}
 
 NO_PKGTOOLS_REQD_CHECK=        # defined
 NO_BUILDLINK=          # defined
diff -r 10b6bf7d825a -r 321eefd2bbe4 pkgtools/pkg_install/files/add/Makefile.in
--- a/pkgtools/pkg_install/files/add/Makefile.in        Tue Sep 23 07:26:22 2003 +0000
+++ b/pkgtools/pkg_install/files/add/Makefile.in        Tue Sep 23 07:44:48 2003 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.in,v 1.8 2003/09/23 06:36:19 grant Exp $
+# $NetBSD: Makefile.in,v 1.9 2003/09/23 07:44:50 grant Exp $
 
 srcdir=                @srcdir@
 
@@ -14,7 +14,7 @@
 CCLD=          $(CC)
 LIBS=          -linstall @LIBS@
 CPPFLAGS=      @CPPFLAGS@ -I. -I$(srcdir) -I../lib
-DEFS=          @DEFS@ -DBINDIR=\"$(sbindir)\"
+DEFS=          @DEFS@ -DBINDIR=\"$(sbindir)\" -DMTREE_CMD=\"@mtree@\"
 CFLAGS=                @CFLAGS@
 LDFLAGS=       @LDFLAGS@ -L../lib
 
diff -r 10b6bf7d825a -r 321eefd2bbe4 pkgtools/pkg_install/files/configure
--- a/pkgtools/pkg_install/files/configure      Tue Sep 23 07:26:22 2003 +0000
+++ b/pkgtools/pkg_install/files/configure      Tue Sep 23 07:44:48 2003 +0000
@@ -310,7 +310,7 @@
 # include <unistd.h>
 #endif"
 
-ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir 
sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host 
host_cpu host_vendor host_os CANONICAL_HOST INCLUDES SET_MAKE CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA LN_S RANLIB ac_ct_RANLIB AR CHMOD CMP CP 
ENV FIND GREP LN MKDIR PAX RMDIR RM SED SORT TOUCH AUTOCONF AUTOHEADER pkgdbdir CPP EGREP LIBOBJS LTLIBOBJS'
+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir 
sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host 
host_cpu host_vendor host_os CANONICAL_HOST INCLUDES SET_MAKE CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA LN_S RANLIB ac_ct_RANLIB AR CHMOD CMP CP 
ENV FIND GREP LN MKDIR RMDIR RM SED SORT TOUCH AUTOCONF AUTOHEADER pkgdbdir ftp tar pax mtree CPP EGREP LIBOBJS LTLIBOBJS'
 ac_subst_files=''
 
 # Initialize some variables set by options.
@@ -847,7 +847,11 @@
 Optional Packages:
   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
-  --with-pkgdbdir=DIR   Where to put the pkg database (/var/db/pkg)
+  --with-pkgdbdir=DIR     Where to put the pkg database (/var/db/pkg)
+  --with-ftp=path         Path to tnftp (PREFIX/bin/ftp)
+  --with-tar=path         Path to pax-as-tar (PREFIX/bin/tar)
+  --with-pax=path         Path to pax (PREFIX/bin/pax)
+  --with-mtree=path       Path to mtree (PREFIX/sbin/mtree)
 
 Some influential environment variables:
   CC          C compiler command
@@ -2776,45 +2780,6 @@
 echo "${ECHO_T}no" >&6
 fi
 
-# Extract the first word of "pax", so it can be a program name with args.
-set dummy pax; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_path_PAX+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  case $PAX in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_PAX="$PAX" # Let the user override the test with a path.
-  ;;
-  *)
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_path_PAX="$as_dir/$ac_word$ac_exec_ext"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-
-  ;;
-esac
-fi
-PAX=$ac_cv_path_PAX
-
-if test -n "$PAX"; then
-  echo "$as_me:$LINENO: result: $PAX" >&5
-echo "${ECHO_T}$PAX" >&6
-else
-  echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
 # Extract the first word of "rmdir", so it can be a program name with args.
 set dummy rmdir; ac_word=$2
 echo "$as_me:$LINENO: checking for $ac_word" >&5
@@ -3027,6 +2992,46 @@
 
 
 
+# Check whether --with-ftp or --without-ftp was given.
+if test "${with_ftp+set}" = set; then
+  withval="$with_ftp"
+   ftp="$with_ftp"
+else
+   ftp='$(prefix)/bin/ftp'
+fi;
+
+
+
+# Check whether --with-tar or --without-tar was given.
+if test "${with_tar+set}" = set; then
+  withval="$with_tar"
+   tar="$with_tar"
+else
+   tar='$(prefix)/bin/tar'
+fi;
+
+
+
+# Check whether --with-pax or --without-pax was given.
+if test "${with_pax+set}" = set; then
+  withval="$with_pax"
+   pax="$with_pax"
+else
+   pax='$(prefix)/bin/pax'
+fi;
+
+
+
+# Check whether --with-mtree or --without-mtree was given.
+if test "${with_mtree+set}" = set; then
+  withval="$with_mtree"
+   mtree="$with_mtree"
+else
+   mtree='$(sbindir)/mtree'
+fi;
+
+
+
 
 echo "$as_me:$LINENO: checking for dbopen in -ldb1" >&5
 echo $ECHO_N "checking for dbopen in -ldb1... $ECHO_C" >&6
@@ -4934,7 +4939,6 @@
 s,@GREP@,$GREP,;t t
 s,@LN@,$LN,;t t
 s,@MKDIR@,$MKDIR,;t t
-s,@PAX@,$PAX,;t t
 s,@RMDIR@,$RMDIR,;t t
 s,@RM@,$RM,;t t
 s,@SED@,$SED,;t t
@@ -4943,6 +4947,10 @@
 s,@AUTOCONF@,$AUTOCONF,;t t
 s,@AUTOHEADER@,$AUTOHEADER,;t t
 s,@pkgdbdir@,$pkgdbdir,;t t
+s,@ftp@,$ftp,;t t
+s,@tar@,$tar,;t t
+s,@pax@,$pax,;t t
+s,@mtree@,$mtree,;t t
 s,@CPP@,$CPP,;t t
 s,@EGREP@,$EGREP,;t t
 s,@LIBOBJS@,$LIBOBJS,;t t
diff -r 10b6bf7d825a -r 321eefd2bbe4 pkgtools/pkg_install/files/configure.ac
--- a/pkgtools/pkg_install/files/configure.ac   Tue Sep 23 07:26:22 2003 +0000
+++ b/pkgtools/pkg_install/files/configure.ac   Tue Sep 23 07:44:48 2003 +0000
@@ -25,7 +25,6 @@
 AC_PATH_PROG(GREP, grep)
 AC_PATH_PROG(LN, ln)
 AC_PATH_PROG(MKDIR, mkdir)
-AC_PATH_PROG(PAX, pax)
 AC_PATH_PROG(RMDIR, rmdir)
 AC_PATH_PROG(RM, rm)
 AC_PATH_PROG(SED, sed)
@@ -39,11 +38,35 @@
 
 dnl Set the default pkg dbdir
 AC_ARG_WITH(pkgdbdir,
-[  --with-pkgdbdir=DIR   Where to put the pkg database (/var/db/pkg)],
+[  --with-pkgdbdir=DIR     Where to put the pkg database (/var/db/pkg)],
 [ pkgdbdir="$with_pkgdbdir" ],
 [ pkgdbdir="/var/db/pkg" ])
 AC_SUBST(pkgdbdir)
 
+AC_ARG_WITH(ftp,
+[  --with-ftp=path         Path to tnftp (PREFIX/bin/ftp)],
+[ ftp="$with_ftp" ],
+[ ftp='$(prefix)/bin/ftp' ])
+AC_SUBST(ftp)
+
+AC_ARG_WITH(tar,
+[  --with-tar=path         Path to pax-as-tar (PREFIX/bin/tar)],
+[ tar="$with_tar" ],
+[ tar='$(prefix)/bin/tar' ])
+AC_SUBST(tar)
+
+AC_ARG_WITH(pax,
+[  --with-pax=path         Path to pax (PREFIX/bin/pax)],
+[ pax="$with_pax" ],
+[ pax='$(prefix)/bin/pax' ])
+AC_SUBST(pax)
+
+AC_ARG_WITH(mtree,
+[  --with-mtree=path       Path to mtree (PREFIX/sbin/mtree)],
+[ mtree="$with_mtree" ],
+[ mtree='$(sbindir)/mtree' ])
+AC_SUBST(mtree)
+
 dnl Checks for libraries.
 AC_CHECK_LIB(db1, dbopen)
 AC_SEARCH_LIBS(tgetent, [termcap termlib curses ncurses])
diff -r 10b6bf7d825a -r 321eefd2bbe4 pkgtools/pkg_install/files/create/Makefile.in
--- a/pkgtools/pkg_install/files/create/Makefile.in     Tue Sep 23 07:26:22 2003 +0000
+++ b/pkgtools/pkg_install/files/create/Makefile.in     Tue Sep 23 07:44:48 2003 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.in,v 1.9 2003/09/23 06:36:20 grant Exp $
+# $NetBSD: Makefile.in,v 1.10 2003/09/23 07:44:51 grant Exp $
 
 srcdir=                @srcdir@
 
@@ -10,11 +10,13 @@
 man1dir=       $(mandir)/man1
 cat1dir=       $(mandir)/cat1
 
+tar=           @tar@
+
 CC=            @CC@
 CCLD=          $(CC)
 LIBS=          -linstall @LIBS@
 CPPFLAGS=      @CPPFLAGS@ -I. -I$(srcdir) -I../lib
-DEFS=          @DEFS@
+DEFS=          @DEFS@ -DTAR_CMD=\"$(tar)\"
 CFLAGS=                @CFLAGS@
 LDFLAGS=       @LDFLAGS@ -L../lib
 
diff -r 10b6bf7d825a -r 321eefd2bbe4 pkgtools/pkg_install/files/lib/Makefile.in
--- a/pkgtools/pkg_install/files/lib/Makefile.in        Tue Sep 23 07:26:22 2003 +0000
+++ b/pkgtools/pkg_install/files/lib/Makefile.in        Tue Sep 23 07:44:48 2003 +0000
@@ -1,14 +1,17 @@
-# $NetBSD: Makefile.in,v 1.5 2003/09/23 06:36:21 grant Exp $
+# $NetBSD: Makefile.in,v 1.6 2003/09/23 07:44:51 grant Exp $
 
 srcdir=                @srcdir@
 
 pkgdbdir=      @pkgdbdir@
 
+tar=           @tar@
+ftp=           @ftp@
+
 RANLIB=                @RANLIB@
 AR=            @AR@
 CC=            @CC@
 CPPFLAGS=      @CPPFLAGS@ -I. -I$(srcdir)
-DEFS=          @DEFS@ -DDEF_LOG_DIR=\"$(pkgdbdir)\"
+DEFS=          @DEFS@ -DDEF_LOG_DIR=\"$(pkgdbdir)\" -DTAR_CMD=\"$(tar)\" -DFTP_CMD=\"$(ftp)\"
 CFLAGS=                @CFLAGS@
 
 LIB=   libinstall.a
diff -r 10b6bf7d825a -r 321eefd2bbe4 pkgtools/pkg_install/files/view/pkg_view.sh.in
--- a/pkgtools/pkg_install/files/view/pkg_view.sh.in    Tue Sep 23 07:26:22 2003 +0000
+++ b/pkgtools/pkg_install/files/view/pkg_view.sh.in    Tue Sep 23 07:44:48 2003 +0000
@@ -1,6 +1,6 @@
 #! /bin/sh
 
-# $NetBSD: pkg_view.sh.in,v 1.2 2003/09/09 13:34:22 jlam Exp $
+# $NetBSD: pkg_view.sh.in,v 1.3 2003/09/23 07:44:51 grant Exp $
 
 #
 # Copyright (c) 2001 Alistair G. Crooks.  All rights reserved.
@@ -48,7 +48,7 @@
 linkfarmprog="@sbindir@/linkfarm"
 lnprog="@LN@"
 mkdirprog="@MKDIR@"
-paxprog="@PAX@"
+paxprog="@pax@"
 pkgadminprog="@sbindir@/pkg_admin"
 pkginfoprog="@sbindir@/pkg_info"
 rmprog="@RM@"



Home | Main Index | Thread Index | Old Index