History log of /freebsd-10.0-release/usr.sbin/pkg_install/lib/url.c
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# 259065 07-Dec-2013 gjb

- Copy stable/10 (r259064) to releng/10.0 as part of the
10.0-RELEASE cycle.
- Update __FreeBSD_version [1]
- Set branch name to -RC1

[1] 10.0-CURRENT __FreeBSD_version value ended at '55', so
start releng/10.0 at '100' so the branch is started with
a value ending in zero.

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

# 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


# 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


# 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


# 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]


# 195212 30-Jun-2009 brian

Don't imply that only FTP urls are supported when we can't fetch
a package.

Approved by: re (kib)
MFC after: 3 weeks


# 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


# 179835 16-Jun-2008 flz

Remove support for RELENG_4 (__FreeBSD_version < 500039).

MFC after: 1 day


# 167972 28-Mar-2007 njl

Make consistent with style(msmith). 4 spaces indent, tab for each 2 indents.


# 167270 06-Mar-2007 ru

Invoke tar(1) with the -p option when installing a package
from an URL (i.e., do it the same way as when installing
from a file). This fixes the lossage of the setuid bits.
It wasn't a problem before because GNU tar(1) implied the
-p option for root, but BSD tar(1) doesn't do that.

Discussed with: tobez and some advanced users :)


# 161212 11-Aug-2006 des

Cosmetic: fix indentation.


# 160178 08-Jul-2006 des

Turn on libfetch debugging if -v was specified on the command line.

MFC after: 2 weeks


# 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


# 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


# 113587 17-Apr-2003 rwatson

Revert url.c:1.2: there was a race condition between when I produced
the fix and when I committed it -- in between the two, DES committed
a different fix, rendering this fix unneeded.

Requested by: des


# 112722 27-Mar-2003 rwatson

Don't pass NULL in as a flags argument to libfetch's fetchGetURL()
as this can result in a NULL pointer deference when parsing the
flags later. This change fixes "pkg_add -r" on 5.0-CURRENT for
me; not quite clear how the problem was introduced.


# 106491 06-Nov-2002 obrien

Break fileGetURL() out into its own file so that pkg_install/lib consumers
pkg_{create,delete} don't need to needlessly link with libfetch.