Commit Graph

659 Commits

Author SHA1 Message Date
Kirill Ponomarev
1b753fc66b Use bzip2(1) by default to compress package tarball on
__FreeBSD_version >= 500039.

Submitted by:	Alex Lyashkov <umka@sevcity.net>
MFC after:	5 days
2006-04-17 10:58:45 +00:00
Ruslan Ermilov
e1fe3dba5c Reimplementation of world/kernel build options. For details, see:
http://lists.freebsd.org/pipermail/freebsd-current/2006-March/061725.html

The src.conf(5) manpage is to follow in a few days.

Brought to you by:	imp, jhb, kris, phk, ru (all bugs are mine)
2006-03-17 18:54:44 +00:00
Kirill Ponomarev
8e6e8c2670 Close descriptor in retrieve_x509_marker function.
PR:		bin/71594
Submitted by:	Dan Lukes <dan@obluda.cz>
2006-03-15 01:19:23 +00:00
Poul-Henning Kamp
05380e0125 Add -F option to not fail on already installed packages.
Submitted by:   Eugene Grosbein <eugen@grosbein.pp.ru>
2006-03-09 14:49:19 +00:00
Kirill Ponomarev
863c9a46b4 Fix pkg_version with the -o argument to print the origin.
Submitted by:	Sebastian Stach <sebsta AT t-online DOT de>
MFC after:	3 days
2006-02-12 16:09:33 +00:00
Kirill Ponomarev
1a4eb4edac Fix typo. 2006-01-29 20:30:55 +00:00
Florent Thoumie
cd2407daad Add -K option to pkg_add and pkg_info.
This option saves packages to PKGDIR (if defined or current directory by default)
as they are downloaded.
Silent a warning when -n is used and package has a +DISPLAY file.

Approved by:	krion
MFC after:	1 week
2006-01-09 18:27:21 +00:00
Kirill Ponomarev
ce036f4091 When using @cwd %%FOO%%, we must ensure to return in the original
prefix later, but doing so with @cwd %%OLDPREFIX%% (having
PLIST_SUB+="OLDPREFIX=${PREFIX}") hardcodes the value in the packing
list. That's not really a problem when dealing with ports but that's
a problem with packages since pkg_add -p option only overrides the
first @cwd occurrence.

This patch allow us to use @cwd without any argument. If no
directory argument is given, it will set current working directory
to the first prefix given by the @cwd command.

PR:		bin/77212
Submitted by:	flz
2006-01-07 22:10:58 +00:00
Kirill Ponomarev
c94ab799af Document PKG_PATH enviroment variable.
Prodded by:	Mark Andrews <Mark_Andrews AT isc DOT org>
MFC after:	2 days
2005-11-23 10:31:59 +00:00
Ruslan Ermilov
78ad54210f -mdoc sweep. 2005-11-18 10:56:28 +00:00
Kirill Ponomarev
3d4e952eef Add -P flag, it does the same as the -p option, except that the
given prefix is also used recursively for the dependency packages,
if any.  If the -P flag appears after any -p flag on the
command line, it overrides it's effect, causing pkg_add to use the
given prefix recursively.

PR:		bin/75742
Submitted by:	Frerich Raabe <raabe AT kde DOT org>
MFC after:	3 days
2005-11-12 11:45:01 +00:00
Kirill Ponomarev
1d03b1a1ae Introduce 3 new options for pkg_create(1), -x for using basic
regular expressions for pkg-name, -E for extended regexps and -G for
exact matching.

Submitted by:	mux
MFC after:	3 days
2005-11-08 20:48:26 +00:00
Murray Stokely
663f4b128b Look for packages in packages-6.0-release or packages-6-stable, as
appropriate.

Approved by:	re (scottl@)
Reviewed by:	portmgr (kris@)
2005-10-27 18:34:51 +00:00
Kirill Ponomarev
8fcd9854d1 * pkg_version(1) exits if INDEX files is not found and -I is not
specified.  The result is that the package will be listed with a '?'
  as if it was not found within the INDEX file, so fix this behaviour.
* Remove trailing spaces.

PR:		bin/87136
Submitted by:	Sean Farley <sean-freebsd at farley dot org>
MFC after:	3 days
2005-10-10 12:35:31 +00:00
Kirill Ponomarev
b3f2825399 Fix pkg_info(1) and pkg_delete(1) to handle properly packages which
names start with a digit.

