summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-support/mysql/mariadb.inc
diff options
context:
space:
mode:
authorArmin Kuster <akuster808@gmail.com>2017-10-26 13:25:43 -0700
committerArmin Kuster <akuster808@gmail.com>2018-03-01 16:10:35 -0800
commit31f337c1af1223ca5e973f31c0cbc3599393e322 (patch)
tree45c12b18ca36312b5255a91eee9ff299dc717e31 /meta-oe/recipes-support/mysql/mariadb.inc
parent036b3e794650cfc92f2f983d860ce93575198b57 (diff)
downloadmeta-openembedded-31f337c1af1223ca5e973f31c0cbc3599393e322.tar.gz
mysql: move to recipes-dbs
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Diffstat (limited to 'meta-oe/recipes-support/mysql/mariadb.inc')
-rw-r--r--meta-oe/recipes-support/mysql/mariadb.inc297
1 files changed, 0 insertions, 297 deletions
diff --git a/meta-oe/recipes-support/mysql/mariadb.inc b/meta-oe/recipes-support/mysql/mariadb.inc
deleted file mode 100644
index a29d441e1..000000000
--- a/meta-oe/recipes-support/mysql/mariadb.inc
+++ /dev/null
@@ -1,297 +0,0 @@
1SUMMARY = "A robust, scalable, and reliable SQL server"
2HOMEPAGE = "http://mariadb.org"
3SECTION = "libs"
4LICENSE = "GPLv2"
5LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
6
7SRC_URI = "https://downloads.mariadb.org/f/${BP}/source/${BP}.tar.gz \
8 file://fix-cmake-module-path.patch \
9 file://remove-bad-path.patch \
10 file://fix-mysqlclient-r-version.patch \
11 file://my.cnf \
12 file://mysqld.service \
13 file://install_db.service \
14 file://install_db \
15 file://mysql-systemd-start \
16 file://configure.cmake-fix-valgrind.patch \
17 file://fix-a-building-failure.patch \
18 file://change-cc-to-cc-version.patch \
19 file://0001-disable-ucontext-on-musl.patch \
20 "
21
22SRC_URI[md5sum] = "2d4104aae0b9e5efa8878918bd329cb4"
23SRC_URI[sha256sum] = "5dbde98d7e4a5a1721b6cbed7898b2549a88866247951cf586057975c6cea641"
24
25S = "${WORKDIR}/mariadb-${PV}"
26
27BINCONFIG_GLOB = "mysql_config"
28
29inherit cmake gettext binconfig update-rc.d useradd systemd
30
31INITSCRIPT_PACKAGES = "${PN}-server ${PN}-setupdb"
32INITSCRIPT_NAME_${PN}-server = "mysqld"
33INITSCRIPT_PARAMS_${PN}-server ?= "start 45 5 . stop 45 0 6 1 ."
34
35USERADD_PACKAGES = "${PN}-server"
36USERADD_PARAM_${PN}-server = "--system --home-dir /var/mysql -g mysql --shell /bin/false mysql"
37GROUPADD_PARAM_${PN}-server = "--system mysql"
38
39INITSCRIPT_NAME_${PN}-setupdb = "install_db"
40INITSCRIPT_PARAMS_${PN}-setupdb ?= "defaults 44 44"
41
42SYSTEMD_PACKAGES = "${PN}-server ${PN}-setupdb"
43SYSTEMD_SERVICE_${PN}-server = "mysqld.service"
44SYSTEMD_AUTO_ENABLE_${PN}-server ?= "disable"
45
46SYSTEMD_SERVICE_${PN}-setupdb = "install_db.service"
47SYSTEMD_AUTO_ENABLE_${PN}-setupdb ?= "enable"
48ALLOW_EMPTY_${PN}-setupdb ?= "1"
49FILES_${PN}-setupdb = "${sysconfdir}/init.d/install_db"
50
51EXTRA_OEMAKE = "'GEN_LEX_HASH=${STAGING_BINDIR_NATIVE}/gen_lex_hash'"
52
53PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)} setupdb"
54PACKAGECONFIG_class-native = ""
55PACKAGECONFIG[pam] = ",-DWITHOUT_AUTH_PAM=TRUE,libpam"
56PACKAGECONFIG[valgrind] = "-DWITH_VALGRIND=TRUE,-DWITH_VALGRIND=FALSE,valgrind"
57PACKAGECONFIG[libedit] = "-DLIBEDIT_INTERFACE=TRUE,-DLIBEDIT_INTERFACE=FALSE,libedit"
58PACKAGECONFIG[krb5] = ", ,krb5"
59PACKAGECONFIG[setupdb] = ", ,,${PN}-setupdb"
60
61# MariaDB doesn't link properly with gold
62# https://mariadb.atlassian.net/browse/MDEV-5982
63TARGET_CFLAGS += "-fuse-ld=bfd"
64
65BUILD_CFLAGS += "-fuse-ld=bfd"
66BUILD_CXXFLAGS += "-fuse-ld=bfd"
67
68EXTRA_OECMAKE = "-DWITH_EMBEDDED_SERVER=ON \
69 -DWITH_JEMALLOC=no \
70 -DWITHOUT_TOKUDB=TRUE \
71 -DCMAKE_DISABLE_FIND_PACKAGE_Boost=TRUE \
72 -DGROFF=FALSE \
73 -DNROFF=FALSE \
74 -DENABLE_DTRACE=FALSE \
75 -DWITH_PIC=ON \
76 -DINSTALL_LAYOUT=RPM \
77 -DINSTALL_DOCDIR:PATH=${datadir}/doc/${BPN} \
78 -DINSTALL_LIBDIR:PATH=${baselib} \
79 -DINSTALL_PLUGINDIR:PATH=${baselib}/plugin \
80 -DINSTALL_SYSCONFDIR:PATH=${sysconfdir} \
81 -DMYSQL_DATADIR:PATH=/var/mysql \
82 -DCAT_EXECUTABLE=`which cat` \
83 -DCMAKE_AR:FILEPATH=${AR}"
84
85# With Ninja it fails with:
86# make: *** No rule to make target `install'. Stop.
87OECMAKE_GENERATOR = "Unix Makefiles"
88
89ARM_INSTRUCTION_SET_armv4 = "arm"
90ARM_INSTRUCTION_SET_armv5 = "arm"
91
92do_configure_append() {
93 # handle distros with different values of ${libexecdir}
94 libexecdir2=`echo ${libexecdir} | sed -e 's+/usr/++g'`
95 sed -i -e "s:/libexec:/$libexecdir2:g" ${S}/scripts/mysql_install_db.sh
96 sed -i -e "s:mysqld libexec:mysqld $libexecdir2:g" ${S}/scripts/mysql_install_db.sh
97 sed -i -e "s:/libexec:/$libexecdir2:g" ${S}/scripts/mysqld_safe.sh
98}
99
100do_generate_toolchain_file_append_class-native () {
101 # If these are set cmake will assume we're cross-compiling, which will
102 # result in certain things we want being disabled
103 sed -i "/set( CMAKE_SYSTEM_NAME/d" ${WORKDIR}/toolchain.cmake
104 sed -i "/set( CMAKE_SYSTEM_PROCESSOR/d" ${WORKDIR}/toolchain.cmake
105}
106
107do_compile_prepend_class-target () {
108 # These need to be in-tree or make will think they need to be built,
109 # and since we're cross-compiling that is disabled
110 cp ${STAGING_BINDIR_NATIVE}/comp_err ${S}/extra
111 cp ${STAGING_BINDIR_NATIVE}/comp_sql ${S}/scripts
112
113 if [ "${@bb.utils.contains('PACKAGECONFIG', 'krb5', 'yes', 'no', d)}" = "no" ]; then
114 if ! [ -e ${B}/include/openssl/kssl.h ] ; then
115 mkdir -p ${B}/include/openssl
116 echo "#ifndef KSSL_H" >${B}/include/openssl/kssl.h
117 echo "#define KSSL_H" >>${B}/include/openssl/kssl.h
118 echo "#include <openssl/opensslconf.h>">>${B}/include/openssl/kssl.h
119 echo "#endif" >>${B}/include/openssl/kssl.h
120 fi
121 fi
122}
123
124SYSROOT_PREPROCESS_FUNCS += "mariadb_sysroot_preprocess"
125
126# We need to append this so it runs *after* binconfig's preprocess function
127#
128# We really don't care exactly what the directories were set to originally.
129# plugindir is not fixed, but we don't create any plugins.
130#
131mariadb_sysroot_preprocess () {
132 sed -i -es,^pkgincludedir=.*,pkgincludedir=\'${STAGING_INCDIR}/mysql\', ${SYSROOT_DESTDIR}${bindir_crossscripts}/mysql_config
133 sed -i -es,^pkglibdir=.*,pkglibdir=\'${STAGING_LIBDIR}\', ${SYSROOT_DESTDIR}${bindir_crossscripts}/mysql_config
134}
135
136do_install() {
137 oe_runmake 'DESTDIR=${D}' install
138
139 install -d ${D}/${sysconfdir}/init.d
140 install -m 0644 ${WORKDIR}/my.cnf ${D}/${sysconfdir}/
141 install -m 0755 ${WORKDIR}/install_db ${D}/${sysconfdir}/init.d/
142 mv ${D}/${sysconfdir}/init.d/mysql ${D}/${sysconfdir}/init.d/mysqld
143
144 install -d ${D}${systemd_unitdir}/system
145 install -m 0644 ${WORKDIR}/mysqld.service ${D}${systemd_unitdir}/system
146 install -m 0644 ${WORKDIR}/install_db.service ${D}${systemd_unitdir}/system
147 sed -i -e 's,@BINDIR@,${bindir},g' -e 's,@PREFIX@,${prefix},g' ${D}${systemd_unitdir}/system/mysqld.service \
148 ${D}${systemd_unitdir}/system/install_db.service
149
150 if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
151 install -d ${D}${sysconfdir}/tmpfiles.d
152 echo "f /var/log/mysqld.err 0640 mysql mysql -" \
153 > ${D}${sysconfdir}/tmpfiles.d/99-mysqld.conf
154 fi
155 install -d ${D}${bindir}
156 install -m 755 ${WORKDIR}/mysql-systemd-start ${D}${bindir}
157 install -d ${D}${datadir}/doc/${PN}
158 if [ -f ${D}${datadir}/doc/README ]; then
159 mv ${D}${datadir}/doc/README ${D}${datadir}/doc/${PN}/
160 fi
161}
162
163PACKAGES = "${PN}-dbg ${PN} \
164 libmysqlclient-r libmysqlclient-r-dev libmysqlclient-r-staticdev libmysqlclient-r-dbg \
165 libmysqlclient libmysqlclient-dev libmysqlclient-staticdev libmysqlclient-dbg \
166 libmysqld libmysqld-dev ${PN}-client ${PN}-server ${PN}-setupdb ${PN}-leftovers"
167CONFFILES_${PN}-server += "${sysconfdir}/my.cnf ${sysconfdir}/my.cnf.d/server.cnf"
168CONFFILES_${PN}-client += "${sysconfdir}/my.cnf.d/mysql-clients.cnf"
169CONFFILES_libmysqlclient += "${sysconfdir}/my.cnf.d/client.cnf"
170
171FILES_${PN} = " "
172RDEPENDS_${PN} = "${PN}-client ${PN}-server"
173ALLOW_EMPTY_${PN} = "1"
174
175RDEPENDS_${PN}-client = "perl perl-module-getopt-long perl-module-file-temp \
176 perl-module-fcntl perl-module-sys-hostname perl-module-ipc-open3 \
177 perl-module-exporter"
178RDEPENDS_${PN}-server = "perl perl-module-getopt-long perl-module-data-dumper \
179 perl-module-file-basename perl-module-file-path perl-module-sys-hostname \
180 perl-module-file-copy perl-module-file-temp perl-module-posix \
181 ${PN}-client libdbi-perl libdbd-mysql-perl"
182RDEPENDS_${PN}-leftovers = "perl perl-module-cwd perl-module-benchmark perl-module-getopt-long \
183 perl-module-posix perl-module-data-dumper perl-module-sigtrap perl-module-threads \
184 perl-module-threads-shared perl-module-io-socket perl-module-sys-hostname perl-module-file-copy \
185 perl-module-file-spec perl-module-file-find perl-module-file-basename perl-module-file-path \
186 perl-module-constant perl-module-lib perl-module-file-temp perl-module-file-spec-functions \
187 perl-module-io-socket-inet perl-module-io-select"
188RDEPENDS_${PN}-setupdb = "coreutils"
189
190# Allow old code to link to the backward compatible library
191RDEPENDS_libmysqlclient-dev = "libmysqlclient-r-dev"
192
193FILES_libmysqlclient = "\
194 ${libdir}/libmysqlclient.so.* \
195 ${sysconfdir}/my.cnf.d/client.cnf"
196FILES_libmysqlclient-dev = " \
197 ${includedir}/mysql/ \
198 ${libdir}/libmysqlclient.so \
199 ${sysconfdir}/aclocal \
200 ${bindir}/mysql_config"
201FILES_libmysqlclient-staticdev = "\
202 ${libdir}/*.a"
203FILES_libmysqlclient-dbg = "${libdir}/plugin/.debug/ \
204 ${datadir}/mysql-test/lib/My/SafeProcess/.debug/my_safe_process"
205
206# Avoid warnings about ha_xtradb.so.0.0.0 and ha_innodb_plugin.so.0.0.0
207# which are intentionally non-PIC on 32-bit x86 (see e.g.
208# storage/xtradb/plug.in in the source)
209INSANE_SKIP_libmysqlclient_append_x86 = " textrel"
210
211FILES_libmysqlclient-r = "${libdir}/libmysqlclient_r.so.*"
212FILES_libmysqlclient-r-dev = "\
213 ${libdir}/libmysqlclient_r.so"
214FILES_libmysqlclient-r-staticdev = "${libdir}/libmysqlclient_r.a"
215FILES_libmysqlclient-r-dbg = "${libdir}/plugin/.debuglibmysqlclient_r.so.*"
216
217FILES_libmysqld = "\
218 ${libdir}/libmysqld.so.*"
219FILES_libmysqld-dev = "\
220 ${libdir}/libmysqld.so"
221
222FILES_${PN}-client = "\
223 ${bindir}/myisam_ftdump \
224 ${bindir}/mysql \
225 ${bindir}/mysql_client_test \
226 ${bindir}/mysql_client_test_embedded \
227 ${bindir}/mysql_find_rows \
228 ${bindir}/mysql_fix_extensions \
229 ${bindir}/mysql_waitpid \
230 ${bindir}/mysqlaccess \
231 ${bindir}/mysqladmin \
232 ${bindir}/mysqlbug \
233 ${bindir}/mysqlcheck \
234 ${bindir}/mysqldump \
235 ${bindir}/mysqldumpslow \
236 ${bindir}/mysqlimport \
237 ${bindir}/mysqlshow \
238 ${bindir}/mysqlslap \
239 ${bindir}/mysqltest_embedded \
240 ${libexecdir}/mysqlmanager \
241 ${sysconfdir}/my.cnf.d/mysql-clients.cnf"
242
243FILES_${PN}-server = "\
244 ${bindir}/comp_err \
245 ${bindir}/isamchk \
246 ${bindir}/isamlog \
247 ${bindir}/msql2mysql \
248 ${bindir}/my_print_defaults \
249 ${bindir}/myisamchk \
250 ${bindir}/myisamlog \
251 ${bindir}/myisampack \
252 ${bindir}/mysql_convert_table_format \
253 ${bindir}/mysql_fix_privilege_tables \
254 ${bindir}/mysql_install_db \
255 ${bindir}/mysql_secure_installation \
256 ${bindir}/mysql_setpermission \
257 ${bindir}/mysql-systemd-start \
258 ${bindir}/mysql_tzinfo_to_sql \
259 ${bindir}/mysql_upgrade \
260 ${bindir}/mysql_plugin \
261 ${bindir}/mysql_zap \
262 ${bindir}/mysqlbinlog \
263 ${bindir}/mysqld_multi \
264 ${bindir}/mysqld_safe \
265 ${bindir}/mysqld_safe_helper \
266 ${bindir}/mysqlhotcopy \
267 ${bindir}/mysqltest \
268 ${bindir}/ndb_delete_all \
269 ${bindir}/ndb_desc \
270 ${bindir}/ndb_drop_index \
271 ${bindir}/ndb_drop_table \
272 ${bindir}/ndb_mgm \
273 ${bindir}/ndb_restore \
274 ${bindir}/ndb_select_all \
275 ${bindir}/ndb_select_count \
276 ${bindir}/ndb_show_tables \
277 ${bindir}/ndb_waiter \
278 ${bindir}/pack_isam \
279 ${bindir}/perror \
280 ${bindir}/replace \
281 ${bindir}/resolve_stack_dump \
282 ${bindir}/resolveip \
283 ${libexecdir}/mysqld \
284 ${sbindir}/mysqld \
285 ${sbindir}/ndb_cpcd \
286 ${sbindir}/ndbd \
287 ${sbindir}/ndb_mgmd \
288 ${libdir}/plugin/*.so \
289 ${datadir}/mysql/ \
290 ${localstatedir}/mysql/ \
291 ${sysconfdir}/init.d/mysqld \
292 ${sysconfdir}/my.cnf \
293 ${sysconfdir}/my.cnf.d/server.cnf \
294 ${sysconfdir}/tmpfiles.d"
295
296DESCRIPTION_${PN}-leftovers = "unpackaged and probably unneeded files for ${PN}"
297FILES_${PN}-leftovers = "/"