tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Improve support for master sites using HTTPS


currently the default program used for downloading files from the master
sites is "ftp" (also know as "tnftp"). Unfortunately the versions in
"pkgsrc" and all existing NetBSD releases(*) don't support HTTPS. The
attached patch therefore changes the default to "fetch" or "curl" (which
both supports HTTPS) on platforms that provide these programs. This should
improve the situation under CygWin, FreeBSD, Linux, Mac OS X, Minix and
Solaris in the short term.

In the long term we need to figure out a way to bootstrap an HTTP/FTP client
which supports HTTPS in "pkgsrc". But this is outside the scope of
this patch.

        Kind regards

(*) "ftp" in NetBSD 6.2 and 7.0 will support HTTPS.

Matthias Scheler                        
Index: mk/
RCS file: /cvsroot/pkgsrc/mk/,v
retrieving revision 1.338
diff -u -r1.338
--- mk/     12 Sep 2013 11:01:47 -0000      1.338
+++ mk/     17 Dec 2013 19:11:04 -0000
@@ -673,6 +673,16 @@
 .include "${_PKGSRC_TOPDIR}/mk/tools/"
+.if ${FETCH_USING} == "auto"
+.  if defined(TOOLS_PLATFORM.fetch)
+FETCH_USING=   fetch
+.  elif defined(TOOLS_PLATFORM.curl)
+FETCH_USING=   curl
+.  else
+.  endif
 .if !defined(_PKGSRCDIR)
 _PKGSRCDIR!=           cd ${_PKGSRC_TOPDIR} && ${PWD_CMD}
Index: mk/defaults/mk.conf
RCS file: /cvsroot/pkgsrc/mk/defaults/mk.conf,v
retrieving revision 1.227
diff -u -r1.227 mk.conf
--- mk/defaults/mk.conf 16 Dec 2013 05:47:43 -0000      1.227
+++ mk/defaults/mk.conf 17 Dec 2013 19:11:04 -0000
@@ -351,11 +351,7 @@
 # This is the default view to which packages are added after installation.
 # Default: "" (the empty view)
-.if ${OPSYS} == "FreeBSD"
-FETCH_USING?=  fetch
+FETCH_USING?=  auto
 # The program type to fetch files.
 # "manual" will explicitly fail if the DISTFILES don't exist locally.
 # "custom" requires setting FETCH_CMD, FETCH_BEFORE_ARGS, FETCH_AFTER_ARGS,
@@ -363,7 +359,7 @@
 # The default value can be overriden by a package before including
 # and by the user in mk.conf.
-# Possible: curl, custom, fetch, ftp, manual, wget
+# Possible: auto, curl, custom, fetch, ftp, manual, wget
 # Make pkgtools/posix_headers an automatic build dependency for all 
Index: doc/guide/files/faq.xml
RCS file: /cvsroot/pkgsrc/doc/guide/files/faq.xml,v
retrieving revision 1.48
diff -u -r1.48 faq.xml
--- doc/guide/files/faq.xml     31 Jul 2011 08:48:22 -0000      1.48
+++ doc/guide/files/faq.xml     17 Dec 2013 19:11:04 -0000
@@ -272,7 +272,7 @@
 distfile is found, pkgsrc will try to resume it.</para>
 <para>You can also
-use a different program than the default &man.ftp.1; by changing the
+use a different program than the platform default program by changing the
 <varname>FETCH_USING</varname> variable.  You can specify the program by
 using of ftp, fetch, wget or curl.  Alternatively, fetching can be disabled
 by using the value manual.  A value of custom disables the system defaults

Home | Main Index | Thread Index | Old Index