PR:		bin/76858
Submitted by:	Matthew D. Fuller <fullermd@over-yonder dot net>
MFC after:	3 days
2005-10-10 08:38:21 +00:00
Kirill Ponomarev
37e9053e23 Do not bitch about bsdpan modules not having origin.
Based on PR:	bin/82269
Submitted by:	Steven Hartland <killing at multiplay dot co dot uk>
MFC after:	3 days
2005-09-24 21:41:47 +00:00
Kirill Ponomarev
a1a65496e6 Remove '\n' since it's redundant in case if file doesn't exist while
running 'pkg_info -g'

Based on PR:	bin/42609
Submitted by:	Jeff King <peff-freebsd at peff dot net>
MFC after:	3 days
2005-09-24 19:41:56 +00:00
Kirill Ponomarev
cf53630f66 Add -o/-O options to pkg_version:
-o  Show the origin recorded on package generation instead of the
       package name.

   -O  Only list packages whose registered origin is origin.

Based on PR:	bin/78640
Submitted by:	Marcus Grando <marcus at corp dot grupos.com.br>, flz
2005-07-27 07:55:12 +00:00
Ken Smith
3658b4c610 Fix an oops on FBSD-version for packages-5-stable I made in previous
commit.

Pointy hat:	kensmith
Approved by:	re (implicit)
2005-07-11 16:16:24 +00:00
Ken Smith
f0776623a6 Prepare for packages-7-current. While here retro-fit packages-5.4-release
which probably should have been done a while ago.

Approved by:	re (implicit)
2005-07-11 15:56:25 +00:00
John-Mark Gurney
522738a9a4 remove a few uses of the word `really'
Reviewed by:	hrs
Approved by:	re (scottl)
MFC after:	1 week
2005-06-27 17:10:22 +00:00
Ruslan Ermilov
02a75c6773 Fix last commit.
Approved by:	re (blanket)
2005-06-22 12:15:16 +00:00
Kirill Ponomarev
c554b6316d Implement @noinst field which has at the moment the same meaning and
function as @comment has.  But will be valid only for files and not
for md5 sums, rcsid's and comments in the future.

Submitted by:	flz
Approved by:	re@ (scottl)
2005-06-14 15:05:43 +00:00
Ruslan Ermilov
9d73fabda7 Markup fixes.
Approved by:	re (blanket)
2005-06-14 12:26:36 +00:00
Dag-Erling Smørgrav
ee66677a7a Remove kludges intended to support src trees with partial obj trees.
Discussed with:	ru
2005-06-10 06:12:53 +00:00
Maxim Sobolev
ca97fe27e5 Add -R modifier for the mode when pkg_create(8) creates package file
from the locally installed package. When this modifier is specified
pkg_create(8) will also create package files for all packages on
which that locally installed package depends.

MFC after:	5 days
2005-06-06 03:24:14 +00:00
Colin Percival
4f1178e76c Add an -I option to pkg_version:
-I  Use only the index file for determining if a package is out of
      date.  This is much faster than using the version number from a
      port's Makefile, at the expense of potentially giving an incor-
      rect result if the index file is out of date.

Without this option, the index file is only consulted if "make -V PKGNAME"
cannot be used.

Approved by:	portmgr (krion)
2005-05-24 08:26:44 +00:00
Joe Marcus Clarke
d19a25b5b3 Change the PATH for pkg_add to be the same used for pointyhat package builds.
This will give our users and porters a more consistent experience between
installing ports and installing packages.

Discussed with:	portmgr
2005-03-19 19:20:19 +00:00
Ruslan Ermilov
36a142c455 Expand contractions. 2005-02-13 23:45:54 +00:00
Ruslan Ermilov
0227791b40 Expand *n't contractions. 2005-02-13 22:25:33 +00:00
Ruslan Ermilov
59a3c79da6 Sort sections. 2005-01-18 20:02:45 +00:00
Ruslan Ermilov
a866e17077 Added the EXIT STATUS section where appropriate. 2005-01-17 07:44:44 +00:00
Ruslan Ermilov
1a74e6a157 Scheduled mdoc(7) sweep. 2005-01-11 11:47:22 +00:00
Ruslan Ermilov
48b9142f64 Add -q to usage() and mark the "index" argument as optional. 2005-01-11 11:23:59 +00:00
Paul Richards
b25acc4721 Update the INDEX file to INDEX-6 2005-01-04 17:13:16 +00:00
Paul Richards
b134a8b672 Use INDEX-6 for versions of FreeBSD > 600000 2005-01-04 16:18:55 +00:00
Ruslan Ermilov
a216173556 NOCRYPT -> NO_CRYPT 2004-12-21 10:16:04 +00:00
Ruslan Ermilov
a35d88931c For variables that are only checked with defined(), don't provide
any fake value.
2004-10-24 15:33:08 +00:00
David E. O'Brien
f4a324ac51 Add a -q flag to pkg_version. It suppresses the output of <,=,>.
This makes it possible to "portupgrade `pkg_version -q -l '<'`".
2004-10-18 05:34:54 +00:00
David E. O'Brien
73f69794ee Set the real limits on 5-current, add 5-stable, add 6-current. 2004-10-17 14:36:30 +00:00
Ruslan Ermilov
7d5cc1cf59 Don't put DEBUG to CFLAGS, we have the standard DEBUG_FLAGS for this. 2004-08-12 20:06:01 +00:00
Oliver Eikemeier
f6404ebe03 typo
Approved by:	ru
2004-08-11 15:47:13 +00:00
Oliver Eikemeier
a08b3a047a FWIIW, make the `test' target in pkg_install/version actually work. 2004-08-11 15:46:10 +00:00
Colin Percival
d37df47d31 Join the 21st century: Cryptography is no longer an optional component
of releases.  The -DNOCRYPT build option still exists for anyone who
really wants to build non-cryptographic binaries, but the "crypto"
release distribution is now part of "base", and anyone installing from a
release will get cryptographic binaries.

