438cff0
Name:          diffoscope
4b88d38
Version:       163
44752b0
Release:       1%{?dist}
438cff0
Summary:       In-depth comparison of files, archives, and directories
438cff0
License:       GPLv3+
438cff0
URL:           https://diffoscope.org/
abcb2fd
#Source0:       https://files.pythonhosted.org/packages/source/d/diffoscope/diffoscope-%%{version}.tar.gz
abcb2fd
Source0:       https://salsa.debian.org/reproducible-builds/diffoscope/-/archive/%{version}/diffoscope-%{version}.tar.gz
438cff0
3379ae6
%global tools \
3379ae6
    acl \
5e967f5
    abootimg \
5e967f5
    black \
3379ae6
    e2fsprogs \
3379ae6
    cpio \
3379ae6
    llvm, llvm-devel \
3379ae6
    binutils \
3379ae6
    diffutils \
3379ae6
    gzip \
3379ae6
    unzip \
3379ae6
    bzip2 \
3379ae6
    xz \
3379ae6
    tar \
26dd3f6
    zip \
81fd7d0
    sng >= 1.1.0-2 \
44752b0
    openssl \
3379ae6
    openssh \
81fd7d0
    openssh-clients \
4b88d38
    radare2 \
3379ae6
    sqlite \
3379ae6
    genisoimage \
3379ae6
    squashfs-tools \
3379ae6
    java-devel \
3379ae6
    /usr/bin/img2txt \
3379ae6
    /usr/bin/rpm2cpio \
3379ae6
    /usr/bin/msgunfmt \
3379ae6
    /usr/bin/ps2ascii \
3379ae6
    /usr/bin/qemu-img \
3379ae6
    /usr/bin/xxd \
3379ae6
    /usr/bin/ghc \
3379ae6
    /usr/bin/cd-iccdump \
5e967f5
    /usr/bin/oggDump \
5e967f5
    /usr/bin/Rscript \
5e967f5
    /usr/bin/fdtdump \
5e967f5
    /usr/bin/gifbuild \
44752b0
    /usr/bin/dumppdf \
44752b0
    /usr/bin/h5dump \
3379ae6
    gnupg \
5e967f5
    pgpdump \
3379ae6
    findutils \
3379ae6
    file \
3379ae6
    ImageMagick \
9aae73a
    poppler-utils \
d925088
    python3-debian \
44752b0
    python3-h5py \
5e967f5
    python3-PyPDF2 \
1ecc7f5
    python3-magic \
44752b0
    python3-pdfminer \
1ecc7f5
    python3-tlsh \
1ecc7f5
    python3-libarchive-c \
5e967f5
    gnumeric \
5e967f5
    odt2txt \
1ecc7f5
    wabt
3379ae6
3379ae6
# missing:
3379ae6
# apktool
3379ae6
# js-beautify
1cb425b
# /usr/bin/dumpxsb from xmlbeans-scripts, xmlbeans
3379ae6
3379ae6
%ifnarch ppc64 ppc64le
3379ae6
%global tools2 \
3379ae6
    mono-devel
3379ae6
%endif
1ecc7f5
%ifarch x86_64 i686 armv7hl
1ecc7f5
%global tools3 \
1ecc7f5
    fpc
