History log of /freebsd-10-stable/usr.sbin/pkg_install/add/
Revision Date Author Comments
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


254525 19-Aug-2013 gjb

Add entry for packages-9.2-release directory.

Approved by: re (implicit)


252363 29-Jun-2013 obrien

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


243554 26-Nov-2012 eadler

Provide an option to users to shoot themselves in the foot.

Reviewed by: bapt
Approved by: cperciva
MFC after: 1 month


243553 26-Nov-2012 eadler

Use modern license instead of being consistent with the other pkg_ tools
Use a more informative message
Fix some style(9) nits.
Bump version number
In pkg_add only warn users after the chroot is performed.

Submitted by: gavin, jilles
Reviewed by: beat, bapt
Approved by: cperciva
MFC after: 1 month


241975 24-Oct-2012 kensmith

Add the release package directory for 9.1-RELEASE.


241830 22-Oct-2012 eadler

Warn users when using pkg tools if it looks like they
be be pkgng users.

Reviewed by: bapt (earlier version)
Reviewed by: kwm
Approved by: cperciva
MFC after: 3 days


240682 18-Sep-2012 bapt

if a file in plist starts with / then do not prefix it with "prefix" [1]
pkg info -g returns 1 if a file mismatch [2]
flush stdout in pkg info -g [3]
clean up quiet mode (-q | --quiet) output of pkg_version(1) [4]
fix missing error call in uname check added to pkg_version(1) [5]
fix pkg_add(1) fails to install with -C from bad path [6]
only resolve path from pkg_add(1) -p if the given prefix do not start with a '/' [7]

PR: bin/13128 [1]
bin/139015 [2]
bin/113702 [3]
bin/142570 [4]
bin/146857 [5]
bin/157543 [6]
Submitted by: cy [1]
Anton Yuzhaninov <citrin@citrin.ru> [2]
Ighighi <ighighi@gmail.com> [3]
"N.J. Mann" <njm@njm.me.uk> [4]
gcooper [5]
David Naylor <naylor.b.david@gmail.com> [6]
netchild [7]
MFC after: 2 weeks


240476 14-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)


236333 30-May-2012 jpaetzel

Let pkg_add use the ENV variable PACKAGESUFFIX. This
can be used to override the default .tbz package extension to
.txz .tgz or .tar

Submitted by: kmoore
Obtained from: PC-BSD
Sponsored by: iXsystems
MFC after: 3 days


232435 03-Mar-2012 kensmith

Add entry for packages-8.3-release directory.


229831 09-Jan-2012 eadler

X11BASE has been deprecated for a long time and will die soon

Approved by: x11 (eadler)
Approved by: brucec
MFC after: 1 week


228990 30-Dec-2011 uqs

Spelling fixes for usr.sbin/


225757 26-Sep-2011 kensmith

Shift head from 9.0-CURRENT to 10.0-CURRENT in preparation for releasing
it from the 9.0-RELEASE release cycle code freeze.

Approved by: re (implicit)


222035 17-May-2011 flz

Backout libinstall.a -> libpkg commit.

Discussed with: erwin, brooks, bapt


216665 22-Dec-2010 kensmith

Add package directories used for the upcoming 8.2 and 7.4 releases,
and catch up on a few from previous releases.


213718 12-Oct-2010 flz

- Add support for xz compression to pkg_create, bzip2 remains the default
compression algorithm.
- Bump PKG_INSTALL_VERSION to 20101012.

Submitted by: mm
MFC after: 1 month


212029 30-Aug-2010 nwhitehorn

Use MACHINE_ARCH instead of MACHINE as the directory to fetch packages
from. Packages are architecture dependent, not machine dependent.


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.


206043 01-Apr-2010 flz

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]


201226 29-Dec-2009 ed

