Merge lp:~percona-core/percona-server/release-5.6.20-68.0 into lp:percona-server/5.6

Proposed by Tomislav Plavcic
Status: Merged
Approved by: Laurynas Biveinis
Approved revision: no longer in the source branch.
Merged at revision: 656
Proposed branch: lp:~percona-core/percona-server/release-5.6.20-68.0
Merge into: lp:percona-server/5.6
Diff against target: 516 lines (+282/-8)
6 files modified
build-ps/debian/changelog (+6/-0)
build-ps/percona-server.spec (+147/-6)
build-ps/rpm/mysql-systemd (+92/-0)
build-ps/rpm/mysql.service (+31/-0)
policy/selinux/percona-server.te (+5/-1)
storage/innobase/include/univ.i (+1/-1)
To merge this branch: bzr merge lp:~percona-core/percona-server/release-5.6.20-68.0
Reviewer Review Type Date Requested Status
Laurynas Biveinis (community) Approve
Review via email: mp+232863@code.launchpad.net

This proposal supersedes a proposal from 2014-09-01.

Description of the change

Release branch for version 5.6.20-68.0

To post a comment you must log in.
Revision history for this message
Laurynas Biveinis (laurynas-biveinis) wrote : Posted in a previous version of this proposal

See BLD-193

review: Needs Information
Revision history for this message
Tomislav Plavcic (tplavcic) wrote : Posted in a previous version of this proposal

From BLD-193:
Since we had PS releases on friday there was no time to make changes and test for PS (5.5/5.6) but "sed" part will not stay. So before GA I'll add our version of my.cnf and remove sed part (if there's no conclusion that this is wrong and something else needs to be done).

