summaryrefslogtreecommitdiffstats
path: root/usr.sbin/pkg/pkg.c
Commit message (Collapse)AuthorAgeFilesLines
* MFC: r278173bapt2015-02-111-1/+5
| | | | | | Test the return of fetchParseURL(3) CID: 1125811
* MFC: r278172bapt2015-02-111-4/+10
| | | | | | | | Plug resources leak CID: 1125813 CID: 1125807 CID: 1125808
* Merge r268728 from head:gavin2014-08-131-1/+2
| | | | | When we fail to extract the pkg binaries (for example, / is read-only), give a more helpful error message.
* MFC: r263648, r264789, r266636bapt2014-07-191-2/+2
| | | | | | | | This brings: - schema validation - xpath-like interface for ucl objects Adapt pkg(7) to the new libucl API
* r262400,r262401,r262418bapt2014-03-111-42/+29
| | | | Sync pkg(7) with head
* MFC r258550:gjb2013-11-301-24/+0
| | | | | | | | Do not create pkg.conf, as it is not necessary anymore and packagesite is deprecated Approved by: re (glebius) Sponsored by: The FreeBSD Foundation
* Merge r257945 from head:glebius2013-11-141-2/+2
| | | | | | Do not use just freed memory. Approved by: re (kib)
* MFC r257505:bdrewery2013-11-041-19/+45
| | | | | | | | | | | | | Add -f support to 'pkg bootstrap' and 'pkg add' to force installation of pkg(8) even if already installed. This is useful if you somehow messup pkg(8) and need to reinstall from remote with it already being registered in the pkg(8) /var/db/pkg database. Also add some sanity checks to 'pkg add'. Approved by: bapt Approved by: re (glebius)
* MFC r257377:bdrewery2013-11-031-0/+9
| | | | | | | | Add a 'pkg bootstrap' command which will bootstrap pkg(8) without forwarding any command to it after installation. Approved by: bapt Approved by: re (gjb)
* MFC: r256770,r257142,r257145,r257146,r257147,r257148,bdrewery2013-10-291-56/+655
| | | | | | | | | | | | | | | | | | | | | r257149,r257150,r257158,r257159,r257164,r257168, r257193 - Support checking signature for pkg bootstrap from remote and for 'pkg add ./pkg.txz' - Be verbose on where pkg is being bootstrapped from. - Add support for reading configuration files from /etc/pkg. For now only /etc/pkg/FreeBSD.conf is supported. - Add test package signing key fingerprint into /etc/keys/pkg/trusted. - Disable fingerprint checking by default for now as the official packages are not yet signed. Approved by: bapt Approved by: re (glebius)
* MFC r257051:bdrewery2013-10-291-0/+7
| | | | | | | | | | | Add support for using "pkg+http://" for the PACKAGESITE. pkg 1.2 is adding this support as well. This should help lessen the confusion on why the default SRV PACKAGESITE does not load in a browser. Approved by: bapt Approved by: re (glebius)
* MFC: r256968, r256971, r256978bapt2013-10-291-1/+19
| | | | | | | | | | | | Improve SRV records support for the pkg(8) bootstrap: - order srv records by priorities - for all entries of the same priority, order randomly respect the weight - select the port where to fetch from respect the port provided in the SRV record Allow to bootstrap by doing pkg add ./a/path/to/a/pkg_package.txz Approved by: re (glebius)
* Fix bootstrapping pkgng by not appending "/latest/" to PACKAGESITE.bapt2013-03-081-1/+1
| | | | Reporter by : Alexander Yerenkow (via irc)
* Add the ability to correctly read pkg.conf is exists.bapt2013-03-051-168/+18
| | | | | | | | | | | | | | | Only look for boostrap useful options: - PACKAGESITE - ABI - MIRROR_TYPE - ASSUME_ALWAYS_YES While here makes PACKAGESITE expand the ${ABI} variable. Allow to deactivate any SRV record look up (MIRROR_TYPE=none) Use the same mechanism as for pkgng itself: first get configuration out of environment variable and fallback on pkg.conf if exists. Reviewed by: bdrewery
* Do not use deprecated functions from libarchivebapt2013-02-201-2/+2
|
* In case of failure of the pkg boostrap advice the user to either change thebapt2013-02-141-0/+2
| | | | | | | PACKAGESITE they use or install from ports directly indicating where the port is localted in the port collection Submitted by: kientzle
* Remove extraneous space and new-line.matthew2012-12-231-2/+2
| | | | | | Submitted by: pjd, gcooper Approved by: bapt MFC after: 2 weeks
* Third time's the charm. pkg -N output needs to go to stderr.matthew2012-12-231-4/+2
| | | | | Approved by: bapt MFC after: 2 weeks
* Switch from 'pkg -n' to 'pkg -N' as the test for pkgn activationmatthew2012-12-221-2/+2
| | | | | | | | | status. '-n' is already used extensively elsewhere in pkgng (to mean 'dry-run') and this reduces the potential confusion Submitted by: eadler Approved by: bapt MFC after: 2 weeks
* In preparation for making 'pkg -n' the one true method of determiningmatthew2012-12-211-0/+10
| | | | | | | | | whether a system has been configured to use pkgng, cause /usr/sbin/pkg recognise a -n option and exit with a failure code when the pkg port is not installed. Approved by: bapt MFC after: 2 weeks
* if PACKAGESITE url scheme is not 'file://', always try to revolv SRV records andbapt2012-12-051-8/+40
| | | | | | | use them if any. It allows the bootstrap to use directly pkg.FreeBSD.org instead of pkgbeta.FreeBSD.org MFC after: 1 month
* Fix confirmation logic when detecting a ttybapt2012-08-241-3/+3
| | | | Reported by: mjg
* - change ALWAYS_ASSUME_YES to ASSUME_ALWAYS_YES for consistency with pkg(8)bapt2012-08-241-3/+5
| | | | | | | - if not on a tty prompt about the missing pkg(8) but default on 'no' except if ASSUME_ALWAYS_YES is set MFC after: 2 days
* Make pkg bootstrap program ask for confirmation before proceeding.kan2012-07-151-1/+35
| | | | | | | | The previous behaviour was to silently download and install the pkg package, without ever telling user about what it was doing and why. Discussed with: bapt Reviewed by: kib
* Add missing \n when generating pkg.confbapt2012-05-211-1/+1
| | | | | | Reported by: beat Approved by: des (mentor) MFC after: 1 day
* - close the open file after fetchingbapt2012-05-011-3/+27
| | | | | | - create a default /usr/local/etc/pkg.conf Approved by: des (mentor)
* - Use _PATH_TMP instead of hardcoded /tmpbapt2012-04-161-95/+99
| | | | | | | | | | - more style(9) fixes - some refactoring - better error detection - Add the DPADD to Makefile Submitted by: Garrett Cooper <yanegomi@gmail.com> Approved by: des (mentor)
* - Fix style(9) bugs + inconsistenciesbapt2012-04-151-32/+29
| | | | | Submitted by: marius Approved by: des (mentor)
* Do not do double initialisationbapt2012-04-151-2/+2
| | | | | | | style(9) says for (;;) not while (1) Reported by: culot Approved by: des
* add usr.sbin/pkg which is a bootstrap tool for pkgng.bapt2012-04-151-0/+383
it respects PACKAGESITE, PACKAGEROOT, and a new environment variable ABI (if a user want to use a different API from the base one for its packages) it has no man page on purpose to avoid hidding the pkg(8) man page from the pkgng package. for now uses pkgbeta.FreeBSD.org as default mirror to find its package it respects MK_PKGTOOLS Approved by: des (mentor)
OpenPOWER on IntegriCloud