Commit Graph

490 Commits

Author SHA1 Message Date
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