diff --git a/README.mysql-cnf b/README.mysql-cnf index 10a75fa..3700c7f 100644 --- a/README.mysql-cnf +++ b/README.mysql-cnf @@ -7,7 +7,7 @@ provided in this distribution. Thus, it is recommended to use these configuration files as an addition to the default my.cnf configuration file. -Since default my.cnf contains `!includedir @sysconfdir@/my.cnf.d` directive, it is -recommended to copy required configuration under @sysconfdir@/my.cnf.d/ directory, +Since default my.cnf contains `!includedir @INSTALL_SYSCONF2DIR@` directive, it is +recommended to copy required configuration under @INSTALL_SYSCONF2DIR@ directory, so the default my.cnf specifications will be extended. diff --git a/mariadb-paths.patch b/mariadb-paths.patch index c79302a..78ea82a 100644 --- a/mariadb-paths.patch +++ b/mariadb-paths.patch @@ -151,3 +151,15 @@ diff -up mariadb-10.0.12/scripts/mytop.sh.cmakepaths mariadb-10.0.12/scripts/myt for (@search_dirs) { +diff -up mariadb-10.0.12/scripts/CMakeLists.txt.patchs mariadb-10.0.12/scripts/CMakeLists.txt +--- mariadb-10.0.12/scripts/CMakeLists.txt.patchs 2014-08-04 22:21:02.577917599 +0200 ++++ mariadb-10.0.12/scripts/CMakeLists.txt 2014-08-04 22:21:42.712940832 +0200 +@@ -221,7 +221,7 @@ INSTALL_SCRIPT( + ENDIF() + + SET(prefix "${CMAKE_INSTALL_PREFIX}") +-SET(sysconfdir ${prefix}) ++SET(sysconfdir ${prefix}/${INSTALL_SYSCONFDIR}) + SET(bindir ${prefix}/${INSTALL_BINDIR}) + SET(libexecdir ${prefix}/${INSTALL_SBINDIR}) + SET(scriptdir ${prefix}/${INSTALL_BINDIR}) diff --git a/mariadb.spec b/mariadb.spec index cc9f84b..b72eff9 100644 --- a/mariadb.spec +++ b/mariadb.spec @@ -529,7 +529,7 @@ cmake . -DBUILD_CONFIG=mysql_release \ -DLOG_LOCATION="%{logfile}" \ -DLOG_LOCATION_COMPAT="%{old_logfile}" \ -DPID_FILE_DIR="%{_localstatedir}/run/%{daemon_name}" \ - -DPID_FILE_DIR_COMAPT="%{_localstatedir}/run/%{mysqld_unit}" \ + -DPID_FILE_DIR_COMPAT="%{_localstatedir}/run/%{mysqld_unit}" \ -DNICE_PROJECT_NAME="MariaDB" \ -DRPM="%{?rhel:rhel%{rhel}}%{!?rhel:fedora%{fedora}}" \ -DCMAKE_INSTALL_PREFIX="%{_prefix}" \ @@ -626,7 +626,7 @@ mkdir -p %{buildroot}%{_localstatedir}/run/%{name} install -p -m 0755 -d %{buildroot}%{_localstatedir}/lib/mysql %if %{ship_my_cnf} -install -D -p -m 0644 %{SOURCE3} %{buildroot}%{_sysconfdir}/my.cnf +install -D -p -m 0644 scripts/my.cnf %{buildroot}%{_sysconfdir}/my.cnf %else rm -f %{buildroot}%{_sysconfdir}/my.cnf.d/mysql-clients.cnf rm -f %{buildroot}%{_sysconfdir}/my.cnf diff --git a/my.cnf.in b/my.cnf.in index 06b7438..660c40e 100644 --- a/my.cnf.in +++ b/my.cnf.in @@ -14,16 +14,16 @@ symbolic-links=0 # Otherwise the RPMs would be in conflict. # Settings for particular implementations like MariaDB are then # defined in appropriate sections; for MariaDB server in [mariadb] section in -# @sysconfdir@/my.cnf.d/server.cnf (part of mariadb-server). +# @INSTALL_SYSCONF2DIR@/server.cnf (part of mariadb-server). # It doesn't matter that we set these settings only for [mysqld] here, # because they will be read and used in mysqld_safe as well. log-error=@LOG_LOCATION_COMPAT@ -pid-file=@PID_FILE_DIR_COMAPT@/@DAEMON_NAME_COMPAT@.pid +pid-file=@PID_FILE_DIR_COMPAT@/@DAEMON_NAME_COMPAT@.pid [mysqld_safe] # # include all files from the config directory # -!includedir @sysconfdir@/my.cnf.d +!includedir @INSTALL_SYSCONF2DIR@ diff --git a/mysql-scripts-common.sh b/mysql-scripts-common.sh index 2ec5fc5..925cf9c 100755 --- a/mysql-scripts-common.sh +++ b/mysql-scripts-common.sh @@ -47,12 +47,12 @@ datadir="$result" # returns log-error # log-error might be defined in mysqld_safe and mysqld sections, # the former has bigger priority -get_mysql_option "$server_sections" log-error "`hostname`.err" -errlogfile="$datadir/$result" +get_mysql_option "$server_sections" log-error "$datadir/`hostname`.err" +errlogfile="$result" get_mysql_option "$server_sections" socket "@MYSQL_UNIX_ADDR@" socketfile="$result" -get_mysql_option "$server_sections" pid-file "`hostname`.pid" -pidfile="$datadir/$result" +get_mysql_option "$server_sections" pid-file "$datadir/`hostname`.pid" +pidfile="$result" diff --git a/mysql.tmpfiles.d.in b/mysql.tmpfiles.d.in index 1a196ee..937087a 100644 --- a/mysql.tmpfiles.d.in +++ b/mysql.tmpfiles.d.in @@ -1,2 +1,2 @@ d @PID_FILE_DIR@ 0755 mysql mysql - -d @PID_FILE_DIR_COMAPT@ 0755 mysql mysql - +d @PID_FILE_DIR_COMPAT@ 0755 mysql mysql -