Stanislav Ochotnicky 08bcfb3
# needed for test content
Stanislav Ochotnicky 08bcfb3
%{?perl_default_filter}
Orion Poplawski fe3081d
%global __provides_exclude_from %{?_provides_exclude_from:%_provides_exclude_from|}%{_datadir}/fedora-review/
Orion Poplawski fe3081d
%global __requires_exclude_from %{?_requires_exclude_from:%_requires_exclude_from|}%{_datadir}/fedora-review/test/
Stanislav Ochotnicky 08bcfb3
Stanislav Ochotnicky 9401bb1
#invoke with "--with tests" to enable tests
Stanislav Ochotnicky 9401bb1
%bcond_with tests
Stanislav Ochotnicky 9401bb1
Stanislav Ochotnicky 9401bb1
# See notes in make_release which patches this.
951a4af
## global     git_tag  .f03e4e7
Stanislav Ochotnicky 9401bb1
3a815c7
# Support jenkins build number if available.
3a815c7
%global     build_nr %(echo "${BUILD_NUMBER:+.}${BUILD_NUMBER:-%%{nil\\}}")
Stanislav Ochotnicky 08bcfb3
3a815c7
Name:       fedora-review
e45b6e9
Version:    0.7.2
e45b6e9
Release:    1%{?build_nr}%{?git_tag}%{?dist}
3a815c7
Summary:    Review tool for fedora rpm packages
Stanislav Ochotnicky 562f8c0
3a815c7
License:    GPLv2+
443188a
URL:        https://pagure.io/FedoraReview
443188a
Source0:    https://releases.pagure.org/FedoraReview/%{name}-%{version}%{?git_tag}.tar.gz
443188a
3a815c7
BuildArch:  noarch
Stanislav Ochotnicky 562f8c0
aab2a5a
BuildRequires:  python3-beautifulsoup4
aab2a5a
BuildRequires:  python3-bugzilla
aab2a5a
BuildRequires:  python3-packaging
aab2a5a
BuildRequires:  python3-straight-plugin
aab2a5a
BuildRequires:  python3-devel
aab2a5a
BuildRequires:  python3-rpm
324f959
BuildRequires:  python3-dnf
Stanislav Ochotnicky f7d730d
3a815c7
Requires:       fedora-packager
aab2a5a
Requires:       python3-beautifulsoup4
aab2a5a
Requires:       python3-bugzilla
aab2a5a
Requires:       python3-packaging
aab2a5a
Requires:       python3-straight-plugin
aab2a5a
Requires:       python3-rpm
324f959
Requires:       python3-dnf
Stanislav Ochotnicky 0cf9690
# licensecheck used to be in rpmdevtools, moved to devscripts later
Stanislav Ochotnicky 0cf9690
# this is compatible with both situations without ifdefs
Stanislav Ochotnicky 0cf9690
Requires:       %{_bindir}/licensecheck
018e57d
# We require DNF and the repoquery command
018e57d
Requires:       dnf
018e57d
Requires:       dnf-command(repoquery)
Stanislav Ochotnicky 562f8c0
aab2a5a
# Let's be consistent with the name used on pagure.io
aab2a5a
Provides:       FedoraReview = %{version}-%{release}
Stanislav Ochotnicky f7d730d
Stanislav Ochotnicky 0cf9690
Provides:       %{name}-php-phpci = %{version}-%{release}
Stanislav Ochotnicky 0cf9690
Obsoletes:      %{name}-php-phpci < %{version}-%{release}
Stanislav Ochotnicky f7d730d
3a815c7
Stanislav Ochotnicky 562f8c0
%description
Stanislav Ochotnicky 562f8c0
This tool automates much of the dirty work when reviewing a package
Stanislav Ochotnicky 6008662
for the Fedora Package Collection like:
Stanislav Ochotnicky 562f8c0
Stanislav Ochotnicky 6008662
    * Downloading SRPM & SPEC.
Stanislav Ochotnicky 562f8c0
    * Download upstream source
Stanislav Ochotnicky 562f8c0
    * Check md5sums
Stanislav Ochotnicky 6008662
    * Build and install package in mock.
Stanislav Ochotnicky 6008662
    * Run rpmlint.
Stanislav Ochotnicky 6008662
    * Generate a review template, which becomes the starting
Stanislav Ochotnicky 6008662
      point for the review work.
