Commit Graph

29 Commits

Author SHA1 Message Date
abs fd83215c8b Allow '%D' to be used when no last_file available. Fixes binary package
installation of gnome-dirs.
2003-02-02 12:59:53 +00:00
agc 9d61d2fff1 Add an enumerated type which is used in pkgdb_open() to specify
read-only or read-write mode.

Modify the return value of pkgdb_open() to have a more logical boolean
value.
2003-01-05 21:49:51 +00:00
agc 1b535c4ef0 Use EXIT_FAILURE, rather than hardcoding a value of '1' in err(3) and
errx(3).

Plug a memory leak by modifying the signature of
_pkgdb_getPKGDB_FILE() to take a buffer and its size, and fill in that
buffer and return it.
2003-01-05 21:27:20 +00:00
grant 0a51ab8aee replace use of alloca() with the more portable malloc()/free(). 2002-11-29 08:31:06 +00:00
taca 445a837973 Add 'p' option to TARX_CMD's argument for preserving file mode.
This fixes the problem that pkg_add(1) drops setuid/setgid bit.

This problem occurs on pax(1) based tar environment.
pkgtools/pkg_install should be fixed, too.
2002-11-28 23:52:31 +00:00
christos 590fa669c8 - eliminate the hard-coding of pathnames in the default install.
- all command executions now use the path [execvp/execlp/system].
- normalize the macro names as <COMMAND>_CMD.
- in some OS's full pathnames for commands can still be provided, but this
  is not the default.

This was needed to fix -DTAR_FULLPATHNAME="/usr/bin/tar"
2002-10-17 03:31:33 +00:00
hubertf 384aae98cc use full pathname of tar consistentlc
Patch provided in PR 14072 by Stoned Elipot <seb@script.jussieu.fr>
2001-09-26 13:48:27 +00:00
dmcmahill 43301f1fee Fix a buffer overrun bug. The TOOBIG macro had some hard coded constants
which needed to be set at compile time but weren't (to handle the case where
TAR_CMD was set to something other than "tar", eg "gtar".  In addition to
the constants being wrong, the wrong directory name was being examined for
its string length.

Add a few comments to hopefully avoid having this problem come back.
2000-07-24 20:09:15 +00:00
sjg 7bd1e30c61 extract_plist() should inform caller when it aborts extract 2000-06-16 23:49:17 +00:00
hubertf 8ee940971e Bring closer to /usr/share/misc/style with the aid of indent(1). 1999-08-24 00:48:37 +00:00
agc 72077b961b Clean up minor nits in C code. 1999-08-19 13:29:59 +00:00
tron 343ac4c964 Remove support for absolutes pathnames completely. This can't work with
binary packages like we support them now.
1999-05-30 16:08:23 +00:00
christos 3024caeb08 Don't prepend directories if the plist files are absolute. 1999-05-29 20:44:20 +00:00
tron 137c04ccf1 Fix string handling bugs introduced by last patch. 1999-03-12 17:32:20 +00:00
agc 530dddb95a Define TAR_CMD and TAR_FULLPATHNAME, and use them in preference to
hardcoded strings "tar" and "/usr/bin/tar". This allows the package
tools to use GNU tar with a different name (it's often installed as
gtar), and from a directory other than /usr/bin.
1999-03-09 11:10:39 +00:00
agc 21fa5d1385 Cosmetic but annoying - no need to append a newline character in warnx()
string - it's done by warnx() itself.
1999-03-02 10:32:23 +00:00
hubertf e22dd1f460 Allow @exec to be the first (non-comment) thing in a PLIST file
IF there is no %d/%D/%f/%F in it.
1999-02-01 02:00:42 +00:00
hubertf f9e71e406c Add code for pkgdb. 1999-01-19 17:01:56 +00:00
agc 9daf7cc9b2 More cleanup - various bits of KNF.
Use another table when parsing PLIST files - makes this much more extensible.
1998-10-09 18:27:31 +00:00
agc 16ae233008 Some minor KNF.
Lots more to be done.
1998-10-09 11:16:57 +00:00
agc 70c6765099 Eliminate all use of sprintf(3), and replace it with snprintf(3).
Bounds check the @exec and @unexec commands when they are constructed.
1998-10-08 12:57:58 +00:00
hubertf fdbf4d9eec Quote filenames handed off to tar, chmod, chown. (Fixes possible security
problem discovered while looking at pkgsrc/audio/tracker).
1998-01-19 00:24:03 +00:00
mrg ca2afdd453 fix compile warnings on the alpha. 1997-10-19 09:39:35 +00:00
lukem 05941d095a WARNSify, cleanup Makefiles 1997-10-17 14:53:18 +00:00
hubertf 508ee08a34 Second part of intrgration of FreeBSD pkg_install as of 971013.
This patch adds @option preserve and handling for -s (SrcDir)
option.
1997-10-16 00:50:20 +00:00
hubertf d0245e3952 First cut on importing pkg_install as of FreeBSD 971013:
- warn()/err() instead of whinge()/barf()
 - Update RCS Id strings
 - Update manpages (mostly)
1997-10-16 00:31:32 +00:00
agc cafa757ff8 Use malloc and free in extract.c, not alloca.
Minor mods to English in pkg_info.1
Add a mandatory argument to Synopsis section of pkg_create.1
1997-06-09 15:24:32 +00:00
agc 153272e388 Add NetBSD Ids
Un-munge pkg_install/lib/Makefile which I'd overwritten on libftpio commit.
Make it compile on NetBSD.
Install pkg_* programs in /usr/sbin

XXX agc - Still to do XXX
Cleanup call to mktemp (for a tmp dir) in pkg_install/lib/pen.c
Create ftperr.c in the correct directory.
1997-06-05 12:59:18 +00:00
agc 5d4508e153 Initial import of FreeBSD packaging tool. 1997-06-05 08:54:23 +00:00