[arch-commits] Commit in mitmproxy/repos (5 files)

2018-08-10 Thread Felix Yan via arch-commits
Date: Saturday, August 11, 2018 @ 04:08:39
  Author: felixonmars
Revision: 370990

archrelease: copy trunk to community-testing-any

Added:
  mitmproxy/repos/community-testing-any/
  mitmproxy/repos/community-testing-any/PKGBUILD
(from rev 370988, mitmproxy/trunk/PKGBUILD)
  mitmproxy/repos/community-testing-any/fix-test.patch
(from rev 370988, mitmproxy/trunk/fix-test.patch)
  mitmproxy/repos/community-testing-any/h2-3.0.patch
(from rev 370988, mitmproxy/trunk/h2-3.0.patch)
  mitmproxy/repos/community-testing-any/kaitai-0.7.patch
(from rev 370989, mitmproxy/trunk/kaitai-0.7.patch)

--+
 PKGBUILD |   51 ++
 fix-test.patch   |   23 +++
 h2-3.0.patch |   81 ++
 kaitai-0.7.patch |  406 +
 4 files changed, 561 insertions(+)

Copied: mitmproxy/repos/community-testing-any/PKGBUILD (from rev 370988, 
mitmproxy/trunk/PKGBUILD)
===
--- community-testing-any/PKGBUILD  (rev 0)
+++ community-testing-any/PKGBUILD  2018-08-11 04:08:39 UTC (rev 370990)
@@ -0,0 +1,51 @@
+# $Id$
+# Maintainer: Felix Yan 
+# Contributor: Simon 'ALSimon' Gilliot 
+# Contributor: Olivier Biesmans 
+
+pkgname=mitmproxy
+pkgver=4.0.4
+pkgrel=1
+pkgdesc="SSL-capable man-in-the-middle HTTP proxy"
+arch=('any')
+url="https://mitmproxy.org/";
+license=('GPL')
+depends=('python-blinker' 'python-brotlipy' 'python-click' 
'python-cryptography' 'python-h2'
+ 'python-hyperframe' 'python-kaitaistruct' 'python-ldap3' 
'python-passlib' 'python-protobuf'
+ 'python-pyasn1' 'python-pyopenssl' 'python-pyparsing' 
'python-pyperclip'
+ 'python-ruamel-yaml' 'python-setuptools' 'python-sortedcontainers' 
'python-tornado'
+ 'python-urwid' 'python-wsproto')
+checkdepends=('python-asynctest' 'python-flask' 'python-parver' 
'python-pytest-runner'
+  'python-pytest-asyncio' 'python-requests')
+provides=('pathod')
+conflicts=('pathod')
+replaces=('pathod')
+source=("$pkgname-$pkgver.tar.gz::https://github.com/mitmproxy/mitmproxy/archive/v$pkgver.tar.gz";)
+sha512sums=('e08ea8b1c75a95b822c463625509037bbc8a979161cacaa1f0185f98df8d6d7e5400925365dbbe70d18751251b1005824f739a8cd035c0389f7b4aea562adfb3')
+
+prepare() {
+  cd mitmproxy-$pkgver
+
+  # Let's remove all the upper bounds and use system certificate store
+  sed -e '/certifi/d' \
+  -e 's/, *<[0-9=.]*//' \
+  -i setup.py
+  sed -e '/import certifi/d' \
+  -e 's|certifi.where()|"/etc/ssl/certs/ca-certificates.crt"|' \
+  -i mitmproxy/net/tls.py
+}
+
+build() {
+  cd mitmproxy-$pkgver
+  python setup.py build
+}
+
+check() {
+  cd mitmproxy-$pkgver
+  python setup.py pytest || warning 
"https://github.com/mitmproxy/mitmproxy/issues/3287";
+}
+
+package() {
+  cd mitmproxy-$pkgver
+  python setup.py install --root="$pkgdir" -O1
+}

Copied: mitmproxy/repos/community-testing-any/fix-test.patch (from rev 370988, 
mitmproxy/trunk/fix-test.patch)
===
--- community-testing-any/fix-test.patch(rev 0)
+++ community-testing-any/fix-test.patch2018-08-11 04:08:39 UTC (rev 
370990)
@@ -0,0 +1,23 @@
+From b3525570929ba47c10d9d08696876c39487f7000 Mon Sep 17 00:00:00 2001
+From: Felix Yan 
+Date: Thu, 16 Mar 2017 16:48:21 +0800
+Subject: [PATCH] Fix test_format_xml with dot in path
+
+When the path contains dot ".", replacing all dots will generate a non-exist 
result and raises a FileNotFoundError. Replacing only the last dot fixes this.
+---
+ test/mitmproxy/contentviews/test_xml_html.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/test/mitmproxy/contentviews/test_xml_html.py 
b/test/mitmproxy/contentviews/test_xml_html.py
+index 899ecfd..2b0aee4 100644
+--- a/test/mitmproxy/contentviews/test_xml_html.py
 b/test/mitmproxy/contentviews/test_xml_html.py