Add missing `void' keywords.


196485 24-Aug-2009 kensmith

Oops. Needed to adjust a little bit more of the line for packages-8-stable
now that we're prepping for 8.0's release.

Submitted by: pluknet at gmail dot com
Pointy hat: kensmith


196432 22-Aug-2009 kensmith

Make head 9.0-CURRENT in preparation for lifting code freeze.

Approved by: re (implicit)


195346 05-Jul-2009 brian

Disable r194497 for now. It doesn't work well with ports-mgmt/tinderbox.

Approved by: re (ken)


194497 19-Jun-2009 brian

When running pkg_add -r, check & install our dependencies for each
package rather than expecting our top level package to get all of
the dependencies correct.

Previously, the code depended on the top level package having all
of the pkgdep lines in +CONTENTS correct and in the right order,
but that doesn't always happen due to code such as this (in
security/gnutls/Makefile):

.if (defined(WITH_LZO) || exists(${LOCALBASE}/lib/liblzo2.so)) && !defined(WITHOUT_LZO)
LIB_DEPENDS+= lzo2:${PORTSDIR}/archivers/lzo2
....

With such conditional dependencies, my 'sophox-packages' package won't
install. The dependency tree looks like this:

sophox-packages
...
x11/gnome2
x11/gnome-applets
net/libgweather
devel/libsoup
security/gnutls
security/libgcrypt
security/libgpg-error
...
x11/gnome2
archivers/file-roller
archivers/gtar
archivers/lzop
archivers/lzo2
...

gnutls doesn't depend on lzo2 initially, but lzo2 is dragged into the
mix via other dependencies and is built by the initial 'make'. The
subsequent package generation for gnutls adds a pkgdep line for lzo2
to gnutls' +CONTENTS but the pkgdeps in sophox-packages' +CONTENTS
has gnutls *before* lzo2.

As a result, sophox-packages cannot install; gnutls fails because lzo2
is missing, 82 more packages fail because gnutls is missing and the
whole thing spirals into a super-confusing mess!

MFC after: 3 weeks


191110 15-Apr-2009 kensmith

Add release package directories for 6.4 and 7.2.


187056 11-Jan-2009 chinsan

Use full name (noticed by: ru@


186732 04-Jan-2009 chinsan

- s/no-scripts/no-script/

PR: docs/127732
Submitted by: TerryP <BigBoss1964@gmail.com>
MFC after: 3 days


186494 25-Dec-2008 flz

Add package directory for 7.1-RELEASE in head as well as stable/7.


183979 17-Oct-2008 brooks

Display usage when pkg_add is called with no arguments.

PR: bin/121093
Submitted by: volker
Approved by: portmgr (linimon)
MFC after: 3 days


179835 16-Jun-2008 flz

Remove support for RELENG_4 (__FreeBSD_version < 500039).

MFC after: 1 day


179760 12-Jun-2008 flz

- add: Keep dependent packages too if -K is specified.
- updating: terminating '\n' is not part of the package origin.
- bump PKG_INSTALL_VERSION to 20080612.

PR: bin/119368 [1], bin/124459 [2]
Submitted by: gcooper [1], Beat Gatzi <beat@chruetertee.ch> [2]
MFC after: 3 days


179433 30-May-2008 flz

- Add long options to pkg_install.
- Remove check for '-?' as it's not listed in authorized options.
- Bump PKG_INSTALL_VERSION to 20080530.


178753 03-May-2008 pav

- Restore functionality broken in previous commit; we need to be able to report
multiple installed packages with the same PKGORIGIN.

Reported by: marcus
MFC after: 1 month


178103 11-Apr-2008 pav

Optimize package registration/deregistration. Previously, when looking up the
package name for the origin of a dependency, all entries in /var/db/pkg were
traversed for each dependency of added/removed package. Now, gather all the
origins first, then do the lookup in a single pass over /var/db/pkg.

This should provide a major speedup for packages with hundreds of dependencies.

Submitted by: rdivacky (earlier version)
MFC after: 1 month


177741 30-Mar-2008 rdivacky

Improve style a little and remove one always-true condition.

Approved by: portmgr (pav)
Approved by: kib (mentor)


176593 26-Feb-2008 kensmith

Sync list of directories to look for packages in to current releases
available.

MFC after: 3 days


176108 08-Feb-2008 ru

Introduce -i to SYNOPSIS, forgotten by krion@.


175177 09-Jan-2008 ru

Revise the TECHNICAL DETAILS section.

Reviewed by: skv


174475 09-Dec-2007 krion

Backout previous commit, since it's done without maintainers
approval. These changes were approved by adding it as port to
ports/ tree, but not for src/. I talked to PR submitter and miwi@
some days ago and explained the reasons for it, the both were agree
to add it to ports/ only.


174472 09-Dec-2007 obrien

Add the 'pkg_search' script.
This makes it easier to figure what packages you want to install.

Submitted by: Matthias Schmidt <schmidtm @ mathematik . uni-marburg . de>


173513 10-Nov-2007 krion

Add -i option for package installation without fetching and
installing its dependencies.

PR: bin/117065
Submitted by: Vladimir Ermakov <samflanker@gmail.com>
MFC after: 14 days


173412 07-Nov-2007 kevlo

Cleanup of userland __P use


172531 11-Oct-2007 kensmith

To honor the birth of RELENG_7 bump HEAD to 8.0-CURRENT.

Approved by: re (implicit)


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


166402 01-Feb-2007 pav

Fix previous rev.: don't step behind the end of memory we allocate


166374 31-Jan-2007 ade

Remove hard-coded limit (200) on maximum number of packages that can be
added with a single invocation of pkg_add, replacing it with something
rather more dynamic.

Approved by: portmgr (pav)
Tested by: full pointyhat package run
MFC after: 1 week


162802 29-Sep-2006 ru

Sync usage() with manpage's SYNOPSIS.


162663 26-Sep-2006 kensmith

Oops. Catch up on the last couple of releases and prepare for the next
one.


159554 12-Jun-2006 obrien

Allow variable amounts of verbosity.


156497 09-Mar-2006 phk

Add -F option to not fail on already installed packages.

Submitted by: Eugene Grosbein <eugen@grosbein.pp.ru>


155011 29-Jan-2006 krion

Fix typo.


154145 09-Jan-2006 flz

Add -K option to pkg_add and pkg_info.
This option saves packages to PKGDIR (if defined or current directory by default)
as they are downloaded.
Silent a warning when -n is used and package has a +DISPLAY file.

Approved by: krion
MFC after: 1 week


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


152569 18-Nov-2005 ru

-mdoc sweep.


152329 12-Nov-2005 krion

Add -P flag, it does the same as the -p option, except that the
given prefix is also used recursively for the dependency packages,
if any. If the -P flag appears after any -p flag on the
command line, it overrides it's effect, causing pkg_add to use the
given prefix recursively.

PR: bin/75742
Submitted by: Frerich Raabe <raabe AT kde DOT org>
MFC after: 3 days


151754 27-Oct-2005 murray

Look for packages in packages-6.0-release or packages-6-stable, as
appropriate.

Approved by: re (scottl@)
Reviewed by: portmgr (kris@)


147939 11-Jul-2005 kensmith

Fix an oops on FBSD-version for packages-5-stable I made in previous
commit.

Pointy hat: kensmith
Approved by: re (implicit)


147932 11-Jul-2005 kensmith

Prepare for packages-7-current. While here retro-fit packages-5.4-release
which probably should have been done a while ago.

Approved by: re (implicit)


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)


143849 19-Mar-2005 marcus

Change the PATH for pkg_add to be the same used for pointyhat package builds.
This will give our users and porters a more consistent experience between
installing ports and installing packages.

Discussed with: portmgr


141846 13-Feb-2005 ru

Expand *n't contractions.


136616 17-Oct-2004 obrien

Set the real limits on 5-current, add 5-stable, add 6-current.


133596 12-Aug-2004 ru

Don't put DEBUG to CFLAGS, we have the standard DEBUG_FLAGS for this.


133502 11-Aug-2004 eik

typo

Approved by: ru


132799 28-Jul-2004 stefanf

Use the length modifier 'll' instead of 'q' to print long longs.


132789 28-Jul-2004 kan

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


131531 03-Jul-2004 ru

Eliminated double whitespace.


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


130131 05-Jun-2004 ru

Markup and punctuation nits.


129054 08-May-2004 bmah

Add 4.10 and 5.2.1 entries so that pkg_add -r fetches from the right
package sets.

PR: 66251
Submitted by: eik


126465 01-Mar-2004 kensmith

Add command line option for chrootdir, all pkg_add(8) operations will be
done inside of chroot(2) to chrootdir. Added to help with sysinstall(8)
support of install to alternate root but possibly useful for setting up
jails, etc.

No objection from: portmgr@
Style(9) abuse due to: entire program violates style(9)
Approved by: rwatson (mentor)


126464 01-Mar-2004 kensmith

This is an initial whitespace cleanup commit, new content to follow.
Adding hard line breaks at the end of sentences.

Approved by: rwatson (mentor)


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.


124633 17-Jan-2004 ru

- Properly build both crypto and non-crypto versions of the
package management tools.

- Drop redundant dependency of pkg_create(1) and pkg_delete(1)
on crypto libraries now that they do not link with libfetch.


124054 02-Jan-2004 bmah

Catch up with reality with respect to the location of 4.8, 4.9,
5.0, 5.1, 5.2, and CURRENT packages.


123602 17-Dec-2003 nectar

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


115224 22-May-2003 ru

Erase whitespace at EOL.

Approved by: re (blanket)


115157 19-May-2003 des

Retire the useless NOSECURE knob.

Approved by: re (scottl)


113594 17-Apr-2003 kris

* Add explicit conflict-checking to the package tools. Packages can
register a list of other packages with which they conflict (via the
-C option to pkg_create), and they will refuse to install (unless -f is
specified) if one of the listed packages is already present.

* Update documentation for the new feature as well as fleshing out some
existing documentation.

* Bump PKG_INSTALL_VERSION so this feature can be tested for.

Submitted by: Sergey Matveychuk <sem@ciam.ru>
PR: bin/47145
MFC after: 2 weeks


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


108533 01-Jan-2003 schweikh

Correct typos, mostly s/ a / an / where appropriate. Some whitespace cleanup,
especially in troff files.


108317 27-Dec-2002 schweikh

english(4) police.


107788 12-Dec-2002 ru

Uniformly refer to a file system as "file system".

Approved by: re


104658 08-Oct-2002 bmah

Teach pkg_add -r how to find 4.7-RELEASE packages with an appropriate
osreldate.

(Actually, due to differences in package compression formats, I'm
not sure that a -CURRENT pkg_add -r will do the right thing in
this case, once it finds them.)


103166 10-Sep-2002 bmah

Update to use *.tbz suffix, also update example URL.

While I'm here, fix a gramm-o.

PR: 42576
Submitted by: Jeff Ito <jeffi@rcn.com>
MFC after: 1 day


103155 09-Sep-2002 bmah

Fix minor off-by-one error.

Submitted by: jhb


103150 09-Sep-2002 bmah

Make pkg_install go to the right place for 4.6-RELEASE and 4.6.2-RELEASE
packages.

Pointed out by: obrien
Reviewed by: jhb


102888 03-Sep-2002 sobomax

When installing package from a local file assume that all subsequent
autoinstalled dependencies will have the same extension, not just
".tbz".

Pointy hat to: obrien
X-MFC after: -1 day


102383 25-Aug-2002 obrien

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.


101230 02-Aug-2002 sobomax

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


98143 12-Jun-2002 des

Reorder libraries to fix static linking (libssl depends on libcrypto, so
it must come before libcrypto in LDADD)

Reviewed by: bde


97930 06-Jun-2002 ru

libfetch now depends on libcrypto and libssl.


96705 16-May-2002 trhodes

Consistancy check: s/file system/filesystem/g


96613 14-May-2002 sobomax

- Make use of DEPOROGINs (if there are any) when installing package;
- fix few bogosities here and there;
- move some common routines into the library.

MFC after: 2 weeks


96406 11-May-2002 eric

Remove cross reference to pkg_update(1).


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"


95127 20-Apr-2002 charnier

Use `The .Nm utility'


