Import of pkgsrc-2015Q1

This commit is contained in:
2015-04-22 14:34:26 +02:00
committed by Lionel Sambuc
parent 9a8c06dafb
commit 4af1cdf7a9
25114 changed files with 870550 additions and 795435 deletions

View File

@@ -10,8 +10,6 @@ pkg_admin perform various pkgsrc administrative tasks
pkg_create create software package distributions
pkg_delete delete installed packages
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:

View File

@@ -1,5 +1,5 @@
===========================================================================
$NetBSD: MESSAGE,v 1.5 2009/02/02 12:34:59 joerg Exp $
$NetBSD: MESSAGE,v 1.6 2014/12/05 14:31:07 schmonz 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
@@ -27,7 +27,7 @@ crontab(5) file. e.g.:
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}.
the pkg-vulnerabilities to ${PKGVULNDIR}.
The behavior of pkg_admin and pkg_add can be customised with
pkg_install.conf. Please see pkg_install.conf(5) for details.

View File

@@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.203 2014/03/14 22:09:04 ryoon Exp $
# $NetBSD: Makefile,v 1.206 2015/01/22 09:19:47 jperkin Exp $
# Notes to package maintainers:
#
@@ -7,7 +7,6 @@
# change in the pkg_* tools that pkgsrc relies on for proper operation.
PKGNAME= pkg_install-${VERSION}
PKGREVISION= 1
CATEGORIES= pkgtools
MAINTAINER= agc@NetBSD.org
@@ -21,8 +20,8 @@ SKIP_LICENSE_CHECK= yes
CONFLICTS+= audit-packages-[0-9]*
GNU_CONFIGURE= yes
CONFIGURE_ARGS+= --sysconfdir=${PKG_SYSCONFDIR:Q}
CONFIGURE_ARGS+= --with-pkgdbdir=${PKG_DBDIR:Q}
CONFIGURE_ARGS+= --sysconfdir=${PKG_SYSCONFDIR}
CONFIGURE_ARGS+= --with-pkgdbdir=${PKG_DBDIR}
USE_FEATURES= nbcompat
@@ -77,23 +76,23 @@ CPPFLAGS+= -D_FILE_OFFSET_BITS=64
CPPFLAGS+= -DDEF_UMASK=${DEF_UMASK}
MAKE_ENV+= MACHINE_ARCH=${MACHINE_ARCH:Q}
MAKE_ENV+= OPSYS=${OPSYS:Q}
MAKE_ENV+= MACHINE_ARCH=${MACHINE_ARCH}
MAKE_ENV+= OPSYS=${OPSYS}
MAKE_ENV+= CATMAN_SECTION_SUFFIX=${CATMAN_SECTION_SUFFIX:Q}
MAKE_ENV+= MANINSTALL=${MANINSTALL:Q}
PKG_DBDIR?= /var/db/pkg
EGDIR= ${PREFIX}/share/examples/pkg_install
PLIST_SUBST+= PKG_DBDIR=${PKG_DBDIR:Q}
PLIST_SUBST+= PKG_DBDIR=${PKG_DBDIR}
DEINSTALL_SRC= # empty
INSTALL_SRC= ${PKGDIR}/INSTALL
FILES_SUBST+= PKG_DBDIR=${PKG_DBDIR:Q} \
PKG_TOOLS_BIN=${PKG_TOOLS_BIN:Q} \
FILES_SUBST+= PKG_DBDIR=${PKG_DBDIR} \
PKG_TOOLS_BIN=${PKG_TOOLS_BIN:Q} \
MKDIR=${MKDIR:Q}
MESSAGE_SUBST+= PKGVULNDIR=${PKG_DBDIR:Q} \
EGDIR=${EGDIR:Q}
MESSAGE_SUBST+= PKGVULNDIR=${PKG_DBDIR} \
EGDIR=${EGDIR}
.include "../../mk/compiler.mk"
@@ -144,11 +143,11 @@ 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])
. if empty(USE_BUILTIN.openssl:M[Yy][Ee][Ss])
LIBARCHIVE_CONFIGURE_ARGS= --without-openssl
.endif
. endif
LIBARCHIVE_LIBS= ${SED} -n -e 's/^Libs://p' -e 's/^Libs.private://p' \
LIBARCHIVE_LIBS= ${SED} -n -e 's/^Libs.private://p' \
${WRKDIR}/libarchive/build/pkgconfig/libarchive.pc 2>/dev/null || echo
LIBS+= ${LIBARCHIVE_LIBS:sh}
@@ -165,15 +164,13 @@ CPPFLAGS+= -DLIBARCHIVE_STATIC
LDFLAGS+= -Wl,-search_paths_first
. endif
.if ${OPSYS} == SunOS
. if ${OPSYS} == "SunOS"
# workaround for pkg/45491
CONFIGURE_ENV+= ac_cv_header_ext2fs_ext2_fs_h=no
.endif
. endif
# Hack to make sure that the libarchive version is replaced
pre-configure: config-guess-override config-sub-override
.else
LIBS+= -larchive
.endif
CPPFLAGS+= -I${WRKDIR}/libfetch
LDFLAGS+= -L${WRKDIR}/libfetch
@@ -201,12 +198,12 @@ pre-configure:
cd ${WRKDIR}/zlib && ${BUILD_MAKE_CMD} libz.a
.endif
.if empty(USE_BUILTIN.libarchive:M[yY][eE][sS])
cd ${WRKDIR}/libarchive && \
${SETENV} ${_CONFIGURE_SCRIPT_ENV} \
${CONFIG_SHELL} ${CONFIG_SHELL_FLAGS} \
./configure --disable-shared --disable-bsdtar \
--disable-bsdcpio --without-expat --without-xml2 \
--disable-dependency-tracking \
cd ${WRKDIR}/libarchive && ${SETENV} ${_CONFIGURE_SCRIPT_ENV} \
${CONFIG_SHELL} ${CONFIG_SHELL_FLAGS} ./configure \
--disable-bsdcpio --disable-bsdtar --disable-shared \
--disable-dependency-tracking --without-expat \
--without-iconv --without-lzo2 --without-nettle \
--without-xml2 \
${LIBARCHIVE_CONFIGURE_ARGS}
cd ${WRKDIR}/libarchive && ${BUILD_MAKE_CMD}
.endif

View File

@@ -1,4 +1,4 @@
# $NetBSD: Makefile.in,v 1.28 2013/09/12 11:03:10 jperkin Exp $
# $NetBSD: Makefile.in,v 1.29 2015/01/22 09:19:47 jperkin Exp $
srcdir= @srcdir@
@@ -20,7 +20,7 @@ LDFLAGS= @LDFLAGS@ -L../lib
SSL_SUPPORT= @ssl_support@
LIBS= -linstall -lfetch
LIBS= -linstall -larchive -lfetch
.if !empty(SSL_SUPPORT)
LIBS+= -lssl -lcrypto
.endif

View File

