Summary: MySQL: a very fast and reliable SQL database server
Group: Applications/Databases
Version: 5.6.23_wsrep_25.10
-Release: %{release}%{?dist}~mos8.0.2
+Release: %{release}%{?dist}~mos8.0.3
# Distribution: %{distro_description}
License: Copyright (c) 2000, 2015, %{mysql_vendor}. All rights reserved. Under %{license_type} license as shown in the Description field.
Source: mysql-5.6.23.tar.gz
Provides: mysql = %{version}-%{release}
Provides: mysql%{?_isa} = %{version}-%{release}
Provides: MySQL-client-wsrep
+Provides: mysql-client = %{version}-%{release}
%description -n mysql-wsrep-client%{product_suffix}
This package contains the standard MySQL clients and administration tools.
%patch3 -p1
%patch4 -p1
%patch5 -p1
+%patch6 -p1
#wsrep_apply_patch_tag
##############################################################################
%build
install -d $RBR%{_libdir}
install -d $RBR%{_mandir}
install -d $RBR%{_sbindir}
+install -d $RBR%{_var}/log/mysql
+install -d $RBR%{_var}/run/mysqld
mkdir -p $RBR%{_sysconfdir}/my.cnf.d
# Touch the place where the my.cnf config file might be located
# Just to make sure it's in the file list and marked as a config file
-touch $RBR%{_sysconfdir}/my.cnf
+#touch $RBR%{_sysconfdir}/my.cnf
touch $RBR%{_sysconfdir}/wsrep.cnf
-
+install -m 660 $MBD/packaging/rpm-uln/my.cnf $RBR%{_sysconfdir}/my.cnf
# Install SELinux files in datadir
install -m 600 $MBD/support-files/RHEL4-SElinux/mysql.{fc,te} \
# ATTENTION: Parts of this are duplicated in the "triggerpostun" !
+# ----------------------------------------------------------------------
+# Create a MySQL user and group. Do not report any problems if it already
+# exists.
+# ----------------------------------------------------------------------
+getent group %{mysqld_group} || groupadd -r %{mysqld_group}
+getent passwd %{mysqld_user} || \
+useradd -M -r -d %{mysqldatadir} -s /bin/bash -c "MySQL server" \
+ -g %{mysqld_group} %{mysqld_user}
+# The user may already exist, make sure it has the proper group nevertheless
+# (BUG#12823)
+usermod -g %{mysqld_group} %{mysqld_user}
+
# There are users who deviate from the default file system layout.
# Check local settings to support them.
if [ -x %{_bindir}/my_print_defaults ]
/sbin/insserv %{_sysconfdir}/init.d/mysql
fi
-# ----------------------------------------------------------------------
-# Create a MySQL user and group. Do not report any problems if it already
-# exists.
-# ----------------------------------------------------------------------
-groupadd -r %{mysqld_group} 2> /dev/null || true
-useradd -M -r -d $mysql_datadir -s /bin/bash -c "MySQL server" \
- -g %{mysqld_group} %{mysqld_user} 2> /dev/null || true
-# The user may already exist, make sure it has the proper group nevertheless
-# (BUG#12823)
-usermod -g %{mysqld_group} %{mysqld_user} 2> /dev/null || true
-
# ----------------------------------------------------------------------
# Change permissions so that the user that will run the MySQL daemon
# owns all database files.
echo
fi
-if [ -x sbin/restorecon ] ; then
- sbin/restorecon -R var/lib/mysql
+if [ -x /sbin/restorecon ] ; then
+ /sbin/restorecon -R /var/lib/mysql
fi
# Was the server running before the upgrade? If so, restart the new one.
%doc %attr(644, root, man) %{_mandir}/man1/resolve_stack_dump.1*
%doc %attr(644, root, man) %{_mandir}/man1/resolveip.1*
-%ghost %config(noreplace,missingok) %{_sysconfdir}/my.cnf
-%ghost %config(noreplace,missingok) %{_sysconfdir}/wsrep.cnf
+#%ghost %config(noreplace,missingok) %{_sysconfdir}/my.cnf
+#%ghost %config(noreplace,missingok) %{_sysconfdir}/wsrep.cnf
+%config %{_sysconfdir}/my.cnf
+%config %{_sysconfdir}/wsrep.cnf
%dir %{_sysconfdir}/my.cnf.d
%attr(755, root, root) %{_bindir}/innochecksum
%attr(755, root, root) %{_datadir}/mysql/
%dir %attr(755, mysql, mysql) /var/lib/mysql
+%dir %{_var}/log/mysql
+%dir %{_var}/run/mysqld
+%attr(755, mysql, mysql) %{_var}/run/mysqld
+
+#%dir %attr(755, root, root) /var/log/mysql
+#%dir %attr(755, mysql, mysql) /var/run/mysqld
+
# ----------------------------------------------------------------------------
%files -n mysql-wsrep-client%{product_suffix}