93660 02-Apr-2002 murray

DTRT for packages read from STDIN:

$ cat pkg.tgz | pkg_add -

The above command line will fail on -CURRENT or -STABLE, and
therefore, so will sysinstall if you try to install additional
packages through the network (FTP) from a multiuser system. Because
of the different environment during installation (wrt the playpen),
this bug does not manifest itself during initial installs, and users
may install packages from the network just fine at that time.

This bug was fixed in OpenBSD 4 years ago.

----------------------------
revision 1.4
date: 1998/04/07 05:56:13; author: marc; state: Exp; lines: +13 -8
fix package input from standard input -- the program tried to process
stdin twice. Note: it assumes stdin is a compressed tar file.
----------------------------

PR: conf/36606
Obtained from: OpenBSD
MFC after: 2 weeks


93520 01-Apr-2002 obrien

Fix SCM ID's.


85023 16-Oct-2001 obrien

Increase the number of packages that can be installed by an order of
magnitude. Geez, this is Unix, what is with the arbitrary needless
constants.


84992 15-Oct-2001 dd

The user wants to ensure, not insure, that the package isn't going to
damage their system.


84745 10-Oct-2001 sobomax

WARNS=2 cleanup.

Tested on: i386, alpha
MFC after: 2 weeks


84670 08-Oct-2001 sobomax

