Commit Graph

323 Commits

Author SHA1 Message Date
christos 3b6811d33b PR/33123: Murray Armfield: standards compliance & glob.h
Certain fields in glob.h need to be size_t; fix this and version glob(3).
    http://www.opengroup.org/onlinepubs/000095399/basedefs/glob.h.html
2006-03-26 18:11:22 +00:00
hubertf dc01675c5a Put check if "best" is empty back into the right place, messed up
in previous commit.
Noted by yamt@
2006-03-17 17:46:44 +00:00
erh 840c5222df Fix -uu handling so recursive updates of already installed packages work,
even if the initial package to install isn't installed yet.
Bump the version to 20060313.
2006-03-17 05:32:11 +00:00
hubertf fc4fb72e38 findbestmatchingname_fn(): catch possible problems if best (vp)
contains some strange name (shouldn't happen, but ...)

Coverity CID 869
2006-03-17 02:20:46 +00:00
hubertf 92acb1f6e9 findbestmatchingname_fn(): only do something sensible if the pointer
handed in is actually usable (not NULL)

Fixes Coverity ID 870
2006-03-17 02:10:55 +00:00
hubertf baf66cc3f1 We can't sprintf() into a NULL pointer - catch that properly
for ALL cases.

Coverity CID 861
2006-03-17 01:58:25 +00:00
hubertf 19dcd9a850 Fix filedescriptor leak
Coverity CID 1625
2006-03-17 01:10:53 +00:00
joerg 32ce5ba905 Add conditional code to ignore the non-numeric part of an OS version
for the sake of compatibility tests in pkg_add.
E.g. DragonFly versions like
	1.4.0-RELEASE
are reduced to
	1.4.0

This code is disabled by default on NetBSD.
2006-01-25 00:17:34 +00:00
wiz d0fb2fc679 Use MaxPathSize instead of PATH_MAX (like everywhere else here). 2006-01-08 12:20:54 +00:00
christos 5d62e1710e sync with pkgsrc version. 2006-01-04 23:36:14 +00:00
ben d221099506 Specify the full path to tar when unpacking a package.
Modify pfcexec so the new process file name can be different from argv[0].
This fix is from Peter Postma, and it addresses PR#32228
2005-12-06 01:07:30 +00:00
ben ab821d396a Correct PAX_CMD to be pax. 2005-11-28 01:49:39 +00:00
ben 81789679db Conditionally include header files, and include nbcompat.h
Addresses PR#32149
2005-11-23 14:58:16 +00:00
ben ed4b2f6172 Reduce the use of the system() function in pkg_install to avoid quoting
problems.  Instead, use exec*() functions.

Replace PUSHOUT() macro and string buffers with a function that
operates on data structures.

If it is necessary to copy files into place from staging area, then use
pax to copy them.

Add functions in pexec.c to create a pipe for sending data to a child
process.  Replace pipe code in create/perform.c with these functions.
Use these functions instead of command-line arguments when copying files
into place from staging area.

Three system() references remain: @exec, @unexec, and vsystem().
2005-11-23 04:59:14 +00:00
dillo f05d706e05 Bump version for ``pkg_info -Q against local binary packages'' fix. 2005-11-14 09:41:43 +00:00
agc 2ca444e0bd Get rid of cvs merge botch in previous. 2005-11-13 20:37:23 +00:00
agc d6e9c48326 The Dewey number comparison routines were added by myself in 2002 in
revision 1.32 of pkg_install/lib/str.c, and have absolutely nothing to
do with the original FreeBSD utilities.

Place the appropriate (3 clause) copyright on this file.
2005-11-13 20:07:41 +00:00
wiz 41fb8f4fed Handle -1 return value from dewey_match. 2005-11-13 19:48:35 +00:00
wiz 45be6e647e Do not use errx in dewey_match, return -1 instead. 2005-11-13 19:48:19 +00:00
wiz 7ef0b27ab9 Remove some unnecessary header includes. 2005-11-08 20:16:53 +00:00
dillo e68029a308 Bump version for pkg_info -B fix. 2005-11-07 23:20:49 +00:00
wiz 2fa51c716a Sync with pkgsrc: wrap some headers in #ifs. 2005-11-07 22:53:41 +00:00
wiz a1e41eed09 Use config.h and add appropriate #if HAVE_FOO_H. 2005-11-06 12:40:02 +00:00
wiz f0f9d6a437 Add compat #ifdefs from pkgsrc, to make syncing easier between the
two versions.
2005-11-05 13:11:02 +00:00
hannken ba2ee12485 Make it compile on sparc/sparc64. Cast size_t to int for field precision. 2005-11-04 09:26:05 +00:00
dillo 8af62fd627 Split dewey compare functions into their own file dewey.c so they
can be used in a forthcoming Perl module.

Joint work with Thomas Klausner.
2005-11-03 21:59:55 +00:00
dillo 75b9797969 Implement framework to store variable=value pairs about an installed package.
Use this in pkg_add to mark installed dependencies as automatically installed.

pkg_add: new flag -A: marks package as automatically installed.
pkg_admin: new commands set and unset to modify variable pairs for
	   installed packages.
pkg_info: report these variable pairs with -Q/-B.
	  new flag -u: report only manually installed packages (not
	  installed with pkg_add -A).
	  Error out if -a/-u and a package name is specified.

Joint work with Thomas Klausner.

As discussed on tech-pkg.
2005-11-03 21:16:41 +00:00
joerg 82543d8598 Treat FTP error 450 like 550, otherwise pkg_add from a proftpd server
can hang.

Submitted-by: Eirik Nygaard
2005-10-30 21:52:02 +00:00
hubertf b7cc645889 Bump version to 20050718 for fixed IGNORE_RECOMMENDS handling. 2005-07-18 09:09:35 +00:00
wiz 7a9582b62a Spread some more unsigned for less casts. 2005-05-31 22:29:41 +00:00
wiz 0ba4110751 Move unsigned to where it belongs, to remove a cast. 2005-05-31 21:03:58 +00:00
wiz 8529448f16 Comment out too noisy warning. 2005-05-30 19:44:03 +00:00
wiz 1723911d3c Add ranges support to the pkg_* tools. See mail on tech-pkg or
pkg_info(1) for details.
Co-production with dillo@.
Bump PACKAGE_TOOLS_VERSION to 20050530.
2005-05-30 13:10:14 +00:00
minskim 773938ed0f 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.

Bump version to 20050529.
2005-05-29 19:16:18 +00:00
hubertf be04a114e9 Bump PKGTOOLS_VERSION to today's date to allow telling in which version
PR 24744 was fixed (affects lib/ftpio.c).
2005-03-18 00:12:35 +00:00
hubertf fdbe9a372b Address PR pkg/24744 by Jarmo Jaakkola <jarmo.jaakkola@iki.fi>:
* 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).
2005-03-18 00:01:11 +00:00
grant f079891560 cast return value of min_free() to uint64_t. 2005-02-20 09:04:18 +00:00
grant 37ca47b551 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.
2005-02-10 22:52:31 +00:00
drochner cbb74e46c2 make this build with WARNS=2 2005-02-04 12:13:18 +00:00
jlam a0ff816c39 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}.

