packages: percona-toolkit/percona-toolkit.spec (NEW) - new, based on maatki...

glen glen at pld-linux.org
Sun Oct 9 21:26:11 CEST 2011


Author: glen                         Date: Sun Oct  9 19:26:11 2011 GMT
Module: packages                      Tag: HEAD
---- Log message:
- new, based on maatkit.spec
  NOTE: before using it should patch in the /tmp race holes

---- Files affected:
packages/percona-toolkit:
   percona-toolkit.spec (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: packages/percona-toolkit/percona-toolkit.spec
diff -u /dev/null packages/percona-toolkit/percona-toolkit.spec:1.1
--- /dev/null	Sun Oct  9 21:26:11 2011
+++ packages/percona-toolkit/percona-toolkit.spec	Sun Oct  9 21:26:06 2011
@@ -0,0 +1,86 @@
+# $Revision$, $Date$
+# 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*
+
+%define date	%(echo `LC_ALL="C" date +"%a %b %d %Y"`)
+%changelog
+* %{date} PLD Team <feedback at pld-linux.org>
+All persons listed below can be reached at <cvs_login>@pld-linux.org
+
+$Log$
+Revision 1.1  2011/10/09 19:26:06  glen
+- new, based on maatkit.spec
+  NOTE: before using it should patch in the /tmp race holes
================================================================


More information about the pld-cvs-commit mailing list