9b29c2f
# spec file for mysql-utilities
9b29c2f
#
9b29c2f
# Copyright (c) 2012-2013 Remi Collet
9b29c2f
# License: CC-BY-SA
9b29c2f
# http://creativecommons.org/licenses/by-sa/3.0/
9b29c2f
#
9b29c2f
# Please, preserve the changelog entries
9b29c2f
#
9cae797
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
Remi Collet 8dbe102
%{!?python_version: %global python_version %(%{__python} -c "import sys; sys.stdout.write(sys.version[:3])")}
9cae797
9cae797
# From README.txt
9cae797
# Python 2.6 or later but Python 3.x is not supported (yet).
9cae797
%global with_python3 0
9cae797
9cae797
Name:           mysql-utilities
66e5f89
Version:        1.5.6
a153424
Release:        2%{?dist}
9cae797
Summary:        MySQL Utilities
9cae797
9cae797
Group:          Applications/Databases
9cae797
License:        GPLv2
9cae797
URL:            https://launchpad.net/mysql-utilities
9cae797
83b9fd5
# Upstream has a mirror redirector for downloads, so the URL is hard to
83b9fd5
# represent statically.  You can get the tarball by following a link from
83b9fd5
# http://dev.mysql.com/downloads/tools/utilities/
83b9fd5
Source0:        %{name}-%{version}.tar.gz
9cae797
9cae797
BuildArch:      noarch
9cae797
BuildRequires:  python2-devel >= 2.6
Remi Collet 8dbe102
BuildRequires:  mysql-connector-python
9cae797
%if %{with_python3}
9cae797
BuildRequires:  python3-devel
9cae797
%endif
9cae797
9cae797
Requires:       mysql-connector-python
9cae797
Remi Collet 8dbe102
9cae797
%description
83b9fd5
A package of utilities that are used for maintenance and administration
83b9fd5
of MySQL servers. These utilities encapsulate a set of primitive commands,
83b9fd5
and bundles them so they can be used to perform macro operations with a
83b9fd5
single command.
9cae797
9cae797
Documentation:
9cae797
http://dev.mysql.com/doc/workbench/en/mysql-utilities.html
9cae797
9cae797
9cae797
%prep
83b9fd5
%setup -q
9cae797
9cae797
9cae797
%build
83b9fd5
# nothing to build
9cae797
9cae797
5288337
%install
9cae797
install --directory %{buildroot}%{_mandir}/man1
9cae797
9cae797
%if %{with_python3}
Remi Collet 8dbe102
: Python 3 build
9cae797
%{__python3} setup.py install --skip-profile --root %{buildroot}
9cae797
rm -rf build
9cae797
%endif
9cae797
Remi Collet 8dbe102
: Python 2 build - end with this for tests
9cae797
%{__python} setup.py install --skip-profile --root %{buildroot}
9cae797
83b9fd5
: Man pages
83b9fd5
%{__python} setup.py install_man --root %{buildroot}
Remi Collet 8dbe102
Honza Horak 5657af0
# Archive with doctrine files does not seem like something it should be
Honza Horak 5657af0
# part of RPM; it might un-packed into a separate package if necessary
Honza Horak 5657af0
rm -f %{buildroot}%{_sysconfdir}/mysql/mysql-fabric-doctrine-1.4.0.zip
9cae797
9cae797
%check
Remi Collet 8dbe102
%if "%{python_version}" >= "2.7"
c20d00b
c20d00b
: Setup test environment
Honza Horak 5657af0
# do not use hard copy, only a symlink to the system version of
Honza Horak 5657af0
# mysql-connector-python
Honza Horak 5657af0
rm -rf %{buildroot}/%{python_sitelib}/mysql/connector
c20d00b
ln -s %{python_sitelib}/mysql/connector %{buildroot}/%{python_sitelib}/mysql/connector
c20d00b
ret=0
83b9fd5
export PYTHONPATH=%{buildroot}/%{python_sitelib}
c20d00b
83b9fd5
for unit in unit_tests/test*py
83b9fd5
do
c20d00b
  %{__python} $unit || ret=1
