Jordan K. Hubbard
aed4d2d137
Cause fatal error messages to be a little more helpful to the programmer
...
concerning where they're taking place.
Switch from [r]index() to str[r]chr() functions, which are more ISO
compliant.
Prompted by: Edward Welbourne <eddy@vortigen.demon.co.uk>
2000-10-22 09:53:27 +00:00
Maxim Sobolev
b2b064c2a0
Fix symlink-to-a-dir handling in pkg_delete.
...
Reviewed by: -ports
Tested by: bento
2000-09-18 07:41:48 +00:00
Dag-Erling Smørgrav
c66a7bdea9
Use libfetch instead of libftpio. This adds support for http and IPv6.
2000-06-27 11:00:07 +00:00
Sheldon Hearn
8d548e1f88
Do not preserve UIDs, permissions nor flags of package system files in
...
tar files. This fixes clean-up problems during package creation and
does not affect the actual files to be included in the package.
The fix submitted on the attributed PR was identical to the one
obtained from NetBSD.
PR: 17386
Reported by: Adrian Filipi-Martin <adrian@ubergeeks.com>
Obtained from: NetBSD
2000-03-15 09:18:12 +00:00
Jordan K. Hubbard
ff6f5bfb91
1. If checking for directory-ness, check "dir" and "dir/" to catch
...
the case where we have a symlink pointing at a dir.
2. Restore stomped character before returning in make_hierarchy()
2000-02-19 08:58:54 +00:00
David E. O'Brien
e0908a9f34
Use lstat(2) rather than stat(2) in isdir(), so that a symlink to a
...
directory is not considered a directory. I have a feeling all the other
stat(2) calls should instead be lstat(2) calls, but I have not suffiently
determined that the current behavior [especially in isfile()] isn't
depended upon by someone.
Ok'ed by: JKH
2000-02-08 06:36:08 +00:00
Jordan K. Hubbard
481dc61302
Deal with package filenames which contain spaces.
...
Submitted by: Ming-I Hsieh <mihs@wm28.csie.ncu.edu.tw>
PR: 15667
2000-01-04 05:08:58 +00:00
Peter Wemm
97d92980a9
$Id$ -> $FreeBSD$
1999-08-28 01:35:59 +00:00
Bill Fumerola
0845a96cd0
-Wall fixes. Ambigious if/elses, uninitialized values, missing headers,
...
missing prototypes, and empty format strings.
1999-08-11 20:55:42 +00:00
Jordan K. Hubbard
722678f1c8
Revive the PKG_ADD_BASE stuff a bit.
1999-05-12 06:06:49 +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
Satoshi Asami
cf144a3d4a
Fix support for uncompressed (".tar") package types. It's not completely
...
fixed (chained dependency checking for pkg_add is broken, for one thing)
but at least you can now create one package and use it.
1998-12-05 06:29:03 +00:00
Jordan K. Hubbard
27f612d03f
Revert 1.33; lstat() is indeed the wrong thing to do here. I'll
...
revisit this after release.
1998-10-14 18:52:04 +00:00
Jordan K. Hubbard
d0a638ae52
Use lstat() rather than stat in determining whether a file exists,
...
otherwise we'll miss the "symlink exists but points nowhere" case.
Submitted by: asami and/or possibly <ru@ucb.crimea.ua>
1998-10-09 00:01:16 +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
45878e4d34
Silence potentially bogus warning.
1998-09-01 06:58:11 +00:00
Jacques Vidrine
dd123c1609
Paranoia: use mkdtemp instead of mktemp
...
PR: bin/3212
Reviewed by: jkh@FreeBSD.ORG
1998-07-28 01:18:02 +00:00
Tim Vanderhoek
922fcd0032
Clarify "Cannot delete file as directory" errmessage.
...
PR: bin/1985
1998-07-18 22:19:11 +00:00
Jordan K. Hubbard
90b14d4761
Fix dependent-package loading when pkg_adding with an FTP URL. I broke
...
this when I changed the playpen code to disallow recursion. I know
this fixes a PR someplace but I can't seem to find it with the GNATs
search tool.
1998-04-12 16:01:10 +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
cac1743203
MF22: Additional paranoia in cleanup.
1998-01-09 14:52:18 +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
Jordan K. Hubbard
b4104ffa6b
Eliminate an annoying message.
1997-09-02 08:48:47 +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
8805157f39
YAMF22 - deletes and preserve option fixes.
1997-06-30 03:15: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
Peter Wemm
476602a9d0
Revert $FreeBSD$ to $Id$
1997-02-22 16:15:28 +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
Andrey A. Chernov
5e8809d7b9
Use new ftpGetURL interface, as result, report FTP error
...
via ftpErrString or net error via hstrerror(h_errno)
1996-11-14 07:30:17 +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
7204896f94
Put verbosity in the right place.
1996-08-01 12:13:20 +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
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
Alexander Langer
3f8b85263c
Change min_free to return free space as an off_t instead of a size_t.
1996-06-08 00:46:33 +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
247f99f51f
Initialize the argument list in the unpack() routine to zero.
...
This prevents a core dump due to the stack being trashed if pkg_add
is asked to process something that really isn't a package file.
1996-02-19 02:35:56 +00:00
Jordan K. Hubbard
dab396ba99
Fix to catch a stupid oversight on my part which allowed this thing
...
to remove the current directory under certain circumstances.
Submitted by: Richard J Kuhns <rjk@watson.grauel.com>
1996-02-09 12:05:26 +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
5ceffd88de
Don't be needlessly verbose in the pkg_create.
1995-08-28 14:47:30 +00:00
Jordan K. Hubbard
58ab1c7453
Make the play-pen searching routine even more agile in trying
...
to create a /usr/tmp dir if it makes sense to do so.
1995-08-26 18:36:27 +00:00
Jordan K. Hubbard
a50f9f1dfc
Use size_t properly in all fs size ops. This kills a bug
...
encountered by someone who had his /tmp on a partition with 3.7GB of
free space!
Spotted by: Francisco Rosich Viana <rosich@power.ci.uv.es>
1995-08-26 10:15:18 +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
156547674a
Round this out. Now seems to transfer packages properly over ftp
...
as it was supposed to. PKG_PATH more sorely needed than ever now..
Hmmmm.
1995-08-01 09:49:27 +00:00
Jordan K. Hubbard
118e410749
Argh! I hate my life! I can't seem to do anything right here today.
...
This should restore functionality to the pkg_install suite.
1995-08-01 07:16:51 +00:00
Satoshi Asami
e7a7980c25
Sync this up with ftp.c.
1995-07-31 04:00:01 +00:00
Jordan K. Hubbard
d5285ad858
Remove dependency on sysinstall.
1995-07-31 02:27:58 +00:00
Jordan K. Hubbard
103ccee575
Add ftp.c to makefile - that might make it work better. Sheesh!
1995-07-31 01:26:58 +00:00
Jordan K. Hubbard
70ad39a5d4
Change the environment variable this looks for from FTP_PASSIVE to
...
FTP_PASSIVE_MODE. It would be really nice if we could standardise on
this name so that all tools (like ncftp) that offer passive/active
ftp selection would work seamlessly with one user environment variable
setting.
1995-07-30 09:41:21 +00:00
Jordan K. Hubbard
4366f12ca2
Totally eliminate the dependency on libftp (which will be removed from the
...
FreeBSD source tree) and switch to the internal ftp routines developed
by Poul-Henning and used in sysinstall.
1995-07-30 09:33:31 +00:00
Andrey A. Chernov
96d5140413
You can run pkg_info everywhere expect /var/db/pkg directory :-)
...
Running there you got any kind of strange errors from tar caused
by treating directories as tar files!
Fix it by adding new isfile(name) (check for reg. files) to simple fexists(name) calls.
1995-07-30 01:44:45 +00:00
Andrey A. Chernov
31bdd9d999
Fix coredump for -v flag
...
Submitted by: Thomas Gellekum <thomas@ghpc8.ihf.rwth-aachen.de>
Obtained from:
1995-07-28 01:50:35 +00:00
Satoshi Asami
575e2e187e
Use lstat() instead of access() for checking file existence. It works
...
for symlinks too, and according to Rod, access() is evil anyway.
Reviewed by: jkh
1995-06-24 10:12:59 +00:00
Rodney W. Grimes
709e8f9ae1
Remove trailing whitespace.
1995-05-30 03:57:47 +00:00
Jordan K. Hubbard
36dc394c61
Fix a long-standing bug that broke pkg_info utterly and probably made
...
pkg_add a little wiggy too.
1995-05-10 23:00:16 +00:00
Jordan K. Hubbard
f465ace952
Add code for dealing with URLs.
1995-04-26 15:08:23 +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
3e1a18606d
Export the min_free() function.
1995-04-22 13:58:44 +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
cca32e93aa
Some patches to make deletions of non-existent files and directories slightly
...
less fatal (so that the database entry is subsequently removed anyway).
Submitted by: Edward Wang <edward@edcom.com>
1995-04-22 00:14:20 +00:00
Jordan K. Hubbard
36034afc79
Correct a bogusly formatted printf().
1995-04-21 06:30:41 +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
4b96fa37b0
Use a more nicely formatted message when we run out of space.
1995-04-18 13:04:34 +00:00
Jordan K. Hubbard
87e4e7246c
Rename TMPDIR to PKG_TMPDIR, just to make Jeff happy.. :-)
1995-02-16 12:43:00 +00:00
Jordan K. Hubbard
6fc1110b71
Make pkg_install use /var/tmp instead of /tmp
...
Suggested by: hsu
1995-02-15 03:48: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
d08bdbd3d1
Add a new basename_of() function.
1994-11-17 10:51:51 +00:00
Jordan K. Hubbard
1593f21e50
Print a better verbose message when creating packages.
1994-10-14 05:56:15 +00:00
Jordan K. Hubbard
ae38c11f2d
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:42:24 +00:00
Jordan K. Hubbard
90c00ca832
Be optionally verbose about free-space checking. I need this to ascertian
...
whether or not this always works.
1994-10-08 23:55:36 +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
Jordan K. Hubbard
61f402e0c8
Don't let pkg_delete remove the recorded location until everything has
...
absolutely, positively been successfully removed.
Reviewed by:
Submitted by:
Obtained from:
1994-09-29 13:19:43 +00:00
Jordan K. Hubbard
2566293698
Add @srcdir option for customizing creation of packages.
...
Submitted by: jkh
1994-08-28 14:15:30 +00:00
Jordan K. Hubbard
21e91f6209
Argh! What a boneheaded bug! Finally fix the blank-line-in-packing list
...
problem! I am pond scum!
1994-07-11 01:11:14 +00:00
Satoshi Asami
f19aa10180
Close /dev/tty that is opened in y_or_n()...this is called many times
...
so it will run out of ptys if not properly closed.
1994-06-01 05:14:19 +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
4e8667ba2c
Add new find_plist() function.
1994-05-25 06:27:24 +00:00
Jordan K. Hubbard
a4723e41a9
Make y_or_n() pay attention to AutoAnswer global.
1994-04-05 14:08:47 +00:00
Jordan K. Hubbard
f165719da7
Added code for doing % sequence expansion, added new @unexec command.
1993-09-18 03:39:50 +00:00
Jordan K. Hubbard
599bf623a8
Fixed an embarassing bug with @owner, @mode & @group
1993-09-12 20:45:53 +00:00
Jordan K. Hubbard
4710700ef6
Fixed bug in copying script files from absolute locations
1993-09-06 23:28:42 +00:00
Jordan K. Hubbard
e0ab6cb9c7
Made staging area configurable rather than assuming /tmp (-t)
1993-09-05 04:54:24 +00:00
Jordan K. Hubbard
a9c42a2388
Lots of misc tweaks, support for arbitrary separators in pkg_info, more
...
intelligent name handling in pkg_create. Most of these files are changed
because of rcsid's being different in my cvs tree and freefall's (foo).
1993-09-03 23:01:17 +00:00
Jordan K. Hubbard
10505e6324
Removed annoying -Wall
1993-08-30 01:51:16 +00:00
Jordan K. Hubbard
6d946b2e52
The release version of my package install suite. Please see man pages
...
for info.
1993-08-26 01:19:55 +00:00