Commit Graph

152 Commits

Author SHA1 Message Date
Alexander Langer
43d1df332e Removed occurrences of consecutive repeated words (such as "the the"). 1999-02-12 02:12:08 +00:00
Bill Fumerola
2d073cdff2 Fix nasty bug where getpackagesite() will return an integer if it doesn't
know what revision of FreeBSD is being run. This case should never happen,
but just in case.
1999-01-28 20:17:32 +00:00
Bill Fumerola
ad22d0720b Numbering typo, missed a '0'
Submitted by:	Brian Feldman
1999-01-26 22:31:23 +00:00
Bill Fumerola
c6a6c9c017 Update pkg_add's remote package feature to reflect the new structure of
wcarchive. This needs to be updated when:

(a) The directory structure changes on wcarchive
(b) getosreldate() has a new significance
	(ie. get ELF packages/get a.out packages)
(c) Branches are changed around

As we stand right now, 3.0-postELFday and 4.0-x all point to the same
directory, but when 4.0 starts to have its own packages, this file will
need to be changed.
1999-01-25 21:08:13 +00:00
Bill Fumerola
99ebed6b50 Style police, inline ifs.
Submitted by:	 Brian Feldman <green@unixhelp.org>
1999-01-18 03:54:17 +00:00
Justin M. Seger
1048df4463 enviornment -> environment
PR:		docs/9534
Submitted by:	rv@fore.com
1999-01-17 15:08:09 +00:00
Bill Fumerola
ab13b06dc0 Add a new option for pkg_add, -r.
The remote option allows for automatic package fetching and installation
using the package repository found on wcarchive. Naturally, this site
can be overridden with a enviornment variable.

This code uses getobjformat() and getosreldate(). This means when some event
causes the package to be fetched to change (such as e-day) the logic also
needs to be changed.

Sorta reviewed by:	jkh
Code suggestions:	peter, jkh, eivind, msmith
1999-01-17 01:22:55 +00:00
Jordan K. Hubbard
0440e20b71 Make it possible to have separate install scripts as well as have
an on-delete script.

Submitted by:	Rajesh Vaidheeswarran <rv@fore.com>
1998-12-16 13:59:31 +00:00
Jordan K. Hubbard
400d793dd7 Unlink old contents of package when extracting new.
Submitted by:	pst
1998-10-28 22:44:24 +00:00
Jordan K. Hubbard
ac5c5f1320 Correct a misleading comment. 1998-10-12 20:01:48 +00:00
Jordan K. Hubbard
355150a489 Use a more reasonable default umask in case the root umask is too
fascist.
PR:		4014
1998-09-14 19:22:59 +00:00
Jordan K. Hubbard
375ca45770 correct usage of cleanup() everywhere - this became bogus when the warnx/errx
stuff was added and nobody seems to have noticed. :)
Noticed by:	Josh MacDonald <jmacd@paris.CS.Berkeley.EDU>
1998-09-11 07:26:58 +00:00
Jordan K. Hubbard
8c26c30381 o Set paths internally for pkg_add for tools we might want to invoke.
o Fix bogus suffix handling.
o Tell user when an FTP url is being xferred rather than being silent.
  This sort of violates "the unix way" but it stops people from whacking
  ^C when they think it's hung, too.  Sometimes visual indication of
  success is important.  Doesn't spit out anything if not on a TTY.
1998-09-08 10:42:26 +00:00
Jordan K. Hubbard
62203a9ce5 Fail as documented when a dependency cannot be found
PR:		7318
Submitted by:	djv@bedford.net
1998-09-08 03:02:45 +00:00
Jordan K. Hubbard
47d8228368 Fix recursive package add problem (for on-disk package files) I introduced
with the change in semantics to make_playpen().  Now package dependencies
more than 2 levels deep should work again.  Pass the hat.
1998-08-27 14:59:55 +00:00
Eivind Eklund
4dc6689c09 Avoid race-conditions on playpen delete. 1998-07-17 14:56:31 +00:00
Joseph Koshy
fa0bc432ca Add $Id$.
PR:		7251
Submitted by:   Norihiro Kumagai <kuma@jp.freebsd.org>
1998-07-14 08:28:15 +00:00
Jordan K. Hubbard
3dc0dc887a MF22: check for null pointer. 1998-07-04 14:13:01 +00:00
Joseph Koshy
f618e998de Document environment variables used by pkg_{add,create,info}. These
include PKG_TMPDIR, TMPDIR, PKG_DBDIR.  Add a FILES section to these
manual pages.

