Do not use scl prefix more than once in paths

Based on https://www.redhat.com/archives/sclorg/2015-February/msg00038.html

Conflicts:
	community-mysql.spec
This commit is contained in:
Honza Horak 2015-03-06 15:59:39 +01:00
parent 82d026ef29
commit 062422d0a1
3 changed files with 17 additions and 8 deletions

View File

@ -52,12 +52,16 @@
%global daemondir %{_sysconfdir}/rc.d/init.d %global daemondir %{_sysconfdir}/rc.d/init.d
%endif %endif
%global daemon_name mysqld %global daemon_name mysqld
%global daemon_no_prefix mysqld
# Directory for storing pid file
%global pidfiledir %{_localstatedir}/run/%{daemon_name}
# We define some system's well known locations here so we can use them easily # We define some system's well known locations here so we can use them easily
# later when building to another location (like SCL) # later when building to another location (like SCL)
%global logrotateddir %{_sysconfdir}/logrotate.d %global logrotateddir %{_sysconfdir}/logrotate.d
%global logfiledir %{_localstatedir}/log %global logfiledir %{_localstatedir}/log
%global logfile %{logfiledir}/%{daemon_name}.log %global logfile %{logfiledir}/%{daemon_no_prefix}.log
# Defining where database data live # Defining where database data live
%global dbdatadir %{_localstatedir}/lib/mysql %global dbdatadir %{_localstatedir}/lib/mysql
@ -74,7 +78,7 @@
Name: community-mysql Name: community-mysql
Version: 5.6.23 Version: 5.6.23
Release: 3%{?with_debug:.debug}%{?dist} Release: 4%{?with_debug:.debug}%{?dist}
Summary: MySQL client programs and shared libraries Summary: MySQL client programs and shared libraries
Group: Applications/Databases Group: Applications/Databases
URL: http://www.mysql.com URL: http://www.mysql.com
@ -459,8 +463,9 @@ cmake .. \
-DFEATURE_SET="community" \ -DFEATURE_SET="community" \
-DINSTALL_LAYOUT=RPM \ -DINSTALL_LAYOUT=RPM \
-DDAEMON_NAME="%{daemon_name}" \ -DDAEMON_NAME="%{daemon_name}" \
-DDAEMON_NO_PREFIX="%{daemon_no_prefix}" \
-DLOG_LOCATION="%{logfile}" \ -DLOG_LOCATION="%{logfile}" \
-DPID_FILE_DIR="%{_localstatedir}/run/%{daemon_name}" \ -DPID_FILE_DIR="%{pidfiledir}" \
-DNICE_PROJECT_NAME="MySQL" \ -DNICE_PROJECT_NAME="MySQL" \
-DCMAKE_INSTALL_PREFIX="%{_prefix}" \ -DCMAKE_INSTALL_PREFIX="%{_prefix}" \
-DSYSCONFDIR="%{_sysconfdir}" \ -DSYSCONFDIR="%{_sysconfdir}" \
@ -527,7 +532,7 @@ install -p -m 0644 Docs/INFO_BIN %{buildroot}%{_libdir}/mysql/
mkdir -p %{buildroot}%{logfiledir} mkdir -p %{buildroot}%{logfiledir}
touch %{buildroot}%{logfile} touch %{buildroot}%{logfile}
mkdir -p %{buildroot}%{_localstatedir}/run/%{daemon_name} mkdir -p %{buildroot}%{pidfiledir}
install -p -m 0755 -d %{buildroot}%{dbdatadir} install -p -m 0755 -d %{buildroot}%{dbdatadir}
%if %{with config} %if %{with config}
@ -895,7 +900,7 @@ fi
%{?with_init_systemd:%{_tmpfilesdir}/%{name}.conf} %{?with_init_systemd:%{_tmpfilesdir}/%{name}.conf}
%attr(0755,mysql,mysql) %dir %{dbdatadir} %attr(0755,mysql,mysql) %dir %{dbdatadir}
%attr(0755,mysql,mysql) %dir %{_localstatedir}/run/%{daemon_name} %attr(0755,mysql,mysql) %dir %{pidfiledir}
%attr(0755,mysql,mysql) %dir %{_localstatedir}/lib/mysql %attr(0755,mysql,mysql) %dir %{_localstatedir}/lib/mysql
%attr(0640,mysql,mysql) %config %ghost %verify(not md5 size mtime) %{logfile} %attr(0640,mysql,mysql) %config %ghost %verify(not md5 size mtime) %{logfile}
%config(noreplace) %{logrotateddir}/%{daemon_name} %config(noreplace) %{logrotateddir}/%{daemon_name}
@ -937,6 +942,10 @@ fi
%endif %endif
%changelog %changelog
* Tue Mar 03 2015 Honza Horak <hhorak@redhat.com> - 5.6.23-4
- Do not use scl prefix more than once in paths
Based on https://www.redhat.com/archives/sclorg/2015-February/msg00038.html
* Mon Feb 23 2015 Honza Horak <hhorak@redhat.com> - 5.6.23-3 * Mon Feb 23 2015 Honza Horak <hhorak@redhat.com> - 5.6.23-3
- Expand paths in perl scripts in mysql-test - Expand paths in perl scripts in mysql-test
- Use correct path in install_db script warning - Use correct path in install_db script warning

View File

@ -7,7 +7,7 @@
# description: MySQL database server. # description: MySQL database server.
# processname: mysqld # processname: mysqld
# config: @sysconfdir@/my.cnf # config: @sysconfdir@/my.cnf
# pidfile: /var/run/@DAEMON_NAME@/@DAEMON_NAME@.pid # pidfile: /var/run/@DAEMON_NAME@/@DAEMON_NO_PREFIX@.pid
### BEGIN INIT INFO ### BEGIN INIT INFO
# Provides: mysqld # Provides: mysqld
# Required-Start: $local_fs $remote_fs $network $named $syslog $time # Required-Start: $local_fs $remote_fs $network $named $syslog $time
@ -36,7 +36,7 @@ MYGROUP=mysql
# Edit the following file in order to re-write some of the environment # Edit the following file in order to re-write some of the environment
# variables defined above, like $STARTTIMEOUT, $STOPTIMEOUT, $exec # variables defined above, like $STARTTIMEOUT, $STOPTIMEOUT, $exec
[ -e @sysconfdir@/sysconfig/$prog ] && . @sysconfdir@/sysconfig/$prog [ -e @sysconfdir@/sysconfig/@DAEMON_NO_PREFIX@ ] && . @sysconfdir@/sysconfig/@DAEMON_NO_PREFIX@
lockfile=/var/lock/subsys/$prog lockfile=/var/lock/subsys/$prog

View File

@ -17,7 +17,7 @@
datadir=@MYSQL_DATADIR@ datadir=@MYSQL_DATADIR@
socket=@MYSQL_UNIX_ADDR@ socket=@MYSQL_UNIX_ADDR@
log-error=@LOG_LOCATION@ log-error=@LOG_LOCATION@
pid-file=@PID_FILE_DIR@/@DAEMON_NAME@.pid pid-file=@PID_FILE_DIR@/@DAEMON_NO_PREFIX@.pid
# this is only for embedded server # this is only for embedded server