Approved by:	re (scottl), markm
Discussed on:	freebsd-current, in late April 2004
2004-08-06 07:27:08 +00:00
Stefan Farfeleder
14cc87e479 Use the length modifier 'll' instead of 'q' to print long longs. 2004-07-28 16:03:13 +00:00
Alexander Kabaev
617e8b416d Downgrade WARNS level to more tolerable value. Attempt to fix
casts as lvalue usage whenever possible.
2004-07-28 07:19:15 +00:00
Ruslan Ermilov
455fb174df Eliminated double whitespace. 2004-07-03 18:35:53 +00:00
Ruslan Ermilov
07bfccd71e Mechanically kill hard sentence breaks. 2004-07-02 23:13:00 +00:00
Oliver Eikemeier
b9ba84598d - pkg_add spawns itself as argv[0] when installing dependent packages, to
enable the use as a port on older systems

- use absolute paths in all calls to external programs, to account for strange
  PATH settings

- use INDEX or INDEX-5 depending on FreeBSD version, to enable the use on
  FreeBSD 4.x as a port.

- conditionalize all 4.x/5.x differences on __FreeBSD_version, so that the
  pkg_install tools can be kept in sync on 4.x and 5.x

- Bump PKG_INSTALL_VERSION

Reviewed by:	portmgr (bento run)
MFC after:	4 weeks
2004-06-29 19:06:42 +00:00
Oliver Eikemeier
43b4652a71 - pkg_info: flag -r: (show packages this packages depends on (documentation change))
- pkg_info: new flag -j (show the requirements script)

- pkg_info: fix verbose output when used on packages

- better handling of corrupt entries in /var/db/pkg

- differ between corrupt entires and packages not installed

- various small fixes

PR:		56989, 57016, 57029, 26468
2004-06-29 18:59:19 +00:00
Oliver Eikemeier
9c762229f3 - pkg_create: new flag -S (clean room installation)
- pkg_create: checksum meta files too

PR:		66032
2004-06-29 18:56:59 +00:00
Oliver Eikemeier
6372c5ec85 - match package version numbers with relational operators
- use glob patterns when matching packages by origin

- csh-style {...} choices in glob matching

- pkg_info: new flag -E (list matching package names only)

- pkg_version: new flag -T (test if a given name matches a pattern)

- new flag -X (interpret pattern as an extended regular expression)

PR:		56961
2004-06-29 18:54:47 +00:00
Oliver Eikemeier
136b0d0b52 - complete rewrite of the version number parsing code, restoring compatibiliy of 5.x with 4.x and portupgrade
- parse version numbers of ports containing an underscore followed by a number correctly

- handle special strings pl, alpha, beta, pre and rc

PR:		56961
2004-06-29 18:52:13 +00:00
Ruslan Ermilov
362cd31336 Markup and punctuation nits. 2004-06-05 20:21:17 +00:00
Bruce A. Mah
b98176bc0b Add 4.10 and 5.2.1 entries so that pkg_add -r fetches from the right
package sets.