PR: docs/7064
1998-06-26 07:15:38 +00:00
Philippe Charnier
f12a14713b .Sh AUTHOR -> .Sh AUTHORS. Use .An/.Aq. 1998-03-23 08:31:20 +00:00
Bruce Evans
6dd8984675 Use foo/bar.a' instead of -Lfoo -lbar' for linking to static internal
libraries, so that `ld -f' in can create correct dependencies for
yet-to-be-built libraries.
1998-03-07 08:55:00 +00:00
Jordan K. Hubbard
79af7eafa8 Eliminate the idea of nested "playpens" entirely - it just obfuscated
the code and, in at least one case, made it more dangerous to no gain.
1998-02-16 17:16:51 +00:00
Jordan K. Hubbard
8b1643d2c6 I must have been smoking crack when I made this change. Using sh -c
in a vsystem() call is just a ludicrous way of calling sh -c "sh -c ..."
Whoops!  I don't know my own bloody code here!
1998-01-21 06:08:35 +00:00
Warner Losh
07d19529ee Quote filenames more agressively.
Reviewed by:	jkh
Submitted by:	Hubert Feyrer
1998-01-21 00:12:56 +00:00
Jordan K. Hubbard
73dfa4e8d6 MF22: fix to install script handling. 1998-01-17 12:26:19 +00:00
Jordan K. Hubbard
07eb524cb0 Don't assume install script is directly runnable - use sh -c. 1998-01-08 11:27:06 +00:00
Masafumi Max NAKANE
cb48519127 Pkg_add refused to process package whose packing list contains @exec/@unexec
before any file names.  This change makes pkg_add to process those
packages if @exec/@unexec commands don't contain any %[fFB].  Also
enable @exec/@unexec that have %D if the installation prefix is known to
pkg_add.
Reviewed by:	jkh
1997-10-24 08:32:06 +00:00
Jordan K. Hubbard
940d89a9d5 - do string-magic on the right variable when trying
to find dependent packages on the local disk (i.e. package given as
   filename, not URL)
 - document $PKG_PATH
 - use -v on pkg_add for dependent packages

Submitted by:	hubertf@NetBSD.ORG
Obtained from:	NetBSD
1997-10-18 05:54:17 +00:00
Jordan K. Hubbard
570f313ee4 Don't return from cleanup() - if it's removed the playpen then very
bad things will happen if we return to unsuspecting code.
Noted to my great dismay by:	Tim Vanderhoek <hoek@hwcn.org>
1997-10-13 15:03:55 +00:00
Philippe Charnier
6fed414929 Use err(3). Cosmetics in usage string and man page. 1997-10-08 07:48:21 +00:00
Tim Vanderhoek
a04aa72155 Document pkg_add's dependency auto-install. While I'm here, fix
a couple typos, and consistent double-spacing after sentences.

This is actually a spinoff from the "ports-current discontinued"
blow-up some time ago.

Ack'd by: jkh
1997-09-27 13:41:35 +00:00
Poul-Henning Kamp
d030d2d2ae Many places in the code NULL is used in integer context, where
plain 0 should be used.  This happens to work because we #define
NULL to 0, but is stylistically wrong and can cause problems
for people trying to port bits of code to other environments.

PR:		2752
Submitted by:	Arne Henrik Juul <arnej@imf.unit.no>
1997-09-18 14:08:40 +00:00
Masafumi Max NAKANE
a1138a1695 Typo. 1997-09-13 17:55:43 +00:00
Jordan K. Hubbard
55f4e300b4 Change the naming conventions for preserve'd files and also document
the option in pkg_create.  Now preserved files start with a . and are
named .<filename>.<pkgname>.backup so that their purpose is more clear.

Note that just using the preserve option without proper pkg_deps
is also foolish since packages being deleted in the incorrect order with
preserve on can generate some odd results.
1997-07-01 06:13:51 +00:00
Jordan K. Hubbard
6373a10b41 Whoops, only attempt to back up the file if it exists. :-} 1997-06-30 02:57:40 +00:00
Jordan K. Hubbard
94d1d55871 Add support for @option preserve - moves existing files out of the way
before replacing them (using pkgname to make this hopefully unique).
Delete also moves them back, if they exist, resulting in a package
which can be "backed out" with reasonable safety.
1997-06-29 10:41:49 +00:00
Jordan K. Hubbard
9a73af57e4 Fix multiple documentation bogons.
PR:		3798
Submitted by:	Jan Kuriyama <kuriyama@opt.phys.waseda.ac.jp>
1997-06-19 15:18:34 +00:00
Andrey A. Chernov
31adf0ad42 When no last file specified for % command user barf(error diagnostic)
instead of segmentation fault
1997-05-24 21:45:55 +00:00
Warner Losh
6c3f552a31 compare return value from getopt against -1 rather than EOF, per the final
posix standard on the topic.
1997-03-31 05:11:47 +00:00
Jordan K. Hubbard
b421849f2f Close PR#2459 1997-02-25 07:22:23 +00:00
Peter Wemm
476602a9d0 Revert $FreeBSD$ to $Id$ 1997-02-22 16:15:28 +00:00
Jordan K. Hubbard
6e0a4251e7 Prevent potential argument buffer overflow. 1997-02-15 16:34:47 +00:00
Jordan K. Hubbard
2df00d4c64 Fix a bogon with playpen size calculation for pkg of "-". It's amazing
this ever worked, actually.
1997-02-15 14:17:28 +00:00
Jordan K. Hubbard
06b547f87f Put back @owner/@group/@mode behavior I took out way back when.
Submitted-By: pst
1997-02-14 01:52:38 +00:00
Wolfram Schneider
bfd34a4a60 Sort cross references. 1997-01-20 00:03:00 +00:00
Jordan K. Hubbard
1130b656e5 Make the long-awaited change from $Id$ to $FreeBSD$
This will make a number of things easier in the future, as well as (finally!)
avoiding the Id-smashing problem which has plagued developers for so long.

Boy, I'm glad we're not using sup anymore.  This update would have been
insane otherwise.
1997-01-14 07:20:47 +00:00
Jordan K. Hubbard
a1fcb52813 Correct a problem which broke +DISPLAY file handling. 1997-01-13 10:14:26 +00:00
Jordan K. Hubbard
82d4f7288d Fix PR#1557 - chained package dependencies using URLs didn't work. 1996-10-14 19:41:44 +00:00
Jordan K. Hubbard
d17e19f475 Clean up the english a little, having made the mistake of reading it. 1996-08-20 21:27:18 +00:00
Jordan K. Hubbard
21c7f0d4d7 Make -force work for pkg_add. 1996-07-31 21:52:33 +00:00
Jordan K. Hubbard
50f56e483a Add MD5 checksums to packing list for all files during pkg_create and use
later at pkg_delete time to verify that you're deleting what you added.
This, of course, does NOT cover the case where a file you still need
hasn't changed!  That's a tougher problem to solve, and this provides
only the minimal amount of safety belt.  MD5 checksums are stored in comment
fields, so packages produced with these tools are backwards compatible with
the older ones.
1996-07-30 10:48:20 +00:00
Jordan K. Hubbard
cd9a2f5c28 Bring in my changes for removing the pestilent obj links (unless you
really want them) from /usr/src.  This is the final version of the
patches, incorporating the feedback I've received from -current.
1996-06-24 04:26:21 +00:00
Jordan K. Hubbard
a9ef0b2904 Make pkg_install understand and use libftpio instead of its own
copies of the ftp support routines.  Also some cosmetic and minor
bug fixes I've been meaning to incorporate for awhile.
1996-06-20 18:33:55 +00:00
Jordan K. Hubbard
916485f4df fix PR#599
Submitted-By: jdp
1996-06-03 04:40:43 +00:00
Jordan K. Hubbard
06ba76bea1 Oh my, looks like I didn't understand .B as well as I thought I did! :-) 1996-06-01 20:51:47 +00:00
Mike Pritchard
edf0e5b3f8 Correct some man page xrefs, and some other minor changes to bring some
man pages up to mdoc guidelines and fix some minor formatting glitches.
Also fixed a number of man pages to not abuse the .Xr macro to
display functions and path names and a lot of other junk.
1996-04-08 04:18:31 +00:00
Jordan K. Hubbard
1c3f12fd44 Fix a couple of miscellaneous bugs and make pkg_add also support reading
from stdin.
1996-03-12 06:12:43 +00:00
Mike Pritchard
bcff8e2ae4 Another round of man page cleanups.
Down to only about 100 items left to cleanup! :-)
1996-02-12 04:57:03 +00:00
Jordan K. Hubbard
0ad65298ab Bring my pkg_install improvements forward from 2.1. 1995-11-12 04:55:40 +00:00
Jordan K. Hubbard
58a00a4f4c Fix the `pkg_add relative to .' bug. Thank you, Ville!
Submitted by:	Ville Eerola <ville@vlsi.fi>
1995-10-31 20:30:18 +00:00
Jordan K. Hubbard
36b7319742 Bring forward my changes from 2.1 1995-10-25 15:38:37 +00:00
Jordan K. Hubbard
3122afe4bd Some fixes to make this "TMPDIR agile".
Submitted by:	jmacd + some of my own fixes.
1995-08-17 00:36:06 +00:00
Jordan K. Hubbard
5da01a55fc Make "out of space in ${PKG_TMPDIR}" handling a bit more robust.
Print the right thing, do the right thing.  Back to you, Satoshi!
1995-08-06 03:21:04 +00:00
Jordan K. Hubbard
a2d09e69b2 Document how to get pkg_add to use PASSIVE MODE ftp in such transfers. 1995-07-30 09:37:31 +00:00
Jordan K. Hubbard
d8003c2a59 o Fix PR# bin/643 - always set "where_to" properly.
o Nuke dependence on libftp - it's about to die!
1995-07-30 09:11:20 +00:00
Satoshi Asami
86e0f980c9 The default for temporary directory is /var/tmp, not /tmp. 1995-07-30 05:25:35 +00:00
Rodney W. Grimes
d3628763db Merge RELENG_2_0_5 into HEAD 1995-06-11 19:33:05 +00:00
Rodney W. Grimes
709e8f9ae1 Remove trailing whitespace. 1995-05-30 03:57:47 +00:00
Jordan K. Hubbard
ceb1d42782 Only apply @mode directives to files.
Don't use the -p flag to tar; it sets the files to the wrong permissions.
Submitted by:	jmz
1995-05-19 22:40:54 +00:00
Jordan K. Hubbard
28ed622cab Document fetch-by-URL. 1995-05-10 20:56:19 +00:00
Jordan K. Hubbard
2283d8e502 Use mtree -U instead of -u and put back error check. Thanks Rod! 1995-04-28 04:16:30 +00:00
Jordan K. Hubbard
278ea7ecee Don't bother checking the return status of the mtree command - it returns
non-zero stats when it changes things, too.
1995-04-27 11:33:08 +00:00
Jordan K. Hubbard
7113d27114 Further work on making all this more robust in the face of failure.
Also allow URL specification for a package.  This works for things the
package may depend on, too.