Bump the pkg_install version to 20050204.
2005-02-04 09:03:02 +00:00
agc 3697624477 Always echo the command about to be executed to standard output, not
just when the verbose flag is specified - we are, after all, normally
executing these commands as root.

Bump version to 20050106
2005-01-06 11:59:35 +00:00
agc 524f4f2bcf Address PR 28826 from Tyler Retzlaff - when extracting files from a binary
package addition by ftp, preserve the modes of the entries in the binary
package.
2005-01-06 11:56:39 +00:00
agc 6e58e2a640 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.
2004-12-29 11:34:59 +00:00
erh 6c1b54e56a Sync with pkgsrc to get double -u feature. Bump version to 20041209.
Add note in README explaining that changes should be made here first,
then merged to pkgsrc.
2004-12-10 21:49:31 +00:00
grant 0bfb4106b0 no trailing comma at end of enum. 2004-11-20 06:40:01 +00:00
wiz 95fafbc9a3 Recognize "pre" as pre-release version. Bump version to 20041110. 2004-11-10 16:51:16 +00:00
erh 4f022501ab Merge version 20041101 from pkgsrc. 2004-11-02 00:38:23 +00:00
grant 0e29cab3fe don't explicitly call gunzip, just pass the right arguments to tar. 2004-10-31 02:45:37 +00:00
dsl 9efede97a9 Add (unsigned char) cast to ctype functions 2004-10-30 15:04:45 +00:00
agc 938f9f0f4f 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, which completely violated the POLS.

Bump version for this and previous pkg_admin modification.
2004-08-13 13:34:42 +00:00