PR:		66251
Submitted by:	eik
2004-05-08 23:45:31 +00:00
Tim Kientzle
b1782cbaa9 When invoking tar, make sure the mode option (-x) is first. 2004-04-08 06:06:42 +00:00
Colin Percival
6a73df6f3f Synopsis fixes:
* `pkg_info -flags' needs either `-a' or a package name. [1]
 * Add -Q option to manual page.
 * Update `usage:' to match the manual page.

PR:		misc/64786 [1]
Reviewed by:	ru
MFC after:	3 days
2004-03-30 20:48:16 +00:00
Ken Smith
e77e03a08a Add command line option for chrootdir, all pkg_add(8) operations will be
done inside of chroot(2) to chrootdir.  Added to help with sysinstall(8)
support of install to alternate root but possibly useful for setting up
jails, etc.

No objection from:	portmgr@
Style(9) abuse due to:	entire program violates style(9)
Approved by:		rwatson (mentor)
2004-03-01 21:58:21 +00:00
Ken Smith
c15f03d381 This is an initial whitespace cleanup commit, new content to follow.
Adding hard line breaks at the end of sentences.

Approved by:	rwatson (mentor)
2004-03-01 21:50:49 +00:00
Dag-Erling Smørgrav
8afe6f9797 Instead of bogusly complaining about odd file names, handle them properly
by escaping all suspicious characters.

MFC after:	3 days
2004-01-24 17:32:43 +00:00
Dag-Erling Smørgrav
9d364741c9 Try to apply consistent indentation. 2004-01-24 15:35:04 +00:00
Ruslan Ermilov
d82881651b - Properly build both crypto and non-crypto versions of the
package management tools.

- Drop redundant dependency of pkg_create(1) and pkg_delete(1)
  on crypto libraries now that they do not link with libfetch.
2004-01-17 13:41:16 +00:00
Ruslan Ermilov
f475384e4e Replaced black magic with white magic. 2004-01-17 13:27:27 +00:00
Bruce A. Mah
2b5c94a768 Catch up with reality with respect to the location of 4.8, 4.9,
5.0, 5.1, 5.2, and CURRENT packages.
2004-01-02 00:13:20 +00:00
Jens Schweikhardt
ecc68fbe47 Fix a case of undefined behavior due to overlapping buf objects in
snprintf (buf, size, fmt, buf, etc). This only works by chance with our
libc, but fails (with a truncated string) on e.g. glibc.

Okayed by:	sobomax
MFC after:	1 week
2003-12-23 15:01:12 +00:00
Jacques Vidrine
cd9607fdd9 Correct truncation detection after use of snprintf: The case where
exactly one character was truncated was not detected.
2003-12-17 13:36:05 +00:00
Peter Pentchev
5e5d9065e4 Clarify the order of arguments passed to the pre-/post-install script
in the description of the pkg_create -i command-line option.

PR:		55477
Submitted by:	Eric van Gyzen <vangyzen@stat.duke.edu>
MFC after:	5 weeks
2003-08-26 14:49:11 +00:00
Bosko Milekic
d8af834050 Backout 1.14, it seems to be causing problems with libxml build
and I don't have time to investigate this code in much detail right
now.
2003-08-04 03:02:36 +00:00
Bosko Milekic
1d324ddef8 Use strncmp() and not strcmp() here to properly match
installed ports.

Submitted by: Harold Gutch <logix@foobar.franken.de>
2003-08-01 17:26:41 +00:00
Philippe Charnier
49f90486ce The .Xr utility 2003-06-08 14:06:45 +00:00
Mario Sergio Fujikawa Ferreira
fc12c41ca3 pkg_create incorrectly does not add trailing '\n' when it receives
either COMMENT or DESCR from the command line. When a port is
installed, one gets both +COMMENT and +DESCR files with a trailing
'\n' character. However, +COMMENT does not contain a trailing '\n'
when it is installed from a package due to this behavior of pkg_create.

 Therefore, make sure it behaves exactly the same regardless of
where got its information; either command line or files. The modified
functions are used by pkg_create.

PR:		52097
Reviewed by:	bento, kris,
		portmgr, re,
		Michael Nottebrock <michaelnottebrock@gmx.net>,
		Martin Horcicka <horcicka@FreeBSD.cz>
Approved by:	re (scottl)
MFC after:	1 week
2003-05-26 17:12:22 +00:00
Mario Sergio Fujikawa Ferreira
c32acd2e5c Add a trailing '\n' character if none is found in the information
obtained from a package. Patch show_file() [1] and show_index() [2]
functions.

PR:		52097
Reviewed by:	bento, kris,
		portmgr, re,
		Michael Nottebrock <michaelnottebrock@gmx.net>,
		Martin Horcicka <horcicka@FreeBSD.cz>
Approved by:	re (scottl)
Obtained from:	NetBSD [1],
		OpenBSD [2]
MFC after:	1 week
2003-05-26 17:06:05 +00:00
Ruslan Ermilov
db1e3a4f98 Erase whitespace at EOL.
Approved by:	re (blanket)
2003-05-22 11:56:41 +00:00
Dag-Erling Smørgrav
7691f66abf Retire the useless NOSECURE knob.
Approved by:	re (scottl)
2003-05-19 15:52:01 +00:00
Ruslan Ermilov
aba60fa66b Fixed troff(1) and mdoc(7) warnings.
Approved by:	re (blanket)
2003-05-18 21:05:22 +00:00
Kris Kennaway
7f6bf1d8ce * Add explicit conflict-checking to the package tools. Packages can
register a list of other packages with which they conflict (via the
  -C option to pkg_create), and they will refuse to install (unless -f is
  specified) if one of the listed packages is already present.

* Update documentation for the new feature as well as fleshing out some
  existing documentation.

* Bump PKG_INSTALL_VERSION so this feature can be tested for.

Submitted by:   Sergey Matveychuk <sem@ciam.ru>
PR:             bin/47145
MFC after:      2 weeks
2003-04-17 09:56:05 +00:00
Robert Watson
82c459bef8 Revert url.c:1.2: there was a race condition between when I produced
the fix and when I committed it -- in between the two, DES committed
a different fix, rendering this fix unneeded.

Requested by:	des
2003-04-17 03:51:06 +00:00
Robert Drehmel
b61ee45f0e - Print out an error message instead of dereferencing a NULL pointer
if matchinstalled() found no packages, which happens to be the
   case after fresh installations.
 - Instead of using strstr(3) to match the package name, depend on
   matchinstalled()'s MATCH_REGEX package matching.

PR:		bin/50384
MFC after:	2 weeks
2003-04-04 14:40:49 +00:00
Robert Watson
8cd5699048 Don't pass NULL in as a flags argument to libfetch's fetchGetURL()
as this can result in a NULL pointer deference when parsing the
flags later.  This change fixes "pkg_add -r" on 5.0-CURRENT for
me; not quite clear how the problem was introduced.
2003-03-27 20:44:09 +00:00
Matthew N. Dodd
a9cd061a2a - Add the 'b' option which causes BLOCKSIZE to be hornored when
the 'q' or 'Q' options are present.
- Document BLOCKSIZE.
2003-03-25 01:22:42 +00:00
Matthew N. Dodd
5e3714183f Implement the 'Q' option which is like 'q' (quiet output) except
that it prefaces the output with the package name.

This is useful for things like this:

# pkg_info -Qsa | awk -F : '{print $2 "\t" $1}' | sort -rn | expand -t 10
2003-03-25 00:51:41 +00:00
Dag-Erling Smørgrav
0f98df2956 Fix a long-standing bug where if the package being deleted had no
post-deinstall script, the variable intended to hold the name of that
script would be used uninitialized.  In some cases, fexists() would
succeed, causing pkg_delete to try to chmod +x it, then execute it,
resulting in bizarre error messages such as:

.//: Permission denied

This bug would normally only occur when multiple packages were
specified on the command line; otherwise post_script would be located
in a previously unused part of the stack, and implicitly (but quite
accidentally) initialized to all-zeros.

MFC after:	3 days
2003-02-25 15:01:54 +00:00
Mike Heffner
b655930760 Initialize sign to NULL so that we don't attempt to free() it in case
of failure.

MFC after: 1 week
2003-02-20 20:13:07 +00:00
Bill Fumerola
6e085fd13f even the default case in a switch requires some action (add break;)
EVP_sha1() returns a const EVP_MD *, so reflect that in the variable
we store its return value in.
2003-02-03 22:47:03 +00:00
Mark Murray
edf34e80d8 No need for the OPENSSL_NO_KRB5 switch anymore.
Fixed by:	nectar
2003-01-31 23:26:55 +00:00
Mark Murray
c6dfac3ee8 iAdjust for OpenSSL 0.9.7. 2003-01-28 23:08:41 +00:00
Tom Rhodes
d13d6a9ed2 Note that -c is no longer supported. This was requested by a few users and
we even have a PR about it.

PR:		47388
Discussed with:	bmah
Requested by:	many
2003-01-27 02:05:59 +00:00
Dag-Erling Smørgrav
a5c14b885b Actually, the canonical way would be syntactically correct. 2003-01-09 12:04:21 +00:00
Dag-Erling Smørgrav
9939988ef2 Canonical way of determining whether or not to use crypto. 2003-01-09 11:57:58 +00:00
Jordan K. Hubbard
12ebd46e4b Prevent buffer overflow in format_cmd() by properly tracking maximum
buffer size.
Reported by:	Lionnel CHAPTAL <Lionnel.Chaptal@IPricot.com>
MFC after:	1 week
2003-01-06 07:39:02 +00:00
Jens Schweikhardt
9d5abbddbf Correct typos, mostly s/ a / an / where appropriate. Some whitespace cleanup,
especially in troff files.
2003-01-01 18:49:04 +00:00
Mike Barcroft
064c8b22be Back out rev 1.33; getbsize(3)'s original interface has been restored.
Approved by:	markm
2002-12-30 18:16:26 +00:00
Jens Schweikhardt
57bd0fc6e8 english(4) police. 2002-12-27 12:15:40 +00:00
Ruslan Ermilov
8d5d039f80 Uniformly refer to a file system as "file system".
Approved by:	re
2002-12-12 17:26:04 +00:00
Kris Kennaway
cc865772a5 Minimal change to cause pkg_version to examine the new INDEX-5 file
instead of INDEX.  This should be done better since this file name will
depend on the FreeBSD major version.
2002-12-04 17:22:48 +00:00
Bruce A. Mah
2930533d3f Assume that packages passed on stdin are in bzip2 format, not gzip.
(sysinstall depends on this feature for package addition.)

Comment on hard-coded bzip2 usage in the spirit of rev. 1.58.
2002-11-14 21:01:17 +00:00
David E. O'Brien
242bb95312 Clean up a little. Don't need to include fetch.h any more, and I can't
find any consumers of HOSTNAME_MAX.
2002-11-06 09:03:53 +00:00
David E. O'Brien
d920cd78f4 Break fileGetURL() out into its own file so that pkg_install/lib consumers
pkg_{create,delete} don't need to needlessly link with libfetch.
2002-11-06 08:57:03 +00:00
Dag-Erling Smørgrav
8758ef9b41 Whitespace cleanup 2002-10-29 12:14:31 +00:00
Andrew Gallatin
fda3659531 getbsize() now takes a pointer to a size_t as its first arg. A pointer
to an int no longer works on an LP64 platform...
2002-10-24 17:27:32 +00:00
Bruce A. Mah
b07931e581 Teach pkg_add -r how to find 4.7-RELEASE packages with an appropriate
osreldate.

(Actually, due to differences in package compression formats, I'm
not sure that a -CURRENT pkg_add -r will do the right thing in
this case, once it finds them.)
2002-10-08 05:15:21 +00:00
Garrett Wollman
0d3bcc2e80 Make the threatened fts(3) ABI fix. FTSENT now avoids the use of the struct
hack, thereby allowing future extensions to the structure (e.g., for extended
attributes) without rebreaking the ABI.  FTSENT now contains a pointer to the
parent stream, which fts_compar() can then take advantage of, avoiding the
undefined behavior previously warned about.  As a consequence of this change,
the prototype of the comparison function passed to fts_open() has changed
to reflect the required amount of constness for its use.  All callers in the
tree are updated to use the correct prototype.

Comparison functions can now make use of the new parent pointer to access
the new stream-specific private data pointer, which is intended to assist
creation of reentrant library routines which use fts(3) internally.

Not objected to in spirit by: -arch
2002-09-21 01:28:41 +00:00
Bruce A. Mah
5eef315753 Update to use *.tbz suffix, also update example URL.
While I'm here, fix a gramm-o.

PR:		42576
Submitted by:	Jeff Ito <jeffi@rcn.com>
MFC after:	1 day
2002-09-10 02:42:59 +00:00
Maxim Sobolev
747b731a5f Sigh, finally activate pkgwrap.c.
Big pointy hat to:	sobomax (who apparently needs some sleep)
Submitted by:		walt <wa1ter@hotmail.com>
2002-09-09 22:59:06 +00:00
Bruce A. Mah
7b89cd2657 Fix minor off-by-one error.
Submitted by:	jhb
2002-09-09 21:21:34 +00:00
Bruce A. Mah
bc49694c45 Make pkg_install go to the right place for 4.6-RELEASE and 4.6.2-RELEASE
packages.

Pointed out by:	obrien
Reviewed by:	jhb
2002-09-09 19:44:17 +00:00
Maxim Sobolev
92d1bb6515 Introduce notion of the package tools revision and allow to wrap all tools
included into pkg_install according to the content of /var/db/pkg_install.conf
file, which specifies version and alternative location of the tools. Format
of the said file is very simple: one line which specifies revision of the
alternative version of the tools and their location separated by space,
i.e.:

20030102 /usr/local/sbin

This would allow bsd.port.mk to install and use up to date version of tools
on older system from ports.

Also add new `-P' flag to pkg_info, which causes it to report currently
installed version of package tools.

