Commit graph

68 commits

Author SHA1 Message Date
dholland
ed95567cee Use :tA to make DISTINFO_FILE absolute when passing it to the fetch
and checksum scripts.

Fixes the problem where DISTINFO_FILE=../../foo/bar/distinfo doesn't
work without having an extraneous and ugly ${.CURDIR} stuffed into it
by hand.
2016-01-06 07:38:25 +00:00
joerg
cfc3e94d33 Reorder and fix logic snafu. 2015-09-14 08:27:13 +00:00
joerg
7612f47233 Introduce IGNORE_INTERACTIVE_FETCH to allow trying to fetch files from
the override site, even for INTERACTIVE_STATE=stage or FETCH_MESSAGE.
Ignore all backup sites as they won't have the distfile anyway, the
fetch wouldn't be interactive in first place otherwise.
2015-09-13 15:03:57 +00:00
joerg
0cf087a0ae Add a hook for running an action after a successful fetch.
This is intended for keeping distfile archives synchronised between
different machines without requiring NFS mounts or the like.
2015-09-08 11:13:12 +00:00
tron
f193382d69 Pass "--remote-time" option to "curl" to get correct time stamps
on downloaded files.
2014-10-07 07:27:18 +00:00
obache
62d4cd4284 tell wget as a tool. 2014-02-14 07:43:46 +00:00
jakllsch
83b3d6ebca Ensure failure on failure of depends-fetch and depends-checksum targets. 2013-11-16 15:29:39 +00:00
jakllsch
190884f976 Use correct verb in depends-fetch target information message. 2013-11-16 03:21:10 +00:00
obache
c75fa9d794 Remove fetched file if fetch command succeeds to fetch but checksum mismatch
with PKG_RESUME_TRANSFERS=YES.

PR 39896.
2013-02-16 07:32:28 +00:00
obache
9e00ba056d FTPUSERAGENT is a environment variable for ftp(1), not a make variable.
No need to pass here.

related to PR 47525.
2013-02-07 13:59:10 +00:00
morr
f33a3dc351 Allow overwritting of FTPUSERAGENT for some broken sites, which requires it. 2013-01-20 13:22:59 +00:00
ryoon
b53e7599d6 Clear FTPUSERAGENT environment variable.
When FTPUSERAGENT="Mozilla/1.0", for example, fetching from
MASTER_SITE_SOURCEFORGE fails.
Original problem is reported from tsutsui@.
2012-12-14 16:46:24 +00:00
jperkin
a5307e4d55 Make curl a tool. Add support for /usr/bin/curl, if available, on Solaris.
SmartOS and OmniOS users can now set FETCH_USING=curl and no longer require
pkgsrc dependencies for downloading distfiles.
2012-07-27 10:48:36 +00:00
fhajny
4a88e01fad Revert runaway commit 2012-02-06 12:49:38 +00:00
fhajny
bd77327b68 Added devel/ruby-kgio, www/ruby-raindrops and www/ruby-unicorn 2012-02-06 12:41:28 +00:00
obache
8bf5e38ec5 Let wget to skip CERT check, same as curl doing. 2011-12-06 01:17:33 +00:00
abs
fc3bada41a Introduce PKGSRC_SETENV, defaulting to SETENV. Can be set to ${SETENV} -i
to santise environment
2011-09-08 20:17:15 +00:00
mspo
378f543396 he -> the typo in fetch.mk; reported by Snader_LB 2011-05-17 16:38:18 +00:00
tron
06012a9594 Disable certificate checks when using "curl". This fixes the build of
the "youtube-dl" package.
2011-02-10 10:46:45 +00:00
obache
a8060535fc Add FETCH_USE_IPV4_ONLY option to force connecting to only IPv4 addresses. 2011-02-08 02:45:18 +00:00
obache
1d0fad8685 Add `--location' option for curl to follow HTTP redirect. 2011-02-08 02:40:57 +00:00
obache
9b2b224b47 Let curl to silent fail with server error.
fixes a part of PR#44528.
2011-02-08 02:02:32 +00:00
obache
d6bb7339fa For curl, "=" is not required for longname options with value. 2011-01-22 02:22:17 +00:00
reed
e7b4474645 For PR #44396.
"FETCH_CMD is the program used to fetch files for FETCH_USING=custom."
2011-01-18 15:20:54 +00:00
joerg
58416eb1b1 Add FETCH_TIMEOUT option to limit the time connections may hang during
fetch. Requested by spz@, OK by wiz@
2010-06-27 17:46:22 +00:00
joerg
c0374130d8 Add depends-fetch and depends-checksum. They work like
show-depends-options, e.g. recurse. make fetch-list does not provide the
same functionality as it doesn't deal well with broken mirror.
2009-07-15 09:40:30 +00:00
rillig
b1bf3ebab8 Replaced _PKG_SILENT and _PKG_DEBUG with RUN. 2009-03-17 22:13:36 +00:00
joerg
de0beea014 Fix C&P error. Pointed out by OBATA Akio. 2009-02-17 10:42:45 +00:00
joerg
ddb0e17cb5 Don't use += to append to an empty variable. If PASSIVE_FTP is not
defined, it would still leave the variable with a non-empty value and
that would be passed down to the fetch command when running fetch-list.
2009-02-14 18:51:20 +00:00
joerg
1f5cd4138a Optionally request passive FTP for wget. 2009-02-10 19:25:09 +00:00
joerg
d02ad103b8 Change the way the fetch process is organised as proposed on tech-pkg:
- Introduce FETCH_USING, which specifies the mechanism to use; possible
  values are ftp, fetch, curl, wget, manual and custom.
- Depend on the correct tool/program if not using manual or custom.
- For manual, just use /usr/bin/false to bail out if a distfile is
  missing.
- For custom, FETCH_CMD and related variables are used as before.
- Default value is ftp.
2009-02-10 18:55:54 +00:00
joerg
92b7363904 Allow use of fetch as FETCH_CMD. 2008-10-08 15:39:07 +00:00
obache
dc6f08ef29 Fix a typo in comment. 2008-09-24 05:33:17 +00:00
obache
60ce23921c Add FETCH_*_ARGS templates for curl.
Should be solution for PR 39208.
2008-09-07 08:17:39 +00:00
joerg
65244e1c32 Move digest dependency into checksum and fetch part.
Make _ALL_FILES and in turn _CKSUMFILES available earlier.
Use it to only depend on digest if _CKSUMFILES is non-empty.
NO_CHECKSUM will now only skip the checksum and checksum-phase
targets. FAILOVER_FETCH will independently check the sums on
distfiles and depend on digest, fixing the remaining issues
originally raised in PR 34914.
2008-05-22 16:27:22 +00:00
joerg
caa9b2eebf Move handling of pkg_install version into flavor. Add an explicit
phase pkg_install-depends before bootstrap-depends that just tries to
install a new pkg_install if the current version is too old. Still
keep it as bootstrap dependency for the bulk build code.
For NetBSD, PKG_TOOLS_BIN has to be computed in shell code due to a make
bug.

OK: jlam@
2008-04-03 14:07:51 +00:00
rillig
9fab8079e7 Removed _INTERACTIVE_COOKIE, after asking on tech-pkg if anyone needs
it. It had only been used to change the "nerrors" variable in bulk
builds, but this variable is not used further anyway.
2007-12-01 11:11:53 +00:00
rillig
d493e10615 If a package defines FETCH_MESSAGE, show that instead of the generic
instructions.
2007-12-01 10:56:31 +00:00
joerg
4f84d697c2 If DISTDIR points to a non-existing location and a package has neither
PATCHFILES nor DISTFILES, make fetch would complain about an unbuildable
dependency. Fix this by explicitly checking that _ALLFILES is not empty.
Reported by Sean Boudreau.
2007-09-06 20:54:53 +00:00
joerg
1024803ccc Checksum checks only make sense when distinfo is also present, so
move this into the conditional.
2007-08-14 14:19:19 +00:00
jlam
13157ce5e2 Teach mirror-distfiles to use emul-fetch if EMUL_PLATFORMS is defined so
that mirror sites will grab all of the distfiles, not just the ones that
are for the native platform.
2007-08-01 15:24:51 +00:00
obache
01b24d20c2 No need to pass "." as directory, it is default value. 2007-07-14 05:51:11 +00:00
obache
1fcc9dd138 Allow empty DIST_SUBDIR, need to fix PR 35494. 2007-07-14 05:45:35 +00:00
obache
7ca7b65ff4 Define some variables for using FETCH_CMD=wget. 2007-06-12 09:54:52 +00:00
schmonz
a35f4e9517 Silence some longstanding noise in mail/qmail, caused by the fact
that its ${DISTFILES} is also a common ${PATCHFILES}, resulting in
the file being listed twice in ${_ALLFILES}. This one-line change
removes duplicate filenames from ${_ALLFILES}, mirroring an identical
transformation to ${ALLFILES} that used to do the trick. (The fetch
code, obviously, has since changed a bit.)

What the noise looked like:

$ cd pkgsrc/mail/qmail
$ make clean PKG_OPTIONS="netqmail"
make: "/home/build/trees/pkgsrc-current/mk/fetch/fetch.mk" line 133: warning: duplicate script for target "/home/build/trees/pkgsrc-current/distfiles/netqmail-1.05.tar.gz" ignored
make: "/home/build/trees/pkgsrc-current/mk/fetch/fetch.mk" line 133: warning: using previous script for "/home/build/trees/pkgsrc-current/distfiles/netqmail-1.05.tar.gz" defined here
===> Cleaning for qmail-1.03nb12
$

Tested in a bulk build by joerg@.
2006-12-29 20:14:57 +00:00
jdolecek
ff7e8ffa0d set ORS to space for _MASTER_RAND_AWK, so that the output would be the
in the format MASTER_SORT_REGEX expects when MASTER_SORT_RANDOM is off,
in order for MASTER_SORT to actually work when MASTER_SORT_RANDOM=YES
(default nowadays)

XXX testing stuff before committing would surely be a good idea
2006-11-25 21:33:39 +00:00
mishka
0f000d2afb pkg/34695: Static list of package master sites may (and often will)
lead to overloads of very first distribution site. Moreover, if first
site in the list is not available (often seen for sourceforge mirrors)
you have to wait for timeout each time. To distribute load on master
distribution sites and to make second problem not so annoying randomly
intermix list of MASTER_SITES with MASTER_SORT_RANDOM feature. Any of
MASTER_SORT and MASTER_SORT_REGEX can be applied later.

The feature is turned ON by default and is disabled for PKG_DEVELOPERs
or if MASTER_SORT_RANDOM=no.
2006-10-08 11:37:38 +00:00
rillig
ae06ae6696 Meta-packages that had DIST_SUBDIR set (for whatever reason) tried to
fetch files with an empty name, for example "geda/".

The problem was that the expression ${LIST:S,^,${DIST_SUBDIR}/,} results
in ${DIST_SUBDIR}/ when ${LIST} is empty. This is surprising but matches
the documentation in the manual page, so this cannot be called a bug.

The proper fix is to use ${LIST:@f@${DIST_SUBDIR}/${f}@} instead.

Noticed by Don Woodstock on #netbsd-code.
2006-10-07 12:22:06 +00:00
jlam
ccdf6dbe01 Rename "SITES_* to "SITES.*" for file-specific lists of sites from which
to fetch the file.  This completes the renaming described in revision
1.1799 of bsd.pkg.mk.
2006-07-27 18:48:02 +00:00
jlam
817fd9ec0d All of the other *SITES* variables are plural, so rename DYNAMIC_SITE_*
to DYNAMIC_SITES_* for consistency.
2006-07-27 16:06:27 +00:00