commit:     9ea57f3f0febdefdbe0ae810169ed485b165808b
Author:     Alexis Ballier <aballier <AT> gentoo <DOT> org>
AuthorDate: Sat Apr 30 16:02:11 2016 +0000
Commit:     Alexis Ballier <aballier <AT> gentoo <DOT> org>
CommitDate: Sat Apr 30 16:02:11 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9ea57f3f

dev-ml/opam: apply debian patch, backported from upstream, to check certicates 
when downloading. Bug #580586

Package-Manager: portage-2.2.28
Signed-off-by: Alexis Ballier <aballier <AT> gentoo.org>

 dev-ml/opam/files/no-insecure.patch                | 25 ++++++++++++++++++++++
 .../{opam-1.2.2.ebuild => opam-1.2.2-r1.ebuild}    |  4 +++-
 2 files changed, 28 insertions(+), 1 deletion(-)

diff --git a/dev-ml/opam/files/no-insecure.patch 
b/dev-ml/opam/files/no-insecure.patch
new file mode 100644
index 0000000..aebd5b2
--- /dev/null
+++ b/dev-ml/opam/files/no-insecure.patch
@@ -0,0 +1,25 @@
+Description: remove insecure / no-check-certificate flags (see mail on 
opam-devel, #55 #2006)
+Author: Hannes Mehnert <[email protected]>
+Applied-Upstream: 3d43295df3bb9e67e60801d319bf82c2c8a84d24
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- a/src/core/opamSystem.ml
++++ b/src/core/opamSystem.ml
+@@ -694,7 +694,7 @@
+   let retry = string_of_int OpamGlobals.download_retry in
+   let wget ~compress:_ ?checksum:_ dir src =
+     let wget_args = [
+-      "--content-disposition"; "--no-check-certificate";
++      "--content-disposition";
+       "-t"; retry;
+       src
+     ] in
+@@ -704,7 +704,7 @@
+   in
+   let curl command ~compress ?checksum:_ dir src =
+     let curl_args = [
+-      "--write-out"; "%{http_code}\\n"; "--insecure";
++      "--write-out"; "%{http_code}\\n";
+       "--retry"; retry; "--retry-delay"; "2";
+     ] @ (if compress then ["--compressed"] else []) @ [
+         "-OL"; src

diff --git a/dev-ml/opam/opam-1.2.2.ebuild b/dev-ml/opam/opam-1.2.2-r1.ebuild
similarity index 91%
rename from dev-ml/opam/opam-1.2.2.ebuild
rename to dev-ml/opam/opam-1.2.2-r1.ebuild
index d0e1cc3..2b94b7e 100644
--- a/dev-ml/opam/opam-1.2.2.ebuild
+++ b/dev-ml/opam/opam-1.2.2-r1.ebuild
@@ -36,7 +36,9 @@ RDEPEND="${DEPEND}
 "
 
 src_prepare() {
-       epatch "${FILESDIR}/0001-Port-to-Dose3-4.0.1.patch"
+       epatch \
+               "${FILESDIR}/0001-Port-to-Dose3-4.0.1.patch" \
+               "${FILESDIR}/no-insecure.patch"
 }
 
 src_compile() {

Reply via email to