mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
* [ptxdist] [PATCH v2] mariadb: new package
@ 2017-05-29 12:21 Bastian Stender
  0 siblings, 0 replies; only message in thread
From: Bastian Stender @ 2017-05-29 12:21 UTC (permalink / raw)
  To: ptxdist; +Cc: Bastian Stender

MariaDB is a MySQL fork. Therefore the MySQL rule was adapted to fit
MariaDB.

As MariaDB uses the same binary names as MySQL the packages conflict.

Signed-off-by: Bastian Stender <bst@pengutronix.de>
---

Changes since v1:
- clean up mariadb configuration
- clean up systemd service
- use system zlib, pcre, ssl instead of bundled
- remove obsolete extract/compile ptxdist stages
- build host-mariadb in a minimal way
- install host helper tools to PKGDIR and replace paths instead of copying from build directory
- remove unknown option WITH_LZ4
- force MariaDB after MySQL in ALLYES

 projectroot/etc/group                              |   1 +
 projectroot/etc/mariadb/my.cnf                     |  24 +++
 projectroot/etc/passwd                             |   1 +
 .../usr/lib/systemd/system/mariadb-init.service    |  39 ++++
 projectroot/usr/lib/systemd/system/mariadb.service |  27 +++
 rules/host-mariadb.in                              |  12 ++
 rules/host-mariadb.make                            | 105 ++++++++++
 rules/mariadb.in                                   |  36 ++++
 rules/mariadb.make                                 | 216 +++++++++++++++++++++
 9 files changed, 461 insertions(+)
 create mode 100644 projectroot/etc/mariadb/my.cnf
 create mode 100644 projectroot/usr/lib/systemd/system/mariadb-init.service
 create mode 100644 projectroot/usr/lib/systemd/system/mariadb.service
 create mode 100644 rules/host-mariadb.in
 create mode 100644 rules/host-mariadb.make
 create mode 100644 rules/mariadb.in
 create mode 100644 rules/mariadb.make

diff --git a/projectroot/etc/group b/projectroot/etc/group
index 452be04a2..821abdc6e 100644
--- a/projectroot/etc/group
+++ b/projectroot/etc/group
@@ -20,6 +20,7 @@ lock:x:114:
 audio:x:115:
 input:x:116:
 mysql:x:117:
+mariadb:x:119:
 systemd-journal:x:201:
 systemd-network:x:202:
 systemd-journal-gateway:x:206:
diff --git a/projectroot/etc/mariadb/my.cnf b/projectroot/etc/mariadb/my.cnf
new file mode 100644
index 000000000..da402c47a
--- /dev/null
+++ b/projectroot/etc/mariadb/my.cnf
@@ -0,0 +1,24 @@
+# MariaDB config file for small systems.
+#
+# This is for a system with little memory where MariaDB is only used
+# from time to time and it's important that the mysqld daemon doesn't
+# use much resources.
+
+[mysqld]
+# These are commonly set, remove the # and set as required.
+#port = .....
+#socket = .....
+
+skip-external-locking
+key_buffer_size = 16K
+max_allowed_packet = 1M
+table_open_cache = 4
+sort_buffer_size = 64K
+read_buffer_size = 256K
+read_rnd_buffer_size = 256K
+net_buffer_length = 2K
+thread_stack = 240K
+
+# we have a read-only filesystem with one persistent writeable area only
+# so point to this single writeable location
+datadir = /var/lib/mysql/data
diff --git a/projectroot/etc/passwd b/projectroot/etc/passwd
index 65653c044..078d77808 100644
--- a/projectroot/etc/passwd
+++ b/projectroot/etc/passwd
@@ -4,6 +4,7 @@ ftp:x:11:101:ftp user:/home:/bin/false
 www:x:12:102:www user:/home:/bin/false
 sshd:x:100:65534:SSH Server:/var/run/sshd:/bin/false
 mysql:x:101:117:mySQL Server:/var/run/mysql:/bin/false
+mariadb:x:118:119:mariaDB Server:/var/run/mysql:/bin/false
 messagebus:x:103:104:messagebus:/dev/null:/bin/false
 systemd-network:x:202:202:systemd-network:/dev/null:/bin/false
 systemd-resolve:x:203:65534:systemd-resolve:/dev/null:/bin/false
