Import of pkgsrc-2016Q3

This commit is contained in:
2016-10-14 07:49:11 +02:00
committed by Lionel Sambuc
parent 9d819b6d54
commit 1242aa1e36
35952 changed files with 949749 additions and 377083 deletions

View File

@@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.211 2015/09/07 09:06:04 jperkin Exp $
# $NetBSD: Makefile,v 1.218 2016/06/21 12:23:01 joerg Exp $
# Notes to package maintainers:
#
@@ -7,6 +7,7 @@
# change in the pkg_* tools that pkgsrc relies on for proper operation.
PKGNAME= pkg_install-${VERSION}
PKGREVISION= 1
CATEGORIES= pkgtools
MAINTAINER= agc@NetBSD.org
@@ -76,7 +77,7 @@ CPPFLAGS+= -D_FILE_OFFSET_BITS=64
CPPFLAGS+= -DDEF_UMASK=${DEF_UMASK}
MAKE_ENV+= MACHINE_ARCH=${MACHINE_ARCH}
MAKE_ENV+= PKGSRC_MACHINE_ARCH=${MACHINE_ARCH}
MAKE_ENV+= OPSYS=${OPSYS}
MAKE_ENV+= CATMAN_SECTION_SUFFIX=${CATMAN_SECTION_SUFFIX:Q}
MAKE_ENV+= MANINSTALL=${MANINSTALL:Q}
@@ -107,6 +108,7 @@ VERSION!= ${AWK} '/PKGTOOLS_VERSION/ {print $$3}' \
BUILDLINK_API_DEPENDS.libarchive+= libarchive>=2.8.0
.include "../../archivers/bzip2/builtin.mk"
.include "../../archivers/xz/builtin.mk"
.include "../../archivers/libarchive/builtin.mk"
.include "../../devel/zlib/builtin.mk"
.include "../../security/openssl/builtin.mk"
@@ -145,7 +147,14 @@ LDFLAGS+= -L${WRKDIR}/libarchive/.libs
# Until we support pkgsrc openssl at bootstrap time, disable it completely
# if asked to avoid the builtin.
. if empty(USE_BUILTIN.openssl:M[Yy][Ee][Ss])
LIBARCHIVE_CONFIGURE_ARGS= --without-openssl
LIBARCHIVE_CONFIGURE_ARGS+= --without-openssl
. endif
# Only use XZ if we actually have builtin support for it. Some systems
# install the header, but without usable library or prefer to not use
# the system version, so give them some control.
. if empty(USE_BUILTIN.xz:M[Yy][Ee][Ss])
LIBARCHIVE_CONFIGURE_ARGS+= --without-lzma
. endif
LIBARCHIVE_LIBS= ${SED} -n -e 's/^Libs.private://p' \
@@ -157,20 +166,14 @@ CONFIG_GUESS_OVERRIDE+= ${WRKDIR}/libarchive/build/autoconf/config.guess \
CONFIG_SUB_OVERRIDE+= ${WRKDIR}/libarchive/build/autoconf/config.sub \
${WRKSRC}/config.sub
. if ${OPSYS} == "Cygwin"
CPPFLAGS+= -DLIBARCHIVE_STATIC
. endif
CPPFLAGS.Cygwin+= -DLIBARCHIVE_STATIC
. if ${OPSYS} == "Darwin"
# Make sure that the linker used our static library instead of the
# (outdated) dynamic library "/usr/lib/libarchive.dylib".
LDFLAGS+= -Wl,-search_paths_first
. endif
LDFLAGS.Darwin+= -Wl,-search_paths_first
. if ${OPSYS} == "SunOS"
# workaround for pkg/45491
CONFIGURE_ENV+= ac_cv_header_ext2fs_ext2_fs_h=no
. endif
CONFIGURE_ENV.SunOS+= ac_cv_header_ext2fs_ext2_fs_h=no
# Hack to make sure that the libarchive version is replaced
pre-configure: config-guess-override config-sub-override
@@ -210,6 +213,7 @@ pre-configure:
${CONFIG_SHELL} ${CONFIG_SHELL_FLAGS} ./configure \
--disable-bsdcpio --disable-bsdtar --disable-shared \
--disable-dependency-tracking --without-expat \
--disable-maintainer-mode \
--without-iconv --without-lzo2 --without-nettle \
--without-xml2 \
${LIBARCHIVE_CONFIGURE_ARGS}

View File

@@ -1,11 +1,11 @@
# $NetBSD: Makefile.in,v 1.10 2013/09/11 14:39:21 wiz Exp $
# $NetBSD: Makefile.in,v 1.12 2016/06/30 17:42:04 wiz Exp $
BOOTSTRAP= @bootstrap@
.if empty(BOOTSTRAP)
SUBDIRS= lib add admin create delete info
.else
SUBDIRS= lib admin create info
SUBDIRS= lib add admin create info
.endif
all:
@@ -22,4 +22,3 @@ distclean: clean
rm -f config.log config.status configure.lineno
rm -f Makefile */Makefile
rm -f lib/config.h lib/pkg_install.conf.5 lib/pkg_install.conf.cat
rm -f bpm/bpm.sh

View File

