Debian Bug report logs - #892240
diffoscope: crashes comparing directories with python3-xattr installed

version graph

Package: diffoscope; Maintainer for diffoscope is Reproducible builds folks <reproducible-builds@lists.alioth.debian.org>; Source for diffoscope is src:diffoscope (PTS, buildd, popcon).

Reported by: Paul Wise <pabs@debian.org>

Date: Wed, 7 Mar 2018 03:21:02 UTC

Severity: wishlist

Found in version diffoscope/91

Fixed in version diffoscope/92

Done: Chris Lamb <lamby@debian.org>

Bug is archived. No further changes may be made.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, Reproducible builds folks <reproducible-builds@lists.alioth.debian.org>:
Bug#892240; Package diffoscope. (Wed, 07 Mar 2018 03:21:04 GMT) (full text, mbox, link).


Acknowledgement sent to Paul Wise <pabs@debian.org>:
New Bug report received and forwarded. Copy sent to Reproducible builds folks <reproducible-builds@lists.alioth.debian.org>. (Wed, 07 Mar 2018 03:21:04 GMT) (full text, mbox, link).


Message #5 received at submit@bugs.debian.org (full text, mbox, reply):

From: Paul Wise <pabs@debian.org>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: diffoscope: crashes comparing directories with python3-xattr installed
Date: Wed, 07 Mar 2018 11:17:57 +0800
[Message part 1 (text/plain, inline)]
Package: diffoscope
Version: 91
Severity: wishlist 
Usertags: crash

diffoscope crashes when comparing directories when the python3-xattr
package is installed but the python3-pyxattr package is not installed.

I would suggest that diffoscope should either conflict with the
incompatible python3-xattr package (as python3-pyxattr does), or
add support for the API provided by the python3-xattr package.

Personally I would prefer the latter, since python3-xattr has a
useful command-line tool in the xattr package that I sometimes use.

$ mkdir foo bar
$ diffoscope foo bar
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/diffoscope/main.py", line 422, in main
    sys.exit(run_diffoscope(parsed_args))
  File "/usr/lib/python3/dist-packages/diffoscope/main.py", line 394, in run_diffoscope
    difference = compare_root_paths(path1, path2)
  File "/usr/lib/python3/dist-packages/diffoscope/comparators/utils/compare.py", line 62, in compare_root_paths
    return compare_directories(path1, path2)
  File "/usr/lib/python3/dist-packages/diffoscope/comparators/directory.py", line 165, in compare_directories
    return FilesystemDirectory(path1).compare(FilesystemDirectory(path2))
  File "/usr/lib/python3/dist-packages/diffoscope/comparators/directory.py", line 216, in compare
    differences.extend(compare_meta(self.name, other.name))
  File "/usr/lib/python3/dist-packages/diffoscope/comparators/directory.py", line 161, in compare_meta
    differences.append(xattr(path1, path2))
  File "/usr/lib/python3/dist-packages/diffoscope/comparators/directory.py", line 124, in xattr
    fn(path1), fn(path2), path1, path2, source='extended file attributes',
  File "/usr/lib/python3/dist-packages/diffoscope/comparators/directory.py", line 121, in fn
    ) for k, v in sorted(xattr.get_all(x)))
AttributeError: module 'xattr' has no attribute 'get_all'