83b9fd5
done
c20d00b
c20d00b
: Cleanup
c20d00b
rm %{buildroot}/%{python_sitelib}/mysql/connector
c20d00b
exit $ret
Remi Collet 8dbe102
%endif
9cae797
9cae797
9cae797
%files
83b9fd5
%doc CHANGES.txt LICENSE.txt README.txt
Remi Collet c23ecb8
%{_bindir}/mysqlauditadmin
Remi Collet c23ecb8
%{_bindir}/mysqlauditgrep
9cae797
%{_bindir}/mysqldbcompare
9cae797
%{_bindir}/mysqldbcopy
9cae797
%{_bindir}/mysqldbexport
9cae797
%{_bindir}/mysqldbimport
9cae797
%{_bindir}/mysqldiff
9cae797
%{_bindir}/mysqldiskusage
9cae797
%{_bindir}/mysqlfailover
83b9fd5
%{_bindir}/mysqlfrm
9cae797
%{_bindir}/mysqlindexcheck
9cae797
%{_bindir}/mysqlmetagrep
9cae797
%{_bindir}/mysqlprocgrep
9cae797
%{_bindir}/mysqlreplicate
9cae797
%{_bindir}/mysqlrpladmin
9cae797
%{_bindir}/mysqlrplcheck
9cae797
%{_bindir}/mysqlrplshow
9cae797
%{_bindir}/mysqlserverclone
9cae797
%{_bindir}/mysqlserverinfo
83b9fd5
%{_bindir}/mysqluc
9cae797
%{_bindir}/mysqluserclone
9cae797
%{python_sitelib}/mysql/utilities
9cae797
%{python_sitelib}/mysql_utilities*
9cae797
%{_mandir}/man1/mysql*
9cae797
# empty file already provided by mysql-connector-python
9cae797
%exclude %{python_sitelib}/mysql/__init*
9cae797
Honza Horak 5657af0
# mysql fabric files
Honza Horak 5657af0
%{_sysconfdir}/mysql/fabric.cfg
Honza Horak 5657af0
%{_bindir}/mysqlfabric
Honza Horak 5657af0
%{_bindir}/mysqlrplms
Honza Horak 5657af0
%{_bindir}/mysqlrplsync
Honza Horak 5657af0
%{python_sitelib}/mysql/fabric
Honza Horak 5657af0
9cae797
9cae797
%changelog
a153424
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.5.6-2
a153424
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
a153424
66e5f89
* Fri Sep 18 2015 Honza Horak <None> - 1.5.6-1
66e5f89
- New upstream release 1.5.6
66e5f89
2047ee8
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.5.2-2
2047ee8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
2047ee8
c7d2dfe
* Fri Oct 24 2014 Pavel Alexeev <Pahan@Hubbitus.info> - 1.5.2
c7d2dfe
- Update to 1.5.2 - bz#1147140.
c7d2dfe
5288337
* Mon Aug 18 2014 Pavel Alexeev <Pahan@Hubbitus.info> - 1.4.4-1
5288337
- Update to 1.4.4 - bz#1111839.
5288337
Honza Horak 5657af0
* Tue Jun 17 2014 Honza Horak <hhorak@redhat.com> - 1.4.3-1
Honza Horak 5657af0
- update to 1.4.3 GA, which adds mysql fabric
Honza Horak 5657af0
c5477d5
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.3.6-2
c5477d5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
c5477d5
c20d00b
* Thu Dec 19 2013 Remi Collet <remi@fedoraproject.org> - 1.3.6-1
c20d00b
- update to 1.3.6 GA
c20d00b
- add mysqlauditadmin and mysqlauditgrep on EPEL-6
c20d00b
d68826d
* Mon Sep  9 2013 Remi Collet <remi@fedoraproject.org> - 1.3.5-1
d68826d
- update to 1.3.5 GA
d68826d
45903e4
* Mon Aug  5 2013 Remi Collet <remi@fedoraproject.org> - 1.3.4-1
45903e4
- update to 1.3.4 GA
45903e4
1f2c004
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.3.3-2
1f2c004
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
1f2c004
9b29c2f
* Wed Jul 10 2013 Remi Collet <remi@fedoraproject.org> - 1.3.3-1
9b29c2f
- update to 1.3.3 (beta)
9b29c2f
e796066
* Sat Jun 15 2013 Remi Collet <remi@fedoraproject.org> - 1.3.2-1
e796066
- update to 1.3.2 (beta)
e796066
83b9fd5
* Sat Apr  6 2013 Remi Collet <remi@fedoraproject.org> - 1.3.0-1
83b9fd5
- update to 1.3.0 (alpha)
83b9fd5
  http://dev.mysql.com/doc/relnotes/mysql-utilities/en/wb-utils-news-1-3-0.html