+@@ -23,7 +23,7 @@ def test_format_xml(filename):
+ path = data.path(filename)
+ with open(path) as f:
+ input = f.read()
+-with open(path.replace(".", "-formatted.")) as f:
++with open("-formatted.".join(path.rsplit(".", 1))) as f:
+ expected = f.read()
+ tokens = xml_html.tokenize(input)
+ assert xml_html.format_xml(tokens) == expected

Copied: mitmproxy/repos/community-testing-any/h2-3.0.patch (from rev 370988, 
mitmproxy/trunk/h2-3.0.patch)
===
--- community-testing-any/h2-3.0.patch  (rev 0)
+++ community-testing-any/h2-3.0.patch  2018-08-11 04:08:39 UTC (rev 370990)
@@ -0,0 +1,81 @@
+From ef9f0e22ea31745a91a131c193051d8df7a9eccf Mon Sep 17 00:00:00 2001
+From: Thomas Kriechbaumer 
+Date: Fri, 24 Mar 2017 19:24:28 +0100
+Subject: [PATCH] bump h2
+
+---
+ mitmproxy/proxy/protocol/http2.py   |  6 +++---
+ setup.py|  4 ++-

[arch-commits] Commit in mitmproxy/repos (5 files)

2018-04-20 Thread Felix Yan via arch-commits
Date: Saturday, April 21, 2018 @ 04:29:30
  Author: felixonmars
Revision: 317240

archrelease: copy trunk to community-staging-any

Added:
  mitmproxy/repos/community-staging-any/
  mitmproxy/repos/community-staging-any/PKGBUILD
(from rev 317239, mitmproxy/trunk/PKGBUILD)
  mitmproxy/repos/community-staging-any/fix-test.patch
(from rev 317239, mitmproxy/trunk/fix-test.patch)
  mitmproxy/repos/community-staging-any/h2-3.0.patch
(from rev 317239, mitmproxy/trunk/h2-3.0.patch)
  mitmproxy/repos/community-staging-any/kaitai-0.7.patch
(from rev 317239, mitmproxy/trunk/kaitai-0.7.patch)

--+
 PKGBUILD |   46 ++
 fix-test.patch   |   23 +++
 h2-3.0.patch |   81 ++
 kaitai-0.7.patch |  406 +
 4 files changed, 556 insertions(+)

Copied: mitmproxy/repos/community-staging-any/PKGBUILD (from rev 317239, 
mitmproxy/trunk/PKGBUILD)
===
--- community-staging-any/PKGBUILD  (rev 0)
+++ community-staging-any/PKGBUILD  2018-04-21 04:29:30 UTC (rev 317240)
@@ -0,0 +1,46 @@
+# $Id$
+# Maintainer: Felix Yan 
+# Contributor: Simon 'ALSimon' Gilliot 
+# Contributor: Olivier Biesmans 
+
+pkgname=mitmproxy
+pkgver=3.0.4
+pkgrel=1
+pkgdesc="SSL-capable man-in-the-middle HTTP proxy"
+arch=('any')
+url="http://mitmproxy.org/";
+license=('GPL')
+depends=('python-blinker' 'python-brotlipy' 'python-click' 
'python-cryptography' 'python-h11'
+ 'python-h2' 'python-hyperframe' 'python-kaitaistruct' 'python-ldap3' 
'python-passlib'
+ 'python-pyasn1' 'python-pyopenssl' 'python-pyparsing' 
'python-pyperclip' 'python-requests'
+ 'python-ruamel-yaml' 'python-setuptools' 'python-sortedcontainers' 
'python-tornado'
+ 'python-urwid' 'python-wsproto')
+checkdepends=('python-beautifulsoup4' 'python-flask' 'python-pytest-runner')
+provides=('pathod')
+conflicts=('pathod')
+replaces=('pathod')
+source=("$pkgname-$pkgver.tar.gz::https://github.com/mitmproxy/mitmproxy/archive/v$pkgver.tar.gz";)
+sha512sums=('a89b0bee6997ce51d23483101755dae9f5300339d65e4975679df5c6b60ff9af94e655651321cd8e831666a04ec5cc24c7af647f3aab913524b6755b47f1f57b')
+
+prepare() {
+  cd mitmproxy-$pkgver
+
+  # Let's remove all the upper bounds and use system certificate store
+  sed -e '/certifi/d' \
+  -e 's/, *<[0-9=.]*//' \
+  -i setup.py
+  sed -e '/import certifi/d' \
+  -e 's|certifi.where()|"/etc/ssl/certs/ca-certificates.crt"|' \
+  -i mitmproxy/net/tls.py
+}
+
+check() {
+  cd mitmproxy-$pkgver
+  # https://github.com/mitmproxy/mitmproxy/issues/2892
+  python setup.py pytest
+}
+
+package() {
+  cd mitmproxy-$pkgver
+  python setup.py install --root="$pkgdir" -O1
+}