- Allow package archive to be created from a locally installed package. This
allows for an easy way to backup old version of port prior to installing
a new one;
- silence compiler warnings by killing some unused variables and adding
all includes necessary.

MFC after: 2 weeks


83573 17-Sep-2001 sobomax

Fix segfault introduced in previous commit (when adding local packages).


83335 11-Sep-2001 dd

Use a colon to separate the user and group when executing chown(1).
Periods aren't supported anymore.

PR: 30507
Submitted by: Georg-W. Koltermann <gwk@sgi.com>


83212 07-Sep-2001 unfurl

Fixes problem with pkg_add -r when adding multiple pkgs.

Reviewed by: chris


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


81699 15-Aug-2001 sobomax

Remove duplicate umask(2) call.

PR: dusty/7998
Submitted by: Stefan Eggers <seggers@semyam.dinoco.de>
MFC after: 2 weeks


81588 13-Aug-2001 ru

Spell "FreeBSD" with "F" and "BSD" in uppercase.


81571 13-Aug-2001 obrien

Reduce private "lesser known" function redirection to improve clarity.

Approved by: jkh


81449 10-Aug-2001 ru

mdoc(7) police: protect trailing full stops of abbreviations
with a trailing zero-width space: `e.g.\&'.


81049 02-Aug-2001 sobomax

Cosmetics: replace dozen instances of "(tmp = getenv(PKG_DBDIR) ? tmp : DEF_LOG_DIR)"
with macro.

MFC after: 1 month


81046 02-Aug-2001 sobomax

Usability tweak:

Use '' quotes instead of `' to delimit names of files and packages in
warning and error messages, because it is easier to cut-n-paste name in
question that way (single click) without confusing the shell. And yes,
I know that it is less eye-candy...

