summaryrefslogtreecommitdiff
path: root/mk/fetch
diff options
context:
space:
mode:
authorobache <obache@pkgsrc.org>2011-02-08 02:45:18 +0000
committerobache <obache@pkgsrc.org>2011-02-08 02:45:18 +0000
commit6fa3fd2fc59483e2e301d39805029749e950bb0b (patch)
tree6f97a11580ca336321c4f44d614c81227c7f93a3 /mk/fetch
parentc0bc962879027b3d3949bece0e37351e479d9533 (diff)
downloadpkgsrc-6fa3fd2fc59483e2e301d39805029749e950bb0b.tar.gz
Add FETCH_USE_IPV4_ONLY option to force connecting to only IPv4 addresses.
Diffstat (limited to 'mk/fetch')
-rw-r--r--mk/fetch/fetch.mk17
1 files changed, 12 insertions, 5 deletions
diff --git a/mk/fetch/fetch.mk b/mk/fetch/fetch.mk
index 30574acc5ff..f2a0c4eb881 100644
--- a/mk/fetch/fetch.mk
+++ b/mk/fetch/fetch.mk
@@ -1,4 +1,4 @@
-# $NetBSD: fetch.mk,v 1.48 2011/02/08 02:40:57 obache Exp $
+# $NetBSD: fetch.mk,v 1.49 2011/02/08 02:45:18 obache Exp $
_MASTER_SITE_BACKUP= ${MASTER_SITE_BACKUP:=${DIST_SUBDIR}${DIST_SUBDIR:D/}}
_MASTER_SITE_OVERRIDE= ${MASTER_SITE_OVERRIDE:=${DIST_SUBDIR}${DIST_SUBDIR:D/}}
@@ -192,23 +192,29 @@ fetch-check-interactive: .USEBEFORE
# connections after the given amount of seconds.
# The specific behavior depends on the command used.
#
+# FETCH_USE_IPV4_ONLY, if defined, will cause the fetch command to force
+# connecting to only IPv4 addresses.
+#
# If this host is behind a filtering firewall, use passive ftp(1)
_FETCH_BEFORE_ARGS.ftp= ${PASSIVE_FETCH:D-p} \
- ${FETCH_TIMEOUT:D-q ${FETCH_TIMEOUT}}
+ ${FETCH_TIMEOUT:D-q ${FETCH_TIMEOUT}} \
+ ${FETCH_USE_IPV4_ONLY:D-4}
_FETCH_AFTER_ARGS.ftp= # empty
_FETCH_RESUME_ARGS.ftp= -R
_FETCH_OUTPUT_ARGS.ftp= -o
_FETCH_CMD.ftp= ${TOOLS_PATH.ftp}
-_FETCH_BEFORE_ARGS.fetch= ${FETCH_TIMEOUT:D-T ${FETCH_TIMEOUT}}
+_FETCH_BEFORE_ARGS.fetch= ${FETCH_TIMEOUT:D-T ${FETCH_TIMEOUT}} \
+ ${FETCH_USE_IPV4_ONLY:D-4}
_FETCH_AFTER_ARGS.fetch= # empty
_FETCH_RESUME_ARGS.fetch= -r
_FETCH_OUTPUT_ARGS.fetch= -o
_FETCH_CMD.fetch= ${TOOLS_PATH.fetch}
_FETCH_BEFORE_ARGS.wget= ${PASSIVE_FETCH:D--passive-ftp} \
- ${FETCH_TIMEOUT:D--timeout=${FETCH_TIMEOUT}}
+ ${FETCH_TIMEOUT:D--timeout=${FETCH_TIMEOUT}} \
+ ${FETCH_USE_IPV4_ONLY:D--inet4-only}
_FETCH_AFTER_ARGS.wget= # empty
_FETCH_RESUME_ARGS.wget= -c
_FETCH_OUTPUT_ARGS.wget= -O
@@ -217,7 +223,8 @@ _FETCH_CMD.wget= ${PREFIX}/bin/wget
_FETCH_BEFORE_ARGS.curl= ${PASSIVE_FETCH:D--ftp-pasv} \
--fail --location \
${FETCH_TIMEOUT:D--connect-timeout ${FETCH_TIMEOUT}} \
- ${FETCH_TIMEOUT:D--speed-time ${FETCH_TIMEOUT}}
+ ${FETCH_TIMEOUT:D--speed-time ${FETCH_TIMEOUT}} \
+ ${FETCH_USE_IPV4_ONLY:D--ipv4}
_FETCH_AFTER_ARGS.curl= -O # must be here to honor -o option
_FETCH_RESUME_ARGS.curl= -C -
_FETCH_OUTPUT_ARGS.curl= -o