| Modified Files:
| src/usr.sbin/pkg_install/add: extract.c
|
| Log Message:
| Fix 'pkg_add -R' handling - not registering really means not touching
| the pkgdb too - useful for pkg_add as non-root!
|
|
| To generate a diff of this commit:
| cvs rdiff -r1.34 -r1.35 src/usr.sbin/pkg_install/add/extract.c
If a pattern does not have any suffix, assume that it matches both
".tbz" and ".tgz". This allows to install binary package dependencies
that are not exact matches, but satisfy requirements.
* ftp.fi.netbsd.org returns "257" in return to a "cd" command, accept that
(in addition to 250 and 550). Seems to be allowed per RFC 959.
* Make buffer for reply bigger (not too big, as it may hit performance).
* Bump PKGTOOLS_VERSION (NOT!!! PKGTOOLS_REQD) to 20050318
rework pkg_info(8) operating on binary packages, deprecating the `-.'
argument as it is no longer required (but is retained as a no-op for
backward compatibility).
the behaviour is now what is expected and intended:
- when the pkg argument is path (absolute or relative) to a
binary pkg, pkg_info operates on it.
- when no pkg argument is given, or the argument is not a
binary pkg path, pkg_info operates on the installed packages.
`pkg_info foo-1.0.tgz', `pkg_info /path/to/foo-1.0.tgz', etc. now work
correctly when foo-1.0.tgz is in the cwd.
bump PKGTOOLS_VERSION to 20050210.
branch of src). Changes from version 20050106:
Teach pkg_add(1) and pkg_delete(1) to pass PKG_METADATA_DIR and
PKG_REFCOUNT_DBDIR in the environment when running the +* scripts.
PKG_METADATA_DIR is the location of the +* files after the package is
registered. PKG_REFCOUNT_DBDIR is the location of the reference counts
database directory. If PKG_REFCOUNT_DBDIR is left unset, then it
defaults the the location of the package database directory with
".refcount" appended to the path, e.g. /var/db/pkg.refcount.
pkgviews users should explicitly set PKG_REFCOUNT_DBDIR in the shell
environment to ensure that all packages will use the same refcount
database.
These changes allow the +INSTALL and +DEINSTALL script to keep state
in +* files within ${PKG_METADATA_DIR}, and to store reference counts
in ${PKG_REFCOUNT_DBDIR} to handle usage of resources outside of
${LOCALBASE}.
revision of src/usr.sbin/pkg_install as of 20050204. I ran:
cd pkgsrc/pkg_install/files
./pkg_install2nbcompat .
Then I ran "cvs diff" and looked for portability-related changes that
were removed as a result of the import and resurrected them from the
repository.
+ always echo the command which is about to be executed during a pkg_add
or pkg_delete, not just when verbose mode is on.
+ extract files on ftp pkg_adds with the 'p' flag to tar, to preserve
modes of entries in the binary package. (Addresses PR 28826 from
Tyler Retzlaff)
Bump version to 20050106
user, so it's not nice to try to use an option that will try to chown if
the repository isn't owned by the builder.
(Some OS's do in fact cause an error when the chown in "cp -p" fails.)
Introduce a new abstraction in the C code, called MaxPathSize. All
previous occurrences of MAXPATHLEN and FILENAME_MAX have been changed
to use MaxPathSize instead.
If MAXPATHLEN is not defined, then assume a default value of 1024
(this is primarily for use on the Hurd).
The reason for this is that some older platforms define FILENAME_MAX
to be 14, although MAXPATHLEN is 1024. On BSD-derived systems,
FILENAME_MAX And MAXPATHLEN are both 1024.
Bump pkg_install version to 20041226.
These modifications have been tested so far on a NetBSD-current bulk
build.
update also. Specifying -u twice will now update the named package
and its dependencies.
Also make sure Fake really means Fake, even if update is specified.
don't explicitly call gunzip, just pass the right arguments to tar.
fixes package decompression on Solaris where gunzip is not available
(but gzip is), and also decompression of bzip2 packages on non-NetBSD.
branch of src). Changes from version 20040730 include:
Modify pkg_info so that it will only print information on uninstalled
binary packages in the current working directory if -. is given on
the command line. If no -. is given, pkg_info will look for its
information in the ${PKG_DBDIR}. This addresses a long-held gripe on
the part of a number of people, including myself (agc), which completely
violated the POLS.
Add a -q switch to pkg_admin, which allows it to work in a quiet
manner. Fixes the change request in PR 26583, but in a different
manner, preserving existing behaviour and making the new behaviour
dependent upon a command line option.
configuring libnbcompat. This adds more things to the environment, e.g.
AWK, CFLAGS, CPPFLAGS, etc. This should fix problems building on IRIX 5.3
where the system nawk wasn't being properly found.
> Re-work the code which checks the recorded build versions of a binary
> package to make pkg_add work properly when no +BUILD_INFO file exists.
>
> Modify the return value from read_buildinfo() to return 1 for success
> and 0 for failure.
>
> Use symbolic constants, rather than integers.
>
> If we can't read the build information, always tell of this fact.
>
> Bump version to 20040730
>
> Addresses PR 26429; a different version of these mods were verified to
> allow a +BUILD_INFO-less binary package to be added by Martin Husemann.
codepath to be executed by correcting the SHOW_* macro definitions. Also
fix up some function prototypes so this builds with -Wall. Fixes from
pkg/25494.
Add a new flag -Q (for "query") to pkg_info(1) to query the build
information for the definitions of specific variables that were saved
from build time, e.g.
$ pkg_info -Q PKGPATH glib
devel/glib
$ pkg_info -Q PROVIDES glib
/usr/pkg/lib/libglib.so.13
/usr/pkg/lib/libgmodule.so.13
/usr/pkg/lib/libgthread.so.13
tree:
Make pkg_add recognise binary packages built with ignored recommendations
(IGNORE_RECOMMENDED set in the presence of RECOMMENDED pre-requisites).
This change is fully backward-compatible: binary packages have set the
corresponding BUILD_INFO since RECOMMENDED was implemented. Packages
built before that time will install as before.
Bump PKGTOOLS_VERSION to 20040411.
This closes PR pkg/24712 by Thomas Klausner.
revision 1.5
date: 2004/04/06 05:56:07; author: agc; state: Exp; lines: +14 -11
Fix signature verification after pkg_add and friends were changed to use
fexec() - trying to exec "gpg --verify %s" won't work with fexec, so split
up the command into separate words.
pkg_install, but older NetBSD installations, e.g. 1.5.3, won't support
them. In this case, we explicitly use the native GCC compiler to
avoid problems with depending on pkgsrc GCC for building pkg_install.
Just a comment doesn't seem to suffice in all cases. For no-op commands,
use an explicit "true" invocation to avoid problems. (A future merge of
current bmake may fix this issue.)
include:
* use ${MACHINE_ARCH} instead of what uname() puts into utsname.machine.
the former represents the CPU architecture, which is what is recorded
in binary packages; also allow the OS name to be overridden, as pkgsrc
doesn't always use the value of utsname.sysname.
* allow adding depoted packages if another package with the same
${PKGBASE} is already installed as this is explicitly allowed for in
pkgviews.
normally apply: treat them as if the distinfo file was empty.
This solves the reason why pkgtools/pkg_install/distinfo was resurrected,
and allows us to remove it again, since it had the side effect of
introducing a dependency on digest, which is not acceptable when updating
pkg_install: it made it impossible to use the pkgsrc tree, as reported
by several people.
patches (any more). This prevents SUP users who dont use the "delete" flag
properly to accidentally apply the patches they still have
(which is the reason why we keep patches in the distinfo file at all).
pkg_install calls, and pass the full path for each from the pkg Makefile.
fixes issue with pkg_add and pkg_create calling non-existent or
less-than-functional tools since it relied on $PATH.
ensuring that recursive pkg_delete'ing works by using the correct
pkg_dbdir to find packages. This fixes recursive deleting if the
-K flag is passed to pkg_delete(1), and the named dbdir differs from
the default dbdir (/var/db/pkg).
the file removal when deleting linkfarms if the expected file doesn't
exist. Since the symlink isn't there, the mission is already accomplished,
so why bother with the warning?
adding two new options to pkg_admin(1) to simply using this utility to
list the bare package names that match patterns when looking in PKG_DBDIR:
-b Print only the basenames when matching package names for
lsall and lsbest.
-d lsdir
Set lsdir as the path to the directory in which to find
matching package names for lsall and lsbest.
files and building it locally. By removing dependencies from pkg_install,
we avoid the circularity of invoking the dependency targets in bsd.pkg.mk
that may in turn invoke the pkg_* tools.
* Teaching pkg_add(1) to be smarter about how to add a depoted packge.
* "pkg_delete foo" only deletes foo if it's a unique package.
* Make "pkg_delete -O foo" for delete file entries for foo from
pkgdb.byfile.db actually work.
* Teach pkg_admin(1) two new commands "add" and "delete" for working
with pkgdb.byfile.db.
* pkg_view(1) uses the new pkg_admin(1) commands to keep the
pkgdb.byfile.db files consistent in each view.
* Man page fixes.
* Check for errors in reading from the file descriptor for the ftp
process, and correct the error messages.
* Nuke some code for older NetBSDs that's better handled in
pkgtools/libnbcompat.
* Don't prevent user from using views other than the default view.
package views. Pkgsrc changes include:
* Convert to use pkgtools/libnbcompat so that it's easier to keep
this in sync with src/usr.sbin/pkg_install.
* Add a src2nbcompat script that converts src/usr.sbin/pkg_install
into an appropriate start for pkgtools/pkg_install. The script
removes the Makefiles, adds CPP inclusion guards around each
#include <...> line, and includes <nbcompat.h> at the top of each
*.c file. This should make it even easier to keep sources in
sync with the HEAD.
>Log Message:
>pkg_add fix:
>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.
>
>
>To generate a diff of this commit:
>cvs rdiff -r1.81 -r1.82 src/usr.sbin/pkg_install/add/perform.c
>cvs rdiff -r1.26 -r1.27 src/usr.sbin/pkg_install/lib/version.h
Changes by hubertf and seb; these changes tested on NetBSD, Linux and Irix.
Modified Files:
src/usr.sbin/pkg_install/add: perform.c pkg_add.1
Log Message:
Implement remaining TODO item in pkg upgrade (pkg_add -u):
* 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.
Modified Files:
src/usr.sbin/pkg_install/admin: main.c
src/usr.sbin/pkg_install/info: main.c perform.c
Log Message:
Consistently check findmatchingname() return value for error condition.
Among other this fixes 'pkg_info -e whateverpkg' exit status when
/var/db/pkg is missing: it is now 1 and not 0.
Modified Files:
src/usr.sbin/pkg_install/lib: version.h
Log Message:
Bump to "20030325" after today's changes from seb and me
Date: Sat Mar 15 20:49:27 UTC 2003
Introduce a pkgdb_dump() function, which dumps the cache file of
(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.
Date: Sat Mar 15 20:50:15 UTC 2003
Bump version string for pkgdb_dump changes.
Date: Sat Mar 15 20:54:26 UTC 2003
Catch one more place that could result in Current not being set properly
(and thus in the execution of "rm -fr /") if ^C is pressed at the wrong time.
See also PR 19436.
In pkgdb_remove_pkg, only perform DB functions if HAVE_DBOPEN is defined,
else return EXIT_SUCCESS unconditionally (as in other functions dealing with
db functionality).
fixes build problem on Solaris when no libdb is available.
----------------------------------------------------------------------
Add a pkgdb_remove_pkg() function and use it in pkg_delete(1).
Bump lib/version.h due to added functionality.
Order the getopt(3) options alphabetically.
Introduce the notion of "preserving" an installed package.
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.
like, so 80's! Pass a value more appropriate for the current decade
to --mandir via CONFIGURE_ARGS, and let ./configure set this in
the Makefiles.
Install catted man pages with the suffix ".0" rather than ".1".
Bump PKGTOOLS_VERSION.
Keep the old NO_PKG_REGISTER and NO_PACKAGE definitions for now,
rather than force everyone to upgrade their pkg_install sources to
today's version.
At the next bsd.pkg.mk bump of PKGTOOLS_REQD, this can be readdressed.
a pkgdb_open that may return one of _three_ values (0,1,-1), so that
we can not simply use
if (!pkgdb_open(ReadOnly))
but need to use
if (pkgdb_open(ReadOnly) == -1)
Mea culpa.
In pkgdb_remove(), use the return value from (*db->del), rather than
explicitly setting and checking errno.
Do some CSE in pkgdb_iter().
Use the db access functions in the proper manner.
Also fix some whitespace nits.
Use EXIT_FAILURE, rather than hardcoding a value of '1' in err(3) and
errx(3).
Plug a memory leak by modifying the signature of
_pkgdb_getPKGDB_FILE() to take a buffer and its size, and fill in that
buffer and return it.
Add an enumerated type which is used in pkgdb_open() to specify
read-only or read-write mode.
Modify the return value of pkgdb_open() to have a more logical boolean
value.
databases/db/buildlink2.mk.
On platforms that lack Berkeley DB, pkg_install will build and
install from bootstrap-pkgsrc, but will be missing some important
functionality. On such systems, once bootstrapped, install this
package to get full functionality. (We'll take care of this
automatically in the future.)
Platforms that are reported to lack Berkeley DB in the base system:
Solaris, some Linuxes. There are probably others.
Suggested by "Jeremy C. Reed" <reed@reedmedia.net> on tech-pkg@.
This stops current loop:
- PKGTOOLS_REQD bump
- update pkg_install
- ZOULARIS_VERSION is too small, newer pkg_install required
- update pkg_install
- ZOULARIS_VERSION is too small, newer pkg_install required
...
and the "do-extract" target copies the sources into ${WRKSRC}. We
automagically determine VERSION by inspecting ${FILESDIR}/lib/version.h.
Thanks to autoconf, all the patches and almost all of the cruftulent
${OPSYS}-specific stuff in the Makefile are gone.
othersrc/bootstrap-pkgsrc/pkg_install into ${FILESDIR}.
Using autoconf greatly simplifies maintenance of this package across
multiple platforms. Placing the extracted source under ${FILESDIR}
will eventually let us use the same source for bootstrapping as
well, though we're not ready for this yet.