From 88699ac4aa7772856d936c7c58a4fac4a4d19ba3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Honza=20Hor=C3=A1k?= Date: Fri, 19 Jul 2013 14:37:02 +0200 Subject: [PATCH] Clean-up spec file, remove un-necessary systemd snippets --- mariadb-man-plugin.patch | 16 -- mariadb.spec | 63 +------ mysql_plugin.1 | 388 --------------------------------------- 3 files changed, 7 insertions(+), 460 deletions(-) delete mode 100644 mariadb-man-plugin.patch delete mode 100644 mysql_plugin.1 diff --git a/mariadb-man-plugin.patch b/mariadb-man-plugin.patch deleted file mode 100644 index 64bae9e..0000000 --- a/mariadb-man-plugin.patch +++ /dev/null @@ -1,16 +0,0 @@ -MySQL tar ball includes mysql_plugin.1, but mariadb tar ball doesn't. -Since mysql_plugin.1 is added into RPM by hand, we have to add it to the -CMakeLists.txt too. - -diff -up mariadb-5.5.28a/man/CMakeLists.txt.mysql_plugin mariadb-5.5.28a/man/CMakeLists.txt ---- mariadb-5.5.28a/man/CMakeLists.txt.mysql_plugin 2013-01-02 11:48:23.845499524 +0100 -+++ mariadb-5.5.28a/man/CMakeLists.txt 2013-01-02 11:48:49.967514226 +0100 -@@ -21,7 +21,7 @@ SET(MAN1_SERVER innochecksum.1 my_print_ - mysql_tzinfo_to_sql.1 mysql_upgrade.1 mysql_zap.1 - mysqld_multi.1 mysqld_safe.1 mysqldumpslow.1 mysqlhotcopy.1 - mysqlman.1 mysqltest.1 perror.1 replace.1 resolve_stack_dump.1 -- resolveip.1 mysqlbug.1) -+ resolveip.1 mysqlbug.1 mysql_plugin.1) - SET(MAN8_SERVER mysqld.8 mysqlmanager.8) - SET(MAN1_CLIENT msql2mysql.1 mysql.1 mysql_find_rows.1 mysql_waitpid.1 - mysqlaccess.1 mysqladmin.1 mysqlbinlog.1 mysqlcheck.1 diff --git a/mariadb.spec b/mariadb.spec index bf754f5..e9c166f 100644 --- a/mariadb.spec +++ b/mariadb.spec @@ -40,8 +40,6 @@ Source12: mysqld-prepare-db-dir Source13: mysqld-wait-ready Source14: rh-skipped-tests-base.list Source15: rh-skipped-tests-arm.list -# mysql_plugin is missing in mariadb tar ball -Source16: mysql_plugin.1 # Working around perl dependency checking bug in rpm FTTB. Remove later. Source999: filter-requires-mysql.sh @@ -58,7 +56,6 @@ Patch9: mariadb-cipherspec.patch Patch10: mariadb-file-contents.patch Patch11: mariadb-string-overflow.patch Patch12: mariadb-dh1024.patch -Patch13: mariadb-man-plugin.patch Patch14: mariadb-basedir.patch Patch15: mariadb-tmpdir.patch Patch17: mariadb-covscan-signexpr.patch @@ -127,7 +124,7 @@ Requires: %{name}%{?_isa} = %{epoch}:%{version}-%{release} Requires: %{name}-libs%{?_isa} = %{epoch}:%{version}-%{release} Requires: sh-utils Requires(pre): /usr/sbin/useradd -# We require this to be present for %%{_prefix}/lib/tmpfiles.d +# We require this to be present for %%{_tmpfilesdir} Requires: systemd-units # Make sure it's there when scriptlets run, too Requires(post): systemd-units @@ -260,7 +257,6 @@ MariaDB is a community developed branch of MySQL. %patch10 -p1 %patch11 -p1 %patch12 -p1 -%patch13 -p1 %patch14 -p1 %patch15 -p1 %patch17 -p1 @@ -283,9 +279,6 @@ cat %{SOURCE15} >> mysql-test/rh-skipped-tests.list echo "main.gis-precise : rhbz#906367" >> mysql-test/rh-skipped-tests.list %endif -# install mysql_plugin -cp -p %{SOURCE16} man/ - %build # fail quickly and obviously if user tries to build as root @@ -437,8 +430,8 @@ install -p -m 644 %{SOURCE11} ${RPM_BUILD_ROOT}%{_unitdir}/ install -p -m 755 %{SOURCE12} ${RPM_BUILD_ROOT}%{_libexecdir}/ install -p -m 755 %{SOURCE13} ${RPM_BUILD_ROOT}%{_libexecdir}/ -mkdir -p $RPM_BUILD_ROOT%{_prefix}/lib/tmpfiles.d -install -p -m 0644 %{SOURCE10} $RPM_BUILD_ROOT%{_prefix}/lib/tmpfiles.d/%{name}.conf +mkdir -p $RPM_BUILD_ROOT%{_tmpfilesdir} +install -p -m 0644 %{SOURCE10} $RPM_BUILD_ROOT%{_tmpfilesdir}/%{name}.conf # Fix funny permissions that cmake build scripts apply to config files chmod 644 ${RPM_BUILD_ROOT}%{_datadir}/mysql/config.*.ini @@ -523,62 +516,19 @@ fi %post libs -p /sbin/ldconfig %post server -# As soon as Fedora 17, which doesn't know %%systemd_post macro, -# is retired, we can remove the check for availability of the macro -# and the alternative code. -# Let's keep it there now for anyone trying to build the package -# for F17 on his own. -%if 0%{?systemd_post:1} %systemd_post mysqld.service -%else -if [ $1 = 1 ]; then - # Initial installation - /bin/systemctl daemon-reload >/dev/null 2>&1 || : -fi -%endif /bin/chmod 0755 /var/lib/mysql /bin/touch /var/log/mysqld.log -# Handle upgrading from SysV initscript to native systemd unit. -# We can tell if a SysV version of mysql was previously installed by -# checking to see if the initscript is present. -%triggerun server -- mysql-server -if [ -f /etc/rc.d/init.d/mysqld ]; then - # Save the current service runlevel info - # User must manually run systemd-sysv-convert --apply mysqld - # to migrate them to systemd targets - /usr/bin/systemd-sysv-convert --save mysqld >/dev/null 2>&1 || : - - # Run these because the SysV package being removed won't do them - /sbin/chkconfig --del mysqld >/dev/null 2>&1 || : - /bin/systemctl try-restart mysqld.service >/dev/null 2>&1 || : -fi - %post embedded -p /sbin/ldconfig %preun server -%if 0%{?systemd_preun:1} %systemd_preun mysqld.service -%else -if [ $1 = 0 ]; then - # Package removal, not upgrade - /bin/systemctl --no-reload disable mysqld.service >/dev/null 2>&1 || : - /bin/systemctl stop mysqld.service >/dev/null 2>&1 || : -fi -%endif %postun libs -p /sbin/ldconfig %postun server -%if 0%{?systemd_postun_with_restart:1} %systemd_postun_with_restart mysqld.service -%else -/bin/systemctl daemon-reload >/dev/null 2>&1 || : -if [ $1 -ge 1 ]; then - # Package upgrade, not uninstall - /bin/systemctl try-restart mysqld.service >/dev/null 2>&1 || : -fi -%endif %postun embedded -p /sbin/ldconfig @@ -745,15 +695,15 @@ fi %{_libexecdir}/mysqld-prepare-db-dir %{_libexecdir}/mysqld-wait-ready -%{_prefix}/lib/tmpfiles.d/%{name}.conf +%{_tmpfilesdir}/%{name}.conf %attr(0755,mysql,mysql) %dir /var/run/mysqld %attr(0755,mysql,mysql) %dir /var/lib/mysql %attr(0640,mysql,mysql) %config(noreplace) %verify(not md5 size mtime) /var/log/mysqld.log %config(noreplace) %{_sysconfdir}/logrotate.d/mysqld %files devel -/usr/include/mysql -/usr/share/aclocal/mysql.m4 +%{_includedir}/mysql +%{_datadir}/aclocal/mysql.m4 %{_libdir}/mysql/libmysqlclient.so %{_libdir}/mysql/libmysqlclient_r.so @@ -783,6 +733,7 @@ fi * Fri Jul 19 2013 Honza Horak 5.5.32-1 - Rebase to 5.5.32 https://kb.askmonty.org/en/mariadb-5532-changelog/ +- Clean-up un-necessary systemd snippets * Wed Jul 17 2013 Petr Pisar - 1:5.5.31-7 - Perl 5.18 rebuild diff --git a/mysql_plugin.1 b/mysql_plugin.1 deleted file mode 100644 index e8cacd5..0000000 --- a/mysql_plugin.1 +++ /dev/null @@ -1,388 +0,0 @@ -'\" t -.\" Title: \fBmysql_plugin\fR -.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.77.1 -.\" Date: 12/08/2012 -.\" Manual: MySQL Database System -.\" Source: MySQL 5.5 -.\" Language: English -.\" -.TH "\FBMYSQL_PLUGIN\FR" "1" "12/08/2012" "MySQL 5\&.5" "MySQL Database System" -.\" ----------------------------------------------------------------- -.\" * Define some portability stuff -.\" ----------------------------------------------------------------- -.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.\" http://bugs.debian.org/507673 -.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html -.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.ie \n(.g .ds Aq \(aq -.el .ds Aq ' -.\" ----------------------------------------------------------------- -.\" * set default formatting -.\" ----------------------------------------------------------------- -.\" disable hyphenation -.nh -.\" disable justification (adjust text to left margin only) -.ad l -.\" ----------------------------------------------------------------- -.\" * MAIN CONTENT STARTS HERE * -.\" ----------------------------------------------------------------- -.\" mysql_plugin -.SH "NAME" -mysql_plugin \- configure MySQL server plugins -.SH "SYNOPSIS" -.HP \w'\fBmysql_plugin\ [\fR\fB\fIoptions\fR\fR\fB]\ \fR\fB\fIplugin\fR\fR\fB\ {ENABLE|DISABLE}\fR\ 'u -\fBmysql_plugin [\fR\fB\fIoptions\fR\fR\fB] \fR\fB\fIplugin\fR\fR\fB {ENABLE|DISABLE}\fR -.SH "DESCRIPTION" -.PP -The -\fBmysql_plugin\fR -utility enables MySQL administrators to manage which plugins a MySQL server loads\&. It provides an alternative to manually specifying the -\fB\-\-plugin\-load\fR -option at server startup or using the -INSTALL PLUGIN -and -UNINSTALL PLUGIN -statements at runtime\&. -\fBmysql_plugin\fR -is available as of MySQL 5\&.5\&.16\&. -.PP -Depending on whether -\fBmysql_plugin\fR -is invoked to enable or disable plugins, it inserts or deletes rows in the -mysql\&.plugin -table that serves as a plugin registry\&. (To perform this operation, -\fBmysql_plugin\fR -invokes the MySQL server in bootstrap mode\&. This means that the server must not already be running\&.) For normal server startups, the server loads and enables plugins listed in -mysql\&.plugin -automatically\&. For additional control over plugin activation, use -\fB\-\-\fR\fB\fIplugin_name\fR\fR -options named for specific plugins, as described in -Section\ \&5.1.8.1, \(lqInstalling and Uninstalling Plugins\(rq\&. -.PP -Each invocation of -\fBmysql_plugin\fR -reads a configuration file to determine how to configure the plugins contained in a single plugin library object file\&. To invoke -\fBmysql_plugin\fR, use this syntax: -.sp -.if n \{\ -.RS 4 -.\} -.nf -mysql_plugin [\fIoptions\fR] \fIplugin\fR {ENABLE|DISABLE} -.fi -.if n \{\ -.RE -.\} -.PP -\fIplugin\fR -is the name of the plugin to configure\&. -ENABLE -or -DISABLE -(not case sensitive) specify whether to enable or disable components of the plugin library named in the configuration file\&. The order of the -\fIplugin\fR -and -ENABLE -or -DISABLE -arguments does not matter\&. -.PP -For example, to configure components of a plugin library file named -myplugins\&.so -on Linux or -myplugins\&.dll -on Windows, specify a -\fIplugin\fR -value of -myplugins\&. Suppose that this plugin library contains three plugins, -plugin1, -plugin2, and -plugin3, all of which should be configured under -\fBmysql_plugin\fR -control\&. By convention, configuration files have a suffix of -\&.ini -and the same basename as the plugin library, so the default configuration file name for this plugin library is -myplugins\&.ini\&. The configuration file contents look like this: -.sp -.if n \{\ -.RS 4 -.\} -.nf -myplugins -plugin1 -plugin2 -plugin3 -.fi -.if n \{\ -.RE -.\} -.PP -The first line in the -myplugins\&.ini -file is the name of the library object file, without any extension such as -\&.so -or -\&.dll\&. The remaining lines are the names of the components to be enabled or disabled\&. Each value in the file should be on a separate line\&. Lines on which the first character is -\*(Aq#\*(Aq -are taken as comments and ignored\&. -.PP -To enable the plugins listed in the configuration file, invoke -\fBmysql_plugin\fR -this way: -.sp -.if n \{\ -.RS 4 -.\} -.nf -shell> \fBmysql_plugin myplugins ENABLE\fR -.fi -.if n \{\ -.RE -.\} -.PP -To disable the plugins, use -DISABLE -rather than -ENABLE\&. -.PP -An error occurs if -\fBmysql_plugin\fR -cannot find the configuration file or plugin library file, or if -\fBmysql_plugin\fR -cannot start the MySQL server\&. -.PP -\fBmysql_plugin\fR -supports the following options, which can be specified on the command line or in the -[mysqld] -group of any option file\&. For options specified in a -[mysqld] -group, -\fBmysql_plugin\fR -recognizes the -\fB\-\-basedir\fR, -\fB\-\-datadir\fR, and -\fB\-\-plugin\-dir\fR -options and ignores others\&. For information about option files, see -Section\ \&4.2.3.3, \(lqUsing Option Files\(rq\&. -.PP -mysql_plugin Options -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -.\" mysql_plugin: help option -.\" help option: mysql_plugin -\fB\-\-help\fR, -\fB\-?\fR -.sp -Display a help message and exit\&. -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -.\" mysql_plugin: basedir option -.\" basedir option: mysql_plugin -\fB\-\-basedir=\fR\fB\fIpath\fR\fR, -\fB\-b \fR\fB\fIpath\fR\fR -.sp -The server base directory\&. -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -.\" mysql_plugin: datadir option -.\" datadir option: mysql_plugin -\fB\-\-datadir=\fR\fB\fIpath\fR\fR, -\fB\-d \fR\fB\fIpath\fR\fR -.sp -The server data directory\&. -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -.\" mysql_plugin: my-print-defaults option -.\" my-print-defaults option: mysql_plugin -\fB\-\-my\-print\-defaults=\fR\fB\fIpath\fR\fR, -\fB\-b \fR\fB\fIpath\fR\fR -.sp -The path to the -\fBmy_print_defaults\fR -program\&. -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -.\" mysql_plugin: mysqld option -.\" mysqld option: mysql_plugin -\fB\-\-mysqld=\fR\fB\fIpath\fR\fR, -\fB\-b \fR\fB\fIpath\fR\fR -.sp -The path to the -\fBmysqld\fR -server\&. -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -.\" mysql_plugin: no-defaults option -.\" no-defaults option: mysql_plugin -\fB\-\-no\-defaults\fR, -\fB\-p\fR -.sp -Do not read values from the configuration file\&. This option enables an administrator to skip reading defaults from the configuration file\&. -.sp -With -\fBmysql_plugin\fR, this option need not be given first on the command line, unlike most other MySQL programs that support -\fB\-\-no\-defaults\fR\&. -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -.\" mysql_plugin: plugin-dir option -.\" plugin-dir option: mysql_plugin -\fB\-\-plugin\-dir=\fR\fB\fIpath\fR\fR, -\fB\-p \fR\fB\fIpath\fR\fR -.sp -The server plugin directory\&. -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -.\" mysql_plugin: plugin-ini option -.\" plugin-ini option: mysql_plugin -\fB\-\-plugin\-ini=\fR\fB\fIfile_name\fR\fR, -\fB\-i \fR\fB\fIfile_name\fR\fR -.sp -The -\fBmysql_plugin\fR -configuration file\&. Relative path names are interpreted relative to the current directory\&. If this option is not given, the default is -\fIplugin\fR\&.ini -in the plugin directory, where -\fIplugin\fR -is the -\fIplugin\fR -argument on the command line\&. -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -.\" mysql_plugin: print-defaults option -.\" print-defaults option: mysql_plugin -\fB\-\-print\-defaults\fR, -\fB\-P\fR -.sp -Display the default values from the configuration file\&. This option causes -\fBmysql_plugin\fR -to print the defaults for -\fB\-\-basedir\fR, -\fB\-\-datadir\fR, and -\fB\-\-plugin\-dir\fR -if they are found in the configuration file\&. If no value for a variable is found, nothing is shown\&. -.sp -With -\fBmysql_plugin\fR, this option need not be given first on the command line, unlike most other MySQL programs that support -\fB\-\-print\-defaults\fR\&. -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -.\" mysql_plugin: verbose option -.\" verbose option: mysql_plugin -\fB\-\-verbose\fR, -\fB\-v\fR -.sp -Verbose mode\&. Print more information about what the program does\&. This option can be used multiple times to increase the amount of information\&. -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -.\" mysql_plugin: version option -.\" version option: mysql_plugin -\fB\-\-version\fR, -\fB\-V\fR -.sp -Display version information and exit\&. -.RE -.SH "COPYRIGHT" -.br -.PP -Copyright \(co 1997, 2012, Oracle and/or its affiliates. All rights reserved. -.PP -This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. -.PP -This documentation is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. -.PP -You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see http://www.gnu.org/licenses/. -.sp -.SH "SEE ALSO" -For more information, please refer to the MySQL Reference Manual, -which may already be installed locally and which is also available -online at http://dev.mysql.com/doc/. -.SH AUTHOR -Oracle Corporation (http://dev.mysql.com/).