diff --git a/projectroot/usr/lib/systemd/system/mariadb-init.service b/projectroot/usr/lib/systemd/system/mariadb-init.service
new file mode 100644
index 000000000..7d420cc24
--- /dev/null
+++ b/projectroot/usr/lib/systemd/system/mariadb-init.service
@@ -0,0 +1,39 @@
+# Copyright (c) 2017, Pengutronix
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; version 2 of the License.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# MariaDB run-time preparation
+#
+# Preparation must be run once if the "data" (=working directory) does not
+# exist yet.
+# Since we expect a read-only root filesystem, we need one writeable filesystem
+# part at "/var/lib/mysql".
+#
+# Since we change some permissions, the script itself must run as user 'root'
+#
+
+[Unit]
+Description=MariaDB Server Initialization Service
+RequiresMountsFor=/var/lib/mysql
+ConditionPathExists=!/var/lib/mysql/data
+
+[Service]
+User=root
+Group=root
+Type=oneshot
+RemainAfterExit=yes
+
+ExecStart=/bin/chown -R mariadb:mariadb /var/lib/mysql
+ExecStart=/bin/chmod 0755 /var/lib/mysql
+
+ExecStart=/usr/scripts/mysql_install_db --basedir=/usr --datadir=/var/lib/mysql/data --user=mariadb
+
+[Install]
+WantedBy=multi-user.target
diff --git a/projectroot/usr/lib/systemd/system/mariadb.service b/projectroot/usr/lib/systemd/system/mariadb.service
new file mode 100644
index 000000000..1df53254a
--- /dev/null
+++ b/projectroot/usr/lib/systemd/system/mariadb.service
@@ -0,0 +1,27 @@
+[Unit]
+Description=MariaDB database server
+Requires=mariadb-init.service
+After=mariadb-init.service
+
+[Install]
+WantedBy=multi-user.target
+Alias=mysql.service
+Alias=mysqld.service
+
+[Service]
+User=mariadb
+Group=mariadb
+PrivateDevices=true
+
+ExecStart=/usr/bin/mysqld $MYSQLD_OPTS
+
+KillMode=process
+KillSignal=SIGTERM
+SendSIGKILL=no
+
+Restart=on-abort
+RestartSec=5s
+
+UMask=007
+
+LimitNOFILE=5000
diff --git a/rules/host-mariadb.in b/rules/host-mariadb.in
new file mode 100644
index 000000000..fdee71d01
--- /dev/null
+++ b/rules/host-mariadb.in
@@ -0,0 +1,12 @@
+## SECTION=hosttools_noprompt
+
+config HOST_MARIADB
+	tristate
+	default ALLYES
+	select HOST_LIBAIO
+	select HOST_NCURSES
+	select HOST_CMAKE
+	select HOST_SYSTEMD
+	select HOST_ZLIB
+	help
+	  Required host part of the MariaDB build system
diff --git a/rules/host-mariadb.make b/rules/host-mariadb.make
new file mode 100644
index 000000000..0b6be3673
--- /dev/null
+++ b/rules/host-mariadb.make
@@ -0,0 +1,105 @@
+# -*-makefile-*-
+#
+# Copyright (C) 2017 by Bastian Stender <bst@pengutronix.de>
+#
+# See CREDITS for details about who has contributed to this project.
+#
+# For further information about the PTXdist project and license conditions
+# see the README file.
+#
+
+#
+# We provide this package
+#
+HOST_PACKAGES-$(PTXCONF_HOST_MARIADB) += host-mariadb
+
+# ----------------------------------------------------------------------------
+# Prepare + Compile
+# ----------------------------------------------------------------------------
+
+#
+# cmake
+#
+HOST_MARIADB_CONF_TOOL	:= cmake
+# DISABLE_SHARED disables dynamic plugins, disable plugins that default
+# to "static" explicitly
+HOST_MARIADB_CONF_OPT	:= \
+	$(HOST_CMAKE_OPT) \
+	-DCMAKE_INSTALL_PREFIX:PATH=/usr \
+	-DSTACK_DIRECTION=1 \
+	-DHAVE_LLVM_LIBCPP_EXITCODE=no \
+	-DHAVE_FALLOC_PUNCH_HOLE_AND_KEEP_SIZE_EXITCODE=no \
+	-DCONNECT_WITH_JDBC=OFF \
+	-DCONNECT_WITH_LIBXML2=OFF \
+	-DCONNECT_WITH_ODBC=OFF \
+	-DCONNECT_WITH_VCT=OFF \
+	-DCONNECT_WITH_XMAP=OFF \
+	-DCONNECT_WITH_ZIP=OFF \
+	-DDISABLE_SHARED=ON \
+	-DENABLED_LOCAL_INFILE=OFF \
+	-DENABLED_PROFILING=OFF \
+	-DENABLE_GCOV=OFF \
+	-DINSTALL_LAYOUT=STANDALONE \
+	-DMRN_GROONGA_EMBED=OFF \
+	-DMYSQL_MAINTAINER_MODE=OFF \
+	-DNOT_FOR_DISTRIBUTION=OFF \
+	-DSECURITY_HARDENED=ON \
+	-DUSE_ARIA_FOR_TMP_TABLES=OFF \
+	-DUSE_GCOV=OFF \
+	-DWITH_ASAN=OFF \
+	-DWITH_EMBEDDED_SERVER=OFF \
+	-DWITH_EXTRA_CHARSETS=none \
+	-DWITH_INNODB_BZIP2=OFF \
+	-DWITH_INNODB_DISALLOW_WRITES=OFF \
+	-DWITH_INNODB_LZ4=OFF \
+	-DWITH_INNODB_LZMA=OFF \
+	-DWITH_INNODB_LZO=OFF \
+	-DWITH_INNODB_SNAPPY=OFF \
+	-DWITH_JEMALLOC=no \
+	-DWITH_LIBARCHIVE=OFF \
+	-DWITH_LIBWRAP=OFF \
+	-DWITH_MARIABACKUP=OFF \
+	-DWITH_READLINE=OFF \
+	-DWITH_SAFEMALLOC=OFF \
+	-DWITH_SYSTEMD=OFF \
+	-DWITH_UNIT_TESTS=OFF \
+	-DWITH_VALGRIND=OFF \
+	-DWITH_WSREP=OFF \
+	-DWITH_ZLIB=system \
+	-DWITH_SSL=NO \
+	-DPLUGIN_ARIA=NO \
+	-DPLUGIN_FEEDBACK=NO \
+	-DPLUGIN_PARTITION=NO \
+	-DPLUGIN_PERFSCHEMA=NO \
+	-DPLUGIN_SEQUENCE=NO \
+	-DPLUGIN_XTRADB=NO
+
+HOST_MARIADB_CXXFLAGS := -std=c++98
+
+# ----------------------------------------------------------------------------
+# Install
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/host-mariadb.install:
+	@$(call targetinfo)
+#	# install helper tools
+	install -D -m 644 $(HOST_MARIADB_DIR)-build/import_executables.cmake $(HOST_MARIADB_PKGDIR)/usr/share/import_executables.cmake
+	install -D -m 755 $(HOST_MARIADB_DIR)-build/extra/comp_err $(HOST_MARIADB_PKGDIR)/usr/bin/comp_err
+	install -D -m 755 $(HOST_MARIADB_DIR)-build/scripts/comp_sql $(HOST_MARIADB_PKGDIR)/usr/bin/comp_sql
+	install -D -m 755 $(HOST_MARIADB_DIR)-build/dbug/factorial $(HOST_MARIADB_PKGDIR)/usr/bin/factorial
+	install -D -m 755 $(HOST_MARIADB_DIR)-build/sql/gen_lex_hash $(HOST_MARIADB_PKGDIR)/usr/bin/gen_lex_hash
+	install -D -m 755 $(HOST_MARIADB_DIR)-build/sql/gen_lex_token $(HOST_MARIADB_PKGDIR)/usr/bin/gen_lex_token
+	@$(call touch)
+
+$(STATEDIR)/host-mariadb.install.post:
+	@$(call targetinfo)
+	@$(call world/install.post, HOST_MARIADB)
+#	# correct helper tool paths
+	sed -i -e "s;$(HOST_BUILDDIR)/$(HOST_MARIADB)-build/extra/comp_err;$(HOST_MARIADB_PKGDIR)/usr/bin/comp_err;" $(HOST_MARIADB_PKGDIR)/usr/share/import_executables.cmake
+	sed -i -e "s;$(HOST_BUILDDIR)/$(HOST_MARIADB)-build/scripts/comp_sql;$(HOST_MARIADB_PKGDIR)/usr/bin/comp_sql;" $(HOST_MARIADB_PKGDIR)/usr/share/import_executables.cmake
+	sed -i -e "s;$(HOST_BUILDDIR)/$(HOST_MARIADB)-build/dbug/factorial;$(HOST_MARIADB_PKGDIR)/usr/bin/factorial;" $(HOST_MARIADB_PKGDIR)/usr/share/import_executables.cmake
+	sed -i -e "s;$(HOST_BUILDDIR)/$(HOST_MARIADB)-build/sql/gen_lex_hash;$(HOST_MARIADB_PKGDIR)/usr/bin/gen_lex_hash;" $(HOST_MARIADB_PKGDIR)/usr/share/import_executables.cmake
+	sed -i -e "s;$(HOST_BUILDDIR)/$(HOST_MARIADB)-build/sql/gen_lex_token;$(HOST_MARIADB_PKGDIR)/usr/bin/gen_lex_token;" $(HOST_MARIADB_PKGDIR)/usr/share/import_executables.cmake
+	@$(call touch)
+
+# vim: syntax=make
diff --git a/rules/mariadb.in b/rules/mariadb.in
new file mode 100644
index 000000000..4c0c9dd3a
--- /dev/null
+++ b/rules/mariadb.in
@@ -0,0 +1,36 @@
+## SECTION=applications
+menuconfig MARIADB
+	tristate
+	# make sure that MariaDB and MySQL will not be built parallel in ALLYES
+	depends on !MYSQL || (ALLYES && MYSQL)
+	select HOST_CMAKE
+	select HOST_MARIADB
+	select LIBAIO
+	select ZLIB
+	select OPENSSL
+	select LIBC_PTHREAD
+	select LIBC_RT
+	select LIBC_M
+	select LIBC_CRYPT
+	select LIBC_DL
+	select LIBPCRE
+	select GCCLIBS_CXX
+	select GCCLIBS_GCC_S
+	select NCURSES
+	select SYSTEMD		if MARIADB_SYSTEMD
+	prompt "mariadb                       "
+	help
+	  MariaDB, a SQL database engine
+
+if MARIADB
+
+config MARIADB_SYSTEMD
+	bool
+	depends on INITMETHOD_SYSTEMD
+	default y
+	prompt "systemd support"
+
+endif
+
+comment "MySQL is selected!"
+	depends on MYSQL
diff --git a/rules/mariadb.make b/rules/mariadb.make
new file mode 100644
index 000000000..27591a2bd
--- /dev/null
+++ b/rules/mariadb.make
@@ -0,0 +1,216 @@
+# -*-makefile-*-
+#
+# Copyright (C) 2017 by Bastian Stender <bst@pengutronix.de>
+#
+# See CREDITS for details about who has contributed to this project.
+#
+# For further information about the PTXdist project and license conditions
+# see the README file.
+#
+
+#
+# We provide this package
+#
+PACKAGES-$(PTXCONF_MARIADB) += mariadb
+
+#
+# Paths and names
+#
+MARIADB_VERSION	:= 10.1.23
+MARIADB_MD5	:= 1a7392cc05c7c249acd4495022719ca8
+MARIADB		:= mariadb-$(MARIADB_VERSION)
+MARIADB_SUFFIX	:= tar.gz
+MARIADB_URL	:= https://downloads.mariadb.com/MariaDB/$(MARIADB)/source/$(MARIADB).$(MARIADB_SUFFIX)
+MARIADB_SOURCE	:= $(SRCDIR)/$(MARIADB).$(MARIADB_SUFFIX)
+MARIADB_DIR	:= $(BUILDDIR)/$(MARIADB)
+MARIADB_LICENSE	:= GPL-2.0
+
+# ----------------------------------------------------------------------------
+# Prepare
+# ----------------------------------------------------------------------------
+
+# MARIADB_PLUGINS_ENABLED-y builds plugin dynamically
+# MARIADB_PLUGINS_ENABLES-y builds plugin statically
+# MARIADB_PLUGINS_ENABLE- disables plugin
+MARIADB_PLUGINS_ENABLE- += ARCHIVE
+MARIADB_PLUGINS_ENABLE- += ARIA
+MARIADB_PLUGINS_ENABLE- += AUDIT_NULL
+MARIADB_PLUGINS_ENABLE- += AUTH_0X0100
+MARIADB_PLUGINS_ENABLE- += AUTH_ED25519
+MARIADB_PLUGINS_ENABLE- += AUTH_SOCKET
+MARIADB_PLUGINS_ENABLE- += AUTH_TEST_PLUGIN
+MARIADB_PLUGINS_ENABLE- += AWS_KEY_MANAGEMENT
+MARIADB_PLUGINS_ENABLE- += BLACKHOLE
+MARIADB_PLUGINS_ENABLE- += CLIENT_ED25519
+MARIADB_PLUGINS_ENABLE- += CONNECT
+MARIADB_PLUGINS_ENABLE- += DAEMON_EXAMPLE
+MARIADB_PLUGINS_ENABLE- += DEBUG_KEY_MANAGEMENT
+MARIADB_PLUGINS_ENABLE- += DIALOG
+MARIADB_PLUGINS_ENABLE- += DIALOG_EXAMPLES
+MARIADB_PLUGINS_ENABLE- += EXAMPLE
+MARIADB_PLUGINS_ENABLE- += EXAMPLE_KEY_MANAGEMENT
+MARIADB_PLUGINS_ENABLE- += FEDERATED
+MARIADB_PLUGINS_ENABLE- += FEDERATEDX
+MARIADB_PLUGINS_ENABLE- += FEEDBACK
+MARIADB_PLUGINS_ENABLE- += FILE_KEY_MANAGEMENT
+MARIADB_PLUGINS_ENABLE- += FTEXAMPLE
+MARIADB_PLUGINS_ENABLE- += HANDLERSOCKET
+MARIADB_PLUGINS_ENABLE- += INNOBASE
+MARIADB_PLUGINS_ENABLE- += LOCALES
+MARIADB_PLUGINS_ENABLE- += METADATA_LOCK_INFO
+MARIADB_PLUGINS_ENABLE- += MROONGA
+MARIADB_PLUGINS_ENABLE- += MYSQL_CLEAR_PASSWORD
+# some plugins depend on static build PARTITION
+MARIADB_PLUGINS_ENABLE- += PARTITION
+MARIADB_PLUGINS_ENABLE- += PERFSCHEMA
+MARIADB_PLUGINS_ENABLE- += QA_AUTH_CLIENT
+MARIADB_PLUGINS_ENABLE- += QA_AUTH_INTERFACE
+MARIADB_PLUGINS_ENABLE- += QA_AUTH_SERVER
+MARIADB_PLUGINS_ENABLE- += QUERY_CACHE_INFO
+MARIADB_PLUGINS_ENABLE- += QUERY_RESPONSE_TIME
+MARIADB_PLUGINS_ENABLE- += SEMISYNC_MASTER
+MARIADB_PLUGINS_ENABLE- += SEMISYNC_SLAVE
+MARIADB_PLUGINS_ENABLE- += SEQUENCE
+MARIADB_PLUGINS_ENABLE- += SERVER_AUDIT
+MARIADB_PLUGINS_ENABLE- += SIMPLE_PASSWORD_CHECK
+MARIADB_PLUGINS_ENABLE- += SPHINX
+MARIADB_PLUGINS_ENABLE- += SPIDER
+MARIADB_PLUGINS_ENABLE- += SQL_ERRLOG
+MARIADB_PLUGINS_ENABLE- += TEST_SQL_DISCOVERY
+MARIADB_PLUGINS_ENABLE- += TOKUDB
+MARIADB_PLUGINS_ENABLE- += WSREP_INFO
+MARIADB_PLUGINS_ENABLE- += XTRADB
+
+#
+# cmake
+#
+MARIADB_CONF_TOOL	:= cmake
+
+# 10.1.23 does not build with CONNECT_WITH_ZIP=OFF
+MARIADB_CONF_OPT	:= \
+	$(CROSS_CMAKE_USR) \
+	-DSTACK_DIRECTION=1 \
+	-DIMPORT_EXECUTABLES=$(HOST_MARIADB_PKGDIR)/usr/share/import_executables.cmake \
+	-DHAVE_LLVM_LIBCPP_EXITCODE=no \
+	-DCMAKE_INSTALL_PREFIX:PATH=/usr \
+	-DCOMMUNITY_BUILD=ON \
+	-DCONNECT_WITH_JDBC=OFF \
+	-DCONNECT_WITH_LIBXML2=OFF \
+	-DCONNECT_WITH_ODBC=OFF \
+	-DCONNECT_WITH_VCT=OFF \
+	-DCONNECT_WITH_XMAP=OFF \
+	-DCONNECT_WITH_ZIP=ON \
+	-DDISABLE_SHARED=OFF \
+	-DENABLED_LOCAL_INFILE=OFF \
+	-DENABLED_PROFILING=OFF \
+	-DENABLE_GCOV=OFF \
+	-DINSTALL_LAYOUT=STANDALONE \
+	-DMRN_GROONGA_EMBED=OFF \
+	-DMYSQL_DATADIR=/var/lib/mysql/data \
+	-DMYSQL_MAINTAINER_MODE=OFF \
+	-DNOT_FOR_DISTRIBUTION=OFF \
+	-DSECURITY_HARDENED=ON \
+	-DTMPDIR=/tmp \
+	-DUSE_ARIA_FOR_TMP_TABLES=ON \
+	-DUSE_GCOV=OFF \
+	-DWITHOUT_SERVER=OFF \
+	-DWITH_ASAN=OFF \
+	-DWITH_EMBEDDED_SERVER=OFF \
+	-DWITH_EXTRA_CHARSETS=all \
+	-DWITH_INNODB_BZIP2=OFF \
+	-DWITH_INNODB_DISALLOW_WRITES=ON \
+	-DWITH_INNODB_LZ4=OFF \
+	-DWITH_INNODB_LZMA=OFF \
+	-DWITH_INNODB_LZO=OFF \
+	-DWITH_INNODB_SNAPPY=OFF \
+	-DWITH_JEMALLOC=no \
+	-DWITH_LIBARCHIVE=OFF \
+	-DWITH_LIBWRAP=OFF \
+	-DWITH_MARIABACKUP=OFF \
+	-DWITH_PCRE=system \
+	-DWITH_READLINE=OFF \
+	-DWITH_SAFEMALLOC=OFF \
+	-DWITH_SYSTEMD=$(call ptx/onoff, PTXCONF_MARIADB_SYSTEMD) \
+	-DWITH_UNIT_TESTS=OFF \
+	-DWITH_VALGRIND=OFF \
+	-DWITH_WSREP=OFF \
+	-DWITH_ZLIB=system \
+	-DWITH_SSL=system \
+	-DSYSCONFDIR=/etc/mariadb \
+	-DCOMPILATION_COMMENT=PTXdist \
+	-DDEFAULT_CHARSET=latin1
+
+ifneq ($(strip $(MARIADB_PLUGINS_ENABLES-y)),)
+MARIADB_CONF_OPT += $(foreach plugin,$(MARIADB_PLUGINS_ENABLES-y),$(addprefix -DPLUGIN_,$(addsuffix =STATIC, $(plugin))))
+endif
+
+ifneq ($(strip $(MARIADB_PLUGINS_ENABLED-y)),)
+MARIADB_CONF_OPT += $(foreach plugin,$(MARIADB_PLUGINS_ENABLED-y),$(addprefix -DPLUGIN_,$(addsuffix =DYNAMIC, $(plugin))))
+endif
+
+ifneq ($(strip $(MARIADB_PLUGINS_ENABLE-)),)
+MARIADB_CONF_OPT += $(foreach plugin,$(MARIADB_PLUGINS_ENABLE-),$(addprefix -DPLUGIN_,$(addsuffix =NO, $(plugin))))
+endif
+
+# ----------------------------------------------------------------------------
+# Target-Install
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/mariadb.targetinstall:
+	@$(call targetinfo)
+
+	@$(call install_init, mariadb)
+	@$(call install_fixup, mariadb, PRIORITY, optional)
+	@$(call install_fixup, mariadb, SECTION, base)
+	@$(call install_fixup, mariadb, AUTHOR, "Bastian Stender <bst@pengutronix.de>")
+	@$(call install_fixup, mariadb, DESCRIPTION, "MariaDB")
+
+#	# server stuff
+	@$(call install_copy, mariadb, 0, 0, 0755, -, /usr/bin/mysqld)
+
+ifdef PTXCONF_MARIADB_SYSTEMD
+	@$(call install_alternative, mariadb, 0, 0, 0644, /usr/lib/systemd/system/mariadb.service)
+	@$(call install_link, mariadb, ../mariadb.service, \
+		/usr/lib/systemd/system/multi-user.target.wants/mariadb.service)
+
+	@$(call install_alternative, mariadb, 0, 0, 0644, /usr/lib/systemd/system/mariadb-init.service)
+	@$(call install_link, mariadb, ../mariadb-init.service, \
+		/usr/lib/systemd/system/multi-user.target.wants/mariadb-init.service)
+endif
+	@$(call install_alternative, mariadb, 0, 0, 0644, /etc/mariadb/my.cnf)
+
+#	# TODO: do we need more languages?
+	@$(call install_copy, mariadb, 0, 0, 0755, -, /usr/share/english/errmsg.sys)
+
+#	# TODO: do we need more charsets?
+	@$(call install_copy, mariadb, 0, 0, 0755, -, /usr/share/charsets/latin1.xml)
+
+#	# client stuff
+	@$(call install_copy, mariadb, 0, 0, 0755, -, /usr/bin/mysql)
+	@$(call install_copy, mariadb, 0, 0, 0755, -, /usr/bin/mysqladmin)
+	@$(call install_copy, mariadb, 0, 0, 0755, -, /usr/bin/mysql_upgrade)
+	@$(call install_copy, mariadb, 0, 0, 0755, -, /usr/bin/mysqlcheck)
+	@$(call install_copy, mariadb, 0, 0, 0755, -, /usr/bin/mysqldump)
+
+#	# bootstrap script + dependencies
+	@$(call install_copy, mariadb, 0, 0, 0755, -, /usr/scripts/mysql_install_db)
+	@$(call install_copy, mariadb, 0, 0, 0755, -, /usr/bin/my_print_defaults)
+	@$(call install_copy, mariadb, 0, 0, 0755, -, /usr/bin/resolveip)
+
+#	# bootstrap data required for mysql_install_db
+	@$(call install_copy, mariadb, 0, 0, 0644, -, /usr/share/mysql_system_tables.sql)
+	@$(call install_copy, mariadb, 0, 0, 0644, -, /usr/share/mysql_system_tables_data.sql)
+	@$(call install_copy, mariadb, 0, 0, 0644, -, /usr/share/mysql_performance_tables.sql)
+	@$(call install_copy, mariadb, 0, 0, 0644, -, /usr/share/fill_help_tables.sql)
+	@$(call install_copy, mariadb, 0, 0, 0644, -, /usr/share/maria_add_gis_sp_bootstrap.sql)
+
+	@$(call install_lib, mariadb, 0, 0, 0644, libmysqlclient)
+
+#	# create a working directory which is writeable
+	@$(call install_copy, mariadb, mariadb, mariadb, 0755, /var/lib/mysql)
+
+	@$(call install_finish, mariadb)
+
+	@$(call touch)
+
+# vim: syntax=make
-- 
2.11.0


_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2017-05-29 12:21 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-29 12:21 [ptxdist] [PATCH v2] mariadb: new package Bastian Stender

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox