summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Hesse2015-06-28 22:15:42 +0200
committerChristian Hesse2015-06-28 22:15:42 +0200
commitb2000cc4bc7cdd2eeb9f90a4dff0826dbfaa7b6b (patch)
treedda01533f54694d85dc1b68df550ca4fdd556a2b
downloadaur-b2000cc4bc7cdd2eeb9f90a4dff0826dbfaa7b6b.tar.gz
initial import of mysql51 5.1.73-4
-rw-r--r--.SRCINFO46
-rw-r--r--PKGBUILD91
-rw-r--r--my.cnf148
-rw-r--r--mysql51.install22
-rw-r--r--mysqld-post.sh7
-rw-r--r--mysqld-tmpfile.conf1
-rw-r--r--mysqld.service11
-rw-r--r--mysqld@.service11
-rw-r--r--skip-abi-check.patch13
9 files changed, 350 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..8205ab719b9
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,46 @@
+pkgbase = mysql51
+ pkgdesc = A fast SQL database server, version 5.1.x
+ pkgver = 5.1.73
+ pkgrel = 4
+ url = https://www.mysql.com/products/community/
+ install = mysql51.install
+ arch = i686
+ arch = x86_64
+ license = GPL
+ makedepends = zlib
+ makedepends = perl
+ makedepends = libtool
+ depends = openssl
+ depends = gcc-libs
+ optdepends = perl-dbi
+ optdepends = perl-dbd-mysql
+ provides = mysql
+ provides = libmysqlclient
+ provides = mysql-clients
+ conflicts = mysql
+ conflicts = mariadb
+ conflicts = libmysqlclient
+ conflicts = libmariadbclient
+ conflicts = mysql-clients
+ conflicts = mariadb-clients
+ options = !libtool
+ backup = etc/mysql/my.cnf
+ source = http://ftp.gwdg.de/pub/misc/mysql/Downloads/MySQL-5.1/mysql-5.1.73.tar.gz
+ source = http://ftp.gwdg.de/pub/misc/mysql/Downloads/MySQL-5.1/mysql-5.1.73.tar.gz.asc
+ source = mysqld.service
+ source = mysqld@.service
+ source = mysqld-tmpfile.conf
+ source = mysqld-post.sh
+ source = my.cnf
+ source = skip-abi-check.patch
+ sha256sums = 05ebe21305408b24407d14b77607a3e5ffa3c300e03f1359d3066f301989dcb5
+ sha256sums = SKIP
+ sha256sums = f609540cbcedb4a16b8e9eaaf3b537e8af45127e09a7480ce411ca80026aa90c
+ sha256sums = c96471716d5a65bdefd88cab7ed2330353e5e07ee9d0cbfd53fbd41b536ed0cd
+ sha256sums = 2af318c52ae0fe5428e8a9245d1b0fc3bc5ce153842d1563329ceb1edfa83ddd
+ sha256sums = 9e98b2f942b407032f3a98914dc1d9a6a4bfe09d10b652bc040b0c213fc7a91b
+ sha256sums = ff0a55a4c7a5b8a3e0aca6d9d2238a126748a6c3d3cd28b6d09a12d4dc881f4c
+ sha256sums = 6a3c4702097bd7e5575030d4c37ca7d628ff9f2d6ed499ca3f55638a3f99668e
+
+pkgname = mysql51
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..ee7a9d4a923
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,91 @@
+# Maintainer: Christian Hesse <mail@eworm.de>
+# Contributor: Andrea Scarpino <andrea@archlinux.org>
+# Contributor: Douglas Soares de Andrade <douglas@archlinux.org>
+# Contributor: judd <jvinet@zeroflux.org>
+# Contributor: Danny Navarro <j@dannynavarro.net>
+
+pkgname=mysql51
+pkgver=5.1.73
+pkgrel=4
+arch=('i686' 'x86_64')
+license=('GPL')
+pkgdesc="A fast SQL database server, version 5.1.x"
+backup=('etc/mysql/my.cnf')
+url="https://www.mysql.com/products/community/"
+depends=('openssl' 'gcc-libs')
+makedepends=('zlib' 'perl' 'libtool')
+optdepends=('perl-dbi' 'perl-dbd-mysql')
+options=('!libtool')
+conflicts=('mysql' 'mariadb' 'libmysqlclient' 'libmariadbclient' 'mysql-clients' 'mariadb-clients')
+provides=('mysql' 'libmysqlclient' 'mysql-clients')
+install="${pkgname}.install"
+source=("http://ftp.gwdg.de/pub/misc/mysql/Downloads/MySQL-5.1/mysql-${pkgver}.tar.gz"{,.asc}
+ 'mysqld.service'
+ 'mysqld@.service'
+ 'mysqld-tmpfile.conf'
+ 'mysqld-post.sh'
+ 'my.cnf'
+ 'skip-abi-check.patch')
+sha256sums=('05ebe21305408b24407d14b77607a3e5ffa3c300e03f1359d3066f301989dcb5'
+ 'SKIP'
+ 'f609540cbcedb4a16b8e9eaaf3b537e8af45127e09a7480ce411ca80026aa90c'
+ 'c96471716d5a65bdefd88cab7ed2330353e5e07ee9d0cbfd53fbd41b536ed0cd'
+ '2af318c52ae0fe5428e8a9245d1b0fc3bc5ce153842d1563329ceb1edfa83ddd'
+ '9e98b2f942b407032f3a98914dc1d9a6a4bfe09d10b652bc040b0c213fc7a91b'
+ 'ff0a55a4c7a5b8a3e0aca6d9d2238a126748a6c3d3cd28b6d09a12d4dc881f4c'
+ '6a3c4702097bd7e5575030d4c37ca7d628ff9f2d6ed499ca3f55638a3f99668e')
+validpgpkeys=('A4A9406876FCBD3C456770C88C718D3B5072E1F5')
+
+build() {
+ cd "${srcdir}/mysql-${pkgver}"
+
+ patch -Np0 -i "${srcdir}/skip-abi-check.patch"
+
+ # 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 \
+ --with-readline \
+ --without-libedit \
+ --with-ssl \
+ --with-zlib-dir=/usr \
+ --with-charset=utf8 \
+ --with-collation=utf8_general_ci \
+ --with-extra-charsets=complex \
+ --with-embedded-server \
+ --with-unix-socket-path=/run/mysqld/mysqld.sock \
+ --enable-local-infile \
+ --with-plugins=innobase,innodb_plugin \
+ --datarootdir=/usr/share \
+ --localstatedir=/var/lib/mysql
+ make
+}
+
+package() {
+ cd "${srcdir}/mysql-${pkgver}"
+
+ make DESTDIR=${pkgdir} install
+
+ # 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 -m0644 ${srcdir}/my.cnf ${pkgdir}/etc/mysql/my.cnf
+ install -D -m0644 ${srcdir}/mysqld.service ${pkgdir}/usr/lib/systemd/system/mysqld.service
+ install -D -m0644 ${srcdir}/mysqld@.service ${pkgdir}/usr/lib/systemd/system/mysqld@.service
+ install -D -m0644 ${srcdir}/mysqld-tmpfile.conf ${pkgdir}/usr/lib/tmpfiles.d/mysqld.conf
+ install -D -m0755 ${srcdir}/mysqld-post.sh ${pkgdir}/usr/bin/mysqld-post
+
+ rm -r ${pkgdir}/usr/{sql-bench,mysql-test}
+
+ install -d -m0700 ${pkgdir}/var/lib/mysql
+}
+
diff --git a/my.cnf b/my.cnf
new file mode 100644
index 00000000000..40baf4899d9
--- /dev/null
+++ b/my.cnf
@@ -0,0 +1,148 @@
+# mysql config file for medium systems.
+#
+# This is for a system with little memory (32M - 64M) where MySQL plays
+# a important part and systems up to 128M where MySQL is used together with
+# other programs (like a web server)
+#
+# One can in this file use all long options that the program supports.
+# If you want to know which options a program support, run the program
+# with --help option.
+
+# The following options will be passed to all MySQL clients
+[client]
+#password = your_password
+port = 3306
+socket = /run/mysqld/mysqld.sock
+
+# Here follows entries for some specific programs
+
+# The MySQL server
+[mysqld]
+port = 3306
+socket = /run/mysqld/mysqld.sock
+datadir = /var/lib/mysql
+skip-external-locking
+key_buffer = 16M
+max_allowed_packet = 1M
+table_cache = 64
+sort_buffer_size = 512K
+net_buffer_length = 16K
+myisam_sort_buffer_size = 8M
+
+# 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
+
+# required unique id between 1 and 2^32 - 1
+# defaults to 1 if master-host is not set
+# but will not function as a master if omitted
+server-id = 1
+
+# Replication Slave (comment out master section to use this)
+#
+# To configure this host as a replication slave, you can choose between
+# two methods :
+#
+# 1) Use the CHANGE MASTER TO command (fully described in our manual) -
+# the syntax is:
+#
+# CHANGE MASTER TO MASTER_HOST=<host>, MASTER_PORT=<port>,
+# MASTER_USER=<user>, MASTER_PASSWORD=<password> ;
+#
+# where you replace <host>, <user>, <password> by quoted strings and
+# <port> by the master's port number (3306 by default).
+#
+# Example:
+#
+# CHANGE MASTER TO MASTER_HOST='125.564.12.1', MASTER_PORT=3306,
+# MASTER_USER='joe', MASTER_PASSWORD='secret';
+#
+# OR
+#
+# 2) Set the variables below. However, in case you choose this method, then
+# start replication for the first time (even unsuccessfully, for example
+# if you mistyped the password in master-password and the slave fails to
+# connect), the slave will create a master.info file, and any later
+# change in this file to the variables' values below will be ignored and
+# overridden by the content of the master.info file, unless you shutdown
+# the slave server, delete master.info and restart the slaver server.
+# For that reason, you may want to leave the lines below untouched
+# (commented) and instead use CHANGE MASTER TO (see above)
+#
+# required unique id between 2 and 2^32 - 1
+# (and different from the master)
+# defaults to 2 if master-host is set
+# but will not function as a slave if omitted
+#server-id = 2
+#
+# The replication master for this slave - required
+#master-host = <hostname>
+#
+# The username the slave will use for authentication when connecting
+# to the master - required
+#master-user = <username>
+#
+# The password the slave will authenticate with when connecting to
+# the master - required
+#master-password = <password>
+#
+# The port the master is listening on.
+# optional - defaults to 3306
+#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
+
+# Uncomment the following if you are using InnoDB tables
+#innodb_data_home_dir = /var/lib/mysql
+#innodb_data_file_path = ibdata1:10M:autoextend
+#innodb_log_group_home_dir = /var/lib/mysql
+# You can set .._buffer_pool_size up to 50 - 80 %
+# of RAM but beware of setting memory usage too high
+#innodb_buffer_pool_size = 16M
+#innodb_additional_mem_pool_size = 2M
+# Set .._log_file_size to 25 % of buffer pool size
+#innodb_log_file_size = 5M
+#innodb_log_buffer_size = 8M
+#innodb_flush_log_at_trx_commit = 1
+#innodb_lock_wait_timeout = 50
+
+[mysqldump]
+quick
+max_allowed_packet = 16M
+
+[mysql]
+#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
+sort_buffer_size = 20M
+read_buffer = 2M
+write_buffer = 2M
+
+[mysqlhotcopy]
+interactive-timeout
diff --git a/mysql51.install b/mysql51.install
new file mode 100644
index 00000000000..2c1fe26ffd6
--- /dev/null
+++ b/mysql51.install
@@ -0,0 +1,22 @@
+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
+ 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
+}
+
+post_remove(){
+ if getent passwd mysql >/dev/null 2>&1; then
+ userdel mysql
+ fi
+ if getent group mysql >/dev/null 2>&1; then
+ groupdel mysql
+ fi
+}
diff --git a/mysqld-post.sh b/mysqld-post.sh
new file mode 100644
index 00000000000..8dc9c4eea9f
--- /dev/null
+++ b/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/mysqld-tmpfile.conf b/mysqld-tmpfile.conf
new file mode 100644
index 00000000000..6883dc79888
--- /dev/null
+++ b/mysqld-tmpfile.conf
@@ -0,0 +1 @@
+d /run/mysqld 0755 mysql mysql -
diff --git a/mysqld.service b/mysqld.service
new file mode 100644
index 00000000000..f7734d4fb3a
--- /dev/null
+++ b/mysqld.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=MySQL Server
+
+[Service]
+User=mysql
+ExecStart=/usr/sbin/mysqld --user=mysql
+ExecStartPost=/usr/bin/mysqld-post
+Restart=always
+
+[Install]
+WantedBy=multi-user.target
diff --git a/mysqld@.service b/mysqld@.service
new file mode 100644
index 00000000000..2050535842b
--- /dev/null
+++ b/mysqld@.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=MySQL Server instance %i
+ConditionFileNotEmpty=/etc/mysql/%i.cnf
+
+[Service]
+User=mysql
+ExecStart=/usr/sbin/mysqld --defaults-extra-file=/etc/mysql/%i.cnf --user=mysql
+Restart=always
+
+[Install]
+WantedBy=multi-user.target
diff --git a/skip-abi-check.patch b/skip-abi-check.patch
new file mode 100644
index 00000000000..6791deb75a0
--- /dev/null
+++ b/skip-abi-check.patch
@@ -0,0 +1,13 @@
+--- 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; \