Allow PKG_PATH to be used anywhere a package is being searched for.
1995-04-26 15:06:26 +00:00
Jordan K. Hubbard
8d006a838c Check dependencies BEFORE doing final extraction of package.
Fix a bug where direct-extract mode would have still invoked the
packing list reordering commands.
1995-04-26 07:43:35 +00:00
Jordan K. Hubbard
0170dd7dec My handling of the missing dependency but !Verbose was wrong. Make
the right message come out.
1995-04-26 06:56:05 +00:00
Jordan K. Hubbard
cbf098db0e Second round:
1. Make paths work correctly.
2. Make pkg_add generally more robust in the face of failure.
3. Make the depend messages come out on stderr or stdout, but not both
   interspersed! :-)
1995-04-22 13:58:24 +00:00
Jordan K. Hubbard
e692e3aa52 1. Add an new @option directive. You'll understand it better in a moment.
2. Fix a long-standing bug in pkg_add where the failure of one package in
   a multipackage installation (pkg_add *.tgz) would blow you right out of
   the water.  Ick.
1995-04-22 07:41:02 +00:00
Jordan K. Hubbard
3a5e372a3d 1. Add proper dependencies to the library in my Makefiles. This was pointed
out by Bruce.
2. Add a "feature" to pkg_create (OK, OK, it's a miserable hack!) to get
   it to dump its internal packing list out so that the `fake-pkg' rule in
   bsd.port.mk can generate a more meaningful packing list.
1995-04-22 00:03:18 +00:00
Jordan K. Hubbard
8c4e15334e Greatly simplify the calling of mtree - the error handling wasn't working
anyway, at least not with FreeBSD's mtree, and the arguments were being
built incorrectly.
1995-04-19 14:54:25 +00:00
Jordan K. Hubbard
e804f03a5d Add support for the ${PKG_DBDIR} environment variable. /var/db/pkg is the
default, and probably not something you'd ever change, but now it's
possible to do so for local/custom installations.
1995-04-19 14:02:01 +00:00
Jordan K. Hubbard
1b164cce2b Neither of these tools really told you what you needed to know neatly
and succinctly in verbose mode.  I hope people find this more to their
liking.
1995-04-10 08:01:52 +00:00
Jordan K. Hubbard
6c5325bf0e Add true support for dependency lists.
1. pkg_create now has a -P argument for specifying dependencies on the
   command line.
2. pkg_add will honor dependencies and chain-load them automatically if
   it finds the required package(s) in the same directory as the package
   that is being loaded.  For best results, install packages from a directory
   containing all the packages you'll possibly need
   (like /usr/ports/packages/all).

2 remaining flaws:

1. pkg_add looks in one place (where you were when you loaded the primary
   pkg) for depended packages.  If you can come up with a search path scheme
   that's not a total hack - be my guest!

2. Recursive dependency expansion can result in the name of a dep being
   listed more than once.  This doesn't bother pkg_add since it checks
   for package existance with pkg_info and will skip already-loaded packages.
   I don't know how/if pkg_delete handles this yet, however.  I need to look
   into it.
1995-04-09 15:05:01 +00:00
Jordan K. Hubbard
c090e04591 Whoops! How embarassing. Just now noticed that I forget to update the .Os
lines.  Done.
1995-01-05 10:37:13 +00:00
Jordan K. Hubbard
ad12efc944 More changes from John T. Kohl. Man pages, mostly.
Submitted by:	jtkohl
1994-12-06 01:04:17 +00:00
Jordan K. Hubbard
8f396ebfb6 Many of John T. Kohl's patches from NetBSD. Thanks, John!
Submitted by:	jkohl
1994-12-06 00:51:50 +00:00
Jordan K. Hubbard
3e78200fd8 Protect against old packages with bogus @name fields. Use basename_of()
on the name before recording it in /var/db/pkg.  Sorry, Kaleb, you
were right after all!  It was my fault! :)
1994-11-17 10:53:21 +00:00
Jordan K. Hubbard
9b98d77e09 Whoops - variable was in wrong scope. Correct. 1994-10-14 05:43:41 +00:00
Jordan K. Hubbard
5da4a65126 Fix bug in home directory calculation that I introduced with the free space
checking code.  Fix the free space checking code, while I'm at it! ;)
Thanks to Garrett for spotting the home dir problem.
1994-10-14 05:34:04 +00:00
Jordan K. Hubbard
46f5c7be76 Add the ability to verify that a package won't extract in the space
available.  Thanks to Michael Elbel for pushing me in the right direction.
1994-10-04 16:07:50 +00:00
Satoshi Asami
5edd12d270 The environment variable PKG_PREFIX is set to the first @cwd command
in the packing list, or the argument to -p if it is specified, before
the requirements/installation/deinstallation scripts are called.  This
enables the scripts to be written to work on the final installation
destination, even if the user uses -p to override the package's default.
1994-05-25 18:00:04 +00:00
Jordan K. Hubbard
b2f6083aad Remove find_name(), replace with more generic find_plist() function. 1994-05-25 06:24:18 +00:00
Satoshi Asami
54685a8efa Typo (pkg_add => pkg-add). 1994-05-20 19:35:33 +00:00
Satoshi Asami
45597cd27f Make clear what arguments the "require" package gets (the original didn't
make any sense, with a ".b" instead of ".B" in front of "INSTALL"!).
1994-05-20 19:33:08 +00:00
Jordan K. Hubbard
bb9863dc0b If require script fails, don't try to delete installed package. 1993-10-10 20:25:31 +00:00
Jordan K. Hubbard
6e27d75777 Fix problems with executing from current directory 1993-10-08 01:19:35 +00:00
Nate Williams
02954343b7 Now works with/without obj directories 1993-09-20 23:47:51 +00:00
Jordan K. Hubbard
ec97537369 Make sure permissions on registry location are readable by pkg_info.
Add new % sequence expansion for command execution.
1993-09-18 03:38:48 +00:00
Jordan K. Hubbard
5db659db0b Fixed broken -t flag; thanks Rich! 1993-09-14 19:53:01 +00:00
Jordan K. Hubbard
96c8ba9a7a Added option for current directory prefix in @exec (without which it's pretty
useless).
1993-09-06 23:26:21 +00:00
Jordan K. Hubbard
368b3399cd Made staging area configurable rather than assuming /tmp (-t)
Made pkg_add -n less bitchy.
Made -p in pkg_add override "default" package location in pkg_create.

Added concept of "slave" and "master" modes, allowing many different things
to be done to packing lists on the fly.  This is really something for
front-end drivers to use, but also something for the more expert user.

rename()'ing files before trying to copy them, thus saving
considerable time when targets and staging area are on same filesystem.
1993-09-05 04:53:51 +00:00