summaryrefslogtreecommitdiffstats
path: root/usr.sbin/portsnap
Commit message (Collapse)AuthorAgeFilesLines
* The last big commit: let usr.sbin/ use WARNS=6 by default.ed2010-01-022-2/+0
|
* Add undocumented 'portsnap alfred' command, which runs (fetch|cron)cperciva2009-12-301-1/+17
| | | | | | | | based on whether fd 0 is a terminal, and then runs (extract|update) based on whether ${PORTSDIR} exists. Requested by: alfred MFC after: 1 month
* Set SO_NOSIGPIPE on sockets used by phttpget. Without this, ifcperciva2009-04-031-0/+6
| | | | | | | | | | | | | | (1) phttpget is attempting to download enough files that it can't send all the requests at once, and (2) the remote server forcibly closes the connection, resulting in RST packets being sent, phttpget will receive a SIGPIPE and terminate without downloading all of the files. This is probably responsible for a number of hard-to-reproduce errors with portsnap and freebsd-update. MFC after: 3 days
* - remove superfluous worddanger2008-09-151-2/+2
| | | | | | PR: docs/127401 Submitted by: Mick Charles Beaver <mick@cs.wisc.edu> MFC after: 1 week
* Add support for specifying which INDEX files to build via portsnap.conf.cperciva2008-05-171-4/+16
| | | | | Requested by: brooks Reminded by: brooks, about halfway through his BSDCan talk
* Improve conformance to the HTTP specification by using case-insensitivecperciva2008-02-131-6/+6
| | | | | | | | comparisons for header keywords. Apparently some proxies use creative capitalization. Weird proxy found by: brooks MFC after: 3 days
* Attempt to reduce the rate of foot-shooting injuries by adding a newcperciva2007-12-281-0/+9
| | | | | | | | paragraph clarifying that portsnap does not behave the same way as cvs and cvsup where local modifications are concerned. Submitted by: peter Feet shot: peter, kris, obrien, + many others
* When generating ports INDEX files from downloaded "describes" data, buildcperciva2007-08-021-0/+1
| | | | | | | an index for FreeBSD 7.x too. MFC After: 1 week Approved by: re (hrs)
* Add support for HTTP/1.0 Persistent Connections to phttpget. Requests arecperciva2007-06-301-3/+10
| | | | | | | | | | | | | | be marked as HTTP/1.1 but "Connection: Keep-Alive" is added; this convinces HTTP/1.0 servers and proxies to hold the TCP connection open despite not being able to use HTTP pipelining. This dramatically cuts down on the number of TCP connections (and thus port numbers) used by portsnap when talking to an HTTP/1.0 proxy (e.g., squid), and has the side benefit of improving performance in those cases. Tested by: simon Approved by: re (kensmith) MFC After: 1 week
* Add support for the HTTP_TIMEOUT environment variable (integer numbercperciva2006-11-071-0/+13
| | | | | | of seconds, just like in fetch(1)). Submitted by: rdivacky
* Set LC_ALL=C in order to avoid problems with character ranges andcperciva2006-10-211-0/+3
| | | | | | | sorting. PR: bin/104505 MFC after: 3 days
* Markup fixes.ru2006-09-291-12/+12
|
* s/MAN8/MAN/cperciva2006-09-011-1/+1
| | | | Pointed out by: ru
* Use some features of sh(1) which I didn't know about until today ("read"cperciva2006-05-301-5/+2
| | | | | | | | | can read two variables at once; and suffix pattern deletion) to make the extract command fork fewer processes. With the portsnap snapshot and the ports tree in swap-backed memory disks on my 1.4GHz laptop, this reduces 178800 processes and 195/56/126 seconds of real/user/sys time to 44600 processes and 103/34/60 seconds.
* Fix typo.cperciva2006-05-131-1/+1
| | | | Pointed out by: ceri
* Add a mechanism for constructing INDEX files which include local ports.cperciva2006-05-132-2/+22
| | | | Requested by: brooks
* Use 'rm -rf foo/bar' to remove a port instead of 'rm -rf foo/bar/'.cperciva2006-05-121-3/+6
| | | | | | | When /usr/ports/foo/bar is a symlink pointing outside the tree, this deletes the symlink instead of the directory it points to. Requested by: delphij
* Allow the HTTP_PROXY environment variable to be (mis)spelled ascperciva2006-05-052-2/+4
| | | | | "http_proxy", since some people apparently do this and fetch(3) allows it.
* Fix the test for whether ${HTTP_PROXY} is set -- I got it backwards.cperciva2006-05-051-1/+1
| | | | | Pointy hat to: cperciva Pointed out by: pjd
* Remove two lines of debugging which I forgot to remove before the lastcperciva2006-05-031-2/+0
| | | | | | commit. Noticed by: simon
* The approach portsnap uses of "pick a random HTTP mirror" doesn'tcperciva2006-05-031-3/+16
| | | | | | | | | | | | | | | | | | | | interact very nicely with HTTP proxies: Since proxies do not know that all the files on portsnap1.freebsd.org are identical to the files with the same names on portsnap2.freebsd.org, said proxies end up downloading and storing files in duplicate. This commit uses the HTTP_PROXY environment variable, if set, to generate a random number seed for use in selecting a mirror. This means that if several systems all have the same HTTP_PROXY value set, they will ask the proxy to fetch files from the same mirror (unless that mirror fails, in which case all the systems will use the same second choice, et cetera). Portsnap still doesn't interact very well with "transparent" HTTP proxies, but there's nothing I can do about those. Requested by: simon Sponsored by: FreeBSD security development fundraiser
* Instead of selecting a mirror and failing if it is inaccessible, keepcperciva2006-05-031-25/+50
| | | | | | | | | | | | | | | | | | | track of which mirrors we have tried and try a different mirror if we fail when trying to download the SSL public key or the snapshot signature. Failures later in the download process will not result in switching to a different mirror, for two reasons: 1. If is very unlikely that a mirror will fail partway through the process of downloading updates. 2. If we switched from a more recently updated mirror to a less recently updated mirror partway through the download process, we would end up failing anyway because we would be trying to fetch files which the second mirror didn't have yet. PR: bin/96288 Requested by: lots of people Sponsored by: FreeBSD security development fundraiser
* Teach portsnap to parse the output of the host(1) in BIND 8 as well ascperciva2006-05-021-3/+7
| | | | | | | | | the host(1) from BIND 9. This doesn't matter for HEAD, but will help people who install portsnap from the ports tree onto older versions of FreeBSD. PR: ports/93901 Sponsored by: FreeBSD security development fundraiser
* Reimplementation of world/kernel build options. For details, see:ru2006-03-171-1/+1
| | | | | | | | http://lists.freebsd.org/pipermail/freebsd-current/2006-March/061725.html The src.conf(5) manpage is to follow in a few days. Brought to you by: imp, jhb, kris, phk, ru (all bugs are mine)
* Remove trailing dot from the servername in the serverlist to be ableume2006-03-071-1/+1
| | | | | | | | to use portsnap from behind a http proxy. Some HTTP proxy don't like trailing dot in the servername. Approved by: cperciva MFC after: 2 days
* Correct handling of HTTP_PROXY_AUTH. A password may have `:'.ume2006-03-071-1/+1
| | | | | Approved by: cperciva MFC after: 2 days
* Reference sha256(1) instead of sha256(8), which doesn't exist.wkoszek2006-02-261-1/+1
| | | | | Approved by: cognet (mentor) MFC after: 3 days
* Expand contractions.joel2006-02-011-2/+2
|
* Merge from accidental commit to RELENG_5:cperciva2006-01-271-1/+1
| | | | | Correctly identify the host and port values on a failed getaddrinfo lookup.
* Replace "fetch" with "fetch -r" when downloading the initial ~38MBcperciva2006-01-221-2/+1
| | | | | | | | | snapshot in order to avoid unnecessary re-downloading. Remove the earlier "rm -f ${SNAPSHOTHASH}.tgz" to make this work. Suggested by: Lars Engels MFC after: 7 days
* Mention that the random time slept by "portsnap cron" is between 1 andcperciva2006-01-171-1/+2
| | | | | | | 3600 seconds. Suggested by: Niki Denev MFC after: 3 days
* Make "portsnap extract" automatically create ${PORTSDIR} if necessarycperciva2006-01-061-2/+6
| | | | | | | | instead of complaining that "Directory does not exist or is not writable". Suggested by: {tlp, siep} via IRC MFC after: 1 week
* Make "missing dependency" errors more useful by indicating which portcperciva2005-12-011-10/+10
| | | | | | | is trying to depend upon the non-existent port. Suggested by: kris MFC after: 3 days
* An empty file does not have a positive number of lines.cperciva2005-11-201-0/+7
| | | | | | | | Make sure that the number of lines read is non-zero before in order to avoid dumping core. Reported by: Wojciech A. Koszek Pointy hat to: cperciva
* Correctly handle a TCP connection being shutdown by the server whilecperciva2005-11-171-1/+2
| | | | | | | | | we're reading response headers. (Handle it as a connection-killing error, rather than entering an infinite loop reading zero bytes.) Reported by: simon Discovered thanks to: A not-very-transparent transparent HTTP proxy. MFC after: 3 days
* Add HTTP proxy authentication, via the HTTP_PROXY_AUTH environmentcperciva2005-09-221-1/+101
| | | | | | | variable. Tested by: Emil Mikulic X-MFC-After: 6.0-RELEASE
* Style fix: "if (pointer)" -> "if (pointer != NULL)"cperciva2005-09-211-1/+1
|
* Add a note pointing out that certain information (IP address, list ofcperciva2005-09-181-0/+15
| | | | | | files fetched, FreeBSD release level) is transmitted to the portsnap server when portsnap is run, but that this information is only used anonymously and in aggregate.
* Handle circular dependencies properly (via errx(3)) rather than dumpingcperciva2005-09-171-2/+15
| | | | | | | core. This bug was made visible by a recent change to the audio/timidity++ port, which now has itself as a run dependency. Reported by: Emil Mikulic, Andreas Klemm
* Portsnap uses host(1) to search for mirrors, but this is only availablecperciva2005-09-151-0/+6
| | | | | | | | when the base system is not compiled with NO_BIND set. Before we start searching for mirrors, make sure that host(1) can be found, and if it doesn't exist then fallback to the A record instead of the SRV records. Submitted by: Luca Morettoni
* Fix typo: ${PORTDIR} -> ${PORTSDIR}.cperciva2005-09-111-1/+1
| | | | | | | | | Apologies to everyone who has run portsnap in 7.0-CURRENT since Tuesday; if there is a file "/.portsnap.INDEX" on your system, you can delete it (or even better, move it to /usr/ports/.portsnap.INDEX). Big pointy hat to: cperciva Reported that things weren't working properly: Aleksander Fafula
* Fix typo: Cowarly -> Cowardly.cperciva2005-09-071-1/+1
| | | | Reported by: Joerg Sonnenberger
* Teach portsnap how to ignore unwanted parts of the ports tree. A linecperciva2005-09-061-6/+66
| | | | | | | | | | | | | | | of the form "REFUSE foo" in portsnap.conf will result in parts of the tree matching "^foo" being (a) not extracted by "portsnap extract", (b) not updated by "portsnap update", and (c) not having any patches or new ports downloaded by "portsnap fetch" or "portsnap cron". The example shown in portsnap.conf demonstrates ignoring all the language categories. As mentioned in portsnap.conf.5, the use of an imcomplete ports tree is not officially supported; but this is something which many users have requested, so I'm adding it anyway. PR: bin/85619 (but not the patch provided therein) MFC after: 1 month
* Spell "cmp > /dev/null" as "cmp -s".cperciva2005-08-141-1/+1
| | | | Suggested by: dougb
* Correctly exit from extract_run() and update_run() if files needed arecperciva2005-08-131-4/+9
| | | | | | | | | | | | | | | | | | | | | missing from ${WORKDIR}/files/. This bug was caused by the astonishing interaction of "return" and pipelines; in the following code, the "return" does not exit the function, but instead exits the subshell which was spawned for the last element of the pipeline; consequently, the output produced is "foo". foo() { echo bar | while read baz; do if [ ${baz} = "bar" ]; then return 1 fi done echo foo } Reported by: simon
* Misc mdoc(7) fixes:simon2005-08-131-7/+10
| | | | | | | | | - Bump document date for recent updates. - Use .Fx for FreeBSD. - Remove EOL whitespace. - Start new sentences on new lines. Reviewed by: cperciva
* Allow multiple commands to be specified on a single command line, e.g.,cperciva2005-08-132-7/+11
| | | | | | | | | "portsnap fetch update" or "portsnap -I cron update". They will be executed in the order that they appear, and duplicates are not removed (so "portsnap fetch fetch fetch fetch" is meaningful, albeit rather silly). Requested by: Roman Divacky
* Fix the progress statistics code by printing the right variable. Icperciva2005-08-131-1/+1
| | | | | | | missed this when I changed the stats code in the ports -> base transition. Pointed out by: simon
* When using cmp(1) to determine if the ports tree is already up to date,cperciva2005-08-121-1/+2
| | | | | | | we want the exit code, but not the actual output; add a redirect to /dev/null. Pointy hat to: cperciva
* If the ports tree is already up to date when we run `portsnap update`,cperciva2005-08-111-0/+5
| | | | | | | exit early; this avoids spending five seconds rebuilding the INDEX files. Requested by: somebody on IRC, but I can't remember who
OpenPOWER on IntegriCloud