Florent Thoumie
094f117522
Various fixes.
...
- Replace hardcoded INDEX version. [1]
- Fix a buffer overlap. [2]
- Remove empty package when fetching fails and -K is used. [3]
- Remove useless chmod2() after mkdtemp(3). [4]
- Replace mkdir(1) call with mkdir(2). [5]
- Get rid of some vsystem() calls.
- Switch from lstat(2) to open(2) in fexists().
- Try rename(2) in move_file() first.
- Bump PKG_INSTALL_VERSION to 20100401.
PR: bin/145101 [1], bin/139492 [2], bin/144919 [3]
bin/144920 [4], bin/144921 [5]
Submitted by: gcooper [1,2,3,4,5]
2010-04-01 14:27:29 +00:00
Florent Thoumie
74572e9e63
Remove support for RELENG_4 (__FreeBSD_version < 500039).
...
MFC after: 1 day
2008-06-16 23:41:11 +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
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
Tim Kientzle
b1782cbaa9
When invoking tar, make sure the mode option (-x) is first.
2004-04-08 06:06:42 +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
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
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
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
Akinori MUSHA
9988e3662f
Another .tbz2 -> .tbz leftover. Properly look for pkgname.tbz.
...
MFC after: 1 day
2002-08-04 21:27:57 +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
David E. O'Brien
0d8875ff46
Fix SCM ID's.
2002-04-01 09:39:07 +00:00
Maxim Sobolev
d100deb8cc
WARNS=2 cleanup.
...
Tested on: i386, alpha
MFC after: 2 weeks
2001-10-10 06:58:42 +00:00
Jonathan Chen
f0b8b1fccb
fix for pkg_add to symlinked prefix directories that are more than 1 link deep.
...
PR: bin/28274
Submitted by: John Hein <jhein@timing.com>
MFC after: 1 month
2001-08-02 18:20:27 +00:00
Brian Somers
7bc6d0158f
Fix the type of the NULL arg to execl()
...
Idea from: Theo de Raadt <deraadt@openbsd.org>
2001-07-09 09:24:06 +00:00
Dag-Erling Smørgrav
5333a1958c
Use getdtablesize() instead of OPEN_MAX.
...
Submitted by: bde
2001-06-13 11:55:40 +00:00
Dag-Erling Smørgrav
2b67592fad
Pass on the verbose option to fetchGetURL().
...
In the child that's set up to run tar(1), close all file descriptors except
stdin, stdout and stderr.
PR: bin/27760
2001-06-11 14:18:26 +00:00
Maxim Sobolev
7f7ace8fb2
Style policy: reformat multiline comments to conform to style(9).
2001-05-17 10:12:45 +00:00
Maxim Sobolev
acf6a4418d
- Add ability to handle bzip2-compressed packages;
...
- fix cosmetics to shut-up compiler in -pedantic mode (axe several unused vars
and provide default clause in several switch() statements).
No response from: -ports
2001-01-22 12:01:55 +00:00
Dag-Erling Smørgrav
badea70002
Insetad of using fileno(ftp) as stdin for tar, use a pipe and have the
...
parent pass the data received from the server to the child.
2000-10-29 15:39:51 +00:00
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
Jordan K. Hubbard
722678f1c8
Revive the PKG_ADD_BASE stuff a bit.
1999-05-12 06:06:49 +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
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
Philippe Charnier
6fed414929
Use err(3). Cosmetics in usage string and man page.
1997-10-08 07:48:21 +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
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
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
1c3f12fd44
Fix a couple of miscellaneous bugs and make pkg_add also support reading
...
from stdin.
1996-03-12 06:12:43 +00:00