Discussed with:	will
2002-09-09 19:43:30 +00:00
Maxim Sobolev
7f5231e4f3 Kill debugging line occasionally slipped into rev.1.3.
Submitted by:	reg
2002-09-09 11:13:00 +00:00
Maxim Sobolev
d4f82fcf34 Vastly decrease amount of memory comsumed in the case when we have to read
ports/INDEX, by allocating eactly amount of memory necessary for storing
each particular entry, insdead of 4K per entry (more than 7000 entries -
go figure). Memory consumption went down to some 500K from some 30M.
2002-09-09 08:00:32 +00:00
Maxim Sobolev
d083e1c6a4 Use --fast-read mode to extract metadata from package file. Since metadata
files are located at the very beginning of the package, this patch in
conjuction with latest tar(1) --fast-mode fix greatly speeds up pkg_info(1)
operation on package files.

MFC after:	1 week
2002-09-09 06:06:09 +00:00
Maxim Sobolev
76b27d2150 When installing package from a local file assume that all subsequent
autoinstalled dependencies will have the same extension, not just
".tbz".

Pointy hat to:	obrien
X-MFC after:	-1 day
2002-09-03 06:59:33 +00:00
Kris Kennaway
c1b2c47ad7 Don't treat unknown commands as fatal errors: they are probably just
the signature of out-of-date pkg_tools and newer packages.

