aboutsummaryrefslogtreecommitdiff
path: root/sysutils/py-diffoscope
diff options
context:
space:
mode:
authorKubilay Kocak <koobs@FreeBSD.org>2020-03-13 04:46:13 +0000
committerKubilay Kocak <koobs@FreeBSD.org>2020-03-13 04:46:13 +0000
commit3bc03c5e1d3caf84cc75dc27b55d3cdd32517416 (patch)
treee869923555940479e17b436c4e3e8ebf4fcff696 /sysutils/py-diffoscope
parente892248313a0643966fd444636e44cbabe078e56 (diff)
downloadports-3bc03c5e1d3caf84cc75dc27b55d3cdd32517416.tar.gz
ports-3bc03c5e1d3caf84cc75dc27b55d3cdd32517416.zip
sysutils/py-diffoscope: Restore portability of zipinfo call
/dev/stdin is a non-portable non-POSIX extension having different semantics on different operating systems. zininfo(1) exits with 9 when /dev/stdin is supplied on FreeBSD. In fact, unzip(1) explicitly documents that it does not support reading from stdin. [1] https://lists.reproducible-builds.org/pipermail/diffoscope/2020-March/002632.html PR: 244750 Submitted by: Michael Osipov <michael.osipov siemens com> MFH: 2020Q1
Notes
Notes: svn path=/head/; revision=528327
Diffstat (limited to 'sysutils/py-diffoscope')
-rw-r--r--sysutils/py-diffoscope/Makefile1
-rw-r--r--sysutils/py-diffoscope/files/patch-diffoscope_comparators_zip.py28
2 files changed, 29 insertions, 0 deletions
diff --git a/sysutils/py-diffoscope/Makefile b/sysutils/py-diffoscope/Makefile
index 30fac6f8929d..68ff416d30a9 100644
--- a/sysutils/py-diffoscope/Makefile
+++ b/sysutils/py-diffoscope/Makefile
@@ -3,6 +3,7 @@
PORTNAME= diffoscope
PORTVERSION= 136
+PORTREVISION= 1
CATEGORIES= sysutils python
MASTER_SITES= CHEESESHOP
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
diff --git a/sysutils/py-diffoscope/files/patch-diffoscope_comparators_zip.py b/sysutils/py-diffoscope/files/patch-diffoscope_comparators_zip.py
new file mode 100644
index 000000000000..879ec7f9789c
--- /dev/null
+++ b/sysutils/py-diffoscope/files/patch-diffoscope_comparators_zip.py
@@ -0,0 +1,28 @@
+# Non-portable regression caused by 25fee28c/#879011
+# https://lists.reproducible-builds.org/pipermail/diffoscope/2020-March/002632.html
+# TODO: Upstream
+
+--- diffoscope/comparators/zip.py.orig 2020-03-12 13:23:59 UTC
++++ diffoscope/comparators/zip.py
+@@ -38,10 +38,7 @@ from .utils.command import Command
+ class Zipinfo(Command):
+ @tool_required('zipinfo')
+ def cmdline(self):
+- # zipinfo (without -v) puts warning messages (some of which contain
+- # $path) into stdin when stderr is not a tty, see #879011 for details.
+- # to work around it, we run it on /dev/stdin instead, seems to work ok.
+- return ['zipinfo', '/dev/stdin']
++ return ['zipinfo', self.path]
+
+ @property
+ def returncode(self):
+@@ -54,9 +51,6 @@ class Zipinfo(Command):
+ returncode = 0
+
+ return returncode
+-
+- def stdin(self):
+- return open(self.path, 'rb')
+
+ def filter(self, line):
+ # we don't care about the archive file path