438cff0
Name:          diffoscope
58fe375
Version:       62
753d1b4
Release:       1%{?dist}
438cff0
Summary:       In-depth comparison of files, archives, and directories
438cff0
License:       GPLv3+
438cff0
URL:           https://diffoscope.org/
438cff0
Source0:       http://ftp.debian.org/debian/pool/main/d/diffoscope/diffoscope_%{version}.tar.xz
438cff0
438cff0
BuildArch:     noarch
438cff0
BuildRequires: python3-devel
438cff0
BuildRequires: python3-setuptools
438cff0
BuildRequires: python3-magic
438cff0
BuildRequires: python3-libguestfs
438cff0
BuildRequires: python3-libarchive-c
438cff0
BuildRequires: python3-docutils
438cff0
BuildRequires: /usr/bin/rst2man
58fe375
# for tests
58fe375
BuildRequires: python3-pytest
58fe375
BuildRequires: cpio
58fe375
BuildRequires: llvm, llvm-devel
58fe375
BuildRequires: binutils
58fe375
BuildRequires: unzip
58fe375
BuildRequires: bzip2
58fe375
BuildRequires: xz
58fe375
BuildRequires: genisoimage
58fe375
BuildRequires: squashfs-tools
58fe375
BuildRequires: java-devel
58fe375
BuildRequires: /usr/bin/rpm2cpio
58fe375
BuildRequires: /usr/bin/msgunfmt
58fe375
BuildRequires: /usr/bin/ps2ascii
58fe375
BuildRequires: /usr/bin/qemu-img
58fe375
BuildRequires: /usr/bin/sqlite3
58fe375
BuildRequires: /usr/bin/xxd
58fe375
BuildRequires: /usr/bin/ghc
a50df3a
BuildRequires: /usr/bin/cd-iccdump
a50df3a
%ifnarch ppc64 ppc64le
a50df3a
# We'll have to skip some tests if we happen to hit an ppc builder
a50df3a
BuildRequires: coreboot-utils
767a0a1
BuildRequires: mono-devel
a50df3a
%endif
58fe375
438cff0
Requires:      python3-magic
438cff0
Requires:      python3-tlsh
5bb023a
Requires:      python3-libarchive-c
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
58fe375
%autosetup -n diffoscope
753d1b4
sed -i '1{\@/usr/bin/env@d}' diffoscope/main.py
5bb023a
sed -i '1s|/usr/bin/env.*|%{__python3} -s|' bin/trydiffoscope
438cff0
438cff0
%build
438cff0
%py3_build
438cff0
rst2man debian/diffoscope.1.rst > build/diffoscope.1
5bb023a
rst2man debian/trydiffoscope.1.rst > build/trydiffoscope.1
438cff0
438cff0
%install
438cff0
%py3_install
5bb023a
install bin/trydiffoscope %buildroot%{_bindir}
438cff0
echo %{buildroot}%{python3_sitelib}
438cff0
rm %{buildroot}%{python3_sitelib}/*/requires.txt
58fe375
install -Dm0644 -t %{buildroot}%{_mandir}/man1/ build/diffoscope.1
58fe375
install -Dm0644 -t %{buildroot}%{_mandir}/man1/ build/trydiffoscope.1
438cff0
438cff0
%check
58fe375
# disable some tests crudely
438cff0
# (https://github.com/pytest-dev/pytest/issues/1442#issuecomment-194259675)
d413f53
# http://bugs.debian.org/817193
5bb023a
sed -i s/test_listing/_disabled_/ tests/comparators/test_cbfs.py
58fe375
sed -i s/test_diff/_disabled_/ tests/comparators/test_icc.py
58fe375
sed -i s/test_identification/_disabled_/ tests/comparators/test_ppu.py
58fe375
sed -i s/test_diff/_disabled_/ tests/comparators/test_ppu.py
58fe375
sed -i s/test_compare_non_existing/_disabled_/ tests/comparators/test_ppu.py
d413f53
%if 0%{?fedora} <= 23
d413f53
sed -i s/test_differences/_disabled_/ tests/comparators/test_fsimage.py
d413f53
%endif
438cff0
64eefa8
export LC_CTYPE=en_US.utf8
438cff0
export TZ=UTC
438cff0
export PYTHONPATH=build/lib/
438cff0
py.test-%{python3_version} tests/ -vv
438cff0
438cff0
%files
438cff0
%doc README.rst
438cff0
%license COPYING
438cff0
%{python3_sitelib}/diffoscope*
438cff0
%{_bindir}/diffoscope
5bb023a
%{_bindir}/trydiffoscope
438cff0
%doc %{_mandir}/man1/diffoscope.1*
5bb023a
%doc %{_mandir}/man1/trydiffoscope.1*
438cff0
438cff0
%changelog
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