Commit Graph

666 Commits

Author SHA1 Message Date
dillo e68029a308 Bump version for pkg_info -B fix. 2005-11-07 23:20:49 +00:00
dillo 831ae4eb35 Don't add INSTALLED_INFO to the list of files to extract from binary
packages, it will never be there.

Fixes pkg_info -B against binary packages broken when INSTALLED_INFO
support was added.
2005-11-07 23:19:55 +00:00
wiz 752535d165 Replace wait(2) with equivalent waitpid(2); for Linux, reported by wulf@
on tech-pkg.
2005-11-07 22:57:07 +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
hubertf aba8b403bc Fix PR pkg/30658: don't fail for pkgs that were built with IGNORE_RECOMMENDED,
just issue a warning.

Checked by wiz@, no reply from original author (rh@) after several weeks. :(
2005-07-18 09:06:48 +00:00
hubertf 390553bef2 cleanup: preserve errno. Needed so err() functions ran after running
cleanup(0) print the correct error message.
2005-06-29 01:40:42 +00:00
hubertf 9a9bdaa985 Fix 'pkg_add -R' handling - not registering really means not touching
the pkgdb too - useful for pkg_add as non-root!
2005-06-29 01:39:37 +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
rillig 360e66cfd6 Output the error string when renaming a dependency file fails. This has
happened to me when I had a misnamed directory in the pkgdb directory.
2005-05-10 00:06:57 +00:00
wiz 968dbe95c1 Instead of exec(2)ing rmdir(1), just use rmdir(2).
Reviewed by dillo.
2005-05-07 15:09:41 +00:00
wiz 0ae4504a04 Fix Dq argument, which somehow ended up on the next line. 2005-05-06 23:02:39 +00:00
wiz 756bc811ee Document the vulnerable subdir.
Reviewed by dillo and rillig.
Some minor fixes while I am here. Bump date.
2005-05-06 22:45:56 +00:00
hubertf a958e20048 For -L, mention that files that were dynamicallt created upon installation
(@exec, ...) are not listed.

Based on patch by Peter Bex <Peter.Bex@student.kun.nl>
2005-04-18 12:28:46 +00:00
tron 9f15a6aa01 Fix bad format string which broke the build on LP64 platforms. 2005-04-07 20:22:40 +00:00
dmcmahill ad90bf7a93 Fix a minor bug in the estimation of required disk space. In particular
make sure we use a data type which is big enough.  This fixes a problem
where pkg_add-ing of a binary package which is between 512 Mb and 1 Gb
failes because the estimated required disk space is negative due to over
flowing in the calculation
2005-04-05 16:37:50 +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
rillig b9387c8736 Never access argv[i+1] before you know that argv[i] != NULL. Approved
by wiz.
2005-03-11 22:52:04 +00:00
agc db4720ccb4 Clarify the "OS mismatch" message:
+ state that it is simply a warning
+ make it clearer what the mismatch is
2005-03-06 23:40:41 +00:00
wiz 773cef6c8c Explicitly mention where the canonical location
for these sources is, to avoid confusion when this file gets
copied somewhere else.
2005-03-01 13:19:51 +00:00
grant 16133f304b mdoc fixes: use Sq and Dq instead of ' " and '' 2005-02-26 14:09:57 +00:00
grant 196c8f5e9b initialise a variable before using it. pkg_info binpkg.tgz would pass
garbage on the command line to tar(1).
2005-02-20 14:41:05 +00:00
grant f079891560 cast return value of min_free() to uint64_t. 2005-02-20 09:04:18 +00:00
agc 2d2a9f331d Also display package name when having trouble displaying package
information with show_index().
2005-02-16 08:35:26 +00:00
agc 26747df972 Make show_file() take an extra argument, that of the package name, and
display the package name with every warning message when displaying the
contents of metadata files.

Whilst I'm here, correct the function name in another warning message.
2005-02-14 16:16:24 +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
wiz cc7ac0e40f Use Aq instead of \*[Lt]\*[Gt]. 2005-02-04 15:01:41 +00:00
wiz 9e0eb6c274 Minor macro usage improvements. 2005-02-04 14:58:59 +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
agc bdb22860c3 Attempt to improve the English in one sentence. 2004-12-15 17:20:25 +00:00
wiz 513f71684b Use more markup. 2004-12-15 17:17:51 +00:00
wiz 2183efae3e Bump date for double -u. Update paths to use 2.0 as release name
instead of 1.5. New sentence, new line. Fix a typo.
2004-12-15 17:12:09 +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
agc 03ad6dc16c Document the "pre" magic string just added, and bump date for this. 2004-11-10 17:40:41 +00:00
wiz 95fafbc9a3 Recognize "pre" as pre-release version. Bump version to 20041110. 2004-11-10 16:51:16 +00:00
wiz 2add0ff922 Sync usage with man page; sort options. 2004-11-03 14:01:04 +00:00
wiz 624de60311 Bump date for -N; sort options; add N to SYNOPSIS. 2004-11-03 13:58:23 +00:00
erh 7d7fb3bdbc As the comment says, not all files may be present in the tar file,
so don't attempt to extract the (usually) non-existant +PRESERVE file.
2004-11-02 01:03:29 +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
erh c857b022f4 Don't look for files at all unless -. is specified. Allows pkg_info to
work if there happens to be a uninstalled package present in the current
directory.
2004-10-06 15:40:11 +00:00
snj 8561540c0d Avoid comma abuse, remove a redundant word, and add a missing period. 2004-08-23 19:45:36 +00:00
cube 0d6cfa8af6 Provide a correct description of -R flag, as suggested by Jim Bernard in
PR 26698.
2004-08-23 19:41:05 +00:00
he c388a506cb Move the local array declaration of flist[] to the variable declaration
section, so that this compiles with gcc 2.95.3 as well.  Fixes build
problem for vax.
2004-08-18 19:10:15 +00:00
wiz e682d869e8 Bump date for previous. 2004-08-13 13:45:53 +00:00
wiz bf78254603 Sort options, add -K to usage. 2004-08-13 13:45:46 +00:00
wiz 25ac688cb9 Bump date for new -q. 2004-08-13 13:38:14 +00:00
wiz 8a623e1980 Sort options in SYNOPSIS. 2004-08-13 13:37:14 +00:00
wiz 6579bae669 Add all options to usage. 2004-08-13 13:37:04 +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
agc 50a555ad6a 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.
2004-08-13 13:28:46 +00:00
hubertf 207fff285e pkg_info will not DTRT when applied to a binary package that doesn't
have all the files from ALL_FNAMES -- meta pkgs don't have +MTREE-files,
and as such it's impossible to retrieve _any_ information on them.
The fix is to only extract those +-files that are needed (as determined
by the command line options).

Problem noted by gavan@, code reviewed by grant@ and gavan@.
2004-08-07 01:55:06 +00:00
agc ef020cc402 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.
2004-07-30 11:35:46 +00:00
uebayasi 5e494b866c Flags need Fl, not Ar. 2004-06-03 15:54:09 +00:00
uebayasi 14e27a0be3 Change "for ... `find ...`" to "find ... | while read ..." loop so that
save invocations of sed(1).

Reviewed By:	seb
2004-06-03 13:13:42 +00:00
uebayasi 165341b35c Delete superfluous `;'. 2004-06-03 12:50:37 +00:00
minskim 7f2ed1973b Bump to 20040601.
- Handle symlinks in a view correctly.
  - Remove superfluous escapes in BRE.
2004-06-01 16:17:22 +00:00
minskim 2972ec435c If symlink integrity check fails, try the target of the symlink. This
is needed when linkfarm creates a symlink to a symlink in the depot.
OK'ed by silence on tech-pkg@.
2004-06-01 16:15:31 +00:00
minskim e7f62cf2e3 Remove superfluous escapes in BRE. OK'ed by uebayasi@. 2004-06-01 16:08:10 +00:00
lukem b817247988 Use MKPRIVATELIB=yes instead of providing an empty libinstall:: target and
setting NOLINT, NOPIC, NOPROFILE (etc)
2004-05-23 02:24:50 +00:00
kleink 5f593fa3da Bump to 20040510: readlink(2) buffer handling fixes. 2004-05-10 20:39:37 +00:00
kleink 48c51a151e Ensure readlink(2) result termination within buffer bounds. 2004-05-10 19:59:59 +00:00
jlam 7b5bb00500 Bump date of manpage after addition of -Q flag to pkg_info(1). 2004-05-08 21:05:02 +00:00
grant 0f204e9fc9 fix typo. 2004-05-08 16:50:37 +00:00
jlam 04d5477295 Fix up definition of SHOW_BI_VAR, the prototype for show_var(), and the
usage string for pkg_info(1).  Also bump the version to 20040508.  From
pkg/25494 by FUKAUMI Naoki.
2004-05-07 21:38:57 +00:00
jlam 19baba8fb8 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

Bump the version number of pkg_install(1) to 20040507.
2004-05-07 16:40:30 +00:00
tv f3215814d5 20040428: In pkg_add, set the umask nice and early, and remove an absolute
setting of mode in a mkdir command.
2004-04-28 15:37:29 +00:00
simonb 9bc855a931 s/the the/the/ (only in sources that aren't regularly imported from
elsewhere).
2004-04-23 02:58:27 +00:00
tv 5b799f00cc Hi there. I'm a stack-allocated array. I'm filled with garbage until
someone puts something useful in me, like zero bytes.

(Read:  Fix uninitialized array member access in pkg_add.  Bump to 20040421.)
2004-04-21 20:10:10 +00:00
christos 6bd1d6d4db Replace the statfs() family of system calls with statvfs().
Retain binary compatibility.
2004-04-21 01:05:31 +00:00
itojun 1e803d1e8b missing period at the end of sentence 2004-04-19 18:43:26 +00:00
wiz 0f952b0c54 Bump date for previous. 2004-04-11 13:31:17 +00:00
rh 56d86cdd8c 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.
2004-04-11 06:13:46 +00:00
abs 0be46fce4e Fix file descriptor leak in read_buildinfo() which caused one leaked
descriptor per package inspected. 'pkg_add *' in a large directory now
works.  Update PKGTOOLS_VERSION to "20040410"
2004-04-10 09:10:17 +00:00
tv 84c1ac8b80 Datestamp as 20040409 to mark umask change. 2004-04-09 18:36:08 +00:00
tv 94b8c2cf60 Re-add umask() setting, and parameterize it so that pkgsrc/bootstrap based
pkgsrc platforms can override the value.
2004-04-09 18:27:48 +00:00
agc 1915cbb83e 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.
2004-04-06 05:56:07 +00:00
reed ef78b0e16e Some package names are extra long, like xscreensaver-gnome-4.13
and gdk-pixbuf-gnome-0.22.0nb1, so make sure that lines don't wrap.
Instead of having maxline based on MAXNAMESIZE, have it be based
on the length of the package name if longer than MAXNAMESIZE.
(This was discussed on tech-pkg list in November, 2003.)
2004-04-01 02:37:24 +00:00
tv fd77b8c8a1 20040330: changes for Interix; in particular, pkg_add(8) no longer sets
umask explicitly.
2004-03-30 15:16:17 +00:00
tv 45669ab694 Changes to make these work on Interix: remove nonroot warnings if on
Interix, and remove absolute setting of umask in pkg_add.
2004-03-29 21:41:39 +00:00
wiz eca6d46226 Check pkgdb_open for correct return value.
From Peter Postma in PR 24863.
2004-03-22 11:42:51 +00:00
keihan 21e07a3de8 s/netbsd.org/NetBSD.org/g 2004-03-16 14:31:15 +00:00
wiz e3fc4b66c3 Spell the plural of suffix "suffixes", not "suffices".
Inspired by PR 24400 by Todd Vierling.
2004-02-13 17:56:17 +00:00