Stanislav Ochotnicky 6008662
Stanislav Ochotnicky 91eec50
The tool is composed of plugins, one for each supported language.
Stanislav Ochotnicky 6008662
As of today, there is plugins for C/C++, Ruby, java, R, perl and
Stanislav Ochotnicky 6008662
python.  There is also support for external tests that can be written
Stanislav Ochotnicky 6008662
in a simple way in bash.
Stanislav Ochotnicky 562f8c0
Stanislav Ochotnicky 562f8c0
951a4af
%package plugin-ruby
951a4af
Summary: Enhanced ruby tests for fedora-review
951a4af
Requires: %{name} = %{version}-%{release}
951a4af
951a4af
%description plugin-ruby
951a4af
fedora-review ruby-specific tests, not installed by default.
951a4af
951a4af
Stanislav Ochotnicky 9401bb1
%package tests
Stanislav Ochotnicky 9401bb1
Summary: Test and test data files for fedora-review
Stanislav Ochotnicky 9401bb1
Requires: %{name} = %{version}-%{release}
aab2a5a
Requires: python3-nose
Stanislav Ochotnicky 9401bb1
Stanislav Ochotnicky 9401bb1
%description tests
Stanislav Ochotnicky 9401bb1
Tests are packaged separately due to space concerns.
Stanislav Ochotnicky 9401bb1
Stanislav Ochotnicky 9401bb1
Stanislav Ochotnicky 562f8c0
%prep
aab2a5a
%autosetup -p1
Stanislav Ochotnicky 909b653
3a815c7
Stanislav Ochotnicky 562f8c0
%build
aab2a5a
%py3_build
Stanislav Ochotnicky 9401bb1
Stanislav Ochotnicky 562f8c0
Stanislav Ochotnicky 562f8c0
%install
aab2a5a
%py3_install
aab2a5a
pkg_dir="%{buildroot}/%{python3_sitelib}/FedoraReview"
Stanislav Ochotnicky 9401bb1
ln -s %{_datadir}/%{name}/scripts $pkg_dir/scripts
Stanislav Ochotnicky 9401bb1
ln -s %{_datadir}/%{name}/plugins $pkg_dir/plugins
Stanislav Ochotnicky 9401bb1
cd test
Stanislav Ochotnicky 9401bb1
bash < restore-links.sh
Stanislav Ochotnicky 9401bb1
rm restore-links.sh remember-links
Stanislav Ochotnicky 9401bb1
cd ..
aab2a5a
cp -ar test "%{buildroot}%{_datadir}/%{name}"
aab2a5a
cp -a pycodestyle.conf pylint.conf "%{buildroot}%{_datadir}/%{name}"
Stanislav Ochotnicky 9401bb1
9bddd4a
# Fix shebangs in %%{_bindir}.
aab2a5a
chmod -c 0755 %{buildroot}%{_bindir}/*
aab2a5a
pathfix.py -pni "%{__python3} %{py3_shbang_opts}" %{buildroot}%{python3_sitelib} %{buildroot}%{_bindir}/*
9bddd4a
Stanislav Ochotnicky 9401bb1
Stanislav Ochotnicky 9401bb1
%check
Stanislav Ochotnicky 9401bb1
%if %{with tests}
Stanislav Ochotnicky 9401bb1
cd test
Stanislav Ochotnicky 9401bb1
export REVIEW_LOGLEVEL=warning
Stanislav Ochotnicky 9401bb1
export MAKE_RELEASE=1
aab2a5a
mock --quiet -r fedora-28-i386 --init
aab2a5a
mock --quiet -r fedora-28-i386 --uniqueext=hugo --init
aab2a5a
%{__python3} -m unittest discover -f
Stanislav Ochotnicky 9401bb1
%endif
Stanislav Ochotnicky 562f8c0
Stanislav Ochotnicky 562f8c0
Stanislav Ochotnicky 562f8c0
%files
443188a
%doc README
443188a
%license COPYING AUTHORS
aab2a5a
%{python3_sitelib}/FedoraReview
aab2a5a
%{python3_sitelib}/fedora_review-%{version}-py%{python3_version}.egg-info
Stanislav Ochotnicky 562f8c0
%{_bindir}/fedora-review
Stanislav Ochotnicky 9e89a97
%{_bindir}/fedora-create-review
Stanislav Ochotnicky 922ef72
%{_bindir}/koji-download-scratch
Stanislav Ochotnicky 562f8c0
%{_mandir}/man1/%{name}.1.*
Stanislav Ochotnicky 9e89a97
%{_mandir}/man1/fedora-create-review.1.*
Stanislav Ochotnicky 562f8c0
%dir %{_datadir}/%{name}
Stanislav Ochotnicky 6008662
%{_datadir}/%{name}/plugins
951a4af
%exclude %{_datadir}/%{name}/plugins/ruby.py
Stanislav Ochotnicky 6008662
%{_datadir}/%{name}/scripts
aab2a5a
%{_datadir}/%{name}/pycodestyle.conf
951a4af
%{_datadir}/%{name}/pylint.conf
951a4af
951a4af
%files plugin-ruby
951a4af
%{_datadir}/%{name}/plugins/ruby.py
Stanislav Ochotnicky 9401bb1
Stanislav Ochotnicky 9401bb1
%files tests
Stanislav Ochotnicky 9401bb1
%doc test/README.test
Stanislav Ochotnicky 9401bb1
%{_datadir}/%{name}/test
Stanislav Ochotnicky 9401bb1
Stanislav Ochotnicky 562f8c0
Stanislav Ochotnicky 562f8c0
%changelog
e45b6e9
* Tue Apr 09 2019 Neal Gompa <ngompa13@gmail.com> - 0.7.2-1
e45b6e9
- New upstream release 0.7.2
e45b6e9
dde1656
* Sun Mar 24 2019 Neal Gompa <ngompa13@gmail.com> - 0.7.1-2
dde1656
- Backport fix to add missing logging import
dde1656
018e57d
* Thu Mar 21 2019 Neal Gompa <ngompa13@gmail.com> - 0.7.1-1
018e57d
- New upstream release 0.7.1
018e57d
aab2a5a
* Sun Mar 17 2019 Neal Gompa <ngompa13@gmail.com> - 0.7.0-1
aab2a5a
- New upstream release 0.7.0
aab2a5a
- Switch to Python 3
aab2a5a
7d1b2f6
* Thu Jan 31 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.6.1-11
7d1b2f6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
7d1b2f6
b312e82
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.6.1-10
b312e82
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
b312e82
b4b7f14
* Thu Mar 01 2018 Iryna Shcherbina <ishcherb@redhat.com> - 0.6.1-9
b4b7f14
- Update Python 2 dependency declarations to new packaging standards
b4b7f14
  (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3)
b4b7f14
c3eb822
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.6.1-8
c3eb822
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
c3eb822
22a8459
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.6.1-7
22a8459
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
22a8459
9bddd4a
* Mon Jun 05 2017 Björn Esser <besser82@fedoraproject.org> - 0.6.1-6
9bddd4a
- Fix shebangs in %%{_bindir}
9bddd4a
443188a
* Fri Jun 02 2017 Björn Esser <besser82@fedoraproject.org> - 0.6.1-5
443188a
- Add mock-option '--no-bootstrap-chroot' to defaults, if mock >= 1.4.1
443188a
- Update spec file to recent guidelines
443188a
- Change package url and source to Pagure
443188a
ed3acfe
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.6.1-4
ed3acfe
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
ed3acfe
d32bdb2
* Thu Oct 06 2016 Pierre-Yves Chibon <pingou@pingoured.fr> - 0.6.1-3
d32bdb2
- Drop requirement to python-argparse now that it has been in python's stdlib
d32bdb2
  for so long
d32bdb2
7a048ae
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.6.1-2
7a048ae
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
7a048ae
951a4af
* Mon May 02 2016 Alec Leamas <leamas.alec@gmail.com> - 0.6.1-1.f03e4e7
951a4af
- New upstream release 0.6.1
951a4af
Orion Poplawski fe3081d
* Tue Feb 16 2016 Orion Poplawski <orion@cora.nwra.com> - 0.6.0-4
Orion Poplawski fe3081d
- Exclude test content from perl requires
Orion Poplawski fe3081d
a29d7a5
* Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.6.0-3
a29d7a5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
a29d7a5
7da2302
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.6.0-2
7da2302
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
7da2302
3a815c7
* Wed May 20 2015 Alec Leamas <leamas.alec@gmail.com> - 0.6.0-1.afb5485
3a815c7
- Update to 0.6.0
3a815c7
0db89d8
* Mon May 04 2015 Pierre-Yves Chibon <pingou@pingoured.fr> - 0.5.3-1
0db89d8
- Update to 0.5.3
0db89d8
Adam Miller 3cffd29
* Wed Apr 22 2015 Adam Miller <maxamillion@fedoraproject.org> - 0.5.2-3
Adam Miller 3cffd29
- Add conditional for unittest2 for epel7 (thanks mcepl@redhat.com for the fix)
Adam Miller 3cffd29
Stanislav Ochotnicky 1314bf2
* Mon Jan 19 2015 Stanislav Ochotnicky <sochotnicky@redhat.com> - 0.5.2-2
Stanislav Ochotnicky 1314bf2
- Add patch for rhbz#1151943
Stanislav Ochotnicky 1314bf2
Stanislav Ochotnicky 91eec50
* Mon Jul 14 2014 Stanislav Ochotnicky <sochotnicky@redhat.com> - 0.5.2-1
Stanislav Ochotnicky 91eec50
- Update to latest upstream bugfix release
Stanislav Ochotnicky 91eec50
0aab634
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5.1-3
0aab634
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
0aab634
Stanislav Ochotnicky f25f398
* Mon Jan 13 2014 Stanislav Ochotnicky <sochotnicky@redhat.com> - 0.5.1-2
Stanislav Ochotnicky f25f398
- Backport fixes for several bugs
Stanislav Ochotnicky f25f398
- Resolves: rhbz#1044580
Stanislav Ochotnicky f25f398
- Resolves: rhbz#1049042
Stanislav Ochotnicky f25f398
Stanislav Ochotnicky 08bcfb3
* Fri Dec 13 2013 Stanislav Ochotnicky <sochotnicky@redhat.com> - 0.5.1-1
Stanislav Ochotnicky 08bcfb3
- Update to latest upstream (0.5.1)
Stanislav Ochotnicky 08bcfb3
Stanislav Ochotnicky 9fa511d
* Tue Oct 15 2013 Stanislav Ochotnicky <sochotnicky@redhat.com> - 0.5.0-3
Stanislav Ochotnicky 9fa511d
- Really use phpcompatinfo instead of phpci
Stanislav Ochotnicky 9fa511d
Stanislav Ochotnicky 0cf9690
* Mon Oct 14 2013 Stanislav Ochotnicky <sochotnicky@redhat.com> - 0.5.0-2
Stanislav Ochotnicky 0cf9690
- Fix requires for licensecheck (#1016309)
Stanislav Ochotnicky 0cf9690
- Remove separate php plugin subpackage (#971875)
Stanislav Ochotnicky 0cf9690
Stanislav Ochotnicky 909b653
* Fri Aug 30 2013 Stanislav Ochotnicky <sochotnicky@redhat.com> - 0.5.0-1
Stanislav Ochotnicky 909b653
- Updating to upstream 0.5.0
Stanislav Ochotnicky 909b653
91bbeee
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.4.1-4
91bbeee
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
91bbeee
4b66810
* Wed Jul 17 2013 Petr Pisar <ppisar@redhat.com> - 0.4.1-3
4b66810
- Perl 5.18 rebuild
4b66810
Stanislav Ochotnicky 892c3a8
* Thu May 30 2013 Stanislav Ochotnicky <sochotnicky@redhat.com> - 0.4.1-2
Stanislav Ochotnicky 892c3a8
- Backport fix for #967571
Stanislav Ochotnicky 892c3a8
Stanislav Ochotnicky 4994ec4
* Mon Apr 29 2013 Stanislav Ochotnicky <sochotnicky@redhat.com> - 0.4.1-1
Stanislav Ochotnicky 4994ec4
- Update to latest upstream version
Stanislav Ochotnicky 4994ec4
Stanislav Ochotnicky 327c404
* Tue Feb 19 2013 Stanislav Ochotnicky <sochotnicky@redhat.com> - 0.4.0-4
Stanislav Ochotnicky 327c404
- Fix rhbz912182
Stanislav Ochotnicky 327c404
- Reorganize patches a bit
Stanislav Ochotnicky 327c404
Stanislav Ochotnicky 4ce9f38
* Fri Feb  8 2013 Stanislav Ochotnicky <sochotnicky@redhat.com> - 0.4.0-3
Stanislav Ochotnicky 4ce9f38
- Fix rhbz908830 and rhbz908830
Stanislav Ochotnicky 4ce9f38
- Add patch for REVIEW_NO_MOCKGROUP_TEST environment variable
Stanislav Ochotnicky 4ce9f38
- Remove old patch
Stanislav Ochotnicky 4ce9f38
c2e099b
* Mon Feb 04 2013 Pierre-Yves Chibon <pingou@pingoured.fr> - 0.4.0-2
c2e099b
- Add Patch0 (0001-Fix-syntax-error.patch) from Ralph Bean fixing fedora-create-review
c2e099b
Stanislav Ochotnicky 9401bb1
* Mon Jan 28 2013 Stanislav Ochotnicky <sochotnicky@redhat.com> - 0.4.0-1
Stanislav Ochotnicky 9401bb1
- Updating to upstream 0.4.0
Stanislav Ochotnicky 9401bb1
9cbf0b3
* Wed Nov 07 2012 Pierre-Yves Chibon <pingou@pingoured.fr> - 0.3.1-3
9cbf0b3
- Backport from upstream's git fix to RHBZ#874246 (Patch0)
9cbf0b3
Stanislav Ochotnicky 33b778c
* Thu Oct 25 2012 Stanislav Ochotnicky <sochotnicky@redhat.com> - 0.3.1-2
Stanislav Ochotnicky 33b778c
- Add symlink to scripts directory so they are loaded
Stanislav Ochotnicky 33b778c
Stanislav Ochotnicky 6008662
* Tue Sep 25 2012 Stanislav Ochotnicky <sochotnicky@redhat.com> - 0.3.1-1
Stanislav Ochotnicky 6008662
- Update to lastest upstream (0.3.1)
Stanislav Ochotnicky 6008662
- Fix loading of system-wide plugins
Stanislav Ochotnicky 6008662
- Add back suport for EL6
Stanislav Ochotnicky 6008662
Stanislav Ochotnicky f7d730d
* Mon Sep 24 2012 Stanislav Ochotnicky <sochotnicky@redhat.com> - 0.3.0-1
Stanislav Ochotnicky f7d730d
- Update to lastest upstream (0.3.0)
Stanislav Ochotnicky f7d730d
- Remove no longer needed build workarounds
Stanislav Ochotnicky f7d730d
Stanislav Ochotnicky 922ef72
* Thu Aug  9 2012 Stanislav Ochotnicky <sochotnicky@redhat.com> - 0.2.2-1
Stanislav Ochotnicky 922ef72
- Update to lastest upstream (0.2.2)
Stanislav Ochotnicky 922ef72
- Add koji-download-scratch script
Stanislav Ochotnicky 922ef72
1020293
* Thu Jul 19 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.2.0-2
1020293
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
1020293
Stanislav Ochotnicky f71eb38
* Wed Jul 11 2012 Stanislav Ochotnicky <sochotnicky@redhat.com> - 0.2.0-1
Stanislav Ochotnicky f71eb38
- Update to latest release (0.2.0)
Stanislav Ochotnicky f71eb38
Stanislav Ochotnicky 883e4c9
* Fri Feb 24 2012 Stanislav Ochotnicky <sochotnicky@redhat.com> - 0.1.3-1
Stanislav Ochotnicky 883e4c9
- Update to latest bugfix release
Stanislav Ochotnicky 883e4c9
Stanislav Ochotnicky 9e89a97
* Fri Jan 13 2012 Stanislav Ochotnicky <sochotnicky@redhat.com> - 0.1.2-1
Stanislav Ochotnicky 9e89a97
- Update to latest bugfix release
Stanislav Ochotnicky 9e89a97
- Add fedora-create-review script
Stanislav Ochotnicky 9e89a97
cbd2874
* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.1.1-3
cbd2874
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
cbd2874
1f5a2f1
* Wed Jan 11 2012 Pierre-Yves Chibon <pingou@pingoured.fr> - 0.1.1-2
1f5a2f1
- Add wget as requires
1f5a2f1
Stanislav Ochotnicky eab9bf6
* Wed Nov 23 2011 Stanislav Ochotnicky <sochotnicky@redhat.com> - 0.1.1-1
Stanislav Ochotnicky eab9bf6
- New upstream bugfix release
Stanislav Ochotnicky eab9bf6
Stanislav Ochotnicky 562f8c0
* Wed Nov 16 2011 Stanislav Ochotnicky <sochotnicky@redhat.com> - 0.1.0-2
Stanislav Ochotnicky 562f8c0
- Remove things not needed in el6+
Stanislav Ochotnicky 562f8c0
Stanislav Ochotnicky 562f8c0
* Thu Nov 10 2011 Pierre-Yves Chibon <pingou@pingoured.fr> - 0.1.0-1
Stanislav Ochotnicky 562f8c0
- Initial packaging work for Fedora