@@ -1,4 +1,4 @@
# $NetBSD: Makefile.in,v 1.31 2015/09/07 09:06:04 jperkin Exp $
# $NetBSD: Makefile.in,v 1.33 2015/12/27 12:36:42 joerg Exp $
srcdir= @srcdir@
@@ -14,17 +14,24 @@ cat1dir= $(mandir)/cat1
CC= @CC@
CCLD= $(CC)
CPPFLAGS= @CPPFLAGS@ -I. -I$(srcdir) -I../lib
DEFS= @DEFS@ -DOPSYS_NAME=\"$(OPSYS)\" -DMACHINE_ARCH=\"$(MACHINE_ARCH)\" -DBINDIR=\"$(sbindir)\"
DEFS= @DEFS@ -DOPSYS_NAME=\"$(OPSYS)\" -DPKGSRC_MACHINE_ARCH=\"$(PKGSRC_MACHINE_ARCH)\" -DBINDIR=\"$(sbindir)\"
CFLAGS= @CFLAGS@
LDFLAGS= @LDFLAGS@ -L../lib
BOOTSTRAP= @bootstrap@
SSL_SUPPORT= @ssl_support@
.if empty(BOOTSTRAP)
LIBS= -linstall -lnetpgpverify -larchive -lbz2 -lz -lfetch
.if !empty(SSL_SUPPORT)
LIBS+= -lssl -lcrypto
CPPFLAGS+= -DHAVE_SSL
.endif
LIBS+= @LIBS@
.else
LIBS= -linstall ${STATIC_LIBARCHIVE} @LIBS@
CPPFLAGS+= -DBOOTSTRAP
.endif
INSTALL= @INSTALL@

View File