MFC after: 1 month


80472 28-Jul-2001 obrien

The security officer requested this be backed out for discussion.


80463 28-Jul-2001 obrien

Remove s_strl*(). I am not sure what was thought they accomplished.

When reading the code I had to stop, say "ok, what does *these*
modifications of strl*() do? Pull out grep. Oh, not in add/, maybe above
in ../lib/? Yep. So what do they do? Comments above them are misleading,
guess I'll have to read the code. Oh, they just test strl* against the
size and return the result of the test. Now I can continue to read the
code I was.

The uses of s_strl*() then test that result and errx()'s.
Lets think about the "optimized" code I am removing:

In general the compiler pushes the three args to strl* onto the stack and calls
s_strl*. s_strl* has to indirectly access 3 args from the stack. Then push
them on the stack a 2nd time for the real strl* call. s_strl* then pops the
return from strl* off the stack; or moves it from the register it was returned
in, to the register where tests can happen. s_strl* then pops the three
arguments to strl*. Perform the test, push the result of the test, or move it
from the result register to the return value register. The caller to s_strl*
now has to either pop the return value of s_strl* or move it from the return
value register to the test register. The caller then pops the three args to
s_strl* off the stack (the same args that s_strl* itself had to pop off after
the real call to strl*). The s_strl* caller then performs a simular test to
what has already been done, and conditionally jumps. By doing things this way, we've given the compiler optimizer less to work with.

Also, please don't forget the that call to s_strl* has possibly jumped to code
not in the cache due to being far away from the calling code, thus causing a
pipeline stall.

So where is the "optimization" from s_strl*?
It isn't code clarity.
It isn't code execution speed. It isn't code size either.


80409 26-Jul-2001 kris

Only match the first osreldate date range for constructing the FTP URL,
not all of them.

Noticed by: obrien


80029 20-Jul-2001 obrien

Perform a major cleanup of the usr.sbin Makefiles.
These are not perfectly in agreement with each other style-wise, but they
are orders of orders of magnitude more consistent style-wise than before.


79916 19-Jul-2001 kris

Correct a reversion in r1.39 which introduced a new instance of strcpy()
after r1.38 had attempted to remove them all.


79755 15-Jul-2001 dd

Remove whitespace at EOL.


79537 10-Jul-2001 ru

mdoc(7) police: removed HISTORY info from the .Os call.


79536 10-Jul-2001 sobomax

