Mark all files dead that should never have been imported.

This commit is contained in:
joerg 2018-03-27 23:11:25 +00:00
parent 456aa9858b
commit 9fdc611c5c
24 changed files with 0 additions and 12282 deletions

View File

@ -1,24 +0,0 @@
# $NetBSD: Makefile.in,v 1.1.1.1 2018/02/04 08:20:39 maya Exp $
BOOTSTRAP= @bootstrap@
.if empty(BOOTSTRAP)
SUBDIRS= lib add admin create delete info
.else
SUBDIRS= lib add admin create info
.endif
all:
@for dir in $(SUBDIRS); do \
( cd $$dir && $(MAKE) $@ ) || exit 1; \
done
install clean:
@for dir in $(SUBDIRS); do \
( cd $$dir && $(MAKE) $@ ) || exit 1; \
done
distclean: clean
rm -f config.log config.status configure.lineno
rm -f Makefile */Makefile
rm -f lib/config.h lib/pkg_install.conf.5 lib/pkg_install.conf.cat

View File

@ -1,21 +0,0 @@
# $NetBSD: README,v 1.1.1.1 2018/02/04 08:20:39 maya Exp $
# Original from FreeBSD, no rcs id.
This is the pkg_install suite of tools for doing maintainance of
software "packages". More documentation is available in the man pages
for each individual command.
This code was written by Jordan Hubbard for FreeBSD, snatched and
mildly reshaped by John Kohl in NetBSD and the changes taken back into
FreeBSD again by Jordan, who then proceeded to add another couple
of dozen features on top. Whee! :-)
In another round of enhancements, NetBSD changes were added by
Alistair Crooks, Hubert Feyrer, Thorsten Frueauf, Rene Hexel,
Christian E. Hopps, Thomas Klausner, Johnny Lam, Matthias Scheler and
Adrian Portelli.
When making snapshots, please modify PKGTOOLS_VERSION in lib/version.h
to that day's date.
pkgsrc/pkgtools/pkg_install is the canonical location for these sources.

View File

@ -1,65 +0,0 @@
# $NetBSD: Makefile.in,v 1.1.1.1 2018/02/04 08:20:42 maya Exp $
srcdir= @srcdir@
prefix= @prefix@
exec_prefix= @exec_prefix@
sbindir= @sbindir@
mandir= @mandir@
datarootdir= @datarootdir@
man1dir= $(mandir)/man1
cat1dir= $(mandir)/cat1
CC= @CC@
CCLD= $(CC)
CPPFLAGS= @CPPFLAGS@ -I. -I$(srcdir) -I../lib
DEFS= @DEFS@ -DOPSYS_NAME=\"$(OPSYS)\" -DPKGSRC_MACHINE_ARCH=\"$(PKGSRC_MACHINE_ARCH)\" -DBINDIR=\"$(sbindir)\"
CFLAGS= @CFLAGS@
LDFLAGS= @LDFLAGS@ -L../lib
BOOTSTRAP= @bootstrap@
SSL_SUPPORT= @ssl_support@
.if empty(BOOTSTRAP)
LIBS= -linstall -lnetpgpverify -larchive -lbz2 -lz -lfetch
.if !empty(SSL_SUPPORT)
LIBS+= -lssl -lcrypto
CPPFLAGS+= -DHAVE_SSL
.endif
LIBS+= @LIBS@
.else
LIBS= -linstall ${STATIC_LIBARCHIVE} @LIBS@
CPPFLAGS+= -DBOOTSTRAP
.endif
INSTALL= @INSTALL@
PROG= pkg_add
OBJS= main.o perform.o
all: $(PROG)
.c.o:
$(CC) $(DEFS) $(CPPFLAGS) $(CFLAGS) -c $<
$(PROG): $(OBJS)
$(CCLD) $(LDFLAGS) -o $@ $(OBJS) $(LIBS)
clean:
rm -f $(OBJS) $(PROG)
install:
$(INSTALL) -m 755 -d ${DESTDIR}$(sbindir)
$(INSTALL) -m 755 -d ${DESTDIR}$(man1dir)
$(INSTALL) $(PROG) ${DESTDIR}$(sbindir)/$(PROG)
$(INSTALL) -m 444 $(PROG).1 ${DESTDIR}$(man1dir)/$(PROG).1
.if defined(MANINSTALL) && !empty(MANINSTALL:Mcatinstall)
$(INSTALL) -m 755 -d ${DESTDIR}$(cat1dir)
. if defined(CATMAN_SECTION_SUFFIX) && !empty(CATMAN_SECTION_SUFFIX:M[Yy][Ee][Ss])
$(INSTALL) -m 444 $(PROG).cat ${DESTDIR}$(cat1dir)/$(PROG).1
. else
$(INSTALL) -m 444 $(PROG).cat ${DESTDIR}$(cat1dir)/$(PROG).0
. endif
.endif

View File

@ -1,267 +0,0 @@
PKG_ADD(1) General Commands Manual PKG_ADD(1)
NNAAMMEE
ppkkgg__aadddd - a utility for installing and upgrading software package
distributions
SSYYNNOOPPSSIISS
ppkkgg__aadddd [--AAffhhIInnRRUUuuVVvv] [--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,
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
_w_i_t_h_i_n _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_, _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 _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
The following command line arguments are supported:
_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
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
ppkkgg__aaddmmiinn sseett aauuttoommaattiicc==YYEESS
to mark packages this way after installation, and
ppkkgg__aaddmmiinn uunnsseett aauuttoommaattiicc
to remove the mark. If you ppkkgg__aadddd a package without specifying
--AA after it had already been automatically installed, the mark is
removed.
--CC _c_o_n_f_i_g
Read the configuration file from _c_o_n_f_i_g instead of the system
default.
--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.
--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
overrides the fatal error when the operating system or
architecture the package was built on differ from that of the
host.
--hh Display help and exit.
--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.
--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
would be taken if it was.
--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(8).
--pp _p_r_e_f_i_x
Override the prefix stored in the package with _p_r_e_f_i_x.
--RR Do not record the installation of a package. This implies --II.
This means that you cannot deinstall it later, so only use this
option if you know what you are doing!
--UU Replace an already installed version from a package. Implies --uu.
--uu If the package that's being installed is already installed, an
update is performed. Installed dependent packages are updated
recursively, if they are too old to fulfill the dependencies of
the to-be-installed version. See below for a more detailed
description of the process.
--VV Print version number and exit.
--vv Turn on verbose output.
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/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 list")
to memory and then runs through the following sequence to fully 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,
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
option is given, it's assumed the package should be replaced
by the new version instead. Before doing so, all packages
that depend on the pkg being upgraded are checked if they also
work with the new version. If that test is not successful,
the dependent packages are updated first. The replacing is
then prepared by moving an existing _+_R_E_Q_U_I_R_E_D___B_Y file aside
(if it exists), and running pkg_delete(1) on the installed
package. Installation then proceeds as if the package was not
installed, and restores the _+_R_E_Q_U_I_R_E_D___B_Y file afterwards.
2. The package build information is extracted from the
_+_B_U_I_L_D___I_N_F_O file and compared against the result of uname(3).
If the operating system or architecture of the package differ
from that of the host, installation is aborted. This behavior
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
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
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
installation is terminated.
6. All package dependencies (from @@ppkkggddeepp directives, see
pkg_create(1)) are read from the packing list. If any of
these required packages are not currently installed, an
attempt is made to find and install it; if the missing package
cannot be found or installed, the installation is terminated.
7. If the package contains an _i_n_s_t_a_l_l script, it is executed with
the following arguments:
_p_k_g_-_n_a_m_e The name of the package being installed.
PPRREE--IINNSSTTAALLLL Keyword denoting that the script is to perform
any actions needed before the package is
installed.
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
prefix.
9. If an _i_n_s_t_a_l_l script exists for the package, it is executed
with the following arguments:
_p_k_g___n_a_m_e The name of the package being installed.
PPOOSSTT--IINNSSTTAALLLL Keyword denoting that the script is to perform
any actions needed after the package has been
installed.
10. After installation is complete, a copy of the packing list,
_d_e_i_n_s_t_a_l_l script, description, and display files are copied
into _<_P_K_G___D_B_D_I_R_>_/_<_p_k_g_-_n_a_m_e_> for subsequent possible use by
pkg_delete(1). Any package dependencies are recorded in the
other packages' _+_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.
The _i_n_s_t_a_l_l script is 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 directory where the package is installed, even if the user might
change it with the --pp flag to ppkkgg__aadddd. 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__aadddd, PKG_DESTDIR will be set to _d_e_s_t_d_i_r.
Additionally, PKG_METADATA_DIR and PKG_REFCOUNT_DBDIR are prefixed with
_d_e_s_t_d_i_r.
EENNVVIIRROONNMMEENNTT
See pkg_install.conf(5) for options, that can also be specified using the
environment.
EEXXAAMMPPLLEESS
In all cases, ppkkgg__aadddd will try to install binary packages listed in
dependencies list.
You can specify a compiled binary package explicitly on the command line.
# pkg_add /usr/pkgsrc/packages/All/tcsh-6.14.00.tgz
If you omit the version number, ppkkgg__aadddd will install the latest version
available. With --vv, ppkkgg__aadddd emits more messages to terminal.
# pkg_add -v /usr/pkgsrc/packages/All/unzip
You can grab a compiled binary package from remote location by specifying
a URL. The base URL can also be provided by the configuration variable,
PKG_PATH.
# pkg_add -v ftp://ftp.NetBSD.org/pub/pkgsrc/packages/NetBSD/i386/3.1_2007Q2/All/firefox-2.0.0.4.tgz
# export PKG_PATH=ftp://ftp.NetBSD.org/pub/pkgsrc/packages/NetBSD/i386/3.1_2007Q2/All
# pkg_add -v firefox
SSEEEE AALLSSOO
pkg_admin(1), pkg_create(1), pkg_delete(1), pkg_info(1),
pkg_install.conf(5), pkgsrc(7)
AAUUTTHHOORRSS
Jordan Hubbard
Initial work and ongoing development.
John Kohl
NetBSD refinements.
Hubert Feyrer
NetBSD wildcard dependency processing, pkgdb, upgrading, etc.
Thomas Klausner
HTTP support.
Joerg Sonnenberger
Rewrote most of the code base to work without external commands.
BBUUGGSS
Package upgrading needs a lot more work to be really universal.
Sure to be others.
pkgsrc March 21, 2018 pkgsrc

View File

@ -1,86 +0,0 @@
# $NetBSD: Makefile.in,v 1.1.1.1 2018/02/04 08:20:43 maya Exp $
srcdir= @srcdir@
prefix= @prefix@
exec_prefix= @exec_prefix@
sbindir= @sbindir@
mandir= @mandir@
datarootdir= @datarootdir@
man1dir= $(mandir)/man1
cat1dir= $(mandir)/cat1
man8dir= $(mandir)/man8
cat8dir= $(mandir)/cat8
BOOTSTRAP= @bootstrap@
SSL_SUPPORT= @ssl_support@
CC= @CC@
CCLD= $(CC)
DEFS= @DEFS@
CFLAGS= @CFLAGS@
LDFLAGS= @LDFLAGS@ -L../lib
INSTALL= @INSTALL@
PROG= pkg_admin
SCRIPTS= audit-packages download-vulnerability-list
CPPFLAGS= @CPPFLAGS@ -I. -I$(srcdir) -I../lib
.if empty(BOOTSTRAP)
LIBS= -linstall -lnetpgpverify -larchive -lbz2 -lz -lfetch
.if !empty(SSL_SUPPORT)
LIBS+= -lssl -lcrypto
CPPFLAGS+= -DHAVE_SSL
.endif
LIBS+= @LIBS@
OBJS= audit.o check.o main.o
.else
LIBS= -linstall @LIBS@
OBJS= check.o main.o
CPPFLAGS+= -DBOOTSTRAP
.endif
all: $(PROG) $(SCRIPTS)
.c.o:
$(CC) $(DEFS) $(CPPFLAGS) $(CFLAGS) -c $<
$(PROG): $(OBJS)
$(CCLD) $(LDFLAGS) -o $@ $(OBJS) $(LIBS)
clean:
rm -f $(OBJS) $(PROG)
install:
$(INSTALL) -m 755 -d ${DESTDIR}$(sbindir)
$(INSTALL) -m 755 -d ${DESTDIR}$(man1dir)
$(INSTALL) -m 755 -d ${DESTDIR}$(man8dir)
$(INSTALL) $(PROG) ${DESTDIR}$(sbindir)/$(PROG)
$(INSTALL) -m 555 $(SCRIPTS) ${DESTDIR}$(sbindir)
$(INSTALL) -m 444 $(PROG).1 ${DESTDIR}$(man1dir)/$(PROG).1
$(INSTALL) -m 444 audit-packages.8 ${DESTDIR}$(man8dir)/
$(INSTALL) -m 444 download-vulnerability-list.8 ${DESTDIR}$(man8dir)/
.if defined(MANINSTALL) && !empty(MANINSTALL:Mcatinstall)
$(INSTALL) -m 755 -d ${DESTDIR}$(cat1dir)
$(INSTALL) -m 755 -d ${DESTDIR}$(cat8dir)
. if defined(CATMAN_SECTION_SUFFIX) && !empty(CATMAN_SECTION_SUFFIX:M[Yy][Ee][Ss])
$(INSTALL) -m 444 $(PROG).cat ${DESTDIR}$(cat1dir)/$(PROG).1
$(INSTALL) -m 444 audit-packages.cat ${DESTDIR}$(cat8dir)/audit-packages.8
$(INSTALL) -m 444 download-vulnerability-list.cat ${DESTDIR}$(cat8dir)/download-vulnerability-list.8
. else
$(INSTALL) -m 444 $(PROG).cat ${DESTDIR}$(cat1dir)/$(PROG).0
$(INSTALL) -m 444 audit-packages.cat ${DESTDIR}$(cat8dir)/audit-packages.0
$(INSTALL) -m 444 download-vulnerability-list.cat ${DESTDIR}$(cat8dir)/download-vulnerability-list.0
. endif
.endif
audit-packages: audit-packages.sh.in
sed -e 's|@PKG_ADMIN@|${sbindir}/pkg_admin|' \
${.CURDIR}/audit-packages.sh.in > $@
download-vulnerability-list: download-vulnerability-list.sh.in
sed -e 's|@PKG_ADMIN@|${sbindir}/pkg_admin|' \
${.CURDIR}/download-vulnerability-list.sh.in > $@

View File

@ -1,22 +0,0 @@
AUDIT-PACKAGES(8) NetBSD System Manager's Manual AUDIT-PACKAGES(8)
NNAAMMEE
aauuddiitt--ppaacckkaaggeess -- report vulnerabilities for the installed packages
SSYYNNOOPPSSIISS
aauuddiitt--ppaacckkaaggeess [--ddeeqqssVVvv] [--cc _c_o_n_f_i_g___f_i_l_e] [--FF _f_i_l_e] [--gg _f_i_l_e] [--hh _f_i_l_e]
[--KK _p_k_g___d_b_d_i_r] [--nn _p_a_c_k_a_g_e] [--pp _p_a_c_k_a_g_e] [--QQ _v_a_r_n_a_m_e]
[--tt _t_y_p_e]
DDEESSCCRRIIPPTTIIOONN
aauuddiitt--ppaacckkaaggeess is deprecated. Please use the aauuddiitt, aauuddiitt--ppkkgg,
aauuddiitt--bbaattcchh, and ffeettcchh--ppkkgg--vvuullnneerraabbiilliittiieess commands of pkg_admin(1)
instead.
The aauuddiitt--ppaacckkaaggeess script is installed for backwards compatibility only
and will eventually be removed.
SSEEEE AALLSSOO
pkg_admin(1)
NetBSD 5.0 March 18, 2010 NetBSD 5.0

View File

@ -1,20 +0,0 @@
DOWNLOAD-VULNERABILI... NetBSD System Manager's Manual DOWNLOAD-VULNERABILI...
NNAAMMEE
ddoowwnnllooaadd--vvuullnneerraabbiilliittyy--lliisstt -- download vulnerability list used for
checking installed packages
SSYYNNOOPPSSIISS
ddoowwnnllooaadd--vvuullnneerraabbiilliittyy--lliisstt [--hhss] [--cc _c_o_n_f_i_g___f_i_l_e]
DDEESSCCRRIIPPTTIIOONN
ddoowwnnllooaadd--vvuullnneerraabbiilliittyy--lliisstt is deprecated. Please use the
ffeettcchh--ppkkgg--vvuullnneerraabbiilliittiieess command of pkg_admin(1) instead.
The ddoowwnnllooaadd--vvuullnneerraabbiilliittyy--lliisstt script is installed for backwards compat-
ibility only and will eventually be removed.
SSEEEE AALLSSOO
pkg_admin(1)
NetBSD 5.0 March 18, 2010 NetBSD 5.0

View File

@ -1,209 +0,0 @@
PKG_ADMIN(1) General Commands Manual PKG_ADMIN(1)
NNAAMMEE
ppkkgg__aaddmmiinn - perform various administrative tasks to the pkg system
SSYYNNOOPPSSIISS
ppkkgg__aaddmmiinn [--bbqqSSVVvv] [--CC _c_o_n_f_i_g] [--dd _l_s_d_i_r] [--KK _p_k_g___d_b_d_i_r] [--ss _s_f_x___p_a_t_t_e_r_n]
_c_o_m_m_a_n_d [args ...]
DDEESSCCRRIIPPTTIIOONN
This command performs various administrative tasks around the NetBSD
Packages System.
OOPPTTIIOONNSS
The following command-line options are supported:
--bb Print only the base names when matching package names for llssaallll
and llssbbeesstt.
--CC _c_o_n_f_i_g
Read the configuration file from _c_o_n_f_i_g instead of the system
default.
--dd _l_s_d_i_r
Set _l_s_d_i_r as the path to the directory in which to find matching
package names for llssaallll and llssbbeesstt.
--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.
--qq Perform checks in a quiet manner. In normal operation, ppkkgg__aaddmmiinn
prints a `.' to standard output to indicate progress. This
option suppresses this progress indicator.
--SS Set the shell glob pattern for package suffixes when matching
package names for llssaallll and llssbbeesstt to be the null suffix.
--ss _s_f_x___p_a_t_t_e_r_n
Set the shell glob pattern for package suffixes when matching
package names for llssaallll and llssbbeesstt. The default pattern is
".t[bg]z".
--VV Print version number and exit.
--vv Be more verbose.
The following commands are supported:
aauuddiitt [--eeiiss] [--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 --ii is given, any advisory ignored by IGNORE_URL
in pkg_install.conf(5) is included but flagged as "ignored". 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 [--eeiiss] [--tt _t_y_p_e] [_p_k_g] ...
Like aauuddiitt, but check only the given package names or patterns.
aauuddiitt--bbaattcchh [--eeiiss] [--tt _t_y_p_e] [_p_k_g_-_l_i_s_t] ...
Like aauuddiitt--ppkkgg, but read the package names or patterns one per
line from the given files.
aauuddiitt--hhiissttoorryy [--ss] [--tt _t_y_p_e] [_p_k_g_b_a_s_e] ...
Print all vulnerabilities for the given base package names.
cchheecckk [_p_k_g _._._.]
Use this command to check the files belonging to some or all of
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
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
printed if the expected checksum differs from the checksum of the
file on disk. Symbolic links are also checked, ensuring that the
targets on disk are the same as the contents recorded at package
installation time.
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
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
--ss is given, also check the embedded signature.
cchheecckk--ssiiggnnaattuurree _f_i_l_e _._._.
Reports if _f_i_l_e is a correctly signed package.
cchheecckk--ssiinnggllee--lliicceennssee _l_i_c_e_n_s_e
Check if _l_i_c_e_n_s_e is a valid license name and if it is in the set
of acceptable licenses. Prints either yes or no to stdout if the
condition can be parsed, otherwise it exits with error.
ccoonnffiigg--vvaarr _v_a_r_i_a_b_l_e
Print the current value of _v_a_r_i_a_b_l_e as used after parsing the
configuration file.
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
to.
ffeettcchh--ppkkgg--vvuullnneerraabbiilliittiieess [--ssuu]
Fetch a new pkg-vulnerabilities file, check the format and if --ss
is given the signature. If all checks are passed, write it to
pkgdb. If --uu is given, the fetch is conditional and the file
transfer is only done if the remote version is newer than the one
in pkgdb.
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
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
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:
yui# cd /usr/pkgsrc/packages/i386ELF/All/
yui# ls unzip*
unzip-5.40.tgz unzip-5.41.tgz
yui# pkg_admin lsall 'unzip*'
/usr/pkgsrc/packages/i386ELF/All/unzip-5.40.tgz
/usr/pkgsrc/packages/i386ELF/All/unzip-5.41.tgz
yui# pkg_admin lsall 'unzip>=5.40'
/usr/pkgsrc/packages/i386ELF/All/unzip-5.40.tgz
/usr/pkgsrc/packages/i386ELF/All/unzip-5.41.tgz
yui# pkg_admin lsall 'unzip>=5.41'
/usr/pkgsrc/packages/i386ELF/All/unzip-5.41.tgz
yui# pkg_admin lsbest 'unzip>=5.40'
/usr/pkgsrc/packages/i386ELF/All/unzip-5.41.tgz
yui# pkg_admin lsall /usr/pkgsrc/packages/i386ELF/All/'{mit,unproven}-pthread*'
/usr/pkgsrc/packages/i386ELF/All/mit-pthreads-1.60b6.tgz
/usr/pkgsrc/packages/i386ELF/All/unproven-pthreads-0.15.tgz
ppmmaattcchh _p_a_t_t_e_r_n _p_k_g
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, 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
Rebuild the +REQUIRED_BY files from scratch by reresolving all
dependencies.
This option is intended to be used for fixing inconsistencies
between the records of depending and depended-on packages, such
as can arise by the use of ppkkgg__ddeelleettee --ff.
sseett _v_a_r_i_a_b_l_e_=_v_a_l_u_e _p_k_g _._._.
Set variable with information about the installed package. Use
uunnsseett to remove a variable.
Packages that are not installed directly by the user but pulled
in as dependencies are marked by setting "automatic=YES".
ggppgg--ssiiggnn--ppaacckkaaggee ppkkgg ssppkkgg
Sign the binary package _p_k_g using GPG and write the result to
_s_p_k_g.
xx550099--ssiiggnn--ppaacckkaaggee ppkkgg ssppkkgg kkeeyy cceerrtt
Sign the binary package _p_k_g using the key _k_e_y and the certificate
_c_e_r_t, using _s_p_k_g as output file.
uunnsseett _v_a_r_i_a_b_l_e _p_k_g _._._.
Remove an installation variable.
EENNVVIIRROONNMMEENNTT
See pkg_install.conf(5) for options, that can also be specified using the
environment.
FFIILLEESS
_/_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_install.conf(5), pkgsrc(7)
HHIISSTTOORRYY
The ppkkgg__aaddmmiinn command first appeared in NetBSD 1.4.
AAUUTTHHOORRSS
The ppkkgg__aaddmmiinn command was written by Hubert Feyrer.
pkgsrc February 25, 2018 pkgsrc

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,178 +0,0 @@
dnl $NetBSD: configure.ac,v 1.1.1.1 2018/02/04 08:20:42 maya Exp $
dnl Process this file with autoconf to produce a configure script.
AC_PREREQ(2.52)
AC_INIT([pkg_install], [20090911], [joerg@NetBSD.org])
AC_CONFIG_SRCDIR([lib/plist.c])
AC_CONFIG_HEADER(lib/config.h)
AC_CANONICAL_HOST
CANONICAL_HOST=$host
AC_SUBST(CANONICAL_HOST)
AC_SUBST(INCLUDES)
# Checks for programs.
AC_PROG_MAKE_SET
AC_PROG_CC
AC_PROG_INSTALL
AC_PROG_LN_S
AC_PROG_RANLIB
AC_CHECK_PROG(AR, ar, ar)
AC_PATH_PROG(CHMOD, chmod)
AC_PATH_PROG(CMP, cmp)
AC_PATH_PROG(CP, cp)
AC_PATH_PROG(ENV, env)
AC_PATH_PROG(FIND, find)
AC_PATH_PROG(GREP, grep)
AC_PATH_PROG(LN, ln)
AC_PATH_PROG(MKDIR, mkdir)
AC_PATH_PROG(RMDIR, rmdir)
AC_PATH_PROG(RM, rm)
AC_PATH_PROG(SED, sed)
AC_PATH_PROG(SORT, sort)
AC_PATH_PROG(TOUCH, touch)
AUTOCONF=${AUTOCONF-"$srcdir/missing --run autoconf"}
AC_SUBST(AUTOCONF)
AUTOHEADER=${AUTOHEADER-"$srcdir/missing --run autoheader"}
AC_SUBST(AUTOHEADER)
dnl Set the default pkg dbdir
AC_ARG_WITH(pkgdbdir,
[ --with-pkgdbdir=DIR Where to put the pkg database (/var/db/pkg)],
[ pkgdbdir="$with_pkgdbdir" ],
[ pkgdbdir="/var/db/pkg" ])
AC_SUBST(pkgdbdir)
AC_ARG_WITH(ssl,
[ --with-ssl Enable OpenSSL based signature support],
[ ssl_support=yes ],
[ ssl_support= ])
AC_SUBST(ssl_support)
AC_ARG_ENABLE([bootstrap],
[AS_HELP_STRING([--enable-bootstrap], [build minimal version of pkg_install])],
[bootstrap=yes], [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]))
dnl Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS([assert.h ctype.h dirent.h err.h errno.h fcntl.h \
fnmatch.h glob.h grp.h inttypes.h limits.h pwd.h signal.h \
stdarg.h stdio.h stdlib.h string.h time.h unistd.h vis.h])
AC_CHECK_HEADERS([sys/cdefs.h sys/file.h sys/ioctl.h sys/queue.h \
sys/stat.h sys/time.h sys/types.h sys/utsname.h sys/wait.h])
# Checks for library functions.
AC_CHECK_FUNCS([vfork])
AC_SEARCH_LIBS([gethostbyname], [nsl network])
AC_SEARCH_LIBS([socket],
[socket],
[],
[AC_CHECK_LIB([socket],
[socket],
[LIBS="-lsocket -lnsl $LIBS"],
[],
[-lnsl])])
dnl Check for types
AC_TYPE_UINT8_T
AC_TYPE_UINT16_T
AC_TYPE_UINT32_T
AC_TYPE_UINT64_T
need_priu64=no
AC_MSG_CHECKING([for a working PRIu64])
AC_LANG_PUSH([C])
AC_RUN_IFELSE(
[AC_LANG_PROGRAM([[
#include <stdio.h>
#ifdef HAVE_INTTYPES_H
#include <inttypes.h>
#endif
]],
[[
char *x;
#if !defined(PRIu64)
return -1;
#else
x = PRIu64;
if( x[0] == '%' ) {
return -1;
} else {
return 0;
}
#endif
]])],
[
# program worked correctly
AC_MSG_RESULT([yes])
],
[
# program failed
AC_MSG_RESULT([no])
AC_DEFINE([NEED_PRI_MACRO], [1], [Defined when PRIu64 is missing or broken])
need_priu64=yes
],
[
# we are cross compiling
AC_MSG_RESULT([unable to check when crosscompiling])
AC_DEFINE([NEED_PRI_MACRO], [1], [Defined when PRIu64 is missing or broken])
need_priu64=yes
])
AC_LANG_POP([C])
AC_CHECK_SIZEOF(int)
AC_CHECK_SIZEOF(long)
AC_CHECK_SIZEOF(long long)
AC_CHECK_SIZEOF(size_t, [#include <stdlib.h>])
case $host in
*-*-bsdi*|*-*-hpux*|*-*-osf*)
AC_DEFINE(MISSING_SIZE_T_SUPPORT)
AH_TEMPLATE([MISSING_SIZE_T_SUPPORT], [
Define to 1 if the `z' modifider for printf is missing.
])
;;
esac
case $host in
*-*-cygwin*|*-*-dragonfly* |*-*-freebsd*|*-*-linux*)
AC_DEFINE([NUMERIC_VERSION_ONLY], [1], [Defined when to retain only the numeric OS version])
;;
esac
AH_BOTTOM(
#if !HAVE_VFORK
# define vfork fork
#endif
#ifndef MISSING_SIZE_T_SUPPORT
# define PRIzu "zu"
#elif SIZEOF_SIZE_T == SIZEOF_INT
# define PRIzu "u"
#elif SIZEOF_SIZE_T == SIZEOF_LONG
# define PRIzu "lu"
#elif SIZEOF_SIZE_T == SIZEOF_LONG_LONG
# define PRIzu "llu"
#else
# errror "Unknown size_t size"
#endif
)
SYSCONFDIR="$sysconfdir"
AC_SUBST(SYSCONFDIR)
PKG_DBDIR="$pkgdbdir"
AC_SUBST(PKG_DBDIR)
AC_CONFIG_FILES([Makefile add/Makefile admin/Makefile \
create/Makefile delete/Makefile info/Makefile \
lib/Makefile lib/pkg_install.conf.5 lib/pkg_install.conf.cat])
AC_OUTPUT

View File

@ -1,63 +0,0 @@
# $NetBSD: Makefile.in,v 1.1.1.1 2018/02/04 08:20:44 maya Exp $
srcdir= @srcdir@
prefix= @prefix@
exec_prefix= @exec_prefix@
sbindir= @sbindir@
mandir= @mandir@
datarootdir= @datarootdir@
man1dir= $(mandir)/man1
cat1dir= $(mandir)/cat1
BOOTSTRAP= @bootstrap@
CC= @CC@
CCLD= $(CC)
DEFS= @DEFS@
CFLAGS= @CFLAGS@
LDFLAGS= @LDFLAGS@ -L../lib
INSTALL= @INSTALL@
PROG= pkg_create
SSL_SUPPORT= @ssl_support@
CPPFLAGS= @CPPFLAGS@ -I. -I$(srcdir) -I../lib
OBJS= main.o perform.o pl.o util.o build.o
.if empty(BOOTSTRAP)
LIBS= -linstall -lnetpgpverify -larchive -lbz2 -lz -lfetch @LIBS@
.if !empty(SSL_SUPPORT)
LIBS+= -lssl -lcrypto
.endif
.else
LIBS= -linstall ${STATIC_LIBARCHIVE} @LIBS@
CPPFLAGS+= -DBOOTSTRAP
.endif
all: $(PROG)
.c.o:
$(CC) $(DEFS) $(CPPFLAGS) $(CFLAGS) -c $<
$(PROG): $(OBJS)
$(CCLD) $(LDFLAGS) -o $@ $(OBJS) $(LIBS)
clean:
rm -f $(OBJS) $(PROG)
install:
$(INSTALL) -m 755 -d ${DESTDIR}$(sbindir)
$(INSTALL) -m 755 -d ${DESTDIR}$(man1dir)
$(INSTALL) $(PROG) ${DESTDIR}$(sbindir)/$(PROG)
$(INSTALL) -m 444 $(PROG).1 ${DESTDIR}$(man1dir)/$(PROG).1
.if defined(MANINSTALL) && !empty(MANINSTALL:Mcatinstall)
$(INSTALL) -m 755 -d ${DESTDIR}$(cat1dir)
. if defined(CATMAN_SECTION_SUFFIX) && !empty(CATMAN_SECTION_SUFFIX:M[Yy][Ee][Ss])
$(INSTALL) -m 444 $(PROG).cat ${DESTDIR}$(cat1dir)/$(PROG).1
. else
$(INSTALL) -m 444 $(PROG).cat ${DESTDIR}$(cat1dir)/$(PROG).0
. endif
.endif

View File

@ -1,279 +0,0 @@
PKG_CREATE(1) General Commands Manual PKG_CREATE(1)
NNAAMMEE
ppkkgg__ccrreeaattee - a utility for creating software package distributions
SSYYNNOOPPSSIISS
ppkkgg__ccrreeaattee [--llOOVVvv] [--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] [--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
The ppkkgg__ccrreeaattee command is used to create packages that will subsequently
be fed to one of the package extraction/info utilities. The input
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
description of the input syntax is included in this document.
OOPPTTIIOONNSS
The following command line options are supported:
--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
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
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
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
preceded by --, the argument itself. This string should also give
some idea of which version of the product (if any) the package
represents.
--DD _d_i_s_p_l_a_y_f_i_l_e
Display the file after installing the package. Useful for things
like legal notices on almost-free software, etc.
--dd _[_-_]_d_e_s_c
Fetch long description for package from file _d_e_s_c or, if preceded
by --, the argument itself.
--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.
Currently supported values are bzip2, gzip, none and xz.
--ff _p_a_c_k_l_i_s_t
Fetch (packing list) for package from the file _p_a_c_k_l_i_s_t or ssttddiinn
if _p_a_c_k_l_i_s_t is a -- (dash).
--gg _g_r_o_u_p
Make _g_r_o_u_p the default group ownership instead of extracting it
from the file system.
--II _r_e_a_l_p_r_e_f_i_x
Provide the real prefix, as opposed to the staging prefix, for
use in staged installations of packages.
--ii _i_s_c_r_i_p_t
Set _i_s_c_r_i_p_t to be the install procedure for the package. This
can be any executable program (or shell script). It will be
invoked automatically when the package is later installed.
--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.
--kk _d_s_c_r_i_p_t
Set _d_s_c_r_i_p_t to be the de-install procedure for the package. This
can be any executable program (or shell script). It will be
invoked automatically when the package is later (if ever) de-
installed.
--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.
--nn _p_r_e_s_e_r_v_e_-_f_i_l_e
The file is used to denote that the package should not be
deleted. This is intended for use where the deletion of packages
may present a bootstrap problem.
--OO Go into a (packing list only) mode. This is used to do (fake
pkg_add) operations when a package is installed. In such cases,
it is necessary to know what the final, adjusted packing list
will look like.
--PP _d_p_k_g_s
Set the initial package dependency list to _d_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 @@ppkkggddeepp
directives in the packing list (see PACKING LIST DETAILS section
below). In addition, the exact versions of the packages referred
to in the _d_p_k_g_s list will be added to the packing list in the
form of @@bbllddddeepp directives.
--TT _b_u_i_l_d_p_k_g_s
The exact versions of the packages referred to in the _b_u_i_l_d_p_k_g_s
list will be added to the packing list in the form of @@bbllddddeepp
directives. This directives are stored after those created by
the --PP option. _b_u_i_l_d_p_k_g_s is assumed to be a whitespace separated
list of package names.
--pp _p_r_e_f_i_x
Set _p_r_e_f_i_x as the initial directory (base) to start from in
selecting files for the package.
--SS _s_i_z_e_-_a_l_l_-_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 plus any required packages added up and
stored as a ASCII string, terminated by a newline.
--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,
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
string _/_t_m_p_/_i_n_s_t_m_p_._X_X_X_X_X_X, but it may be necessary to override it
in the situation where space in your _/_t_m_p directory is limited.
Be sure to leave some number of `X' characters for mktemp(3) to
fill in with a unique ID.
--uu _o_w_n_e_r
Make _o_w_n_e_r the default owner instead of extracting it from the
file system.
--VV Print version number and exit.
--vv Turn on verbose output.
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
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
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
will be expanded inline. For the following examples, assume that
@@ccwwdd is set to _/_u_s_r_/_l_o_c_a_l and the last extracted file was
_b_i_n_/_e_m_a_c_s.
%%FF Expands to the last filename extracted (as specified), in
the example case _b_i_n_/_e_m_a_c_s
%%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
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.
@@uunneexxeecc _c_o_m_m_a_n_d
Execute _c_o_m_m_a_n_d as part of the deinstallation process. Expansion
of special %% sequences is the same as for @@eexxeecc. This command is
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
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
(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
out of the way, preserving the previous contents (which are also
resurrected on pkg_delete, so caveat emptor).
@@oowwnneerr _u_s_e_r
Set default ownership for all subsequently extracted files to
_u_s_e_r. Use without an arg to set back to default (extraction)
ownership.
@@ggrroouupp _g_r_o_u_p
Set default group ownership for all subsequently extracted files
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
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.
@@nnaammee _n_a_m_e
Set the name of the package. This is mandatory and is usually
put at the top. This name is potentially different than the name
of the file it came in, and is used when keeping track of the
package for later deinstallation. Note that ppkkgg__ccrreeaattee will
derive this field from the _p_k_g_-_n_a_m_e and add it automatically if
none is given.
@@ppkkggddiirr _n_a_m_e
Declare directory _n_a_m_e as managed. If it does not exist at
installation time, it is created. If this directory is no longer
referenced by packages and the last file or directory in it is
deleted, the directory is removed as well.
@@ddiirrrrmm _n_a_m_e
This command is supported for compatibility only. If directory
_n_a_m_e exists, it will be deleted at deinstall time.
@@ddiissppllaayy _n_a_m_e
Declare _n_a_m_e as the file to be displayed at install time (see --DD
above).
@@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
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
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
environment.
SSEEEE AALLSSOO
pkg_add(1), pkg_admin(1), pkg_delete(1), pkg_info(1), pkg_install.conf(5)
pkgsrc(7)
HHIISSTTOORRYY
The ppkkgg__ccrreeaattee command first appeared in FreeBSD.
AAUUTTHHOORRSS
Jordan Hubbard
most of the work
John Kohl
refined it for NetBSD
Hubert Feyrer
NetBSD wildcard dependency processing, pkgdb, pkg size recording
etc.
pkgsrc December 27, 2014 pkgsrc

View File

@ -1,58 +0,0 @@
# $NetBSD: Makefile.in,v 1.1.1.1 2018/02/04 08:20:44 maya Exp $
srcdir= @srcdir@
prefix= @prefix@
exec_prefix= @exec_prefix@
sbindir= @sbindir@
mandir= @mandir@
datarootdir= @datarootdir@
man1dir= $(mandir)/man1
cat1dir= $(mandir)/cat1
SSL_SUPPORT= @ssl_support@
CC= @CC@
CCLD= $(CC)
LIBS= -linstall -lnetpgpverify -larchive -lbz2 -lz -lfetch @LIBS@
.if !empty(SSL_SUPPORT)
LIBS+= -lssl -lcrypto
.endif
CPPFLAGS= @CPPFLAGS@ -I. -I$(srcdir) -I../lib -DBINDIR=\"$(sbindir)\"
DEFS= @DEFS@
CFLAGS= @CFLAGS@
LDFLAGS= @LDFLAGS@ -L../lib
INSTALL= @INSTALL@
PROG= pkg_delete
OBJS= pkg_delete.o
all: $(PROG)
.c.o:
$(CC) $(DEFS) $(CPPFLAGS) $(CFLAGS) -c $<
$(PROG): $(OBJS)
$(CCLD) $(LDFLAGS) -o $@ $(OBJS) $(LIBS)
clean:
rm -f $(OBJS) $(PROG)
install:
$(INSTALL) -m 755 -d ${DESTDIR}$(sbindir)
$(INSTALL) -m 755 -d ${DESTDIR}$(man1dir)
$(INSTALL) $(PROG) ${DESTDIR}$(sbindir)/$(PROG)
$(INSTALL) -m 444 $(PROG).1 ${DESTDIR}$(man1dir)/$(PROG).1
.if defined(MANINSTALL) && !empty(MANINSTALL:Mcatinstall)
$(INSTALL) -m 755 -d ${DESTDIR}$(cat1dir)
. if defined(CATMAN_SECTION_SUFFIX) && !empty(CATMAN_SECTION_SUFFIX:M[Yy][Ee][Ss])
$(INSTALL) -m 444 $(PROG).cat ${DESTDIR}$(cat1dir)/$(PROG).1
. else
$(INSTALL) -m 444 $(PROG).cat ${DESTDIR}$(cat1dir)/$(PROG).0
. endif
.endif

View File

@ -1,163 +0,0 @@
PKG_DELETE(1) General Commands Manual PKG_DELETE(1)
NNAAMMEE
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
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
_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
_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:
_p_k_g_-_n_a_m_e _._._.
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
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. 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 _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. 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
also the --kk option.
--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.
--kk Silently skip all packages that are marked as pprreesseerrvveedd.
--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.
--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
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(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
installed packages which do not explicitly set theirs. For most
packages, the prefix will be set automatically to the installed
location by pkg_add(1).
--RR Recursively remove all packages that were needed by the given
packages and are no longer required. This option overrides the
--AA flag.
--rr Recursively remove all packages that require one of the packages
given.
--VV Print version number and exit.
--vv Turn on verbose output.
TTEECCHHNNIICCAALL DDEETTAAIILLSS
ppkkgg__ddeelleettee does pretty much what it says. It examines installed package
records in _<_P_K_G___D_B_D_I_R_>_/_<_p_k_g_-_n_a_m_e_>, deletes the package contents, and
finally removes the package records.
If a package is required by other installed packages, ppkkgg__ddeelleettee will
list those dependent packages and refuse to delete the package (unless
the --ff option is given).
If a package has been marked as a pprreesseerrvveedd package, it will not be able
to be deleted (unless more than one occurrence of the --ff option is
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(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
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 _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
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
environment.
SSEEEE AALLSSOO
pkg_add(1), pkg_admin(1), pkg_create(1), pkg_info(1), pkg_install.conf(5)
pkgsrc(7)
AAUUTTHHOORRSS
Jordan Hubbard
most of the work
John Kohl
refined it for NetBSD
Hubert Feyrer
NetBSD wildcard dependency processing, pkgdb, recursive "down"
delete, etc.
Joerg Sonnenberger
Rewrote most of the code to compute correct order of
deinstallation and to improve error handling.
pkgsrc December 27, 2014 pkgsrc

View File

@ -1,63 +0,0 @@
# $NetBSD: Makefile.in,v 1.1.1.1 2018/02/04 08:20:45 maya Exp $
srcdir= @srcdir@
prefix= @prefix@
exec_prefix= @exec_prefix@
sbindir= @sbindir@
mandir= @mandir@
datarootdir= @datarootdir@
man1dir= $(mandir)/man1
cat1dir= $(mandir)/cat1
BOOTSTRAP= @bootstrap@
SSL_SUPPORT= @ssl_support@
CC= @CC@
CCLD= $(CC)
CPPFLAGS= @CPPFLAGS@ -I. -I$(srcdir) -I../lib
DEFS= @DEFS@
CFLAGS= @CFLAGS@
LDFLAGS= @LDFLAGS@ -L../lib
.if empty(BOOTSTRAP)
LIBS= -linstall -lnetpgpverify -larchive -lbz2 -lz -lfetch @LIBS@
.if !empty(SSL_SUPPORT)
LIBS+= -lssl -lcrypto
.endif
.else
LIBS= -linstall @LIBS@
CPPFLAGS+= -DBOOTSTRAP
.endif
INSTALL= @INSTALL@
PROG= pkg_info
OBJS= main.o perform.o show.o
all: $(PROG)
.c.o:
$(CC) $(DEFS) $(CPPFLAGS) $(CFLAGS) -c $<
$(PROG): $(OBJS)
$(CCLD) $(LDFLAGS) -o $@ $(OBJS) $(LIBS)
clean:
rm -f $(OBJS) $(PROG)
install:
$(INSTALL) -m 755 -d ${DESTDIR}$(sbindir)
$(INSTALL) -m 755 -d ${DESTDIR}$(man1dir)
$(INSTALL) $(PROG) ${DESTDIR}$(sbindir)/$(PROG)
$(INSTALL) -m 444 $(PROG).1 ${DESTDIR}$(man1dir)/$(PROG).1
.if defined(MANINSTALL) && !empty(MANINSTALL:Mcatinstall)
$(INSTALL) -m 755 -d ${DESTDIR}$(cat1dir)
. if defined(CATMAN_SECTION_SUFFIX) && !empty(CATMAN_SECTION_SUFFIX:M[Yy][Ee][Ss])
$(INSTALL) -m 444 $(PROG).cat ${DESTDIR}$(cat1dir)/$(PROG).1
. else
$(INSTALL) -m 444 $(PROG).cat ${DESTDIR}$(cat1dir)/$(PROG).0
. endif
.endif

View File

@ -1,202 +0,0 @@
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_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 _._._.
DDEESSCCRRIIPPTTIIOONN
The ppkkgg__iinnffoo command is used to dump out information for packages, which
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 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 (with
--FF), or a URL to an FTP-available package.
The following command line options are available:
--aa Show information for all currently installed packages. See also
--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.
Additionally, any installation information variables (lowercase)
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
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.
--DD Show the install-message file (if any) for each package.
--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
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
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 _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.
--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.
--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.
--kk Show the de-install script (if any) for each package.
--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
installation of the package are not listed.
--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
dependencies), if any.
--nn Show which packages each package needs (depends upon), if any.
--pp Show the installation prefix for each package.
--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).
--qq Be "quiet" in emitting report headers and such, just dump the raw
info (basically, assume a non-human reading).
--RR For each package, show the packages that require it.
--rr For each package, show the packages that require it. Continue
recursively to show all dependents.
--SS Show the size of this package and all the packages it requires,
in bytes.
--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
installed packages (as dependencies of other packages) are not
displayed. See also --aa.
--VV Print version number and exit.
--vv Turn on verbose output.
--XX Print summary information for each package. The summary format
is described in pkg_summary(5). Its primary use is to contain
all information about the contents of a (remote) binary package
repository needed by package managing software.
TTEECCHHNNIICCAALL DDEETTAAIILLSS
Package info is either extracted from package files named on the command
line, or from already installed package information in
_<_P_K_G___D_B_D_I_R_>_/_<_p_k_g_-_n_a_m_e_>.
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 -Fe /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
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 {,}
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 "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
environment.
SSEEEE AALLSSOO
pkg_add(1), pkg_admin(1), pkg_create(1), pkg_delete(1),
pkg_install.conf(5) pkgsrc(7)
AAUUTTHHOORRSS
Jordan Hubbard
most of the work
John Kohl
refined it for NetBSD
Hubert Feyrer
NetBSD wildcard dependency processing, pkgdb, depends displaying,
pkg size display, and more.
pkgsrc January 11, 2015 pkgsrc

View File

@ -1,238 +0,0 @@
#! /bin/sh
#
# install - install a program, script, or datafile
# This comes from X11R5.
#
# Calling this script install-sh is preferred over install.sh, to prevent
# `make' implicit rules from creating a file called install from it
# when there is no Makefile.
#
# This script is compatible with the BSD install script, but was written
# from scratch.
#
# set DOITPROG to echo to test this script
# Don't use :- since 4.3BSD and earlier shells don't like it.
doit="${DOITPROG-}"
# put in absolute paths if you don't have them in your path; or use env. vars.
mvprog="${MVPROG-mv}"
cpprog="${CPPROG-cp}"
chmodprog="${CHMODPROG-chmod}"
chownprog="${CHOWNPROG-chown}"
chgrpprog="${CHGRPPROG-chgrp}"
stripprog="${STRIPPROG-strip}"
rmprog="${RMPROG-rm}"
mkdirprog="${MKDIRPROG-mkdir}"
tranformbasename=""
transform_arg=""
instcmd="$mvprog"
chmodcmd="$chmodprog 0755"
chowncmd=""
chgrpcmd=""
stripcmd=""
rmcmd="$rmprog -f"
mvcmd="$mvprog"
src=""
dst=""
dir_arg=""
while [ x"$1" != x ]; do
case $1 in
-c) instcmd="$cpprog"
shift
continue;;
-d) dir_arg=true
shift
continue;;
-m) chmodcmd="$chmodprog $2"
shift
shift
continue;;
-o) chowncmd="$chownprog $2"
shift
shift
continue;;
-g) chgrpcmd="$chgrpprog $2"
shift
shift
continue;;
-s) stripcmd="$stripprog"
shift
continue;;
-t=*) transformarg=`echo $1 | sed 's/-t=//'`
shift
continue;;
-b=*) transformbasename=`echo $1 | sed 's/-b=//'`
shift
continue;;
*) if [ x"$src" = x ]
then
src=$1
else
# this colon is to work around a 386BSD /bin/sh bug
:
dst=$1
fi
shift
continue;;
esac
done
if [ x"$src" = x ]
then
echo "install: no input file specified"
exit 1
else
true
fi
if [ x"$dir_arg" != x ]; then
dst=$src
src=""
if [ -d $dst ]; then
instcmd=:
else
instcmd=mkdir
fi
else
# Waiting for this to be detected by the "$instcmd $src $dsttmp" command
# might cause directories to be created, which would be especially bad
# if $src (and thus $dsttmp) contains '*'.
if [ -f $src -o -d $src ]
then
true
else
echo "install: $src does not exist"
exit 1
fi
if [ x"$dst" = x ]
then
echo "install: no destination specified"
exit 1
else
true
fi
# If destination is a directory, append the input filename; if your system
# does not like double slashes in filenames, you may need to add some logic
if [ -d $dst ]
then
dst="$dst"/`basename $src`
else
true
fi
fi
## this sed command emulates the dirname command
dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
# Make sure that the destination directory exists.
# this part is taken from Noah Friedman's mkinstalldirs script
# Skip lots of stat calls in the usual case.
if [ ! -d "$dstdir" ]; then
defaultIFS='
'
IFS="${IFS-${defaultIFS}}"
oIFS="${IFS}"
# Some sh's can't handle IFS=/ for some reason.
IFS='%'
set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'`
IFS="${oIFS}"
pathcomp=''
while [ $# -ne 0 ] ; do
pathcomp="${pathcomp}${1}"
shift
if [ ! -d "${pathcomp}" ] ;
then
$mkdirprog "${pathcomp}"
else
true
fi
pathcomp="${pathcomp}/"
done
fi
if [ x"$dir_arg" != x ]
then
$doit $instcmd $dst &&
if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi &&
if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi &&
if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi &&
if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi
else
# If we're going to rename the final executable, determine the name now.
if [ x"$transformarg" = x ]
then
dstfile=`basename $dst`
else
dstfile=`basename $dst $transformbasename |
sed $transformarg`$transformbasename
fi
# don't allow the sed command to completely eliminate the filename
if [ x"$dstfile" = x ]
then
dstfile=`basename $dst`
else
true
fi
# Make a temp file name in the proper directory.
dsttmp=$dstdir/#inst.$$#
# Move or copy the file name to the temp name
$doit $instcmd $src $dsttmp &&
trap "rm -f ${dsttmp}" 0 &&
# and set any options; do chmod last to preserve setuid bits
# If any of these fail, we abort the whole thing. If we want to
# ignore errors from any of these, just make sure not to ignore
# errors from the above "$doit $instcmd $src $dsttmp" command.
if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi &&
if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi &&
if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi &&
if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi &&
# Now rename the file to the real destination.
$doit $rmcmd -f $dstdir/$dstfile &&
$doit $mvcmd $dsttmp $dstdir/$dstfile
fi &&
exit 0

View File

@ -1,77 +0,0 @@
# $NetBSD: Makefile.in,v 1.1.1.1 2018/02/04 08:20:45 maya Exp $
srcdir= @srcdir@
pkgdbdir= @pkgdbdir@
mandir= @mandir@
datarootdir= @datarootdir@
sysconfdir= @sysconfdir@
cat5dir= $(mandir)/cat5
cat7dir= $(mandir)/cat7
man5dir= $(mandir)/man5
man7dir= $(mandir)/man7
BOOTSTRAP= @bootstrap@
SSL_SUPPORT= @ssl_support@
RANLIB= @RANLIB@
AR= @AR@
CC= @CC@
CPPFLAGS= @CPPFLAGS@ -I. -I$(srcdir)
DEFS= @DEFS@ -DDEF_LOG_DIR=\"$(pkgdbdir)\"
CFLAGS= @CFLAGS@
INSTALL= @INSTALL@
LIB= libinstall.a
OBJS= automatic.o conflicts.o dewey.o fexec.o file.o \
global.o iterate.o license.o lpkg.o opattern.o \
parse-config.o pkgdb.o pkg_io.o plist.o remove.o \
str.o var.o version.o vulnerabilities-file.o xwrapper.o
CPPFLAGS+= -DSYSCONFDIR=\"$(sysconfdir)\"
.if !empty(BOOTSTRAP)
CPPFLAGS+= -DBOOTSTRAP
.else
OBJS+= gpgsig.o pkg_signature.o
.endif
.if !empty(SSL_SUPPORT)
CPPFLAGS+= -DHAVE_SSL
OBJS+= pkcs7.o
.endif
all: $(LIB)
.c.o:
$(CC) $(DEFS) $(CPPFLAGS) $(CFLAGS) -c $<
$(LIB): $(OBJS)
$(AR) crv $@ $(OBJS)
$(RANLIB) $@
clean:
rm -f $(OBJS) $(LIB)
install:
$(INSTALL) -m 755 -d ${DESTDIR}$(man5dir)
$(INSTALL) -m 755 -d ${DESTDIR}$(man7dir)
$(INSTALL) -m 444 pkg_summary.5 ${DESTDIR}$(man5dir)/pkg_summary.5
$(INSTALL) -m 444 pkg_install.conf.5 ${DESTDIR}$(man5dir)/pkg_install.conf.5
$(INSTALL) -m 444 pkgsrc.7 ${DESTDIR}$(man7dir)/pkgsrc.7
.if defined(MANINSTALL) && !empty(MANINSTALL:Mcatinstall)
$(INSTALL) -m 755 -d ${DESTDIR}$(cat5dir)
$(INSTALL) -m 755 -d ${DESTDIR}$(cat7dir)
. if defined(CATMAN_SECTION_SUFFIX) && !empty(CATMAN_SECTION_SUFFIX:M[Yy][Ee][Ss])
$(INSTALL) -m 444 pkg_summary.cat ${DESTDIR}$(cat5dir)/pkg_summary.5
$(INSTALL) -m 444 pkg_install.conf.cat ${DESTDIR}$(cat5dir)/pkg_install.conf.5
$(INSTALL) -m 444 pkgsrc.cat ${DESTDIR}$(cat7dir)/pkgsrc.7
. else
$(INSTALL) -m 444 pkg_summary.cat ${DESTDIR}$(cat5dir)/pkg_summary.0
$(INSTALL) -m 444 pkg_install.conf.cat ${DESTDIR}$(cat5dir)/pkg_install.conf.0
$(INSTALL) -m 444 pkgsrc.cat ${DESTDIR}$(cat7dir)/pkgsrc.0
. endif
.endif

View File

@ -1,178 +0,0 @@
PKG_INSTALL.CONF(5) File Formats Manual PKG_INSTALL.CONF(5)
NNAAMMEE
ppkkgg__iinnssttaallll..ccoonnff - configuration file for package installation tools
DDEESSCCRRIIPPTTIIOONN
The file ppkkgg__iinnssttaallll..ccoonnff contains system defaults for the package
installation tools as a list of variable-value pairs. Each line has the
format VARIABLE=VALUE. If the value consists of more than one line, each
line is prefixed with VARIABLE=.
The current value of a variable can be checked by running
ppkkgg__aaddmmiinn ccoonnffiigg--vvaarr VVAARRIIAABBLLEE
Some variables are overriden by environmental variables of the same name.
Those are marked by (*).
The following variables are supported:
ACCEPTABLE_LICENSES
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 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
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
trusted when a certificate chain ends in one of the certificates
contained in this file.
CERTIFICATE_CHAIN
Path to a file containing additional certificates that can be
used for completing certificate chains when validating binary
packages or pkg-vulnerabilities files.
CHECK_LICENSE
Check the license conditions of packages before installing them.
Supported values are:
no The check is not performed.
yes The check is performed if the package has license
conditions set.
always Passing the license check is required. Missing
license conditions are considered an error.
CHECK_END_OF_LIFE
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:
never No check is performed.
always Passing the vulnerability check is required. A
missing pkg-vulnerabilities file is considered an
error.
interactive The user is always asked to confirm installation
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.
CONFIG_CACHE_CONNECTIONS_HOST
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.
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
ppkkgg__aaddmmiinn cchheecckk--ppkkgg--vvuullnneerraabbiilliittiieess --ss
or
ppkkgg__aaddmmiinn ffeettcchh--ppkkgg--vvuullnneerraabbiilliittiieess --ss
It can also be used to verify and sign binary packages.
GPG_KEYRING_PKGVULN
Non-default keyring to use for verifying GPG signatures of
_p_k_g_-_v_u_l_n_e_r_a_b_i_l_i_t_i_e_s.
GPG_KEYRING_SIGN
Non-default keyring to use for signing packages with GPG.
GPG_KEYRING_VERIFY
Non-default keyring to use for verifying GPG signature of
packages.
GPG_SIGN_AS
User-id to use for signing packages.
IGNORE_PROXY
Use direct connections and ignore FTP_PROXY and HTTP_PROXY.
IGNORE_URL
One line per advisory which should be ignored when running
ppkkgg__aaddmmiinn aauuddiitt
The URL from the _p_k_g_-_v_u_l_n_e_r_a_b_i_l_i_t_i_e_s file should be used as
value.
PKG_DBDIR (*)
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
semicolon. Each entry specifies a directory or URL to search for
packages.
PKG_REFCOUNT_DBDIR (*)
Location of the package reference counts database directory. The
default value is _$_{_P_K_G___D_B_D_I_R_}_._r_e_f_c_o_u_n_t.
PKGVULNDIR
Directory name in which the _p_k_g_-_v_u_l_n_e_r_a_b_i_l_i_t_i_e_s file resides.
Default is _$_{_P_K_G___D_B_D_I_R_}.
PKGVULNURL
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:
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).
VERBOSE_NETIO
Log details of network IO to stderr.
VERIFIED_INSTALLATION
Set trust level used when installation. Supported values are:
never No signature checks are performed.
always A valid signature is required. If the binary
package can not be verified, the installation is
terminated
trusted A valid signature is required. If the binary
package can not be verified, the user is asked
interactively.
interactive The user is always asked interactively when
installing a package.
FFIILLEESS
_@_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)
pkgsrc October 28, 2014 pkgsrc

View File

@ -1,117 +0,0 @@
PKG_SUMMARY(5) File Formats Manual PKG_SUMMARY(5)
NNAAMMEE
ppkkgg__ssuummmmaarryy - summary of binary package repository
DDEESSCCRRIIPPTTIIOONN
The file ppkkgg__ssuummmmaarryy contains information about each package in a binary
package repository as a list of variable-value pairs. The variables
describing different packages are separated by one empty line. Each line
has the format VARIABLE=VALUE. If the value consists of more than one
line, each line is prefixed with VARIABLE=. Multi-line variables are
guaranteed to be in consecutive lines.
The following variables are used:
BUILD_DATE
(required) The date and time when the package was built.
CATEGORIES
(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
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
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.
FILE_SIZE
(optional) The size of the binary package file, in bytes.
HOMEPAGE
(optional) A URL where more information about the package can be
found.
LICENSE
(optional) The type of license this package is distributed under.
If empty or missing, it is OSI-approved.
MACHINE_ARCH
(required) The architecture on which the package was compiled.
OPSYS (required) The operating system on which the package was
compiled.
OS_VERSION
(required) The version of the operating system on which the
package was compiled.
PKG_OPTIONS
(optional) Any options selected to compile this package. If
missing, the package does not support options.
PKGNAME
(required) The name of the package.
PKGPATH
(required) The path of the package directory within pkgsrc.
PKGTOOLS_VERSION
(required) The version of the package tools used to create the
package.
PREV_PKGPATH
(optional) The previous path of the package directory within
pkgsrc when a package was moved. (See SUPERSEDES below for a
renamed package.)
PROVIDES
(optional) A list of shared libraries provided by the package,
including major version number, one per line. If missing, this
package does not provide shared libraries.
REQUIRES
(optional) A list of shared libraries needed by the package,
including major version number, one per line. If missing, this
package does not require shared libraries.
SIZE_PKG
(required) The size of the package when installed, in bytes.
SUPERSEDES
(optional) A list of dewey patterns of previous packages this
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
packages:
pkg_info -X -a
SSEEEE AALLSSOO
digest(1), pkg_info(1)
HHIISSTTOORRYY
The ppkkgg__ssuummmmaarryy format was first officially documented in April 2006.
pkgsrc April 11, 2009 pkgsrc

View File

@ -1,19 +0,0 @@
PKGSRC(7) Miscellaneous Information Manual PKGSRC(7)
NNAAMMEE
ppkkggssrrcc - NetBSD packages collection (framework for third-party software)
DDEESSCCRRIIPPTTIIOONN
The NetBSD Packages Collection (pkgsrc) is a framework for building and
maintaining third-party software on NetBSD and other UNIX-like systems.
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
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_/
pkgsrc March 2, 2007 pkgsrc

View File

@ -1,152 +0,0 @@
#!/usr/pkg/bin/wish -f
# from FreeBSD Id: tkpkg,v 1.4 1997/02/22 16:09:13 peter Exp
#
set pkgname ""
wm title . "Package Installation"
#--------------------------------------------------------------
# The top level main window, consisting of a bar of buttons and a list
# of packages and a description of the current package.
#--------------------------------------------------------------
frame .menu -relief raised -borderwidth 1
frame .frame -borderwidth 4
scrollbar .frame.scroll -relief sunken -command ".frame.list yview"
listbox .frame.list -yscroll ".frame.scroll set" -relief sunken -setgrid 1
pack append .frame .frame.scroll {right filly} \
.frame.list {left expand fill}
# build the lower window shoing the complete description of a pacage
frame .f -borderwidth 4
text .f.t -width 80 -height 20 -yscrollcommand ".f.s set" -relief sunken
# Initially display instructions in this window. Erase the
# instructions and show the package description when the user clicks
# on a package.
#
.f.t insert end "Double click on a package above to see its
complete description here."
scrollbar .f.s -relief sunken -command ".f.t yview"
pack append .f .f.s {right filly} .f.t {left expand fill}
bind .frame.list <Double-Button-1> \
{ do_description [selection get] }
pack append . .menu {top fill} \
.f {bottom expand fill} \
.frame {bottom expand fill}
#----------------------------------------------------------------
# Make menu bar:
#----------------------------------------------------------------
button .menu.inst -text "Install" \
-command "apply_to_pkg \"pkg_add -v\""
button .menu.dein -text "Deinstall" \
-command "apply_to_pkg \"pkg_delete -v\""
button .menu.installed -text "What is Installed?" \
-command "list_pkgs \"pkg_info -I -a |tr ' ' ' '\""
button .menu.available -text "What can I install?" \
-command "list_pkgs \"pkg_info -I -c [glob -nocomplain *.{tgz,tar.z,tar.gz,tar.Z}] |tr ' ' ' '\""
button .menu.cont -text "Contents?" \
-command "apply_to_pkg \"pkg_info -d -v\""
button .menu.quit -text "Quit" -command "destroy ."
button .menu.help -text "Help" -command "do_help"
pack append .menu \
.menu.inst left \
.menu.dein left \
.menu.installed left \
.menu.available left \
.menu.cont left \
.menu.quit left \
.menu.help right
#-------------------------------------------------------
# Display the package description.
#-------------------------------------------------------
proc list_pkgs {s} {
set line ""
set f [eval "open {| sh -c \"$s\" } r"]
.frame.list delete 0 end
while {[gets $f line] > 0} {
.frame.list insert end $line
}
close $f
}
# display the list of available packages
set archives [glob -nocomplain *.{tgz,tar.z,tar.gz,tar.Z}]
if {$archives == ""} {
.frame.list delete 0 end
.frame.list insert end "Warning: no compressed tar archives files found."
} else {
list_pkgs "pkg_info -I -c $archives |tr ' ' ' '"
}
#-------------------------------------------------------
# Display the package description.
#-------------------------------------------------------
proc do_description {s} {
global pkgname
regexp {[^ ]*} $s filename
set pkgname $filename
.f.t delete 0.0 end
set cmd "pkg_info -d $filename |tr -d ' '"
set f [eval "open {| csh -c \"$cmd\" } r"]
while {![eof $f]} {
.f.t insert end [read $f]
}
}
#-------------------------------------------------------
# package install window.
#-------------------------------------------------------
proc do_help {{w .help}} {
catch {destroy $w}
toplevel $w
wm title $w "Help"
wm iconname $w "Help"
button $w.ok -text OK -command "destroy $w"
message $w.t -relief raised -bd 2 \
-text "You can install, deinstall and list info on the available packages. To select a package and see its complete description, press mouse button 1 over the package name. To install a selected package, press the Install button. To exit, press the \"Quit\" button."
pack append $w $w.ok {bottom fillx} $w.t {expand fill}
}
#-------------------------------------------------------
# Apply a command to a package.
#-------------------------------------------------------
proc apply_to_pkg {s} {
apply_to_pkg_err $s ""
}
#-------------------------------------------------------
# Apply a command to a package, with error stream redirection instructions.
#-------------------------------------------------------
proc apply_to_pkg_err {s errredir} {
global pkgname
.f.t delete 0.0 end
if {$pkgname == ""} {
.f.t insert end "You must double click on a package name first!"
} else {
apply_to_pkg_int "$s $pkgname" "2>&1"
}
}
proc apply_to_pkg_int {s errredir} {
.f.t delete 0.0 end
.f.t insert end "Running: $s\n"
set f [eval "open {| sh -c \"$s $errredir\" } r"]
while {![eof $f]} {
.f.t insert end [read $f 64]
}
}
#-------------------------------------------------------
# Invoke an arbitrary command.
#-------------------------------------------------------
proc do_command {s} {
.f.t delete 0.0 end
.f.t insert end "Running: $s\n"
set f [eval "open {| $s} r"]
while {![eof $f]} {
.f.t insert end [read $f 64]
}
}
# local variables:
# mode: csh
# compile-command: ""
# comment-start: "# "
# comment-start-skip: "# "
# end: