pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc Update pkg_install to 20030823, which has the changes ...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/f8f9fbae712d
branches:  trunk
changeset: 460599:f8f9fbae712d
user:      jlam <jlam%pkgsrc.org@localhost>
date:      Mon Sep 01 16:27:07 2003 +0000

description:
Update pkg_install to 20030823, which has the changes to support
package views.  Pkgsrc changes include:

* Convert to use pkgtools/libnbcompat so that it's easier to keep
  this in sync with src/usr.sbin/pkg_install.

* Add a src2nbcompat script that converts src/usr.sbin/pkg_install
  into an appropriate start for pkgtools/pkg_install.  The script
  removes the Makefiles, adds CPP inclusion guards around each
  #include <...> line, and includes <nbcompat.h> at the top of each
  *.c file.  This should make it even easier to keep sources in
  sync with the HEAD.

diffstat:

 doc/CHANGES                                       |     3 +-
 pkgtools/pkg_install/Makefile                     |     7 +-
 pkgtools/pkg_install/PLIST                        |     8 +-
 pkgtools/pkg_install/files/Makefile.in            |    42 +-
 pkgtools/pkg_install/files/README                 |     6 +-
 pkgtools/pkg_install/files/TODO                   |    16 -
 pkgtools/pkg_install/files/add/Makefile.in        |    49 +-
 pkgtools/pkg_install/files/add/add.h              |     5 +-
 pkgtools/pkg_install/files/add/extract.c          |    36 +-
 pkgtools/pkg_install/files/add/futil.c            |    47 +-
 pkgtools/pkg_install/files/add/main.c             |   111 +-
 pkgtools/pkg_install/files/add/perform.c          |   215 +-
 pkgtools/pkg_install/files/add/pkg_add.1          |    84 +-
 pkgtools/pkg_install/files/add/pkg_add.cat1       |    77 +-
 pkgtools/pkg_install/files/add/verify.c           |    34 +-
 pkgtools/pkg_install/files/add/verify.h           |     2 +-
 pkgtools/pkg_install/files/admin/Makefile.in      |    51 +-
 pkgtools/pkg_install/files/admin/main.c           |   133 +-
 pkgtools/pkg_install/files/admin/pkg_admin.1      |    47 +-
 pkgtools/pkg_install/files/admin/pkg_admin.cat1   |    32 +-
 pkgtools/pkg_install/files/config.guess           |  1354 ++++
 pkgtools/pkg_install/files/config.sub             |  1463 ++++
 pkgtools/pkg_install/files/configure              |  6758 +++++++++++++-------
 pkgtools/pkg_install/files/configure.ac           |    47 +
 pkgtools/pkg_install/files/configure.in           |    65 -
 pkgtools/pkg_install/files/create/Makefile.in     |    51 +-
 pkgtools/pkg_install/files/create/create.h        |     3 +-
 pkgtools/pkg_install/files/create/main.c          |    34 +-
 pkgtools/pkg_install/files/create/perform.c       |    46 +-
 pkgtools/pkg_install/files/create/pkg_create.1    |    29 +-
 pkgtools/pkg_install/files/create/pkg_create.cat1 |    33 +-
 pkgtools/pkg_install/files/create/pl.c            |    35 +-
 pkgtools/pkg_install/files/delete/Makefile.in     |    51 +-
 pkgtools/pkg_install/files/delete/delete.h        |     2 +-
 pkgtools/pkg_install/files/delete/main.c          |   105 +-
 pkgtools/pkg_install/files/delete/perform.c       |   238 +-
 pkgtools/pkg_install/files/delete/pkg_delete.1    |    31 +-
 pkgtools/pkg_install/files/delete/pkg_delete.cat1 |    26 +-
 pkgtools/pkg_install/files/info/Makefile.in       |    51 +-
 pkgtools/pkg_install/files/info/info.h            |     4 +-
 pkgtools/pkg_install/files/info/main.c            |    52 +-
 pkgtools/pkg_install/files/info/perform.c         |    59 +-
 pkgtools/pkg_install/files/info/pkg_info.1        |    42 +-
 pkgtools/pkg_install/files/info/pkg_info.cat1     |    38 +-
 pkgtools/pkg_install/files/info/show.c            |    58 +-
 pkgtools/pkg_install/files/lib/Makefile.in        |    45 +-
 pkgtools/pkg_install/files/lib/config.h.in        |   187 +-
 pkgtools/pkg_install/files/lib/defs.h             |    13 +-
 pkgtools/pkg_install/files/lib/digest.c           |    97 -
 pkgtools/pkg_install/files/lib/err.c              |   108 -
 pkgtools/pkg_install/files/lib/exec.c             |    18 +-
 pkgtools/pkg_install/files/lib/fexec.c            |   159 +
 pkgtools/pkg_install/files/lib/fgetln.c           |    88 -
 pkgtools/pkg_install/files/lib/file.c             |    45 +-
 pkgtools/pkg_install/files/lib/ftpio.c            |   108 +-
 pkgtools/pkg_install/files/lib/global.c           |    12 +-
 pkgtools/pkg_install/files/lib/lib.h              |   331 +
 pkgtools/pkg_install/files/lib/lib.h.in           |   466 -
 pkgtools/pkg_install/files/lib/lpkg.c             |    10 +-
 pkgtools/pkg_install/files/lib/path.c             |    18 +-
 pkgtools/pkg_install/files/lib/path.h             |     2 +-
 pkgtools/pkg_install/files/lib/pen.c              |   273 +-
 pkgtools/pkg_install/files/lib/pkgdb.c            |   125 +-
 pkgtools/pkg_install/files/lib/plist.c            |    32 +-
 pkgtools/pkg_install/files/lib/setenv.c           |    74 -
 pkgtools/pkg_install/files/lib/setprogname.c      |    63 -
 pkgtools/pkg_install/files/lib/str.c              |   140 +-
 pkgtools/pkg_install/files/lib/unsetenv.c         |    63 -
 pkgtools/pkg_install/files/lib/version.c          |    14 +-
 pkgtools/pkg_install/files/lib/version.h          |     4 +-
 pkgtools/pkg_install/files/src2nbcompat           |   110 +
 pkgtools/pkg_install/files/view/Makefile.in       |    36 +
 pkgtools/pkg_install/files/view/linkfarm.1        |   144 +
 pkgtools/pkg_install/files/view/linkfarm.cat1     |    67 +
 pkgtools/pkg_install/files/view/linkfarm.sh       |   221 +
 pkgtools/pkg_install/files/view/pkg_view.1        |   269 +
 pkgtools/pkg_install/files/view/pkg_view.cat1     |   144 +
 pkgtools/pkg_install/files/view/pkg_view.sh       |   276 +
 78 files changed, 10477 insertions(+), 4965 deletions(-)