bzip2(1) is in the base system - we don't need /usr/local/bin in the PATH
anymore.


78118 11-Jun-2001 jkh

Properly quote recursive pkg_add operations so that filenames with
spaces or special characters in them won't barf.


77730 04-Jun-2001 pirzyk

Fixed pkg_add so when it does not find a package, it returns != 0.

PR: bin/23083
Submitted by: Patch submitted by Maxime Henrion <mux@qualys.com>
MFC after: 2 weeks


77537 31-May-2001 eric

Cross reference pkg_update(1).

Approved by: murray


76739 17-May-2001 sobomax

Style policy: reformat multiline comments to conform to style(9).


76504 12-May-2001 kris

Clean up some of the evil string handling in this code, replace
warnx()+exit() with errx() and replace a big if..then..else construct
to determine the package download directory with a lookup table.

Reviewed by: jkh
MFC after: 2 weeks


76392 09-May-2001 obrien

rcsid style fix.


76391 09-May-2001 obrien

A WIP snuck in the rev 1.34 commit.


76015 26-Apr-2001 ache

Fix typo in prev commit - add missing comma


75981 25-Apr-2001 obrien

Add /usr/X11R6/bin to the exported PATH. If /usr/local/bin is there,
/usr/X11R6/bin should be there. This helps all the ports that need to
run `mkfontdir' and error out as many port maintainers do not realize
`mkfontdir' isn't in the path.

Prompted by: pkg_add pcemu


73233 28-Feb-2001 ru

Eliminate mdocNG warnings caused by misplaced or extraneous macro calls.


72776 20-Feb-2001 jkh

Use the more logical author syntax from pkg_version and quote
email addresses properly.


72578 17-Feb-2001 obrien

MFS: getpackagesite() from RELENG_4 that allows the code to be the same.


72531 16-Feb-2001 ru

mdoc(7) police: sanitize previous commit.


72430 13-Feb-2001 obrien

In light of the dismal transfer times from ftp.FreeBSD.org, add a new
`PACKAGEROOT' env var which you would set to a proper mirror of
ftp.FreeBSD.org (say "export PACKAGEROOT=ftp://ftp3.FreeBSD.org"), to
fetch from an alternate place. This is easier to use than `PACKAGESITE'
for true mirrors, and can be used in your dot files across all versions
of FreeBSD.


72126 07-Feb-2001 ru

mdoc(7) police: Change -filled displays (which just happen
to be the same as -ragged in the current implementation) to
-ragged. With mdocNG, -filled displays produce the correct
output, formatted and justified to both margins.


72091 06-Feb-2001 asmodai

Fix typo: seperate -> separate.

Seperate does not exist in the english language.


71898 01-Feb-2001 ru

mdoc(7) police: split punctuation characters + misc fixes.


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


71102 16-Jan-2001 ru

Prepare for mdoc(7)NG.


71055 15-Jan-2001 sobomax

Fix a bug arised from the ')' in the wrong place when calling printf()-like
varargs function, which lead to one of the arguments was left out. This resulted
in failure when inwoking mtree, warning message "mtree returned a non-zero
status - continuing" and probably is the reason for zillion mtree errors on
bento.


70403 27-Dec-2000 ru

Prepare for mdoc(7)NG.


69793 09-Dec-2000 obrien