83b9fd5
- move from launchpad to mysql.com
83b9fd5
- new command mysqlfrm
83b9fd5
- mysqluc is now usable
83b9fd5
- man pages provided in upstream tarball
83b9fd5
Remi Collet 8dbe102
* Fri Mar  8 2013 Remi Collet <remi@fedoraproject.org> - 1.2.1-2
Remi Collet 8dbe102
- generate minimal man pages using help2man
Remi Collet 8dbe102
  http://bugs.mysql.com/68610 - Missing man pages
Remi Collet 8dbe102
- drop mysqlauditadmin and mysqlauditgrep on EPEL-6
Remi Collet 8dbe102
  http://bugs.mysql.com/68614 - Issue with python 2.6
Remi Collet 8dbe102
Remi Collet 9b164c3
* Fri Mar  8 2013 Remi Collet <remi@fedoraproject.org> - 1.2.1-1
Remi Collet 9b164c3
- update to 1.2.1
Remi Collet 9b164c3
- no man pages, http://bugs.mysql.com/68610
Remi Collet 9b164c3
Remi Collet c23ecb8
* Fri Feb  8 2013 Remi Collet <remi@fedoraproject.org> - 1.2.0-1
Remi Collet c23ecb8
- update to 1.2.0
Remi Collet c23ecb8
- new commands: mysqlauditadmin and mysqlauditgrep
Remi Collet c23ecb8
779c160
* Wed Jan  9 2013 Remi Collet <remi@fedoraproject.org> - 1.1.1-1
779c160
- update to 1.1.1
779c160
bc413c8
* Thu Oct  4 2012 Remi Collet <remi@fedoraproject.org> - 1.1.0-1
bc413c8
- update to 1.1.0
bc413c8
- new command mysqluc removed (broken)
bc413c8
7f48929
* Fri Aug 10 2012 Remi Collet <remi@fedoraproject.org> - 1.0.6-1
7f48929
- update to 1.0.6
7f48929
f86e483
* Fri Jul 20 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.5-4
f86e483
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
f86e483
dd376fe
* Sun May 27 2012 Remi Collet <remi@fedoraproject.org> - 1.0.5-3
dd376fe
- no man for EL-6 (missing recent python-sphinx)
dd376fe
9cae797
* Sun Apr 15 2012 Remi Collet <remi@fedoraproject.org> - 1.0.5-2
9cae797
- fix BR to python2-devel
9cae797
- incorrect-fsf-address and non-executable-script referenced as
9cae797
  Oracle BUG#13956819
9cae797
- remove mut man page (command not installed)
9cae797
Remi Collet c23ecb8
* Wed Apr 11 2012 Remi Collet <remi@fedoraproject.org> - 1.0.5-1
9cae797
- initial RPM
9cae797