You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

598 lines
19 KiB

mariadb: improve packaging and configuration At present there are some flaws related to configuration, also related to the packaging of mariadb. For starters there are complaints that the configuration is too static. To address this a new configuration layout is introduced. The primary configuration file (my.cnf) is changed so that it now only includes further configuration files in the directory /etc/mysql/conf.d. More default configuration files are added for the server and the client. This is the new default configuration. With these changes it's possible for the user to select if they want to change the default configuration (in conf.d/*.cnf) or if they want to drop their own files into conf.d instead. If the user .cnf files are read after the default .cnf files (files are included in alphabetical order), they will overwrite the settings from the default configuration. The other flaw is that the my.cnf file is included in mariadb-server. But that doesn't really fit the requirements, as the client also uses the configuration file(s). To accomodate this a new package mariadb-common is added. It installs the shared my.cnf file. The remaining changes add base packages, both for the server and the client. These are meant as foundation for the packages containing the respective binaries. In summary they will install the configuration, small miscellaneous files (SQL scripts etc.) and the user "mariadb". That means that everything is ready for the binaries, like mysql and mysqld. If there is not enough space left on flash memory, the user can just drop the binaries on a pendrive, link them to /usr/bin and get started. The ideas and configuration files were copied from Debian. Some amendments were made. Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
6 years ago
mariadb: improve packaging and configuration At present there are some flaws related to configuration, also related to the packaging of mariadb. For starters there are complaints that the configuration is too static. To address this a new configuration layout is introduced. The primary configuration file (my.cnf) is changed so that it now only includes further configuration files in the directory /etc/mysql/conf.d. More default configuration files are added for the server and the client. This is the new default configuration. With these changes it's possible for the user to select if they want to change the default configuration (in conf.d/*.cnf) or if they want to drop their own files into conf.d instead. If the user .cnf files are read after the default .cnf files (files are included in alphabetical order), they will overwrite the settings from the default configuration. The other flaw is that the my.cnf file is included in mariadb-server. But that doesn't really fit the requirements, as the client also uses the configuration file(s). To accomodate this a new package mariadb-common is added. It installs the shared my.cnf file. The remaining changes add base packages, both for the server and the client. These are meant as foundation for the packages containing the respective binaries. In summary they will install the configuration, small miscellaneous files (SQL scripts etc.) and the user "mariadb". That means that everything is ready for the binaries, like mysql and mysqld. If there is not enough space left on flash memory, the user can just drop the binaries on a pendrive, link them to /usr/bin and get started. The ideas and configuration files were copied from Debian. Some amendments were made. Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
6 years ago
mariadb: improve packaging and configuration At present there are some flaws related to configuration, also related to the packaging of mariadb. For starters there are complaints that the configuration is too static. To address this a new configuration layout is introduced. The primary configuration file (my.cnf) is changed so that it now only includes further configuration files in the directory /etc/mysql/conf.d. More default configuration files are added for the server and the client. This is the new default configuration. With these changes it's possible for the user to select if they want to change the default configuration (in conf.d/*.cnf) or if they want to drop their own files into conf.d instead. If the user .cnf files are read after the default .cnf files (files are included in alphabetical order), they will overwrite the settings from the default configuration. The other flaw is that the my.cnf file is included in mariadb-server. But that doesn't really fit the requirements, as the client also uses the configuration file(s). To accomodate this a new package mariadb-common is added. It installs the shared my.cnf file. The remaining changes add base packages, both for the server and the client. These are meant as foundation for the packages containing the respective binaries. In summary they will install the configuration, small miscellaneous files (SQL scripts etc.) and the user "mariadb". That means that everything is ready for the binaries, like mysql and mysqld. If there is not enough space left on flash memory, the user can just drop the binaries on a pendrive, link them to /usr/bin and get started. The ideas and configuration files were copied from Debian. Some amendments were made. Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
6 years ago
mariadb: improve packaging and configuration At present there are some flaws related to configuration, also related to the packaging of mariadb. For starters there are complaints that the configuration is too static. To address this a new configuration layout is introduced. The primary configuration file (my.cnf) is changed so that it now only includes further configuration files in the directory /etc/mysql/conf.d. More default configuration files are added for the server and the client. This is the new default configuration. With these changes it's possible for the user to select if they want to change the default configuration (in conf.d/*.cnf) or if they want to drop their own files into conf.d instead. If the user .cnf files are read after the default .cnf files (files are included in alphabetical order), they will overwrite the settings from the default configuration. The other flaw is that the my.cnf file is included in mariadb-server. But that doesn't really fit the requirements, as the client also uses the configuration file(s). To accomodate this a new package mariadb-common is added. It installs the shared my.cnf file. The remaining changes add base packages, both for the server and the client. These are meant as foundation for the packages containing the respective binaries. In summary they will install the configuration, small miscellaneous files (SQL scripts etc.) and the user "mariadb". That means that everything is ready for the binaries, like mysql and mysqld. If there is not enough space left on flash memory, the user can just drop the binaries on a pendrive, link them to /usr/bin and get started. The ideas and configuration files were copied from Debian. Some amendments were made. Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
6 years ago
mariadb: improve packaging and configuration At present there are some flaws related to configuration, also related to the packaging of mariadb. For starters there are complaints that the configuration is too static. To address this a new configuration layout is introduced. The primary configuration file (my.cnf) is changed so that it now only includes further configuration files in the directory /etc/mysql/conf.d. More default configuration files are added for the server and the client. This is the new default configuration. With these changes it's possible for the user to select if they want to change the default configuration (in conf.d/*.cnf) or if they want to drop their own files into conf.d instead. If the user .cnf files are read after the default .cnf files (files are included in alphabetical order), they will overwrite the settings from the default configuration. The other flaw is that the my.cnf file is included in mariadb-server. But that doesn't really fit the requirements, as the client also uses the configuration file(s). To accomodate this a new package mariadb-common is added. It installs the shared my.cnf file. The remaining changes add base packages, both for the server and the client. These are meant as foundation for the packages containing the respective binaries. In summary they will install the configuration, small miscellaneous files (SQL scripts etc.) and the user "mariadb". That means that everything is ready for the binaries, like mysql and mysqld. If there is not enough space left on flash memory, the user can just drop the binaries on a pendrive, link them to /usr/bin and get started. The ideas and configuration files were copied from Debian. Some amendments were made. Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
6 years ago
mariadb: improve packaging and configuration At present there are some flaws related to configuration, also related to the packaging of mariadb. For starters there are complaints that the configuration is too static. To address this a new configuration layout is introduced. The primary configuration file (my.cnf) is changed so that it now only includes further configuration files in the directory /etc/mysql/conf.d. More default configuration files are added for the server and the client. This is the new default configuration. With these changes it's possible for the user to select if they want to change the default configuration (in conf.d/*.cnf) or if they want to drop their own files into conf.d instead. If the user .cnf files are read after the default .cnf files (files are included in alphabetical order), they will overwrite the settings from the default configuration. The other flaw is that the my.cnf file is included in mariadb-server. But that doesn't really fit the requirements, as the client also uses the configuration file(s). To accomodate this a new package mariadb-common is added. It installs the shared my.cnf file. The remaining changes add base packages, both for the server and the client. These are meant as foundation for the packages containing the respective binaries. In summary they will install the configuration, small miscellaneous files (SQL scripts etc.) and the user "mariadb". That means that everything is ready for the binaries, like mysql and mysqld. If there is not enough space left on flash memory, the user can just drop the binaries on a pendrive, link them to /usr/bin and get started. The ideas and configuration files were copied from Debian. Some amendments were made. Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
6 years ago
mariadb: improve packaging and configuration At present there are some flaws related to configuration, also related to the packaging of mariadb. For starters there are complaints that the configuration is too static. To address this a new configuration layout is introduced. The primary configuration file (my.cnf) is changed so that it now only includes further configuration files in the directory /etc/mysql/conf.d. More default configuration files are added for the server and the client. This is the new default configuration. With these changes it's possible for the user to select if they want to change the default configuration (in conf.d/*.cnf) or if they want to drop their own files into conf.d instead. If the user .cnf files are read after the default .cnf files (files are included in alphabetical order), they will overwrite the settings from the default configuration. The other flaw is that the my.cnf file is included in mariadb-server. But that doesn't really fit the requirements, as the client also uses the configuration file(s). To accomodate this a new package mariadb-common is added. It installs the shared my.cnf file. The remaining changes add base packages, both for the server and the client. These are meant as foundation for the packages containing the respective binaries. In summary they will install the configuration, small miscellaneous files (SQL scripts etc.) and the user "mariadb". That means that everything is ready for the binaries, like mysql and mysqld. If there is not enough space left on flash memory, the user can just drop the binaries on a pendrive, link them to /usr/bin and get started. The ideas and configuration files were copied from Debian. Some amendments were made. Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
6 years ago
mariadb: improve packaging and configuration At present there are some flaws related to configuration, also related to the packaging of mariadb. For starters there are complaints that the configuration is too static. To address this a new configuration layout is introduced. The primary configuration file (my.cnf) is changed so that it now only includes further configuration files in the directory /etc/mysql/conf.d. More default configuration files are added for the server and the client. This is the new default configuration. With these changes it's possible for the user to select if they want to change the default configuration (in conf.d/*.cnf) or if they want to drop their own files into conf.d instead. If the user .cnf files are read after the default .cnf files (files are included in alphabetical order), they will overwrite the settings from the default configuration. The other flaw is that the my.cnf file is included in mariadb-server. But that doesn't really fit the requirements, as the client also uses the configuration file(s). To accomodate this a new package mariadb-common is added. It installs the shared my.cnf file. The remaining changes add base packages, both for the server and the client. These are meant as foundation for the packages containing the respective binaries. In summary they will install the configuration, small miscellaneous files (SQL scripts etc.) and the user "mariadb". That means that everything is ready for the binaries, like mysql and mysqld. If there is not enough space left on flash memory, the user can just drop the binaries on a pendrive, link them to /usr/bin and get started. The ideas and configuration files were copied from Debian. Some amendments were made. Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
6 years ago
mariadb: improve packaging and configuration At present there are some flaws related to configuration, also related to the packaging of mariadb. For starters there are complaints that the configuration is too static. To address this a new configuration layout is introduced. The primary configuration file (my.cnf) is changed so that it now only includes further configuration files in the directory /etc/mysql/conf.d. More default configuration files are added for the server and the client. This is the new default configuration. With these changes it's possible for the user to select if they want to change the default configuration (in conf.d/*.cnf) or if they want to drop their own files into conf.d instead. If the user .cnf files are read after the default .cnf files (files are included in alphabetical order), they will overwrite the settings from the default configuration. The other flaw is that the my.cnf file is included in mariadb-server. But that doesn't really fit the requirements, as the client also uses the configuration file(s). To accomodate this a new package mariadb-common is added. It installs the shared my.cnf file. The remaining changes add base packages, both for the server and the client. These are meant as foundation for the packages containing the respective binaries. In summary they will install the configuration, small miscellaneous files (SQL scripts etc.) and the user "mariadb". That means that everything is ready for the binaries, like mysql and mysqld. If there is not enough space left on flash memory, the user can just drop the binaries on a pendrive, link them to /usr/bin and get started. The ideas and configuration files were copied from Debian. Some amendments were made. Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
6 years ago
mariadb: improve packaging and configuration At present there are some flaws related to configuration, also related to the packaging of mariadb. For starters there are complaints that the configuration is too static. To address this a new configuration layout is introduced. The primary configuration file (my.cnf) is changed so that it now only includes further configuration files in the directory /etc/mysql/conf.d. More default configuration files are added for the server and the client. This is the new default configuration. With these changes it's possible for the user to select if they want to change the default configuration (in conf.d/*.cnf) or if they want to drop their own files into conf.d instead. If the user .cnf files are read after the default .cnf files (files are included in alphabetical order), they will overwrite the settings from the default configuration. The other flaw is that the my.cnf file is included in mariadb-server. But that doesn't really fit the requirements, as the client also uses the configuration file(s). To accomodate this a new package mariadb-common is added. It installs the shared my.cnf file. The remaining changes add base packages, both for the server and the client. These are meant as foundation for the packages containing the respective binaries. In summary they will install the configuration, small miscellaneous files (SQL scripts etc.) and the user "mariadb". That means that everything is ready for the binaries, like mysql and mysqld. If there is not enough space left on flash memory, the user can just drop the binaries on a pendrive, link them to /usr/bin and get started. The ideas and configuration files were copied from Debian. Some amendments were made. Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
6 years ago
mariadb: improve packaging and configuration At present there are some flaws related to configuration, also related to the packaging of mariadb. For starters there are complaints that the configuration is too static. To address this a new configuration layout is introduced. The primary configuration file (my.cnf) is changed so that it now only includes further configuration files in the directory /etc/mysql/conf.d. More default configuration files are added for the server and the client. This is the new default configuration. With these changes it's possible for the user to select if they want to change the default configuration (in conf.d/*.cnf) or if they want to drop their own files into conf.d instead. If the user .cnf files are read after the default .cnf files (files are included in alphabetical order), they will overwrite the settings from the default configuration. The other flaw is that the my.cnf file is included in mariadb-server. But that doesn't really fit the requirements, as the client also uses the configuration file(s). To accomodate this a new package mariadb-common is added. It installs the shared my.cnf file. The remaining changes add base packages, both for the server and the client. These are meant as foundation for the packages containing the respective binaries. In summary they will install the configuration, small miscellaneous files (SQL scripts etc.) and the user "mariadb". That means that everything is ready for the binaries, like mysql and mysqld. If there is not enough space left on flash memory, the user can just drop the binaries on a pendrive, link them to /usr/bin and get started. The ideas and configuration files were copied from Debian. Some amendments were made. Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
6 years ago
mariadb: improve packaging and configuration At present there are some flaws related to configuration, also related to the packaging of mariadb. For starters there are complaints that the configuration is too static. To address this a new configuration layout is introduced. The primary configuration file (my.cnf) is changed so that it now only includes further configuration files in the directory /etc/mysql/conf.d. More default configuration files are added for the server and the client. This is the new default configuration. With these changes it's possible for the user to select if they want to change the default configuration (in conf.d/*.cnf) or if they want to drop their own files into conf.d instead. If the user .cnf files are read after the default .cnf files (files are included in alphabetical order), they will overwrite the settings from the default configuration. The other flaw is that the my.cnf file is included in mariadb-server. But that doesn't really fit the requirements, as the client also uses the configuration file(s). To accomodate this a new package mariadb-common is added. It installs the shared my.cnf file. The remaining changes add base packages, both for the server and the client. These are meant as foundation for the packages containing the respective binaries. In summary they will install the configuration, small miscellaneous files (SQL scripts etc.) and the user "mariadb". That means that everything is ready for the binaries, like mysql and mysqld. If there is not enough space left on flash memory, the user can just drop the binaries on a pendrive, link them to /usr/bin and get started. The ideas and configuration files were copied from Debian. Some amendments were made. Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
6 years ago
mariadb: improve packaging and configuration At present there are some flaws related to configuration, also related to the packaging of mariadb. For starters there are complaints that the configuration is too static. To address this a new configuration layout is introduced. The primary configuration file (my.cnf) is changed so that it now only includes further configuration files in the directory /etc/mysql/conf.d. More default configuration files are added for the server and the client. This is the new default configuration. With these changes it's possible for the user to select if they want to change the default configuration (in conf.d/*.cnf) or if they want to drop their own files into conf.d instead. If the user .cnf files are read after the default .cnf files (files are included in alphabetical order), they will overwrite the settings from the default configuration. The other flaw is that the my.cnf file is included in mariadb-server. But that doesn't really fit the requirements, as the client also uses the configuration file(s). To accomodate this a new package mariadb-common is added. It installs the shared my.cnf file. The remaining changes add base packages, both for the server and the client. These are meant as foundation for the packages containing the respective binaries. In summary they will install the configuration, small miscellaneous files (SQL scripts etc.) and the user "mariadb". That means that everything is ready for the binaries, like mysql and mysqld. If there is not enough space left on flash memory, the user can just drop the binaries on a pendrive, link them to /usr/bin and get started. The ideas and configuration files were copied from Debian. Some amendments were made. Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
6 years ago
mariadb: improve packaging and configuration At present there are some flaws related to configuration, also related to the packaging of mariadb. For starters there are complaints that the configuration is too static. To address this a new configuration layout is introduced. The primary configuration file (my.cnf) is changed so that it now only includes further configuration files in the directory /etc/mysql/conf.d. More default configuration files are added for the server and the client. This is the new default configuration. With these changes it's possible for the user to select if they want to change the default configuration (in conf.d/*.cnf) or if they want to drop their own files into conf.d instead. If the user .cnf files are read after the default .cnf files (files are included in alphabetical order), they will overwrite the settings from the default configuration. The other flaw is that the my.cnf file is included in mariadb-server. But that doesn't really fit the requirements, as the client also uses the configuration file(s). To accomodate this a new package mariadb-common is added. It installs the shared my.cnf file. The remaining changes add base packages, both for the server and the client. These are meant as foundation for the packages containing the respective binaries. In summary they will install the configuration, small miscellaneous files (SQL scripts etc.) and the user "mariadb". That means that everything is ready for the binaries, like mysql and mysqld. If there is not enough space left on flash memory, the user can just drop the binaries on a pendrive, link them to /usr/bin and get started. The ideas and configuration files were copied from Debian. Some amendments were made. Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
6 years ago
mariadb: improve packaging and configuration At present there are some flaws related to configuration, also related to the packaging of mariadb. For starters there are complaints that the configuration is too static. To address this a new configuration layout is introduced. The primary configuration file (my.cnf) is changed so that it now only includes further configuration files in the directory /etc/mysql/conf.d. More default configuration files are added for the server and the client. This is the new default configuration. With these changes it's possible for the user to select if they want to change the default configuration (in conf.d/*.cnf) or if they want to drop their own files into conf.d instead. If the user .cnf files are read after the default .cnf files (files are included in alphabetical order), they will overwrite the settings from the default configuration. The other flaw is that the my.cnf file is included in mariadb-server. But that doesn't really fit the requirements, as the client also uses the configuration file(s). To accomodate this a new package mariadb-common is added. It installs the shared my.cnf file. The remaining changes add base packages, both for the server and the client. These are meant as foundation for the packages containing the respective binaries. In summary they will install the configuration, small miscellaneous files (SQL scripts etc.) and the user "mariadb". That means that everything is ready for the binaries, like mysql and mysqld. If there is not enough space left on flash memory, the user can just drop the binaries on a pendrive, link them to /usr/bin and get started. The ideas and configuration files were copied from Debian. Some amendments were made. Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
6 years ago
  1. #
  2. # Copyright (C) 2018 Sebastian Kemper <sebastian_ml@gmx.net>
  3. #
  4. # This is free software, licensed under the GNU General Public License v2.
  5. # See /LICENSE for more information.
  6. #
  7. include $(TOPDIR)/rules.mk
  8. PKG_NAME:=mariadb
  9. PKG_VERSION:=10.4.12
  10. PKG_RELEASE:=2
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  12. PKG_SOURCE_URL := \
  13. https://mirror.netcologne.de/mariadb/$(PKG_NAME)-$(PKG_VERSION)/source \
  14. https://mirror.lstn.net/mariadb/$(PKG_NAME)-$(PKG_VERSION)/source \
  15. https://ftp.yz.yamagata-u.ac.jp/pub/dbms/mariadb/$(PKG_NAME)-$(PKG_VERSION)/source \
  16. https://downloads.mariadb.org/interstitial/$(PKG_NAME)-$(PKG_VERSION)/source
  17. PKG_HASH:=fef1e1d38aa253dd8a51006bd15aad184912fce31c446bb69434fcde735aa208
  18. PKG_MAINTAINER:=Sebastian Kemper <sebastian_ml@gmx.net>
  19. PKG_LICENSE:=GPL-2.0
  20. PKG_LICENSE_FILES:=COPYING THIRDPARTY
  21. PKG_CPE_ID:=cpe:/a:mariadb:mariadb
  22. HOST_BUILD_PARALLEL:=1
  23. PKG_BUILD_PARALLEL:=1
  24. PKG_USE_MIPS16:=0
  25. HOST_BUILD_DEPENDS:=libxml2/host
  26. # Without libevent2 tests/async_queries sporadically fails on the bots
  27. PKG_BUILD_DEPENDS:=libevent2 mariadb/host
  28. CMAKE_INSTALL:=1
  29. CONF_DIR:=/etc/mysql
  30. PLUGIN_DIR:=/usr/lib/mariadb/plugin
  31. SHARE_DIR:=/usr/share/mariadb
  32. MARIADB_SOCKET=/var/run/mysqld/mysqld.sock
  33. MARIADB_DISABLE_ENGINES := \
  34. cassandra \
  35. example \
  36. mroonga \
  37. oqgraph \
  38. rocksdb \
  39. test_sql_discovery \
  40. tokudb
  41. MARIADB_DISABLE_PLUGINS := \
  42. audit_null \
  43. auth_examples \
  44. aws_key_management \
  45. cracklib_password_check \
  46. daemon_example \
  47. debug_key_management \
  48. example_key_management \
  49. fulltext \
  50. versioning
  51. MARIADB_SERVER_PLUGINS := \
  52. auth_ed25519 \
  53. auth_gssapi \
  54. auth_pam \
  55. auth_pam_v1 \
  56. disks \
  57. feedback \
  58. file_key_management \
  59. ha_archive \
  60. ha_blackhole \
  61. ha_connect \
  62. ha_federated \
  63. ha_federatedx \
  64. ha_sphinx \
  65. ha_spider \
  66. handlersocket \
  67. locales \
  68. metadata_lock_info \
  69. query_cache_info \
  70. query_response_time \
  71. server_audit \
  72. simple_password_check \
  73. sql_errlog \
  74. wsrep_info
  75. PKG_CONFIG_DEPENDS := \
  76. $(patsubst %,CONFIG_PACKAGE_$(PKG_NAME)-server-plugin-%,$(subst _,-,$(MARIADB_SERVER_PLUGINS))) \
  77. CONFIG_PACKAGE_mariadb-server
  78. plugin-auth_ed25519 := PLUGIN_AUTH_ED25519
  79. plugin-auth_gssapi := PLUGIN_AUTH_GSSAPI
  80. plugin-auth_pam := PLUGIN_AUTH_PAM
  81. plugin-auth_pam_v1 := PLUGIN_AUTH_PAM_V1
  82. plugin-disks := PLUGIN_DISKS
  83. plugin-feedback := PLUGIN_FEEDBACK
  84. plugin-file_key_management := PLUGIN_FILE_KEY_MANAGEMENT
  85. plugin-ha_archive := PLUGIN_ARCHIVE
  86. plugin-ha_blackhole := PLUGIN_BLACKHOLE
  87. plugin-ha_connect := PLUGIN_CONNECT
  88. plugin-ha_federated := PLUGIN_FEDERATED
  89. plugin-ha_federatedx := PLUGIN_FEDERATEDX
  90. plugin-ha_sphinx := PLUGIN_SPHINX
  91. plugin-ha_spider := PLUGIN_SPIDER
  92. plugin-handlersocket := PLUGIN_HANDLERSOCKET
  93. plugin-locales := PLUGIN_LOCALES
  94. plugin-metadata_lock_info := PLUGIN_METADATA_LOCK_INFO
  95. plugin-query_cache_info := PLUGIN_QUERY_CACHE_INFO
  96. plugin-query_response_time := PLUGIN_QUERY_RESPONSE_TIME
  97. plugin-server_audit := PLUGIN_SERVER_AUDIT
  98. plugin-simple_password_check := PLUGIN_SIMPLE_PASSWORD_CHECK
  99. plugin-sql_errlog := PLUGIN_SQL_ERRLOG
  100. plugin-wsrep_info := PLUGIN_WSREP_INFO
  101. MARIADB_CLIENT := \
  102. mysql \
  103. mysqlcheck
  104. MARIADB_CLIENT_EXTRA := \
  105. mysql_find_rows \
  106. mysql_waitpid \
  107. mysqlaccess \
  108. mysqladmin \
  109. mysqldump \
  110. mysqlimport \
  111. mysqlshow \
  112. mysqlslap \
  113. mytop
  114. MARIADB_SERVER := \
  115. innochecksum \
  116. my_print_defaults \
  117. mysql_install_db \
  118. mysql_upgrade \
  119. mysqld
  120. MARIADB_SERVER_EXTRA := \
  121. aria_chk \
  122. aria_dump_log \
  123. aria_ftdump \
  124. aria_pack \
  125. aria_read_log \
  126. mariabackup \
  127. msql2mysql \
  128. myisam_ftdump \
  129. myisamchk \
  130. myisamlog \
  131. myisampack \
  132. mysql_convert_table_format \
  133. mysql_fix_extensions \
  134. mysql_plugin \
  135. mysql_secure_installation \
  136. mysql_setpermission \
  137. mysql_tzinfo_to_sql \
  138. mysqlbinlog \
  139. mysqld_multi \
  140. mysqldumpslow \
  141. mysqlhotcopy \
  142. perror \
  143. replace \
  144. resolve_stack_dump \
  145. wsrep_sst_mariabackup \
  146. wsrep_sst_mysqldump \
  147. wsrep_sst_rsync \
  148. wsrep_sst_rsync_wan
  149. include $(INCLUDE_DIR)/package.mk
  150. include $(INCLUDE_DIR)/host-build.mk
  151. include $(INCLUDE_DIR)/cmake.mk
  152. include $(INCLUDE_DIR)/nls.mk
  153. MARIADB_COMMON_DEPENDS := \
  154. $(ICONV_DEPENDS) \
  155. +libatomic \
  156. +libopenssl \
  157. +libstdcpp \
  158. +zlib \
  159. @!USE_UCLIBC
  160. # Pass CPPFLAGS in the CFLAGS as otherwise the build system will
  161. # ignore them.
  162. TARGET_CFLAGS+=$(TARGET_CPPFLAGS)
  163. define Package/mariadb/disable/engine
  164. echo > $(1)/storage/$(2)/CMakeLists.txt
  165. endef
  166. define Package/mariadb/disable/plugin
  167. echo > $(1)/plugin/$(2)/CMakeLists.txt
  168. endef
  169. define Package/mariadb/install/bin
  170. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/$(2) $(1)/usr/bin
  171. cd "$(PKG_INSTALL_DIR)/usr/bin"; find . -maxdepth 1 -type l \
  172. -regex './$(subst mysql,mariadb[-]*,$(subst _,-,$(2)))' \
  173. | xargs -I{} $(CP) {} "$(1)/usr/bin"
  174. endef
  175. define Package/mariadb/install/plugin
  176. $(INSTALL_BIN) $(PKG_INSTALL_DIR)$(PLUGIN_DIR)/$(2).so $(1)$(PLUGIN_DIR)
  177. endef
  178. define Package/mariadb/description/Default
  179. MariaDB is a very fast and robust SQL database server.
  180. endef
  181. define Package/mariadb/Default
  182. SECTION:=utils
  183. CATEGORY:=Utilities
  184. URL:=https://mariadb.org/
  185. SUBMENU:=Database
  186. endef
  187. define Package/mariadb-client
  188. $(call Package/mariadb/Default)
  189. TITLE:=MariaDB database client
  190. MENU:=1
  191. DEPENDS:=mariadb-client-base
  192. endef
  193. define Package/mariadb-client/description
  194. $(call Package/mariadb/description/Default)
  195. This package includes the following core client binaries:
  196. $(subst $(space),$(newline),$(MARIADB_CLIENT))
  197. endef
  198. define Package/mariadb-client-base
  199. $(call Package/mariadb/Default)
  200. TITLE:=MariaDB database client base
  201. DEPENDS:=mariadb-common \
  202. $(MARIADB_COMMON_DEPENDS) \
  203. +libedit
  204. endef
  205. define Package/mariadb-client-base/conffiles
  206. $(CONF_DIR)/conf.d/50-mysql-clients.cnf
  207. endef
  208. define Package/mariadb-client-base/description
  209. $(call Package/mariadb/description/Default)
  210. This package provides the foundation for mariadb-client. It installs the
  211. configuration and the dependencies.
  212. endef
  213. define Package/mariadb-client-extra
  214. $(call Package/mariadb/Default)
  215. TITLE:=MariaDB database client extra
  216. DEPENDS:=mariadb-client
  217. endef
  218. define Package/mariadb-client-extra/description
  219. $(call Package/mariadb/description/Default)
  220. This package includes the following extra client binaries:
  221. $(subst $(space),$(newline),$(MARIADB_CLIENT_EXTRA))
  222. endef
  223. define Package/mariadb-server
  224. $(call Package/mariadb/Default)
  225. DEPENDS:=mariadb-server-base
  226. TITLE:=MariaDB database server
  227. MENU:=1
  228. PROVIDES:=mysql-server
  229. endef
  230. define Package/mariadb-server/description
  231. $(call Package/mariadb/description/Default)
  232. This package includes the following core server binaries:
  233. $(subst $(space),$(newline),$(MARIADB_SERVER))
  234. endef
  235. define Package/mariadb-server-base
  236. $(call Package/mariadb/Default)
  237. DEPENDS:=mariadb-common \
  238. $(MARIADB_COMMON_DEPENDS) \
  239. +libaio \
  240. +liblzma \
  241. +libpcre \
  242. +resolveip
  243. TITLE:=MariaDB database server base
  244. USERID:=mariadb=376:mariadb=376
  245. endef
  246. define Package/mariadb-server-base/conffiles
  247. $(CONF_DIR)/conf.d/50-server.cnf
  248. $(CONF_DIR)/conf.d/60-galera.cnf
  249. /etc/config/mysqld
  250. endef
  251. define Package/mariadb-server-base/description
  252. $(call Package/mariadb/description/Default)
  253. This package provides the foundation for mariadb-server. It installs the
  254. init script, support files (configuration etc.), the user "mariadb" and
  255. the dependencies.
  256. endef
  257. define Package/mariadb-server-extra
  258. $(call Package/mariadb/Default)
  259. TITLE:=MariaDB database server extra
  260. DEPENDS:=mariadb-server
  261. endef
  262. define Package/mariadb-server-extra/description
  263. $(call Package/mariadb/description/Default)
  264. This package includes the following extra server binaries:
  265. $(subst $(space),$(newline),$(MARIADB_SERVER_EXTRA))
  266. endef
  267. # We won't need unit tests
  268. CMAKE_OPTIONS += -DWITH_UNIT_TESTS=0
  269. # This value is determined automatically during straight compile by compiling
  270. # and running a test code. You cannot do that during cross-compile. However the
  271. # stack grows downward in most if not all modern systems. The only exception
  272. # according to buildroot is PA-RISC which is not supported by OpenWrt as far as
  273. # I know. Therefore it makes sense to hardcode the value. If an arch is added
  274. # the stack of which grows up one should expect unpredictable behavior at run
  275. # time.
  276. CMAKE_OPTIONS += -DSTACK_DIRECTION=-1
  277. # Make it explicit that we are cross-compiling
  278. CMAKE_OPTIONS += -DCMAKE_CROSSCOMPILING=1
  279. # Explicitly disable dtrace to avoid detection of a host version
  280. CMAKE_OPTIONS += -DENABLE_DTRACE=0
  281. # Prevent MariaDB from messing with OpenWrt's C(XX)FLAGS
  282. CMAKE_OPTIONS += -DSECURITY_HARDENED=OFF
  283. ifeq ($(CONFIG_PACKAGE_mariadb-server),)
  284. CMAKE_OPTIONS += -DWITHOUT_SERVER=ON
  285. else
  286. # Enable the auth_socket plugin and let unix user root access MariaDB without a
  287. # separate password.
  288. CMAKE_OPTIONS += -DWITHOUT_SERVER=OFF -DPLUGIN_AUTH_SOCKET=STATIC
  289. endif
  290. CMAKE_OPTIONS += \
  291. -DCONNECT_WITH_JDBC=NO \
  292. -DCONNECT_WITH_LIBXML2=system \
  293. -DCONNECT_WITH_MONGO=NO \
  294. -DCONNECT_WITH_ODBC=NO \
  295. -DDISABLE_SHARED=NO \
  296. -DENABLED_PROFILING=OFF \
  297. -DENABLE_STATIC_LIBS=OFF \
  298. -DINSTALL_DOCDIR=share/doc/mariadb \
  299. -DINSTALL_DOCREADMEDIR=share/doc/mariadb \
  300. -DINSTALL_INFODIR=share/info \
  301. -DINSTALL_MANDIR=share/man \
  302. -DINSTALL_MYSQLSHAREDIR=share/mariadb \
  303. -DINSTALL_MYSQLTESTDIR="" \
  304. -DINSTALL_PLUGINDIR=lib/mariadb/plugin \
  305. -DINSTALL_SBINDIR=bin \
  306. -DINSTALL_SCRIPTDIR=bin \
  307. -DINSTALL_SQLBENCHDIR="" \
  308. -DINSTALL_SUPPORTFILESDIR=share/mariadb \
  309. -DINSTALL_UNIX_ADDRDIR=$(MARIADB_SOCKET) \
  310. -DMYSQL_DATADIR=/var/lib/mysql \
  311. -DMYSQL_UNIX_ADDR=$(MARIADB_SOCKET) \
  312. -DSKIP_TESTS=ON \
  313. -DWITH_DEBUG=OFF \
  314. -DWITH_EMBEDDED_SERVER=OFF \
  315. -DWITH_INNODB_BZIP2=OFF \
  316. -DWITH_INNODB_LZ4=OFF \
  317. -DWITH_INNODB_LZMA=ON \
  318. -DWITH_INNODB_LZO=OFF \
  319. -DWITH_INNODB_SNAPPY=OFF \
  320. -DWITH_JEMALLOC=OFF \
  321. -DWITH_LIBARCHIVE=OFF \
  322. -DWITH_LIBWRAP=OFF \
  323. -DWITH_MARIABACKUP=ON \
  324. -DWITH_NUMA=OFF \
  325. -DWITH_PCRE=system \
  326. -DWITH_SAFEMALLOC=OFF \
  327. -DWITH_SSL=system \
  328. -DWITH_SYSTEMD=no \
  329. -DWITH_VALGRIND=OFF \
  330. -DWITH_ZLIB=system
  331. # Help MariaDB find the correct libiconv.
  332. # nls.mk sets it up so that with CONFIG_BUILD_NLS libiconv-full would be used,
  333. # otherwise libiconv-stub (independent of the selected libc). MariaDB needs a
  334. # leg up to find/pick the right lib.
  335. CMAKE_OPTIONS += \
  336. -DICONV_INCLUDE_DIR=$(ICONV_PREFIX)/include \
  337. -DICONV_LIBRARIES=$(ICONV_PREFIX)/lib/libiconv.$(if $(CONFIG_BUILD_NLS),so,a)
  338. CMAKE_OPTIONS += \
  339. $(foreach p,$(MARIADB_SERVER_PLUGINS),-D$(plugin-$(p))=$(if $(CONFIG_PACKAGE_$(PKG_NAME)-server-plugin-$(subst _,-,$(p))),DYNAMIC,NO))
  340. # Disable some client library plugins
  341. CMAKE_OPTIONS += \
  342. -DCLIENT_PLUGIN_AUTH_GSSAPI_CLIENT=OFF \
  343. -DCLIENT_PLUGIN_REMOTE_IO=OFF
  344. # Set CMAKE_FIND_ROOT_PATH_MODE_INCLUDE and CMAKE_FIND_ROOT_PATH_MODE_LIBRARY
  345. # to BOTH as otherwise the host build will not find some required dependencies
  346. # installed on the host machine, like ncurses.
  347. #
  348. # Add "$(STAGING_DIR_HOSTPKG)/lib" to the RPATH of the host helpers,
  349. # otherwise they might not find the location of a library at run time.
  350. CMAKE_HOST_OPTIONS += \
  351. -DCMAKE_BUILD_WITH_INSTALL_RPATH=TRUE \
  352. -DCMAKE_FIND_ROOT_PATH_MODE_INCLUDE=BOTH \
  353. -DCMAKE_FIND_ROOT_PATH_MODE_LIBRARY=BOTH \
  354. -DCMAKE_INSTALL_RPATH="$(STAGING_DIR_HOSTPKG)/lib" \
  355. -DCMAKE_SKIP_RPATH=FALSE \
  356. -DWITHOUT_SERVER=OFF
  357. # Some helpers must be compiled for host in order to crosscompile MariaDB for
  358. # the target. They are then included by import_executables.cmake which is
  359. # generated during the build of the host helpers. It is not necessary to build
  360. # the whole host package, only the "import_executables" target.
  361. # -DIMPORT_EXECUTABLES=$(HOST_BUILD_DIR)/import_executables.cmake
  362. # must then be passed to cmake during target build.
  363. # See also https://mariadb.com/kb/en/mariadb/cross-compiling-mariadb/
  364. CMAKE_OPTIONS += -DIMPORT_EXECUTABLES=$(STAGING_DIR_HOSTPKG)/share/mariadb/import_executables.cmake
  365. # Disable some engines/plugins here as well - decreases the number of cmake checks.
  366. define Host/Prepare
  367. $(call Host/Prepare/Default)
  368. $(foreach e,$(MARIADB_DISABLE_ENGINES),$(call Package/mariadb/disable/engine,$(HOST_BUILD_DIR),$(e));)
  369. $(foreach p,$(MARIADB_DISABLE_PLUGINS),$(call Package/mariadb/disable/plugin,$(HOST_BUILD_DIR),$(p));)
  370. endef
  371. define Host/Compile
  372. $(call Host/Compile/Default,import_executables)
  373. endef
  374. define Host/Install
  375. $(SED) 's|$(HOST_BUILD_DIR)|$(STAGING_DIR_HOSTPKG)/share/mariadb|' $(HOST_BUILD_DIR)/import_executables.cmake
  376. $(INSTALL_DIR) $(1)/share/mariadb/{dbug,extra,scripts,sql}
  377. $(INSTALL_BIN) $(HOST_BUILD_DIR)/dbug/factorial $(1)/share/mariadb/dbug
  378. $(INSTALL_BIN) $(HOST_BUILD_DIR)/extra/comp_err $(1)/share/mariadb/extra
  379. $(INSTALL_BIN) $(HOST_BUILD_DIR)/scripts/comp_sql $(1)/share/mariadb/scripts
  380. $(INSTALL_BIN) $(HOST_BUILD_DIR)/sql/{gen_lex_hash,gen_lex_token} $(1)/share/mariadb/sql
  381. $(INSTALL_DATA) $(HOST_BUILD_DIR)/import_executables.cmake $(1)/share/mariadb
  382. endef
  383. # LIBICONV_PLUG is used in GNU's libiconv for redefinition of exports [e.g.
  384. # from libiconv_open() to iconv_open()]. But in OpenWrt this variable is not set
  385. # when building libiconv-full. So when MariaDB sets LIBICONV_PLUG it expects
  386. # iconv_open() to be available for example, which is not the case - only
  387. # libiconv_open() is. To address this prevent the variable from being set.
  388. # libiconv-stub does not use this variable, so there is no harm in always doing
  389. # this.
  390. define Build/Prepare
  391. $(call Build/Prepare/Default)
  392. $(SED) '/ADD_DEFINITIONS(-DLIBICONV_PLUG)/d' $(PKG_BUILD_DIR)/libmariadb/libmariadb/CMakeLists.txt
  393. $(foreach e,$(MARIADB_DISABLE_ENGINES),$(call Package/mariadb/disable/engine,$(PKG_BUILD_DIR),$(e));)
  394. $(foreach p,$(MARIADB_DISABLE_PLUGINS),$(call Package/mariadb/disable/plugin,$(PKG_BUILD_DIR),$(p));)
  395. endef
  396. # Define Build/InstallDev, otherwise build system starts installing files into
  397. # staging area, which would interfere with mariadb-connector-c.
  398. define Build/InstallDev
  399. endef
  400. define Package/mariadb-client/install
  401. $(INSTALL_DIR) $(1)/usr/bin
  402. $(foreach b,$(MARIADB_CLIENT),$(call Package/mariadb/install/bin,$(1),$(b));)
  403. # Install convenience links for mysqlcheck multi-call binary
  404. cd $(1)/usr/bin; $(LN) mysqlcheck mysqlanalyze
  405. cd $(1)/usr/bin; $(LN) mysqlcheck mysqlrepair
  406. cd $(1)/usr/bin; $(LN) mysqlcheck mysqloptimize
  407. endef
  408. define Package/mariadb-client-base/install
  409. $(INSTALL_DIR) $(1)$(CONF_DIR)/conf.d
  410. $(INSTALL_CONF) conf/50-mysql-clients.cnf $(1)$(CONF_DIR)/conf.d
  411. endef
  412. define Package/mariadb-client-extra/install
  413. $(INSTALL_DIR) $(1)/usr/bin
  414. $(foreach b,$(MARIADB_CLIENT_EXTRA),$(call Package/mariadb/install/bin,$(1),$(b));)
  415. endef
  416. define Package/mariadb-server/install
  417. $(INSTALL_DIR) $(1)/usr/bin
  418. $(foreach b,$(MARIADB_SERVER),$(call Package/mariadb/install/bin,$(1),$(b));)
  419. endef
  420. define Package/mariadb-server-base/install
  421. $(INSTALL_DIR) $(1)$(CONF_DIR)/conf.d
  422. $(INSTALL_DIR) $(1)$(SHARE_DIR)/charsets
  423. $(INSTALL_DIR) $(1)$(SHARE_DIR)/english
  424. $(INSTALL_DIR) $(1)/etc/config
  425. $(INSTALL_DIR) $(1)/etc/init.d
  426. $(INSTALL_BIN) files/mysqld.init $(1)/etc/init.d/mysqld
  427. $(SED) '/^[a-z]/s/^/#/' $(PKG_INSTALL_DIR)$(SHARE_DIR)/wsrep.cnf
  428. $(INSTALL_CONF) $(PKG_INSTALL_DIR)$(SHARE_DIR)/wsrep.cnf $(1)$(CONF_DIR)/conf.d/60-galera.cnf
  429. $(INSTALL_CONF) conf/50-server.cnf $(1)$(CONF_DIR)/conf.d
  430. $(INSTALL_CONF) files/mysqld.config $(1)/etc/config/mysqld
  431. $(INSTALL_DATA) $(PKG_INSTALL_DIR)$(SHARE_DIR)/charsets/* $(1)$(SHARE_DIR)/charsets
  432. $(INSTALL_DATA) $(PKG_INSTALL_DIR)$(SHARE_DIR)/english/errmsg.sys $(1)$(SHARE_DIR)/english
  433. $(INSTALL_DATA) $(PKG_INSTALL_DIR)$(SHARE_DIR)/fill_help_tables.sql $(1)$(SHARE_DIR)
  434. $(INSTALL_DATA) $(PKG_INSTALL_DIR)$(SHARE_DIR)/maria_add_gis_sp_bootstrap.sql $(1)$(SHARE_DIR)
  435. $(INSTALL_DATA) $(PKG_INSTALL_DIR)$(SHARE_DIR)/mysql_performance_tables.sql $(1)$(SHARE_DIR)
  436. $(INSTALL_DATA) $(PKG_INSTALL_DIR)$(SHARE_DIR)/mysql_system_tables.sql $(1)$(SHARE_DIR)
  437. $(INSTALL_DATA) $(PKG_INSTALL_DIR)$(SHARE_DIR)/mysql_system_tables_data.sql $(1)$(SHARE_DIR)
  438. $(INSTALL_DATA) $(PKG_INSTALL_DIR)$(SHARE_DIR)/mysql_test_db.sql $(1)$(SHARE_DIR)
  439. endef
  440. define Package/mariadb-server-extra/install
  441. $(INSTALL_DIR) $(1)/usr/bin
  442. $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/bin/wsrep_sst_common $(1)/usr/bin
  443. $(SED) 's,/bin/bash,/bin/sh,g' $(PKG_INSTALL_DIR)/usr/bin/wsrep_sst_*
  444. $(foreach b,$(MARIADB_SERVER_EXTRA),$(call Package/mariadb/install/bin,$(1),$(b));)
  445. cd $(1)/usr/bin; $(LN) mariabackup mariadb-backup
  446. endef
  447. define BuildPlugin
  448. define Package/mariadb-server-plugin-$(subst _,-,$(1))
  449. $(call Package/mariadb/Default)
  450. TITLE:=mariadb-server plugin
  451. DEPENDS:=mariadb-server $(patsubst +%,+PACKAGE_mariadb-server-plugin-$(subst _,-,$(1)):%,$(2))
  452. endef
  453. define Package/mariadb-server-plugin-$(subst _,-,$(1))/description
  454. $(call Package/mariadb/description/Default)
  455. This package provides the $(1) plugin.
  456. endef
  457. define Package/mariadb-server-plugin-$(subst _,-,$(1))/install
  458. $(INSTALL_DIR) $$(1)$(PLUGIN_DIR)
  459. $(call Package/mariadb/install/plugin,$$(1),$(1))
  460. ifeq ($(1),auth_pam)
  461. $(CP) $(PKG_INSTALL_DIR)$(PLUGIN_DIR)/auth_pam_tool_dir \
  462. $$(1)$(PLUGIN_DIR)
  463. endif
  464. ifeq ($(1),ha_spider)
  465. $(INSTALL_DIR) $$(1)$(SHARE_DIR)
  466. $(INSTALL_DATA) $(PKG_INSTALL_DIR)$(SHARE_DIR)/install_spider.sql \
  467. $$(1)$(SHARE_DIR)
  468. endif
  469. endef
  470. $$(eval $$(call BuildPackage,mariadb-server-plugin-$(subst _,-,$(1))))
  471. endef
  472. define Package/mariadb-server-plugin-auth-pam/postinst
  473. #!/bin/sh
  474. if [ -z "$${IPKG_INSTROOT}" ]; then
  475. chown root:mariadb /usr/lib/mariadb/plugin/auth_pam_tool_dir > /dev/null 2>&1
  476. chmod 0750 /usr/lib/mariadb/plugin/auth_pam_tool_dir > /dev/null 2>&1
  477. fi
  478. exit 0
  479. endef
  480. $(eval $(call HostBuild))
  481. $(eval $(call BuildPackage,mariadb-client))
  482. $(eval $(call BuildPackage,mariadb-client-base))
  483. $(eval $(call BuildPackage,mariadb-client-extra))
  484. $(eval $(call BuildPackage,mariadb-server))
  485. $(eval $(call BuildPackage,mariadb-server-base))
  486. $(eval $(call BuildPackage,mariadb-server-extra))
  487. $(eval $(call BuildPlugin,auth_ed25519,))
  488. $(eval $(call BuildPlugin,auth_gssapi,+krb5-libs))
  489. $(eval $(call BuildPlugin,auth_pam,+libpam))
  490. $(eval $(call BuildPlugin,auth_pam_v1,+libpam))
  491. $(eval $(call BuildPlugin,disks,))
  492. $(eval $(call BuildPlugin,feedback,))
  493. $(eval $(call BuildPlugin,file_key_management,))
  494. $(eval $(call BuildPlugin,ha_archive,))
  495. $(eval $(call BuildPlugin,ha_blackhole,))
  496. $(eval $(call BuildPlugin,ha_connect,+libxml2))
  497. $(eval $(call BuildPlugin,ha_federated,))
  498. $(eval $(call BuildPlugin,ha_federatedx,))
  499. $(eval $(call BuildPlugin,ha_sphinx,))
  500. $(eval $(call BuildPlugin,ha_spider,))
  501. $(eval $(call BuildPlugin,handlersocket,))
  502. $(eval $(call BuildPlugin,locales,))
  503. $(eval $(call BuildPlugin,metadata_lock_info,))
  504. $(eval $(call BuildPlugin,query_cache_info,))
  505. $(eval $(call BuildPlugin,query_response_time,))
  506. $(eval $(call BuildPlugin,server_audit,))
  507. $(eval $(call BuildPlugin,simple_password_check,))
  508. $(eval $(call BuildPlugin,sql_errlog,))
  509. $(eval $(call BuildPlugin,wsrep_info,))