Revision history for this message
Laurynas Biveinis (laurynas-biveinis) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'build-ps/debian/changelog'
--- build-ps/debian/changelog 2014-08-22 13:31:49 +0000
+++ build-ps/debian/changelog 2014-09-01 09:04:28 +0000
@@ -1,3 +1,9 @@
1percona-server-5.6 (5.6.20-rel68.0) unstable; urgency=low
2
3 * Added mysqld-debug
4
5 -- Tomislav Plavcic <tomislav.plavcic@percona.com> Tue, 26 Aug 2014 16:18:06 +0200
6
1percona-server-5.6 (5.6.19-rel67.0) unstable; urgency=low7percona-server-5.6 (5.6.19-rel67.0) unstable; urgency=low
28
3 * Fixed missing libperconaserverclient library9 * Fixed missing libperconaserverclient library
410
=== modified file 'build-ps/percona-server.spec'
--- build-ps/percona-server.spec 2014-07-01 08:43:29 +0000
+++ build-ps/percona-server.spec 2014-09-01 09:04:28 +0000
@@ -32,6 +32,18 @@
3232
33#33#
34%bcond_with tokudb34%bcond_with tokudb
35%bcond_with systemd
36#
37%if %{with systemd}
38 %define systemd 1
39%else
40 %if 0%{?rhel} > 6
41 %define systemd 1
42 %else
43 %define systemd 0
44 %endif
45%endif
46
35#47#
36%if %{with tokudb}48%if %{with tokudb}
37 %define TOKUDB_FLAGS -DWITH_VALGRIND=OFF -DUSE_VALGRIND=OFF -DDEBUG_EXTNAME=OFF -DBUILD_TESTING=OFF -DUSE_GTAGS=OFF -DUSE_CTAGS=OFF -DUSE_ETAGS=OFF -DUSE_CSCOPE=OFF49 %define TOKUDB_FLAGS -DWITH_VALGRIND=OFF -DUSE_VALGRIND=OFF -DDEBUG_EXTNAME=OFF -DBUILD_TESTING=OFF -DUSE_GTAGS=OFF -DUSE_CTAGS=OFF -DUSE_ETAGS=OFF -DUSE_CSCOPE=OFF
@@ -204,7 +216,7 @@
204 %define distro_description Generic Linux (kernel %{generic_kernel})216 %define distro_description Generic Linux (kernel %{generic_kernel})
205 %define distro_releasetag linux%{generic_kernel}217 %define distro_releasetag linux%{generic_kernel}
206 %define distro_buildreq gcc-c++ gperf ncurses-devel perl readline-devel time zlib-devel libaio-devel bison cmake218 %define distro_buildreq gcc-c++ gperf ncurses-devel perl readline-devel time zlib-devel libaio-devel bison cmake
207 %define distro_requires coreutils grep procps /sbin/chkconfig /usr/sbin/useradd /usr/sbin/groupadd219 %define distro_requires coreutils grep procps /usr/sbin/useradd /usr/sbin/groupadd
208%endif220%endif
209221
210# ----------------------------------------------------------------------------222# ----------------------------------------------------------------------------
@@ -248,6 +260,9 @@
248Vendor: %{percona_server_vendor}260Vendor: %{percona_server_vendor}
249Provides: mysql-server261Provides: mysql-server
250BuildRequires: %{distro_buildreq} pam-devel openssl-devel262BuildRequires: %{distro_buildreq} pam-devel openssl-devel
263%if 0%{?systemd}
264BuildRequires: systemd
265%endif
251266
252# Think about what you use here since the first step is to267# Think about what you use here since the first step is to
253# run a rm -rf268# run a rm -rf
@@ -271,6 +286,16 @@
271Summary: Percona Server: a very fast and reliable SQL database server286Summary: Percona Server: a very fast and reliable SQL database server
272Group: Applications/Databases287Group: Applications/Databases
273Requires: %{distro_requires} Percona-Server-shared%{product_suffix} Percona-Server-client%{product_suffix}288Requires: %{distro_requires} Percona-Server-shared%{product_suffix} Percona-Server-client%{product_suffix}
289Requires: perl(Data::Dumper)
290%if 0%{?systemd}
291Requires(post): systemd
292Requires(preun): systemd
293Requires(postun): systemd
294%else
295Requires(post): /sbin/chkconfig
296Requires(preun): /sbin/chkconfig
297Requires(preun): /sbin/service
298%endif
274Provides: mysql-server MySQL-server299Provides: mysql-server MySQL-server
275Conflicts: Percona-SQL-server-50 Percona-Server-server-51 Percona-Server-server-55300Conflicts: Percona-SQL-server-50 Percona-Server-server-51 Percona-Server-server-55
276301
@@ -305,6 +330,28 @@
305%endif330%endif
306331
307# ----------------------------------------------------------------------------332# ----------------------------------------------------------------------------
333%package -n Percona-Server-selinux%{product_suffix}
334Summary: Percona Server - Selinux policy module
335Group: Applications/Databases
336%if 0%{?rhel} >= 6
337BuildArch: noarch
338%endif
339Requires: selinux-policy
340Requires(post): policycoreutils
341Requires(postun): policycoreutils
342
343%if 0%{?rhel} == 6
344BuildRequires: selinux-policy
345%else
346BuildRequires: selinux-policy-devel
347%endif
348
349%description -n Percona-Server-selinux%{product_suffix}
350This package contains SELinux policy module for Percona Server package.
351
352For a description of Percona Server see http://www.percona.com/software/percona-server/
353
354# ----------------------------------------------------------------------------
308%package -n Percona-Server-client%{product_suffix}355%package -n Percona-Server-client%{product_suffix}
309Summary: Percona Server - Client356Summary: Percona Server - Client
310Group: Applications/Databases357Group: Applications/Databases
@@ -320,6 +367,7 @@
320# ----------------------------------------------------------------------------367# ----------------------------------------------------------------------------
321%package -n Percona-Server-test%{product_suffix}368%package -n Percona-Server-test%{product_suffix}
322Requires: Percona-Server-client%{product_suffix} perl369Requires: Percona-Server-client%{product_suffix} perl
370Requires: perl(Socket), perl(Time::HiRes), perl(Data::Dumper), perl(Test::More)
323Summary: Percona Server - Test suite371Summary: Percona Server - Test suite
324Group: Applications/Databases372Group: Applications/Databases
325Provides: mysql-test373Provides: mysql-test
@@ -505,6 +553,13 @@
505install -d $RBR%{_sbindir}553install -d $RBR%{_sbindir}
506install -d $RBR%{_libdir}/mysql/plugin554install -d $RBR%{_libdir}/mysql/plugin
507555
556# SElinux
557pushd ${MBD}/policy
558make -f /usr/share/selinux/devel/Makefile
559install -D -m 0644 $MBD/policy/percona-server.pp $RBR%{_datadir}/selinux/packages/percona-server/percona-server.pp
560popd
561# SElinux END
562
508(563(
509 cd $MBD/release564 cd $MBD/release
510 make DESTDIR=$RBR benchdir_root=%{_datadir} install565 make DESTDIR=$RBR benchdir_root=%{_datadir} install
@@ -523,7 +578,13 @@
523578
524# Install logrotate and autostart579# Install logrotate and autostart
525install -m 644 $MBD/release/support-files/mysql-log-rotate $RBR%{_sysconfdir}/logrotate.d/mysql580install -m 644 $MBD/release/support-files/mysql-log-rotate $RBR%{_sysconfdir}/logrotate.d/mysql
581%if 0%{?systemd}
582install -D -m 0755 $MBD/build-ps/rpm/mysql-systemd $RBR%{_bindir}/mysql-systemd
583install -D -m 0644 $MBD/build-ps/rpm/mysql.service $RBR%{_unitdir}/mysql.service
584%else
526install -m 755 $MBD/release/support-files/mysql.server $RBR%{_sysconfdir}/init.d/mysql585install -m 755 $MBD/release/support-files/mysql.server $RBR%{_sysconfdir}/init.d/mysql
586%endif
587
527#588#
528%{__rm} -f $RBR/%{_prefix}/README*589%{__rm} -f $RBR/%{_prefix}/README*
529#590#
@@ -551,9 +612,12 @@
551 "$RBR%{_libdir}/mysql/%{malloc_lib_target}"612 "$RBR%{_libdir}/mysql/%{malloc_lib_target}"
552%endif613%endif
553614
554# Remove man pages we explicitly do not want to package, avoids 'unpackaged615# Remove files we explicitly do not want to package, avoids 'unpackaged
555# files' warning.616# files' warning.
556rm -f $RBR%{_mandir}/man1/make_win_bin_dist.1*617rm -f $RBR%{_mandir}/man1/make_win_bin_dist.1*
618%if 0%{?systemd}
619rm -rf $RBR%{_sysconfdir}/init.d/mysql
620%endif
557621
558##############################################################################622##############################################################################
559# Post processing actions, i.e. when installed623# Post processing actions, i.e. when installed
@@ -561,6 +625,15 @@
561625
562%pre -n Percona-Server-server%{product_suffix}626%pre -n Percona-Server-server%{product_suffix}
563627
628# On rhel7 change default MariaDB options if they exists (only on initial installation)
629%if "%rhel" > "6"
630if [ $1 -eq 1 -a -f /etc/my.cnf ]; then
631 sed -i 's/log-error=\/var\/log\/mariadb\/mariadb.log/log-error=\/var\/log\/mysqld.log/g' /etc/my.cnf;
632 sed -i 's/pid-file=\/var\/run\/mariadb\/mariadb.pid/pid-file=\/var\/run\/mysqld\/mysqld.pid/g' /etc/my.cnf;
633 sed -i 's/\!includedir \/etc\/my.cnf.d/\#\!includedir \/etc\/my.cnf.d/g' /etc/my.cnf;
634fi
635%endif
636
564# ATTENTION: Parts of this are duplicated in the "triggerpostun" !637# ATTENTION: Parts of this are duplicated in the "triggerpostun" !
565638
566# There are users who deviate from the default file system layout.639# There are users who deviate from the default file system layout.
@@ -716,11 +789,31 @@
716# Note we *could* make that depend on $SERVER_TO_START, but we rather don't,789# Note we *could* make that depend on $SERVER_TO_START, but we rather don't,
717# so a "stop" is attempted even if there is no PID file.790# so a "stop" is attempted even if there is no PID file.
718# (Maybe the "stop" doesn't work then, but we might fix that in itself.)791# (Maybe the "stop" doesn't work then, but we might fix that in itself.)
792%if 0%{?systemd}
793SYSD_ACTIVE=$(systemctl is-active mysql)
794if [ $SYSD_ACTIVE == "active" ] ; then
795 %{_bindir}/systemctl stop mysql >/dev/null 2>&1
796 echo "Giving mysqld 5 seconds to exit nicely"
797 sleep 5
798fi
799%else
719if [ -x %{_sysconfdir}/init.d/mysql ] ; then800if [ -x %{_sysconfdir}/init.d/mysql ] ; then
720 %{_sysconfdir}/init.d/mysql stop > /dev/null 2>&1801 %{_sysconfdir}/init.d/mysql stop > /dev/null 2>&1
721 echo "Giving mysqld 5 seconds to exit nicely"802 echo "Giving mysqld 5 seconds to exit nicely"
722 sleep 5803 sleep 5
723fi804fi
805%endif
806
807# SElinux
808%post -n Percona-Server-selinux%{product_suffix}
809/usr/sbin/semodule -i %{_datadir}/selinux/packages/percona-server/percona-server.pp >/dev/null 2>&1 || :
810
811%postun -n Percona-Server-selinux%{product_suffix}
812if [ $1 -eq 0 ] ; then
813 /usr/sbin/semodule -r percona-server >/dev/null 2>&1 || :
814fi
815
816#SElinux
724817
725%post -n Percona-Server-server%{product_suffix}818%post -n Percona-Server-server%{product_suffix}
726819
@@ -757,12 +850,18 @@
757# NOTE: This still needs to be debated. Should we check whether these links850# NOTE: This still needs to be debated. Should we check whether these links
758# for the other run levels exist(ed) before the upgrade?851# for the other run levels exist(ed) before the upgrade?
759# use chkconfig on Enterprise Linux and newer SuSE releases852# use chkconfig on Enterprise Linux and newer SuSE releases
853%if 0%{?systemd}
854if [ -x %{_bindir}/systemctl ] ; then
855 %{_bindir}/systemctl enable mysql >/dev/null 2>&1
856fi
857%else
760if [ -x /sbin/chkconfig ] ; then858if [ -x /sbin/chkconfig ] ; then
761 /sbin/chkconfig --add mysql859 /sbin/chkconfig --add mysql
762# use insserv for older SuSE Linux versions860# use insserv for older SuSE Linux versions
763elif [ -x /sbin/insserv ] ; then861elif [ -x /sbin/insserv ] ; then
764 /sbin/insserv %{_sysconfdir}/init.d/mysql862 /sbin/insserv %{_sysconfdir}/init.d/mysql
765fi863fi
864%endif
766865
767# ----------------------------------------------------------------------866# ----------------------------------------------------------------------
768# Create a MySQL user and group. Do not report any problems if it already867# Create a MySQL user and group. Do not report any problems if it already
@@ -822,12 +921,18 @@
822921
823# Was the server running before the upgrade? If so, restart the new one.922# Was the server running before the upgrade? If so, restart the new one.
824if [ "$SERVER_TO_START" = "true" ] ; then923if [ "$SERVER_TO_START" = "true" ] ; then
924%if 0%{?systemd}
925if [ -x %{_bindir}/systemctl ] ; then
926 %{_bindir}/systemctl start mysql
927fi
928%else
825 # Restart in the same way that mysqld will be started normally.929 # Restart in the same way that mysqld will be started normally.
826 if [ -x %{_sysconfdir}/init.d/mysql ] ; then930 if [ -x %{_sysconfdir}/init.d/mysql ] ; then
827 %{_sysconfdir}/init.d/mysql start931 %{_sysconfdir}/init.d/mysql start
828 echo "Giving mysqld 5 seconds to start"
829 sleep 5
830 fi932 fi
933%endif
934 echo "Giving mysqld 5 seconds to start"
935 sleep 5
831fi936fi
832937
833echo "Percona Server is distributed with several useful UDF (User Defined Function) from Percona Toolkit."938echo "Percona Server is distributed with several useful UDF (User Defined Function) from Percona Toolkit."
@@ -862,8 +967,14 @@
862# Remove last version of package 0 "967# Remove last version of package 0 "
863#968#
864# http://docs.fedoraproject.org/en-US/Fedora_Draft_Documentation/0.1/html/RPM_Guide/ch09s04s05.html969# http://docs.fedoraproject.org/en-US/Fedora_Draft_Documentation/0.1/html/RPM_Guide/ch09s04s05.html
865 970
866if [ $1 = 0 ] ; then971if [ $1 = 0 ] ; then
972%if 0%{?systemd}
973 if [ -x %{_bindir}/systemctl ] ; then
974 %{_bindir}/systemctl stop mysql > /dev/null
975 %{_bindir}/systemctl disable mysql > /dev/null
976 fi
977%else
867 # Stop MySQL before uninstalling it978 # Stop MySQL before uninstalling it
868 if [ -x %{_sysconfdir}/init.d/mysql ] ; then979 if [ -x %{_sysconfdir}/init.d/mysql ] ; then
869 %{_sysconfdir}/init.d/mysql stop > /dev/null980 %{_sysconfdir}/init.d/mysql stop > /dev/null
@@ -876,6 +987,7 @@
876 /sbin/insserv -r %{_sysconfdir}/init.d/mysql987 /sbin/insserv -r %{_sysconfdir}/init.d/mysql
877 fi988 fi
878 fi989 fi
990%endif
879fi991fi
880992
881# We do not remove the mysql user since it may still own a lot of993# We do not remove the mysql user since it may still own a lot of
@@ -918,21 +1030,35 @@
918fi1030fi
919echo "Analyzed: SERVER_TO_START=$SERVER_TO_START"1031echo "Analyzed: SERVER_TO_START=$SERVER_TO_START"
9201032
1033%if 0%{?systemd}
1034if [ -x %{_bindir}/systemctl ] ; then
1035 %{_bindir}/systemctl enable mysql >/dev/null 2>&1
1036fi
1037%else
921if [ -x /sbin/chkconfig ] ; then1038if [ -x /sbin/chkconfig ] ; then
922 /sbin/chkconfig --add mysql1039 /sbin/chkconfig --add mysql
923# use insserv for older SuSE Linux versions1040# use insserv for older SuSE Linux versions
924elif [ -x /sbin/insserv ] ; then1041elif [ -x /sbin/insserv ] ; then
925 /sbin/insserv %{_sysconfdir}/init.d/mysql1042 /sbin/insserv %{_sysconfdir}/init.d/mysql
926fi1043fi
1044%endif
9271045
928# Was the server running before the upgrade? If so, restart the new one.1046# Was the server running before the upgrade? If so, restart the new one.
929if [ "$SERVER_TO_START" = "true" ] ; then1047if [ "$SERVER_TO_START" = "true" ] ; then
930 # Restart in the same way that mysqld will be started normally.1048# Restart in the same way that mysqld will be started normally.
1049%if 0%{?systemd}
1050 if [ -x %{_bindir}/systemctl ] ; then
1051 %{_bindir}/systemctl start mysql
1052 echo "Giving mysqld 5 seconds to start"
1053 sleep 5
1054 fi
1055%else
931 if [ -x %{_sysconfdir}/init.d/mysql ] ; then1056 if [ -x %{_sysconfdir}/init.d/mysql ] ; then
932 %{_sysconfdir}/init.d/mysql start1057 %{_sysconfdir}/init.d/mysql start
933 echo "Giving mysqld 5 seconds to start"1058 echo "Giving mysqld 5 seconds to start"
934 sleep 51059 sleep 5
935 fi1060 fi
1061%endif
936fi1062fi
9371063
938echo "Trigger 'postun --community' finished at `date`" >> $STATUS_HISTORY1064echo "Trigger 'postun --community' finished at `date`" >> $STATUS_HISTORY
@@ -975,6 +1101,10 @@
975# Files section1101# Files section
976##############################################################################1102##############################################################################
9771103
1104%files -n Percona-Server-selinux%{product_suffix}
1105%dir %attr(755, root, root) %{_datadir}/selinux/packages/percona-server
1106%attr(644, root, root) %{_datadir}/selinux/packages/percona-server/percona-server.pp
1107
978%files -n Percona-Server-server%{product_suffix}1108%files -n Percona-Server-server%{product_suffix}
979%defattr(-,root,root,0755)1109%defattr(-,root,root,0755)
9801110
@@ -1043,6 +1173,9 @@
1043%attr(755, root, root) %{_bindir}/replace1173%attr(755, root, root) %{_bindir}/replace
1044%attr(755, root, root) %{_bindir}/resolve_stack_dump1174%attr(755, root, root) %{_bindir}/resolve_stack_dump
1045%attr(755, root, root) %{_bindir}/resolveip1175%attr(755, root, root) %{_bindir}/resolveip
1176%if 0%{?systemd}
1177%attr(755, root, root) %{_bindir}/mysql-systemd
1178%endif
10461179
1047%attr(755, root, root) %{_sbindir}/mysqld1180%attr(755, root, root) %{_sbindir}/mysqld
1048%attr(755, root, root) %{_sbindir}/mysqld-debug1181%attr(755, root, root) %{_sbindir}/mysqld-debug
@@ -1105,7 +1238,11 @@
1105%endif1238%endif
11061239
1107%attr(644, root, root) %config(noreplace,missingok) %{_sysconfdir}/logrotate.d/mysql1240%attr(644, root, root) %config(noreplace,missingok) %{_sysconfdir}/logrotate.d/mysql
1241%if 0%{?systemd}
1242%attr(644, root, root) %{_unitdir}/mysql.service
1243%else
1108%attr(755, root, root) %{_sysconfdir}/init.d/mysql1244%attr(755, root, root) %{_sysconfdir}/init.d/mysql
1245%endif
11091246
1110# %attr(755, root, root) %{_datadir}/percona-server/1247# %attr(755, root, root) %{_datadir}/percona-server/
1111%attr(755, root, root) %{_datadir}/percona-server/binary-configure1248%attr(755, root, root) %{_datadir}/percona-server/binary-configure
@@ -1246,6 +1383,10 @@
1246%doc %attr(644, root, man) %{_mandir}/man1/mysqltest_embedded.1*1383%doc %attr(644, root, man) %{_mandir}/man1/mysqltest_embedded.1*
12471384
1248%changelog1385%changelog
1386* Tue Aug 26 2014 Tomislav Plavcic <tomislav.plavcic@percona.com>
1387
1388- Added support for centos7
1389
1249* Mon May 26 2014 Tomislav Plavcic <tomislav.plavcic@percona.com>1390* Mon May 26 2014 Tomislav Plavcic <tomislav.plavcic@percona.com>
12501391
1251- Added packaging changes regarding TokuDB1392- Added packaging changes regarding TokuDB
12521393
=== added directory 'build-ps/rpm'
=== added file 'build-ps/rpm/mysql-systemd'
--- build-ps/rpm/mysql-systemd 1970-01-01 00:00:00 +0000
+++ build-ps/rpm/mysql-systemd 2014-09-01 09:04:28 +0000
@@ -0,0 +1,92 @@
1#! /bin/bash
2#
3# Scripts to run by Percona Server systemd service
4#
5# Needed argument: pre | post
6#
7# pre mode : try to run mysql_install_db and fix perms and SELinux contexts
8# post mode : ping server until answer is received
9#
10
11parse_cnf()
12{
13 local var=$1
14 shift
15 local groups=$*
16 reval=$(my_print_defaults $groups | awk -F= '{if ($1 ~ /_/) { gsub(/_/,"-",$1); print $1"="$2 } else { print $0 }}' | grep -- "--$var=" | cut -d= -f2- | tail -n 1 )
17 if [[ -z ${reval:-} ]];then
18 reval=""
19 fi
20 echo $reval
21}
22
23install_db () {
24 # Note: something different than datadir=/var/lib/mysql requires SELinux policy changes (in enforcing mode)
25 log=$(parse_cnf log-error server mysqld mysqld_safe)
26 datadir=$(parse_cnf datadir server mysqld)
27 if [[ -z ${datadir:-} ]]; then
28 datadir="/var/lib/mysql"
29 fi
30
31 # Check that pid-file directory exists and has valid permissions
32 pid_path=$(parse_cnf pid-file server mysqld mysqld_safe)
33 if [[ -z "${pid_path:-}" ]]; then
34 pid_path=$datadir/`hostname`.pid
35 else
36 case "$pid_path" in
37 /* ) ;;
38 * ) pid_path="$datadir/$pid_path" ;;
39 esac
40 fi
41 pidfiledir=$(dirname $pid_path)
42
43 if [ ! -z $pidfiledir ]; then
44 [ -d "$pidfiledir" ] || install -d -m 0755 -omysql -gmysql "$pidfiledir" || exit 1
45 fi
46
47 # Restore log, dir, perms and SELinux contexts
48 [ -d "$datadir" ] || install -d -m 0755 -omysql -gmysql "$datadir" || exit 1
49 if [ -x /usr/sbin/restorecon ]; then
50 /usr/sbin/restorecon "$datadir"
51 if [ ! -z $pidfiledir ]; then
52 /usr/sbin/restorecon "$pidfiledir"
53 fi
54 fi
55
56 # If log file is not specified it's put into datadir by default
57 if [ ! -z $log ]; then
58 [ -e $log ] || touch $log
59 chmod 0640 $log
60 chown mysql:mysql $log || exit 1
61 if [ -x /usr/sbin/restorecon ]; then
62 /usr/sbin/restorecon $log
63 fi
64 fi
65
66 # If special mysql dir is in place, skip db install
67 [ -d "$datadir/mysql" ] && exit 0
68
69 # Create initial db
70 /usr/bin/mysql_install_db --rpm --datadir="$datadir" --user=mysql
71 exit 0
72}
73
74pinger () {
75 # Wait for ping to answer to signal startup completed,
76 # might take a while in case of e.g. crash recovery
77 # MySQL systemd service will timeout script if no answer
78 while /bin/true ; do
79 sleep 1
80 mysqladmin ping >/dev/null 2>&1 && break
81 done
82 exit 0
83}
84
85# main
86case $1 in
87 "pre") install_db ;;
88 "post") pinger ;;
89esac
90
91exit 0
92
093
=== added file 'build-ps/rpm/mysql.service'
--- build-ps/rpm/mysql.service 1970-01-01 00:00:00 +0000
+++ build-ps/rpm/mysql.service 2014-09-01 09:04:28 +0000
@@ -0,0 +1,31 @@
1#
2# Systemd service file for Percona Server
3#
4# # This service file is to start PS just with mysqld_safe
5#
6
7[Unit]
8Description=MySQL Percona Server
9After=network.target
10After=syslog.target
11
12[Install]
13WantedBy=multi-user.target
14Alias=mysql.service
15
16[Service]
17# Needed to create system tables etc.
18ExecStartPre=/usr/bin/mysql-systemd pre
19
20# Start main service
21ExecStart=/usr/bin/mysqld_safe
22
23# Don't signal startup success before a ping works
24ExecStartPost=/usr/bin/mysql-systemd post
25
26# Give up if ping don't get an answer
27TimeoutSec=600
28
29Restart=always
30PrivateTmp=false
31
032
=== modified file 'policy/selinux/percona-server.te'
--- policy/selinux/percona-server.te 2013-03-01 19:17:07 +0000
+++ policy/selinux/percona-server.te 2014-09-01 09:04:28 +0000
@@ -11,8 +11,9 @@
11 class sock_file { getattr unlink create };11 class sock_file { getattr unlink create };
12 class capability { sys_nice sys_resource };12 class capability { sys_nice sys_resource };
13 class blk_file { read write open };13 class blk_file { read write open };
14 class file { write getattr read create unlink open };14 class file { append write getattr read create unlink open setattr };
15 class dir { search read write remove_name open add_name };15 class dir { search read write remove_name open add_name };
16 class process { siginh noatsecure rlimitinh };
16}17}
1718
18#============= mysqld_safe_t ==============19#============= mysqld_safe_t ==============
@@ -22,6 +23,9 @@
22allow mysqld_safe_t tmp_t:sock_file { getattr unlink };23allow mysqld_safe_t tmp_t:sock_file { getattr unlink };
23allow mysqld_safe_t user_tmp_t:sock_file { getattr unlink };24allow mysqld_safe_t user_tmp_t:sock_file { getattr unlink };
2425
26#!!!! This avc has a dontaudit rule in the current policy
27allow mysqld_safe_t mysqld_t:process { siginh rlimitinh noatsecure };
28
25#============= mysqld_t ==============29#============= mysqld_t ==============
26allow mysqld_t fixed_disk_device_t:blk_file { read write open };30allow mysqld_t fixed_disk_device_t:blk_file { read write open };
27allow mysqld_t tmp_t:sock_file { create unlink };31allow mysqld_t tmp_t:sock_file { create unlink };
2832
=== modified file 'storage/innobase/include/univ.i'
--- storage/innobase/include/univ.i 2014-08-22 13:31:49 +0000
+++ storage/innobase/include/univ.i 2014-09-01 09:04:28 +0000
@@ -47,7 +47,7 @@
47#define INNODB_VERSION_BUGFIX MYSQL_VERSION_PATCH47#define INNODB_VERSION_BUGFIX MYSQL_VERSION_PATCH
4848
49#ifndef PERCONA_INNODB_VERSION49#ifndef PERCONA_INNODB_VERSION
50#define PERCONA_INNODB_VERSION 67.050#define PERCONA_INNODB_VERSION 68.0
51#endif51#endif
5252
53/* Enable UNIV_LOG_ARCHIVE in XtraDB */53/* Enable UNIV_LOG_ARCHIVE in XtraDB */

Subscribers

People subscribed via source and target branches

to all changes: