Add the ability to pkg_info(1) and pkg_delete(1) to take a directory
name for the name of the package, so that shell-completion can help
when finding out information or deleting packages.
When doing quick pre-check if any conflicting dependencies are installed
and a dependency is not found installed do not try to search for a wildcarded
(-[0-9]* suffix) package if the dependency was already wildcarded.
This prevent something like 'p5-Net-DNS-0.33' reported as an already
installed version of 'p5-Net-[0-9]*' as a dependency.
Before this fix 'p5-Net-[0-[0-9]*' would have been incorrectly searched for.
Reviewed by hubertf@.
Bump PKGTOOLS_VERSION to 20030423.
fixes 'pkg_admin lsall' and 'pkg_admin lsbest' on Solaris and probably
other platforms where getcwd() doesn't allocate a buffer when the 2nd
arg is NULL.
ok'd by simonb@
option, including NetBSD 1.5 and 1.6. noted by wiz.
also handle tar.gz, tar.bz2 and .tar filenames, and bomb with a useful
error if we don't know to handle a file.
(PKG_DBDIR/PKGNAME). Address PR pkg/20856 and part of PRs pkg/20852,
pkg/20853 and pkg/20854 by FUKAUMI Naoki <naoki at fukaumi dot
org>.
Note: with this change pkg_tarup can now produce reusable binary
packages from installed packages when they depend on an install
script.
* Upgrade step 1/4: Check if the new version is ok with all pkgs
* (from +REQUIRED_BY) that require this pkg
Inspired by bsd.pkg.mk's upgrade(?) target.
(filename, package) pairs.
Modify calling functions to use pkgdb_dump() directly, rather than
sequences of
pkgdb_open
{ pkgdb_iter, pkgdb_retrieve }
pkgdb_close
calls.
Remove the now unnecessary pkgdb_iter function.
A preserved package may not be deleted by pkg_delete(1) (unless the -f
option is given), and the preserved capability will be carried into
any binary package. pkg_add(1) will also keep the preserved capability
if it was present in the binary package.
The "preserve" capability can be given to a package by using the
PKG_PRESERVE definition in a package Makefile in pkgsrc.
Ride on the recently-bumped lib/version.h for new functionality.
This fixes the problem that pkg_add(1) drops setuid/setgid bit.
This problem occurs on pax(1) based tar environment.
pkgtools/pkg_install should be fixed, too.
stay in no-longer existing dir and continue with removal of db-files;
otherwise, the packages contents would be removed, but the package not
uninstalled. Pointed out by Grant in PR pkg/18384. OK'd by hubertf.
- all command executions now use the path [execvp/execlp/system].
- normalize the macro names as <COMMAND>_CMD.
- in some OS's full pathnames for commands can still be provided, but this
is not the default.
This was needed to fix -DTAR_FULLPATHNAME="/usr/bin/tar"
Also, remove a call to path_create() that causes the `prepend' path held by
pkg_perform() to be deleted, causing a core dump later when pkg_perform()
tries to remove it itself.
Will return true if 'pkg' matches 'pattern', false else.
Provides a command line interface to the pmatch() C function
to be used from shell scripts etc.
make sure that a failed installation of a rpe-requisite package kills
the attempt to add the package. This reverts pkg_add(1) to traditional
behaviour.
Bump version number accordingly.
to be added, first try to use the exact version of the pre-requisite
with which the base package was built (from the @blddep directive in
the +CONTENTS file), and then use the traditional dependency from the
@pkgdep directive.
Also rename a variable from "code" to "errc" to make it obvious what
the variable counts.
Bump version number to 20020306.
version of the pre-requisite package which was used to build the
package. This is derived automatically from the list of pre-requisite
packages which is provided to pkg_create(1) in the -P argument.
Bump the version number to 20020305.
Versions of the pkg_install tools prior to 20020305, when adding a
binary package with embedded @blddep directives, will warn that the
directive is not recognised, but will continue to add the binary
package.
> revision 1.22
> date: 2002/02/18 00:57:54; author: hubertf; state: Exp; lines: +10 -3
> make @cwd work a bit more reliable:
>
> When -L is used (as it is by pkgsrc), don't override the directory
> set by @cwd unconditionally with what was given to -L (srcdir).
> Instead, use the @cwd directory.
When -L is used (as it is by pkgsrc), don't override the directory
set by @cwd unconditionally with what was given to -L (srcdir).
Instead, use the @cwd directory.
XXX#1: This was not tested with DESTDIR set
XXX#2: @cwd is still needed twice
* There is no -indent option to .Bd or .Bl, although you would
never know that from its frequent use in this tree. There is a
"-offset indent" combination that makes sense, and you can certainly
say "-width indent".
* Also, you can't markup the -width option argument, tho you CAN
use a callable macro. So "-width Ar filename" doesn't make sense,
but either "-width Ar" or "-width filename" does, as might something
like "-width xxfilename" for a little extra space.
* There are a lot of needlessly complex hanging tag macros in man4 used
to create simple item lists. Those should be simplified one of these
days before someone copies and edits yet another man4 page.
functionality adds recognition of '_' and "pl" as pseudonyms for '.',
so that 1.2p2 == 1.2.2, and adds recognition of "pl" and "rc" strings,
which stand for "patchlevel" and "release candidate" respectively.
In addition, this version should handle alphabetic characters properly
(so that 1.2e == 1.2.5)
Normal NetBSD revision number processing has been retained (and is always
compared after all other tests have been performed).
64-bit integers are used internally for each component of the version
number.
to a verification program for a binary package. The following callouts
are defined: "none", "gpg" and "pgp5".
This feature allows you to verify a binary package against a detached
signature file, and to proceed with the installation or not, depending
upon the level of trust you place in the signatory of the binary
package.
Digital signatures will be checked in a recursive manner (i.e. if
pkg_add is called with a verification type which is not "none", the
verification type will be passed to subsequent invocations of pkg_add
for the dependent packages).
At the current time, digital signatures cannot be used with the URL
form of pkg_add(1) - the detached signature file must be in the same
directory as the binary package, either locally or mounted by NFS.
If no -s argument is given, pkg_add(1) retains its current behaviour -
the package will not be verified before installation takes place.
Make sure that each va_start has one and only one matching va_end,
especially in error cases.
If the va_list is used multiple times, do multiple va_starts/va_ends.
If a function gets va_list as argument, don't let it use va_end (since
it's the callers responsibility).
Improved by comments from enami and christos -- thanks!
Heimdal/krb4/KAME changes already fed back, rest to follow.
Inspired by, but not not based on, OpenBSD.
the PLIST_CWD in creating the tar pipe.
This takes care of pkg_create -p PREFIX -L FAKE
where PREFIX does not exist at pkg creation time.
From OpenBSD's rev. 1.9->1.10
* Register PLIST_SRC before dependencies and conflicts so that the
PLIST_CWD != PLIST_SRC hack works with dependencies present.
From OpenBSD's rev. 1.10->1.11
* improve error message to tell full path of exec() that failed
given filename.
* Use strip_txz() inside the FTP-wildcard-depends handling code to
prevent it handing a combination of glob and dewey pattern to pmatch(),
which our pattern matching code currently does not handle. Bugfix!
XXX The other places that could be changed to use strip_txz() are not
touched in this commit to keep the impact of this change small in the
light of the approaching 1.5.1 release. I'll revisit them.
still let "pkg_add foo" work:
setenv PKG_PATH /usr/upkgsrc/packages/All
pkg_add -v kde2
Depending pkgs will be pulled in as usual.
If PKG_PATH contains a mixture of local paths and ftp://-URLs, the local
paths will be searched first.
Patch provided by Hubert.
When invoked with 'pkg_add -u ...', and the package to be installed is
found already being installed, the old (installed) package is removed
with pkg_delete, and the new one is installed.
A very crude handling of dependencies is done (by moving the +REQUIRED_BY
file aside before pkg_delete, and back into place after the new pkg is
installed).
This needs a lot more work to TRT, but it's a first start.
Patch by Hubert Feyrer.
Note: REQ support has been taken out of bsd.pkg.mk in v1.628; since
pkg_create still supports it, we should support it in pkg_info too,
though.
* user lowercase "usage"
* do not use __progname/getprogname() to make this build on old systems
(the pkg_install pkg is intended to run on 1.4 and maybe 1.3 too...)
When the bzip-pkg handling was introduced, a dewey pattern (foo>1) may get
a character-class-pattern attached (.t[bg]z), and the code was not prepared
to match that. I've special-cased handling of character-class pkg suffixes
for ".t[bg]z", and when scanning a dir in findmatchingname() now both the
'first' part of the pattern (e.g. "foo>1") and the suffix (e.g. ".t[bg]z")
must match the file, hence the two pmatch() calls.
* findbestmatchingname_fn():
Caught a case where ".t[bg]z" was not properly handled. Must do the same
suffix-processing again here!
Fixes PR 11856 by Dan McMahill <mcmahill@mit.edu>
pkg_info
* In pkg_create, compress with bzip2 if a .tbz suffix is given
* Fix pkg_info to work via ftp, either via URL specified on command line
or via one made up from PKG_PATH (if set)
XXX ALWAYS tacks on ".t[bg]z", NOT ".t[gb]z" !!!
The FTP coprocess formerly wrote the output of the "get | tar vxf -" pipe
to stderr, which resulted in no output to the feedback pipe (stdout), and
thus the timeout was not updated for any line printed by the "tar" process.
This was now changed to also feed back the chars to the expect() routine,
updating the timeout handler. The "also" part is implemented by passing
the output through "tee /dev/stderr".
At least NetBSD and Solaris have this, so no problem there.
Thanks to Frank van der Linden for helping me to debug this.
- keep the case consistent between the actual name and what's referenced.
e.g, if it's `foo', don't use '.Nm Foo' at the start of a sentence.
- remove unnecessary `.Nm foo' after the first occurrence (except for
using `.Nm ""' if there's stuff following, or for the 2nd and so on
occurrences in a SYNOPSIS
- use Sx, Ic, Li, Em, Sq, and Xr as appropriate
Found during a post-install of a fresh machine:
1. setenv PKG_PATH ftp://smaug.fh-regensburg.de/pub/NetBSD/arch/i386ELF/All
2. pkg_add tcsh ssh XF86Config
3. Run XF86Config
4. pkg_add kde
5. Be done.
We should do this from /etc/rc.local on first boot... :-)
as this will remove things like trailing '}' etc. and doesn't work in general.
As mentioned in the already-existing comment, doing TRT here would mean to
partly expand the pattern, then replace the versions on alternatives.
Unless our pkg pattern parser gets these hooks, cowardly step back.
'get pkg.tgz "| cd /var/tmp/inst ; gunzip | tar -x -f -"'), handle
two cases better:
1. Timing out ftp connections: Make sure the hanging pipeline gets a ^C
(SIGINT), and wait until the ftp prompt is available again. Else we
may nuke away tar's working dir, and it may be displeased.
2. One of the commands from the pipeline exiting: caught via SIGCHLD;
for this signal to be delivered, a empty handler is needed)
Adresses PR 10925 by Greg A. Woods <woods@planix.com>
which needed to be set at compile time but weren't (to handle the case where
TAR_CMD was set to something other than "tar", eg "gtar". In addition to
the constants being wrong, the wrong directory name was being examined for
its string length.
Add a few comments to hopefully avoid having this problem come back.
a bit, to make them more descriptive
* in findbestmatchingname_fn, fix a bug where a null pointer wasn't
caught (I wonder why we didn't actually hit that case...)
* Bugfix in findbestmatchingname_fn: when comparing, strip off any
trailing ".tgz", as this will give wrong results. "1.9.8.tgz" was
found to be greater than "1.9.8.1".
package matching a certain pattern. Examples:
yui# cd /usr/pkgsrc/packages/i386ELF/All/
yui# ls unzip*
unzip-5.40.tgz unzip-5.41.tgz
yui# pkg_admin lsall 'unzip*'
unzip-5.40.tgz
unzip-5.41.tgz
yui# pkg_admin lsall 'unzip>=5.40'
unzip-5.40.tgz
unzip-5.41.tgz
yui# pkg_admin lsall 'unzip>=5.41'
unzip-5.41.tgz
yui# pkg_admin lsbest 'unzip>=5.40'
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
This adds a shell/user-interface to pkg-patterns, which are a superset
of sh/csh patterns and can't be expanded by any shell.