svn commit: r416541 - in head/ports-mgmt/pkg: . files
Baptiste Daroussin
bapt at FreeBSD.org
Wed Jun 8 14:04:52 UTC 2016
Author: bapt
Date: Wed Jun 8 14:04:50 2016
New Revision: 416541
URL: https://svnweb.freebsd.org/changeset/ports/416541
Log:
Add a patch to fix grabbing mirror lists over https
Note that people are using mirror_type: http when they should not
most probably due to bad documentation on our side so we will improve that later
mirror_type: http is only useful if you actually host multiple mirror of your
repos see pkg-repository(5).
Added:
head/ports-mgmt/pkg/files/patch-https-mirrors (contents, props changed)
Modified:
head/ports-mgmt/pkg/Makefile
Modified: head/ports-mgmt/pkg/Makefile
==============================================================================
--- head/ports-mgmt/pkg/Makefile Wed Jun 8 13:38:09 2016 (r416540)
+++ head/ports-mgmt/pkg/Makefile Wed Jun 8 14:04:50 2016 (r416541)
@@ -2,6 +2,7 @@
PORTNAME= pkg
DISTVERSION= 1.8.4
+PORTREVISION= 1
_PKG_VERSION= ${DISTVERSION}
CATEGORIES= ports-mgmt
MASTER_SITES= \
Added: head/ports-mgmt/pkg/files/patch-https-mirrors
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/ports-mgmt/pkg/files/patch-https-mirrors Wed Jun 8 14:04:50 2016 (r416541)
@@ -0,0 +1,19 @@
+diff --git libpkg/fetch.c libpkg/fetch.c
+index 4804ad0..16ab9c7 100644
+--- libpkg/fetch.c
++++ libpkg/fetch.c
+@@ -549,8 +549,12 @@ pkg_fetch_file_to_fd(struct pkg_repo *repo, const char *url, int dest,
+ srv_current = repo->srv;
+ } else if (repo != NULL && repo->mirror_type == HTTP &&
+ strncmp(u->scheme, "http", 4) == 0) {
+- if (u->port == 0)
+- u->port = 80;
++ if (u->port == 0) {
++ if (strcmp(u->scheme, "https") == 0)
++ u->port = 443;
++ else
++ u->port = 80;
++ }
+ snprintf(zone, sizeof(zone),
+ "%s://%s:%d", u->scheme, u->host, u->port);
+ if (repo->http == NULL)
More information about the svn-ports-head
mailing list