diffs (truncated from 18828 to 300 lines):

diff -r 803865071114 -r f8f9fbae712d doc/CHANGES
--- a/doc/CHANGES       Mon Sep 01 16:02:22 2003 +0000
+++ b/doc/CHANGES       Mon Sep 01 16:27:07 2003 +0000
@@ -1,4 +1,4 @@
-$NetBSD: CHANGES,v 1.3189 2003/09/01 16:02:22 wiz Exp $
+$NetBSD: CHANGES,v 1.3190 2003/09/01 16:27:07 jlam Exp $
 
 Changes to the packages collection and infrastructure in 2003:
 
@@ -3447,3 +3447,4 @@
        Updated apel to 10.6 [minoura 2003-09-01]
        Updated libnbcompat to 20020823 [jlam 2003-09-01]
        Updated grhino to 0.8.3 [wiz 2003-09-01]
+       Updated pkg_install to 20020823 [jlam 2003-09-01]
diff -r 803865071114 -r f8f9fbae712d pkgtools/pkg_install/Makefile
--- a/pkgtools/pkg_install/Makefile     Mon Sep 01 16:02:22 2003 +0000
+++ b/pkgtools/pkg_install/Makefile     Mon Sep 01 16:27:07 2003 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.77 2003/08/31 11:55:09 jlam Exp $
+# $NetBSD: Makefile,v 1.78 2003/09/01 16:27:09 jlam Exp $
 
 # Notes to package maintainers:
 #
@@ -33,8 +33,10 @@
 VERSION!=              ${AWK} -F '"' '/PKGTOOLS_VERSION/ {print $$2}' \
                        ${FILESDIR}/lib/version.h
 