@@ -1,4 +1,4 @@
/* $NetBSD: main.c,v 1.30 2015/07/20 13:59:44 khorben Exp $ */
/* $NetBSD: main.c,v 1.32 2015/12/27 12:36:42 joerg Exp $ */
#if HAVE_CONFIG_H
#include "config.h"
@@ -7,7 +7,7 @@
#if HAVE_SYS_CDEFS_H
#include <sys/cdefs.h>
#endif
__RCSID("$NetBSD: main.c,v 1.30 2015/07/20 13:59:44 khorben Exp $");
__RCSID("$NetBSD: main.c,v 1.32 2015/12/27 12:36:42 joerg Exp $");
/*
*
@@ -33,9 +33,6 @@ __RCSID("$NetBSD: main.c,v 1.30 2015/07/20 13:59:44 khorben Exp $");
#if HAVE_ERR_H
#include <err.h>
#endif
#if HAVE_SYS_PARAM_H
#include <sys/param.h>
#endif
#include "lib.h"
#include "add.h"
@@ -162,7 +159,10 @@ main(int argc, char **argv)
free(pkgdbdir);
}
#ifndef BOOTSTRAP
process_pkg_path();
#endif
TAILQ_INIT(&pkgs);
if (argc == 0) {
@@ -171,6 +171,7 @@ main(int argc, char **argv)
usage();
}
#ifndef BOOTSTRAP
if (strcasecmp(do_license_check, "no") == 0)
LicenseCheck = 0;
else if (strcasecmp(do_license_check, "yes") == 0)
@@ -183,6 +184,7 @@ main(int argc, char **argv)
if (LicenseCheck)
load_license_lists();
#endif
/* Get all the remaining package names, if any */
for (; argc > 0; --argc, ++argv) {

View File

@@ -1,4 +1,4 @@
/* $NetBSD: perform.c,v 1.106 2014/12/30 15:13:20 wiz Exp $ */
/* $NetBSD: perform.c,v 1.108 2015/12/27 12:36:42 joerg Exp $ */
#if HAVE_CONFIG_H
#include "config.h"
#endif
@@ -6,7 +6,7 @@
#if HAVE_SYS_CDEFS_H
#include <sys/cdefs.h>
#endif
__RCSID("$NetBSD: perform.c,v 1.106 2014/12/30 15:13:20 wiz Exp $");
__RCSID("$NetBSD: perform.c,v 1.108 2015/12/27 12:36:42 joerg Exp $");
/*-
* Copyright (c) 2003 Grant Beattie <grant@NetBSD.org>
@@ -907,7 +907,7 @@ check_platform(struct pkg_task *pkg)
if (OverrideMachine != NULL)
effective_arch = OverrideMachine;
else
effective_arch = MACHINE_ARCH;
effective_arch = PKGSRC_MACHINE_ARCH;
/* If either the OS or arch are different, bomb */
if (strcmp(OPSYS_NAME, pkg->buildinfo[BI_OPSYS]) ||
@@ -1246,6 +1246,9 @@ static int check_input(const char *line, size_t len)
static int
check_signature(struct pkg_task *pkg, int invalid_sig)
{
#ifdef BOOTSTRAP
return 0;
#else
char *line;
size_t len;
@@ -1282,11 +1285,15 @@ check_signature(struct pkg_task *pkg, int invalid_sig)
}
warnx("Unknown value of configuration variable VERIFIED_INSTALLATION");
return 1;
#endif
}
static int
check_vulnerable(struct pkg_task *pkg)
{
#ifdef BOOTSTRAP
return 0;
#else
static struct pkg_vulnerabilities *pv;
int require_check;
char *line;
@@ -1325,11 +1332,15 @@ check_vulnerable(struct pkg_task *pkg)
return 1;
}
return 0;
#endif
}
static int
check_license(struct pkg_task *pkg)
{
#ifdef BOOTSTRAP
return 0;
#else
if (LicenseCheck == 0)
return 0;
@@ -1353,6 +1364,7 @@ check_license(struct pkg_task *pkg)
warnx("Invalid LICENSE for package `%s'", pkg->pkgname);
return 1;
}
#endif
}
/*
@@ -1361,7 +1373,9 @@ check_license(struct pkg_task *pkg)
static int
pkg_do(const char *pkgpath, int mark_automatic, int top_level)
{
#ifndef BOOTSTRAP
char *archive_name;
#endif
int status, invalid_sig;
struct pkg_task *pkg;
@@ -1369,6 +1383,16 @@ pkg_do(const char *pkgpath, int mark_automatic, int top_level)
status = -1;
#ifdef BOOTSTRAP
pkg->archive = archive_read_new();
archive_read_support_compression_all(pkg->archive);
archive_read_support_format_all(pkg->archive);
if (archive_read_open_filename(pkg->archive, pkgpath, 1024)) {
warnx("no pkg found for '%s', sorry.", pkgpath);
archive_read_free(pkg->archive);
goto clean_find_archive;
}
#else
pkg->archive = find_archive(pkgpath, top_level, &archive_name);
if (pkg->archive == NULL) {
warnx("no pkg found for '%s', sorry.", pkgpath);
@@ -1378,6 +1402,7 @@ pkg_do(const char *pkgpath, int mark_automatic, int top_level)
invalid_sig = pkg_verify_signature(archive_name, &pkg->archive, &pkg->entry,
&pkg->pkgname);
free(archive_name);
#endif
if (pkg->archive == NULL)
goto clean_memory;

View File

@@ -1,4 +1,4 @@
# $NetBSD: Makefile.in,v 1.29 2015/09/07 09:06:05 jperkin Exp $
# $NetBSD: Makefile.in,v 1.30 2015/12/27 12:18:20 joerg Exp $
srcdir= @srcdir@
@@ -27,19 +27,20 @@ INSTALL= @INSTALL@
PROG= pkg_admin
SCRIPTS= audit-packages download-vulnerability-list
CPPFLAGS= @CPPFLAGS@ -I. -I$(srcdir) -I../lib
.if empty(BOOTSTRAP)
LIBS= -linstall -lnetpgpverify -larchive -lbz2 -lz -lfetch
.if !empty(SSL_SUPPORT)
LIBS+= -lssl -lcrypto
CFLAGS+= -DHAVE_SSL
CPPFLAGS+= -DHAVE_SSL
.endif
LIBS+= @LIBS@
OBJS= audit.o check.o main.o
CPPFLAGS= @CPPFLAGS@ -I. -I$(srcdir) -I../lib
.else
LIBS= -linstall @LIBS@
OBJS= check.o main.o
CPPFLAGS= @CPPFLAGS@ -I. -I$(srcdir) -I../lib -DBOOTSTRAP
CPPFLAGS+= -DBOOTSTRAP
.endif
all: $(PROG) $(SCRIPTS)

View File

@@ -1,114 +0,0 @@
.\" $NetBSD: bpm.1,v 1.8 2013/07/20 21:50:53 wiz Exp $ */
.\"
.\" Copyright (c) 2003,2009 The NetBSD Foundation, Inc.
.\" All rights reserved.
.\"
.\" This code is derived from software contributed to The NetBSD Foundation
.\" by Alistair Crooks (agc@NetBSD.org)
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" 1. Redistributions of source code must retain the above copyright
.\" notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\" notice, this list of conditions and the following disclaimer in the
.\" documentation and/or other materials provided with the distribution.
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
.\" POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd August 3, 2007
.Dt BPM 1
.Os
.Sh NAME
.Nm bpm
.Nd menu-based binary package manager
.Sh SYNOPSIS
.Nm
.Op Fl hnVv
.Op Fl b Ar baseURL
.Op Fl m Ar machine
.Op Fl r Ar release
.Op Fl w Ar seconds
.Sh DESCRIPTION
The
.Nm
command is used to locate and install binary packages from any
reachable URL.
.Pp
The following command-line options are supported:
.Bl -tag -width indent
.It Fl b Ar baseURL
Specify a base URL from which to download binary packages.
The default URL is
.Pa ftp://ftp.NetBSD.org/pub/pkgsrc/packages .
.It Fl h
Print a help message and then exit.
.It Fl m Ar machine
Use
.Ar machine
as the machine architecture to be used, instead of that returned by
.Xr uname 1 .
.It Fl n
Don't actually execute the commands to add the package.
.It Fl r Ar release
Use
.Ar release
as the operating system release to be used, instead of that returned by
.Xr uname 1 .
.It Fl V
Print version number and exit.
.It Fl v
Turn on verbose output.
.It Fl w Ar seconds
The number of
.Ar seconds
to wait after displaying an error message and returning to
normal menu operations.
.El
.Pp
.Nm
provides a menu-based binary package manager for
.Nx .
.Nm
first connects to the URL using
.Xr ftp 1 ,
and displays a list of categories for which binary packages exist.
If no categories are displayed, it could
be that the machine architecture or operating system release string
have been wrongly interpreted, and that it will be necessary to override
this values by means of the command line options.
Within a category, a list of packages will be displayed, and by selecting
one using the number assigned to it, the package will be downloaded
automatically, and installed, using the
.Xr pkg_add 1
utility.
It is also possible to change the category currently being examined,
and to quit from the utility, simply by selecting the appropriate choices
on the menu.
.Sh ENVIRONMENT
The environment variables which govern the behavior of
.Xr ftp 1
and
.Xr pkg_add 1
are valid for
.Nm .
.Sh SEE ALSO
.Xr ftp 1 ,
.Xr pkg_add 1 ,
.Xr uname 1
.Sh AUTHORS
The
.Nm
utility was written by
.An Alistair Crooks Aq Mt agc@NetBSD.org .

