svn commit: r528327 - in head/sysutils/py-diffoscope: . files
Kubilay Kocak
koobs at FreeBSD.org
Fri Mar 13 04:46:15 UTC 2020
Author: koobs
Date: Fri Mar 13 04:46:13 2020
New Revision: 528327
URL: https://svnweb.freebsd.org/changeset/ports/528327
Log:
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
Added:
head/sysutils/py-diffoscope/files/
head/sysutils/py-diffoscope/files/patch-diffoscope_comparators_zip.py (contents, props changed)
Modified:
head/sysutils/py-diffoscope/Makefile
Modified: head/sysutils/py-diffoscope/Makefile
==============================================================================
--- head/sysutils/py-diffoscope/Makefile Fri Mar 13 04:32:30 2020 (r528326)
+++ head/sysutils/py-diffoscope/Makefile Fri Mar 13 04:46:13 2020 (r528327)
@@ -3,6 +3,7 @@
PORTNAME= diffoscope
PORTVERSION= 136
+PORTREVISION= 1
CATEGORIES= sysutils python
MASTER_SITES= CHEESESHOP
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
Added: head/sysutils/py-diffoscope/files/patch-diffoscope_comparators_zip.py
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/sysutils/py-diffoscope/files/patch-diffoscope_comparators_zip.py Fri Mar 13 04:46:13 2020 (r528327)
@@ -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
More information about the svn-ports-all
mailing list