Add `_PATH_DEVZERO'.
Use _PATH_* where where possible.


68965 20-Nov-2000 ru

mdoc(7) police: use the new features of the Nm macro.


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>


62154 27-Jun-2000 des

Use libfetch instead of libftpio. This adds support for http and IPv6.


58010 13-Mar-2000 billf

-CURRENT is now 500000, reflect that.


57673 01-Mar-2000 sheldonh

Remove single-space hard sentence breaks. These degrade the quality
of the typeset output, tend to make diffs harder to read and provide
bad examples for new-comers to mdoc.


57628 29-Feb-2000 jhb

Add cross references to pkg_version(1) in all the other pkg_* man pages.
Also, add a cross reference to pkg_info(1) in pkg_version(1). Finally,
in pkg_version(1), don't put a period at the end of the list of see also
man pages.

Noticed by: Matt Ayres <matta@fast.net>


57330 19-Feb-2000 jkh

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


55367 03-Jan-2000 asami

Redirect stdout from mtree to /dev/null; we don't really need to know
the list of directories being created when we install a package.


53388 18-Nov-1999 cpiazza

Make `pkg_add -r package1 package2 package3 ...` work correctly.

Reviewed by: billf


51638 25-Sep-1999 billf

o Remove all of the objformat logic, it's never coming back.
o Simplify getpackagesite(), it comes back in full glory when we branch
again. It's still needed however to get the i386 or alpha directory.


50741 01-Sep-1999 jkh

Use the appropriate macro for double quotes rather than using double
quotes.

Submitted by: Alexey Zelkin <phantom@cris.net>
PR: 13436


50479 28-Aug-1999 peter

$Id$ -> $FreeBSD$


49824 15-Aug-1999 mpp

Various man page cleanup:

- Sort xrefs.
- FreeBSD.ORG -> FreeBSD.org
- Be consistent with section names as outlined in mdoc(7).
- Other misc mdoc cleanup.

PR: doc/13144
Submitted by: Alexey M. Zelkin <phantom@cris.net>


49637 11-Aug-1999 billf

-Wall fixes. Ambigious if/elses, uninitialized values, missing headers,
missing prototypes, and empty format strings.


48170 24-Jun-1999 imp

'?' shouldn't be in the usage string. Unknown characters are already
converted to '?'.


48143 23-Jun-1999 billf

If we are going to have a case for '?' then we should define it in Options.

Submitted by: Ben Olson <bseth@chc-chimes.com>


47916 14-Jun-1999 obrien

Support Alpha and -CURRENT in the "-r" option case.


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>


43920 12-Feb-1999 alex

Removed occurrences of consecutive repeated words (such as "the the").


43359 28-Jan-1999 billf

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.


43244 26-Jan-1999 billf

Numbering typo, missed a '0'

Submitted by: Brian Feldman


43204 25-Jan-1999 billf

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.


42786 18-Jan-1999 billf

Style police, inline ifs.

Submitted by: Brian Feldman <green@unixhelp.org>


42750 17-Jan-1999 jseger

enviornment -> environment
PR: docs/9534
Submitted by: rv@fore.com


42740 17-Jan-1999 billf

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


41866 16-Dec-1998 jkh

Make it possible to have separate install scripts as well as have
an on-delete script.

Submitted by: Rajesh Vaidheeswarran <rv@fore.com>


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.


39185 14-Sep-1998 jkh

Use a more reasonable default umask in case the root umask is too
fascist.
PR: 4014


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>


38942 08-Sep-1998 jkh

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.


38931 08-Sep-1998 jkh

Fail as documented when a dependency cannot be found
PR: 7318
Submitted by: djv@bedford.net


38583 27-Aug-1998 jkh

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.


37728 17-Jul-1998 eivind

Avoid race-conditions on playpen delete.


37634 14-Jul-1998 jkoshy

Add $Id$.

PR: 7251
Submitted by: Norihiro Kumagai <kuma@jp.freebsd.org>


37378 04-Jul-1998 jkh

MF22: check for null pointer.


37166 26-Jun-1998 jkoshy

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


34809 23-Mar-1998 charnier

.Sh AUTHOR -> .Sh AUTHORS. Use .An/.Aq.


34149 07-Mar-1998 bde

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.


33427 16-Feb-1998 jkh

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.


32665 21-Jan-1998 jkh

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!


32659 21-Jan-1998 imp

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


32587 17-Jan-1998 jkh

MF22: fix to install script handling.


32334 08-Jan-1998 jkh

Don't assume install script is directly runnable - use sh -c.


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


30533 18-Oct-1997 jkh

- 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


30387 13-Oct-1997 jkh

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>


30221 08-Oct-1997 charnier

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


29889 27-Sep-1997 hoek

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


29574 18-Sep-1997 phk

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>


29336 13-Sep-1997 max

Typo.


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.


26745 19-Jun-1997 jkh

Fix multiple documentation bogons.
PR: 3798
Submitted by: Jan Kuriyama <kuriyama@opt.phys.waseda.ac.jp>


26105 24-May-1997 ache

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


24428 31-Mar-1997 imp

compare return value from getopt against -1 rather than EOF, per the final
posix standard on the topic.


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.


22750 15-Feb-1997 jkh

Fix a bogon with playpen size calculation for pkg of "-". It's amazing
this ever worked, actually.


22690 14-Feb-1997 jkh

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


21880 20-Jan-1997 wosch

Sort cross references.


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.


21650 13-Jan-1997 jkh

Correct a problem which broke +DISPLAY file handling.


18929 14-Oct-1996 jkh

Fix PR#1557 - chained package dependencies using URLs didn't work.


17719 20-Aug-1996 jkh

Clean up the english a little, having made the mistake of reading it.


17373 31-Jul-1996 jkh

Make -force work for pkg_add.


17338 30-Jul-1996 jkh

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.


16663 24-Jun-1996 jkh

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.


16549 20-Jun-1996 jkh

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.


16087 03-Jun-1996 jkh

fix PR#599
Submitted-By: jdp


16059 01-Jun-1996 jkh

Oh my, looks like I didn't understand .B as well as I thought I did! :-)


15135 08-Apr-1996 mpp

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.


14582 12-Mar-1996 jkh

Fix a couple of miscellaneous bugs and make pkg_add also support reading
from stdin.


14045 12-Feb-1996 mpp

Another round of man page cleanups.

Down to only about 100 items left to cleanup! :-)


12219 12-Nov-1995 jkh

Bring my pkg_install improvements forward from 2.1.


11971 31-Oct-1995 jkh

Fix the `pkg_add relative to .' bug. Thank you, Ville!
Submitted by: Ville Eerola <ville@vlsi.fi>


