pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/pkgtools/pkg_install Merge pkg_install-20090201 from p...
details: https://anonhg.NetBSD.org/pkgsrc/rev/d62123fa7ce5
branches: trunk
changeset: 553880:d62123fa7ce5
user: joerg <joerg%pkgsrc.org@localhost>
date: Mon Feb 02 12:34:59 2009 +0000
description:
Merge pkg_install-20090201 from pkg_install-renovation branch.
- DB support is always included from libnbcompat if needed
- pkg_view and linkfarm are not installed any more; they are not moved
into the attic yet, so they can easily be installed as separte package
- common configuration file to customise the behavior of various
components; this supersedes the old audit-packages.conf
- support for PKSC7 signatures (using X509 certs) and GPG signatures for
packages in a secure way. See pkg_admin(8) for how to create them and
pkg_install.conf(5) for the options to use them
- audit-packages and download-vulnerability-list are wrapper scripts
around pkg_admin. They try to mimic the classic options if used sanely.
"pkg_admin audit" is now an order of magnitude faster than before
- pkg_add uses libarchive and libfetch instead of external ftp and tar:
- progress bar is currently missing for downloads
- "pkg_add -" is no longer supported
- no adhoc check for conficts between dependencies and already
installed packages
- "pkg_add -s" has been replaced with an option in pkg_install.conf,
verification of plain detached GPG signatures is no longer supported
- optional check for vulnerabilities before adding a package
- if /var and /usr/pkg are on different fileystems it is twice as fast
now
- conflicts due to overlapping plists are checked before installation
- pkg_add no longer plays with the process limits
- pkg_add and pkg_delete have a new destdir option; scripts have to
either be modified to use PKG_DESTDIR or should be disabled
- pkg_add -u for now can't be used to update to the exact same version
- internal "rm -rf" and "mkdir_p" code
- all memory allocation failures are not explicitly fatal
- if a file is not removed due to a failed checksum, still remove the
entry from pkgdb
diffstat:
pkgtools/pkg_install/DESCR | 7 +-
pkgtools/pkg_install/MESSAGE | 29 +-
pkgtools/pkg_install/Makefile | 35 +-
pkgtools/pkg_install/PLIST | 17 +-
pkgtools/pkg_install/files/Makefile.in | 7 +-
pkgtools/pkg_install/files/add/Makefile.in | 16 +-
pkgtools/pkg_install/files/add/add.h | 10 +-
pkgtools/pkg_install/files/add/extract.c | 340 -
pkgtools/pkg_install/files/add/futil.c | 151 -
pkgtools/pkg_install/files/add/main.c | 62 +-
pkgtools/pkg_install/files/add/perform.c | 2193 +++++----
pkgtools/pkg_install/files/add/pkg_add.1 | 173 +-
pkgtools/pkg_install/files/add/pkg_add.cat1 | 156 +-
pkgtools/pkg_install/files/add/verify.c | 179 -
pkgtools/pkg_install/files/add/verify.h | 40 -
pkgtools/pkg_install/files/admin/Makefile.in | 33 +-
pkgtools/pkg_install/files/admin/admin.h | 9 -
pkgtools/pkg_install/files/admin/audit-packages.sh.in | 128 +
pkgtools/pkg_install/files/admin/audit.c | 98 +-
pkgtools/pkg_install/files/admin/check.c | 13 +-
pkgtools/pkg_install/files/admin/config.c | 109 -
pkgtools/pkg_install/files/admin/download-vulnerability-list.sh.in | 37 +
pkgtools/pkg_install/files/admin/main.c | 98 +-
pkgtools/pkg_install/files/admin/pkg_admin.1 | 37 +-
pkgtools/pkg_install/files/admin/pkg_admin.cat1 | 22 +-
pkgtools/pkg_install/files/audit-packages/AUTHORS | 11 -
pkgtools/pkg_install/files/audit-packages/COPYING | 30 -
pkgtools/pkg_install/files/audit-packages/Makefile.in | 81 -
pkgtools/pkg_install/files/audit-packages/README | 5 -
pkgtools/pkg_install/files/audit-packages/audit-packages.1.in | 378 -
pkgtools/pkg_install/files/audit-packages/audit-packages.c | 1156 -----
pkgtools/pkg_install/files/audit-packages/audit-packages.cat1.in | 199 -
pkgtools/pkg_install/files/audit-packages/audit-packages.conf.5.in | 126 -
pkgtools/pkg_install/files/audit-packages/audit-packages.conf.cat5.in | 75 -
pkgtools/pkg_install/files/audit-packages/audit-packages.conf.in | 87 -
pkgtools/pkg_install/files/audit-packages/download-vulnerability-list.1.in | 336 -
pkgtools/pkg_install/files/audit-packages/download-vulnerability-list.cat1.in | 183 -
pkgtools/pkg_install/files/audit-packages/download-vulnerability-list.sh.in | 217 -
pkgtools/pkg_install/files/configure | 517 +-
pkgtools/pkg_install/files/configure.ac | 38 +-
pkgtools/pkg_install/files/create/build.c | 13 +-
pkgtools/pkg_install/files/create/main.c | 10 +-
pkgtools/pkg_install/files/create/perform.c | 48 +-
pkgtools/pkg_install/files/create/pkg_create.1 | 14 +-
pkgtools/pkg_install/files/create/pkg_create.cat1 | 9 +-
pkgtools/pkg_install/files/create/pl.c | 46 +-
pkgtools/pkg_install/files/create/util.c | 15 +-
pkgtools/pkg_install/files/delete/delete.h | 3 +-
pkgtools/pkg_install/files/delete/main.c | 42 +-
pkgtools/pkg_install/files/delete/perform.c | 462 +-
pkgtools/pkg_install/files/delete/pkg_delete.1 | 17 +-
pkgtools/pkg_install/files/delete/pkg_delete.cat1 | 13 +-
pkgtools/pkg_install/files/info/Makefile.in | 4 +-
pkgtools/pkg_install/files/info/main.c | 16 +-
pkgtools/pkg_install/files/info/perform.c | 92 +-
pkgtools/pkg_install/files/info/show.c | 10 +-
pkgtools/pkg_install/files/lib/Makefile.in | 24 +-
pkgtools/pkg_install/files/lib/automatic.c | 6 +-
pkgtools/pkg_install/files/lib/config.h.in | 6 -
pkgtools/pkg_install/files/lib/conflicts.c | 61 +-
pkgtools/pkg_install/files/lib/decompress.c | 22 +-
pkgtools/pkg_install/files/lib/dewey.c | 2 +-
pkgtools/pkg_install/files/lib/fexec.c | 13 +-
pkgtools/pkg_install/files/lib/file.c | 539 +--
pkgtools/pkg_install/files/lib/ftpio.c | 1252 -----
pkgtools/pkg_install/files/lib/global.c | 10 +-
pkgtools/pkg_install/files/lib/gpgsig.c | 252 +
pkgtools/pkg_install/files/lib/iterate.c | 18 +-
pkgtools/pkg_install/files/lib/lib.h | 177 +-
pkgtools/pkg_install/files/lib/lpkg.c | 8 +-
pkgtools/pkg_install/files/lib/opattern.c | 37 +-
pkgtools/pkg_install/files/lib/parse-config.c | 139 +
pkgtools/pkg_install/files/lib/path.c | 27 +-
pkgtools/pkg_install/files/lib/pen.c | 206 -
pkgtools/pkg_install/files/lib/pexec.c | 110 -
pkgtools/pkg_install/files/lib/pkcs7.c | 326 +
pkgtools/pkg_install/files/lib/pkg_install.conf.5 | 158 +
pkgtools/pkg_install/files/lib/pkg_install.conf.cat5 | 117 +
pkgtools/pkg_install/files/lib/pkg_io.c | 206 +-
pkgtools/pkg_install/files/lib/pkg_signature.c | 686 +++
pkgtools/pkg_install/files/lib/pkgdb.c | 13 +-
pkgtools/pkg_install/files/lib/plist.c | 92 +-
pkgtools/pkg_install/files/lib/remove.c | 196 +
pkgtools/pkg_install/files/lib/str.c | 51 +-
pkgtools/pkg_install/files/lib/var.c | 19 +-
pkgtools/pkg_install/files/lib/version.c | 6 +-
pkgtools/pkg_install/files/lib/version.h | 4 +-
pkgtools/pkg_install/files/lib/vulnerabilities-file.c | 243 +-
pkgtools/pkg_install/files/lib/xwrapper.c | 102 +
89 files changed, 5058 insertions(+), 8322 deletions(-)
diffs (truncated from 16541 to 300 lines):
diff -r ab5f34f9db1b -r d62123fa7ce5 pkgtools/pkg_install/DESCR
--- a/pkgtools/pkg_install/DESCR Mon Feb 02 11:58:47 2009 +0000
+++ b/pkgtools/pkg_install/DESCR Mon Feb 02 12:34:59 2009 +0000
@@ -5,8 +5,6 @@
The following tools are included:
-audit-packages audit installed packages for security vulnerabilities
-download-vulnerability-list download the latest vulnerabilities list
pkg_add install and upgrade binary packages
pkg_admin perform various pkgsrc administrative tasks
pkg_create create software package distributions
@@ -14,3 +12,8 @@
pkg_info display information about installed or binary packages
pkg_view manage package views
linkfarm manage symbolic links for package views
+
+For the following tools compatibility wrappers are included:
+
+audit-packages audit installed packages for security vulnerabilities
+download-vulnerability-list download the latest vulnerabilities list
diff -r ab5f34f9db1b -r d62123fa7ce5 pkgtools/pkg_install/MESSAGE
--- a/pkgtools/pkg_install/MESSAGE Mon Feb 02 11:58:47 2009 +0000
+++ b/pkgtools/pkg_install/MESSAGE Mon Feb 02 12:34:59 2009 +0000
@@ -1,12 +1,12 @@
===========================================================================
-$NetBSD: MESSAGE,v 1.4 2008/01/13 22:31:25 rillig Exp $
+$NetBSD: MESSAGE,v 1.5 2009/02/02 12:34:59 joerg Exp $
You may wish to have the vulnerabilities file downloaded daily so that
it remains current. This may be done by adding an appropriate entry
to a user's crontab(5) entry. For example the entry
# download vulnerabilities file
-0 3 * * * ${PREFIX}/sbin/download-vulnerability-list >/dev/null 2>&1
+0 3 * * * ${PREFIX}/sbin/pkg_admin fetch-pkg-vulnerabilities >/dev/null 2>&1
will update the vulnerability list every day at 3AM. You may wish to do
this more often than once a day.
@@ -15,28 +15,23 @@
security script. This may be accomplished by adding the following
lines to /etc/security.local
-if [ -x ${PREFIX}/sbin/audit-packages ]; then
- ${PREFIX}/sbin/audit-packages
+if [ -x ${PREFIX}/sbin/pkg_admin ]; then
+ ${PREFIX}/sbin/pkg_admin audit
fi
Alternatively this can also be acomplished by adding an entry to a user's
crontab(5) file. e.g.:
# run audit-packages
-0 3 * * * ${PREFIX}/sbin/audit-packages
+0 3 * * * ${PREFIX}/sbin/pkg_admin audit
-audit-packages and/or download-vulnerability-list need not be run by
-the root user. They will function as an unprivileged user, as long
-as the user chosen has permission to write the pkg-vulnerabilites
-to ${PKGVULNDIR}.
-
-A sample audit-packages.conf has been installed to:
+Both pkg_admin subcommands can be run as as an unprivileged user,
+as long as the user chosen has permission to read the pkgdb and to write
+the pkg-vulnerabilites to ${PKGVULNDIR}.
- ${EGDIR}/audit-packages.conf
+The behavior of pkg_admin and pkg_add can be customised with
+pkg_install.conf. Please see pkg_install.conf(5) for details.
-You may want to customise this file and copy it to
-${PKG_SYSCONFDIR}/audit-packages.conf.
-If you want to use signature verification you will need to install GnuPG and
-set the path for GPG appropriately in your audit-packages.conf. See
-audit-packages.conf(5) and audit-packages(8) for further information.
+If you want to use GPG signature verification you will need to install
+GnuPG and set the path for GPG appropriately in your pkg_install.conf.
===========================================================================
diff -r ab5f34f9db1b -r d62123fa7ce5 pkgtools/pkg_install/Makefile
--- a/pkgtools/pkg_install/Makefile Mon Feb 02 11:58:47 2009 +0000
+++ b/pkgtools/pkg_install/Makefile Mon Feb 02 12:34:59 2009 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.158 2008/07/14 14:56:50 joerg Exp $
+# $NetBSD: Makefile,v 1.159 2009/02/02 12:34:59 joerg Exp $
# Notes to package maintainers:
#
@@ -24,18 +24,10 @@
GNU_CONFIGURE= yes
CONFIGURE_ARGS+= --sysconfdir=${PKG_SYSCONFDIR:Q}
CONFIGURE_ARGS+= --with-pkgdbdir=${PKG_DBDIR:Q}
-CONFIGURE_ARGS+= --with-ftp=${FETCH_CMD:Q}
-CONFIGURE_ARGS+= --with-pax=${PAX:Q}
-CONFIGURE_ARGS+= --with-tar=${TAR:Q}
-USE_TOOLS+= pax:run tar:run gzcat:run ftp:run
-
-# The following tools are needed by pkg_view and linkfarm.
-USE_TOOLS+= chmod cmp cp env find grep ln mkdir rm rmdir \
- sed sort touch
USE_FEATURES= nbcompat
-NBCOMPAT_CONFIGURE_ARGS+= --enable-bsd-getopt
+NBCOMPAT_CONFIGURE_ARGS+= --enable-bsd-getopt --enable-db
SKIP_AUDIT_PACKAGES= yes
NO_PKGTOOLS_REQD_CHECK= yes
@@ -52,11 +44,11 @@
#
# We also use the newly built pkg_{add,create,delete} since upgrading
# from an older pkg_install might required features of the new program.
+#
# Note that the definitions are only overriden for the phases that are
# supposed to use them. pkg_admin pmatch might be used when looking for
# dependencies. If that is ever changed in a incompatible way, this has to
# be rethought.
-#
USE_NATIVE_GCC= yes
.if defined(_PKGSRC_BARRIER)
@@ -92,21 +84,20 @@
VERSION!= ${AWK} -F '"' '/PKGTOOLS_VERSION/ {print $$2}' \
${FILESDIR}/lib/version.h
-# Make sure the audit-packages files pick up the right tools in the right
-# places.
-#
-SUBST_CLASSES= paths
-SUBST_STAGE.paths= pre-configure
-SUBST_MESSAGE.paths= Fixing paths in scripts.
-SUBST_FILES.paths= audit-packages/Makefile.in
-SUBST_SED.paths= -e 's,_gzcat_,${GZCAT},g'
-
-# linkresolver interface appeared in libarchive 2.5.
-BUILDLINK_API_DEPENDS.libarchive+= libarchive>=2.5
+# linkresolver interface appeared in libarchive 2.5 and extract
+# requires version 2.5.4b to handle hardlinks correctly.
+BUILDLINK_API_DEPENDS.libarchive+= libarchive>=2.5.4b
.include "../../archivers/bzip2/builtin.mk"
.include "../../archivers/libarchive/builtin.mk"
.include "../../devel/zlib/builtin.mk"
+.include "../../security/openssl/builtin.mk"
+
+.if !empty(USE_BUILTIN.openssl:M[yY][eE][sS])
+CONFIGURE_ARGS+= --with-ssl
+
+.include "../../security/openssl/buildlink3.mk"
+.endif
.if empty(USE_BUILTIN.bzip2:M[yY][eE][sS]) || \
empty(USE_BUILTIN.zlib:M[yY][eE][sS])
diff -r ab5f34f9db1b -r d62123fa7ce5 pkgtools/pkg_install/PLIST
--- a/pkgtools/pkg_install/PLIST Mon Feb 02 11:58:47 2009 +0000
+++ b/pkgtools/pkg_install/PLIST Mon Feb 02 12:34:59 2009 +0000
@@ -1,35 +1,24 @@
-@comment $NetBSD: PLIST,v 1.10 2007/07/16 13:23:02 joerg Exp $
-man/cat1/audit-packages.0
-man/cat1/download-vulnerability-list.0
-man/cat1/linkfarm.0
+@comment $NetBSD: PLIST,v 1.11 2009/02/02 12:34:59 joerg Exp $
man/cat1/pkg_add.0
man/cat1/pkg_admin.0
man/cat1/pkg_create.0
man/cat1/pkg_delete.0
man/cat1/pkg_info.0
-man/cat1/pkg_view.0
-man/cat5/audit-packages.conf.0
+man/cat5/pkg_install.conf.0
man/cat5/pkg_summary.0
man/cat7/pkgsrc.0
-man/man1/audit-packages.1
-man/man1/download-vulnerability-list.1
-man/man1/linkfarm.1
man/man1/pkg_add.1
man/man1/pkg_admin.1
man/man1/pkg_create.1
man/man1/pkg_delete.1
man/man1/pkg_info.1
-man/man1/pkg_view.1
-man/man5/audit-packages.conf.5
+man/man5/pkg_install.conf.5
man/man5/pkg_summary.5
man/man7/pkgsrc.7
sbin/audit-packages
sbin/download-vulnerability-list
-sbin/linkfarm
sbin/pkg_add
sbin/pkg_admin
sbin/pkg_create
sbin/pkg_delete
sbin/pkg_info
-sbin/pkg_view
-share/examples/pkg_install/audit-packages.conf
diff -r ab5f34f9db1b -r d62123fa7ce5 pkgtools/pkg_install/files/Makefile.in
--- a/pkgtools/pkg_install/files/Makefile.in Mon Feb 02 11:58:47 2009 +0000
+++ b/pkgtools/pkg_install/files/Makefile.in Mon Feb 02 12:34:59 2009 +0000
@@ -1,9 +1,9 @@
-# $NetBSD: Makefile.in,v 1.8 2007/08/03 13:15:58 joerg Exp $
+# $NetBSD: Makefile.in,v 1.9 2009/02/02 12:35:00 joerg Exp $
BOOTSTRAP= @bootstrap@
.if empty(BOOTSTRAP)
-SUBDIRS= lib add admin create delete info view audit-packages
+SUBDIRS= lib add admin create delete info
.else
SUBDIRS= lib admin create info
.endif
@@ -22,5 +22,4 @@
rm -f config.log config.status configure.lineno
rm -f Makefile */Makefile
rm -f lib/config.h
- rm -f view/linkfarm.sh
- rm -f view/pkg_view.sh
+ rm -f bmp/bmp.sh
diff -r ab5f34f9db1b -r d62123fa7ce5 pkgtools/pkg_install/files/add/Makefile.in
--- a/pkgtools/pkg_install/files/add/Makefile.in Mon Feb 02 11:58:47 2009 +0000
+++ b/pkgtools/pkg_install/files/add/Makefile.in Mon Feb 02 12:34:59 2009 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.in,v 1.18 2008/04/26 17:40:01 joerg Exp $
+# $NetBSD: Makefile.in,v 1.19 2009/02/02 12:35:00 joerg Exp $
srcdir= @srcdir@
@@ -13,17 +13,25 @@
CC= @CC@
CCLD= $(CC)
-LIBS= -linstall @LIBS@
CPPFLAGS= @CPPFLAGS@ -I. -I$(srcdir) -I../lib
-DEFS= @DEFS@ -DOPSYS_NAME=\"$(OPSYS)\" -DMACHINE_ARCH=\"$(MACHINE_ARCH)\" -DBINDIR=\"$(sbindir)\" -DTAR_CMD=\"@tar@\" -DPAX_CMD=\"@pax@\"
+DEFS= @DEFS@ -DOPSYS_NAME=\"$(OPSYS)\" -DMACHINE_ARCH=\"$(MACHINE_ARCH)\" -DBINDIR=\"$(sbindir)\"
CFLAGS= @CFLAGS@
LDFLAGS= @LDFLAGS@ -L../lib
+SSL_SUPPORT= @ssl_support@
+
+LIBS= -linstall -lfetch -larchive -lbz2 -lz
+.if !empty(SSL_SUPPORT)
+LIBS+= -lcrypto
+CPPFLAGS+= -DHAVE_SSL
+.endif
+LIBS+= @LIBS@
+
INSTALL= @INSTALL@
PROG= pkg_add
-OBJS= main.o perform.o futil.o extract.o verify.o
+OBJS= main.o perform.o
all: $(PROG)
diff -r ab5f34f9db1b -r d62123fa7ce5 pkgtools/pkg_install/files/add/add.h
--- a/pkgtools/pkg_install/files/add/add.h Mon Feb 02 11:58:47 2009 +0000
+++ b/pkgtools/pkg_install/files/add/add.h Mon Feb 02 12:34:59 2009 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: add.h,v 1.12 2008/04/26 17:40:01 joerg Exp $ */
+/* $NetBSD: add.h,v 1.13 2009/02/02 12:35:00 joerg Exp $ */
/* from FreeBSD Id: add.h,v 1.8 1997/02/22 16:09:15 peter Exp */
@@ -25,6 +25,7 @@
#ifndef _INST_ADD_H_INCLUDE
#define _INST_ADD_H_INCLUDE
+extern char *Destdir;
extern char *OverrideMachine;
extern char *Prefix;
extern char *View;
@@ -35,15 +36,8 @@
extern Boolean Force;
extern Boolean Automatic;
extern int Replace;
-extern char *Mode;
-extern char *Owner;
-extern char *Group;
-extern char *Directory;
-extern char *PkgName;
-extern char FirstPen[];
int make_hierarchy(char *);
-int extract_plist(char *, package_t *);
void apply_perms(char *, char **, int);
int pkg_perform(lpkg_head_t *);
diff -r ab5f34f9db1b -r d62123fa7ce5 pkgtools/pkg_install/files/add/extract.c
--- a/pkgtools/pkg_install/files/add/extract.c Mon Feb 02 11:58:47 2009 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,340 +0,0 @@
-/* $NetBSD: extract.c,v 1.18 2008/04/26 17:40:01 joerg Exp $ */
-
-#if HAVE_CONFIG_H
-#include "config.h"
-#endif
-#include <nbcompat.h>
-#if HAVE_SYS_CDEFS_H
-#include <sys/cdefs.h>
-#endif
Home |
Main Index |
Thread Index |
Old Index