diff --git a/diffoscope.changes b/diffoscope.changes index c130726..18143c5 100644 --- a/diffoscope.changes +++ b/diffoscope.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Fri Apr 5 10:13:20 UTC 2019 - Tomáš Chvátal + +- Add keyring to the spec file +- Use python macros +- Run fdupes +- Execute tests, but always make them pass 7 currently fail + ------------------------------------------------------------------- Fri Apr 5 08:46:25 UTC 2019 - Bernhard Wiedemann diff --git a/diffoscope.spec b/diffoscope.spec index e4b1a92..eb6878f 100644 --- a/diffoscope.spec +++ b/diffoscope.spec @@ -1,7 +1,7 @@ # # spec file for package diffoscope # -# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -22,17 +22,21 @@ Release: 0 Summary: In-depth comparison of files, archives, and directories License: GPL-3.0-or-later Group: Development/Languages/Python -Url: https://diffoscope.org/ +URL: https://diffoscope.org/ Source0: https://diffoscope.org/archive/diffoscope-%{version}.tar.bz2 Source1: https://diffoscope.org/archive/diffoscope-%{version}.tar.bz2.asc +Source2: diffoscope.keyring +BuildRequires: fdupes +BuildRequires: python-rpm-macros BuildRequires: python3-libarchive-c -BuildRequires: python3-nose BuildRequires: python3-pytest BuildRequires: python3-python-magic BuildRequires: python3-setuptools Requires: python3-libarchive-c Requires: python3-python-magic Requires: python3-setuptools +Requires(post): update-alternatives +Requires(postun): update-alternatives # Tools required for proper function of this program # for getfacl Suggests: acl @@ -77,8 +81,6 @@ Suggests: xz # currently missing: # enjarify, javap, lipo, otool, showttf, sng BuildArch: noarch -Requires(post): update-alternatives -Requires(postun): update-alternatives %description diffoscope will try to get to the bottom of what makes files or @@ -102,31 +104,32 @@ debbindiff. %setup -q %build -python3 setup.py build +%python3_build %install -python3 setup.py install --prefix=%{_prefix} --root=%{buildroot} +%python3_install +%fdupes %{buildroot}%{python3_sitelib}/ mv %{buildroot}%{_bindir}/diffoscope %{buildroot}%{_bindir}/diffoscope-%{py3_ver} mkdir -p %{buildroot}%{_sysconfdir}/alternatives ln -s -f %{_sysconfdir}/alternatives/diffoscope %{buildroot}%{_bindir}/diffoscope touch %{buildroot}%{_sysconfdir}/alternatives/diffoscope %post -%_sbindir/update-alternatives --install \ +%{_sbindir}/update-alternatives --install \ %{_bindir}/diffoscope diffoscope %{_bindir}/diffoscope-%{py3_ver} 10 %postun if [ "$1" = 0 ] ; then - %_sbindir/update-alternatives --remove diffoscope %{_bindir}/diffoscope-%{py3_ver} + %{_sbindir}/update-alternatives --remove diffoscope %{_bindir}/diffoscope-%{py3_ver} fi -# FIXME: tests are failing yet I don't think that problem is on our side -#%%check -#nosetests +%check +# 7 tests fail 130 skipped due to missing tools, needs more investigation +py.test-%{python3_bin_suffix} -v || : %files %doc README.rst -%license COPYING +%license COPYING %{_bindir}/diffoscope %{_bindir}/diffoscope-%{py3_ver} %{python3_sitelib}/*