11780 25-Oct-1995 jkh

Bring forward my changes from 2.1


10085 17-Aug-1995 jkh

Some fixes to make this "TMPDIR agile".
Submitted by: jmacd + some of my own fixes.


9953 06-Aug-1995 jkh

Make "out of space in ${PKG_TMPDIR}" handling a bit more robust.
Print the right thing, do the right thing. Back to you, Satoshi!


9788 30-Jul-1995 jkh

Document how to get pkg_add to use PASSIVE MODE ftp in such transfers.


9786 30-Jul-1995 jkh

o Fix PR# bin/643 - always set "where_to" properly.

o Nuke dependence on libftp - it's about to die!


9784 30-Jul-1995 asami

The default for temporary directory is /var/tmp, not /tmp.


9202 11-Jun-1995 rgrimes

Merge RELENG_2_0_5 into HEAD


8857 30-May-1995 rgrimes

Remove trailing whitespace.


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


8420 10-May-1995 jkh

Document fetch-by-URL.


8115 28-Apr-1995 jkh

Use mtree -U instead of -u and put back error check. Thanks Rod!


8096 27-Apr-1995 jkh

Don't bother checking the return status of the mtree command - it returns
non-zero stats when it changes things, too.


8083 26-Apr-1995 jkh

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.


8075 26-Apr-1995 jkh

Check dependencies BEFORE doing final extraction of package.
Fix a bug where direct-extract mode would have still invoked the
packing list reordering commands.


8073 26-Apr-1995 jkh

My handling of the missing dependency but !Verbose was wrong. Make
the right message come out.


7998 22-Apr-1995 jkh

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! :-)


7996 22-Apr-1995 jkh

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.


7986 22-Apr-1995 jkh

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.


7938 19-Apr-1995 jkh

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.


7937 19-Apr-1995 jkh

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.


7733 10-Apr-1995 jkh

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.


7713 09-Apr-1995 jkh

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.


5410 05-Jan-1995 jkh

Whoops! How embarassing. Just now noticed that I forget to update the .Os
lines. Done.


4997 06-Dec-1994 jkh

More changes from John T. Kohl. Man pages, mostly.
Submitted by: jtkohl


4996 06-Dec-1994 jkh

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


4547 17-Nov-1994 jkh

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! :)


3576 14-Oct-1994 jkh

Whoops - variable was in wrong scope. Correct.


3574 14-Oct-1994 jkh

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.


3364 04-Oct-1994 jkh

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.


1550 25-May-1994 asami

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.


1545 25-May-1994 jkh

Remove find_name(), replace with more generic find_plist() function.


1529 20-May-1994 asami

Typo (pkg_add => pkg-add).


1527 20-May-1994 asami

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


573 10-Oct-1993 jkh

If require script fails, don't try to delete installed package.


545 08-Oct-1993 jkh

Fix problems with executing from current directory


487 20-Sep-1993 nate

Now works with/without obj directories


477 18-Sep-1993 jkh

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


465 14-Sep-1993 jkh

Fixed broken -t flag; thanks Rich!


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