1ecc7f5
%endif
1ecc7f5
3379ae6
1ecc7f5
%global toolz %(echo "%tools %?tools2 %?tools3" | grep . | tr '\\n' ', ')
3379ae6
438cff0
BuildArch:     noarch
438cff0
BuildRequires: python3-devel
438cff0
BuildRequires: python3-setuptools
438cff0
BuildRequires: python3-docutils
58fe375
# for tests
58fe375
BuildRequires: python3-pytest
3379ae6
BuildRequires: %toolz
d925088
BuildRequires: help2man
fd3b4ba
BuildRequires: make
58fe375
749bd5e
# libguestfs is not installable in koji right now, ffs. Let's only require is at end user systems.
749bd5e
Requires:      python3-libguestfs
3379ae6
Recommends:    %toolz
438cff0
438cff0
%description
438cff0
diffoscope will try to get to the bottom of what makes files or directories
438cff0
different. It will recursively unpack archives of many kinds and transform
438cff0
various binary formats into more human readable form to compare them. It can
438cff0
compare two tarballs, ISO images, or PDF just as easily. The differences can
438cff0
be shown in a text or HTML report.
438cff0
438cff0
diffoscope is developed as part of the "reproducible builds" Debian project and
438cff0
was formerly known as "debbindiff".
438cff0
438cff0
%prep
be966de
%autosetup -p1
753d1b4
sed -i '1{\@/usr/bin/env@d}' diffoscope/main.py
438cff0
cb3c5b4
sed -i s/python-magic/file-magic/ setup.py
cb3c5b4
438cff0
%build
438cff0
%py3_build
d925088
make -C doc
438cff0
438cff0
%install
438cff0
%py3_install
438cff0
echo %{buildroot}%{python3_sitelib}
d925088
install -Dm0644 -t %{buildroot}%{_mandir}/man1/ doc/diffoscope.1
44752b0
install -Dm0644 -t %{buildroot}/usr/share/zsh/site-functions/ debian/zsh-completion/_diffoscope
438cff0
438cff0
%check
5e967f5
DESELECT=(
5e967f5
  # https://bugzilla.redhat.com/show_bug.cgi?id=1778875
5e967f5
  # https://salsa.debian.org/reproducible-builds/diffoscope/issues/9
5e967f5
  # https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=877724
5e967f5
  --deselect=tests/comparators/test_ppu.py::test_diff
1004812
1004812
  --deselect=tests/comparators/test_ppu.py::test_identification
1004812
  --deselect=tests/comparators/test_ppu.py::test_compare_non_existing
f191cfd
44752b0
  # Debian has ocaml 4.08, we have 4.10/4.11. Might be the cause.
44752b0
  --deselect=tests/comparators/test_ocaml.py::test_diff
2f155fc
2f155fc
  # Seems to be some incompatibility with python3.9
2f155fc
  --deselect=tests/comparators/test_wasm.py
3fa44ab
3fa44ab
  # What exactly is the point of those tests?
3fa44ab
  --deselect=tests/test_source.py::test_code_is_black_clean
5e967f5
)
5e967f5
5e967f5
LC_CTYPE=C.utf8 \
5e967f5
TZ=UTC \
5e967f5
PYTHONPATH=build/lib/ \
5e967f5
%{__python3} -m pytest tests/ -vv ${DESELECT[@]}
438cff0
438cff0
%files
3379ae6
%doc README.rst debian/changelog
438cff0
%license COPYING
438cff0
%{python3_sitelib}/diffoscope*
438cff0
%{_bindir}/diffoscope
44752b0
/usr/share/zsh/site-functions/_diffoscope
438cff0
%doc %{_mandir}/man1/diffoscope.1*
438cff0
438cff0
%changelog
4b88d38
* Wed Jan  6 2021 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 163-1
4b88d38
- Update to latest version.
4b88d38
- Radare2 may now be used for disassembly.
4b88d38
- Fix build (#1902703)
4b88d38
44752b0
* Fri Aug  7 2020 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 154-1
44752b0
- Update to latest version
4d50316
- Drop dependency on enjarify (#1841628). Hopefully only temporarily.
44752b0
0fae375
* Sat Aug 01 2020 Fedora Release Engineering <releng@fedoraproject.org> - 137-5
0fae375
- Second attempt - Rebuilt for
0fae375
  https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
0fae375
8ff6989
* Mon Jul 27 2020 Fedora Release Engineering <releng@fedoraproject.org> - 137-4
8ff6989
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
8ff6989
149dabc
* Fri Jul 10 2020 Jiri Vanek <jvanek@redhat.com> - 137-3
149dabc
- Rebuilt for JDK-11, see https://fedoraproject.org/wiki/Changes/Java11
149dabc
251c26c
* Tue May 26 2020 Miro Hrončok <mhroncok@redhat.com> - 137-2
251c26c
- Rebuilt for Python 3.9
251c26c
1004812
* Thu Mar  5 2020 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 137-1
1004812
- Update to latest version, fix build (#1799281)
1004812
05385c4
* Tue Jan 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 134-2
05385c4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
05385c4
b1892f6
* Mon Dec 30 2019 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 134-1
b1892f6
- Update to latest version (bugfix changes only according to debian
b1892f6
  changelog)
b1892f6
5e967f5
* Sun Dec  1 2019 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 133-1
5e967f5
- Update to latest version
5e967f5
e931caf
* Thu Oct 03 2019 Miro Hrončok <mhroncok@redhat.com> - 111-4
e931caf
- Rebuilt for Python 3.8.0rc1 (#1748018)
e931caf
2b36967
* Mon Aug 19 2019 Miro Hrončok <mhroncok@redhat.com> - 111-3
2b36967
- Rebuilt for Python 3.8
2b36967
ad048d8
* Wed Jul 24 2019 Fedora Release Engineering <releng@fedoraproject.org> - 111-2
ad048d8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
ad048d8
26dd3f6
* Sun Feb 10 2019 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 111-1
26dd3f6
- Update to latest version
26dd3f6
d81773e
* Thu Jan 31 2019 Fedora Release Engineering <releng@fedoraproject.org> - 105-2
d81773e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
d81773e
777236c
* Mon Nov 12 2018 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 105-1
777236c
- Update to latest version
777236c
b559989
* Sat Sep 15 2018 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 100-1
b559989
- Update to latest version
cb3c5b4
- Fix reference to file-magic (#1583331)
b559989
87d6406
* Thu Jul 12 2018 Fedora Release Engineering <releng@fedoraproject.org> - 98-2
87d6406
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
87d6406
be966de
* Mon Jul  2 2018 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 98-1
be966de
- Update to latest upstream version (declared python3.7 compat)
be966de
4e014e9
* Mon Jun 25 2018 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 96-1
4e014e9
- Update to latest version
4e014e9
f02242d
* Tue Jun 19 2018 Miro Hrončok <mhroncok@redhat.com> - 95-2
f02242d
- Rebuilt for Python 3.7
f02242d
e19c6cc
* Sun May 20 2018 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 95-1
e19c6cc
- Update to latest version
e19c6cc
  (see https://salsa.debian.org/reproducible-builds/diffoscope/blob/516d5930f16867282d537c884e78213f9c4b8796/debian/changelog).
e19c6cc
5395ef3
* Fri Mar  2 2018 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 91-1
5395ef3
- Update to latest version
5395ef3
65b88b1
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 90-2
65b88b1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
65b88b1
5395ef3
* Wed Jan 10 2018 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 90-1
5395ef3
- Update to latest version
5395ef3
8775084
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 77-3
8775084
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
8775084
d4d9fbd
* Fri Feb 24 2017 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 77-2
d4d9fbd
- Pull in enjarify
d4d9fbd
9aae73a
* Mon Feb 13 2017 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 77-1
9aae73a
- Update to latest version (fixes #1421770, CVE-2017-0359)
9aae73a
- Also pull in python-debian
9aae73a
3364eb8
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 69-2
3364eb8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
3364eb8
3379ae6
* Thu Jan 19 2017 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 69-1
3379ae6
- Update to latest version (upstream dropped trydiffoscope)
3379ae6
- Add more dependendencies, and pull them in as Recommends
3379ae6
adfe86d
* Mon Dec 19 2016 Miro Hrončok <mhroncok@redhat.com> - 62-2
adfe86d
- Rebuild for Python 3.6
adfe86d
58fe375
* Tue Nov 15 2016 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 62-1
58fe375
- Update to latest version
58fe375
5bb023a
* Mon Aug 15 2016 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 59-1
5bb023a
- Update to latest version
5bb023a
- Require python-libarchive-c (#1367034)
5bb023a
753d1b4
* Mon Aug 15 2016 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 58-1
753d1b4
- Update to latest version
753d1b4
51dad7d
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 54-2
51dad7d
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
51dad7d
c2e4bc2
* Fri Jun 10 2016 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 54-1
c2e4bc2
- Update to latest version
c2e4bc2
438cff0
* Thu Mar 10 2016 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 51-3
438cff0
- Change License to GPLv3+
438cff0
438cff0
* Thu Mar 10 2016 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 51-2
438cff0
- Require python3-tlsh
438cff0
438cff0
* Wed Mar  9 2016 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 51-1
438cff0
- Update to v 51
438cff0
- Add man page
438cff0
438cff0
* Tue Mar  8 2016 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 48-1
438cff0
- Update to v 48, simplify packaging
438cff0
438cff0
* Sat Dec 05 2015 Dhiru Kholia <dhiru@openwall.com> - 42-1
438cff0
- Initial version