]> git.pld-linux.org Git - packages/percona-toolkit.git/commitdiff
- new, based on maatkit.spec
authorElan Ruusamäe <glen@pld-linux.org>
Sun, 9 Oct 2011 19:26:06 +0000 (19:26 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
  NOTE: before using it should patch in the /tmp race holes

Changed files:
    percona-toolkit.spec -> 1.1

percona-toolkit.spec [new file with mode: 0644]

diff --git a/percona-toolkit.spec b/percona-toolkit.spec
new file mode 100644 (file)
index 0000000..c0e05fc
--- /dev/null
@@ -0,0 +1,75 @@
+# TODO
+# - the programs spit in to the face for security, hardcoded paths writing to /tmp:
+#   $ grep -r /tmp/ bin | wc -l
+#   187
+#   so unless you're masohist never run the programs as root or in host where
+#   you have hostile users
+# - TODO is to patch code to use mktemp-related or private workdirs
+%include       /usr/lib/rpm/macros.perl
+Summary:       Essential command-line utilities for MySQL
+Name:          percona-toolkit
+Version:       1.0.1
+Release:       1
+License:       GPL v2
+Group:         Applications/Databases
+Source0:       https://www.percona.com/redir/downloads/percona-toolkit/%{name}-%{version}.tar.gz
+# Source0-md5: 1d843b1b3ebd2eacfa3bf95ef2a00557
+URL:           http://www.percona.com/software/percona-toolkit/
+BuildRequires: perl-ExtUtils-MakeMaker
+BuildRequires: rpm-perlprov >= 4.1-13
+BuildRequires: sed >= 4.0
+Requires:      perl-DBD-mysql >= 1.0
+Requires:      perl-DBI >= 1.13
+Requires:      perl-Term-ReadKey >= 2.10
+Obsoletes:     maatkit
+Obsoletes:     mysqldumpgrants
+Obsoletes:     mysqltoolkit
+BuildArch:     noarch
+BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+Percona Toolkit is a collection of advanced command-line tools used by
+Percona support staff to perform a variety of MySQL and system tasks
+that are too difficult or complex to perform manually, including:
+
+- Verify master and replica data consistency
+- Efficiently archive rows
+- Find duplicate indexes
+- Summarize MySQL servers
+- Analyze queries from logs and tcpdump
+- Collect vital system information when problems occur
+
+Percona Toolkit is derived from Maatkit and Aspersa, two of the
+best-known utility toolkits for MySQL server administration.
+
+%prep
+%setup -q
+
+# change shebang to be actual interpreter for rpm to generate deps on the
+# interpreters.
+%{__sed} -i -e '1s,^#!.*env perl,#!%{__perl},' bin/pt-*
+%{__sed} -i -e '1s,^#!.*env bash,#!/bin/bash,' bin/pt-*
+
+%build
+%{__perl} Makefile.PL \
+       INSTALLDIRS=vendor
+%{__make}
+
+%install
+rm -rf $RPM_BUILD_ROOT
+install -d $RPM_BUILD_ROOT%{_sysconfdir}/%{name}
+%{__make} pure_install \
+       PERL_INSTALL_ROOT=$RPM_BUILD_ROOT
+
+%{__rm} $RPM_BUILD_ROOT%{perl_vendorarch}/auto/%{name}/.packlist
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr(644,root,root,755)
+%doc Changelog README
+%dir %{_sysconfdir}/%{name}
+%attr(755,root,root) %{_bindir}/pt-*
+%{_mandir}/man1/%{name}.1*
+%{_mandir}/man1/pt-*.1*
This page took 0.051325 seconds and 4 git commands to generate.