[arch-commits] Commit in mitmproxy/repos/community-any (3 files)
Felix Yan
felixonmars at archlinux.org
Thu Mar 16 08:56:01 UTC 2017
Date: Thursday, March 16, 2017 @ 08:56:00
Author: felixonmars
Revision: 216683
archrelease: copy trunk to community-any
Added:
mitmproxy/repos/community-any/PKGBUILD
(from rev 216682, mitmproxy/trunk/PKGBUILD)
mitmproxy/repos/community-any/fix-test.patch
(from rev 216682, mitmproxy/trunk/fix-test.patch)
Deleted:
mitmproxy/repos/community-any/PKGBUILD
----------------+
PKGBUILD | 102 ++++++++++++++++++++++++++++---------------------------
fix-test.patch | 23 ++++++++++++
2 files changed, 76 insertions(+), 49 deletions(-)
Deleted: PKGBUILD
===================================================================
--- PKGBUILD 2017-03-16 08:55:23 UTC (rev 216682)
+++ PKGBUILD 2017-03-16 08:56:00 UTC (rev 216683)
@@ -1,49 +0,0 @@
-# $Id$
-# Maintainer: Felix Yan <felixonmars at archlinux.org>
-# Contributor: Simon 'ALSimon' Gilliot <simon at gilliot.fr>
-# Contributor: Olivier Biesmans <olivier at biesmans dot fr>
-
-pkgname=mitmproxy
-pkgver=2.0.0
-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-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')
-makedepends=('git')
-checkdepends=('python-beautifulsoup4' 'python-flask' 'python-pytz' 'python-pytest-runner'
- 'protobuf')
-provides=('pathod')
-conflicts=('pathod')
-replaces=('pathod')
-source=("git+https://github.com/mitmproxy/mitmproxy.git#tag=v$pkgver")
-sha256sums=('SKIP')
-
-prepare() {
- cd mitmproxy
-
- # 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
- LC_CTYPE=en_US.UTF-8 python setup.py pytest
-}
-
-package() {
- cd mitmproxy
- python setup.py install --root="$pkgdir" -O1
-}
Copied: mitmproxy/repos/community-any/PKGBUILD (from rev 216682, mitmproxy/trunk/PKGBUILD)
===================================================================
--- PKGBUILD (rev 0)
+++ PKGBUILD 2017-03-16 08:56:00 UTC (rev 216683)
@@ -0,0 +1,53 @@
+# $Id$
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
+# Contributor: Simon 'ALSimon' Gilliot <simon at gilliot.fr>
+# Contributor: Olivier Biesmans <olivier at biesmans dot fr>
+
+pkgname=mitmproxy
+pkgver=2.0.1
+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-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)
+sha256sums=('b0ccc49924762ea78290d62c463be8c041f1837f9005f583ad09c47122547e9d'
+ 'f9fc3e3732ba1867b3a0befc7c15c52ddd6b32723fc348c42c1eae546d021f1f')
+
+prepare() {
+ cd mitmproxy-$pkgver
+
+ # https://github.com/mitmproxy/mitmproxy/pull/2170
+ patch -p1 -i ../fix-test.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-any/fix-test.patch (from rev 216682, mitmproxy/trunk/fix-test.patch)
===================================================================
--- fix-test.patch (rev 0)
+++ fix-test.patch 2017-03-16 08:56:00 UTC (rev 216683)
@@ -0,0 +1,23 @@
+From b3525570929ba47c10d9d08696876c39487f7000 Mon Sep 17 00:00:00 2001
+From: Felix Yan <felixonmars at archlinux.org>
+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
More information about the arch-commits
mailing list