Reviewed by:	jkh
MFC after:	3 days
2002-08-31 20:21:47 +00:00
Jeremy Lea
dd1d26511d Don't dump core on packages with an invalid or empty PLIST.
Reviewed by:	markm
2002-08-26 13:25:48 +00:00
David E. O'Brien
b9d958f5d4 Grrr.... mumble.... a linger gzip'ism still existed.
Submitted by:	Craig Rodrigues <rodrigc@attbi.com>
2002-08-26 03:44:44 +00:00
David E. O'Brien
7412ba062f Reorg just a tad to better express our bzip intentions. 2002-08-25 01:01:08 +00:00
David E. O'Brien
1ab94a83c2 Find remaining hardcoded gzip bits and change to bzip2 bits.
Mark with XXX so someone that cares about being able to handle either
bziped or gziped packages knows where the remaining nits are.
2002-08-25 01:00:16 +00:00
Mario Sergio Fujikawa Ferreira
cf5c89e1fe Preserve suid/gid permissions when extracting packages remotelly
fetched with -r option

Reviewed by:	will
Approved by:	will
2002-08-24 20:04:17 +00:00
Maxim Sobolev
f46eb8f0b8 Ensure that origin field in the packing list structure is initialised. This
fixes problem when there are origin-less packages installed on a system