View File

@@ -1,220 +0,0 @@
#! /bin/sh
#
# $NetBSD: bpm.sh.in,v 1.5 2012/02/21 18:32:14 wiz Exp $
#
# Copyright (c) 2003,2009 The NetBSD Foundation, Inc.
# All rights reserved.
#
# This code is derived from software contributed to The NetBSD Foundation
# by Alistair Crooks (agc@NetBSD.org)
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
#
# THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
# ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
# TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
#
die()
{
echo >&2 "$@"
exit 1
}
check_prog()
{
_var="$1"; _name="$2"
eval _tmp=\"\$$_var\"
if [ "x$_tmp" != "x" ]; then
# Variable is already set (by the user, for example)
return 0
fi
for _d in `echo $PATH | tr ':' ' '`; do
if [ -x "$_d/$_name" ]; then
# Program found
eval $_var=\""$_d/$_name"\"
return 1
fi
done
die "$_name not found in path."
}
check_prog awkprog awk
check_prog echoprog echo
check_prog ftpprog ftp
check_prog idprog id
check_prog moreprog more
check_prog pkg_addprog pkg_add
check_prog rmprog rm
check_prog sedprog sed
check_prog suprog su
check_prog unameprog uname
# print version and exit
version() {
$pkg_addprog -V
exit 0
}
# temporary files
tmpcategories=/tmp/categories.$$
tmppackages=/tmp/packages.$$
# some base parameters
base=ftp://ftp.NetBSD.org/pub/pkgsrc/packages
release=`${unameprog} -r | ${sedprog} -e 's/_STABLE//'`
machine=`${unameprog} -m`
sleepsecs=1
doit=""
while [ $# -gt 0 ]; do
case $1 in
-V) version ;;
-b) base=$2; shift ;;
-h) ${echoprog} "$0 [-b BaseURL] [-h] [-m machine] [-n] [-r release] [-v] [-w secs]"; exit 0;;
-m) machine=$2; shift ;;
-n) doit=":" ;;
-r) release=$2; shift ;;
-v) set -x ;;
-w) sleepsecs=$2; shift ;;
*) break ;;
esac
shift
done
category=""
while true; do
# if we don't have a packages file, then we need to choose a category
case "$category" in
"") # get possible categories
if [ ! -f $tmpcategories ]; then
${echoprog} "Downloading package categories from ${base}..."
${echoprog} "** QUIT" > $tmpcategories
${echoprog} ls | ${ftpprog} ${base}/${release}/${machine}/ 2>/dev/null | \
${awkprog} 'NF == 9 { if ($9 != "All") print $9 }' >> $tmpcategories
fi
# check for bad release numbering
# - it usually shows with 0 categories being displayed
${awkprog} 'END { if (NR == 1) { print "\n\n\n*** No categories found - is the OS release set properly? ***\n\n\n" } }' < $tmpcategories
# display possible categories
${awkprog} '{ print NR ". " $0 }' < $tmpcategories | ${moreprog}
# read a category number from the user
${echoprog} -n "Please type the category number: "
read choice
# validate user's choice
case "$choice" in
0|1) ${rmprog} -f $tmpcategories $tmppackages; exit 0 ;;
[2-9]|[0-9]*) category=`${awkprog} 'NR == '$choice' { print }' < $tmpcategories` ;;
*) category="" ;;
esac
case "$category" in
"") ${echoprog} "No such category \"$choice\""
sleep $sleepsecs
continue
;;
esac
# get possible packages
${echoprog} ""
${echoprog} "Downloading package names from ${base}/${category}..."
${echoprog} "** QUIT" > $tmppackages
${echoprog} "** Change category" >> $tmppackages
${echoprog} ls | ${ftpprog} ${base}/${release}/${machine}/${category}/ 2>/dev/null \
| ${awkprog} 'NF == 11 { print $9 }' >> $tmppackages
;;
esac
# display possible packages
${awkprog} '{ print NR ". " $0 }' < $tmppackages | ${moreprog}
# read a package number from the user
${echoprog} -n "Please type the package number: "
read choice
# validate user's choice
case "$choice" in
1) ${rmprog} -f $tmppackages $tmpcategories; exit 0 ;;
2) category=""; continue ;; # no package to install - choose new category
[3-9]|[0-9]*) package=`${awkprog} 'NR == '$choice' { print }' < $tmppackages` ;;
*) package="" ;;
esac
case "$package" in
"") ${echoprog} "No such package \"$choice\""
sleep $sleepsecs
continue
;;
esac
# check it's not already installed
pkgbase=`${echoprog} ${package} | ${sedprog} -e 's|-[0-9].*||'`
installed=`pkg_info -e $pkgbase`
case "$installed" in
"") ;;
*) ${echoprog} "$package selected, but $installed already installed"
sleep $sleepsecs
continue
;;
esac
# Tell people what we're doing
${echoprog} ""
${echoprog} "Adding package ${base}/${release}/${machine}/${category}/${package}"
cmd="env PKG_PATH=${base}/${release}/${machine}/All ${pkg_addprog} ${package}"
# check if we need to become root for this
if [ `${idprog} -u` != 0 ]; then
${echoprog} "Becoming root@`/bin/hostname` to add a binary package"
${echoprog} -n "`${echoprog} ${suprog} | $awkprog '{ print $1 }'` "
$doit ${suprog} root -c "$cmd"
success=$?
else
$doit $cmd
success=$?
fi
# give feedback after adding the package
case $success in
0) ${echoprog} "$package successfully installed" ;;
*) ${echoprog} "Problems when installing $package - please try again" ;;
esac
${echoprog} ""
${echoprog} -n "[Q]uit, [C]hange category, [I]nstall another package: "
read choice
case "$choice" in
[Qq]) break ;;
[Cc]) category="" ;;
[Ii]) ;;
esac
done
${rmprog} -f $tmpcategories $tmppackages
exit 0

View File

@@ -4798,7 +4798,7 @@ fi
done
for ac_header in assert.h ctype.h dirent.h err.h errno.h fnctl.h \
for ac_header in assert.h ctype.h dirent.h err.h errno.h fcntl.h \
fnmatch.h glob.h grp.h inttypes.h limits.h pwd.h signal.h \
stdarg.h stdio.h stdlib.h string.h time.h unistd.h vis.h
do :
@@ -4813,9 +4813,8 @@ fi
done
for ac_header in sys/cdefs.h sys/file.h sys/ioctl.h sys/param.h \
sys/queue.h sys/stat.h sys/time.h sys/types.h sys/utsname.h \
sys/wait.h
for ac_header in sys/cdefs.h sys/file.h sys/ioctl.h sys/queue.h \
sys/stat.h sys/time.h sys/types.h sys/utsname.h sys/wait.h
do :
as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
@@ -5282,7 +5281,7 @@ SYSCONFDIR="$sysconfdir"
PKG_DBDIR="$pkgdbdir"
ac_config_files="$ac_config_files Makefile add/Makefile admin/Makefile bpm/bpm.sh create/Makefile delete/Makefile info/Makefile lib/Makefile lib/pkg_install.conf.5 lib/pkg_install.conf.cat"
ac_config_files="$ac_config_files Makefile add/Makefile admin/Makefile create/Makefile delete/Makefile info/Makefile lib/Makefile lib/pkg_install.conf.5 lib/pkg_install.conf.cat"
cat >confcache <<\_ACEOF
# This file is a shell script that caches the results of configure
@@ -5978,7 +5977,6 @@ do
"Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
"add/Makefile") CONFIG_FILES="$CONFIG_FILES add/Makefile" ;;
"admin/Makefile") CONFIG_FILES="$CONFIG_FILES admin/Makefile" ;;
"bpm/bpm.sh") CONFIG_FILES="$CONFIG_FILES bpm/bpm.sh" ;;
"create/Makefile") CONFIG_FILES="$CONFIG_FILES create/Makefile" ;;
"delete/Makefile") CONFIG_FILES="$CONFIG_FILES delete/Makefile" ;;
"info/Makefile") CONFIG_FILES="$CONFIG_FILES info/Makefile" ;;

View File