+CPPFLAGS+=             ${BUILDLINK_CPPFLAGS.libnbcompat}
+
 PKG_DBDIR?=            /var/db/pkg
-PKG_ADMIN=             ${SETENV} PKG_DBDIR=${PKG_DBDIR} ${PKG_ADMIN_CMD}
+PKG_INFO=              PKG_DBDIR=${PKG_DBDIR} ${PKG_INFO_CMD}
 
 .if ${OPSYS} == "NetBSD" && !exists(/usr/share/tmac/tmac.andoc)
 PKG_FAIL_REASON+= "You need to have the 'text' set installed to build this package!"
@@ -51,6 +53,7 @@
                ${PKG_ADMIN} rebuild;                                   \
        fi
 
+.include "../../pkgtools/libnbcompat/buildlink2.mk"
 .include "../../mk/bsd.pkg.mk"
 
 PREFIX:=               ${PKG_TOOLS_BIN:C|/[^/]?bin$||}
diff -r 803865071114 -r f8f9fbae712d pkgtools/pkg_install/PLIST
--- a/pkgtools/pkg_install/PLIST        Mon Sep 01 16:02:22 2003 +0000
+++ b/pkgtools/pkg_install/PLIST        Mon Sep 01 16:27:07 2003 +0000
@@ -1,17 +1,23 @@
-@comment $NetBSD: PLIST,v 1.3 2003/07/31 09:51:00 grant Exp $
+@comment $NetBSD: PLIST,v 1.4 2003/09/01 16:27:09 jlam Exp $
+sbin/linkfarm
 sbin/pkg_add
 sbin/pkg_admin
 sbin/pkg_create
 sbin/pkg_delete
 sbin/pkg_info
+sbin/pkg_view
+share/man/cat1/linkfarm.0
 share/man/cat1/pkg_add.0
 share/man/cat1/pkg_admin.0
 share/man/cat1/pkg_create.0
 share/man/cat1/pkg_delete.0
 share/man/cat1/pkg_info.0
+share/man/cat1/pkg_view.0
+share/man/man1/linkfarm.1
 share/man/man1/pkg_add.1
 share/man/man1/pkg_admin.1
 share/man/man1/pkg_create.1
 share/man/man1/pkg_delete.1
 share/man/man1/pkg_info.1
+share/man/man1/pkg_view.1
 @exec [ -f ${PKG_DBDIR:-/var/db/pkg}/pkgdb.byfile.db ] || pkg_admin rebuild
diff -r 803865071114 -r f8f9fbae712d pkgtools/pkg_install/files/Makefile.in
--- a/pkgtools/pkg_install/files/Makefile.in    Mon Sep 01 16:02:22 2003 +0000
+++ b/pkgtools/pkg_install/files/Makefile.in    Mon Sep 01 16:27:07 2003 +0000
@@ -1,39 +1,15 @@
-# $NetBSD: Makefile.in,v 1.1.1.1 2002/12/20 18:13:52 schmonz Exp $
-# Original from FreeBSD, no rcs id.
+# $NetBSD: Makefile.in,v 1.2 2003/09/01 16:27:09 jlam Exp $
 
-all: libdir adddir admindir createdir deletedir infodir
+SUBDIRS=       lib add admin create delete info view
 
-libdir:
-       cd lib && ${MAKE}
-adddir:
-       cd add && ${MAKE}
-admindir:
-       cd admin && ${MAKE}
-createdir:
-       cd create && ${MAKE}
-deletedir:
-       cd delete && ${MAKE}
-infodir:
-       cd info && ${MAKE}
+.PHONY: all install clean distclean
 
-install: all
-       @MKDIR@ -p @prefix@/sbin
-       cd add && ${MAKE} install
-       cd admin && ${MAKE} install
-       cd create && ${MAKE} install
-       cd delete && ${MAKE} install
-       cd info && ${MAKE} install
-
-clean:
-       cd lib && ${MAKE} clean
-       cd add && ${MAKE} clean
-       cd admin && ${MAKE} clean
-       cd create && ${MAKE} clean
-       cd delete && ${MAKE} clean
-       cd info && ${MAKE} clean
+all install clean:
+       @for dir in $(SUBDIRS); do \
+               ( cd $$dir && $(MAKE) $@ ); \
+       done
 
 distclean: clean