-- System Information:
Debian Release: buster/sid
  APT prefers testing-debug
  APT policy: (900, 'testing-debug'), (900, 'testing'), (800, 'unstable-debug'), (800, 'unstable'), (790, 'buildd-unstable'), (700, 'experimental-debug'), (700, 'experimental'), (690, 'buildd-experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 4.14.0-3-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_AU.utf8, LC_CTYPE=en_AU.utf8 (charmap=UTF-8), LANGUAGE=en_AU.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages diffoscope depends on:
ii  python3                3.6.4-1
ii  python3-distro         1.0.1-2
ii  python3-libarchive-c   2.1-3.1
ii  python3-magic          2:0.4.15-1
ii  python3-pkg-resources  38.4.0-1

Versions of packages diffoscope recommends:
ii  abootimg                         0.6-1+b2
ii  acl                              2.2.52-3+b1
ii  apktool                          2.3.1+dfsg-1
ii  binutils-multiarch               2.30-5
ii  bzip2                            1.0.6-8.1
ii  caca-utils                       0.99.beta19-2+b2
ii  colord                           1.3.3-2
ii  db-util                          5.3.1
ii  default-jdk [java-sdk]           2:1.8-59
ii  default-jdk-headless             2:1.8-59
pn  device-tree-compiler             <none>
pn  docx2txt                         <none>
ii  e2fsprogs                        1.43.9-2
ii  enjarify                         1:1.0.3-3
ii  fontforge-extras                 0.3-4
pn  fp-utils                         <none>
ii  genisoimage                      9:1.1.11-3+b2
ii  gettext                          0.19.8.1-4
ii  ghc                              8.0.2-11
ii  ghostscript                      9.22~dfsg-2
ii  giflib-tools                     5.1.4-2
ii  gnupg                            2.2.5-1
ii  imagemagick                      8:6.9.9.34+dfsg-3
ii  imagemagick-6.q16 [imagemagick]  8:6.9.9.34+dfsg-3
ii  jsbeautifier                     1.6.4-6
pn  libarchive-tools                 <none>
ii  llvm                             1:4.0-40
pn  mono-utils                       <none>
pn  odt2txt                          <none>
pn  oggvideotools                    <none>
ii  openjdk-8-jdk [java-sdk]         8u151-b12-1
ii  openssh-client                   1:7.6p1-4
ii  pdftk                            2.02-4+b2
ii  pgpdump                          0.31-0.2
ii  poppler-utils                    0.61.1-2
pn  procyon-decompiler               <none>
ii  python3-argcomplete              1.8.1-1
ii  python3-binwalk                  2.1.1-16
ii  python3-debian                   0.1.32
pn  python3-defusedxml               <none>
pn  python3-guestfs                  <none>
ii  python3-jsondiff                 1.1.1-1
ii  python3-progressbar              2.3-4
ii  python3-rpm                      4.14.0+dfsg1-2
ii  python3-tlsh                     3.4.4+20151206-1+b3
ii  python3-xattr [python3-pyxattr]  0.9.3-1
pn  r-base-core                      <none>
ii  rpm2cpio                         4.14.0+dfsg1-2
ii  sng                              1.1.0-1+b1
ii  sqlite3                          3.22.0-1
ii  squashfs-tools                   1:4.3-4
ii  tcpdump                          4.9.2-2
ii  unzip                            6.0-21
ii  vim-common                       2:8.0.1453-1
pn  xmlutils                         <none>
ii  xxd                              2:8.0.1453-1+b1
ii  xz-utils                         5.2.2-1.3

Versions of packages diffoscope suggests:
ii  libjs-jquery  3.2.1-1

-- 
bye,
pabs

https://wiki.debian.org/PaulWise
[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Reproducible builds folks <reproducible-builds@lists.alioth.debian.org>:
Bug#892240; Package diffoscope. (Wed, 07 Mar 2018 09:57:02 GMT) (full text, mbox, link).


Acknowledgement sent to Doug Freed <dwfreed@mtu.edu>:
Extra info received and forwarded to list. Copy sent to Reproducible builds folks <reproducible-builds@lists.alioth.debian.org>. (Wed, 07 Mar 2018 09:57:02 GMT) (full text, mbox, link).


Message #10 received at 892240@bugs.debian.org (full text, mbox, reply):

From: Doug Freed <dwfreed@mtu.edu>
To: 892240@bugs.debian.org
Subject: Re: diffoscope: crashes comparing directories with python3-xattr installed
Date: Wed, 7 Mar 2018 04:52:50 -0500
python3-xattr has an xattr class that can be used like a dict (and
thus call .items() to behave like pyxattr's xattr.get_all()).  A
wrapper function like this would work:

def xattr_get_all(path):
    try:
        return xattr.get_all(path)
    except AttributeError:
        return xattr.xattr(path).items()

--
dwfreed



Information forwarded to debian-bugs-dist@lists.debian.org, Reproducible builds folks <reproducible-builds@lists.alioth.debian.org>:
Bug#892240; Package diffoscope. (Fri, 09 Mar 2018 05:03:03 GMT) (full text, mbox, link).


Acknowledgement sent to Chris Lamb <lamby@debian.org>:
Extra info received and forwarded to list. Copy sent to Reproducible builds folks <reproducible-builds@lists.alioth.debian.org>. (Fri, 09 Mar 2018 05:03:03 GMT) (full text, mbox, link).


Message #15 received at 892240@bugs.debian.org (full text, mbox, reply):

From: Chris Lamb <lamby@debian.org>
To: 892240@bugs.debian.org
Cc: Paul Wise <pabs@debian.org>
Subject: Re: diffoscope: crashes comparing directories with python3-xattr installed
Date: Fri, 09 Mar 2018 05:01:49 +0000
tags 892240 + pending
thanks

Fixed in Git, pending upload. Thanks!

  https://anonscm.debian.org/git/reproducible/diffoscope.git/commit/?id=ec51d78da0bbc32fac09cf5b0f56039b8f79c696


Regards,

-- 
      ,''`.
     : :'  :     Chris Lamb
     `. `'`      lamby@debian.org / chris-lamb.co.uk
       `-



Added tag(s) pending. Request was from Chris Lamb <lamby@debian.org> to control@bugs.debian.org. (Fri, 09 Mar 2018 05:03:04 GMT) (full text, mbox, link).


Reply sent to Chris Lamb <lamby@debian.org>:
You have taken responsibility. (Thu, 22 Mar 2018 15:09:25 GMT) (full text, mbox, link).


Notification sent to Paul Wise <pabs@debian.org>:
Bug acknowledged by developer. (Thu, 22 Mar 2018 15:09:25 GMT) (full text, mbox, link).


Message #22 received at 892240-close@bugs.debian.org (full text, mbox, reply):

From: Chris Lamb <lamby@debian.org>
To: 892240-close@bugs.debian.org
Subject: Bug#892240: fixed in diffoscope 92
Date: Thu, 22 Mar 2018 15:07:00 +0000
Source: diffoscope
Source-Version: 92

We believe that the bug you reported is fixed in the latest version of
diffoscope, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 892240@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Chris Lamb <lamby@debian.org> (supplier of updated diffoscope package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Format: 1.8
Date: Thu, 22 Mar 2018 10:28:44 -0400
Source: diffoscope
Binary: diffoscope
Built-For-Profiles: nocheck
Architecture: source all
Version: 92
Distribution: unstable
Urgency: medium
Maintainer: Reproducible builds folks <reproducible-builds@lists.alioth.debian.org>
Changed-By: Chris Lamb <lamby@debian.org>
Description:
 diffoscope - in-depth comparison of files, archives, and directories
Closes: 890904 891363 891903 892240 893183 893311 893324 893443
Changes:
 diffoscope (92) unstable; urgency=medium
 .
   [ Chris Lamb ]
 .
   * New features:
     - Show the list of supported file types in the manual and --help output. We
       can copy-paste this into the website, etc.. Thanks to Jonathan Dowland
       for the suggestion. (Closes: #893443)
     - Add support for comparing Gnumeric spreadsheets. (Closes: #893311)
 .
   * Bug fixes:
     - Additionally extract the classes.dex file from .apk files; apktool does
       not do this by default which was preventing us from recursing into it to
       find differences. Thanks to Hans-Christoph Steiner for the report.
       (Closes: #890904)
     - Recursively reset the permissions of temporary directories prior to
       deletion to ensure that non-writable permissions such as 0555 are removed
       and do not cause a traceback. (Closes: #891363)
     - Support the case where the python3-xattr package is installed but
       python3-pyxattr is not. Based on an patch by Doug Freed; thanks!
       (Closes: #892240)
     - Update Java tests for openjdk-9. (Closes: #893183)
 .
   * Output:
     - Print a nicer error message if you only specify one file to compare.
     - Don't show progress bar if we passed --debug as it just gets in the way.
 .
   * Code tidying:
     - Avoid some necessary indentation around unconditional control flow.
     - Tidy unnecessary assignments.
     - Move the documentation for maybe_decode into a docstring on the method
       itself.
     - Import LooseVersion as LooseVersion.
     - Use more Pythonic `old_level` variable names (over `oldLabel`) and avoid
       using ambiguous `l` variable names.
     - Add whitespace around operators and ensure 4-line indentation throughout.
 .
   * debian/*:
     - Move DOS/MBR check into the testsuite.
     - Add explicit runtime dependency on python3-distutils as it was dropped in
       src:python3.6 3.6.5~rc1-2.
 .
   * Misc:
     - Clarify that the Reproducible Builds project is not just about
     - Drop executable bit on doc/Makefile.
     - Use our bin/diffoscope wrapper in manpage generation to ensure we are
       using the local version of diffoscope.
 .
   [ Mattia Rizzolo ]
   * Update terminology used in docs about exclusion options. Thanks to Paul
     Wise for the idea. (Closes: #893324)
   * Don't try to decode a string in comparators.utils.file. (Closes: #891903)
   * Save a bunch of system calls by resetting tempfile permissions when
     we actually need to do it.
Checksums-Sha1:
 bf5454135e289dc72b6c90b701e236b4cf1aca96 3450 diffoscope_92.dsc
 4d2de0fd8ef3e408b3c9e0ef21424a8c13e19950 8941108 diffoscope_92.tar.xz
 26ca12fbbaac88d473ecefb8104d4970b5707bf7 119368 diffoscope_92_all.deb
 abb5d892ed2888c52b2ef71b211f6e7821e7f87d 6496 diffoscope_92_amd64.buildinfo
Checksums-Sha256:
 89825858473b26ef732bb12c0c63325ef292cc2d2c200a088d7a66e1bfe414cc 3450 diffoscope_92.dsc
 dc0ec115af492d91cc3512d71a0b0882847faa1319e381cdbbc4ec155d568e06 8941108 diffoscope_92.tar.xz
 e3b2e70a097f98b4c318dabf2dd09af84365d0e8c89a45f477dc1f4c91fa33d4 119368 diffoscope_92_all.deb
 fbcc092a28a5874a4b46b31e03a1f9b568363481d94953c4aaad67ac9bb47972 6496 diffoscope_92_amd64.buildinfo
Files:
 a91e7adac25c9b7a6a172ce72251327f 3450 devel optional diffoscope_92.dsc
 8e25a63003ead4b79ed3c1eb130a3470 8941108 devel optional diffoscope_92.tar.xz
 1859965190e58bd76231dcc9439d492b 119368 devel optional diffoscope_92_all.deb
 e0b84b217304d667e0ea353fd5a5d79c 6496 devel optional diffoscope_92_amd64.buildinfo

-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEEwv5L0nHBObhsUz5GHpU+J9QxHlgFAlqzv4AACgkQHpU+J9Qx
HlgZ1g/9GQQhyCZFU3KETg6AjGkNGyNAjYYD2FqKAJyM0bb3o9Zyg5QWvVPxFYHf
CDaKAwMQn6yws908OEfDPWGQAtowFGMPAXab9ejy9IvyD8wGXJ9iBXzgwtOWUCD7
hvyTCBKGRNwH/LdCWNfX1sNFX+usLDB5mlZytlRZe+aOUN+MKuRzNnDhl7wt6EU9
LiXsjqxdYDMJgBCIMcOJ50q3r8RkFjK7YCHeROrwiMRd/YGIR2i9Ed+g/zIkd2pr
ztgwec9nebOmHmFbWc6bqzKMVSkmejSyOjbZmmudTg0sUKrRF1qO/b5z9kEezSL6
VxyZKHHvqXBgAuwspvluJ4HWLifsWtwOIyg5xrcAAeeGm/j8RoIP8UanOyXbm8Bk
3+MsuGwZJEuNC7y2eiGx/HvcE2R9KK9UJlbIFeKKp16AYbLIINGTMDlHiYo9ItTz
Q77N4sbjSgKIuyBf3qzoyL0luWODVB5bpht+iCJxrOVnNDE2u8xFBYG/wTSxpftA
5X3pj1vPYy+1ozBDddaxOQppoDc/DHCgp6PWAf1K1/FvqNqrOPFiBaEg+L7QMthT
ADXhzB0+z6JnPU92URh7a0/rw+5hfU4dxZElCFznQhDLf8U3NngsSpCfnY3OK3Uu
qknLgJERC2K6iJrhVB023yksPPxAeTH7L+0BDpXeXFReJ6ldOCg=
=CTQP
-----END PGP SIGNATURE-----




Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Thu, 26 Apr 2018 07:28:06 GMT) (full text, mbox, link).


Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Wed May 17 13:49:31 2023; Machine Name: buxtehude

Debian Bug tracking system

Debbugs is free software and licensed under the terms of the GNU Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.