diff --git a/srcpkgs/mysql/files/mysqld/log/run b/srcpkgs/mysql/files/mysqld/log/run new file mode 100755 index 00000000000..b36c4dafa40 --- /dev/null +++ b/srcpkgs/mysql/files/mysqld/log/run @@ -0,0 +1,2 @@ +#!/bin/sh +exec logger -p daemon.notice diff --git a/srcpkgs/mysql/files/mysqld/run b/srcpkgs/mysql/files/mysqld/run new file mode 100755 index 00000000000..bc16a07883e --- /dev/null +++ b/srcpkgs/mysql/files/mysqld/run @@ -0,0 +1,4 @@ +#!/bin/sh +[ ! -d /run/mysqld ] && mkdir -p /run/mysqld +chown mysql:mysql /run/mysqld +exec chpst -u mysql:mysql mysqld --user=mysql 2>&1 diff --git a/srcpkgs/mysql/template b/srcpkgs/mysql/template index ea7fe5a223d..9884739bae8 100644 --- a/srcpkgs/mysql/template +++ b/srcpkgs/mysql/template @@ -1,7 +1,7 @@ # Template file for 'mysql' pkgname=mysql version=5.6.20 -revision=1 +revision=2 build_style=cmake configure_args="-DSYSCONFDIR=/etc/mysql -DMYSQL_DATADIR=/var/lib/mysql -DMYSQL_UNIX_ADDR=/run/mysqld/mysqld.sock -DDEFAULT_CHARSET=utf8 @@ -20,11 +20,11 @@ configure_args="-DSYSCONFDIR=/etc/mysql -DMYSQL_DATADIR=/var/lib/mysql lib32disabled=yes hostmakedepends="perl cmake bison ncurses-devel" makedepends="zlib-devel ncurses-devel libressl-devel readline-devel" -depends="shadow mysql-client" +depends="mysql-client" conf_files="/etc/mysql/my.cnf" -systemd_services="mysqld.service on" system_accounts="mysql" -mysqld_homedir="/var/lib/mysql" +mysql_homedir="/var/lib/mysql" +replaces="runit-void<20141013_2" short_desc="The world's most popular open source database" maintainer="Juan RP " homepage="https://www.mysql.com/products/community/" @@ -49,7 +49,6 @@ pre_configure() { rm CMakeCache.txt fi } - pre_build() { if [ "$CROSS_BUILD" ]; then cp bin.host/comp_err ${wrksrc}/extra @@ -59,7 +58,6 @@ pre_build() { export PATH=${PATH}:${wrksrc}/extra:${wrksrc}/scripts:${wrksrc}/sql:${wrksrc}/storage/perfschema fi } - post_install() { # Remove unneeded stuff. rm -rf ${DESTDIR}/usr/{sql-bench,mysql-test,data} @@ -69,9 +67,13 @@ post_install() { vinstall ${FILESDIR}/my.cnf 640 etc/mysql # systemd service. - vinstall ${FILESDIR}/mysqld.service 644 usr/lib/systemd/system - vinstall ${FILESDIR}/mysqld-post 755 usr/bin - vinstall ${FILESDIR}/mysqld.tmpfilesd 644 usr/lib/tmpfiles.d mysqld.conf + if [ "$build_option_systemd" ]; then + vinstall ${FILESDIR}/mysqld.service 644 usr/lib/systemd/system + vinstall ${FILESDIR}/mysqld-post 755 usr/bin + vinstall ${FILESDIR}/mysqld.tmpfilesd 644 usr/lib/tmpfiles.d mysqld.conf + fi + # runit service + vsv mysqld } libmysqlclient_package() { @@ -80,7 +82,6 @@ libmysqlclient_package() { vmove "usr/lib/libmysqlclient*.so.*" } } - libmysqlclient-devel_package() { depends="libmysqlclient>=${version}_${revision}" short_desc+=" - development files" @@ -92,7 +93,6 @@ libmysqlclient-devel_package() { vmove "usr/lib/*.so" } } - mysql-client_package() { depends="perl" short_desc+=" - database client binaries"