History log of /freebsd-10-stable/usr.sbin/pkg_install/add/extract.c
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# 256281 10-Oct-2013 gjb

Copy head (r256279) to stable/10 as part of the 10.0-RELEASE cycle.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation

# 252363 28-Jun-2013 obrien

sysconf(3) returns a long, not an int.


# 240476 13-Sep-2012 jkim

Do not change owner, group, or mode when package database directory and
its contents are created with pkg_add(1). It may happen when the packing
list contains @owner, @group, or @mode.

Reported by: Donald Bostrom (dbostrom at niksun dot com)
Reviewed by: portmgr (bapt)


# 228990 30-Dec-2011 uqs

Spelling fixes for usr.sbin/


# 222035 17-May-2011 flz

Backout libinstall.a -> libpkg commit.

Discussed with: erwin, brooks, bapt


# 207113 23-Apr-2010 flz

- Take libinstall.a out of pkg_install and make it a proper shared library.
- Rework the wrapper support to check libpkg version as well as pkg_install
version.
- Add libfetch to _prebuild_libs.
- There are no new features introduced.

Notes: the API is not stable, so basically, do not use libpkg in your
projects for now. Also there's no manpage for libpkg yet, because the API
will change drastically. I repeat, do not use libpkg for now.


# 171934 23-Aug-2007 krion

Fix pkg_add behaviour to preserve pathnames.

PR: bin/93915 bin/109134
Submitted by: Jason Heiss <heissj@yahoo-inc.com>, Constantin Stefanov<cstef@mail.ru>
Approved by: re@ (kensmith)
MFC after: 7 days


# 154102 07-Jan-2006 krion

When using @cwd %%FOO%%, we must ensure to return in the original
prefix later, but doing so with @cwd %%OLDPREFIX%% (having
PLIST_SUB+="OLDPREFIX=${PREFIX}") hardcodes the value in the packing
list. That's not really a problem when dealing with ports but that's
a problem with packages since pkg_add -p option only overrides the
first @cwd occurrence.

This patch allow us to use @cwd without any argument. If no
directory argument is given, it will set current working directory
to the first prefix given by the @cwd command.

PR: bin/77212
Submitted by: flz


# 147381 14-Jun-2005 krion

Implement @noinst field which has at the moment the same meaning and
function as @comment has. But will be valid only for files and not
for md5 sums, rcsid's and comments in the future.

Submitted by: flz
Approved by: re@ (scottl)


# 132789 28-Jul-2004 kan

Downgrade WARNS level to more tolerable value. Attempt to fix
casts as lvalue usage whenever possible.


# 131285 29-Jun-2004 eik

- 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


# 131280 29-Jun-2004 eik

- 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


# 124922 24-Jan-2004 des

Instead of bogusly complaining about odd file names, handle them properly
by escaping all suspicious characters.

MFC after: 3 days


# 124921 24-Jan-2004 des

Try to apply consistent indentation.


# 123602 17-Dec-2003 nectar

Correct truncation detection after use of snprintf: The case where
exactly one character was truncated was not detected.


# 108778 06-Jan-2003 jkh

Prevent buffer overflow in format_cmd() by properly tracking maximum
buffer size.
Reported by: Lionnel CHAPTAL <Lionnel.Chaptal@IPricot.com>
MFC after: 1 week


# 101231 02-Aug-2002 sobomax

(forced)

Previous delta (rev.1.34) was a subject of:

MFC after: 1 week


# 101230 02-Aug-2002 sobomax

When extracting package pass `-p' option to tar(1), so that files are
extracted with correct permissions.


# 96392 11-May-2002 alfred

replace __FUNCTION__ with standardized __func__.

Requested by: jhb


# 96388 11-May-2002 alfred

fix build:
you may not use string concatination with __FUNCTION__, replace all occurances
of:
__FUNCTION__ ": error string"
with:
"%s: error string"


# 93520 01-Apr-2002 obrien

Fix SCM ID's.


# 84745 10-Oct-2001 sobomax

WARNS=2 cleanup.

Tested on: i386, alpha
MFC after: 2 weeks


# 81982 20-Aug-2001 brian

Handle snprintf() returning < 0 (not just -1)

MFC after: 2 weeks


# 81977 20-Aug-2001 brian

Handle snprintf() returning -1.

MFC after: 2 weeks


# 71373 22-Jan-2001 sobomax

- 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


# 67429 22-Oct-2000 jkh

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>


# 50479 27-Aug-1999 peter

$Id$ -> $FreeBSD$


# 47853 09-Jun-1999 jkh

where_arge is allocated on stack and return address is overwritten
by buffer overflow.

Submitted by: Hidetoshi Shimokawa <simokawa@sat.t.u-tokyo.ac.jp>


# 40709 28-Oct-1998 jkh

Unlink old contents of package when extracting new.
Submitted by: pst


# 40266 12-Oct-1998 jkh

Correct a misleading comment.


# 39068 11-Sep-1998 jkh

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>


# 37378 04-Jul-1998 jkh

MF22: check for null pointer.


# 32659 20-Jan-1998 imp

Quote filenames more agressively.
Reviewed by: jkh
Submitted by: Hubert Feyrer


# 30686 24-Oct-1997 max

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


# 30221 08-Oct-1997 charnier

Use err(3). Cosmetics in usage string and man page.


# 27137 01-Jul-1997 jkh

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.


# 27087 30-Jun-1997 jkh

Whoops, only attempt to back up the file if it exists. :-}


# 27056 29-Jun-1997 jkh

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.


# 26105 24-May-1997 ache

When no last file specified for % command user barf(error diagnostic)
instead of segmentation fault


# 23109 25-Feb-1997 jkh

Close PR#2459


# 22997 22-Feb-1997 peter

Revert $FreeBSD$ to $Id$


# 22762 15-Feb-1997 jkh

Prevent potential argument buffer overflow.


# 22690 13-Feb-1997 jkh

Put back @owner/@group/@mode behavior I took out way back when.
Submitted-By: pst


# 21673 14-Jan-1997 jkh

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.


# 8635 19-May-1995 jkh

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


# 4996 05-Dec-1994 jkh

Many of John T. Kohl's patches from NetBSD. Thanks, John!
Submitted by: jkohl


# 477 18-Sep-1993 jkh

Make sure permissions on registry location are readable by pkg_info.
Add new % sequence expansion for command execution.


# 402 06-Sep-1993 jkh

Added option for current directory prefix in @exec (without which it's pretty
useless).


# 382 05-Sep-1993 jkh

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.


# 379 03-Sep-1993 jkh

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).


# 328 25-Aug-1993 jkh

This commit was generated by cvs2svn to compensate for changes in r327,
which included commits to RCS files with non-trunk default branches.


# 327 25-Aug-1993 jkh

The release version of my package install suite. Please see man pages
for info.