[Lunar-commits] <moonbase-other> Merge branch 'mariadb'

v4hn me at v4hn.de
Sun Sep 22 14:12:24 CEST 2013


commit 9a2f8783522f318bc18f59956e8b992c73161fa2
Author: v4hn <me at v4hn.de>
Date: Sun, 22 Sep 2013 04:55:08 -0700
URL: https://github.com/lunar-linux/moonbase-other/commit/9a2f8783522f318bc18f59956e8b992c73161fa2

Merge branch 'mariadb'
---
  sql/mariadb/BUILD                     | +50/-0    
  sql/mariadb/CONFIGURE                 | +6/-0     
  sql/mariadb/CONFLICTS                 | +1/-0     
  sql/mariadb/DEPENDS                   | +5/-0     
  sql/mariadb/DETAILS                   | +16/-0    
  sql/mariadb/POST_INSTALL              | +10/-0    
  sql/mariadb/PRE_BUILD                 | +7/-0     
  sql/mariadb/systemd.d/mariadb.service | +13/-0    
  sql/mariadb/tmpfiles.d/mariadb.conf   | +1/-0     
  sql/mysql/CONFLICTS                   | +1/-0     
  10 files changed, 110 insertions(+)

--- /dev/null
+++ b/sql/mariadb/BUILD
@@ -0,0 +1,50 @@
+OPTS+=" -DSYSCONFDIR=/etc/mysql \
+-DMYSQL_DATADIR=/var/lib/mysql \
+-DMYSQL_UNIX_ADDR=/run/mysqld/mysqld.sock \
+-DINSTALL_BINDIR=bin \
+-DINSTALL_SBINDIR=sbin \
+-DINSTALL_INFODIR=share/info \
+-DINSTALL_MANDIR=share/man \
+-DINSTALL_PLUGINDIR=lib/mysql/plugin \
+-DINSTALL_SHAREDIR=share/mysql \
+-DINSTALL_MYSQLSHAREDIR=share/mysql \
+-DINSTALL_SCRIPTDIR=bin \
+-DINSTALL_INCLUDEDIR=include/mysql \
+-DINSTALL_DOCDIR=share/mysql/docs \
+-DINSTALL_DOCREADMEDIR=share/mysql \
+-DINSTALL_SUPPORTFILESDIR=/usr/share/mysql \
+-DINSTALL_SQLBENCHDIR=share/mysql \
+-DINSTALL_MYSQLTESTDIR=share/mysql/mysql-test \
+-DINSTALL_MYSQLDATADIR=/var/lib/mysql \
+-DENABLED_LOCAL_INFILE=ON \
+-DDEFAULT_CHARSET=utf8 \
+-DDEFAULT_COLLATION=utf8_general_ci \
+-DWITH_ZLIB=system \
+-DWITH_READLINE=ON \
+-DWITH_EXTRA_CHARSETS=complex \
+-DWITH_LIBWRAP=OFF \
+-DWITH_INNOBASE_STORAGE_ENGINE=1 \
+-DWITH_MYISAMMRG_STORAGE_ENGINE=1 \
+-DWITH_MYISAM_STORAGE_ENGINE=1 \
+-DWITHOUT_OQGRAPH_STORAGE_ENGINE=1 \
+-DWITHOUT_EXAMPLE_STORAGE_ENGINE=1"
+
+
+# A few of these flags are necessary when building mariadb with gcc >= 4.4
+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"
+
+add_priv_user mysql:mysql &&
+
+default_cmake_build &&
+
+# Default config
+if [ ! -e "/etc/mysql/my.cnf" ]; then
+  install -Dm644 /usr/share/mysql/my-medium.cnf /etc/mysql/my.cnf
+fi &&
+
+# Setting up links for mysqlcheck multi-call binary
+for i in analyze repair optimize; do
+  ln -sf /usr/bin/mysql{check,$i}
+done &&
+ln -sf /usr/bin/{mysql,mariadb}_config
--- /dev/null
+++ b/sql/mariadb/CONFIGURE
@@ -0,0 +1,6 @@
+mquery USE_ARCHIVE "Enable 'archive' storage engine support?" n "-DWITH_ARCHIVE_STORAGE_ENGINE=1" "-DWITHOUT_ARCHIVE_STORAGE_ENGINE=1"
+mquery USE_BLACKHOLE "Enable 'blackhole' storage engine support?" n "-DWITH_BLACKHOLE_STORAGE_ENGINE=1" "-DWITHOUT_BLACKHOLE_STORAGE_ENGINE=1"
+mquery USE_PARTITION "Enable 'partition' storage engine support?" n "-DWITH_PARTITION_STORAGE_ENGINE=1" "-DWITHOUT_PARTITION_STORAGE_ENGINE=1"
+mquery USE_TOKUDB "Enable 'tokudb' storage engine support?" n "-DWITH_TOKUDB_STORAGE_ENGINE=1" "-DWITHOUT_TOKUDB_STORAGE_ENGINE=1"
+mquery USE_FEDERATED "Enable 'federated' storage engine support?" n "-DWITH_FEDERATED_STORAGE_ENGINE=1" "-DWITHOUT_FEDERATED_STORAGE_ENGINE=1"
+mquery USE_VERBOSE "Enable verbose compile output?" n "-DCMAKE_VERBOSE_MAKEFILE=ON" "-DCMAKE_VERBOSE_MAKEFILE=OFF"
--- /dev/null
+++ b/sql/mariadb/CONFLICTS
@@ -0,0 +1 @@
+conflicts mysql
--- /dev/null
+++ b/sql/mariadb/DEPENDS
@@ -0,0 +1,5 @@
+depends cmake
+depends zlib
+depends readline
+
+optional_depends openssl "-DWITH_SSL=system" "-DWITHOUT_SSL=1" "for SSL support"
--- /dev/null
+++ b/sql/mariadb/DETAILS
@@ -0,0 +1,16 @@
+          MODULE=mariadb
+         VERSION=5.5.33a
+          SOURCE=${MODULE}-${VERSION}.tar.gz
+      SOURCE_URL=http://mirrors.supportex.net/mariadb/mariadb-$VERSION/kvm-tarbake-jaunty-x86
+      SOURCE_VFY=sha1:49fb26cd08c56e1fda42d728eaae9e49ecd5c30d
+        WEB_SITE="https://mariadb.org/"
+         ENTERED=20130921
+         UPDATED=20130921
+           SHORT="Fast SQL database server, drop-in replacement for MySQL"
+
+cat <<EOF
+MariaDB is a drop-in replacement for MySQL.
+
+MariaDB strives to be the logical choice for database professionals
+looking for a robust, scalable, and reliable SQL server.
+EOF
--- /dev/null
+++ b/sql/mariadb/POST_INSTALL
@@ -0,0 +1,10 @@
+datadir="/var/lib/mysql"
+if [ ! -e "$datadir" ]; then
+  install -dm700 $datadir
+  mysql_install_db --user=mysql --basedir=/usr --datadir=$datadir
+  chown -R mysql:mysql $datadir &> /dev/null
+else
+  message "\n \
+If you are migrating from MySQL or upgrading to a newer version of \
+MariaDB, don't forget to run 'mysql_upgrade'.\n"
+fi
--- /dev/null
+++ b/sql/mariadb/PRE_BUILD
@@ -0,0 +1,7 @@
+default_pre_build &&
+
+# INSTALL_LAYOUT=STANDALONE causes cmake to create /usr/data dir (we don't need it)
+sedit 's;^INSTALL(.*data/test.*;# &;' sql/CMakeLists.txt &&
+
+# Don't install solaris scripts
+sedit 's;^ADD_SUB.*solaris.*;# &;' CMakeLists.txt
--- /dev/null
+++ b/sql/mariadb/systemd.d/mariadb.service
@@ -0,0 +1,13 @@
+[Unit]
+Description=MariaDB database server
+After=syslog.target
+
+[Service]
+User=mysql
+Group=mysql
+ExecStart=/usr/sbin/mysqld --pid-file=/run/mysqld/mysqld.pid 
+Restart=always
+PrivateTmp=true
+
+[Install]
+WantedBy=multi-user.target
--- /dev/null
+++ b/sql/mariadb/tmpfiles.d/mariadb.conf
@@ -0,0 +1 @@
+d /run/mysqld 0755 mysql mysql -
--- /dev/null
+++ b/sql/mysql/CONFLICTS
@@ -0,0 +1 @@
+conflicts mariadb




More information about the Lunar-commits mailing list