diff options
author | Paul Eggleton <paul.eggleton@linux.intel.com> | 2014-08-08 15:16:40 +0100 |
---|---|---|
committer | Martin Jansa <Martin.Jansa@gmail.com> | 2014-08-10 16:07:19 +0200 |
commit | e751af9f900834759e59ad2b46a7118a508069e4 (patch) | |
tree | 12e227a625d2a58270788f217c3462e76fac400d /meta-oe/recipes-support/mysql/mariadb_5.5.38.inc | |
parent | f38639c2214653f1a4cbcb5242c5a699b251dec8 (diff) | |
download | meta-openembedded-e751af9f900834759e59ad2b46a7118a508069e4.tar.gz |
mariadb: update to 5.5.38
* Upstream switched from autotools to cmake
* Separate build dir and parallel make now work
* Library versioning no longer used for plugins; other libtool cruft
gone
* Proper upstream initscript
* Plugins moved from client library package to mariadb-server package
(matches how Fedora packages these)
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Diffstat (limited to 'meta-oe/recipes-support/mysql/mariadb_5.5.38.inc')
-rw-r--r-- | meta-oe/recipes-support/mysql/mariadb_5.5.38.inc | 253 |
1 files changed, 253 insertions, 0 deletions
diff --git a/meta-oe/recipes-support/mysql/mariadb_5.5.38.inc b/meta-oe/recipes-support/mysql/mariadb_5.5.38.inc new file mode 100644 index 000000000..e6eae7873 --- /dev/null +++ b/meta-oe/recipes-support/mysql/mariadb_5.5.38.inc | |||
@@ -0,0 +1,253 @@ | |||
1 | SUMMARY = "A robust, scalable, and reliable SQL server" | ||
2 | HOMEPAGE = "http://mariadb.org" | ||
3 | SECTION = "libs" | ||
4 | LICENSE = "GPLv2" | ||
5 | LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe" | ||
6 | |||
7 | SRC_URI = "http://mirror.stshosting.co.uk/mariadb/mariadb-${PV}/source/mariadb-${PV}.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 | " | ||
13 | |||
14 | SRC_URI[md5sum] = "fa9ba00b084b95a45fab70860c412f10" | ||
15 | SRC_URI[sha256sum] = "efc839e6627064b3b5c6c39854198f0d34907f48937804758d4c09c7717be8d3" | ||
16 | |||
17 | S = "${WORKDIR}/mariadb-${PV}" | ||
18 | |||
19 | BINCONFIG_GLOB = "mysql_config" | ||
20 | |||
21 | inherit cmake gettext binconfig update-rc.d useradd | ||
22 | |||
23 | INITSCRIPT_PACKAGES = "${PN}-server" | ||
24 | INITSCRIPT_NAME = "mysqld" | ||
25 | INITSCRIPT_PARAMS = "start 45 5 . stop 45 0 6 1 ." | ||
26 | |||
27 | USERADD_PACKAGES = "${PN}-server" | ||
28 | USERADD_PARAM_${PN}-server = "--system --home-dir /var/mysql -g nogroup --shell /bin/false mysql" | ||
29 | |||
30 | |||
31 | EXTRA_OEMAKE = "'GEN_LEX_HASH=${STAGING_BINDIR_NATIVE}/gen_lex_hash'" | ||
32 | |||
33 | python __anonymous() { | ||
34 | # This is a pain but it's the only way to pass these in since | ||
35 | # MariaDB's cmake scripts insist on prepending the prefix to the | ||
36 | # specified values for INSTALL_* | ||
37 | localdata = d.createCopy() | ||
38 | localdata.setVar('prefix', '') | ||
39 | localdata.setVar('exec_prefix', '') | ||
40 | d.setVar('bindir_noprefix', localdata.getVar('bindir', True).lstrip('/')) | ||
41 | d.setVar('sbindir_noprefix', localdata.getVar('sbindir', True).lstrip('/')) | ||
42 | d.setVar('datadir_noprefix', localdata.getVar('datadir', True).lstrip('/')) | ||
43 | d.setVar('libdir_noprefix', localdata.getVar('libdir', True).lstrip('/')) | ||
44 | } | ||
45 | |||
46 | PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam', '', d)}" | ||
47 | PACKAGECONFIG_class-native = "" | ||
48 | PACKAGECONFIG[pam] = ",-DWITHOUT_AUTH_PAM=TRUE,libpam" | ||
49 | |||
50 | # MariaDB doesn't link properly with gold | ||
51 | # https://mariadb.atlassian.net/browse/MDEV-5982 | ||
52 | TARGET_CFLAGS += "-fuse-ld=bfd" | ||
53 | |||
54 | EXTRA_OECMAKE = "-DWITH_EMBEDDED_SERVER=ON \ | ||
55 | -DWITH_JEMALLOC=no \ | ||
56 | -DWITHOUT_TOKUDB=TRUE \ | ||
57 | -DCMAKE_DISABLE_FIND_PACKAGE_Boost=TRUE \ | ||
58 | -DGROFF=FALSE \ | ||
59 | -DNROFF=FALSE \ | ||
60 | -DENABLE_DTRACE=FALSE \ | ||
61 | -DWITH_PIC=ON \ | ||
62 | -DINSTALL_DOCDIR:PATH=${datadir_noprefix}/doc/${BPN} \ | ||
63 | -DINSTALL_BINDIR:PATH=${bindir_noprefix} \ | ||
64 | -DINSTALL_SBINDIR:PATH=${sbindir_noprefix} \ | ||
65 | -DINSTALL_SCRIPTDIR:PATH=${bindir_noprefix} \ | ||
66 | -DINSTALL_LIBDIR:PATH=${libdir_noprefix} \ | ||
67 | -DINSTALL_PLUGINDIR:PATH=${libdir_noprefix}/plugin \ | ||
68 | -DINSTALL_SYSCONFDIR:PATH=${sysconfdir} \ | ||
69 | -DINSTALL_MYSQLSHAREDIR:PATH=${datadir_noprefix}/mysql \ | ||
70 | -DINSTALL_SUPPORTFILESDIR:PATH=${datadir_noprefix}/mysql-support-files \ | ||
71 | -DMYSQL_DATADIR:PATH=/var/mysql \ | ||
72 | -DCAT_EXECUTABLE=`which cat` \ | ||
73 | -DCMAKE_AR:FILEPATH=${AR}" | ||
74 | |||
75 | do_configure_append() { | ||
76 | # handle distros with different values of ${libexecdir} | ||
77 | libexecdir2=`echo ${libexecdir} | sed -e 's+/usr/++g'` | ||
78 | sed -i -e "s:/libexec:/$libexecdir2:g" ${S}/scripts/mysql_install_db.sh | ||
79 | sed -i -e "s:mysqld libexec:mysqld $libexecdir2:g" ${S}/scripts/mysql_install_db.sh | ||
80 | sed -i -e "s:/libexec:/$libexecdir2:g" ${S}/scripts/mysqld_safe.sh | ||
81 | } | ||
82 | |||
83 | do_generate_toolchain_file_append_class-native () { | ||
84 | # If these are set cmake will assume we're cross-compiling, which will | ||
85 | # result in certain things we want being disabled | ||
86 | sed -i "/set( CMAKE_SYSTEM_NAME/d" ${WORKDIR}/toolchain.cmake | ||
87 | sed -i "/set( CMAKE_SYSTEM_PROCESSOR/d" ${WORKDIR}/toolchain.cmake | ||
88 | } | ||
89 | |||
90 | do_compile_prepend_class-target () { | ||
91 | # These need to be in-tree or make will think they need to be built, | ||
92 | # and since we're cross-compiling that is disabled | ||
93 | cp ${STAGING_BINDIR_NATIVE}/comp_err ${S}/extra | ||
94 | cp ${STAGING_BINDIR_NATIVE}/comp_sql ${S}/scripts | ||
95 | } | ||
96 | |||
97 | SYSROOT_PREPROCESS_FUNCS += "mariadb_sysroot_preprocess" | ||
98 | |||
99 | # We need to append this so it runs *after* binconfig's preprocess function | ||
100 | # | ||
101 | # We really don't care exactly what the directories were set to originally. | ||
102 | # plugindir is not fixed, but we don't create any plugins. | ||
103 | # | ||
104 | mariadb_sysroot_preprocess () { | ||
105 | sed -i -es,^pkgincludedir=.*,pkgincludedir=\'${STAGING_INCDIR}/mysql\', ${SYSROOT_DESTDIR}${bindir_crossscripts}/mysql_config | ||
106 | sed -i -es,^pkglibdir=.*,pkglibdir=\'${STAGING_LIBDIR}\', ${SYSROOT_DESTDIR}${bindir_crossscripts}/mysql_config | ||
107 | } | ||
108 | |||
109 | do_install() { | ||
110 | oe_runmake 'DESTDIR=${D}' install | ||
111 | |||
112 | install -d ${D}/${sysconfdir}/init.d | ||
113 | install -m 0644 ${WORKDIR}/my.cnf ${D}/${sysconfdir}/ | ||
114 | mv ${D}/${sysconfdir}/init.d/mysql ${D}/${sysconfdir}/init.d/mysqld | ||
115 | } | ||
116 | |||
117 | pkg_postinst_${PN}-server () { | ||
118 | if [ "x$D" != "x" ]; then | ||
119 | exit 1 | ||
120 | fi | ||
121 | |||
122 | #Install the database | ||
123 | test -d /usr/bin || mkdir -p /usr/bin | ||
124 | test -e /usr/bin/hostname || ln -s /bin/hostname /usr/bin/hostname | ||
125 | mkdir /var/lib/mysql | ||
126 | chown mysql.nogroup /var/lib/mysql | ||
127 | |||
128 | mysql_install_db --basedir=${prefix} --user=mysql | ||
129 | |||
130 | } | ||
131 | |||
132 | PACKAGES = "${PN}-dbg ${PN} \ | ||
133 | libmysqlclient-r libmysqlclient-r-dev libmysqlclient-r-staticdev libmysqlclient-r-dbg \ | ||
134 | libmysqlclient libmysqlclient-dev libmysqlclient-staticdev libmysqlclient-dbg \ | ||
135 | libmysqld libmysqld-dev ${PN}-client ${PN}-server ${PN}-leftovers" | ||
136 | CONFFILES_${PN}-server += "${sysconfdir}/my.cnf" | ||
137 | |||
138 | FILES_${PN} = " " | ||
139 | RDEPENDS_${PN} = "${PN}-client ${PN}-server" | ||
140 | ALLOW_EMPTY_${PN} = "1" | ||
141 | |||
142 | RDEPENDS_${PN}-client = "perl perl-module-getopt-long perl-module-file-temp \ | ||
143 | perl-module-fcntl perl-module-sys-hostname perl-module-ipc-open3 \ | ||
144 | perl-module-exporter" | ||
145 | RDEPENDS_${PN}-server = "perl perl-module-getopt-long perl-module-data-dumper \ | ||
146 | perl-module-file-basename perl-module-file-path perl-module-sys-hostname \ | ||
147 | perl-module-file-copy perl-module-file-temp perl-module-posix" | ||
148 | RDEPENDS_${PN}-leftovers = "perl perl-module-cwd perl-module-benchmark perl-module-getopt-long \ | ||
149 | perl-module-posix perl-module-data-dumper perl-module-sigtrap perl-module-threads \ | ||
150 | perl-module-threads-shared perl-module-io-socket perl-module-sys-hostname perl-module-file-copy \ | ||
151 | perl-module-file-spec perl-module-file-find perl-module-file-basename perl-module-file-path \ | ||
152 | perl-module-constant perl-module-lib perl-module-file-temp perl-module-file-spec-functions \ | ||
153 | perl-module-io-socket-inet perl-module-io-select" | ||
154 | |||
155 | FILES_libmysqlclient = "\ | ||
156 | ${libdir}/libmysqlclient.so.*" | ||
157 | FILES_libmysqlclient-dev = " \ | ||
158 | ${includedir}/mysql/ \ | ||
159 | ${libdir}/libmysqlclient.so \ | ||
160 | ${sysconfdir}/aclocal \ | ||
161 | ${bindir}/mysql_config" | ||
162 | FILES_libmysqlclient-staticdev = "\ | ||
163 | ${libdir}/*.a" | ||
164 | FILES_libmysqlclient-dbg = "${libdir}/plugin/.debug/ \ | ||
165 | /usr/mysql-test/lib/My/SafeProcess/.debug/my_safe_process" | ||
166 | |||
167 | # Avoid warnings about ha_xtradb.so.0.0.0 and ha_innodb_plugin.so.0.0.0 | ||
168 | # which are intentionally non-PIC on 32-bit x86 (see e.g. | ||
169 | # storage/xtradb/plug.in in the source) | ||
170 | INSANE_SKIP_libmysqlclient_append_i586 = " textrel" | ||
171 | |||
172 | FILES_libmysqlclient-r = "${libdir}/libmysqlclient_r.so.*" | ||
173 | FILES_libmysqlclient-r-dev = "\ | ||
174 | ${libdir}/libmysqlclient_r.so" | ||
175 | FILES_libmysqlclient-r-staticdev = "${libdir}/libmysqlclient_r.a" | ||
176 | FILES_libmysqlclient-r-dbg = "${libdir}/plugin/.debuglibmysqlclient_r.so.*" | ||
177 | |||
178 | FILES_libmysqld = "\ | ||
179 | ${libdir}/libmysqld.so.*" | ||
180 | FILES_libmysqld-dev = "\ | ||
181 | ${libdir}/libmysqld.so" | ||
182 | |||
183 | FILES_${PN}-client = "\ | ||
184 | ${bindir}/myisam_ftdump \ | ||
185 | ${bindir}/mysql \ | ||
186 | ${bindir}/mysql_client_test \ | ||
187 | ${bindir}/mysql_client_test_embedded \ | ||
188 | ${bindir}/mysql_find_rows \ | ||
189 | ${bindir}/mysql_fix_extensions \ | ||
190 | ${bindir}/mysql_waitpid \ | ||
191 | ${bindir}/mysqlaccess \ | ||
192 | ${bindir}/mysqladmin \ | ||
193 | ${bindir}/mysqlbug \ | ||
194 | ${bindir}/mysqlcheck \ | ||
195 | ${bindir}/mysqldump \ | ||
196 | ${bindir}/mysqldumpslow \ | ||
197 | ${bindir}/mysqlimport \ | ||
198 | ${bindir}/mysqlshow \ | ||
199 | ${bindir}/mysqlslap \ | ||
200 | ${bindir}/mysqltest_embedded \ | ||
201 | ${libexecdir}/mysqlmanager" | ||
202 | |||
203 | FILES_${PN}-server = "\ | ||
204 | ${bindir}/comp_err \ | ||
205 | ${bindir}/isamchk \ | ||
206 | ${bindir}/isamlog \ | ||
207 | ${bindir}/msql2mysql \ | ||
208 | ${bindir}/my_print_defaults \ | ||
209 | ${bindir}/myisamchk \ | ||
210 | ${bindir}/myisamlog \ | ||
211 | ${bindir}/myisampack \ | ||
212 | ${bindir}/mysql_convert_table_format \ | ||
213 | ${bindir}/mysql_fix_privilege_tables \ | ||
214 | ${bindir}/mysql_install_db \ | ||
215 | ${bindir}/mysql_secure_installation \ | ||
216 | ${bindir}/mysql_setpermission \ | ||
217 | ${bindir}/mysql_tzinfo_to_sql \ | ||
218 | ${bindir}/mysql_upgrade \ | ||
219 | ${bindir}/mysql_plugin \ | ||
220 | ${bindir}/mysql_zap \ | ||
221 | ${bindir}/mysqlbinlog \ | ||
222 | ${bindir}/mysqld_multi \ | ||
223 | ${bindir}/mysqld_safe \ | ||
224 | ${bindir}/mysqlhotcopy \ | ||
225 | ${bindir}/mysqltest \ | ||
226 | ${bindir}/ndb_delete_all \ | ||
227 | ${bindir}/ndb_desc \ | ||
228 | ${bindir}/ndb_drop_index \ | ||
229 | ${bindir}/ndb_drop_table \ | ||
230 | ${bindir}/ndb_mgm \ | ||
231 | ${bindir}/ndb_restore \ | ||
232 | ${bindir}/ndb_select_all \ | ||
233 | ${bindir}/ndb_select_count \ | ||
234 | ${bindir}/ndb_show_tables \ | ||
235 | ${bindir}/ndb_waiter \ | ||
236 | ${bindir}/pack_isam \ | ||
237 | ${bindir}/perror \ | ||
238 | ${bindir}/replace \ | ||
239 | ${bindir}/resolve_stack_dump \ | ||
240 | ${bindir}/resolveip \ | ||
241 | ${libexecdir}/mysqld \ | ||
242 | ${sbindir}/mysqld \ | ||
243 | ${sbindir}/ndb_cpcd \ | ||
244 | ${sbindir}/ndbd \ | ||
245 | ${sbindir}/ndb_mgmd \ | ||
246 | ${libdir}/plugin/*.so \ | ||
247 | ${datadir}/mysql/ \ | ||
248 | ${localstatedir}/mysql/ \ | ||
249 | ${sysconfdir}/init.d \ | ||
250 | ${sysconfdir}/my.cnf" | ||
251 | |||
252 | DESCRIPTION_${PN}-leftovers = "unpackaged and probably unneeded files for ${PN}" | ||
253 | FILES_${PN}-leftovers = "/" | ||