-       rm -f config.log config.status config.cache
+       rm -f config.log config.status config.lineno
        rm -f Makefile */Makefile
-       rm -f lib/lib.h lib/config.h
-       
+       rm -f lib/config.h
diff -r 803865071114 -r f8f9fbae712d pkgtools/pkg_install/files/README
--- a/pkgtools/pkg_install/files/README Mon Sep 01 16:02:22 2003 +0000
+++ b/pkgtools/pkg_install/files/README Mon Sep 01 16:27:07 2003 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: README,v 1.1.1.1 2002/12/20 18:13:52 schmonz Exp $
+# $NetBSD: README,v 1.2 2003/09/01 16:27:09 jlam Exp $
 # Original from FreeBSD, no rcs id.
 
 This is the pkg_install suite of tools for doing maintainance of
@@ -11,8 +11,8 @@
 of dozen features on top.  Whee! :-)
 
 In another round of enhancements, NetBSD changes were added by
-Alistair Crooks and Hubert Feyrer, Thorsten Frueauf and Christian E.
-Hopps.
+Alistair Crooks, Hubert Feyrer, Thorsten Frueauf, Christian E. Hopps,
+and Johnny Lam.
 
 When making snapshots, please modify PKGTOOLS_VERSION in lib/version.h
 to that day's date.
diff -r 803865071114 -r f8f9fbae712d pkgtools/pkg_install/files/TODO
--- a/pkgtools/pkg_install/files/TODO   Mon Sep 01 16:02:22 2003 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,16 +0,0 @@
-To Do
-=====
-add man page installation
-
-Done
-====
-Do correct GNU Makefile-ish things
-make a real mkdtemp thing
-get rid of BINDIR
-get rid of TAR_CMD
-REMOVE_CMD -> RM
-RMDIR_CMD -> RMDIR
-use MKDIR for mkdir -p uses via vsystem. Use mkdir(2) for all other uses.
-add digest files if MD5File not in -lc or -lmd
-try it on Darwin
-use full pathnames for utilities which are executed by vsystem()
diff -r 803865071114 -r f8f9fbae712d pkgtools/pkg_install/files/add/Makefile.in
--- a/pkgtools/pkg_install/files/add/Makefile.in        Mon Sep 01 16:02:22 2003 +0000
+++ b/pkgtools/pkg_install/files/add/Makefile.in        Mon Sep 01 16:27:07 2003 +0000
@@ -1,42 +1,47 @@
-# $NetBSD: Makefile.in,v 1.5 2003/07/31 09:51:01 grant Exp $
-# Original from FreeBSD, no rcs id.
+# $NetBSD: Makefile.in,v 1.6 2003/09/01 16:27:11 jlam Exp $
+
+srcdir=                @srcdir@
 
 prefix=                @prefix@
-INSTALL=       @INSTALL@
-
+exec_prefix=   @exec_prefix@
+sbindir=       @sbindir@
 mandir=                @mandir@
-mandirman1=    ${mandir}/man1
-mandircat1=    ${mandir}/cat1
+
+man1dir=       $(mandir)/man1
+cat1dir=       $(mandir)/cat1
 
 CC=            @CC@
 CCLD=          $(CC)
 LIBS=          -linstall @LIBS@
-CPPFLAGS=      @CPPFLAGS@
-DEFS=          @DEFS@ -I. -I@srcdir@ -I../lib
+CPPFLAGS=      $(DEFS) @CPPFLAGS@ -I. -I$(srcdir) -I../lib
+DEFS=          @DEFS@ -DBINDIR=\"$(sbindir)\"
 CFLAGS=                @CFLAGS@
 LDFLAGS=       @LDFLAGS@ -L../lib
 
-LINK=          $(CCLD) $(CFLAGS) $(LDFLAGS) -o $@
-COMPILE=       $(CC) $(DEFS) $(CPPFLAGS) $(CFLAGS)
+INSTALL=       @INSTALL@
 
 PROG=          pkg_add
 
-SRCS= main.c perform.c futil.c extract.c verify.c
-OBJS= main.o perform.o futil.o extract.o verify.o
+SRCS=  main.c perform.c futil.c extract.c verify.c
+OBJS=  $(SRCS:.c=.o)
 
