[arch-commits] Commit in diffoscope/repos/community-x86_64 (3 files)

Jelle van der Waa jelle at archlinux.org
Wed Feb 17 15:41:55 UTC 2021


    Date: Wednesday, February 17, 2021 @ 15:41:54
  Author: jelle
Revision: 862553

archrelease: copy trunk to community-x86_64

Added:
  diffoscope/repos/community-x86_64/PKGBUILD
    (from rev 862552, diffoscope/trunk/PKGBUILD)
  diffoscope/repos/community-x86_64/c72c30f29ea3760eb4c785644dc7cd4c26833740.patch
    (from rev 862552, diffoscope/trunk/c72c30f29ea3760eb4c785644dc7cd4c26833740.patch)
Deleted:
  diffoscope/repos/community-x86_64/PKGBUILD

------------------------------------------------+
 PKGBUILD                                       |  204 +++++++++++------------
 c72c30f29ea3760eb4c785644dc7cd4c26833740.patch |   70 +++++++
 2 files changed, 174 insertions(+), 100 deletions(-)

Deleted: PKGBUILD
===================================================================
--- PKGBUILD	2021-02-17 15:41:48 UTC (rev 862552)
+++ PKGBUILD	2021-02-17 15:41:54 UTC (rev 862553)
@@ -1,100 +0,0 @@
-# Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
-
-pkgname=diffoscope
-pkgver=165
-pkgrel=1
-pkgdesc='Tool for in-depth comparison of files, archives, and directories'
-url='https://diffoscope.org/'
-arch=('x86_64')
-license=('GPL3')
-depends=('python-magic' 'python-libarchive-c' 'python-setuptools' 'python-distro' 'python-defusedxml'
-         'python-tlsh')
-optdepends=(
-  'acl: access control list utilities support'
-  'binutils: binary utilities support'
-  'binwalk: binwalk support'
-  'bzip2: bzip2 utilities support'
-  'cdrtools: ISO utilities support'
-  'colord: ICC profiles support'
-  'cpio: cpio archive support'
-  'diffutils: diff utilities support'
-  'docx2txt: docx comparing support'
-  'dtc: device tree comparing support'
-  'e2fsprogs: Ext2/3/4 filesystem utilities support'
-  'enjarify: Android dex file support'
-  'hdf5: Hierarchical Data Format support'
-  'imagemagick: ImageMagick identify support'
-  'fpc: Free Pascal utilities support'
-  'java-environment: java utilities support'
-  'libcaca: image compare support'
-  'llvm: LLVM bitcode files support'
-  'lz4: lz4 compression support'
-  'odt2txt: odt comparing support'
-  'fontforge: bitmap font utilities support'
-  'gettext: GNU internationalization utilities support'
-  'ghc: haskell utilities support'
-  'giflib: gifbuild utilities support'
-  'gnupg: GNU privacy guard support'
-  'gnumeric: GNOME Spreadsheet support'
-  'mono: mono support'
-  'openssh: OpenSSH key comparing support'
-  'openssl: .p7c and .p7b certificates. support'
-  'poppler: PDF utilities support'
-  'r: R language support'
-  'radare2: decompiler for executables'
-  'sqlite: SQLite support'
-  'squashfs-tools: squashfs filesystem support'
-  #'python-guestfs: guestfs filesystem support'
-  'python-argcomplete: completion support'
-  'python-jsbeautifier: javascript beautifier support'
-  'python-progressbar: show progressbar support'
-  'tcpdump: pcap matching support'
-  'unzip: zip utilities support'
-  'gzip: gzip utilities support'
-  'tar: tar utilities support'
-# 'wabt: webassembly support' unittest fails
-  'xxd: xxd utilities support'
-  'xz: XZ and LZMA utilities support'
-  'zstd: zst compression'
-)
-makedepends=('help2man' 'python-docutils' 'git')
-checkdepends=(
-  'python-pytest' 'python-jsbeautifier' 'python-h5py' 'acl' 'binutils' 'bzip2' 'cdrtools' 'cpio' 'diffutils' 'e2fsprogs' 'enjarify'
-  'hdf5' 'imagemagick' 'java-environment=11' 'fontforge' 'gettext' 'ghc' 'gnupg' 'mono' 'mono-tools' 'poppler' 'sqlite' 'squashfs-tools'
-  'lz4' 'unzip' 'gzip' 'tar' 'tcpdump' 'vim' 'xz' 'llvm' 'colord' 'fpc' 'openssh' 'openssl' 'odt2txt' 'docx2txt' 'r' 'dtc' 'giflib'
-  'gnumeric' 'python-progressbar' 'binwalk' 'python-argcomplete' 'zstd')
-source=(https://diffoscope.org/archive/diffoscope-${pkgver}.tar.bz2{,.asc})
-sha512sums=('d89c05d7f66fa44f225a2cc66931d9cc3676ee2db20d4f3722b72276e7b5819a5d5d22e659893492bca6bca0fe62c094ce9c79cf9b73e505254d429b228bd941'
-            'SKIP')
-b2sums=('199d16c50364f538a537b628cec8ae02114911190fd98666b131e90bfb3686b13be910da35f6068dcb14aae137090d5e21a32141702997f74498133ad78bc56a'
-        'SKIP')
-validpgpkeys=("C2FE4BD271C139B86C533E461E953E27D4311E58") # "Chris Lamb <chris at chris-lamb.co.uk>"
-
-
-prepare() {
-  cd ${pkgname}-${pkgver}
-  sed '/python-magic/d' -i setup.py
-}
-
-build() {
-  cd ${pkgname}-${pkgver}
-  python setup.py build
-  make -C doc
-}
-
-check() {
-  cd ${pkgname}-${pkgver}
-  PYTHONPATH=".:${PYTHONPATH}" PYTHONDONTWRITEBYTECODE=1 py.test \
-    -k 'not test_ppu and not test_superblock and not test_wasm' # unsquashfs output differs from fixture.
-    # ppu bug https://salsa.debian.org/reproducible-builds/diffoscope/issues/9
-}
-
-package() {
-  cd ${pkgname}-${pkgver}
-  export PYTHONHASHSEED=0
-  python setup.py install --skip-build -O1 --root="${pkgdir}"
-  install -Dm 644 README.rst -t "${pkgdir}/usr/share/doc/${pkgname}"
-  install -Dm 644 doc/diffoscope.1 -t "${pkgdir}/usr/share/man/man1"
-}
-
-# vim: ts=2 sw=2 et:

Copied: diffoscope/repos/community-x86_64/PKGBUILD (from rev 862552, diffoscope/trunk/PKGBUILD)
===================================================================
--- PKGBUILD	                        (rev 0)
+++ PKGBUILD	2021-02-17 15:41:54 UTC (rev 862553)
@@ -0,0 +1,104 @@
+# Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
+
+pkgname=diffoscope
+pkgver=166
+pkgrel=1
+pkgdesc='Tool for in-depth comparison of files, archives, and directories'
+url='https://diffoscope.org/'
+arch=('x86_64')
+license=('GPL3')
+depends=('python-magic' 'python-libarchive-c' 'python-setuptools' 'python-distro' 'python-defusedxml'
+         'python-tlsh')
+optdepends=(
+  'acl: access control list utilities support'
+  'binutils: binary utilities support'
+  'binwalk: binwalk support'
+  'bzip2: bzip2 utilities support'
+  'cdrtools: ISO utilities support'
+  'colord: ICC profiles support'
+  'cpio: cpio archive support'
+  'diffutils: diff utilities support'
+  'docx2txt: docx comparing support'
+  'dtc: device tree comparing support'
+  'e2fsprogs: Ext2/3/4 filesystem utilities support'
+  'enjarify: Android dex file support'
+  'hdf5: Hierarchical Data Format support'
+  'imagemagick: ImageMagick identify support'
+  'fpc: Free Pascal utilities support'
+  'java-environment: java utilities support'
+  'libcaca: image compare support'
+  'llvm: LLVM bitcode files support'
+  'lz4: lz4 compression support'
+  'odt2txt: odt comparing support'
+  'fontforge: bitmap font utilities support'
+  'gettext: GNU internationalization utilities support'
+  'ghc: haskell utilities support'
+  'giflib: gifbuild utilities support'
+  'gnupg: GNU privacy guard support'
+  'gnumeric: GNOME Spreadsheet support'
+  'mono: mono support'
+  'openssh: OpenSSH key comparing support'
+  'openssl: .p7c and .p7b certificates. support'
+  'poppler: PDF utilities support'
+  'r: R language support'
+  'radare2: decompiler for executables'
+  'sqlite: SQLite support'
+  'squashfs-tools: squashfs filesystem support'
+  #'python-guestfs: guestfs filesystem support'
+  'python-argcomplete: completion support'
+  'python-jsbeautifier: javascript beautifier support'
+  'python-progressbar: show progressbar support'
+  'tcpdump: pcap matching support'
+  'unzip: zip utilities support'
+  'gzip: gzip utilities support'
+  'tar: tar utilities support'
+# 'wabt: webassembly support' unittest fails
+  'xxd: xxd utilities support'
+  'xz: XZ and LZMA utilities support'
+  'zstd: zst compression'
+)
+makedepends=('help2man' 'python-docutils' 'git')
+checkdepends=(
+  'python-pytest' 'python-jsbeautifier' 'python-h5py' 'acl' 'binutils' 'bzip2' 'cdrtools' 'cpio' 'diffutils' 'e2fsprogs' 'enjarify'
+  'hdf5' 'imagemagick' 'java-environment=11' 'fontforge' 'gettext' 'ghc' 'gnupg' 'mono' 'mono-tools' 'poppler' 'sqlite' 'squashfs-tools'
+  'lz4' 'unzip' 'gzip' 'tar' 'tcpdump' 'vim' 'xz' 'llvm' 'colord' 'fpc' 'openssh' 'openssl' 'odt2txt' 'docx2txt' 'r' 'dtc' 'giflib'
+  'gnumeric' 'python-progressbar' 'binwalk' 'python-argcomplete' 'zstd')
+source=(https://diffoscope.org/archive/diffoscope-${pkgver}.tar.bz2{,.asc} c72c30f29ea3760eb4c785644dc7cd4c26833740.patch)
+sha512sums=('db3d51e71baec7ce56e094f09d2b1feb936c36bc3ed5760fe70d27ec8e784dbf935224ddd5bbc829777b77a943d3288a2de97abd1fecc048061b5ec129ec798d'
+            'SKIP'
+            '9d7d81fbad05a921456c09d527e062e933cdf3e4815ec3bed57ab4a1c9caa11981fcc09b5f58dcaab71647e0d99a7836b4f8c67101917f7f322fb331a21d3a91')
+b2sums=('bcb5589eccdb29378ba37c42bd5f4d233bf1d8b0c7591d698d6668bfd282cfc34b9fccbb9486fd09f647d59ee5ae9665971d557f16bd7c40e1043b496922abe5'
+        'SKIP'
+        '5b8790f5bb0a92db7e6bc30001b26d79ecb04d26bc617bc664c8fbebd875bd7262f1f92c042ab41a4816a89bff96699a6465a1fc27afa17785f15aa1f7d1b0ef')
+validpgpkeys=("C2FE4BD271C139B86C533E461E953E27D4311E58") # "Chris Lamb <chris at chris-lamb.co.uk>"
+
+
+prepare() {
+  cd ${pkgname}-${pkgver}
+  sed '/python-magic/d' -i setup.py
+  # pypi python-magic comptability broke libmagic compat, fixed upstream in 74c0d3f40efb49cfd78d3592bc87c76211e20570
+  patch -Np1 -R -i ${srcdir}/c72c30f29ea3760eb4c785644dc7cd4c26833740.patch
+}
+
+build() {
+  cd ${pkgname}-${pkgver}
+  python setup.py build
+  make -C doc
+}
+
+check() {
+  cd ${pkgname}-${pkgver}
+  PYTHONPATH=".:${PYTHONPATH}" PYTHONDONTWRITEBYTECODE=1 py.test \
+    -k 'not test_ppu and not test_superblock and not test_wasm' # unsquashfs output differs from fixture.
+    # ppu bug https://salsa.debian.org/reproducible-builds/diffoscope/issues/9
+}
+
+package() {
+  cd ${pkgname}-${pkgver}
+  export PYTHONHASHSEED=0
+  python setup.py install --skip-build -O1 --root="${pkgdir}"
+  install -Dm 644 README.rst -t "${pkgdir}/usr/share/doc/${pkgname}"
+  install -Dm 644 doc/diffoscope.1 -t "${pkgdir}/usr/share/man/man1"
+}
+
+# vim: ts=2 sw=2 et:

Copied: diffoscope/repos/community-x86_64/c72c30f29ea3760eb4c785644dc7cd4c26833740.patch (from rev 862552, diffoscope/trunk/c72c30f29ea3760eb4c785644dc7cd4c26833740.patch)
===================================================================
--- c72c30f29ea3760eb4c785644dc7cd4c26833740.patch	                        (rev 0)
+++ c72c30f29ea3760eb4c785644dc7cd4c26833740.patch	2021-02-17 15:41:54 UTC (rev 862553)
@@ -0,0 +1,70 @@
+From c72c30f29ea3760eb4c785644dc7cd4c26833740 Mon Sep 17 00:00:00 2001
+From: Chris Lamb <lamby at debian.org>
+Date: Thu, 28 Jan 2021 12:22:17 +0000
+Subject: [PATCH] Prefer to use magic.Magic over the magic.open compatibility
+ interface. (Closes: reproducible-builds/diffoscope#236)
+
+See <https://github.com/ahupp/python-magic/blob/master/COMPAT.md> for more info.
+---
+ diffoscope/comparators/utils/file.py | 28 ++++++++++++++--------------
+ 1 file changed, 14 insertions(+), 14 deletions(-)
+
+diff --git a/diffoscope/comparators/utils/file.py b/diffoscope/comparators/utils/file.py
+index 32700f02..fb3b4316 100644
+--- a/diffoscope/comparators/utils/file.py
++++ b/diffoscope/comparators/utils/file.py
+@@ -65,37 +65,37 @@ def _run_tests(fold, tests):
+ 
+ 
+ class File(metaclass=abc.ABCMeta):
+-    if hasattr(magic, "open"):  # use Magic-file-extensions from file
++    if hasattr(magic, "Magic"):  # use python-magic
+ 
+         @classmethod
+         def guess_file_type(cls, path):
+             if not hasattr(cls, "_mimedb"):
+-                cls._mimedb = magic.open(magic.NONE)
+-                cls._mimedb.load()
+-            return cls._mimedb.file(
+-                path.encode("utf-8", errors="surrogateescape")
+-            )
++                cls._mimedb = magic.Magic()
++            return maybe_decode(cls._mimedb.from_file(path))
+ 
+         @classmethod
+         def guess_encoding(cls, path):
+             if not hasattr(cls, "_mimedb_encoding"):
+-                cls._mimedb_encoding = magic.open(magic.MAGIC_MIME_ENCODING)
+-                cls._mimedb_encoding.load()
+-            return cls._mimedb_encoding.file(path)
++                cls._mimedb_encoding = magic.Magic(mime_encoding=True)
++            return maybe_decode(cls._mimedb_encoding.from_file(path))
+ 
+-    else:  # use python-magic
++    else:  # use Magic-file-extensions from file
+ 
+         @classmethod
+         def guess_file_type(cls, path):
+             if not hasattr(cls, "_mimedb"):
+-                cls._mimedb = magic.Magic()
+-            return maybe_decode(cls._mimedb.from_file(path))
++                cls._mimedb = magic.open(magic.NONE)
++                cls._mimedb.load()
++            return cls._mimedb.file(
++                path.encode("utf-8", errors="surrogateescape")
++            )
+ 
+         @classmethod
+         def guess_encoding(cls, path):
+             if not hasattr(cls, "_mimedb_encoding"):
+-                cls._mimedb_encoding = magic.Magic(mime_encoding=True)
+-            return maybe_decode(cls._mimedb_encoding.from_file(path))
++                cls._mimedb_encoding = magic.open(magic.MAGIC_MIME_ENCODING)
++                cls._mimedb_encoding.load()
++            return cls._mimedb_encoding.file(path)
+ 
+     def __init__(self, container=None):
+         self._comments = []
+-- 
+GitLab
+


More information about the arch-commits mailing list