Copied: mitmproxy/repos/community-staging-any/fix-test.patch (from rev 317239, 
mitmproxy/trunk/fix-test.patch)
===
--- community-staging-any/fix-test.patch(rev 0)
+++ community-staging-any/fix-test.patch2018-04-21 04:29:30 UTC (rev 
317240)
@@ -0,0 +1,23 @@
+From b3525570929ba47c10d9d08696876c39487f7000 Mon Sep 17 00:00:00 2001
+From: Felix Yan 
+Date: Thu, 16 Mar 2017 16:48:21 +0800
+Subject: [PATCH] Fix test_format_xml with dot in path
+
+When the path contains dot ".", replacing all dots will generate a non-exist 
result and raises a FileNotFoundError. Replacing only the last dot fixes this.
+---
+ test/mitmproxy/contentviews/test_xml_html.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/test/mitmproxy/contentviews/test_xml_html.py 
b/test/mitmproxy/contentviews/test_xml_html.py
+index 899ecfd..2b0aee4 100644
+--- a/test/mitmproxy/contentviews/test_xml_html.py
 b/test/mitmproxy/contentviews/test_xml_html.py
+@@ -23,7 +23,7 @@ def test_format_xml(filename):
+ path = data.path(filename)
+ with open(path) as f:
+ input = f.read()
+-with open(path.replace(".", "-formatted.")) as f:
++with open("-formatted.".join(path.rsplit(".", 1))) as f:
+ expected = f.read()
+ tokens = xml_html.tokenize(input)
+ assert xml_html.format_xml(tokens) == expected

Copied: mitmproxy/repos/community-staging-any/h2-3.0.patch (from rev 317239, 
mitmproxy/trunk/h2-3.0.patch)
===
--- community-staging-any/h2-3.0.patch  (rev 0)
+++ community-staging-any/h2-3.0.patch  2018-04-21 04:29:30 UTC (rev 317240)
@@ -0,0 +1,81 @@
+From ef9f0e22ea31745a91a131c193051d8df7a9eccf Mon Sep 17 00:00:00 2001
+From: Thomas Kriechbaumer 
+Date: Fri, 24 Mar 2017 19:24:28 +0100
+Subject: [PATCH] bump h2
+
+---
+ mitmproxy/proxy/protocol/http2.py   |  6 +++---
+ setup.py|  4 ++--
+ test/mitmproxy/proxy/protocol/test_http2.py | 14 +++---
+ 3 files changed, 16 insertions(+), 8 deletions(-)
+
+diff --git

[arch-commits] Commit in mitmproxy/repos (5 files)

2017-07-25 Thread Felix Yan
Date: Tuesday, July 25, 2017 @ 08:09:49
  Author: felixonmars
Revision: 246323

archrelease: copy trunk to community-testing-any

Added:
  mitmproxy/repos/community-testing-any/
  mitmproxy/repos/community-testing-any/PKGBUILD
(from rev 246322, mitmproxy/trunk/PKGBUILD)
  mitmproxy/repos/community-testing-any/fix-test.patch
(from rev 246322, mitmproxy/trunk/fix-test.patch)
  mitmproxy/repos/community-testing-any/h2-3.0.patch
(from rev 246322, mitmproxy/trunk/h2-3.0.patch)
  mitmproxy/repos/community-testing-any/kaitai-0.7.patch
(from rev 246322, mitmproxy/trunk/kaitai-0.7.patch)

--+
 PKGBUILD |   59 +++
 fix-test.patch   |   23 +++
 h2-3.0.patch |   81 ++
 kaitai-0.7.patch |  406 +
 4 files changed, 569 insertions(+)