@@ -1,4 +1,4 @@
/* $NetBSD: main.c,v 1.27 2010/09/14 22:26:18 gdt Exp $ */
/* $NetBSD: main.c,v 1.28 2014/12/30 15:13:20 wiz 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.27 2010/09/14 22:26:18 gdt Exp $");
__RCSID("$NetBSD: main.c,v 1.28 2014/12/30 15:13:20 wiz Exp $");
/*
*
@@ -39,14 +39,11 @@ __RCSID("$NetBSD: main.c,v 1.27 2010/09/14 22:26:18 gdt Exp $");
#include "lib.h"
#include "add.h"
static char Options[] = "AC:DIK:LP:RVW:fhm:np:t:Uuvw:";
static char Options[] = "AC:DIK:P:RVfhm:np:t:Uuv";
char *Destdir = NULL;
char *OverrideMachine = NULL;
char *Prefix = NULL;
char *View = NULL;
char *Viewbase = NULL;
Boolean NoView = FALSE;
Boolean NoInstall = FALSE;
Boolean NoRecord = FALSE;
Boolean Automatic = FALSE;
@@ -66,9 +63,8 @@ static void
usage(void)
{
(void) fprintf(stderr, "%s\n%s\n%s\n%s\n",
"usage: pkg_add [-AfhILnRuVv] [-C config] [-P destdir] [-K pkg_dbdir]",
" [-m machine] [-p prefix] [-s verification-type",
" [-W viewbase] [-w view]\n",
"usage: pkg_add [-AfhInRuVv] [-C config] [-P destdir] [-K pkg_dbdir]",
" [-m machine] [-p prefix] [-s verification-type]\n",
" [[ftp|http]://[user[:password]@]host[:port]][/path/]pkg-name ...");
exit(1);
}
@@ -112,10 +108,6 @@ main(int argc, char **argv)
pkgdb_set_dir(optarg, 3);
break;
case 'L':
NoView = TRUE;
break;
case 'R':
NoRecord = TRUE;
break;
@@ -150,14 +142,6 @@ main(int argc, char **argv)
Verbose = TRUE;
break;
case 'W':
Viewbase = optarg;
break;
case 'w':
View = optarg;
break;
case 'h':
case '?':
default:

View File

@@ -1,4 +1,4 @@
/* $NetBSD: perform.c,v 1.105 2013/09/02 10:28:44 jperkin Exp $ */
/* $NetBSD: perform.c,v 1.106 2014/12/30 15:13:20 wiz 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.105 2013/09/02 10:28:44 jperkin Exp $");
__RCSID("$NetBSD: perform.c,v 1.106 2014/12/30 15:13:20 wiz Exp $");
/*-
* Copyright (c) 2003 Grant Beattie <grant@NetBSD.org>
@@ -75,7 +75,6 @@ struct pkg_meta {
char *meta_install;
char *meta_deinstall;
char *meta_preserve;
char *meta_views;
char *meta_installed_info;
};
@@ -121,7 +120,6 @@ static const struct pkg_meta_desc {
{ offsetof(struct pkg_meta, meta_size_pkg), SIZE_PKG_FNAME, 0, 0444 },
{ offsetof(struct pkg_meta, meta_size_all), SIZE_ALL_FNAME, 0, 0444 },
{ offsetof(struct pkg_meta, meta_preserve), PRESERVE_FNAME, 0, 0444 },
{ offsetof(struct pkg_meta, meta_views), VIEWS_FNAME, 0, 0444 },
{ offsetof(struct pkg_meta, meta_required_by), REQUIRED_BY_FNAME, 0, 0644 },
{ offsetof(struct pkg_meta, meta_installed_info), INSTALLED_INFO_FNAME, 0, 0644 },
{ 0, NULL, 0, 0 },
@@ -1179,30 +1177,6 @@ check_dependencies(struct pkg_task *pkg)
return status;
}
/*
* If this package uses pkg_views, register it in the default view.
*/
static void
pkg_register_views(struct pkg_task *pkg)
{
if (Fake || NoView || pkg->meta_data.meta_views == NULL)
return;
if (Verbose) {
printf("%s/pkg_view -d %s %s%s %s%s %sadd %s\n",
BINDIR, pkgdb_get_dir(),
View ? "-w " : "", View ? View : "",
Viewbase ? "-W " : "", Viewbase ? Viewbase : "",
Verbose ? "-v " : "", pkg->pkgname);
}
fexec_skipempty(BINDIR "/pkg_view", "-d", pkgdb_get_dir(),
View ? "-w " : "", View ? View : "",
Viewbase ? "-W " : "", Viewbase ? Viewbase : "",
Verbose ? "-v " : "", "add", pkg->pkgname,
(void *)NULL);
}
static int
preserve_meta_data_file(struct pkg_task *pkg, const char *name)
{
@@ -1433,12 +1407,7 @@ pkg_do(const char *pkgpath, int mark_automatic, int top_level)
if (pkg->meta_data.meta_mtree != NULL)
warnx("mtree specification in pkg `%s' ignored", pkg->pkgname);
if (pkg->meta_data.meta_views != NULL) {
pkg->logdir = xstrdup(pkg->prefix);
pkgdb_set_dir(dirname_of(pkg->logdir), 4);
} else {
pkg->logdir = xasprintf("%s/%s", config_pkg_dbdir, pkg->pkgname);
}
pkg->logdir = xasprintf("%s/%s", config_pkg_dbdir, pkg->pkgname);
if (Destdir != NULL)
pkg->install_logdir = xasprintf("%s/%s", Destdir, pkg->logdir);
@@ -1539,8 +1508,6 @@ pkg_do(const char *pkgpath, int mark_automatic, int top_level)
if (pkg->meta_data.meta_display != NULL)
fputs(pkg->meta_data.meta_display, stdout);
pkg_register_views(pkg);
status = 0;
goto clean_memory;

View File

@@ -1,4 +1,4 @@
.\" $NetBSD: pkg_add.1,v 1.45 2010/09/14 22:26:18 gdt Exp $
.\" $NetBSD: pkg_add.1,v 1.46 2014/12/30 15:13:20 wiz Exp $
.\"
.\" FreeBSD install - a package for the installation and maintenance
.\" of non-core utilities.
@@ -17,7 +17,7 @@
.\"
.\" @(#)pkg_add.1
.\"
.Dd June 16, 2010
.Dd December 27, 2014
.Dt PKG_ADD 1
.Os
.Sh NAME
@@ -25,14 +25,12 @@
.Nd a utility for installing and upgrading software package distributions
.Sh SYNOPSIS
.Nm
.Op Fl AfILnRUuVv
.Op Fl AfInRUuVv
.Op Fl C Ar config
.Op Fl K Ar pkg_dbdir
.Op Fl m Ar machine
.Op Fl P Ar destdir
.Op Fl p Ar prefix
.Op Fl W Ar viewbase
.Op Fl w Ar view
.Ar Oo Oo Li ftp|http Oc Ns Li :// Ns Oo Ar user Oc Ns \
Oo Li \&: Ns Ar password Oc \
Ns Li @ Oc Ns Ar host Ns Oo Li \&: Ns Ar port Oc Ns \
@@ -142,8 +140,6 @@ Override the value of the
.Dv PKG_DBDIR
configuration option with the value
.Ar pkg_dbdir .
.It Fl L
Don't add the package to any views after installation.
.It Fl m
Override the machine architecture returned by uname with
.Ar machine .
@@ -179,14 +175,6 @@ See below for a more detailed description of the process.
Print version number and exit.
.It Fl v
Turn on verbose output.
.It Fl W Ar viewbase
Passed down to
.Xr pkg_view 1
for managed views.
.It Fl w Ar view
Passed down to
.Xr pkg_view 1
for managed views.
.El
.Pp
One or more
@@ -337,11 +325,6 @@ Any package dependencies are recorded in the other packages'
.Pa +REQUIRED_BY
file.
.It
If the package is a depoted package, then add it to the registered
by calling
.Xr pkg_view 1
accordingly.
.It
Finally, if we were upgrading a package, any
.Pa +REQUIRED_BY
file that was moved aside before upgrading was started is now moved
@@ -386,9 +369,6 @@ are prefixed with
See
.Xr pkg_install.conf 5
for options, that can also be specified using the environment.
Packages using views are also affected by the environment variables
documented for
.Xr pkg_view 1 .
.Sh EXAMPLES
In all cases,
.Nm

View File

@@ -1,21 +1,21 @@
PKG_ADD(1) NetBSD General Commands Manual PKG_ADD(1)
PKG_ADD(1) General Commands Manual PKG_ADD(1)
NNAAMMEE
ppkkgg__aadddd -- a utility for installing and upgrading software package dis-
tributions
ppkkgg__aadddd -- a utility for installing and upgrading software package
distributions
SSYYNNOOPPSSIISS
ppkkgg__aadddd [--AAffIILLnnRRUUuuVVvv] [--CC _c_o_n_f_i_g] [--KK _p_k_g___d_b_d_i_r] [--mm _m_a_c_h_i_n_e]
[--PP _d_e_s_t_d_i_r] [--pp _p_r_e_f_i_x] [--WW _v_i_e_w_b_a_s_e] [--ww _v_i_e_w] _f_i_l_e _._._.
[[ftp|http]://[_u_s_e_r][:_p_a_s_s_w_o_r_d]@]_h_o_s_t[:_p_o_r_t][/_p_a_t_h_/]_p_k_g_-_n_a_m_e _._._.
ppkkgg__aadddd [--AAffIInnRRUUuuVVvv] [--CC _c_o_n_f_i_g] [--KK _p_k_g___d_b_d_i_r] [--mm _m_a_c_h_i_n_e] [--PP _d_e_s_t_d_i_r]
[--pp _p_r_e_f_i_x]
_f_i_l_e _._._. [[ftp|http]://[_u_s_e_r][:_p_a_s_s_w_o_r_d]@]_h_o_s_t[:_p_o_r_t][/_p_a_t_h_/]_p_k_g_-_n_a_m_e _._._.
DDEESSCCRRIIPPTTIIOONN
The ppkkgg__aadddd command is used to extract and upgrade packages that have
been previously created with the pkg_create(1) command. Packages are
prepared collections of pre-built binaries, documentation, configura-
tions, installation instructions and/or other files. ppkkgg__aadddd can recur-
sively install other packages that the current package depends on or
requires from both local disk and via FTP or HTTP.
prepared collections of pre-built binaries, documentation,
configurations, installation instructions and/or other files. ppkkgg__aadddd
can recursively install other packages that the current package depends
on or requires from both local disk and via FTP or HTTP.
WWAARRNNIINNGG
_S_i_n_c_e _t_h_e ppkkgg__aadddd _c_o_m_m_a_n_d _m_a_y _e_x_e_c_u_t_e _s_c_r_i_p_t_s _o_r _p_r_o_g_r_a_m_s _c_o_n_t_a_i_n_e_d
@@ -23,14 +23,14 @@ WWAARRNNIINNGG
_h_o_r_s_e_s_'_' _o_r _o_t_h_e_r _s_u_b_t_l_e _a_t_t_a_c_k_s _f_r_o_m _m_i_s_c_r_e_a_n_t_s _w_h_o _c_r_e_a_t_e _d_a_n_g_e_r_o_u_s
_p_a_c_k_a_g_e _f_i_l_e_s_.
_Y_o_u _a_r_e _a_d_v_i_s_e_d _t_o _v_e_r_i_f_y _t_h_e _c_o_m_p_e_t_e_n_c_e _a_n_d _i_d_e_n_t_i_t_y _o_f _t_h_o_s_e _w_h_o _p_r_o_-
_v_i_d_e _i_n_s_t_a_l_l_a_b_l_e _p_a_c_k_a_g_e _f_i_l_e_s_. _F_o_r _e_x_t_r_a _p_r_o_t_e_c_t_i_o_n_, _u_s_e _t_h_e _d_i_g_i_t_a_l
_s_i_g_n_a_t_u_r_e_s _p_r_o_v_i_d_e_d _w_h_e_r_e _p_o_s_s_i_b_l_e _(_s_e_e _t_h_e pkg_install.conf(_5)_)_, _o_r_,
_f_a_i_l_i_n_g _t_h_a_t_, _u_s_e tar(_1) _t_o _e_x_t_r_a_c_t _t_h_e _p_a_c_k_a_g_e _f_i_l_e_, _a_n_d _i_n_s_p_e_c_t _i_t_s
_Y_o_u _a_r_e _a_d_v_i_s_e_d _t_o _v_e_r_i_f_y _t_h_e _c_o_m_p_e_t_e_n_c_e _a_n_d _i_d_e_n_t_i_t_y _o_f _t_h_o_s_e _w_h_o
_p_r_o_v_i_d_e _i_n_s_t_a_l_l_a_b_l_e _p_a_c_k_a_g_e _f_i_l_e_s_. _F_o_r _e_x_t_r_a _p_r_o_t_e_c_t_i_o_n_, _u_s_e _t_h_e _d_i_g_i_t_a_l
_s_i_g_n_a_t_u_r_e_s _p_r_o_v_i_d_e_d _w_h_e_r_e _p_o_s_s_i_b_l_e _(_s_e_e _t_h_e _p_k_g___i_n_s_t_a_l_l_._c_o_n_f_(_5_)_)_, _o_r_,
_f_a_i_l_i_n_g _t_h_a_t_, _u_s_e _t_a_r_(_1_) _t_o _e_x_t_r_a_c_t _t_h_e _p_a_c_k_a_g_e _f_i_l_e_, _a_n_d _i_n_s_p_e_c_t _i_t_s
_c_o_n_t_e_n_t_s _a_n_d _s_c_r_i_p_t_s _t_o _e_n_s_u_r_e _i_t _p_o_s_e_s _n_o _d_a_n_g_e_r _t_o _y_o_u_r _s_y_s_t_e_m_'_s
_i_n_t_e_g_r_i_t_y_. _P_a_y _p_a_r_t_i_c_u_l_a_r _a_t_t_e_n_t_i_o_n _t_o _a_n_y _+_I_N_S_T_A_L_L _o_r _+_D_E_I_N_S_T_A_L_L _f_i_l_e_s_,
_a_n_d _i_n_s_p_e_c_t _t_h_e _+_C_O_N_T_E_N_T_S _f_i_l_e _f_o_r @@ccwwdd_, @@mmooddee _(_c_h_e_c_k _f_o_r _s_e_t_u_i_d_)_,
@@ddiirrrrmm_, @@eexxeecc_, _a_n_d @@uunneexxeecc _d_i_r_e_c_t_i_v_e_s_, _a_n_d_/_o_r _u_s_e _t_h_e pkg_info(_1) _c_o_m_m_a_n_d
@@ddiirrrrmm_, @@eexxeecc_, _a_n_d @@uunneexxeecc _d_i_r_e_c_t_i_v_e_s_, _a_n_d_/_o_r _u_s_e _t_h_e _p_k_g___i_n_f_o_(_1_) _c_o_m_m_a_n_d
_t_o _e_x_a_m_i_n_e _t_h_e _p_a_c_k_a_g_e _f_i_l_e_.
OOPPTTIIOONNSS
@@ -38,11 +38,11 @@ OOPPTTIIOONNSS
_p_k_g_-_n_a_m_e [_._._.]
The named packages are installed. ppkkgg__aadddd will first try to use
_p_k_g_-_n_a_m_e as full URL or path name without any wildcard process-
ing. If that fails, ppkkgg__aadddd will try to match packages using
wildcard processing. If that fails as well and _p_k_g_-_n_a_m_e does not
contain any /, the entries of the PKG_PATH variable are searched
using the wildcard processing rules.
_p_k_g_-_n_a_m_e as full URL or path name without any wildcard
processing. If that fails, ppkkgg__aadddd will try to match packages
using wildcard processing. If that fails as well and _p_k_g_-_n_a_m_e
does not contain any /, the entries of the PKG_PATH variable are
searched using the wildcard processing rules.
--AA Mark package as installed automatically, as dependency of another
package. You can use
@@ -60,24 +60,23 @@ OOPPTTIIOONNSS
--ff Force installation to proceed even if prerequisite packages are
not installed or the install script fails. Although ppkkgg__aadddd will
still try to find and auto-install missing prerequisite packages,
a failure to find one will not be fatal. This flag also over-
rides the fatal error when the operating system or architecture
the package was built on differ from that of the host.
a failure to find one will not be fatal. This flag also
overrides the fatal error when the operating system or
architecture the package was built on differ from that of the
host.
--DD Force updating even if the dependencies of depending packages are
not satisfied by the new package. This is used by "make
replace", after which one would typically replace the depending
packages.
--II If an installation script exists for a given package, do not exe-
cute it.
--II If an installation script exists for a given package, do not
execute it.
--KK _p_k_g___d_b_d_i_r
Override the value of the PKG_DBDIR configuration option with the
value _p_k_g___d_b_d_i_r.
--LL Don't add the package to any views after installation.
--mm Override the machine architecture returned by uname with _m_a_c_h_i_n_e.
--nn Don't actually install a package, just report the steps that
@@ -107,24 +106,19 @@ OOPPTTIIOONNSS
--vv Turn on verbose output.
--WW _v_i_e_w_b_a_s_e
Passed down to pkg_view(1) for managed views.
--ww _v_i_e_w
Passed down to pkg_view(1) for managed views.
One or more _p_k_g_-_n_a_m_e arguments may be specified, each being either a file
containing the package (these usually ending with the ``.tgz'' suffix) or
a URL pointing at a file available on an ftp or web site. Thus you may
extract files directly from their anonymous ftp or WWW locations (e.g.,
ppkkgg__aadddd ftp://ftp.NetBSD.org/pub/pkgsrc/pack-
ages/NetBSD/i386/3.1_2007Q2/shells/bash-3.2.9.tgz or ppkkgg__aadddd
http://www.example.org/packages/screen-4.0.tbz). Note: For ftp trans-
fers, if you wish to use _p_a_s_s_i_v_e _m_o_d_e ftp in such transfers, set the
variable _F_T_P___P_A_S_S_I_V_E___M_O_D_E to some value in your environment. Otherwise,
the more standard ACTIVE mode may be used. If ppkkgg__aadddd consistently fails
to fetch a package from a site known to work, it may be because you have
a firewall that demands the usage of _p_a_s_s_i_v_e _m_o_d_e ftp.
ppkkgg__aadddd
ftp://ftp.NetBSD.org/pub/pkgsrc/packages/NetBSD/i386/3.1_2007Q2/shells/bash-3.2.9.tgz
or ppkkgg__aadddd http://www.example.org/packages/screen-4.0.tbz). Note: For
ftp transfers, if you wish to use _p_a_s_s_i_v_e _m_o_d_e ftp in such transfers, set
the variable _F_T_P___P_A_S_S_I_V_E___M_O_D_E to some value in your environment.
Otherwise, the more standard ACTIVE mode may be used. If ppkkgg__aadddd
consistently fails to fetch a package from a site known to work, it may
be because you have a firewall that demands the usage of _p_a_s_s_i_v_e _m_o_d_e
ftp.
TTEECCHHNNIICCAALL DDEETTAAIILLSS
ppkkgg__aadddd extracts each package's meta data (including the ``packing
@@ -132,8 +126,9 @@ TTEECCHHNNIICCAALL DDEETTAAIILLSS
extract the contents of the package:
1. A check is made to determine if the package or another version
of it is already recorded as installed. If it is, installa-
tion is terminated if the --uu or --UU options are not given.
of it is already recorded as installed. If it is,
installation is terminated if the --uu or --UU options are not
given.
If the same version is installed and --UU is not given, it is
marked as manually installed and process stops. If the --uu
@@ -154,19 +149,19 @@ TTEECCHHNNIICCAALL DDEETTAAIILLSS
is overridable with the --ff flag.
3. The package build information from _+_B_U_I_L_D___I_N_F_O is then checked
for USE_ABI_DEPENDS=NO (or IGNORE_RECOMMENDED). If the pack-
age was built with ABI dependency recommendations ignored, a
warning will be issued.
for USE_ABI_DEPENDS=NO (or IGNORE_RECOMMENDED). If the
package was built with ABI dependency recommendations ignored,
a warning will be issued.
4. A check is made to determine if the package conflicts (from
@@ppkkggccffll directives, see pkg_create(1)) with an already
recorded as installed package or if an installed package con-
flicts with the package. If it is, installation is termi-
nated.
recorded as installed package or if an installed package
conflicts with the package. If it is, installation is
terminated.
5. The file list of the package is compared to the file lists of
the installed packages. If there is any overlap, the instal-
lation is terminated.
the installed packages. If there is any overlap, the
installation is terminated.
6. All package dependencies (from @@ppkkggddeepp directives, see
pkg_create(1)) are read from the packing list. If any of
@@ -186,8 +181,8 @@ TTEECCHHNNIICCAALL DDEETTAAIILLSS
If the _i_n_s_t_a_l_l script exits with a non-zero status code, the
installation is terminated.
8. The files from the file list are extracted to the chosen pre-
fix.
8. The files from the file list are extracted to the chosen
prefix.
9. If an _i_n_s_t_a_l_l script exists for the package, it is executed
with the following arguments:
@@ -204,10 +199,7 @@ TTEECCHHNNIICCAALL DDEETTAAIILLSS
pkg_delete(1). Any package dependencies are recorded in the
other packages' _+_R_E_Q_U_I_R_E_D___B_Y file.
11. If the package is a depoted package, then add it to the regis-
tered by calling pkg_view(1) accordingly.
12. Finally, if we were upgrading a package, any _+_R_E_Q_U_I_R_E_D___B_Y file
11. Finally, if we were upgrading a package, any _+_R_E_Q_U_I_R_E_D___B_Y file
that was moved aside before upgrading was started is now moved
back into place.
@@ -225,8 +217,7 @@ TTEECCHHNNIICCAALL DDEETTAAIILLSS
EENNVVIIRROONNMMEENNTT
See pkg_install.conf(5) for options, that can also be specified using the
environment. Packages using views are also affected by the environment
variables documented for pkg_view(1).
environment.
EEXXAAMMPPLLEESS
In all cases, ppkkgg__aadddd will try to install binary packages listed in
@@ -271,4 +262,4 @@ BBUUGGSS
Sure to be others.
NetBSD 5.0 June 16, 2010 NetBSD 5.0
pkgsrc December 27, 2014 pkgsrc

View File

@@ -1,4 +1,4 @@
# $NetBSD: Makefile.in,v 1.26 2013/09/12 11:03:10 jperkin Exp $
# $NetBSD: Makefile.in,v 1.27 2015/01/22 09:19:47 jperkin Exp $
srcdir= @srcdir@
@@ -28,7 +28,7 @@ PROG= pkg_admin
SCRIPTS= audit-packages download-vulnerability-list
.if empty(BOOTSTRAP)
LIBS= -linstall -lfetch
LIBS= -linstall -larchive -lfetch
.if !empty(SSL_SUPPORT)
LIBS+= -lssl -lcrypto
CFLAGS+= -DHAVE_SSL

View File

@@ -1,4 +1,4 @@
/* $NetBSD: main.c,v 1.62 2013/08/03 11:45:14 obache Exp $ */
/* $NetBSD: main.c,v 1.64 2015/01/02 14:26:16 wiz 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.62 2013/08/03 11:45:14 obache Exp $");
__RCSID("$NetBSD: main.c,v 1.64 2015/01/02 14:26:16 wiz Exp $");
/*-
* Copyright (c) 1999-2009 The NetBSD Foundation, Inc.
@@ -104,7 +104,6 @@ usage(void)
" rebuild-tree - rebuild +REQUIRED_BY files from forward deps\n"
" check [pkg ...] - check md5 checksum of installed files\n"
" add pkg ... - add pkg files to database\n"
" delete pkg ... - delete file entries for pkg in database\n"
" set variable=value pkg ... - set installation variable for package\n"
" unset variable pkg ... - unset installation variable for package\n"
" lsall /path/to/pkgpattern - list all pkgs matching the pattern\n"
@@ -220,15 +219,6 @@ add_pkg(const char *pkgdir, void *vp)
return 0;
}
static void
delete1pkg(const char *pkgdir)
{
if (!pkgdb_open(ReadWrite))
err(EXIT_FAILURE, "cannot open pkgdb");
(void) pkgdb_remove_pkg(pkgdir);
pkgdb_close();
}
static void
rebuild(void)
{
@@ -525,12 +515,6 @@ main(int argc, char *argv[])
for (++argv; *argv != NULL; ++argv)
add_pkg(*argv, &count);
} else if (strcasecmp(argv[0], "delete") == 0) {
argv++; /* "delete" */
while (*argv != NULL) {
delete1pkg(*argv);
argv++;
}
} else if (strcasecmp(argv[0], "set") == 0) {
argv++; /* "set" */
set_unset_variable(argv, FALSE);

View File

@@ -1,4 +1,4 @@
.\" $NetBSD: pkg_admin.1,v 1.33 2012/12/17 04:34:02 agc Exp $
.\" $NetBSD: pkg_admin.1,v 1.34 2014/12/30 15:13:20 wiz Exp $
.\"
.\" Copyright (c) 1999-2010 The NetBSD Foundation, Inc.
.\" All rights reserved.
@@ -34,7 +34,7 @@
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
.\" POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd December 14, 2012
.Dd December 27, 2014
.Dt PKG_ADMIN 1
.Os
.Sh NAME
@@ -106,13 +106,6 @@ Be more verbose.
.Pp
The following commands are supported:
.Bl -tag -width indent
.It Cm add Ar pkg ...
For each listed package, write the absolute pathnames of the files listed in
its
.Pa +CONTENTS
file together with the package they belong to into the package database.
This should be used only by
.Xr pkg_view 1 .
.It Cm audit Oo Fl es Oc Oo Fl t Ar type Oc Oo Ar pkg Oc ...
Check the listed installed packages for vulnerabilities.
If no package is given, check all installed packages.
@@ -187,11 +180,6 @@ otherwise it exits with error.
Print the current value of
.Ar variable
as used after parsing the configuration file.
.It Cm delete Ar pkg ...
For each listed package, remove all file entries in the package database that
belong to the package.
This should be used only by
.Xr pkg_view 1 .
.It Cm dump
Dump the contents of the package database, similar to
.Cm pkg_info -F .
@@ -310,7 +298,6 @@ for options, that can also be specified using the environment.
.Xr pkg_create 1 ,
.Xr pkg_delete 1 ,
.Xr pkg_info 1 ,
.Xr pkg_view 1 ,
.Xr pkg_install.conf 5 ,
.Xr pkgsrc 7
.Sh HISTORY

View File

@@ -1,4 +1,4 @@
PKG_ADMIN(1) NetBSD General Commands Manual PKG_ADMIN(1)
PKG_ADMIN(1) General Commands Manual PKG_ADMIN(1)
NNAAMMEE
ppkkgg__aaddmmiinn -- perform various administrative tasks to the pkg system
@@ -47,18 +47,12 @@ OOPPTTIIOONNSS
The following commands are supported:
aadddd _p_k_g _._._.
For each listed package, write the absolute pathnames of the
files listed in its _+_C_O_N_T_E_N_T_S file together with the package they
belong to into the package database. This should be used only by
pkg_view(1).
aauuddiitt [--eess] [--tt _t_y_p_e] [_p_k_g] ...
Check the listed installed packages for vulnerabilities. If no
package is given, check all installed packages. If --ee is given,
override the CHECK_END_OF_LIFE option from pkg_install.conf(5)
with "yes". If --ss is given, check the signature of the pkg-vul-
nerabilities file before using it. --tt restricts the reported
with "yes". If --ss is given, check the signature of the pkg-
vulnerabilities file before using it. --tt restricts the reported
vulnerabilities to type _t_y_p_e.
aauuddiitt--ppkkgg [--eess] [--tt _t_y_p_e] [_p_k_g] ...
@@ -76,10 +70,10 @@ OOPPTTIIOONNSS
the packages installed on the local machine against the checksum
which was recorded in the _+_C_O_N_T_E_N_T_S files at package installation
time. Symbolic links also have their integrity checked against
the recorded value at package installation time. If no addi-
tional argument is given, the files of all installed packages are
checked, else only the named packages will be checked (wildcards
can be used here, see pkg_info(1)).
the recorded value at package installation time. If no
additional argument is given, the files of all installed packages
are checked, else only the named packages will be checked
(wildcards can be used here, see pkg_info(1)).
The packages' _+_C_O_N_T_E_N_T_S files will be parsed and the checksum
will be checked for every file found. A warning message is
@@ -90,8 +84,8 @@ OOPPTTIIOONNSS
cchheecckk--lliicceennssee _c_o_n_d_i_t_i_o_n
Check if _c_o_n_d_i_t_i_o_n can be fulfilled with the currently set of
accepted licenses. Prints either yes or no to stdout if the con-
dition can be parsed, otherwise it exits with error.
accepted licenses. Prints either yes or no to stdout if the
condition can be parsed, otherwise it exits with error.
cchheecckk--ppkkgg--vvuullnneerraabbiilliittiieess [--ss] _f_i_l_e
Check format and hashes in the pkg-vulnerabilities file _f_i_l_e. If
@@ -109,11 +103,6 @@ OOPPTTIIOONNSS
Print the current value of _v_a_r_i_a_b_l_e as used after parsing the
configuration file.
ddeelleettee _p_k_g _._._.
For each listed package, remove all file entries in the package
database that belong to the package. This should be used only by
pkg_view(1).
dduummpp Dump the contents of the package database, similar to ppkkgg__iinnffoo
--FF. Columns are printed for the key field used in the pkgdb -
the filename -, and the data field - the package the file belongs
@@ -129,19 +118,19 @@ OOPPTTIIOONNSS
ffiinnddbbeesstt _p_a_t_t_e_r_n _._._.
Search the entries of PKG_PATH for packages matching _p_a_t_t_e_r_n.
Print the URL of the best matching package to stdout for each
pattern. If a pattern is not matched, it is skipped and the com-
mand will return a failure.
pattern. If a pattern is not matched, it is skipped and the
command will return a failure.
llssaallll _/_d_i_r_/_p_k_g_p_a_t_t_e_r_n
llssbbeesstt _/_d_i_r_/_p_k_g_p_a_t_t_e_r_n
List all/best package matching pattern in the given directory
_/_d_i_r. If the --dd flag is given, then that directory path over-
rides _/_d_i_r. Can be used to work around limitations of /bin/sh
and other filename globbing mechanisms. This option implements
matching of pkg-wildcards against arbitrary files and directo-
ries, useful mainly in the build system itself. See pkg_info(1)
for a description of the pattern.
_/_d_i_r. If the --dd flag is given, then that directory path
overrides _/_d_i_r. Can be used to work around limitations of
/bin/sh and other filename globbing mechanisms. This option
implements matching of pkg-wildcards against arbitrary files and
directories, useful mainly in the build system itself. See
pkg_info(1) for a description of the pattern.
Example:
@@ -166,8 +155,9 @@ OOPPTTIIOONNSS
Returns true if _p_k_g matches _p_a_t_t_e_r_n, otherwise returns false.
rreebbuuiilldd
Rebuild the package database mapping from scratch. This option
is only intended for recovery after system crashes during package
Rebuild the package database mapping from scratch, using the
_+_C_O_N_T_E_N_T_S files of the installed packages. This option is only
intended for recovery after system crashes during package
installation and removal.
rreebbuuiilldd--ttrreeee
@@ -201,11 +191,11 @@ EENNVVIIRROONNMMEENNTT
environment.
FFIILLEESS
/var/db/pkg/pkgdb.byfile.db
/var/db/pkg/<pkg>/+CONTENTS
_/_v_a_r_/_d_b_/_p_k_g_/_p_k_g_d_b_._b_y_f_i_l_e_._d_b
_/_v_a_r_/_d_b_/_p_k_g_/_<_p_k_g_>_/_+_C_O_N_T_E_N_T_S
SSEEEE AALLSSOO
pkg_add(1), pkg_create(1), pkg_delete(1), pkg_info(1), pkg_view(1),
pkg_add(1), pkg_create(1), pkg_delete(1), pkg_info(1),
pkg_install.conf(5), pkgsrc(7)
HHIISSTTOORRYY
@@ -214,4 +204,4 @@ HHIISSTTOORRYY
AAUUTTHHOORRSS
The ppkkgg__aaddmmiinn command was written by Hubert Feyrer.
NetBSD 5.0 January 22, 2010 NetBSD 5.0
pkgsrc December 27, 2014 pkgsrc

View File

@@ -1,13 +1,11 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.68 for pkg_install 20090911.
# Generated by GNU Autoconf 2.69 for pkg_install 20090911.
#
# Report bugs to <joerg@NetBSD.org>.
#
#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
# Foundation, Inc.
# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
#
#
# This configure script is free software; the Free Software Foundation
@@ -136,6 +134,31 @@ export LANGUAGE
# CDPATH.
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
# Use a proper internal environment variable to ensure we don't fall
# into an infinite loop, continuously re-executing ourselves.
if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
_as_can_reexec=no; export _as_can_reexec;
# We cannot yet assume a decent shell, so we have to provide a
# neutralization value for shells without unset; and this also
# works around shells that cannot unset nonexistent variables.
# Preserve -v and -x to the replacement shell.
BASH_ENV=/dev/null
ENV=/dev/null
(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
case $- in # ((((
*v*x* | *x*v* ) as_opts=-vx ;;
*v* ) as_opts=-v ;;
*x* ) as_opts=-x ;;
* ) as_opts= ;;
esac
exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
# Admittedly, this is quite paranoid, since all the known shells bail
# out after a failed `exec'.
$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
as_fn_exit 255
fi
# We don't want this to propagate to other subprocesses.
{ _as_can_reexec=; unset _as_can_reexec;}
if test "x$CONFIG_SHELL" = x; then
as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
emulate sh
@@ -169,7 +192,8 @@ if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
else
exitcode=1; echo positional parameters were not saved.
fi
test x\$exitcode = x0 || exit 1"
test x\$exitcode = x0 || exit 1
test -x / || exit 1"
as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
@@ -214,21 +238,25 @@ IFS=$as_save_IFS
if test "x$CONFIG_SHELL" != x; then :
# We cannot yet assume a decent shell, so we have to provide a
# neutralization value for shells without unset; and this also
# works around shells that cannot unset nonexistent variables.
# Preserve -v and -x to the replacement shell.
BASH_ENV=/dev/null
ENV=/dev/null
(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
export CONFIG_SHELL
case $- in # ((((
*v*x* | *x*v* ) as_opts=-vx ;;
*v* ) as_opts=-v ;;
*x* ) as_opts=-x ;;
* ) as_opts= ;;
esac
exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"}
export CONFIG_SHELL
# We cannot yet assume a decent shell, so we have to provide a
# neutralization value for shells without unset; and this also
# works around shells that cannot unset nonexistent variables.
# Preserve -v and -x to the replacement shell.
BASH_ENV=/dev/null
ENV=/dev/null
(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
case $- in # ((((
*v*x* | *x*v* ) as_opts=-vx ;;
*v* ) as_opts=-v ;;
*x* ) as_opts=-x ;;
* ) as_opts= ;;
esac
exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
# Admittedly, this is quite paranoid, since all the known shells bail
# out after a failed `exec'.
$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
exit 255
fi
if test x$as_have_required = xno; then :
@@ -331,6 +359,14 @@ $as_echo X"$as_dir" |
} # as_fn_mkdir_p
# as_fn_executable_p FILE
# -----------------------
# Test if FILE is an executable regular file.
as_fn_executable_p ()
{
test -f "$1" && test -x "$1"
} # as_fn_executable_p
# as_fn_append VAR VALUE
# ----------------------
# Append the text in VALUE to the end of the definition contained in VAR. Take
@@ -452,6 +488,10 @@ as_cr_alnum=$as_cr_Letters$as_cr_digits
chmod +x "$as_me.lineno" ||
{ $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
# If we had to re-execute with $CONFIG_SHELL, we're ensured to have
# already done that, so ensure we don't try to do so again and fall
# in an infinite loop. This has already happened in practice.
_as_can_reexec=no; export _as_can_reexec
# Don't try to exec as it changes $[0], causing all sort of problems
# (the dirname of $[0] is not the place where we might find the
# original and so on. Autoconf is especially sensitive to this).
@@ -486,16 +526,16 @@ if (echo >conf$$.file) 2>/dev/null; then
# ... but there are two gotchas:
# 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
# 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
# In both cases, we have to default to `cp -p'.
# In both cases, we have to default to `cp -pR'.
ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
as_ln_s='cp -p'
as_ln_s='cp -pR'
elif ln conf$$.file conf$$ 2>/dev/null; then
as_ln_s=ln
else
as_ln_s='cp -p'
as_ln_s='cp -pR'
fi
else
as_ln_s='cp -p'
as_ln_s='cp -pR'
fi
rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
rmdir conf$$.dir 2>/dev/null
@@ -507,28 +547,8 @@ else
as_mkdir_p=false
fi
if test -x / >/dev/null 2>&1; then
as_test_x='test -x'
else
if ls -dL / >/dev/null 2>&1; then
as_ls_L_option=L
else
as_ls_L_option=
fi
as_test_x='
eval sh -c '\''
if test -d "$1"; then
test -d "$1/.";
else
case $1 in #(
-*)set "./$1";;
esac;
case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
???[sx]*):;;*)false;;esac;fi
'\'' sh
'
fi
as_executable_p=$as_test_x
as_test_x='test -x'
as_executable_p=as_fn_executable_p
# Sed expression to map a string onto a valid CPP name.
as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
@@ -694,6 +714,7 @@ enable_option_checking
with_pkgdbdir
with_ssl
enable_bootstrap
enable_largefile
'
ac_precious_vars='build_alias
host_alias
@@ -1159,8 +1180,6 @@ target=$target_alias
if test "x$host_alias" != x; then
if test "x$build_alias" = x; then
cross_compiling=maybe
$as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
If a cross compiler is detected then cross compile mode will be used" >&2
elif test "x$build_alias" != "x$host_alias"; then
cross_compiling=yes
fi
@@ -1320,6 +1339,7 @@ Optional Features:
--disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
--enable-FEATURE[=ARG] include FEATURE [ARG=yes]
--enable-bootstrap build minimal version of pkg_install
--disable-largefile omit support for large files
Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
@@ -1404,9 +1424,9 @@ test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
pkg_install configure 20090911
generated by GNU Autoconf 2.68
generated by GNU Autoconf 2.69
Copyright (C) 2010 Free Software Foundation, Inc.
Copyright (C) 2012 Free Software Foundation, Inc.
This configure script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it.
_ACEOF
@@ -1747,7 +1767,8 @@ int
main ()
{
static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)];
test_array [0] = 0
test_array [0] = 0;
return test_array [0];
;
return 0;
@@ -1793,7 +1814,8 @@ int
main ()
{
static int test_array [1 - 2 * !(($2) >= 0)];
test_array [0] = 0
test_array [0] = 0;
return test_array [0];
;
return 0;
@@ -1809,7 +1831,8 @@ int
main ()
{
static int test_array [1 - 2 * !(($2) <= $ac_mid)];
test_array [0] = 0
test_array [0] = 0;
return test_array [0];
;
return 0;
@@ -1835,7 +1858,8 @@ int
main ()
{
static int test_array [1 - 2 * !(($2) < 0)];
test_array [0] = 0
test_array [0] = 0;
return test_array [0];
;
return 0;
@@ -1851,7 +1875,8 @@ int
main ()
{
static int test_array [1 - 2 * !(($2) >= $ac_mid)];
test_array [0] = 0
test_array [0] = 0;
return test_array [0];
;
return 0;
@@ -1885,7 +1910,8 @@ int
main ()
{
static int test_array [1 - 2 * !(($2) <= $ac_mid)];
test_array [0] = 0
test_array [0] = 0;
return test_array [0];
;
return 0;
@@ -1958,7 +1984,7 @@ This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by pkg_install $as_me 20090911, which was
generated by GNU Autoconf 2.68. Invocation command line was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
@@ -2467,7 +2493,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_CC="${ac_tool_prefix}gcc"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -2507,7 +2533,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_CC="gcc"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -2560,7 +2586,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_CC="${ac_tool_prefix}cc"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -2601,7 +2627,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
ac_prog_rejected=yes
continue
@@ -2659,7 +2685,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -2703,7 +2729,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_CC="$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -3149,8 +3175,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <stdarg.h>
#include <stdio.h>
#include <sys/types.h>
#include <sys/stat.h>
struct stat;
/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
struct buf { int x; };
FILE * (*rcsopen) (struct buf *, struct stat *, int);
@@ -3272,7 +3297,7 @@ case $as_dir/ in #((
# by default.
for ac_prog in ginstall scoinst install; do
for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
if test $ac_prog = install &&
grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
# AIX install. It has an incompatible calling convention.
@@ -3356,7 +3381,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -3396,7 +3421,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_RANLIB="ranlib"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -3447,7 +3472,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_AR="ar"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -3487,7 +3512,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -3527,7 +3552,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -3567,7 +3592,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -3607,7 +3632,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_ENV="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -3647,7 +3672,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -3687,7 +3712,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_GREP="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -3727,7 +3752,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -3767,7 +3792,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -3807,7 +3832,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -3847,7 +3872,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -3887,7 +3912,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -3927,7 +3952,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -3967,7 +3992,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -4025,6 +4050,208 @@ fi
# Check whether --enable-largefile was given.
if test "${enable_largefile+set}" = set; then :
enableval=$enable_largefile;
fi
if test "$enable_largefile" != no; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
$as_echo_n "checking for special C compiler options needed for large files... " >&6; }
if ${ac_cv_sys_largefile_CC+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_cv_sys_largefile_CC=no
if test "$GCC" != yes; then
ac_save_CC=$CC
while :; do
# IRIX 6.2 and later do not support large files by default,
# so use the C compiler's -n32 option if that helps.
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <sys/types.h>
/* Check that off_t can represent 2**63 - 1 correctly.
We can't simply define LARGE_OFF_T to be 9223372036854775807,
since some C++ compilers masquerading as C compilers
incorrectly reject 9223372036854775807. */
#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
&& LARGE_OFF_T % 2147483647 == 1)
? 1 : -1];
int
main ()
{
;
return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
break
fi
rm -f core conftest.err conftest.$ac_objext
CC="$CC -n32"
if ac_fn_c_try_compile "$LINENO"; then :
ac_cv_sys_largefile_CC=' -n32'; break
fi
rm -f core conftest.err conftest.$ac_objext
break
done
CC=$ac_save_CC
rm -f conftest.$ac_ext
fi
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
$as_echo "$ac_cv_sys_largefile_CC" >&6; }
if test "$ac_cv_sys_largefile_CC" != no; then
CC=$CC$ac_cv_sys_largefile_CC
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
if ${ac_cv_sys_file_offset_bits+:} false; then :
$as_echo_n "(cached) " >&6
else
while :; do
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <sys/types.h>
/* Check that off_t can represent 2**63 - 1 correctly.
We can't simply define LARGE_OFF_T to be 9223372036854775807,
since some C++ compilers masquerading as C compilers
incorrectly reject 9223372036854775807. */
#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
&& LARGE_OFF_T % 2147483647 == 1)
? 1 : -1];
int
main ()
{
;
return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
ac_cv_sys_file_offset_bits=no; break
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#define _FILE_OFFSET_BITS 64
#include <sys/types.h>
/* Check that off_t can represent 2**63 - 1 correctly.
We can't simply define LARGE_OFF_T to be 9223372036854775807,
since some C++ compilers masquerading as C compilers
incorrectly reject 9223372036854775807. */
#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
&& LARGE_OFF_T % 2147483647 == 1)
? 1 : -1];
int
main ()
{
;
return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
ac_cv_sys_file_offset_bits=64; break
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ac_cv_sys_file_offset_bits=unknown
break
done
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
$as_echo "$ac_cv_sys_file_offset_bits" >&6; }
case $ac_cv_sys_file_offset_bits in #(
no | unknown) ;;
*)
cat >>confdefs.h <<_ACEOF
#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
_ACEOF
;;
esac
rm -rf conftest*
if test $ac_cv_sys_file_offset_bits = unknown; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
if ${ac_cv_sys_large_files+:} false; then :
$as_echo_n "(cached) " >&6
else
while :; do
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <sys/types.h>
/* Check that off_t can represent 2**63 - 1 correctly.
We can't simply define LARGE_OFF_T to be 9223372036854775807,
since some C++ compilers masquerading as C compilers
incorrectly reject 9223372036854775807. */
#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
&& LARGE_OFF_T % 2147483647 == 1)
? 1 : -1];
int
main ()
{
;
return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
ac_cv_sys_large_files=no; break
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#define _LARGE_FILES 1
#include <sys/types.h>
/* Check that off_t can represent 2**63 - 1 correctly.
We can't simply define LARGE_OFF_T to be 9223372036854775807,
since some C++ compilers masquerading as C compilers
incorrectly reject 9223372036854775807. */
#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
&& LARGE_OFF_T % 2147483647 == 1)
? 1 : -1];
int
main ()
{
;
return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
ac_cv_sys_large_files=1; break
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ac_cv_sys_large_files=unknown
break
done
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
$as_echo "$ac_cv_sys_large_files" >&6; }
case $ac_cv_sys_large_files in #(
no | unknown) ;;
*)
cat >>confdefs.h <<_ACEOF
#define _LARGE_FILES $ac_cv_sys_large_files
_ACEOF
;;
esac
rm -rf conftest*
fi
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __db185_open in -ldb" >&5
$as_echo_n "checking for __db185_open in -ldb... " >&6; }
if ${ac_cv_lib_db___db185_open+:} false; then :
@@ -4101,7 +4328,6 @@ for ac_lib in '' db db1; do
LIBS="-l$ac_lib $ac_func_search_save_LIBS"
fi
# ac_fn_c_try_link LINENO
# -----------------------
# Try to link conftest.$ac_ext, and return whether this succeeded.
@@ -4129,7 +4355,7 @@ $as_echo "$ac_try_echo"; } >&5
test ! -s conftest.err
} && test -s conftest$ac_exeext && {
test "$cross_compiling" = yes ||
$as_test_x conftest$ac_exeext
test -x conftest$ac_exeext
}; then :
ac_retval=0
else
@@ -4329,7 +4555,7 @@ do
for ac_prog in grep ggrep; do
for ac_exec_ext in '' $ac_executable_extensions; do
ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
{ test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
as_fn_executable_p "$ac_path_GREP" || continue
# Check for GNU ac_path_GREP and select it if it is found.
# Check for GNU $ac_path_GREP
case `"$ac_path_GREP" --version 2>&1` in
@@ -4395,7 +4621,7 @@ do
for ac_prog in egrep; do
for ac_exec_ext in '' $ac_executable_extensions; do
ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
{ test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
as_fn_executable_p "$ac_path_EGREP" || continue
# Check for GNU ac_path_EGREP and select it if it is found.
# Check for GNU $ac_path_EGREP
case `"$ac_path_EGREP" --version 2>&1` in
@@ -5465,16 +5691,16 @@ if (echo >conf$$.file) 2>/dev/null; then
# ... but there are two gotchas:
# 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
# 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
# In both cases, we have to default to `cp -p'.
# In both cases, we have to default to `cp -pR'.
ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
as_ln_s='cp -p'
as_ln_s='cp -pR'
elif ln conf$$.file conf$$ 2>/dev/null; then
as_ln_s=ln
else
as_ln_s='cp -p'
as_ln_s='cp -pR'
fi
else
as_ln_s='cp -p'
as_ln_s='cp -pR'
fi
rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
rmdir conf$$.dir 2>/dev/null
@@ -5534,28 +5760,16 @@ else
as_mkdir_p=false
fi
if test -x / >/dev/null 2>&1; then
as_test_x='test -x'
else
if ls -dL / >/dev/null 2>&1; then
as_ls_L_option=L
else
as_ls_L_option=
fi
as_test_x='
eval sh -c '\''
if test -d "$1"; then
test -d "$1/.";
else
case $1 in #(
-*)set "./$1";;
esac;
case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
???[sx]*):;;*)false;;esac;fi
'\'' sh
'
fi
as_executable_p=$as_test_x
# as_fn_executable_p FILE
# -----------------------
# Test if FILE is an executable regular file.
as_fn_executable_p ()
{
test -f "$1" && test -x "$1"
} # as_fn_executable_p
as_test_x='test -x'
as_executable_p=as_fn_executable_p
# Sed expression to map a string onto a valid CPP name.
as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
@@ -5577,7 +5791,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# values after options handling.
ac_log="
This file was extended by pkg_install $as_me 20090911, which was
generated by GNU Autoconf 2.68. Invocation command line was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
CONFIG_HEADERS = $CONFIG_HEADERS
@@ -5639,10 +5853,10 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
pkg_install config.status 20090911
configured by $0, generated by GNU Autoconf 2.68,
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
Copyright (C) 2010 Free Software Foundation, Inc.
Copyright (C) 2012 Free Software Foundation, Inc.
This config.status script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it."
@@ -5731,7 +5945,7 @@ fi
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
if \$ac_cs_recheck; then
set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
shift
\$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
CONFIG_SHELL='$SHELL'