-all: ${PROG}
-
-${PROG}: ${OBJS}
-       ${LINK} ${OBJS} ${LIBS}
+.PHONY: all clean install
 
 .c.o:
-       $(COMPILE) -c $< -o $@
+       $(CC) $(DEFS) $(CPPFLAGS) $(CFLAGS) -c $<
+
+all: $(PROG)
+
+$(PROG): $(OBJS)
+       $(CCLD) $(LDFLAGS) -o $@ $(OBJS) $(LIBS)
 
 clean:
-       rm -f ${OBJS} ${PROG}
+       rm -f $(OBJS) $(PROG)
 
 install:
-       ${INSTALL} ${PROG} ${prefix}/sbin
-       ${INSTALL} -m 755 -d ${mandircat1}
-       ${INSTALL} -m 444 ${PROG}.1 ${mandirman1}/${PROG}.1
-       ${INSTALL} -m 444 ${PROG}.cat1 ${mandircat1}/${PROG}.0
+       $(INSTALL) -m 755 -d $(sbindir)
+       $(INSTALL) -m 755 -d $(man1dir)
+       $(INSTALL) -m 755 -d $(cat1dir)
+       $(INSTALL) $(PROG) $(sbindir)
+       $(INSTALL) -m 444 $(PROG).1 $(man1dir)/$(PROG).1
+       $(INSTALL) -m 444 $(PROG).cat1 $(man1dir)/$(PROG).0
diff -r 803865071114 -r f8f9fbae712d pkgtools/pkg_install/files/add/add.h
--- a/pkgtools/pkg_install/files/add/add.h      Mon Sep 01 16:02:22 2003 +0000
+++ b/pkgtools/pkg_install/files/add/add.h      Mon Sep 01 16:27:07 2003 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: add.h,v 1.1.1.1 2002/12/20 18:13:54 schmonz Exp $ */
+/* $NetBSD: add.h,v 1.2 2003/09/01 16:27:11 jlam Exp $ */
 
 /* from FreeBSD Id: add.h,v 1.8 1997/02/22 16:09:15 peter Exp  */
 
@@ -30,6 +30,9 @@
 }       add_mode_t;
 
 extern char *Prefix;
+extern char *View;
+extern char *Viewbase;
+extern Boolean NoView;
 extern Boolean NoInstall;
 extern Boolean NoRecord;
 extern Boolean Force;
diff -r 803865071114 -r f8f9fbae712d pkgtools/pkg_install/files/add/extract.c
--- a/pkgtools/pkg_install/files/add/extract.c  Mon Sep 01 16:02:22 2003 +0000
+++ b/pkgtools/pkg_install/files/add/extract.c  Mon Sep 01 16:27:07 2003 +0000
@@ -1,13 +1,17 @@
-/*     $NetBSD: extract.c,v 1.3 2003/02/11 16:42:06 grant Exp $        */
+/*     $NetBSD: extract.c,v 1.4 2003/09/01 16:27:11 jlam Exp $ */
 
-#if 0
+#include <nbcompat.h>
+#if HAVE_CONFIG_H
+#include "config.h"
+#endif
+#if HAVE_SYS_CDEFS_H
 #include <sys/cdefs.h>
+#endif
 #ifndef lint
 #if 0
 static const char *rcsid = "FreeBSD - Id: extract.c,v 1.17 1997/10/08 07:45:35 charnier Exp";
 #else
-__RCSID("$NetBSD: extract.c,v 1.3 2003/02/11 16:42:06 grant Exp $");
-#endif
+__RCSID("$NetBSD: extract.c,v 1.4 2003/09/01 16:27:11 jlam Exp $");
 #endif
 #endif
 
@@ -30,19 +34,15 @@
  * This is the package extraction code for the add module.
  *
  */
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
 
-#ifdef HAVE_ERR_H
+#if HAVE_ERR_H
 #include <err.h>
 #endif
-
 #include "lib.h"
 #include "add.h"
 
 #define TAR_ARGS       " cf - "
-#define TARX_CMD       "|" TAR_FULLPATHNAME " xpf - -C "
+#define TARX_CMD       "|" TAR_CMD " xpf - -C "
 



Home | Main Index | Thread Index | Old Index