summaryrefslogtreecommitdiffstats
path: root/abs/core
diff options
context:
space:
mode:
Diffstat (limited to 'abs/core')
-rwxr-xr-x[-rw-r--r--]abs/core/mysql/PKGBUILD164
-rw-r--r--abs/core/mysql/__changelog4
-rwxr-xr-x[-rw-r--r--]abs/core/mysql/my.cnf51
-rw-r--r--abs/core/mysql/mysql.install10
-rwxr-xr-xabs/core/mysql/mysqld-post.sh7
-rw-r--r--abs/core/mysql/mysqld-tmpfile.conf1
-rwxr-xr-xabs/core/mysql/mysqld.rc (renamed from abs/core/mysql/mysqld)6
-rw-r--r--abs/core/mysql/mysqld.service11
-rw-r--r--abs/core/mysql/skip-abi-check.patch13
9 files changed, 147 insertions, 120 deletions
diff --git a/abs/core/mysql/PKGBUILD b/abs/core/mysql/PKGBUILD
index 3ce1aeb..5d9cbb7 100644..100755
--- a/abs/core/mysql/PKGBUILD
+++ b/abs/core/mysql/PKGBUILD
@@ -1,109 +1,133 @@
-# $Id: PKGBUILD 88432 2010-08-23 17:32:08Z pierre $
+# $Id: PKGBUILD 167246 2012-09-29 09:32:53Z andrea $
# Maintainer: Andrea Scarpino <andrea@archlinux.org>
# Contributor: Douglas Soares de Andrade <douglas@archlinux.org>
-# Contributor: judd <jvinet@zeroflux.org>
pkgbase=mysql
pkgname=('libmysqlclient' 'mysql-clients' 'mysql')
-pkgver=5.1.59
+pkgver=5.5.28
pkgrel=1
arch=('i686' 'x86_64')
license=('GPL')
-url="http://www.mysql.com/"
-makedepends=('tcp_wrappers' 'zlib' 'perl' 'openssl' 'libtool' 'patch')
+url="https://www.mysql.com/products/community/"
+makedepends=('cmake' 'openssl' 'zlib')
options=('!libtool')
-source=("http://ftp.gwdg.de/pub/misc/mysql/Downloads/MySQL-5.1/${pkgbase}-${pkgver}.tar.gz"
- 'mysqld'
- 'my.cnf'
- 'skip-abi-check.patch')
+source=("http://ftp.gwdg.de/pub/misc/mysql/Downloads/MySQL-5.5/${pkgbase}-${pkgver}.tar.gz"
+ 'mysqld.rc' 'my.cnf' 'mysqld-post.sh' 'mysqld-tmpfile.conf' 'mysqld.service')
build() {
- cd "${srcdir}/${pkgbase}-${pkgver}"
- patch -Np0 -i "${srcdir}/skip-abi-check.patch"
+ mkdir build
+ cd build
+
# CFLAGS/CXXFLAGS as suggested upstream
- CFLAGS="-fPIC ${CFLAGS} -fno-strict-aliasing -DBIG_JOINS=1 -fomit-frame-pointer" \
- CXXFLAGS="-fPIC ${CXXFLAGS} -fno-strict-aliasing -DBIG_JOINS=1 -felide-constructors -fno-rtti" \
- ./configure --prefix=/usr \
- --libexecdir=/usr/sbin \
- --localstatedir=/var \
- --sysconfdir=/etc/mysql \
- --without-docs \
- --without-readline \
- --with-ssl \
- --with-libwrap \
- --with-charset=utf8 \
- --with-collation=utf8_general_ci \
- --with-extra-charsets=complex \
- --with-embedded-server \
- --with-unix-socket-path=/var/run/mysqld/mysqld.sock \
- --enable-local-infile \
- --with-plugins=partition,ftexample,archive,blackhole,federated,heap,innobase,innodb_plugin,ndbcluster
- make || return 1
+
+ cmake ../${pkgbase}-${pkgver} \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DSYSCONFDIR=/etc/mysql \
+ -DMYSQL_DATADIR=/var/lib/mysql \
+ -DMYSQL_UNIX_ADDR=/run/mysqld/mysqld.sock \
+ -DDEFAULT_CHARSET=utf8 \
+ -DDEFAULT_COLLATION=utf8_general_ci \
+ -DENABLED_LOCAL_INFILE=ON \
+ -DINSTALL_INFODIR=share/mysql/docs \
+ -DINSTALL_MANDIR=share/man \
+ -DINSTALL_PLUGINDIR=lib/mysql/plugin \
+ -DINSTALL_SCRIPTDIR=bin \
+ -DINSTALL_INCLUDEDIR=include/mysql \
+ -DINSTALL_DOCREADMEDIR=share/mysql \
+ -DINSTALL_SUPPORTFILESDIR=share/mysql \
+ -DINSTALL_MYSQLSHAREDIR=share/mysql \
+ -DINSTALL_DOCDIR=share/mysql/docs \
+ -DINSTALL_SHAREDIR=share/mysql \
+ -DWITH_READLINE=ON \
+ -DWITH_ZLIB=system \
+ -DWITH_SSL=system \
+ -DWITH_LIBWRAP=OFF \
+ -DWITH_MYSQLD_LDFLAGS="${LDFLAGS}" \
+ -DWITH_EXTRA_CHARSETS=complex \
+ -DWITH_EMBEDDED_SERVER=ON \
+ -DWITH_INNOBASE_STORAGE_ENGINE=1 \
+ -DWITH_PARTITION_STORAGE_ENGINE=1 \
+ -DWITHOUT_EXAMPLE_STORAGE_ENGINE=1 \
+ -DWITHOUT_ARCHIVE_STORAGE_ENGINE=1 \
+ -DWITHOUT_BLACKHOLE_STORAGE_ENGINE=1 \
+ -DWITHOUT_FEDERATED_STORAGE_ENGINE=1 \
+ -DCMAKE_C_FLAGS="-fPIC ${CFLAGS} -fno-strict-aliasing -DBIG_JOINS=1 -fomit-frame-pointer" \
+ -DCMAKE_CXX_FLAGS="-fPIC ${CXXFLAGS} -fno-strict-aliasing -DBIG_JOINS=1 -felide-constructors -fno-rtti"
+
+ make
}
package_libmysqlclient(){
pkgdesc="MySQL client libraries"
- depends=('openssl' 'zlib' 'gcc-libs' 'tcp_wrappers')
-
- cd "${srcdir}/${pkgbase}-${pkgver}"
- for dir in include libmysql libmysql_r libmysqld; do
+ depends=('openssl')
+
+ cd build
+ for dir in include libmysql libmysqld libservices; do
make -C ${dir} DESTDIR="${pkgdir}" install
done
- install -m644 include/*.h "${pkgdir}/usr/include/mysql/"
-
- install -d "${pkgdir}/usr/bin"
- install -m755 scripts/mysql_config "${pkgdir}/usr/bin/"
-
- # create library symlinks in /usr/lib
- ln -sf mysql/libmysqlclient.so.16 ${pkgdir}/usr/lib/libmysqlclient.so.16
- ln -sf libmysqlclient.so.16 ${pkgdir}/usr/lib/libmysqlclient.so
- ln -sf libmysqlclient.so.16 ${pkgdir}/usr/lib/libmysqlclient.so.1
- ln -sf mysql/libmysqlclient_r.so.16 ${pkgdir}/usr/lib/libmysqlclient_r.so.16
- ln -sf libmysqlclient_r.so.16 ${pkgdir}/usr/lib/libmysqlclient_r.so
- ln -sf libmysqlclient_r.so.16 ${pkgdir}/usr/lib/libmysqlclient_r.so.1
+
+ install -d "${pkgdir}"/usr/bin
+ install -m755 scripts/mysql_config "${pkgdir}"/usr/bin/
+ install -d "${pkgdir}"/usr/share/man/man1
+ for man in mysql_config mysql_client_test_embedded mysqltest_embedded; do
+ install -m644 "${srcdir}"/${pkgbase}-${pkgver}/man/$man.1 "${pkgdir}"/usr/share/man/man1/$man.1
+ done
}
package_mysql-clients(){
pkgdesc="MySQL client tools"
depends=('libmysqlclient')
-
- cd "${srcdir}/${pkgbase}-${pkgver}/client"
- make DESTDIR="${pkgdir}" install
- # provided by libmysqlclient
- rm -rf "${pkgdir}/usr/lib/"
+ cd build
+ make -C client DESTDIR="${pkgdir}" install
+
+ # install man pages
+ install -d "${pkgdir}"/usr/share/man/man1
+ for man in mysql mysqladmin mysqlcheck mysqldump mysqlimport mysqlshow mysqlslap; do
+ install -m644 "${srcdir}"/${pkgbase}-${pkgver}/man/$man.1 "${pkgdir}"/usr/share/man/man1/$man.1
+ done
# provided by mysql
- rm -f "${pkgdir}"/usr/bin/{mysql_upgrade,mysqlbinlog,mysqltest}
+ rm "${pkgdir}"/usr/bin/{mysql_{plugin,upgrade},mysqlbinlog,mysqltest}
}
package_mysql(){
pkgdesc="A fast SQL database server"
- backup=('etc/my.cnf' 'etc/mysql/my.cnf')
+ backup=('etc/mysql/my.cnf')
install=mysql.install
- depends=('mysql-clients')
- optdepends=('perl-dbi' 'perl-dbd-mysql')
+ depends=('mysql-clients' 'systemd-tools')
+ options=('emptydirs')
- cd "${srcdir}/${pkgbase}-${pkgver}"
- make DESTDIR=${pkgdir} install
+ cd build
+ make DESTDIR="${pkgdir}" install
- install -Dm644 ${srcdir}/my.cnf ${pkgdir}/etc/mysql/my.cnf
- install -Dm755 ${srcdir}/mysqld ${pkgdir}/etc/rc.d/mysqld
+ install -Dm644 "${srcdir}"/my.cnf "${pkgdir}"/etc/mysql/my.cnf
+ install -Dm755 "${srcdir}"/mysqld.rc "${pkgdir}"/etc/rc.d/mysqld
+ install -Dm755 "${srcdir}"/mysqld-post.sh "${pkgdir}"/usr/bin/mysqld-post
+ install -Dm644 "${srcdir}"/mysqld-tmpfile.conf "${pkgdir}"/usr/lib/tmpfiles.d/mysqld.conf
+ install -d "${pkgdir}"/usr/lib/systemd/system
+ install -Dm644 "${srcdir}"/mysqld.service "${pkgdir}"/usr/lib/systemd/system/
# provided by libmysqlclient
- rm -f ${pkgdir}/usr/bin/{mysql_config,mysql_client_test_embedded,mysqltest_embedded}
- rm -f ${pkgdir}/usr/lib/mysql/libmysqlclient*
- rm -f ${pkgdir}/usr/lib/mysql/libmysqld.a
- rm -f ${pkgdir}/usr/include/mysql/*.h
-
+ rm "${pkgdir}"/usr/bin/{mysql_config,mysql_client_test_embedded,mysqltest_embedded}
+ rm "${pkgdir}"/usr/lib/libmysql*
+ rm -r "${pkgdir}"/usr/include/
+ rm "${pkgdir}"/usr/share/man/man1/{mysql_config,mysql_client_test_embedded,mysqltest_embedded}.1
+
# provided by mysql-clients
- rm -f ${pkgdir}/usr/bin/{mysql,mysqladmin,mysqlcheck,mysqldump,mysqlimport,mysqlshow,mysqlslap}
+ rm "${pkgdir}"/usr/bin/{mysql,mysqladmin,mysqlcheck,mysqldump,mysqlimport,mysqlshow,mysqlslap}
+ rm "${pkgdir}"/usr/share/man/man1/{mysql,mysqladmin,mysqlcheck,mysqldump,mysqlimport,mysqlshow,mysqlslap}.1
# not needed
- rm -rf ${pkgdir}/usr/{mysql-test,sql-bench}
- rm -f ${pkgdir}/usr/lib/mysql/plugin/*.a
+ rm -r "${pkgdir}"/usr/{data,mysql-test,sql-bench}
+ rm "${pkgdir}"/usr/share/man/man1/mysql-test-run.pl.1
+
+ install -dm700 "${pkgdir}"/var/lib/mysql
}
-md5sums=('1e89816164692f44f768024db4bc05f6'
- '2234207625baa29b2ff7d7b4f088abce'
- 'd60099985e68e36b156423fca6b50924'
- 'a97e574945e19de3908575b956241026')
+md5sums=('da8ddb3d00e6e159153d2444360f52a8'
+ 'e7eb2faeab755cbb2fe03542bf328da9'
+ '698827c2380bd5f831f2b8160cee4cae'
+ '6ea6ceb360d09a774e87335ee098ddd5'
+ '2fa6e456964d4ff5e6d4f9ff0126aed6'
+ 'a0e1460c276a50a9666c331de83271f2')
diff --git a/abs/core/mysql/__changelog b/abs/core/mysql/__changelog
index 96a3b29..6aac3a6 100644
--- a/abs/core/mysql/__changelog
+++ b/abs/core/mysql/__changelog
@@ -1,3 +1 @@
-using default arch pkgbuild
-my.cnf has data dir modified to use /data/srv
-upgrade to 5.1.52
+data dir /data/srv/mysql \ No newline at end of file
diff --git a/abs/core/mysql/my.cnf b/abs/core/mysql/my.cnf
index 6f0a683..457a750 100644..100755
--- a/abs/core/mysql/my.cnf
+++ b/abs/core/mysql/my.cnf
@@ -1,13 +1,14 @@
-# Example MySQL config file for large systems.
+# MySQL config file for medium systems.
#
-# This is for a large system with memory = 512M where the system runs mainly
-# MySQL.
+# This is for a system with little memory (32M - 64M) where MySQL plays
+# an important part, or systems up to 128M where MySQL is used together with
+# other programs (such as a web server)
#
-# You can copy this file to
-# /etc/my.cnf to set global options,
-# mysql-data-dir/my.cnf to set server-specific options (in this
-# installation this directory is /var) or
-# ~/.my.cnf to set user-specific options.
+# MySQL programs look for option files in a set of
+# locations which depend on the deployment platform.
+# You can copy this option file to one of those
+# locations. For information about these locations, see:
+# http://dev.mysql.com/doc/mysql/en/option-files.html
#
# In this file, you can use all long options that a program supports.
# If you want to know which options a program supports, run the program
@@ -26,7 +27,9 @@ socket = /var/run/mysqld/mysqld.sock
port = 3306
socket = /var/run/mysqld/mysqld.sock
datadir = /data/srv/mysql
-skip-locking
+skip-external-locking
+
+net_buffer_length = 8K
key_buffer_size = 80M
max_allowed_packet = 1M
table_open_cache = 256
@@ -39,20 +42,22 @@ myisam_sort_buffer_size = 64M
thread_cache_size = 8
query_cache_size = 16M
join_buffer_size = 128K
-# Try number of CPU's*2 for thread_concurrency
-#thread_concurrency = 8
+
# Don't listen on a TCP/IP port at all. This can be a security enhancement,
# if all processes that need to connect to mysqld run on the same host.
# All interaction with mysqld must be made via Unix sockets or named pipes.
# Note that using this option without enabling named pipes on Windows
# (via the "enable-named-pipe" option) will render mysqld useless!
-#
+#
#skip-networking
# Replication Master Server (default)
# binary logging is required for replication
-#log-bin
+log-bin=mysql-bin
+
+# binary logging format - mixed recommended
+binlog_format=mixed
# required unique id between 1 and 2^32 - 1
# defaults to 1 if master-host is not set
@@ -112,15 +117,7 @@ server-id = 1
#master-port = <port>
#
# binary logging - not required for slaves, but recommended
-#log-bin
-
-# Point the following paths to different dedicated disks
-#tmpdir = /tmp/
-#log-update = /path-to-dedicated-directory/hostname
-
-# Uncomment the following if you are using BDB tables
-#bdb_cache_size = 4M
-#bdb_max_lock = 10000
+#log-bin=mysql-bin
# Uncomment the following if you are using InnoDB tables
#innodb_data_home_dir = /var/lib/mysql
@@ -141,18 +138,12 @@ quick
max_allowed_packet = 16M
[mysql]
-#no-auto-rehash
+no-auto-rehash
# Remove the next comment character if you are not familiar with SQL
#safe-updates
-[isamchk]
-key_buffer = 20M
-sort_buffer_size = 20M
-read_buffer = 2M
-write_buffer = 2M
-
[myisamchk]
-key_buffer = 20M
+key_buffer_size = 20M
sort_buffer_size = 20M
read_buffer = 2M
write_buffer = 2M
diff --git a/abs/core/mysql/mysql.install b/abs/core/mysql/mysql.install
index 9e9011d..a98f1a8 100644
--- a/abs/core/mysql/mysql.install
+++ b/abs/core/mysql/mysql.install
@@ -1,13 +1,21 @@
post_install(){
groupadd -g 89 mysql &>/dev/null
useradd -u 89 -g mysql -d /var/lib/mysql -s /bin/false mysql &>/dev/null
- usr/bin/mysql_install_db --user=mysql
+ usr/bin/mysql_install_db --user=mysql --basedir=/usr
chown -R mysql:mysql var/lib/mysql &>/dev/null
+
+ usr/bin/systemd-tmpfiles --create mysqld.conf
}
post_upgrade(){
getent group mysql >/dev/null 2>&1 || groupadd -g 89 mysql &>/dev/null
getent passwd mysql >/dev/null 2>&1 || useradd -u 89 -g mysql -d /var/lib/mysql -s /bin/false mysql &>/dev/null
+
+ if [ "$(vercmp $2 5.5)" -lt 0 ]; then
+ echo " >> "
+ echo " >> Major version update. Consider restart the service, and then running mysql_upgrade after it."
+ echo " >> "
+ fi
}
post_remove(){
diff --git a/abs/core/mysql/mysqld-post.sh b/abs/core/mysql/mysqld-post.sh
new file mode 100755
index 0000000..8dc9c4e
--- /dev/null
+++ b/abs/core/mysql/mysqld-post.sh
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+while true; do
+ response=`/usr/bin/mysqladmin -uUNKNOWN_USER ping 2>&1` && break
+ echo "$response" | grep -q "mysqld is alive" && break
+ sleep 1
+done
diff --git a/abs/core/mysql/mysqld-tmpfile.conf b/abs/core/mysql/mysqld-tmpfile.conf
new file mode 100644
index 0000000..6883dc7
--- /dev/null
+++ b/abs/core/mysql/mysqld-tmpfile.conf
@@ -0,0 +1 @@
+d /run/mysqld 0755 mysql mysql -
diff --git a/abs/core/mysql/mysqld b/abs/core/mysql/mysqld.rc
index 1ac88a7..4bbddb5 100755
--- a/abs/core/mysql/mysqld
+++ b/abs/core/mysql/mysqld.rc
@@ -11,7 +11,7 @@ getPID() {
case "$1" in
start)
stat_busy "Starting MySQL Server"
- [ ! -d /var/run/mysqld ] && install -d -g mysql -o mysql /var/run/mysqld &>/dev/null
+ [ ! -d /run/mysqld ] && install -d -g mysql -o mysql /run/mysqld &>/dev/null
if [ -z "$(getPID)" ]; then
/usr/bin/mysqld_safe --user=mysql &>/dev/null &
if [ $? -gt 0 ]; then
@@ -29,7 +29,7 @@ case "$1" in
stat_fail
exit 1
else
- echo $(getPID) > /var/run/mysqld/mysqld.pid
+ echo $(getPID) > /run/mysqld/mysqld.pid
add_daemon mysqld
stat_done
fi
@@ -54,7 +54,7 @@ case "$1" in
let timeo=${timeo}-1
done
if [ -z "$(getPID)" ]; then
- rm -f /var/run/mysqld/mysqld.pid &>/dev/null
+ rm -f /run/mysqld/mysqld.pid &>/dev/null
rm_daemon mysqld
stat_done
else
diff --git a/abs/core/mysql/mysqld.service b/abs/core/mysql/mysqld.service
new file mode 100644
index 0000000..0175c68
--- /dev/null
+++ b/abs/core/mysql/mysqld.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=MySQL Server
+
+[Service]
+User=mysql
+ExecStart=/usr/bin/mysqld --user=mysql
+ExecStartPost=/usr/bin/mysqld-post
+Restart=always
+
+[Install]
+WantedBy=multi-user.target
diff --git a/abs/core/mysql/skip-abi-check.patch b/abs/core/mysql/skip-abi-check.patch
deleted file mode 100644
index 6791deb..0000000
--- a/abs/core/mysql/skip-abi-check.patch
+++ /dev/null
@@ -1,13 +0,0 @@
---- Makefile.in.orig 2010-05-28 20:03:46.507224494 +0200
-+++ Makefile.in 2010-05-28 20:04:05.737221909 +0200
-@@ -1126,10 +1126,8 @@
- #
-
- abi_check: $(API_PREPROCESSOR_HEADER)
-- $(MAKE) abi_headers="$^" do_abi_check
-
- abi_check_all: $(TEST_PREPROCESSOR_HEADER)
-- $(MAKE) abi_headers="$^" do_abi_check
-
- do_abi_check:
- set -ex; \