@@ -1,4 +1,4 @@
dnl $NetBSD: configure.ac,v 1.39 2015/01/22 18:15:39 pho Exp $
dnl $NetBSD: configure.ac,v 1.42 2016/06/30 17:42:04 wiz Exp $
dnl Process this file with autoconf to produce a configure script.
AC_PREREQ(2.52)
AC_INIT([pkg_install], [20090911], [joerg@NetBSD.org])
@@ -64,12 +64,11 @@ AC_CHECK_LIB(db, __db185_open, , AC_SEARCH_LIBS(dbopen, [db db1]))
dnl Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS([assert.h ctype.h dirent.h err.h errno.h fnctl.h \
AC_CHECK_HEADERS([assert.h ctype.h dirent.h err.h errno.h fcntl.h \
fnmatch.h glob.h grp.h inttypes.h limits.h pwd.h signal.h \
stdarg.h stdio.h stdlib.h string.h time.h unistd.h vis.h])
AC_CHECK_HEADERS([sys/cdefs.h sys/file.h sys/ioctl.h sys/param.h \
sys/queue.h sys/stat.h sys/time.h sys/types.h sys/utsname.h \
sys/wait.h])
AC_CHECK_HEADERS([sys/cdefs.h sys/file.h sys/ioctl.h sys/queue.h \
sys/stat.h sys/time.h sys/types.h sys/utsname.h sys/wait.h])
# Checks for library functions.
AC_CHECK_FUNCS([vfork])
@@ -173,7 +172,7 @@ AC_SUBST(SYSCONFDIR)
PKG_DBDIR="$pkgdbdir"
AC_SUBST(PKG_DBDIR)
AC_CONFIG_FILES([Makefile add/Makefile admin/Makefile bpm/bpm.sh \
AC_CONFIG_FILES([Makefile add/Makefile admin/Makefile \
create/Makefile delete/Makefile info/Makefile \
lib/Makefile lib/pkg_install.conf.5 lib/pkg_install.conf.cat])
AC_OUTPUT

View File

@@ -1,4 +1,4 @@
# $NetBSD: Makefile.in,v 1.27 2015/09/07 09:06:05 jperkin Exp $
# $NetBSD: Makefile.in,v 1.29 2015/12/27 12:36:42 joerg Exp $
srcdir= @srcdir@
@@ -24,18 +24,17 @@ INSTALL= @INSTALL@
PROG= pkg_create
SSL_SUPPORT= @ssl_support@
CPPFLAGS= @CPPFLAGS@ -I. -I$(srcdir) -I../lib
OBJS= main.o perform.o pl.o util.o build.o
.if empty(BOOTSTRAP)
LIBS= -linstall -lnetpgpverify -larchive -lbz2 -lz -lfetch @LIBS@
.if !empty(SSL_SUPPORT)
LIBS+= -lssl -lcrypto
.endif
CPPFLAGS= @CPPFLAGS@ -I. -I$(srcdir) -I../lib
OBJS= main.o perform.o pl.o util.o build.o
.else
LIBS= -linstall @LIBS@
CPPFLAGS= @CPPFLAGS@ -I. -I$(srcdir) -I../lib -DBOOTSTRAP
OBJS= main.o perform.o pl.o util.o
LIBS= -linstall ${STATIC_LIBARCHIVE} @LIBS@
CPPFLAGS+= -DBOOTSTRAP
.endif
all: $(PROG)

View File

@@ -1,4 +1,4 @@
/* $NetBSD: create.h,v 1.15 2014/12/30 15:13:20 wiz Exp $ */
/* $NetBSD: create.h,v 1.16 2016/04/10 19:01:19 joerg Exp $ */
/* from FreeBSD Id: create.h,v 1.13 1997/10/08 07:46:19 charnier Exp */
@@ -57,7 +57,6 @@ extern char *DefaultGroup;
extern const char *CompressionType;
extern int PlistOnly;
extern int RelativeLinks;
extern int update_pkgdb;
void check_list(package_t *, const char *);
void copy_plist(char *, package_t *);

View File

@@ -1,4 +1,4 @@
/* $NetBSD: main.c,v 1.20 2014/12/30 15:13:20 wiz Exp $ */
/* $NetBSD: main.c,v 1.21 2016/04/10 19:01:19 joerg Exp $ */
#if HAVE_CONFIG_H
#include "config.h"
@@ -7,7 +7,7 @@
#if HAVE_SYS_CDEFS_H
#include <sys/cdefs.h>
#endif
__RCSID("$NetBSD: main.c,v 1.20 2014/12/30 15:13:20 wiz Exp $");
__RCSID("$NetBSD: main.c,v 1.21 2016/04/10 19:01:19 joerg Exp $");
/*
* FreeBSD install - a package for the installation and maintainance
@@ -26,6 +26,7 @@ __RCSID("$NetBSD: main.c,v 1.20 2014/12/30 15:13:20 wiz Exp $");
#include "lib.h"
#include "create.h"
/* -U is silently ignored, it used to inhibit pkgdb changes. */
static const char Options[] = "B:C:D:F:I:K:L:OP:S:T:UVb:c:d:f:g:i:k:ln:p:r:s:u:v";
char *Prefix = NULL;
@@ -47,7 +48,6 @@ char *DefaultOwner = NULL;
char *DefaultGroup = NULL;
char *realprefix = NULL;
const char *CompressionType = NULL;
int update_pkgdb = 1;
int PlistOnly = 0;
int RelativeLinks = 0;
Boolean File2Pkg = FALSE;
@@ -93,7 +93,6 @@ main(int argc, char **argv)
break;
case 'U':
update_pkgdb = 0;
break;
case 'p':
@@ -204,7 +203,7 @@ main(int argc, char **argv)
return 0;
if (Verbose) {
if (PlistOnly)
warnx("package registration failed");
warnx("PLIST adjustment failed");
else
warnx("package creation failed");
}

View File

@@ -1,4 +1,4 @@
/* $NetBSD: perform.c,v 1.26 2009/11/05 16:22:32 joerg Exp $ */
/* $NetBSD: perform.c,v 1.27 2015/12/27 12:36:42 joerg Exp $ */
#if HAVE_CONFIG_H
#include "config.h"
@@ -7,7 +7,7 @@
#if HAVE_SYS_CDEFS_H
#include <sys/cdefs.h>
#endif
__RCSID("$NetBSD: perform.c,v 1.26 2009/11/05 16:22:32 joerg Exp $");
__RCSID("$NetBSD: perform.c,v 1.27 2015/12/27 12:36:42 joerg Exp $");
/*
* FreeBSD install - a package for the installation and maintainance
@@ -225,12 +225,7 @@ pkg_perform(const char *pkg)
write_plist(&plist, stdout, realprefix);
retval = TRUE;
} else {
#ifdef BOOTSTRAP
warnx("Package building is not supported in bootstrap mode");
retval = FALSE;
#else
retval = pkg_build(pkg, full_pkg, suffix, &plist);
#endif
}
/* Cleanup */

View File

@@ -1,4 +1,4 @@
.\" $NetBSD: pkg_create.1,v 1.26 2014/12/30 15:13:20 wiz Exp $
.\" $NetBSD: pkg_create.1,v 1.27 2016/04/10 19:01:19 joerg Exp $
.\"
.\" FreeBSD install - a package for the installation and maintenance
.\" of non-core utilities.
@@ -32,7 +32,7 @@
.Nd a utility for creating software package distributions
.Sh SYNOPSIS
.Nm
.Op Fl lOUVv
.Op Fl lOVv
.Op Fl B Ar build-info-file
.Op Fl b Ar build-version-file
.Op Fl C Ar cpkgs
@@ -243,8 +243,6 @@ Be sure to leave some number of
characters for
.Xr mktemp 3
to fill in with a unique ID.
.It Fl U
Do not update the package file database with any file information.
.It Fl u Ar owner
Make
.Ar owner

View File

@@ -1,4 +1,4 @@
/* $NetBSD: pl.c,v 1.14 2009/11/05 16:22:32 joerg Exp $ */
/* $NetBSD: pl.c,v 1.15 2016/04/10 19:01:19 joerg Exp $ */
#if HAVE_CONFIG_H
#include "config.h"
@@ -7,7 +7,7 @@
#if HAVE_SYS_CDEFS_H
#include <sys/cdefs.h>
#endif
__RCSID("$NetBSD: pl.c,v 1.14 2009/11/05 16:22:32 joerg Exp $");
__RCSID("$NetBSD: pl.c,v 1.15 2016/04/10 19:01:19 joerg Exp $");
/*
* FreeBSD install - a package for the installation and maintainance
@@ -89,10 +89,6 @@ check_list(package_t *pkg, const char *PkgName)
char *pkgname = NULL;
int cc;
/* Open Package Database for writing */
if (update_pkgdb && !pkgdb_open(ReadWrite))
err(EXIT_FAILURE, "can't open pkgdb");
for (p = pkg->head; p; p = p->next) {
switch (p->type) {
case PLIST_CWD:
@@ -109,38 +105,10 @@ check_list(package_t *pkg, const char *PkgName)
errx(2, "@pkgdir without preceding @cwd found");
if (pkgname == NULL)
errx(2, "@pkgdir without preceding @name found");
if (update_pkgdb) {
add_pkgdir(pkgname, cwd, p->name);
/* mkdir_p(cwd, p->name); */
}
break;
case PLIST_FILE:
/*
* pkgdb handling - usually, we enter files
* into the pkgdb as soon as they hit the disk,
* but as they are present before pkg_create
* starts, it's ok to do this somewhere here
*/
if (cwd == NULL)
errx(2, "file without preceding @cwd found");
if (update_pkgdb) {
char *s, t[MaxPathSize];
(void) snprintf(t, sizeof(t), "%s%s%s",
cwd,
(strcmp(cwd, "/") == 0) ? "" : "/",
p->name);
s = pkgdb_retrieve(t);
if (s && PlistOnly)
warnx("Overwriting %s - "
"pkg %s bogus/conflicting?", t, s);
else {
pkgdb_store(t, PkgName);
}
}
/* prepend DESTDIR if set? - HF */
(void) snprintf(name, sizeof(name), "%s%s%s",
cwd,
(strcmp(cwd, "/") == 0) ? "" : "/",
@@ -204,8 +172,4 @@ check_list(package_t *pkg, const char *PkgName)
break;
}
}
if (update_pkgdb) {
pkgdb_close();
}
}

View File

@@ -1,4 +1,4 @@
# $NetBSD: Makefile.in,v 1.30 2015/09/07 09:06:05 jperkin Exp $
# $NetBSD: Makefile.in,v 1.31 2015/12/27 12:18:20 joerg Exp $
srcdir= @srcdir@
@@ -16,19 +16,20 @@ SSL_SUPPORT= @ssl_support@
CC= @CC@
CCLD= $(CC)
CPPFLAGS= @CPPFLAGS@ -I. -I$(srcdir) -I../lib
DEFS= @DEFS@
CFLAGS= @CFLAGS@
LDFLAGS= @LDFLAGS@ -L../lib
.if empty(BOOTSTRAP)
LIBS= -linstall -lnetpgpverify -larchive -lbz2 -lz -lfetch @LIBS@
.if !empty(SSL_SUPPORT)
LIBS+= -lssl -lcrypto
.endif
CPPFLAGS= @CPPFLAGS@ -I. -I$(srcdir) -I../lib
.else
LIBS= -linstall @LIBS@
CPPFLAGS= @CPPFLAGS@ -I. -I$(srcdir) -I../lib -DBOOTSTRAP
CPPFLAGS+= -DBOOTSTRAP
.endif
DEFS= @DEFS@
CFLAGS= @CFLAGS@
LDFLAGS= @LDFLAGS@ -L../lib
INSTALL= @INSTALL@

View File

@@ -15,8 +15,8 @@
/* Define to 1 if you have the <err.h> header file. */
#undef HAVE_ERR_H
/* Define to 1 if you have the <fnctl.h> header file. */
#undef HAVE_FNCTL_H
/* Define to 1 if you have the <fcntl.h> header file. */
#undef HAVE_FCNTL_H
/* Define to 1 if you have the <fnmatch.h> header file. */
#undef HAVE_FNMATCH_H
@@ -72,9 +72,6 @@
/* Define to 1 if you have the <sys/ioctl.h> header file. */
#undef HAVE_SYS_IOCTL_H
/* Define to 1 if you have the <sys/param.h> header file. */
#undef HAVE_SYS_PARAM_H
/* Define to 1 if you have the <sys/queue.h> header file. */
#undef HAVE_SYS_QUEUE_H

View File

@@ -1,4 +1,4 @@
/* $NetBSD: file.c,v 1.30 2010/09/15 13:18:02 joerg Exp $ */
/* $NetBSD: file.c,v 1.31 2015/10/15 13:31:27 sevan Exp $ */
#if HAVE_CONFIG_H
#include "config.h"
@@ -7,13 +7,10 @@
#if HAVE_SYS_CDEFS_H
#include <sys/cdefs.h>
#endif
#if HAVE_SYS_PARAM_H
#include <sys/param.h>
#endif
#if HAVE_SYS_QUEUE_H
#include <sys/queue.h>
#endif
__RCSID("$NetBSD: file.c,v 1.30 2010/09/15 13:18:02 joerg Exp $");
__RCSID("$NetBSD: file.c,v 1.31 2015/10/15 13:31:27 sevan Exp $");
/*
* FreeBSD install - a package for the installation and maintainance

View File

@@ -1,4 +1,4 @@
/* $NetBSD: gpgsig.c,v 1.4 2015/09/01 12:14:06 jperkin Exp $ */
/* $NetBSD: gpgsig.c,v 1.5 2016/07/06 21:00:04 agc Exp $ */
#if HAVE_CONFIG_H
#include "config.h"
#endif
@@ -7,7 +7,7 @@
#include <sys/cdefs.h>
#endif
__RCSID("$NetBSD: gpgsig.c,v 1.4 2015/09/01 12:14:06 jperkin Exp $");
__RCSID("$NetBSD: gpgsig.c,v 1.5 2016/07/06 21:00:04 agc Exp $");
/*-
* Copyright (c) 2008 Joerg Sonnenberger <joerg@NetBSD.org>.
@@ -57,8 +57,8 @@ int
gpg_verify(const char *content, size_t len, const char *keyring,
const char *sig, size_t sig_len)
{
pgpv_t pgp;
pgpv_cursor_t cursor;
pgpv_t *pgp;
pgpv_cursor_t *cursor;
static const char hdr1[] = "-----BEGIN PGP SIGNED MESSAGE-----\n";
static const char hdr2[] = "Hash: SHA512\n\n";
ssize_t buflen;
@@ -76,17 +76,17 @@ gpg_verify(const char *content, size_t len, const char *keyring,
buflen = len;
}
memset(&pgp, 0, sizeof(pgp));
memset(&cursor, 0, sizeof(cursor));
pgp = pgpv_new();
cursor = pgpv_new_cursor();
if (!pgpv_read_pubring(&pgp, keyring, -1))
if (!pgpv_read_pubring(pgp, keyring, -1))
err(EXIT_FAILURE, "cannot read keyring");
if (!pgpv_verify(&cursor, &pgp, buf, buflen))
if (!pgpv_verify(cursor, pgp, buf, buflen))
errx(EXIT_FAILURE, "unable to verify signature: %s",
cursor.why);
pgpv_get_cursor_str(cursor, "why"));
pgpv_close(&pgp);
pgpv_close(pgp);
if (sig_len)
free(buf);

View File

@@ -1,4 +1,4 @@
/* $NetBSD: lib.h,v 1.66 2015/09/01 12:14:06 jperkin Exp $ */
/* $NetBSD: lib.h,v 1.67 2015/10/15 13:31:27 sevan Exp $ */
/* from FreeBSD Id: lib.h,v 1.25 1997/10/08 07:48:03 charnier Exp */
@@ -29,9 +29,6 @@
#include "config.h"
#endif
#include <nbcompat.h>
#if HAVE_SYS_PARAM_H
#include <sys/param.h>
#endif
#if HAVE_SYS_STAT_H
#include <sys/stat.h>
#endif

View File

@@ -1,4 +1,4 @@
/* $NetBSD: license.c,v 1.44 2015/09/13 11:25:52 leot Exp $ */
/* $NetBSD: license.c,v 1.46 2016/04/21 07:51:51 leot Exp $ */
/*-
* Copyright (c) 2009 Joerg Sonnenberger <joerg@NetBSD.org>.
@@ -62,6 +62,7 @@ const char *default_acceptable_licenses =
"gnu-gpl-v1 "
"gnu-gpl-v2 gnu-lgpl-v2 gnu-lgpl-v2.1 "
"gnu-gpl-v3 gnu-lgpl-v3 "
"hpnd "
"ibm-public-license-1.0 "
"info-zip "
"ipafont "
@@ -75,6 +76,7 @@ const char *default_acceptable_licenses =
"ofl-v1.0 ofl-v1.1 "
"openssl "
"original-bsd modified-bsd 2-clause-bsd "
"paratype "
"php "
"png-license "
"postgresql-license "

View File

@@ -1,4 +1,4 @@
/* $NetBSD: version.h,v 1.169 2015/09/01 12:14:06 jperkin Exp $ */
/* $NetBSD: version.h,v 1.170 2016/04/10 19:01:19 joerg Exp $ */
/*
* Copyright (c) 2001 Thomas Klausner. All rights reserved.
@@ -27,6 +27,6 @@
#ifndef _INST_LIB_VERSION_H_
#define _INST_LIB_VERSION_H_
#define PKGTOOLS_VERSION 20150901
#define PKGTOOLS_VERSION 20160410
#endif /* _INST_LIB_VERSION_H_ */