Reported by:	Mark Knight <markk@knigma.org>
MFC after:	3 days
2002-08-12 16:15:25 +00:00
Jens Schweikhardt
2b239dd118 Fix typos; each file has at least one s/seperat/separat/
(I skipped those in contrib/, gnu/ and crypto/)
While I was at it, fixed a lot more found by ispell that I
could identify with certainty to be errors. All of these
were in comments or text, not in actual code.

Suggested by:	bde
MFC after:	3 days
2002-08-11 13:05:30 +00:00
Akinori MUSHA
9988e3662f Another .tbz2 -> .tbz leftover. Properly look for pkgname.tbz.
MFC after:	1 day
2002-08-04 21:27:57 +00:00
Akinori MUSHA
752b4d681e Drop support for the .tbz2 suffix. One would not want pkg_create(1)
to create "pkgname.tbz" when one specifies "pkgname.tbz2".

MFC after:	1 week
2002-08-04 21:20:09 +00:00
David E. O'Brien
9e0e832f14 Use an 8.3 friendly extension when compressing with bzip2. 2002-08-04 06:03:34 +00:00
Maxim Sobolev
64449e2a32 When extracting package pass `-p' option to tar(1), so that files are
extracted with correct permissions.
2002-08-02 17:26:53 +00:00
Mark Murray
8360b6af14 C replacement for the Perl5 code.
Submitted by:	reg
2002-06-24 16:03:24 +00:00
Dag-Erling Smørgrav
937ce6a950 Reorder libraries to fix static linking (libssl depends on libcrypto, so
it must come before libcrypto in LDADD)

Reviewed by:	bde
2002-06-12 12:45:24 +00:00
Ruslan Ermilov
4093807dd9 libfetch now depends on libcrypto and libssl. 2002-06-06 13:45:46 +00:00
David E. O'Brien
b47f7d2f16 Grammar nit.
Submitted by:	keramida
2002-06-04 20:01:53 +00:00
Bruce A. Mah
ca8f81dd24 pkg_version was incorrectly claiming that 1.5 == 1.5.0.1, because
we weren't properly checking for the case that the two version strings
being compared had different numbers of components.  This has been
fixed.

Pointed out by:	sobomax
Reviewed by:	silence on -ports
2002-05-31 15:45:48 +00:00
Ruslan Ermilov
24caa840be mdoc(7) police: markup nits. 2002-05-30 08:24:52 +00:00
Maxim Sobolev
027d0ad454 MFS: two more testcases highlighting recently discovered problem with version
comparison routine.
2002-05-28 18:00:44 +00:00
Maxim Sobolev
6950a26a50 Eliminate free'ing already freed chunks.
MFC after:	1 week
2002-05-22 10:33:25 +00:00
Maxim Sobolev
62553a3cbf MFS: silence compiler warnings. 2002-05-20 09:55:41 +00:00
Eric Melville
595d77f913 Remove cross reference to pkg_update(1).
Submitted by:	dd
2002-05-16 22:46:53 +00:00
Tom Rhodes
67c8020f12 Consistancy check: s/file system/filesystem/g 2002-05-16 02:28:39 +00:00
Maxim Sobolev
dd3a3dfc3b - Make use of DEPOROGINs (if there are any) when installing package;
- fix few bogosities here and there;
- move some common routines into the library.

MFC after:	2 weeks
2002-05-14 21:42:37 +00:00
Ruslan Ermilov
423e9124d9 Mark all internal libraries with INTERNALLIB. 2002-05-13 11:24:03 +00:00
Eric Melville
003f849311 Remove cross reference to pkg_update(1). 2002-05-11 16:27:19 +00:00
Alfred Perlstein
f7bb25f702 replace __FUNCTION__ with standardized __func__.
Requested by: jhb
2002-05-11 04:17:55 +00:00
Alfred Perlstein
a2bcd1a09f fix build:
you may not use string concatination with __FUNCTION__, replace all occurances
of:
__FUNCTION__ ": error string"
with:
"%s: error string"
2002-05-11 03:48:49 +00:00
Maxim Sobolev
8ae0995264 When packing installed package into a file (pkg_create -b) make sure to
include all package files into resulting tarball.

PR:		34007
Submitted by:	olgeni

While I here:

- Remove bogus comment;
- ensure that we return the proper exit code in the case of -b failure.

MFC after:	5 days
2002-05-10 00:03:14 +00:00
Paul Richards
ee13ade8a0 Do my bit for the Perl removal team and shoot my own, rather mangy
looking, dog.
2002-05-08 18:44:24 +00:00
Maxim Sobolev
a1ad4f468a New feature: allow origins of all dependencies be recorded into package list
using new `@comment DEPORIGIN:...' directive. This would allow us to make
many neat things including:

- easier binary upgrades;
- source upgrades without using external tools by simply extending
  bsd.port.mk and pkg_install tools;
- mixed-mode upgrades (source + binary);
- depreciate and deorbit silly +REQUIRED_BY files in the near future.

This feature is no-op until appropriate bsd.port.mk patch is committed, and
even when it is already committed packages generated will remain 100%
compatible with old set of pkg_install tools (module all those neat
features, of course).

MFC after:	6 days
2002-05-05 21:03:25 +00:00
Maxim Sobolev
f351f851db In a origin lookup mode (-O) don't bail out when encountering empty package
directory, because this prevent this option from being used from the
package-depends target of bsd.port.mk since it creates such empty dir
during its normal operation.

MFC after:	6 days
2002-05-05 20:50:27 +00:00
Maxim Sobolev
ae346c242b Update usage() and manpage to match reality (add -O into usage and adjust
both to make clear that -W and -O are stand-alone options).

MFC after:	6 days
2002-05-05 13:44:32 +00:00
Maxim Sobolev
2dc0025a87 Use PLIST_ORIGIN instead of rolling own version using PLIST_COMMENT.
MFC after:	6 days
2002-05-05 13:09:04 +00:00
Maxim Sobolev
63d4f9853d Handle PLIST_ORIGIN properly.
Poked by:		kris
Pointy hat grabbed by:	sobomax
MFC after:	6 days
2002-05-05 12:54:11 +00:00
Maxim Sobolev
76c0ee0ef2 Add ability to query installed packages based on origin. 2002-05-04 14:49:49 +00:00
Maxim Sobolev
3d5c1511ca Make pkg_info working again when argument is a file not in the current
directory.

PR:		37571
Submitted by:	Dirk Meyer <dirk.meyer@dinoex.sub.org>
MFC after:	1 week
2002-05-02 13:09:33 +00:00
Maxim Sobolev
5583155096 Make `-g' working for symlinks.
PR:		33857
Submitted by:	darren <igla@batterybackups.net>
MFC after:	1 week
2002-05-02 12:52:42 +00:00
Maxim Sobolev
3465d2ab40 Kill local variable which shadows global one. This fixes creation of bzip2
compressed packages broken in the previous commit.

Pointy hat to:	obrien
2002-05-02 10:19:13 +00:00