Copied: mitmproxy/repos/community-testing-any/PKGBUILD (from rev 246322, 
mitmproxy/trunk/PKGBUILD)
===
--- community-testing-any/PKGBUILD  (rev 0)
+++ community-testing-any/PKGBUILD  2017-07-25 08:09:49 UTC (rev 246323)
@@ -0,0 +1,59 @@
+# $Id$
+# Maintainer: Felix Yan 
+# Contributor: Simon 'ALSimon' Gilliot 
+# Contributor: Olivier Biesmans 
+
+pkgname=mitmproxy
+pkgver=2.0.2
+pkgrel=2
+pkgdesc="SSL-capable man-in-the-middle HTTP proxy"
+arch=('any')
+url="http://mitmproxy.org/";
+license=('GPL')
+depends=('python-blinker' 'python-brotlipy' 'python-click' 'python-construct' 
'python-cryptography'
+ 'python-cssutils' 'python-h2' 'python-html2text' 'python-hyperframe' 
'python-jsbeautifier'
+ 'python-kaitaistruct' 'python-passlib' 'python-pyasn1' 
'python-pyopenssl'
+ 'python-pyparsing' 'python-pyperclip' 'python-requests' 
'python-ruamel-yaml'
+ 'python-setuptools' 'python-sortedcontainers' 'python-tornado' 
'python-urwid'
+ 'python-watchdog')
+optdepends=('protobuf: Contentviews - Extended content decoding')
+checkdepends=('python-beautifulsoup4' 'python-flask' 'python-pytz' 
'python-pytest-runner'
+  'protobuf')
+provides=('pathod')
+conflicts=('pathod')
+replaces=('pathod')
+source=("$pkgname-$pkgver.tar.gz::https://github.com/mitmproxy/mitmproxy/archive/v$pkgver.tar.gz";
+fix-test.patch kaitai-0.7.patch h2-3.0.patch)
+sha512sums=('8a38340b3b1dd73c99c9e9b06a59bff78a23b2a851e1032ee0b7354ac46c834a3d005a67dc5238030570719eb5f842cb2a8ce64ffc7c5a01cbfa9a9511c08e66'
+
'7cd8f430779df708e0a923bba43c29fcd94b1dc4e40b2cd7a5f878475911e12917e1cb130ffabc2d1f4a1dfe9883dfe6d9c2ff9cdcd5210a8a0480830d33b5a6'
+
'a0fa449ddec32478123966845863f11e9dc3589e08be21e8fa6f5b89765a01fb03de689b84c82d5d44f84ad72ba7766587273fb4413a09950f06e388d57fb45d'
+
'859147363b1686a042923c5df8481c7078327e9e3715993ce81b68b63002f8a8bd071a17ca080268c7a0d8211b1a2bbb64a8e78250778693b1fcb6a558d3ec46')
+
+prepare() {
+  cd mitmproxy-$pkgver
+
+  # https://github.com/mitmproxy/mitmproxy/pull/2170
+  patch -p1 -i ../fix-test.patch
+
+  patch -p1 -i ../kaitai-0.7.patch
+
+  patch -p1 -i ../h2-3.0.patch
+
+  # Let's remove all the upper bounds and use system certificate store
+  sed -e '/certifi/d' \
+  -e 's/, *<[0-9=.]*//' \
+  -i setup.py
+  sed -e '/import certifi/d' \
+  -e 's|certifi.where()|"/etc/ssl/certs/ca-certificates.crt"|' \
+  -i mitmproxy/net/tcp.py
+}
+
+check() {
+  cd mitmproxy-$pkgver
+  LC_CTYPE=en_US.UTF-8 python setup.py pytest
+}
+
+package() {
+  cd mitmproxy-$pkgver
+  python setup.py install --root="$pkgdir" -O1
+}

Copied: mitmproxy/repos/community-testing-any/fix-test.patch (from rev 246322, 
mitmproxy/trunk/fix-test.patch)
===
--- community-testing-any/fix-test.patch(rev 0)
+++ community-testing-any/fix-test.patch2017-07-25 08:09:49 UTC (rev 
246323)
@@ -0,0 +1,23 @@
+From b3525570929ba47c10d9d08696876c39487f7000 Mon Sep 17 00:00:00 2001
+From: Felix Yan 
+Date: Thu, 16 Mar 2017 16:48:21 +0800
+Subject: [PATCH] Fix test_format_xml with dot in path
+
+When the path contains dot ".", replacing all dots will generate a non-exist 
result and raises a FileNotFoundError. Replacing only the last dot fixes this.
+---
+ test/mitmproxy/contentviews/test_xml_html.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/test/mitmproxy/contentviews/test_xml_html.py 
b/test/mitmproxy/contentviews/test_xml_html.py
+index 899ecfd..2b0aee4 100644
+--- a/test/mitmproxy/contentviews/test_xml_html.py
 b/test/mitmproxy/contentviews/test_xml_html.py
+@@ -23,7 +23,7 @@ def test_format_xml(filename):
+ path = data.path(filename)
+ with open(path) as f:
+ input = f.read()
+-with open(path.replace(".", "-formatted.")) as f:
++with open("-formatted.".join(path.rsplit(".", 1))) as f:
+ expected = f.read()
+ tokens = xml_html.tokenize(input)
+ assert xml_html.format