View File

@@ -1,4 +1,4 @@
dnl $NetBSD: configure.ac,v 1.38 2013/08/03 11:45:14 obache Exp $
dnl $NetBSD: configure.ac,v 1.39 2015/01/22 18:15:39 pho Exp $
dnl Process this file with autoconf to produce a configure script.
AC_PREREQ(2.52)
AC_INIT([pkg_install], [20090911], [joerg@NetBSD.org])
@@ -56,6 +56,9 @@ AC_ARG_ENABLE([bootstrap],
AC_SUBST(bootstrap)
dnl Checks for large file support.
AC_SYS_LARGEFILE
dnl Checks for libraries.
AC_CHECK_LIB(db, __db185_open, , AC_SEARCH_LIBS(dbopen, [db db1]))

View File

@@ -1,4 +1,4 @@
# $NetBSD: Makefile.in,v 1.24 2013/09/12 11:03:10 jperkin Exp $
# $NetBSD: Makefile.in,v 1.25 2015/01/22 09:19:47 jperkin Exp $
srcdir= @srcdir@
@@ -26,7 +26,7 @@ PROG= pkg_create
SSL_SUPPORT= @ssl_support@
.if empty(BOOTSTRAP)
LIBS= -linstall -lfetch @LIBS@
LIBS= -linstall -larchive -lfetch @LIBS@
.if !empty(SSL_SUPPORT)
LIBS+= -lssl -lcrypto
.endif

View File

@@ -1,4 +1,4 @@
/* $NetBSD: build.c,v 1.15 2010/04/20 00:39:13 joerg Exp $ */
/* $NetBSD: build.c,v 1.16 2014/12/30 15:13:20 wiz Exp $ */
#if HAVE_CONFIG_H
#include "config.h"
@@ -7,7 +7,7 @@
#if HAVE_SYS_CDEFS_H
#include <sys/cdefs.h>
#endif
__RCSID("$NetBSD: build.c,v 1.15 2010/04/20 00:39:13 joerg Exp $");
__RCSID("$NetBSD: build.c,v 1.16 2014/12/30 15:13:20 wiz Exp $");
/*-
* Copyright (c) 2007 Joerg Sonnenberger <joerg@NetBSD.org>.
@@ -93,7 +93,6 @@ static struct memory_file *build_info_file;
static struct memory_file *size_pkg_file;
static struct memory_file *size_all_file;
static struct memory_file *preserve_file;
static struct memory_file *views_file;
static void
write_meta_file(struct memory_file *file, struct archive *archive)
@@ -292,8 +291,6 @@ make_dist(const char *pkg, const char *suffix, const package_t *plist)
write_meta_file(size_all_file, archive);
if (Preserve)
write_meta_file(preserve_file, archive);
if (create_views)
write_meta_file(views_file, archive);
initial_cwd = getcwd(NULL, 0);
@@ -407,8 +404,6 @@ pkg_build(const char *pkg, const char *full_pkg, const char *suffix,
preserve_file = load_and_add(plist, Preserve,
PRESERVE_FNAME, 0444);
}
if (create_views)
views_file = make_and_add(plist, VIEWS_FNAME, xstrdup(""), 0444);
/* Finally, write out the packing list */
stringify_plist(plist, &plist_buf, &plist_len, realprefix);

View File

@@ -1,4 +1,4 @@
/* $NetBSD: create.h,v 1.14 2009/11/05 16:22:32 joerg Exp $ */
/* $NetBSD: create.h,v 1.15 2014/12/30 15:13:20 wiz Exp $ */
/* from FreeBSD Id: create.h,v 1.13 1997/10/08 07:46:19 charnier Exp */
@@ -58,7 +58,6 @@ extern const char *CompressionType;
extern int PlistOnly;
extern int RelativeLinks;
extern int update_pkgdb;
extern int create_views;
void check_list(package_t *, const char *);
void copy_plist(char *, package_t *);

View File

@@ -1,4 +1,4 @@
/* $NetBSD: main.c,v 1.19 2010/01/22 13:30:41 joerg Exp $ */
/* $NetBSD: main.c,v 1.20 2014/12/30 15:13:20 wiz 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.19 2010/01/22 13:30:41 joerg Exp $");
__RCSID("$NetBSD: main.c,v 1.20 2014/12/30 15:13:20 wiz Exp $");
/*
* FreeBSD install - a package for the installation and maintainance
@@ -26,7 +26,7 @@ __RCSID("$NetBSD: main.c,v 1.19 2010/01/22 13:30:41 joerg Exp $");
#include "lib.h"
#include "create.h"
static const char Options[] = "B:C:D:EF:I:K:L:OP:S:T:UVb:c:d:f:g:i:k:ln:p:r:s:u:v";
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;
char *Comment = NULL;
@@ -48,7 +48,6 @@ char *DefaultGroup = NULL;
char *realprefix = NULL;
const char *CompressionType = NULL;
int update_pkgdb = 1;
int create_views = 0;
int PlistOnly = 0;
int RelativeLinks = 0;
Boolean File2Pkg = FALSE;
@@ -57,7 +56,7 @@ static void
usage(void)
{
fprintf(stderr,
"usage: pkg_create [-ElOUVv] [-B build-info-file] [-b build-version-file]\n"
"usage: pkg_create [-lOUVv] [-B build-info-file] [-b build-version-file]\n"
" [-C cpkgs] [-D displayfile] [-F compression] \n"
" [-I realprefix] [-i iscript]\n"
" [-K pkg_dbdir] [-k dscript]\n"
@@ -81,10 +80,6 @@ main(int argc, char **argv)
Verbose = TRUE;
break;
case 'E':
create_views = 1;
break;
case 'F':
CompressionType = optarg;
break;

View File

@@ -1,4 +1,4 @@
.\" $NetBSD: pkg_create.1,v 1.25 2010/04/20 00:39:13 joerg Exp $
.\" $NetBSD: pkg_create.1,v 1.26 2014/12/30 15:13:20 wiz Exp $
.\"
.\" FreeBSD install - a package for the installation and maintenance
.\" of non-core utilities.
@@ -24,7 +24,7 @@
.\" [jkh] Took John's changes back and made some additional extensions for
.\" better integration with FreeBSD's new ports collection.
.\"
.Dd January 20, 2010
.Dd December 27, 2014
.Dt PKG_CREATE 1
.Os
.Sh NAME
@@ -32,70 +32,28 @@
.Nd a utility for creating software package distributions
.Sh SYNOPSIS
.Nm
.Op Fl ElOUVv
.Bk -words
.Op Fl lOUVv
.Op Fl B Ar build-info-file
.Ek
.Bk -words
.Op Fl b Ar build-version-file
.Ek
.Bk -words
.Op Fl C Ar cpkgs
.Ek
.Bk -words
.Op Fl D Ar displayfile
.Ek
.Bk -words
.Op Fl F Ar compression
.Ek
.Bk -words
.Op Fl g Ar group
.Ek
.Bk -words
.Op Fl I Ar realprefix
.Ek
.Bk -words
.Op Fl i Ar iscript
.Ek
.Bk -words
.Op Fl K Ar pkg_dbdir
.Ek
.Bk -words
.Op Fl k Ar dscript
.Ek
.Bk -words
.Op Fl n Ar preserve-file
.Ek
.Bk -words
.Op Fl P Ar dpkgs
.Ek
.Bk -words
.Op Fl T Ar buildpkgs
.Ek
.Bk -words
.Op Fl p Ar prefix
.Ek
.Bk -words
.Op Fl S Ar size-all-file
.Ek
.Bk -words
.Op Fl s Ar size-pkg-file
.Ek
.Bk -words
.Op Fl T Ar buildpkgs
.Op Fl t Ar template
.Ek
.Bk -words
.Op Fl u Ar owner
.Ek
.Bk -words
.Fl c Ar comment
.Ek
.Bk -words
.Fl d Ar description
.Ek
.Bk -words
.Fl f Ar packlist
.Ek
.Ar pkg-name
.Sh DESCRIPTION
The
@@ -158,8 +116,6 @@ Fetch long description for package from file
or, if preceded by
.Cm - ,
the argument itself.
.It Fl E
Add an empty views file to the package.
.It Fl F Ar compression
Use
.Ar compression

View File

@@ -1,14 +1,14 @@
PKG_CREATE(1) NetBSD General Commands Manual PKG_CREATE(1)
PKG_CREATE(1) General Commands Manual PKG_CREATE(1)
NNAAMMEE
ppkkgg__ccrreeaattee -- a utility for creating software package distributions
SSYYNNOOPPSSIISS
ppkkgg__ccrreeaattee [--EEllOOUUVVvv] [--BB _b_u_i_l_d_-_i_n_f_o_-_f_i_l_e] [--bb _b_u_i_l_d_-_v_e_r_s_i_o_n_-_f_i_l_e]
ppkkgg__ccrreeaattee [--llOOUUVVvv] [--BB _b_u_i_l_d_-_i_n_f_o_-_f_i_l_e] [--bb _b_u_i_l_d_-_v_e_r_s_i_o_n_-_f_i_l_e]
[--CC _c_p_k_g_s] [--DD _d_i_s_p_l_a_y_f_i_l_e] [--FF _c_o_m_p_r_e_s_s_i_o_n] [--gg _g_r_o_u_p]
[--II _r_e_a_l_p_r_e_f_i_x] [--ii _i_s_c_r_i_p_t] [--KK _p_k_g___d_b_d_i_r] [--kk _d_s_c_r_i_p_t]
[--nn _p_r_e_s_e_r_v_e_-_f_i_l_e] [--PP _d_p_k_g_s] [--TT _b_u_i_l_d_p_k_g_s] [--pp _p_r_e_f_i_x]
[--SS _s_i_z_e_-_a_l_l_-_f_i_l_e] [--ss _s_i_z_e_-_p_k_g_-_f_i_l_e] [--tt _t_e_m_p_l_a_t_e] [--uu _o_w_n_e_r]
[--nn _p_r_e_s_e_r_v_e_-_f_i_l_e] [--PP _d_p_k_g_s] [--pp _p_r_e_f_i_x] [--SS _s_i_z_e_-_a_l_l_-_f_i_l_e]
[--ss _s_i_z_e_-_p_k_g_-_f_i_l_e] [--TT _b_u_i_l_d_p_k_g_s] [--tt _t_e_m_p_l_a_t_e] [--uu _o_w_n_e_r]
--cc _c_o_m_m_e_n_t --dd _d_e_s_c_r_i_p_t_i_o_n --ff _p_a_c_k_l_i_s_t _p_k_g_-_n_a_m_e
DDEESSCCRRIIPPTTIIOONN
@@ -17,8 +17,8 @@ DDEESSCCRRIIPPTTIIOONN
description and command line arguments for the creation of a package are
not really meant to be human-generated, though it is easy enough to do
so. It is more expected that you will use a front-end tool for the job
rather than muddling through it yourself. Nonetheless, a short descrip-
tion of the input syntax is included in this document.
rather than muddling through it yourself. Nonetheless, a short
description of the input syntax is included in this document.
OOPPTTIIOONNSS
The following command line options are supported:
@@ -26,28 +26,28 @@ OOPPTTIIOONNSS
--BB _b_u_i_l_d_-_i_n_f_o_-_f_i_l_e
Install the file _b_u_i_l_d_-_i_n_f_o_-_f_i_l_e so that users of binary packages
can see what make(1) definitions were used to control the build
when creating the binary package. This allows various build def-
initions to be retained in a binary package and viewed wherever
it is installed, using pkg_info(1).
when creating the binary package. This allows various build
definitions to be retained in a binary package and viewed
wherever it is installed, using pkg_info(1).
--bb _b_u_i_l_d_-_v_e_r_s_i_o_n_-_f_i_l_e
Install the file _b_u_i_l_d_-_v_e_r_s_i_o_n_-_f_i_l_e so that users of binary pack-
ages can see what versions of the files used to control the build
were used when creating the binary package. This allows some
fine-grained version control information to be retained in a
Install the file _b_u_i_l_d_-_v_e_r_s_i_o_n_-_f_i_l_e so that users of binary
packages can see what versions of the files used to control the
build were used when creating the binary package. This allows
some fine-grained version control information to be retained in a
binary package and viewed wherever it is installed, using
pkg_info(1).
--CC _c_p_k_g_s
Set the initial package conflict list to _c_p_k_g_s. This is assumed
to be a whitespace separated list of package names and is meant
as a convenient shorthand for specifying multiple @@ppkkggccffll direc-
tives in the packing list (see PACKING LIST DETAILS section
as a convenient shorthand for specifying multiple @@ppkkggccffll
directives in the packing list (see PACKING LIST DETAILS section
below).
--cc _[_-_]_d_e_s_c
Fetch package (one line description) from file _d_e_s_c or, if pre-
ceded by --, the argument itself. This string should also give
Fetch package (one line description) from file _d_e_s_c or, if
preceded by --, the argument itself. This string should also give
some idea of which version of the product (if any) the package
represents.
@@ -59,8 +59,6 @@ OOPPTTIIOONNSS
Fetch long description for package from file _d_e_s_c or, if preceded
by --, the argument itself.
--EE Add an empty views file to the package.
--FF _c_o_m_p_r_e_s_s_i_o_n
Use _c_o_m_p_r_e_s_s_i_o_n as compression algorithm. This overrides the
heuristic to guess the compression type from the output name.
@@ -93,8 +91,8 @@ OOPPTTIIOONNSS
invoked automatically when the package is later (if ever) de-
installed.
--ll Check that any symbolic links which are to be placed in the pack-
age are relative to the current prefix. This means using
--ll Check that any symbolic links which are to be placed in the
package are relative to the current prefix. This means using
unlink(2) and symlink(2) to remove and re-link any symbolic links
which are targeted at full path names.
@@ -137,8 +135,8 @@ OOPPTTIIOONNSS
--ss _s_i_z_e_-_p_k_g_-_f_i_l_e
Store the given file for later querying with the pkg_info(1) --ss
flag. The file is expected to contain the size (in bytes) of all
files of this package added up and stored as a ASCII string, ter-
minated by a newline.
files of this package added up and stored as a ASCII string,
terminated by a newline.
--tt _t_e_m_p_l_a_t_e
Use _t_e_m_p_l_a_t_e as the input to mktemp(3). By default, this is the
@@ -147,8 +145,8 @@ OOPPTTIIOONNSS
Be sure to leave some number of `X' characters for mktemp(3) to
fill in with a unique ID.
--UU Do not update the package file database with any file informa-
tion.
--UU Do not update the package file database with any file
information.
--uu _o_w_n_e_r
Make _o_w_n_e_r the default owner instead of extracting it from the
@@ -162,18 +160,18 @@ PPAACCKKIINNGG LLIISSTT DDEETTAAIILLSS
The (packing list) format (see --ff) is fairly simple, being nothing more
than a single column of filenames to include in the package. However,
since absolute pathnames are generally a bad idea for a package that
could be installed potentially anywhere, there is another method of spec-
ifying where things are supposed to go and, optionally, what ownership
and mode information they should be installed with. This is done by
embedding specialized command sequences in the packing list. Briefly
described, these sequences are:
could be installed potentially anywhere, there is another method of
specifying where things are supposed to go and, optionally, what
ownership and mode information they should be installed with. This is
done by embedding specialized command sequences in the packing list.
Briefly described, these sequences are:
@@ccwwdd _d_i_r_e_c_t_o_r_y
Set the internal directory pointer to point to _d_i_r_e_c_t_o_r_y. All
subsequent filenames will be assumed relative to this directory.
Note: @@ccdd is also an alias for this command.
@@ssrrcc _d_i_r_e_c_t_o_r_y
This command is supported for compatibility only. It was for-
merly used to override @@ccwwdd during package creation.
This command is supported for compatibility only. It was
formerly used to override @@ccwwdd during package creation.
@@eexxeecc _c_o_m_m_a_n_d
Execute _c_o_m_m_a_n_d as part of the unpacking process. If _c_o_m_m_a_n_d
contains any of the following sequences somewhere in it, they
@@ -185,9 +183,9 @@ PPAACCKKIINNGG LLIISSTT DDEETTAAIILLSS
%%DD Expand to the current directory prefix, as set with @@ccwwdd,
in the example case _/_u_s_r_/_l_o_c_a_l.
%%BB Expand to the (basename) of the fully qualified filename,
that is the current directory prefix, plus the last file-
spec, minus the trailing filename. In the example case,
that would be _/_u_s_r_/_l_o_c_a_l_/_b_i_n.
that is the current directory prefix, plus the last
filespec, minus the trailing filename. In the example
case, that would be _/_u_s_r_/_l_o_c_a_l_/_b_i_n.
%%ff Expand to the (filename) part of the fully qualified
name, or the converse of %%BB, being in the example case,
_e_m_a_c_s.
@@ -197,17 +195,17 @@ PPAACCKKIINNGG LLIISSTT DDEETTAAIILLSS
not executed during the package add, as @@eexxeecc is, but rather when
the package is deleted. This is useful for deleting links and
other ancillary files that were created as a result of adding the
package, but not directly known to the package's table of con-
tents (and hence not automatically removable). The advantage of
using @@uunneexxeecc over a deinstallation script is that you can use
package, but not directly known to the package's table of
contents (and hence not automatically removable). The advantage
of using @@uunneexxeecc over a deinstallation script is that you can use
the (special sequence expansion) to get at files regardless of
where they've been potentially redirected (see --pp).
@@mmooddee _m_o_d_e
Set default permission for all subsequently extracted files to
_m_o_d_e. Format is the same as that used by the cchhmmoodd command
(well, considering that it's later handed off to it, that's no
surprise). Use without an arg to set back to default (extrac-
tion) permissions.
surprise). Use without an arg to set back to default
(extraction) permissions.
@@ooppttiioonn _o_p_t_i_o_n
Set internal package options, the only currently supported one
being _p_r_e_s_e_r_v_e, which tells pkg_add to move any existing files
@@ -222,9 +220,9 @@ PPAACCKKIINNGG LLIISSTT DDEETTAAIILLSS
to _g_r_o_u_p. Use without an arg to set back to default (extraction)
group ownership.
@@ccoommmmeenntt _s_t_r_i_n_g
Embed a comment in the packing list. Useful in trying to docu-
ment some particularly hairy sequence that may trip someone up
later.
Embed a comment in the packing list. Useful in trying to
document some particularly hairy sequence that may trip someone
up later.
@@iiggnnoorree
Used internally to tell extraction to ignore the next file (don't
copy it anywhere), as it's used for some special purpose.
@@ -249,17 +247,17 @@ PPAACCKKIINNGG LLIISSTT DDEETTAAIILLSS
@@ppkkggddeepp _p_k_g_n_a_m_e
Declare a dependency on the _p_k_g_n_a_m_e package. The _p_k_g_n_a_m_e package
must be installed before this package may be installed, and this
package must be deinstalled before the _p_k_g_n_a_m_e package is dein-
stalled. Multiple @@ppkkggddeepp directives may be used if the package
depends on multiple other packages.
package must be deinstalled before the _p_k_g_n_a_m_e package is
deinstalled. Multiple @@ppkkggddeepp directives may be used if the
package depends on multiple other packages.
@@bbllddddeepp _p_k_g_n_a_m_e
Declare that this package was built with the exact version of
_p_k_g_n_a_m_e (since the @@ppkkggddeepp directive may contain wildcards or
relational package version information).
@@ppkkggccffll _p_k_g_c_f_l_n_a_m_e
Declare a conflict with the _p_k_g_c_f_l_n_a_m_e package, as the two pack-
ages contain references to the same files, and so cannot co-exist
on the same system.
Declare a conflict with the _p_k_g_c_f_l_n_a_m_e package, as the two
packages contain references to the same files, and so cannot co-
exist on the same system.
EENNVVIIRROONNMMEENNTT
See pkg_install.conf(5) for options, that can also be specified using the
@@ -281,4 +279,4 @@ AAUUTTHHOORRSS
NetBSD wildcard dependency processing, pkgdb, pkg size recording
etc.
NetBSD 5.0 January 20, 2010 NetBSD 5.0
pkgsrc December 27, 2014 pkgsrc

View File

@@ -1,4 +1,4 @@
# $NetBSD: Makefile.in,v 1.21 2013/09/12 11:03:10 jperkin Exp $
# $NetBSD: Makefile.in,v 1.22 2015/01/22 09:19:47 jperkin Exp $
srcdir= @srcdir@
@@ -15,7 +15,7 @@ SSL_SUPPORT= @ssl_support@
CC= @CC@
CCLD= $(CC)
LIBS= -linstall -lfetch @LIBS@
LIBS= -linstall -larchive -lfetch @LIBS@
.if !empty(SSL_SUPPORT)
LIBS+= -lssl -lcrypto

View File

@@ -1,4 +1,4 @@
.\" $NetBSD: pkg_delete.1,v 1.30 2010/02/25 06:56:23 wiz Exp $
.\" $NetBSD: pkg_delete.1,v 1.31 2014/12/30 15:13:20 wiz Exp $
.\"
.\" FreeBSD install - a package for the installation and maintenance
.\" of non-core utilities.
@@ -17,7 +17,7 @@
.\"
.\" from FreeBSD: @(#)pkg_delete.1
.\"
.Dd January 20, 2010
.Dd December 27, 2014
.Dt PKG_DELETE 1
.Os
.Sh NAME
@@ -221,12 +221,6 @@ script is called as:
.Bd -filled -offset indent -compact
.Cm deinstall
.Aq Ar pkg-name
.Ar VIEW-DEINSTALL
.Ed
before removing the package from a view, and as:
.Bd -filled -offset indent -compact
.Cm deinstall
.Aq Ar pkg-name
.Ar DEINSTALL
.Ed
before deleting all files and as:
@@ -237,8 +231,7 @@ before deleting all files and as:
.Ed
after deleting them.
Passing the keywords
.Ar VIEW-DEINSTALL ,
.Ar DEINSTALL ,
.Ar DEINSTALL
and
.Ar POST-DEINSTALL
lets you potentially write only one program/script that handles all

View File

@@ -34,7 +34,7 @@
#if HAVE_SYS_CDEFS_H
#include <sys/cdefs.h>
#endif
__RCSID("$NetBSD: pkg_delete.c,v 1.12 2011/09/29 23:30:21 wiz Exp $");
__RCSID("$NetBSD: pkg_delete.c,v 1.13 2014/12/30 15:13:20 wiz Exp $");
#if HAVE_ERR_H
#include <err.h>
@@ -397,59 +397,15 @@ find_preserve_pkgs(lpkg_head_t *pkgs)
return 0;
}
/*
* Remove package from view. This is calling pkg_deinstall again.
*/
static int
remove_pkg_from_view(const char *pkg)
{
char line[MaxPathSize], *fname, *eol;
FILE *fp;
fname = pkgdb_pkg_file(pkg, VIEWS_FNAME);
if (isemptyfile(fname)) {
free(fname);
return 0;
}
if ((fp = fopen(fname, "r")) == NULL) {
warn("Unable to open `%s', aborting", fname);
free(fname);
return 1;
}
free(fname);
while (fgets(line, sizeof(line), fp) != NULL) {
if ((eol = strrchr(line, '\n')) != NULL)
*eol = '\0';
if (Verbose || Fake)
printf("Deleting package `%s' instance from `%s' view\n",
pkg, line);
if (Fake)
continue;
if (fexec_skipempty(BINDIR "/pkg_delete", "-K", line,
Fake ? "-n" : "",
(Force > 1) ? "-f" : "",
(Force > 0) ? "-f" : "",
pkg, NULL) != 0) {
warnx("Unable to delete package `%s' from view `%s'",
pkg, line);
fclose(fp);
return 1;
}
}
fclose(fp);
return 0;
}
/*
* Run the +DEINSTALL script. Depending on whether this is
* a depoted package and whether this pre- or post-deinstall phase,
* different arguments are passed down.
* pre- or post-deinstall phase, different arguments are passed down.
*/
static int
run_deinstall_script(const char *pkg, int do_postdeinstall)
{
const char *target, *text;
char *fname, *fname2, *pkgdir;
char *fname, *pkgdir;
int rv;
fname = pkgdb_pkg_file(pkg, DEINSTALL_FNAME);
@@ -458,23 +414,13 @@ run_deinstall_script(const char *pkg, int do_postdeinstall)
return 0;
}
fname2 = pkgdb_pkg_file(pkg, DEPOT_FNAME);
if (fexists(fname2)) {
if (do_postdeinstall) {
free(fname);
free(fname2);
return 0;
}
target = "VIEW-DEINSTALL";
text = "view deinstall";
} else if (do_postdeinstall) {
if (do_postdeinstall) {
target = "POST-DEINSTALL";
text = "post-deinstall";
} else {
target = "DEINSTALL";
text = "deinstall";
}
free(fname2);
if (Fake) {
printf("Would execute %s script with argument %s now\n",
@@ -540,57 +486,6 @@ remove_line(const char *fname, const char *fname_tmp, const char *text)
return rv;
}
/*
* Unregister the package from the depot it is registered in.
*/
static int
remove_pkg_from_depot(const char *pkg)
{
FILE *fp;
char line[MaxPathSize], *eol;
char *fname, *fname2;
int rv;
fname = pkgdb_pkg_file(pkg, DEPOT_FNAME);
if (isemptyfile(fname)) {
free(fname);
return 0;
}
if (Verbose)
printf("Attempting to remove the `%s' registration "
"on package `%s'\n", fname, pkg);
if (Fake) {
free(fname);
return 1;
}
if ((fp = fopen(fname, "r")) == NULL) {
warn("Unable to open `%s' file", fname);
free(fname);
return 1;
}
if (fgets(line, sizeof(line), fp) == NULL) {
fclose(fp);
warnx("Empty depot file `%s'", fname);
free(fname);
return 1;
}
if ((eol = strrchr(line, '\n')) != NULL)
*eol = '\0';
fclose(fp);
free(fname);
fname = pkgdb_pkg_file(pkg, VIEWS_FNAME);
fname2 = pkgdb_pkg_file(pkg, VIEWS_FNAME_TMP);
rv = remove_line(fname, fname2, line);
free(fname2);
free(fname);
return rv;
}
/*
* remove_depend is used as iterator function below.
* The passed-in package name should be removed from the
@@ -627,7 +522,7 @@ remove_pkg(const char *pkg)
char *fname, *pkgdir;
package_t plist;
plist_t *p;
int is_depoted_pkg, rv, late_error;
int rv, late_error;
if (pkgdb_update_only)
return pkgdb_remove_pkg(pkg) ? 0 : 1;
@@ -640,15 +535,6 @@ remove_pkg(const char *pkg)
}
free(fname);
/* +REQUIRED_BY and +PRESERVE already checked */
if (remove_pkg_from_view(pkg))
return 1;
/*
* The views related code has bad error handling, if e.g.
* the deinstall script fails, the package remains unregistered.
*/
fname = pkgdb_pkg_file(pkg, CONTENTS_FNAME);
if ((fp = fopen(fname, "r")) == NULL) {
warnx("Failed to open `%s'", fname);
@@ -712,37 +598,23 @@ remove_pkg(const char *pkg)
* processing.
*/
fname = pkgdb_pkg_file(pkg, DEPOT_FNAME);
if (fexists(fname)) {
late_error |= remove_pkg_from_depot(pkg);
/* XXX error checking */
} else {
for (p = plist.head; p; p = p->next) {
if (p->type != PLIST_PKGDEP)
continue;
if (Verbose)
printf("Attempting to remove dependency "
"on package `%s'\n", p->name);
if (Fake)
continue;
match_installed_pkgs(p->name, remove_depend,
__UNCONST(pkg));
}
for (p = plist.head; p; p = p->next) {
if (p->type != PLIST_PKGDEP)
continue;
if (Verbose)
printf("Attempting to remove dependency "
"on package `%s'\n", p->name);
if (Fake)
continue;
match_installed_pkgs(p->name, remove_depend,
__UNCONST(pkg));
}
free(fname);
free_plist(&plist);
if (!no_deinstall && !unregister_only)
late_error |= run_deinstall_script(pkg, 1);
fname = pkgdb_pkg_file(pkg, VIEWS_FNAME);
if (fexists(fname))
is_depoted_pkg = TRUE;
else
is_depoted_pkg = FALSE;
free(fname);
if (Fake)
return 0;
@@ -755,8 +627,6 @@ remove_pkg(const char *pkg)
rv = 1;
if (isemptydir(pkgdir)&& rmdir(pkgdir) == 0)
rv = 0;
else if (is_depoted_pkg)
warnx("Depot directory `%s' is not empty", pkgdir);
else if (!Force)
warnx("Couldn't remove package directory in `%s'", pkgdir);
else if (recursive_remove(pkgdir, 1))

View File

@@ -1,35 +1,34 @@
PKG_DELETE(1) NetBSD General Commands Manual PKG_DELETE(1)
PKG_DELETE(1) General Commands Manual PKG_DELETE(1)
NNAAMMEE
ppkkgg__ddeelleettee -- a utility for deleting previously installed software pack-
age distributions
ppkkgg__ddeelleettee -- a utility for deleting previously installed software
package distributions
SSYYNNOOPPSSIISS
ppkkgg__ddeelleettee [--AADDFFffkkNNnnOORRrrVVvv] [--KK _p_k_g___d_b_d_i_r] [--PP _d_e_s_t_d_i_r] [--pp _p_r_e_f_i_x]
_p_k_g_-_n_a_m_e _._._.
DDEESSCCRRIIPPTTIIOONN
The ppkkgg__ddeelleettee command is used to delete packages that have been previ-
ously installed with the pkg_add(1) command. The given packages are
sorted, so that the dependencies of a package are deleted after the pack-
age. Before any action is executed, ppkkgg__ddeelleettee checks for packages that
are marked as pprreesseerrvveedd or have depending packages left. If the --kk flag
is given, preserved packages are removed from the list of packages to
remove. Unless the --ff flag is given, ppkkgg__ddeelleettee stops on the first
error.
The ppkkgg__ddeelleettee command is used to delete packages that have been
previously installed with the pkg_add(1) command. The given packages are
sorted, so that the dependencies needed by a package are deleted after
the package. Before any action is executed, ppkkgg__ddeelleettee checks for
packages that are marked as pprreesseerrvveedd or have depending packages left.
If the --kk flag is given, preserved packages are skipped and not removed.
Unless the --ff flag is given, ppkkgg__ddeelleettee stops on the first error.
WWAARRNNIINNGG
_S_i_n_c_e _t_h_e ppkkgg__ddeelleettee _c_o_m_m_a_n_d _m_a_y _e_x_e_c_u_t_e _s_c_r_i_p_t_s _o_r _p_r_o_g_r_a_m_s _p_r_o_v_i_d_e_d _b_y
_a _p_a_c_k_a_g_e _f_i_l_e_, _y_o_u_r _s_y_s_t_e_m _m_a_y _b_e _s_u_s_c_e_p_t_i_b_l_e _t_o _`_`_T_r_o_j_a_n _h_o_r_s_e_s_'_' _o_r
_o_t_h_e_r _s_u_b_t_l_e _a_t_t_a_c_k_s _f_r_o_m _m_i_s_c_r_e_a_n_t_s _w_h_o _c_r_e_a_t_e _d_a_n_g_e_r_o_u_s _p_a_c_k_a_g_e _f_i_l_e_s_.
_Y_o_u _a_r_e _a_d_v_i_s_e_d _t_o _v_e_r_i_f_y _t_h_e _c_o_m_p_e_t_e_n_c_e _a_n_d _i_d_e_n_t_i_t_y _o_f _t_h_o_s_e _w_h_o _p_r_o_-
_v_i_d_e _i_n_s_t_a_l_l_a_b_l_e _p_a_c_k_a_g_e _f_i_l_e_s_. _F_o_r _e_x_t_r_a _p_r_o_t_e_c_t_i_o_n_, _e_x_a_m_i_n_e _a_l_l _t_h_e
_Y_o_u _a_r_e _a_d_v_i_s_e_d _t_o _v_e_r_i_f_y _t_h_e _c_o_m_p_e_t_e_n_c_e _a_n_d _i_d_e_n_t_i_t_y _o_f _t_h_o_s_e _w_h_o
_p_r_o_v_i_d_e _i_n_s_t_a_l_l_a_b_l_e _p_a_c_k_a_g_e _f_i_l_e_s_. _F_o_r _e_x_t_r_a _p_r_o_t_e_c_t_i_o_n_, _e_x_a_m_i_n_e _a_l_l _t_h_e
_p_a_c_k_a_g_e _c_o_n_t_r_o_l _f_i_l_e_s _i_n _t_h_e _p_a_c_k_a_g_e _r_e_c_o_r_d _d_i_r_e_c_t_o_r_y
_<_P_K_G___D_B_D_I_R_>_/_<_p_k_g_-_n_a_m_e_>_/_)_. _P_a_y _p_a_r_t_i_c_u_l_a_r _a_t_t_e_n_t_i_o_n _t_o _a_n_y _+_I_N_S_T_A_L_L _o_r
_+_D_E_I_N_S_T_A_L_L _f_i_l_e_s_, _a_n_d _i_n_s_p_e_c_t _t_h_e _+_C_O_N_T_E_N_T_S _f_i_l_e _f_o_r @@ccwwdd_, @@mmooddee _(_c_h_e_c_k
_f_o_r _s_e_t_u_i_d_)_, @@ddiirrrrmm_, @@eexxeecc_, _a_n_d @@uunneexxeecc _d_i_r_e_c_t_i_v_e_s_, _a_n_d_/_o_r _u_s_e _t_h_e
pkg_info(_1) _c_o_m_m_a_n_d _t_o _e_x_a_m_i_n_e _t_h_e _i_n_s_t_a_l_l_e_d _p_a_c_k_a_g_e _c_o_n_t_r_o_l _f_i_l_e_s_.
_p_k_g___i_n_f_o_(_1_) _c_o_m_m_a_n_d _t_o _e_x_a_m_i_n_e _t_h_e _i_n_s_t_a_l_l_e_d _p_a_c_k_a_g_e _c_o_n_t_r_o_l _f_i_l_e_s_.
OOPPTTIIOONNSS
The following command line options are supported:
@@ -38,24 +37,25 @@ OOPPTTIIOONNSS
The named packages are deinstalled, wildcards can be used, see
pkg_info(1). If no version is given, the one currently installed
will be removed. If the --FF flag is given, one or more (absolute)
filenames may be specified and the Package Database will be con-
sulted for the package to which the given file belongs. These
filenames may be specified and the package database will be
consulted for the package to which the given file belongs. These
packages are then deinstalled.
--AA Recursively remove all automatically installed packages that were
needed by the given packages and are no longer required. See
also the --RR flag.
needed by the given packages and are no longer required. Does
not remove manually installed packages; see also the --RR flag.
--DD If a deinstallation script exists for a given package, do not
execute it.
--FF Any pkg-name given will be interpreted as pathname which is sub-
sequently transformed in a (real) package name via the Package
Database. That way, packages can be deleted by giving a filename
--FF Any _p_k_g_-_n_a_m_e given will be interpreted as pathname which is
subsequently transformed in a (real) package name via the package
database. That way, packages can be deleted by giving a filename
instead of the package-name.
--ff Force removal of the package, even if a dependency is recorded or
the deinstall script fails.
the deinstall script fails. This might break the package
database; see pkg_admin(1) on how to repair it.
--ffff Force removal of the package, even if the package is marked as a
pprreesseerrvveedd package. Note that this is a dangerous operation. See
@@ -67,20 +67,20 @@ OOPPTTIIOONNSS
--kk Silently skip all packages that are marked as pprreesseerrvveedd.
--NN Remove the package's registration and its entries from the pack-
age database, but leave the files installed. Don't run any dein-
stall scripts or @unexec lines either.
--NN Remove the package's registration and its entries from the
package database, but leave the files installed. Don't run any
deinstall scripts or @@uunneexxeecc lines either.
--nn Don't actually deinstall a package, just report the steps that
would be taken if it were.
would be taken.
--OO Only delete the package's entries from the package database, do
--OO Only delete the package's entries from the package database; do
not touch the package or its files itself.
--pp _d_e_s_t_d_i_r
--PP _d_e_s_t_d_i_r
Prefix all file and directory names with _d_e_s_t_d_i_r. For packages
without install scripts this has the same behavior as using
chroot.
chroot(8).
--pp _p_r_e_f_i_x
Set _p_r_e_f_i_x as the directory in which to delete files from any
@@ -89,8 +89,8 @@ OOPPTTIIOONNSS
location by pkg_add(1).
--RR Recursively remove all packages that were needed by the given
packages and that have no other dependencies left. This option
overrides the --AA flag.
packages and are no longer required. This option overrides the
--AA flag.
--rr Recursively remove all packages that require one of the packages
given.
@@ -113,34 +113,32 @@ TTEECCHHNNIICCAALL DDEETTAAIILLSS
given).
If a filename is given instead of a package name, the package of which
the given file belongs to can be deleted if the --FF Flag is given. The
filename needs to be absolute, see the output produced by the pkg_info
the given file belongs to can be deleted if the --FF flag is given. The
filename needs to be absolute, see the output produced by the pkg_info(1)
--aaFF command.
If a ddeeiinnssttaallll script exists for the package, it is executed before and
after any files are removed. It is this script's responsibility to clean
up any additional messy details around the package's installation, since
all ppkkgg__ddeelleettee knows how to do is delete the files created in the origi-
nal distribution. The ddeeiinnssttaallll script is called as:
ddeeiinnssttaallll <_p_k_g_-_n_a_m_e> _V_I_E_W_-_D_E_I_N_S_T_A_L_L
before removing the package from a view, and as:
all ppkkgg__ddeelleettee knows how to do is delete the files created in the
original distribution. The ddeeiinnssttaallll script is called as:
ddeeiinnssttaallll <_p_k_g_-_n_a_m_e> _D_E_I_N_S_T_A_L_L
before deleting all files and as:
ddeeiinnssttaallll <_p_k_g_-_n_a_m_e> _P_O_S_T_-_D_E_I_N_S_T_A_L_L
after deleting them. Passing the keywords _V_I_E_W_-_D_E_I_N_S_T_A_L_L, _D_E_I_N_S_T_A_L_L and
_P_O_S_T_-_D_E_I_N_S_T_A_L_L lets you potentially write only one program/script that
handles all aspects of installation and deletion.
after deleting them. Passing the keywords _D_E_I_N_S_T_A_L_L and _P_O_S_T_-_D_E_I_N_S_T_A_L_L
lets you potentially write only one program/script that handles all
aspects of installation and deletion.
All scripts are called with the environment variable PKG_PREFIX set to
the installation prefix (see the --pp option above). This allows a package
author to write a script that reliably performs some action on the direc-
tory where the package is installed, even if the user might have changed
it by specifying the --pp option when running ppkkgg__ddeelleettee or pkg_add(1).
The scripts are also called with the PKG_METADATA_DIR environment vari-
able set to the location of the _+_* meta-data files, and with the
PKG_REFCOUNT_DBDIR environment variable set to the location of the pack-
age reference counts database directory. If the --PP flag was given to
ppkkgg__ddeelleettee, PKG_DESTDIR will be set to _d_e_s_t_d_i_r.
author to write a script that reliably performs some action on the
directory where the package is installed, even if the user might have
changed it by specifying the --pp option when running ppkkgg__ddeelleettee or
pkg_add(1). The scripts are also called with the PKG_METADATA_DIR
environment variable set to the location of the _+_* meta-data files, and
with the PKG_REFCOUNT_DBDIR environment variable set to the location of
the package reference counts database directory. If the --PP flag was
given to ppkkgg__ddeelleettee, PKG_DESTDIR will be set to _d_e_s_t_d_i_r.
EENNVVIIRROONNMMEENNTT
See pkg_install.conf(5) for options, that can also be specified using the
@@ -159,7 +157,7 @@ AAUUTTHHOORRSS
NetBSD wildcard dependency processing, pkgdb, recursive "down"
delete, etc.
Joerg Sonnenberger
Rewrote most of the code to compute correct order of deinstalla-
tion and to improve error handling.
Rewrote most of the code to compute correct order of
deinstallation and to improve error handling.
NetBSD 5.0 January 20, 2010 NetBSD 5.0
pkgsrc December 27, 2014 pkgsrc

View File

@@ -1,4 +1,4 @@
# $NetBSD: Makefile.in,v 1.27 2013/09/12 11:03:10 jperkin Exp $
# $NetBSD: Makefile.in,v 1.28 2015/01/22 09:19:47 jperkin Exp $
srcdir= @srcdir@
@@ -17,7 +17,7 @@ SSL_SUPPORT= @ssl_support@
CC= @CC@
CCLD= $(CC)
.if empty(BOOTSTRAP)
LIBS= -linstall -lfetch @LIBS@
LIBS= -linstall -larchive -lfetch @LIBS@
.if !empty(SSL_SUPPORT)
LIBS+= -lssl -lcrypto
.endif

View File

@@ -1,4 +1,4 @@
/* $NetBSD: info.h,v 1.21 2009/09/11 18:00:13 joerg Exp $ */
/* $NetBSD: info.h,v 1.22 2014/12/30 15:13:20 wiz Exp $ */
/* from FreeBSD Id: info.h,v 1.10 1997/02/22 16:09:40 peter Exp */
@@ -68,7 +68,6 @@ struct pkg_meta {
char *meta_install;
char *meta_deinstall;
char *meta_preserve;
char *meta_views;
char *meta_installed_info;
int is_installed;
};

View File

@@ -1,4 +1,4 @@
/* $NetBSD: perform.c,v 1.61 2010/02/20 04:40:03 joerg Exp $ */
/* $NetBSD: perform.c,v 1.62 2014/12/30 15:13:20 wiz Exp $ */
#if HAVE_CONFIG_H
#include "config.h"
@@ -13,7 +13,7 @@
#if HAVE_SYS_WAIT_H
#include <sys/wait.h>
#endif
__RCSID("$NetBSD: perform.c,v 1.61 2010/02/20 04:40:03 joerg Exp $");
__RCSID("$NetBSD: perform.c,v 1.62 2014/12/30 15:13:20 wiz Exp $");
/*-
* Copyright (c) 2008 Joerg Sonnenberger <joerg@NetBSD.org>.
@@ -110,9 +110,8 @@ __RCSID("$NetBSD: perform.c,v 1.61 2010/02/20 04:40:03 joerg Exp $");
#define LOAD_SIZE_PKG (1 << 9)
#define LOAD_SIZE_ALL (1 << 10)
#define LOAD_PRESERVE (1 << 11)
#define LOAD_VIEWS (1 << 12)
#define LOAD_REQUIRED_BY (1 << 13)
#define LOAD_INSTALLED_INFO (1 << 14)
#define LOAD_REQUIRED_BY (1 << 12)
#define LOAD_INSTALLED_INFO (1 << 13)
static const struct pkg_meta_desc {
size_t entry_offset;
@@ -144,8 +143,6 @@ static const struct pkg_meta_desc {
LOAD_SIZE_ALL, 0 },
{ offsetof(struct pkg_meta, meta_preserve), PRESERVE_FNAME,
LOAD_PRESERVE, 0 },
{ offsetof(struct pkg_meta, meta_views), VIEWS_FNAME,
LOAD_VIEWS, 0 },
{ offsetof(struct pkg_meta, meta_required_by), REQUIRED_BY_FNAME,
LOAD_REQUIRED_BY, 0 },
{ offsetof(struct pkg_meta, meta_installed_info), INSTALLED_INFO_FNAME,

View File

@@ -1,4 +1,4 @@
.\" $NetBSD: pkg_info.1,v 1.32 2012/12/17 04:34:02 agc Exp $
.\" $NetBSD: pkg_info.1,v 1.34 2015/01/11 22:53:44 wiz Exp $
.\"
.\" FreeBSD install - a package for the installation and maintenance
.\" of non-core utilities.
@@ -17,7 +17,7 @@
.\"
.\" @(#)pkg_info.1
.\"
.Dd December 14, 2012
.Dd January 11, 2015
.Dt PKG_INFO 1
.Os
.Sh NAME
@@ -47,7 +47,7 @@ command.
.Pp
The
.Ar pkg-name
may be the name of an installed package (with our without version), a
may be the name of an installed package (with or without version), a
pattern matching several installed packages (see the
.Sx PACKAGE WILDCARDS
section for a description of possible patterns),
@@ -226,7 +226,7 @@ The filename is resolved to a package name using the package database.
The filename must be absolute, as in the output of
.Dl pkg_info -aF .
For example,
.Dl pkg_info -eF /path/to/file
.Dl pkg_info -Fe /path/to/file
can be used to display the package the given file belongs to, and
.Dl pkg_info -LF /path/to/file
can be used to display all files belonging to the package the given

View File

@@ -1,10 +1,10 @@
PKG_INFO(1) NetBSD General Commands Manual PKG_INFO(1)
PKG_INFO(1) General Commands Manual PKG_INFO(1)
NNAAMMEE
ppkkgg__iinnffoo -- a utility for displaying information on software packages
SSYYNNOOPPSSIISS
ppkkgg__iinnffoo [--BBbbccDDddFFffhhIIiikkLLmmNNnnppqqrrRRSSssVVvvXX] [--ee _p_a_c_k_a_g_e] [--EE _p_a_c_k_a_g_e]
ppkkgg__iinnffoo [--BBbbccDDddFFffhhIIiikkLLmmNNnnppqqRRrrSSssVVvvXX] [--EE _p_k_g_-_n_a_m_e] [--ee _p_k_g_-_n_a_m_e]
[--KK _p_k_g___d_b_d_i_r] [--ll _p_r_e_f_i_x] _p_k_g_-_n_a_m_e _._._.
ppkkgg__iinnffoo [--aa | --uu] [flags]
ppkkgg__iinnffoo [--QQ _v_a_r_i_a_b_l_e] _p_k_g_-_n_a_m_e _._._.
@@ -14,16 +14,16 @@ DDEESSCCRRIIPPTTIIOONN
may be either packed up in files or already installed on the system with
the pkg_create(1) command.
The _p_k_g_-_n_a_m_e may be the name of an installed package (with our without
The _p_k_g_-_n_a_m_e may be the name of an installed package (with or without
version), a pattern matching several installed packages (see the _P_A_C_K_A_G_E
_W_I_L_D_C_A_R_D_S section for a description of possible patterns), the pathname
to a binary package, a filename belonging to an installed package (if --FF
is also given), or a URL to an ftp-available package.
to a binary package, a filename belonging to an installed package (with
--FF), or a URL to an FTP-available package.
The following command-line options are supported:
The following command line options are available:
--aa Show information for all currently installed packages. See also
--uu.
--uu. When neither --aa nor --uu is given, the former is assumed.
--BB Show some of the important definitions used when building the
binary package (the ``Build information'') for each package.
@@ -31,10 +31,10 @@ DDEESSCCRRIIPPTTIIOONN
can be queried, too. In particular, _a_u_t_o_m_a_t_i_c tells if a package
was installed automatically as a dependency of another package.
--bb Show the NetBSD RCS Id strings from the files used in the con-
struction of the binary package (the "Build version") for each
package. These files are the package Makefile, any patch files,
any checksum files, and the packing list file.
--bb Show the NetBSD RCS Id strings from the files used in the
construction of the binary package (the ``Build version'') for
each package. These files are the package Makefile, any patch
files, any checksum files, and the packing list file.
--cc Show the one-line comment field for each package.
@@ -43,29 +43,32 @@ DDEESSCCRRIIPPTTIIOONN
--dd Show the long-description field for each package.
--EE _p_k_g_-_n_a_m_e
This option allows you to test for the existence of a given pack-
age. If a package identified by _p_k_g_-_n_a_m_e is currently installed,
return code is 0, otherwise 1. The name of the best matching
package found installed is printed to stdout unless turned off
using the --qq option. _p_k_g_-_n_a_m_e can contain wildcards (see the
_P_A_C_K_A_G_E _W_I_L_D_C_A_R_D_S section below).
This option allows you to test for the existence of a given
package. If a package identified by _p_k_g_-_n_a_m_e is currently
installed, return code is 0, otherwise 1. The name of the best
matching package found installed is printed to stdout unless
turned off using the --qq option. _p_k_g_-_n_a_m_e can contain wildcards
(see the _P_A_C_K_A_G_E _W_I_L_D_C_A_R_D_S section below).
--ee _p_k_g_-_n_a_m_e
This option allows you to test for the existence of a given pack-
age. If a package identified by _p_k_g_-_n_a_m_e is currently installed,
return code is 0, otherwise 1. The names of any package(s) found
installed are printed to stdout unless turned off using the --qq
option. _p_k_g_-_n_a_m_e can contain wildcards (see the _P_A_C_K_A_G_E
_W_I_L_D_C_A_R_D_S section below).
This option allows you to test for the existence of a given
package. If a package identified by _p_k_g_-_n_a_m_e is currently
installed, return code is 0, otherwise 1. The names of any
package(s) found installed are printed to stdout unless turned
off using the --qq option. _p_k_g_-_n_a_m_e can contain wildcards (see the
_P_A_C_K_A_G_E _W_I_L_D_C_A_R_D_S section below).
--FF Interpret any pkg-name given as filename, and translate it to a
package name using the Package Database. This can be used to
query information on a per-file basis, e.g. in conjunction with
the --ee flag to find out which package a file belongs to.
--FF Interpret any _p_k_g_-_n_a_m_e given as filename, and query information
on the package that file belongs to. This can be used to query
information on a per-file basis. See the _T_E_C_H_N_I_C_A_L _D_E_T_A_I_L_S
section below for more information.
--ff Show the packing list instructions for each package.
--II Show the index entry for each package.
--hh Print usage message and exit.
--II Show the index entry for each package. This option is assumed
when no arguments or relevant flags are specified.
--ii Show the install script (if any) for each package.
@@ -77,26 +80,28 @@ DDEESSCCRRIIPPTTIIOONN
--LL Show the files within each package. This is different from just
viewing the packing list, since full pathnames for everything are
generated. Files that were created dynamically during installa-
tion of the package are not listed.
generated. Files that were created dynamically during
installation of the package are not listed.
--ll _s_t_r Prefix each information category header (see --qq) shown with _s_t_r.
This is primarily of use to front-end programs that want to
request a lot of different information fields at once for a pack-
age, but don't necessary want the output intermingled in such a
way that they can't organize it. This lets you add a special
--ll _p_r_e_f_i_x
Prefix each information category header (see --qq) shown with
_p_r_e_f_i_x. This is primarily of use to front-end programs that want
to request a lot of different information fields at once for a
package, but don't necessary want the output intermingled in such
a way that they can't organize it. This lets you add a special
token to the start of each field.
--mm Show the mtree file (if any) for each package.
--NN Show which packages each package was built with (exact dependen-
cies), if any.
--NN Show which packages each package was built with (exact
dependencies), if any.
--nn Show which packages each package needs (depends upon), if any.
--pp Show the installation prefix for each package.
--QQ Show the definition of _v_a_r_i_a_b_l_e from the build information for
--QQ _v_a_r_i_a_b_l_e
Show the definition of _v_a_r_i_a_b_l_e from the build information for
each package. An empty string is returned if no such variable
definition is found for the package(s).
@@ -114,7 +119,7 @@ DDEESSCCRRIIPPTTIIOONN
--ss Show the size of this package in bytes. The size is calculated
by adding up the size of each file of the package.
--uu Show information for all user-installed packages. Automatically
--uu Show information for all user-installed packages: automatically
installed packages (as dependencies of other packages) are not
displayed. See also --aa.
@@ -132,40 +137,52 @@ TTEECCHHNNIICCAALL DDEETTAAIILLSS
line, or from already installed package information in
_<_P_K_G___D_B_D_I_R_>_/_<_p_k_g_-_n_a_m_e_>.
A filename can be given instead of a (installed) package name to query
information on the package this file belongs to. This filename is then
resolved to a package name using the Package Database. For this transla-
tion to take place, the --FF flag must be given. The filename must be
absolute, compare the output of pkg_info --aaFF.
When the --FF option is used, a filename can be given instead of a package
name to query information on the (installed) package that file belongs
to. The filename is resolved to a package name using the package
database. The filename must be absolute, as in the output of
pkg_info -aF.
For example,
pkg_info -eF /path/to/file
can be used to display the package the given file belongs to, and
pkg_info -LF /path/to/file
can be used to display all files belonging to the package the given file
belongs to.
PPAACCKKAAGGEE WWIILLDDCCAARRDDSS
In the places where a package name/version is expected, e.g. for the --ee
switch, several forms can be used. Either use a package name with or
In the places where a package name/version is expected, e.g., for the --ee
option, several forms can be used. Either use a package name with or
without version, or specify a package wildcard that gets matched against
all installed packages.
Package wildcards use fnmatch(3). In addition, csh(1) style {,} alter-
nates have been implemented. Package version numbers can also be matched
in a relational manner using the _>_=, _<_=, _>, and _< operators. For exam-
ple, _p_k_g___i_n_f_o _-_e _'_n_a_m_e_>_=_1_._3_' will match versions 1.3 and later of the
_n_a_m_e package. Additionally, ranges can be defined by giving a lower
bound with > or >= and an upper bound with < or <=. The lower bound has
to come first. For example, _p_k_g___i_n_f_o _-_e _'_n_a_m_e_>_=_1_._3_<_2_._0_' will match ver-
sions 1.3 (inclusive) to 2.0 (exclusive) of package _n_a_m_e.
Package wildcards use fnmatch(3). In addition, csh(1) style {,}
alternates have been implemented. Package version numbers can also be
matched in a relational manner using the ``>='', ``<='', ``>'', and ``<''
operators. For example,
pkg_info -e 'name>=1.3'
will match versions 1.3 and later of the ``name'' package. (Make sure to
use shell quoting.) Additionally, ranges can be defined, by giving both
a lower bound (with ``>'' or ``>='') as well as an upper bound (with
``<'' or ``<=''). The lower bound has to come first. For example,
pkg_info -e 'name>=1.3<2.0'
will match versions 1.3 (inclusive) to 2.0 (exclusive) of package
``name''.
The collating sequence of the various package version numbers is unusual,
but strives to be consistent. The magic string ``alpha'' equates to
_a_l_p_h_a _v_e_r_s_i_o_n and sorts before a beta version. The magic string ``beta''
equates to _b_e_t_a _v_e_r_s_i_o_n and sorts before a release candidate. The magic
string ``rc'' equates to _r_e_l_e_a_s_e _c_a_n_d_i_d_a_t_e and sorts before a release.
The magic string ``pre'', short for ``pre-release'', is a synonym for
``rc''. For example, _n_a_m_e_-_1_._3_r_c_3 will sort before _n_a_m_e_-_1_._3 and after
_n_a_m_e_-_1_._2_._9. Similarly _n_a_m_e_-_1_._3_a_l_p_h_a_2 will sort before _n_a_m_e_-_1_._3_b_e_t_a_1 and
they both sort before _n_a_m_e_-_1_._3_r_c_1. In addition, alphabetic characters
sort in the same place as their numeric counterparts, so that _n_a_m_e_-_1_._2_e
has the same sorting value as _n_a_m_e_-_1_._2_._5 The magic string ``pl'' equates
to a _p_a_t_c_h _l_e_v_e_l and has the same value as a dot in the dewey-decimal
ordering schemes.
``alpha version'', and sorts before a beta version. The magic string
``beta'' equates to ``beta version'', and sorts before a release
candidate. The magic string ``rc'' equates to ``release candidate'', and
sorts before a release. The magic string ``pre'', short for
``pre-release'', is a synonym for ``rc''. For example,
``name-1.3alpha2'' will sort before ``name-1.3beta1'', and they both sort
before ``name-1.3rc1''. Similarly, ``name-1.3rc3'' will sort before
``name-1.3'', and after ``name-1.2.9''. The magic string ``pl'' equates
to ``patch level'', and has the same value as a dot (`.') in the dewey-
decimal ordering schemes, as does the underscore (`_'). Additionally,
alphabetic characters sort in the same place as their numeric
counterparts, so that ``name-1.2e'' has the same sorting value as
``name-1.2.5''.
EENNVVIIRROONNMMEENNTT
See pkg_install.conf(5) for options, that can also be specified using the
@@ -182,6 +199,6 @@ AAUUTTHHOORRSS
refined it for NetBSD
Hubert Feyrer
NetBSD wildcard dependency processing, pkgdb, depends displaying,
pkg size display etc.
pkg size display, and more.
NetBSD 5.0 January 22, 2010 NetBSD 5.0
pkgsrc December 14, 2012 pkgsrc

View File

@@ -147,6 +147,17 @@
/* Define to 1 if you have the ANSI C header files. */
#undef STDC_HEADERS
/* Enable large inode numbers on Mac OS X 10.5. */
#ifndef _DARWIN_USE_64_BIT_INODE
# define _DARWIN_USE_64_BIT_INODE 1
#endif
/* Number of bits in a file offset, on hosts where this is settable. */
#undef _FILE_OFFSET_BITS
/* Define for large files, on AIX-style hosts. */
#undef _LARGE_FILES
/* Define for Solaris 2.5.1 so the uint32_t typedef from <sys/synch.h>,
<pthread.h>, or <semaphore.h> is not used. If the typedef were allowed, the
#define below would cause a syntax error. */

View File

@@ -1,4 +1,4 @@
/* $NetBSD: lib.h,v 1.64 2010/06/16 23:02:49 joerg Exp $ */
/* $NetBSD: lib.h,v 1.65 2014/12/30 15:13:21 wiz Exp $ */
/* from FreeBSD Id: lib.h,v 1.25 1997/10/08 07:48:03 charnier Exp */
@@ -116,9 +116,6 @@ enum {
#define SIZE_PKG_FNAME "+SIZE_PKG"
#define SIZE_ALL_FNAME "+SIZE_ALL"
#define PRESERVE_FNAME "+PRESERVE"
#define VIEWS_FNAME "+VIEWS"
#define VIEWS_FNAME_TMP "+VIEWS.tmp"
#define DEPOT_FNAME "+DEPOT"
/* The names of special variables */
#define AUTOMATIC_VARNAME "automatic"
@@ -363,7 +360,6 @@ const char *pkgdb_get_dir(void);
* 1 config file
* 2 environment
* 3 command line
* 4 destdir/views reset
*/
void pkgdb_set_dir(const char *, int);
char *pkgdb_pkg_dir(const char *);

View File

@@ -1,4 +1,4 @@
/* $NetBSD: license.c,v 1.36 2014/03/19 21:45:12 wiz Exp $ */
/* $NetBSD: license.c,v 1.38 2014/05/15 09:59:09 wiz Exp $ */
/*-
* Copyright (c) 2009 Joerg Sonnenberger <joerg@NetBSD.org>.
@@ -53,6 +53,7 @@ const char *default_acceptable_licenses =
"cc-by-sa-v3.0 "
"cc0-1.0-universal "
"cddl-1.0 "
"cecill-2.1 "
"cpl-1.0 "
"epl-v1.0 "
"eupl-v1.1 "
@@ -70,6 +71,7 @@ const char *default_acceptable_licenses =
"mpl-1.0 mpl-1.1 mpl-2.0 "
"mplusfont "
"ofl-v1.0 ofl-v1.1 "
"openssl "
"original-bsd modified-bsd 2-clause-bsd "
"php "
"png-license "

View File

@@ -1,4 +1,4 @@
.\" $NetBSD: pkg_install.conf.5.in,v 1.17 2012/12/17 04:34:02 agc Exp $
.\" $NetBSD: pkg_install.conf.5.in,v 1.21 2014/11/05 14:40:01 prlw1 Exp $
.\"
.\" Copyright (c) 2008, 2009, 2012 The NetBSD Foundation, Inc.
.\" All rights reserved.
@@ -27,7 +27,7 @@
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
.\" POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd February 22, 2012
.Dd October 28, 2014
.Dt PKG_INSTALL.CONF 5
.Os
.Sh NAME
@@ -57,7 +57,7 @@ License names are case-sensitive.
.It Dv ACTIVE_FTP
Force the use of active FTP.
.It Dv CACHE_INDEX
Cache directory listenings in memory.
Cache directory listings in memory.
This avoids retransfers of the large directory index for HTTP and is
enabled by default.
.It Dv CERTIFICATE_ANCHOR_PKGS
@@ -93,6 +93,9 @@ Missing license conditions are considered an error.
During vulnerability checks, consider packages that have reached end-of-life
as vulnerable.
This option is enabled by default.
.It Dv CHECK_OSABI
If "no", osabi package does not check OS version.
The default is "yes".
.It Dv CHECK_VULNERABILITIES
Check for vulnerabilities when installing packages.
Supported values are:

View File

@@ -1,4 +1,4 @@
PKG_INSTALL.CONF(5) NetBSD File Formats Manual PKG_INSTALL.CONF(5)
PKG_INSTALL.CONF(5) File Formats Manual PKG_INSTALL.CONF(5)
NNAAMMEE
ppkkgg__iinnssttaallll..ccoonnff -- configuration file for package installation tools
@@ -18,21 +18,21 @@ DDEESSCCRRIIPPTTIIOONN
The following variables are supported:
ACCEPTABLE_LICENSES
Space-separared list of licenses packages are allowed to carry.
Space-separated list of licenses packages are allowed to carry.
License names are case-sensitive.
ACTIVE_FTP
Force the use of active FTP.
CACHE_INDEX
Cache directory listenings in memory. This avoids retransfers of
Cache directory listings in memory. This avoids retransfers of
the large directory index for HTTP and is enabled by default.
CERTIFICATE_ANCHOR_PKGS
Path to the file containing the certificates used for validating
binary packages. A package is trusted when a certificate chain
ends in one of the certificates contained in this file. The cer-
tificates must be PEM-encoded.
ends in one of the certificates contained in this file. The
certificates must be PEM-encoded.
CERTIFICATE_ANCHOR_PKGVULN
Analogous to CERTIFICATE_ANCHOR_PKGS. The _p_k_g_-_v_u_l_n_e_r_a_b_i_l_i_t_i_e_s is
@@ -60,6 +60,10 @@ DDEESSCCRRIIPPTTIIOONN
During vulnerability checks, consider packages that have reached
end-of-life as vulnerable. This option is enabled by default.
CHECK_OSABI
If "no", osabi package does not check OS version. The default is
"yes".
CHECK_VULNERABILITIES
Check for vulnerabilities when installing packages. Supported
values are:
@@ -74,19 +78,20 @@ DDEESSCCRRIIPPTTIIOONN
of vulnerable packages.
CONFIG_CACHE_CONNECTIONS
Limit the global connection cache to this value. For FTP this is
the number of sessions without active command. For HTTP this is
the number of connections open with keep-alive.
Limit the global connection cache to this value. For FTP, this
is the number of sessions without active command. For HTTP, this
is the number of connections open with keep-alive.
CONFIG_CACHE_CONNECTIONS_HOST
Like CONFIG_CACHE_CONNECTIONS, but limit the number of connec-
tions to the host as well. See fetch(3) for further details
Like CONFIG_CACHE_CONNECTIONS, but limit the number of
connections to the host as well. See fetch(3) for further
details
DEFAULT_ACCEPTABLE_LICENSES
Space-separated list of common Free and Open Source licenses
packages are allowed to carry. The default value contains all
OSI approved licenses in pkgsrc on the date pkg_install was
released. License names are case-sensitive.
packages are allowed to carry. The default value contains all
OSI approved licenses in pkgsrc on the date pkg_install was
released. License names are case-sensitive.
GPG Path to gpg(1), which can be used to verify the signature in the
_p_k_g_-_v_u_l_n_e_r_a_b_i_l_i_t_i_e_s file when running
@@ -103,8 +108,8 @@ DDEESSCCRRIIPPTTIIOONN
Non-default keyring to use for signing packages with GPG.
GPG_KEYRING_VERIFY
Non-default keyring to use for verifying GPG signature of pack-
ages.
Non-default keyring to use for verifying GPG signature of
packages.
GPG_SIGN_AS
User-id to use for signing packages.
@@ -119,12 +124,12 @@ DDEESSCCRRIIPPTTIIOONN
value.
PKG_DBDIR (*)
Location of the packages database. This option is always overri-
den by the argument of the --KK option.
Location of the packages database. This option is always
overriden by the argument of the --KK option.
PKG_PATH (*)
Search path for packages. The entries are separated by semi-
colon. Each entry specifies a directory or URL to search for
Search path for packages. The entries are separated by
semicolon. Each entry specifies a directory or URL to search for
packages.
PKG_REFCOUNT_DBDIR (*)
@@ -139,8 +144,8 @@ DDEESSCCRRIIPPTTIIOONN
URL which is used for updating the local _p_k_g_-_v_u_l_n_e_r_a_b_i_l_i_t_i_e_s file
when running
ppkkgg__aaddmmiinn ffeettcchh--ppkkgg--vvuullnneerraabbiilliittiieess
The default location is ftp.NetBSD.org using HTTP. _N_o_t_e: Usu-
ally, only the compression type should be changed. Currently
The default location is ftp.NetBSD.org using HTTP. _N_o_t_e:
Usually, only the compression type should be changed. Currently
supported are uncompressed files and files compressed by bzip2(1)
(_._b_z_2) or gzip(1) (_._g_z).
@@ -164,10 +169,10 @@ DDEESSCCRRIIPPTTIIOONN
installing a package.
FFIILLEESS
@SYSCONFDIR@/pkg_install.conf Default location for the file described in
this manual page.
_@_S_Y_S_C_O_N_F_D_I_R_@_/_p_k_g___i_n_s_t_a_l_l_._c_o_n_f Default location for the file
described in this manual page.
SSEEEE AALLSSOO
pkg_add(1), pkg_admin(1) pkg_create(1), pkg_delete(1), pkg_info(1)
pkg_add(1), pkg_admin(1), pkg_create(1), pkg_delete(1), pkg_info(1)
NetBSD 5.0 February 22, 2012 NetBSD 5.0
pkgsrc October 28, 2014 pkgsrc

View File

@@ -1,4 +1,4 @@
PKG_SUMMARY(5) NetBSD File Formats Manual PKG_SUMMARY(5)
PKG_SUMMARY(5) File Formats Manual PKG_SUMMARY(5)
NNAAMMEE
ppkkgg__ssuummmmaarryy -- summary of binary package repository
@@ -17,25 +17,29 @@ DDEESSCCRRIIPPTTIIOONN
(required) The date and time when the package was built.
CATEGORIES
(required) A list of categories which this package fits in, sepa-
rated by space.
(required) A list of categories which this package fits in,
separated by space.
COMMENT
(required) A one-line description of the package.
CONFLICTS
(optional) A list of dewey patterns of packages the package con-
flicts with, one per line. If missing, this package has no con-
flicts.
(optional) A list of dewey patterns of packages the package
conflicts with, one per line. If missing, this package has no
conflicts.
DEPENDS
(optional) A list of dewey patterns of packages the package
depends on, one per line. If missing, this package has no depen-
dencies.
depends on, one per line. If missing, this package has no
dependencies.
DESCRIPTION
(required) A more detailed description of the package.
FILE_CKSUM
(optional) A checksum type supported by digest(1) and checksum
separated by space character.
FILE_NAME
(optional) The name of the binary package file. If not given,
_P_K_G_N_A_M_E_._t_g_z can be assumed.
@@ -54,12 +58,12 @@ DDEESSCCRRIIPPTTIIOONN
MACHINE_ARCH
(required) The architecture on which the package was compiled.
OPSYS (required) The operating system on which the package was com-
piled.
OPSYS (required) The operating system on which the package was
compiled.
OS_VERSION
(required) The version of the operating system on which the pack-
age was compiled.
(required) The version of the operating system on which the
package was compiled.
PKG_OPTIONS
(optional) Any options selected to compile this package. If
@@ -95,19 +99,19 @@ DDEESSCCRRIIPPTTIIOONN
SUPERSEDES
(optional) A list of dewey patterns of previous packages this
package replaces, one per line. This is used for package renam-
ing.
package replaces, one per line. This is used for package
renaming.
The ppkkgg__ssuummmmaarryy file can be generated using the pkg_info(1) --XX option.
For example, the following will list this data for all installed pack-
ages:
For example, the following will list this data for all installed
packages:
pkg_info -X -a
SSEEEE AALLSSOO
pkg_info(1)
digest(1), pkg_info(1)
HHIISSTTOORRYY
The ppkkgg__ssuummmmaarryy format was first officially documented in April 2006.
NetBSD 5.0 April 11, 2009 NetBSD 5.0
pkgsrc April 11, 2009 pkgsrc

View File

@@ -1,4 +1,4 @@
PKGSRC(7) NetBSD Miscellaneous Information Manual PKGSRC(7)
PKGSRC(7) Miscellaneous Information Manual PKGSRC(7)
NNAAMMEE
ppkkggssrrcc -- NetBSD packages collection (framework for third-party software)
@@ -9,11 +9,11 @@ DDEESSCCRRIIPPTTIIOONN
It is used to enable freely available software to be configured and built
easily on supported platforms.
Tools are available to install ready-to-use packages and to perform vari-
ous administrative tasks for the package system.
Tools are available to install ready-to-use packages and to perform
various administrative tasks for the package system.
SSEEEE AALLSSOO
pkg_add(1), pkg_delete(1), pkg_info(1),
_h_t_t_p_:_/_/_w_w_w_._n_e_t_b_s_d_._o_r_g_/_d_o_c_s_/_p_k_g_s_r_c_/
NetBSD 5.0 March 2, 2007 NetBSD 5.0
pkgsrc March 2, 2007 pkgsrc

View File

@@ -1,4 +1,4 @@
/* $NetBSD: version.h,v 1.166 2013/09/02 10:28:44 jperkin Exp $ */
/* $NetBSD: version.h,v 1.167 2014/12/30 15:13:21 wiz 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 20130902
#define PKGTOOLS_VERSION 20141227
#endif /* _INST_LIB_VERSION_H_ */

View File

@@ -1,43 +0,0 @@
# $NetBSD: Makefile.in,v 1.7 2013/09/12 11:03:10 jperkin Exp $
prefix= @prefix@
exec_prefix= @exec_prefix@
sbindir= @sbindir@
mandir= @mandir@
datarootdir= @datarootdir@
man1dir= $(mandir)/man1
cat1dir= $(mandir)/cat1
INSTALL= @INSTALL@
SCRIPTS= linkfarm pkg_view
all:
@true # do nothing
clean:
@true # do nothing
install:
$(INSTALL) -m 755 -d ${DESTDIR}$(sbindir)
$(INSTALL) -m 755 -d ${DESTDIR}$(man1dir)
$(INSTALL) -m 755 -d ${DESTDIR}$(cat1dir)
@for script in $(SCRIPTS); do \
echo "$(INSTALL) $$script.sh ${DESTDIR}$(sbindir)/$$script"; \
$(INSTALL) $$script.sh ${DESTDIR}$(sbindir)/$$script; \
done
@for script in $(SCRIPTS); do \
echo "$(INSTALL) -m 444 $$script.1 ${DESTDIR}$(man1dir)/$$script.1"; \
$(INSTALL) -m 444 $$script.1 ${DESTDIR}$(man1dir)/$$script.1; \
case "$(CATMAN_SECTION_SUFFIX)" in \
[Yy][Ee][Ss]) \
echo "$(INSTALL) -m 444 $$script.cat1 ${DESTDIR}$(cat1dir)/$$script.1"; \
$(INSTALL) -m 444 $$script.cat1 ${DESTDIR}$(cat1dir)/$$script.1; \
;; \
*) \
echo "$(INSTALL) -m 444 $$script.cat1 ${DESTDIR}$(cat1dir)/$$script.0"; \
$(INSTALL) -m 444 $$script.cat1 ${DESTDIR}$(cat1dir)/$$script.0; \
;; \
esac; \
done

View File

@@ -1,148 +0,0 @@
.\" $NetBSD: linkfarm.1,v 1.7 2013/07/20 21:50:53 wiz Exp $
.\"
.\" Copyright (c) 2003 The NetBSD Foundation, Inc.
.\" All rights reserved.
.\"
.\" 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.
.\" 3. All advertising materials mentioning features or use of this software
.\" must display the following acknowledgement:
.\" This product includes software developed by the NetBSD
.\" Foundation, Inc. and its contributors.
.\" 4. Neither the name of The NetBSD Foundation nor the names of its
.\" contributors may be used to endorse or promote products derived
.\" from this software without specific prior written permission.
.\"
.\" 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 September 2, 2003
.Dt LINKFARM 1
.Os
.Sh NAME
.Nm linkfarm
.Nd manage symbolic links to package files
.Sh SYNOPSIS
.Nm
.Op Fl cDnRVv
.Op Fl d Ar stowdir
.Op Fl s Ar subdir
.Op Fl t Ar target
.Ar package
.Sh DESCRIPTION
The
.Nm
command is used to manage a "linkfarm", a directory tree of symbolic links in
.Ar target
to the files in the
.Ar package
sub-directory of
.Ar stowdir .
The default action is to create a linkfarm to a package.
.Pp
The following command-line options are supported:
.Bl -tag -width indent
.It Fl c
Check whether a package contains a linkfarm in
.Ar target .
If
.Ar package
has no symbolic links in
.Ar target
that correspond to its files, then return 0, otherwise return 1.
.It Fl D
Delete the linkfarm for
.Ar package .
.It Fl d Ar stowdir
Set
.Ar stowdir
as the directory in which
.Ar package
can be found.
The default
.Ar stowdir
is the
.Pa packages
sub-directory in the default
.Ar target
directory.
.It Fl n
Don't actually execute the commands for removing and creating the symbolic
links and directories.
.It Fl R
Delete and re-create the linkfarm for
.Ar package .
.It Fl s Ar subdir
The root of the package hierarchy for the linkfarm is the
.Ar subdir
sub-directory in the package.
By default, assume the root of the package hierarchy is simply the
.Ar package
directory.
.It Fl t Ar target
Set
.Ar target
as the directory in which to create and delete the linkfarm for
.Ar package .
The default
.Ar target
directory is
.Pa /usr/pkg
but may be overridden by the
.Ev LOCALBASE
environment variable.
.It Fl V
Print version number and exit.
.It Fl v
Turn on verbose output.
Specifying
.Fl v
multiple times increases the level of verbosity.
.El
.Sh ENVIRONMENT
.Bl -tag -width indent
.It Ev LOCALBASE
The standard packages directory,
.Pa /usr/pkg ,
can be overridden by specifying an alternative directory in the
.Ev LOCALBASE
environment variable.
This affects the default
.Ar target
and
.Ar stowdir
directories.
.It Ev PLIST_IGNORE_FILES
This can be used to specify files in
.Ar package
that should ignored when creating and deleting symbolic links in
.Ar target .
.Ev PLIST_IGNORE_FILES
is a space-separated list of shell glob patterns that match files relative
to the
.Ar package
directory, and it defaults to "info/dir *[~#] *.OLD *.orig *,v".
.El
.Sh SEE ALSO
.Xr lndir 1 ,
.Xr pkg_view 1
.Sh AUTHORS
The
.Nm
utility was written by
.An Alistair G. Crooks Aq Mt agc@NetBSD.org .

View File

@@ -1,67 +0,0 @@
LINKFARM(1) NetBSD General Commands Manual LINKFARM(1)
NNAAMMEE
lliinnkkffaarrmm -- manage symbolic links to package files
SSYYNNOOPPSSIISS
lliinnkkffaarrmm [--ccDDnnRRVVvv] [--dd _s_t_o_w_d_i_r] [--ss _s_u_b_d_i_r] [--tt _t_a_r_g_e_t] _p_a_c_k_a_g_e
DDEESSCCRRIIPPTTIIOONN
The lliinnkkffaarrmm command is used to manage a "linkfarm", a directory tree of
symbolic links in _t_a_r_g_e_t to the files in the _p_a_c_k_a_g_e sub-directory of
_s_t_o_w_d_i_r. The default action is to create a linkfarm to a package.
The following command-line options are supported:
--cc Check whether a package contains a linkfarm in _t_a_r_g_e_t. If
_p_a_c_k_a_g_e has no symbolic links in _t_a_r_g_e_t that correspond to its
files, then return 0, otherwise return 1.
--DD Delete the linkfarm for _p_a_c_k_a_g_e.
--dd _s_t_o_w_d_i_r
Set _s_t_o_w_d_i_r as the directory in which _p_a_c_k_a_g_e can be found. The
default _s_t_o_w_d_i_r is the _p_a_c_k_a_g_e_s sub-directory in the default
_t_a_r_g_e_t directory.
--nn Don't actually execute the commands for removing and creating the
symbolic links and directories.
--RR Delete and re-create the linkfarm for _p_a_c_k_a_g_e.
--ss _s_u_b_d_i_r
The root of the package hierarchy for the linkfarm is the _s_u_b_d_i_r
sub-directory in the package. By default, assume the root of the
package hierarchy is simply the _p_a_c_k_a_g_e directory.
--tt _t_a_r_g_e_t
Set _t_a_r_g_e_t as the directory in which to create and delete the
linkfarm for _p_a_c_k_a_g_e. The default _t_a_r_g_e_t directory is _/_u_s_r_/_p_k_g
but may be overridden by the LOCALBASE environment variable.
--VV Print version number and exit.
--vv Turn on verbose output. Specifying --vv multiple times increases
the level of verbosity.
EENNVVIIRROONNMMEENNTT
LOCALBASE
The standard packages directory, _/_u_s_r_/_p_k_g, can be overridden by
specifying an alternative directory in the LOCALBASE environment
variable. This affects the default _t_a_r_g_e_t and _s_t_o_w_d_i_r directo-
ries.
PLIST_IGNORE_FILES
This can be used to specify files in _p_a_c_k_a_g_e that should ignored
when creating and deleting symbolic links in _t_a_r_g_e_t.
PLIST_IGNORE_FILES is a space-separated list of shell glob pat-
terns that match files relative to the _p_a_c_k_a_g_e directory, and it
defaults to "info/dir *[~#] *.OLD *.orig *,v".
SSEEEE AALLSSOO
lndir(1), pkg_view(1)
AAUUTTHHOORRSS
The lliinnkkffaarrmm utility was written by Alistair G. Crooks <agc@NetBSD.org>.
NetBSD 5.0 September 2, 2003 NetBSD 5.0

View File

@@ -1,232 +0,0 @@
#! /bin/sh
# $NetBSD: linkfarm.sh.in,v 1.4 2004/08/20 20:09:53 jlam Exp $
#
# Copyright (c) 2002 Alistair G. Crooks. All rights reserved.
#
# 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.
# 3. All advertising materials mentioning features or use of this software
# must display the following acknowledgement:
# This product includes software developed by Alistair G. Crooks.
# 4. The name of the author may not be used to endorse or promote
# products derived from this software without specific prior written
# permission.
#
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
# set -x
prefix="@prefix@"
exec_prefix="@exec_prefix@"
sbindir="@sbindir@"
# set up program definitions
findprog="@FIND@"
grepprog="@GREP@"
lnprog="@LN@"
mkdirprog="@MKDIR@"
pkginfoprog="@sbindir@/pkg_info"
rmprog="@RM@"
rmdirprog="@RMDIR@"
sedprog="@SED@"
sortprog="@SORT@"
usage() {
echo 'Usage: linkfarm [options] package'
exit 1
}
version() {
$pkginfoprog -V
exit 0
}
checkdir() {
if [ ! -d "$1" ]; then
echo "linkfarm: \`$1' doesn't exist"
exit 1
fi
}
ignorefiles=${PLIST_IGNORE_FILES:-"info/dir *[~#] *.OLD *.orig *,v"}
linktype=-s
# default action: create a linkfarm in $target from $stowdir/$1
# i.e. linkfarm --target=${prefix}/${view} --dir=${prefix}/packages $1
#
doit=""
target=${LOCALBASE:-/usr/pkg}
stowdir=${target}/packages
subdir=""
verbose=0
# default action is to create
check=no
delete=no
create=yes
# process args - can't use getopt(1) because of '--' style args
while [ $# -gt 0 ]; do
case "$1" in
-D) delete=yes; create=no ;;
-R) delete=yes; create=yes ;;
-V) version ;;
-c) check=yes; doit=":" ;;
-d) stowdir=$2; shift ;;
-d*) stowdir=`echo $1 | $sedprog -e 's|-d||'` ;;
-s) subdir=$2; shift ;;
-s*) subdir=`echo $1 | $sedprog -e 's|-s||'` ;;
-t) target=$2; shift ;;
-t*) target=`echo $1 | $sedprog -e 's|-t||'` ;;
-n) doit=":" ;;
-v) verbose=`expr $verbose + 1` ;;
--delete) delete=yes; create=no ;;
--dir=*) stowdir=`echo $1 | $sedprog -e 's|--dir=||'` ;;
--restow) delete=yes; create=yes ;;
--subdir=*) subdir=`echo $1 | $sedprog -e 's|--subdir=||'` ;;
--target=*) target=`echo $1 | $sedprog -e 's|--target=||'` ;;
--version) version ;;
--) shift; break ;;
*) break ;;
esac
shift
done
# set the package name
package=$1
# make sure stowdir has a full pathname
case $stowdir in
/*) ;;
*) stowdir=`pwd`/$stowdir ;;
esac
# Set the directory from which we symlink.
case $subdir in
"") fromdir=$stowdir/$package ;;
*) fromdir=$stowdir/$package/$subdir ;;
esac
# Set the directory to which we symlink.
case $target in
/*) todir=$target ;;
*) todir=`pwd`/$target ;;
esac
# if we're checking the entries, check, then exit
case $check in
yes)
checkdir $fromdir
(cd $fromdir
ex=0
$findprog . ! -type d -print | \
$sedprog -e 's|^\./||' | \
while read f; do
if [ -e $todir/$f ]; then
ignore=no
for i in $ignorefiles; do
case $f in
$i) ignore=yes; break ;;
esac
done
case $ignore in
no)
echo "${f}"; ex=1 ;;
esac
fi
done
exit $ex) || exit 1
;;
esac
# if we need to get rid of old linkfarms, do it
case $delete in
yes)
checkdir $fromdir
(cd $fromdir
$findprog . ! -type d -print | \
$sedprog -e 's|^\./||' | \
while read f; do
ignore=no
for i in $ignorefiles; do
case $f in
$i) ignore=yes; break ;;
esac
done
case $ignore in
no)
if [ $verbose -gt 0 ]; then
echo "$rmprog -f $todir/$f"
fi
$doit $rmprog -f $todir/$f ;;
esac
done
$findprog . -type d -print | \
$sedprog -e 's|^\./||' | \
$sortprog -r | \
while read d; do
if [ $verbose -gt 0 ]; then
echo "$rmdirprog $todir/$d"
fi
$doit $rmdirprog $todir/$d > /dev/null 2>&1
done)
;;
esac
# if we need to create new linkfarms, do it
case $create in
yes)
checkdir $fromdir
(cd $fromdir
$findprog . -type d -print | \
$sedprog -e 's|^\./||' | \
while read d; do
case "$d" in
"") continue ;;
esac
if [ $verbose -gt 0 ]; then
echo "$mkdirprog -p $todir/$d"
fi
$doit $mkdirprog -p $todir/$d > /dev/null 2>&1
done
$findprog . ! -type d -print | \
$sedprog -e 's|^\./||' | \
while read f; do
ignore=no
for i in $ignorefiles; do
case $f in
$i) ignore=yes; break ;;
esac
done
case $ignore in
no)
if [ $verbose -gt 0 ]; then
echo "$lnprog ${linktype} $fromdir/$f $todir/$f"
fi
$doit $lnprog ${linktype} $fromdir/$f $todir/$f ;;
esac
done)
;;
esac
exit 0

View File

@@ -1,276 +0,0 @@
.\" $NetBSD: pkg_view.1,v 1.14 2013/07/20 21:50:53 wiz Exp $
.\"
.\" Copyright (c) 2003 The NetBSD Foundation, Inc.
.\" All rights reserved.
.\"
.\" 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.
.\" 3. All advertising materials mentioning features or use of this software
.\" must display the following acknowledgement:
.\" This product includes software developed by the NetBSD
.\" Foundation, Inc. and its contributors.
.\" 4. Neither the name of The NetBSD Foundation nor the names of its
.\" contributors may be used to endorse or promote products derived
.\" from this software without specific prior written permission.
.\"
.\" 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 September 8, 2003
.Dt PKG_VIEW 1
.Os
.Sh NAME
.Nm pkg_view
.Nd add and delete instances of depoted packages in views
.Sh SYNOPSIS
.Nm
.Op Fl nVv
.Op Fl d Ar stowdir
.Op Fl i Ar ignore
.Op Fl k Ar pkg_dbdir
.Op Fl W Ar viewbase
.Op Fl w Ar view
.Ar command
.Ar package ...
.Sh DESCRIPTION
The
.Nm
command is used to add and delete instances of depoted packages in
.Ar stowdir
in a
.Ar view
in the
.Ar viewbase
directory.
.Sh WARNING
.Bf -emphasis
Since the
.Nm
command may execute scripts or programs provided by a package file,
your system may be susceptible to
.Dq Trojan horses
or other subtle
attacks from miscreants who create dangerous package files.
.Pp
You are advised to verify the competence and identity of those who
provide installable package files.
For extra protection, examine all the package control files in the
package database directory
.Pa ( /usr/pkg/packages/\*[Lt]pkg-name\*[Gt]/ ) .
Pay particular attention to any
.Pa +INSTALL
or
.Pa +DEINSTALL
files, and inspect the
.Pa +CONTENTS
file for
.Cm @cwd ,
.Cm @mode
(check for setuid),
.Cm @dirrm ,
.Cm @exec ,
and
.Cm @unexec
directives, and/or use the
.Xr pkg_info 1
command to examine the installed package control files.
.Ef
.Sh OPTIONS
The following command-line options are supported:
.Bl -tag -width indent
.It Fl d Ar stowdir
Set
.Ar stowdir
as the directory in which the depoted packages can be found.
If this option isn't specified, then the
.Ar stowdir
is taken from the value of the environment variable
.Ev DEPOTBASE
if it's set, otherwise the default
.Ar stowdir
is the path to the
.Pa packages
directory under
.Ar viewbase .
.It Fl i Ar ignore
Add
.Ar ignore
to the list of files in
.Ar package
that should ignored when adding or removing the package instance from
.Ar view .
.It Fl k Ar pkg_dbdir
Override the value of the
.Dv PKG_DBDIR
configuration option with the value
.Ar pkg_dbdir .
This is used as as the package database directory for the
default (empty) view.
.It Fl n
Don't actually execute the commands for manipulating the package instances.
.It Fl V
Print the version number and exit.
.It Fl v
Turn on verbose output.
Specifying
.Fl v
multiple times increases the level of verbosity.
.It Fl W Ar viewbase
Set
.Ar viewbase
as the directory in which all the views are managed.
The default
.Ar viewbase
directory is
.Pa /usr/pkg
but may be overridden by the
.Ev LOCALBASE
environment variable.
.It Fl w Ar view
Set
.Ar view
as the directory in
.Ar viewbase
in which the package instances should be added or deleted.
The default
.Ar view
is the empty view but may be overridden by the
.Ev PKG_VIEW
environment variable.
.El
.Pp
The following commands are supported:
.Bl -tag -width indent
.It Cm add
Add the listed package instances into
.Ar view .
.It Cm check
Check whether the listed package instances are present in
.Ar view .
If they are not present, then return 0, otherwise return 1.
.It Cm delete
Delete the listed package instances from
.Ar view .
.El
.Sh ENVIRONMENT
.Bl -tag -width indent
.It Ev DEPOTBASE
This is the location of the
.Ar stowdir
directory inside which all depoted packages are kept.
The default
.Ar stowdir
is the
.Pa packages
directory under
.Ar viewbase .
.It Ev LOCALBASE
This is the location of the
.Ar viewbase
directory in which all the views are managed.
The default
.Ar viewbase
directory is
.Pa /usr/pkg .
.It Ev PKG_DBDIR
If the
.Fl k
flag isn't given, then the value of the environment variable
.Ev PKG_DBDIR
is the package database directory for the default view,
otherwise it defaults to
.Pa /var/db/pkg .
.It Ev PLIST_IGNORE_FILES
This can be used to specify files in
.Ar package
that should ignored when adding or removing the package instance from
.Ar view .
.Ev PLIST_IGNORE_FILES
is a space-separated list of shell glob patterns that match files relative
to the
.Ar package
depot directory, and it defaults to "info/dir *[~#] *.OLD *.orig *,v".
This is overridden by any
.Ev _PLIST_IGNORE_FILES
setting in a package's
.Ar build-info-file
(see
.Xr pkg_create 1 )
if it exists.
.It Ev PKG_VIEW
The default view can be specified in the
.Ev PKG_VIEW
environment variable.
.El
.Sh FILES
.Bl -tag -width indent
.It Pa \*[Lt]pkg-dbdir\*[Gt]/\*[Lt]package\*[Gt]/+INSTALL
If the package contains an
.Ar install
script (see
.Xr pkg_create 1 ) ,
then after the package instance is added into a view, the script is
executed with the following arguments:
.Bl -tag -width package
.It Ar package
The name of the package instance being added.
.It Cm VIEW-INSTALL
Keyword denoting that the script is to perform any actions needed after
the package instance is added to a view.
.El
.Pp
If the
.Ar install
script exits with a non-zero status code, the installation is terminated.
.It Pa \*[Lt]pkg-dbdir\*[Gt]/\*[Lt]package\*[Gt]/+DEINSTALL
If the package contains an
.Ar deinstall
script (see
.Xr pkg_create 1 ) ,
then before the package instance is deleted from a view, the script is
executed with the following arguments:
.Bl -tag -width package
.It Ar package
The name of the package instance being deleted.
.It Cm VIEW-DEINSTALL
Keyword denoting that the script is to perform any actions needed before
the package instance is deleted from a view.
.El
.Pp
If the
.Ar deinstall
script exits with a non-zero status code, the de-installation is terminated.
.El
.Pp
The
.Ar install
and
.Ar deinstall
scripts are called with the environment variable
.Ev PKG_PREFIX
set to the path to the
.Ar view
directory.
.Sh SEE ALSO
.Xr linkfarm 1 ,
.Xr pkg_delete 1
.Sh AUTHORS
The
.Nm
utility was written by
.An Alistair G. Crooks Aq Mt agc@NetBSD.org .

View File

@@ -1,276 +0,0 @@
#! /bin/sh
# $NetBSD: pkg_view.sh.in,v 1.7 2006/06/27 23:36:14 hubertf Exp $
#
# Copyright (c) 2001 Alistair G. Crooks. All rights reserved.
#
# 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.
# 3. All advertising materials mentioning features or use of this software
# must display the following acknowledgement:
# This product includes software developed by Alistair G. Crooks.
# 4. The name of the author may not be used to endorse or promote
# products derived from this software without specific prior written
# permission.
#
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
# set -x
prefix="@prefix@"
exec_prefix="@exec_prefix@"
sbindir="@sbindir@"
# set up program definitions
chmodprog="@CHMOD@"
cmpprog="@CMP@"
cpprog="@CP@"
envprog="@ENV@"
findprog="@FIND@"
grepprog="@GREP@"
linkfarmprog="@sbindir@/linkfarm"
lnprog="@LN@"
mkdirprog="@MKDIR@"
paxprog="@pax@"
pkgadminprog="@sbindir@/pkg_admin"
pkginfoprog="@sbindir@/pkg_info"
rmprog="@RM@"
rmdirprog="@RMDIR@"
sedprog="@SED@"
touchprog="@TOUCH@"
usage() {
echo 'Usage: pkg_view [-nVv] [-d stowdir] [-i ignore] [-k pkg_dbdir] [-W viewbase]'
echo ' [-w viewname] add|check|delete pkgname...'
exit 1
}
version() {
$pkginfoprog -V
exit 0
}
checkpkg() {
if [ ! -d "$2/$1" ]; then
echo "pkg_view: \`$1' doesn't exist in \`$2'" 1>&2
exit 1
fi
}
#########################################
# Initialization and Options Processing #
#########################################
doit=""
stowdir=""
viewbase=${LOCALBASE:-/usr/pkg}
view=${PKG_VIEW:-""}
dflt_ignorefiles=${PLIST_IGNORE_FILES:-"info/dir *[~#] *.OLD *.orig *,v"}
dflt_pkg_dbdir=${PKG_DBDIR:-/var/db/pkg}
ignorefiles=""
verbose=0
while [ $# -gt 0 ]; do
case "$1" in
-d) stowdir=$2; shift ;;
-d*) stowdir=`echo $1 | $sedprog -e 's|^-d||'` ;;
-i) ignorefiles="$ignorefiles $2"; shift ;;
-i*) ignorefiles="$ignorefiles `echo $1 | $sedprog -e 's|^-i||'`" ;;
-k) dflt_pkg_dbdir="$2"; shift ;;
-k*) dflt_pkg_dbdir=`echo $1 | $sedprog -e 's|^-k||'` ;;
-n) doit=":" ;;
-V) version ;;
-v) verbose=`expr $verbose + 1` ;;
-W) viewbase=$2; shift ;;
-W*) viewbase=`echo $1 | $sedprog -e 's|^-p||'` ;;
-w) view=$2; shift ;;
--view=*) view=`echo $1 | $sedprog -e 's|--view=||'` ;;
--) shift; break ;;
*) break ;;
esac
shift
done
if [ $# -lt 1 ]; then
usage
fi
# echoN will actually give output if ${verbose} > N.
echo1=":"
echo2=":"
if [ ${verbose} -gt 0 ]; then echo1=echo; fi
if [ ${verbose} -gt 1 ]; then echo2=echo; fi
action=""
case "$1" in
add) action=add ;;
check) action=check ;;
delete|rm) action=delete ;;
*) usage ;;
esac
shift
# if standard view, put package info into ${dflt_pkg_dbdir}
# if not standard view, put package info into view's pkgdb
case "$view" in
"")
pkg_dbdir=${dflt_pkg_dbdir}
targetdir=${viewbase}
viewstr="the standard view"
;;
*)
pkg_dbdir=${viewbase}/${view}/.pkgdb
targetdir=${viewbase}/${view}
viewstr="view \"${view}\""
;;
esac
# Use stowdir if it's given, else fall back to ${DEPOTBASE} or else
# default to ${viewbase}/packages.
#
depot_pkg_dbdir=${stowdir:-${DEPOTBASE:-${viewbase}/packages}}
case "${depot_pkg_dbdir}" in
${pkg_dbdir})
echo "pkg_view: the depot and the view package database directories are the same" 1>&2
exit 1
;;
esac
##########################
# Shell helper functions #
##########################
# symlinks check|add|delete <pkg>
#
# Calls linkfarm(1) to check, add or delete the symlink farm in
# ${targetdir}. We also ignore the right set of files when doing the
# linkfarm operations.
#
symlinks() {
pkg=$2
case "$1" in
add) linkfarmflags="" ;;
check) linkfarmflags="-c" ;;
delete) linkfarmflags="-D" ;;
esac
if [ -f ${depot_pkg_dbdir}/$pkg/+BUILD_INFO ]; then
ignore=`$grepprog "^_PLIST_IGNORE_FILES=" ${depot_pkg_dbdir}/$pkg/+BUILD_INFO | $sedprog -e 's|^_PLIST_IGNORE_FILES=[ ]*||'`
fi
case "$ignore" in
"") ignore="${dflt_ignorefiles}" ;;
esac
dbs=`(cd ${depot_pkg_dbdir}/$pkg; echo +*)`
ignore="${ignore} ${ignorefiles} $dbs"
$doit $envprog PLIST_IGNORE_FILES="${ignore}" $linkfarmprog $linkfarmflags --target=${targetdir} --dir=${depot_pkg_dbdir} $pkg
}
#############
# Main Loop #
#############
while [ $# -gt 0 ]; do
case $action in
add)
checkpkg $1 ${depot_pkg_dbdir}
if [ -f ${pkg_dbdir}/$1/+DEPOT ]; then
echo "pkg_view: \`$1' already exists in $viewstr" 1>&2
exit 1
fi
$echo1 "Adding $1 to ${targetdir}."
symlinks add $1
$doit $mkdirprog -p ${depot_pkg_dbdir}/$1
temp=${depot_pkg_dbdir}/$1/+VIEWS.$$
$doit $touchprog ${depot_pkg_dbdir}/$1/+VIEWS
$doit $cpprog ${depot_pkg_dbdir}/$1/+VIEWS ${temp}
case "$doit" in
"") ($grepprog -v '^'${pkg_dbdir}'$' ${temp} || true; echo ${pkg_dbdir}) > ${depot_pkg_dbdir}/$1/+VIEWS ;;
esac
$doit $rmprog ${temp}
$doit $mkdirprog -p ${pkg_dbdir}/$1
#
# Copy all of the metadata files except for +VIEWS,
# which is only for the depoted package, and
# +REQUIRED_BY, which is irrelevant for a package in
# a view.
#
case "$doit" in
"") (cd ${depot_pkg_dbdir}/$1; $paxprog -rwpe '-s|\./+VIEWS$||' '-s|\./+REQUIRED_BY$||' ./+* ${pkg_dbdir}/$1)
$sedprog -e 's|'${depot_pkg_dbdir}/$1'|'${targetdir}'|g' < ${depot_pkg_dbdir}/$1/+CONTENTS > ${pkg_dbdir}/$1/+CONTENTS
echo "${depot_pkg_dbdir}/$1" > ${pkg_dbdir}/$1/+DEPOT
;;
esac
$doit $pkgadminprog -K ${pkg_dbdir} add $1
if [ -f ${pkg_dbdir}/$1/+INSTALL ]; then
$doit $chmodprog +x ${pkg_dbdir}/$1/+INSTALL
$doit $envprog -i PKG_PREFIX=${targetdir} ${pkg_dbdir}/$1/+INSTALL $1 VIEW-INSTALL
ec=$?
if [ $ec != 0 ]; then
echo "pkg_view: install script returned an error." 1>&2
exit $ec
fi
fi
;;
check)
checkpkg $1 ${depot_pkg_dbdir}
$echo1 "Checking $1 in ${targetdir}."
symlinks check $1
exit $?
;;
delete)
checkpkg $1 ${depot_pkg_dbdir}
if [ ! -f ${pkg_dbdir}/$1/+DEPOT ]; then
echo "pkg_view: \`$1' doesn't exist in $viewstr" 1>&2
exit 1
fi
$echo1 "Deleting $1 from ${targetdir}."
if [ -f ${pkg_dbdir}/$1/+REQUIRED_BY ]; then
if $cmpprog -s ${pkg_dbdir}/$1/+REQUIRED_BY /dev/null; then
: # not really required by another pkg
else
(echo "pkg_view: \`$1' is required by other packages:"
$sedprog -e 's|^| |' ${pkg_dbdir}/$1/+REQUIRED_BY) 1>&2
exit 1
fi
fi
if [ -f ${pkg_dbdir}/$1/+DEINSTALL ]; then
$doit $chmodprog +x ${pkg_dbdir}/$1/+DEINSTALL
$doit $envprog -i PKG_PREFIX=${targetdir} ${pkg_dbdir}/$1/+DEINSTALL $1 VIEW-DEINSTALL
ec=$?
if [ $ec != 0 ]; then
echo "pkg_view: de-install script returned an error." 1>&2
exit $ec
fi
fi
symlinks delete $1
temp=${depot_pkg_dbdir}/$1/+VIEWS.$$
$doit $cpprog ${depot_pkg_dbdir}/$1/+VIEWS ${temp}
case "$doit" in
"") ($grepprog -v '^'${pkg_dbdir}'$' ${temp} || true) > ${depot_pkg_dbdir}/$1/+VIEWS ;;
esac
$doit $rmprog ${temp}
$doit $rmprog -rf ${pkg_dbdir}/$1
$doit $pkgadminprog -K ${pkg_dbdir} delete $1
;;
esac
shift
done
exit 0