1 # Buildsheet autogenerated by ravenadm tool -- Do not edit.
8 SDESC[standard]= Fast SQL database server, derived from MySQL
9 HOMEPAGE= https://mariadb.org/
13 SITES[main]= https://downloads.mariadb.com/MariaDB/mariadb-10.6.11/source/
14 DISTFILE[1]= mariadb-10.6.11.tar.gz:main
16 SPKGS[standard]= complete
21 OPTIONS_AVAILABLE= none
22 OPTIONS_STANDARD= none
24 BUILD_DEPENDS= bison:primary:standard
25 BUILDRUN_DEPENDS= boost-libraries:rest:python_used
26 snappy:single:standard
27 msgpack:single:standard
31 pcre2:primary:standard
32 BR_DEPS[netbsd]= openpam:single:standard
36 USERGROUP_SPKG= server
38 USES= cmake zlib ssl readline ncurses shebangfix cpe
39 python:build perl:build pkgconfig iconv:translit
40 zstd lz4 lzo bz2 execinfo
41 GNOME_COMPONENTS= libxml2
43 DISTNAME= mariadb-10.6.11
46 LICENSE_TERMS= server:{{WRKDIR}}/TERMS
47 LICENSE_FILE= GPLv2:{{WRKSRC}}/COPYING
48 LICENSE_AWK= TERMS:"^\#include"
49 LICENSE_SOURCE= TERMS:{{WRKSRC}}/libmysqld/libmysqld.c
54 FPC_EQUIVALENT= databases/mariadb104-server
55 SHEBANG_FILES= scripts/*.sh
57 INSTALL_REQ_TOOLCHAIN= yes
58 PLIST_SUB= PORTNAME=mariadb106
59 AUTHSOCKET={{AUTHSOCKET}}
60 PAM={{PAM:U"@comment "}}
62 CMAKE_ARGS= -DCOMPILATION_COMMENT="Ravenports"
63 -DINSTALL_INCLUDEDIR=include/mysql
64 -DINSTALL_PLUGINDIR=lib/mysql/plugin
65 -DINSTALL_SHAREDIR=share
66 -DINSTALL_SUPPORTFILESDIR=share/mysql
67 -DINSTALL_MYSQLSHAREDIR=share/mysql
68 -DINSTALL_DOCREADMEDIR=share/doc/mariadb106
69 -DINSTALL_DOCDIR=share/doc/mariadb106
70 -DINSTALL_LIBDIR=lib/mysql
71 -DINSTALL_MANDIR=share/man
72 -DINSTALL_SCRIPTDIR=bin
73 -DINSTALL_MYSQLTESTDIR=
74 -DINSTALL_SQLBENCHDIR=
75 -DDEFAULT_CHARSET=utf8mb4
76 -DDEFAULT_COLLATION=utf8mb4_unicode_ci
77 -DDEFAULT_SYSCONFDIR="{{PREFIX}}/etc"
78 -DENABLED_LOCAL_INFILE=ON
82 -DWITH_EMBEDDED_SERVER=ON
83 -DWITH_EXTRA_CHARSETS=complex
88 -DWITH_READLINE=system
89 -DWITH_SSL="{{OPENSSLBASE}}"
93 VAR_OPSYS[freebsd]= CXXFLAGS=-DHAVE_POSIX_MEMALIGN=1
94 VAR_OPSYS[netbsd]= MAKEFILE_LINE=AUTHSOCKET="@comment "
98 ${CP} ${WRKSRC}/cmake/os/FreeBSD.cmake \
99 ${WRKSRC}/cmake/os/DragonFly.cmake
102 ${RM} ${STAGEDIR}${STD_DOCDIR}/COPYING
103 ${MV} ${STAGEDIR}${PREFIX}/lib/mysql/pkgconfig/mariadb.pc \
104 ${STAGEDIR}${PREFIX}/lib/pkgconfig/
105 ${RMDIR} ${STAGEDIR}${PREFIX}/lib/mysql/pkgconfig
106 # strip plugins and libraries
107 ${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/mysql/libmariadb.so
108 ${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/mysql/libmariadbd.so
109 ${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/mysql/*/*.so
111 @flist=$$(${FIND} ${STAGEDIR}${PREFIX}/bin -type f -perm /111 -print) ;\
112 for f in $$flist; do \
113 (${FILE} $$f | ${GREP} -Fq ", not stripped")\
114 && ${ECHO_CMD} "Auto-stripping $$f"\
115 && ${STRIP_CMD} $$f || ${TRUE} ;\
117 # if pam config file exists, set it as a sample
118 # remove testsuite files too
119 if [ -f "${STAGEDIR}${PREFIX}/etc/mariadb/user_map.conf" ]; then \
120 (cd ${STAGEDIR}${PREFIX}/etc/mariadb && \
121 ${MV} user_map.conf user_map.conf.sample) ;\
122 ${RM} -r ${STAGEDIR}/suite ;\
126 ${REINPLACE_CMD} 's|/usr/bin/env python|${PYTHON_CMD}|' \
127 ${WRKSRC}/CMakeLists.txt
128 ${REINPLACE_CMD} 's|%%PREFIX%%|${PREFIX}|g' \
129 ${WRKSRC}/mysys/my_default.c
130 ${REINPLACE_CMD} 's|%%LOCALBASE%%|${LOCALBASE}|g' \
131 ${WRKSRC}/scripts/mysql_config.sh \
132 ${WRKSRC}/scripts/CMakeLists.txt
135 ${REINPLACE_CMD} -Ee 's|(#define INCLUDE.*)"$$|\1 -I${PREFIX}/include"|' \
136 -e 's|(#define LIBS .*)"$$|\1 -L${PREFIX}/lib"|' \
137 ${BUILD_WRKSRC}/libmariadb/mariadb_config/mariadb_config.c
138 # Fix build failure in mbstream, see https://jira.mariadb.org/browse/MDEV-14072
139 ${REINPLACE_CMD} -e 's| ${PREFIX}/lib/liblz4.so\(.* ${PREFIX}/lib/liblz4.so.*\)|\1|' \
140 -e 's| ${PREFIX}/lib/liblzo2.so\(.* ${PREFIX}/lib/liblzo2.so.*\)|\1|' \
141 -e 's| ${PREFIX}/lib/libsnappy.so\(.* ${PREFIX}/lib/libsnappy.so\)|\1|' \
142 -e 's| -llzma\(.* -llzma\)|\1|;s| -lbz2\(.* -lbz2\)|\1|;' \
143 ${BUILD_WRKSRC}/extra/mariabackup/CMakeFiles/mbstream.dir/link.txt
145 [FILE:807:descriptions/desc.server]
146 MariaDB Server is one of the most popular database servers in the world.
147 It's made by the original developers of MySQL and guaranteed to stay open
148 source. Notable users include Wikipedia, WordPress.com and Google.
150 MariaDB turns data into structured information in a wide array of
151 applications, ranging from banking to websites. It is an enhanced, drop-in
152 replacement for MySQL. MariaDB is used because it is fast, scalable and
153 robust, with a rich ecosystem of storage engines, plugins and many other
154 tools make it very versatile for a wide variety of use cases.
156 MariaDB is developed as open source software and as a relational database
157 it provides an SQL interface for accessing data. The latest versions of
158 MariaDB also include GIS and JSON features.
160 This package contains the server and related files.
163 [FILE:267:descriptions/desc.client]
164 MariaDB Server is one of the most popular database servers in the world.
165 It's made by the original developers of MySQL and guaranteed to stay open
166 source. Notable users include Wikipedia, WordPress.com and Google.
168 This package contains the client and related files.
172 5784ba4c5d8793badba58348576824d9849ec152e9cbee47a1765161d840c94a 94742041 mariadb-10.6.11.tar.gz
175 [FILE:12018:manifests/plist.server]
176 %%PAM%%@sample etc/mariadb/user_map.conf.sample
177 %%PAM%%lib/mysql/plugin/
180 %%PAM%%lib/mysql/plugin/auth_pam_tool_dir/auth_pam_tool
181 %%PAM%%lib/mysql/security/pam_user_map.so
193 mariadb-client-test-embedded
198 mariadb-fix-extensions
201 mariadb-secure-installation
203 mariadb-test-embedded
204 mariadb-tzinfo-to-sql
219 mysql_client_test_embedded
225 mysql_secure_installation
243 wsrep_sst_mariabackup
247 include/mysql/server/
250 byte_order_generic_x86.h
251 byte_order_generic_x86_64.h
293 include/mysql/server/mysql/
304 plugin_password_validation.h
308 service_encryption_scheme.h
310 service_kill_statement.h
314 service_my_print_error.h
315 service_my_snprintf.h
316 service_progress_report.h
320 service_thd_autoinc.h
321 service_thd_error_context.h
324 service_thd_specifics.h
325 service_thd_timezone.h
329 include/mysql/server/mysql/psi/
348 include/mysql/server/private/
373 event_db_repository.h
390 handle_connections_win.h
427 mariadb_capi_rename.h
466 mysqld_default_groups.h
479 pfs_memory_provider.h
480 pfs_metadata_provider.h
481 pfs_socket_provider.h
483 pfs_statement_provider.h
485 pfs_thread_provider.h
486 pfs_transaction_provider.h
489 probes_mysql_nodtrace.h
516 semisync_master_ack_receiver.h
561 sql_expression_cache.h
562 sql_get_diagnostics.h
579 sql_partition_admin.h
607 sql_type_fixedbin_storage.h
632 threadpool_winsockets.h
641 welcome_copyright_notice.h
648 wsrep_client_service.h
650 wsrep_condition_variable.h
651 wsrep_high_priority_service.h
658 wsrep_server_service.h
661 wsrep_storage_service.h
663 wsrep_trans_observer.h
669 include/mysql/server/private/atomic/
684 auth_gssapi_client.so
686 caching_sha2_password.so
687 debug_key_management.so
690 example_key_management.so
691 file_key_management.so
704 ha_test_sql_discovery.so
708 metadata_lock_info.so
714 query_response_time.so
716 simple_password_check.so
724 share/aclocal/mysql.m4
728 share/groonga-normalizer-mysql/
738 galera_new_cluster.1.gz
743 mariadb-client-test-embedded.1.gz
744 mariadb-client-test.1.gz
746 mariadb-dumpslow.1.gz
747 mariadb-embedded.1.gz
748 mariadb-fix-extensions.1.gz
749 mariadb-install-db.1.gz
751 mariadb-secure-installation.1.gz
752 mariadb-service-convert.1.gz
753 mariadb-test-embedded.1.gz
755 mariadb-tzinfo-to-sql.1.gz
760 mariadbd-safe-helper.1.gz
763 my_print_defaults.1.gz
768 myrocks_hotbackup.1.gz
770 mysql_client_test.1.gz
771 mysql_client_test_embedded.1.gz
773 mysql_fix_extensions.1.gz
774 mysql_install_db.1.gz
776 mysql_secure_installation.1.gz
777 mysql_tzinfo_to_sql.1.gz
781 mysqld_safe_helper.1.gz
784 mysqltest_embedded.1.gz
787 resolve_stack_dump.1.gz
789 wsrep_sst_common.1.gz
790 wsrep_sst_mariabackup.1.gz
791 wsrep_sst_mysqldump.1.gz
793 wsrep_sst_rsync_wan.1.gz
803 maria_add_gis_sp_bootstrap.sql
806 mysql_performance_tables.sql
808 mysql_system_tables.sql
809 mysql_system_tables_data.sql
810 mysql_test_data_timezone.sql
815 share/mysql/bulgarian/errmsg.sys
816 share/mysql/charsets/
843 share/mysql/chinese/errmsg.sys
844 share/mysql/czech/errmsg.sys
845 share/mysql/danish/errmsg.sys
846 share/mysql/dutch/errmsg.sys
847 share/mysql/english/errmsg.sys
848 share/mysql/estonian/errmsg.sys
849 share/mysql/french/errmsg.sys
850 share/mysql/german/errmsg.sys
851 share/mysql/greek/errmsg.sys
852 share/mysql/hindi/errmsg.sys
853 share/mysql/hungarian/errmsg.sys
854 share/mysql/italian/errmsg.sys
855 share/mysql/japanese/errmsg.sys
856 share/mysql/korean/errmsg.sys
862 share/mysql/norwegian/errmsg.sys
863 share/mysql/norwegian-ny/errmsg.sys
864 share/mysql/policy/apparmor/
867 usr.sbin.mysqld.local
868 share/mysql/policy/selinux/
873 share/mysql/polish/errmsg.sys
874 share/mysql/portuguese/errmsg.sys
875 share/mysql/romanian/errmsg.sys
876 share/mysql/russian/errmsg.sys
877 share/mysql/serbian/errmsg.sys
878 share/mysql/slovak/errmsg.sys
879 share/mysql/spanish/errmsg.sys
880 share/mysql/swedish/errmsg.sys
881 share/mysql/ukrainian/errmsg.sys
884 [FILE:5026:manifests/plist.client]
891 mariadb-convert-table-format
897 mariadb-setpermission
904 mysql_convert_table_format
936 include/mysql/mariadb/ma_io.h
955 mysql_clear_password.so
965 mariadb-convert-table-format.1.gz
967 mariadb-find-rows.1.gz
971 mariadb-setpermission.1.gz
977 mysql-stress-test.pl.1.gz
978 mysql-test-run.pl.1.gz
981 mysql_convert_table_format.1.gz
984 mysql_setpermission.1.gz
998 mariadb_connection.3.gz
999 mariadb_dyncol_check.3.gz
1000 mariadb_dyncol_column_cmp_named.3.gz
1001 mariadb_dyncol_column_count.3.gz
1002 mariadb_dyncol_create_many_named.3.gz
1003 mariadb_dyncol_create_many_num.3.gz
1004 mariadb_dyncol_exists_named.3.gz
1005 mariadb_dyncol_exists_num.3.gz
1006 mariadb_dyncol_free.3.gz
1007 mariadb_dyncol_list_named.3.gz
1008 mariadb_dyncol_list_num.3.gz
1009 mariadb_dyncol_unpack.3.gz
1010 mariadb_dyncol_update_many_named.3.gz
1011 mariadb_dyncol_update_many_num.3.gz
1012 mariadb_get_infov.3.gz
1013 mariadb_reconnect.3.gz
1014 mariadb_rpl_close.3.gz
1015 mariadb_rpl_fetch.3.gz
1016 mariadb_rpl_get_optionsv.3.gz
1017 mariadb_rpl_open.3.gz
1018 mariadb_rpl_optionsv.3.gz
1019 mariadb_stmt_execute_direct.3.gz
1020 mariadb_stmt_fetch_fields.3.gz
1021 mysql_affected_rows.3.gz
1022 mysql_autocommit.3.gz
1023 mysql_change_user.3.gz
1026 mysql_data_seek.3.gz
1029 mysql_fetch_field.3.gz
1030 mysql_fetch_field_direct.3.gz
1031 mysql_fetch_fields.3.gz
1032 mysql_fetch_lengths.3.gz
1033 mysql_fetch_row.3.gz
1034 mysql_field_count.3.gz
1035 mysql_field_seek.3.gz
1036 mysql_field_tell.3.gz
1037 mysql_free_result.3.gz
1038 mysql_get_character_set_info.3.gz
1039 mysql_get_client_info.3.gz
1040 mysql_get_client_version.3.gz
1041 mysql_get_host_info.3.gz
1042 mysql_get_proto_info.3.gz
1043 mysql_get_server_info.3.gz
1044 mysql_get_server_version.3.gz
1045 mysql_get_socket.3.gz
1046 mysql_get_ssl_cipher.3.gz
1047 mysql_hex_string.3.gz
1051 mysql_more_results.3.gz
1052 mysql_next_result.3.gz
1053 mysql_num_fields.3.gz
1060 mysql_read_query_result.3.gz
1061 mysql_real_connect.3.gz
1062 mysql_real_escape_string.3.gz
1063 mysql_real_query.3.gz
1065 mysql_reset_connection.3.gz
1069 mysql_select_db.3.gz
1070 mysql_send_query.3.gz
1071 mysql_server_end.3.gz
1072 mysql_server_init.3.gz
1073 mysql_session_track_get_first.3.gz
1074 mysql_session_track_get_next.3.gz
1075 mysql_set_character_set.3.gz
1076 mysql_set_server_option.3.gz
1081 mysql_stmt_affected_rows.3.gz
1082 mysql_stmt_attr_get.3.gz
1083 mysql_stmt_attr_set.3.gz
1084 mysql_stmt_bind_param.3.gz
1085 mysql_stmt_bind_result.3.gz
1086 mysql_stmt_close.3.gz
1087 mysql_stmt_data_seek.3.gz
1088 mysql_stmt_errno.3.gz
1089 mysql_stmt_error.3.gz
1090 mysql_stmt_execute.3.gz
1091 mysql_stmt_fetch.3.gz
1092 mysql_stmt_fetch_column.3.gz
1093 mysql_stmt_field_count.3.gz
1094 mysql_stmt_free_result.3.gz
1095 mysql_stmt_init.3.gz
1096 mysql_stmt_insert_id.3.gz
1097 mysql_stmt_more_results.3.gz
1098 mysql_stmt_next_result.3.gz
1099 mysql_stmt_num_rows.3.gz
1100 mysql_stmt_param_count.3.gz
1101 mysql_stmt_param_metadata.3.gz
1102 mysql_stmt_prepare.3.gz
1103 mysql_stmt_reset.3.gz
1104 mysql_stmt_result_metadata.3.gz
1105 mysql_stmt_row_seek.3.gz
1106 mysql_stmt_row_tell.3.gz
1107 mysql_stmt_send_long_data.3.gz
1108 mysql_stmt_sqlstate.3.gz
1109 mysql_stmt_store_result.3.gz
1110 mysql_stmt_warning_count.3.gz
1111 mysql_store_result.3.gz
1112 mysql_thread_end.3.gz
1113 mysql_thread_id.3.gz
1114 mysql_thread_init.3.gz
1115 mysql_use_result.3.gz
1116 mysql_warning_count.3.gz
1119 [FILE:86:manifests/plist.docs]
1120 share/doc/%%PORTNAME%%/
1128 [FILE:572:patches/patch-client_mysql.cc]
1129 --- client/mysql.cc.orig 2022-11-03 10:07:23 UTC
1131 @@ -62,8 +62,8 @@ static char *server_version= NULL;
1134 #if defined(HAVE_CURSES_H) && defined(HAVE_TERM_H)
1135 -#include <curses.h>
1137 +#include <ncurses/curses.h>
1138 +#include <ncurses/term.h>
1140 #if defined(HAVE_TERMIOS_H)
1141 #include <termios.h>
1142 @@ -82,7 +82,7 @@ extern "C" {
1144 #undef SYSV // hack to avoid syntax error
1147 +#include <ncurses/term.h>
1150 #endif /* defined(HAVE_CURSES_H) && defined(HAVE_TERM_H) */
1153 [FILE:312:patches/patch-client_mysqltest.cc]
1154 --- client/mysqltest.cc.orig 2022-11-03 10:44:27 UTC
1155 +++ client/mysqltest.cc
1158 #include <violite.h>
1159 #define PCRE2_STATIC 1 /* Important on Windows */
1161 #include "pcre2posix.h" /* pcreposix regex library */
1162 #ifdef HAVE_SYS_WAIT_H
1163 #include <sys/wait.h>
1166 [FILE:500:patches/patch-cmake_install__layout.cmake]
1167 --- cmake/install_layout.cmake.orig 2022-11-03 10:07:23 UTC
1168 +++ cmake/install_layout.cmake
1169 @@ -126,8 +126,8 @@ SET(INSTALL_SUPPORTFILESDIR_STANDALONE
1170 SET(INSTALL_MYSQLDATADIR_STANDALONE "data")
1172 SET(INSTALL_UNIX_ADDRDIR_STANDALONE "/tmp/mysql.sock")
1173 -SET(INSTALL_PAMDIR_STANDALONE "share")
1174 -SET(INSTALL_PAMDATADIR_STANDALONE "share")
1175 +SET(INSTALL_PAMDIR_STANDALONE "lib/mysql/security")
1176 +SET(INSTALL_PAMDATADIR_STANDALONE "etc/mariadb")
1182 [FILE:1968:patches/patch-cmake_readline.cmake]
1183 --- cmake/readline.cmake.orig 2022-11-03 10:07:23 UTC
1184 +++ cmake/readline.cmake
1185 @@ -52,40 +52,17 @@ MACRO (MYSQL_CHECK_MULTIBYTE)
1189 + SET(CURSES_NEED_NCURSES True)
1190 FIND_PACKAGE(Curses REQUIRED)
1191 MARK_AS_ADVANCED(CURSES_CURSES_H_PATH CURSES_FORM_LIBRARY CURSES_HAVE_CURSES_H)
1192 IF(NOT CURSES_FOUND)
1193 SET(ERRORMSG "Curses library not found. Please install appropriate package,
1194 remove CMakeCache.txt and rerun cmake.")
1195 - IF(CMAKE_SYSTEM_NAME MATCHES "Linux")
1196 - SET(ERRORMSG ${ERRORMSG}
1197 - "On Debian/Ubuntu, package name is libncurses5-dev, on Redhat and derivatives "
1198 - "it is ncurses-devel.")
1200 MESSAGE(FATAL_ERROR ${ERRORMSG})
1203 - IF(CURSES_HAVE_CURSES_H)
1204 - SET(HAVE_CURSES_H 1 CACHE INTERNAL "")
1206 - IF(CMAKE_SYSTEM_NAME MATCHES "HP")
1207 - # CMake uses full path to library /lib/libcurses.sl
1208 - # On Itanium, it results into architecture mismatch+
1209 - # the library is for PA-RISC
1210 - SET(CURSES_LIBRARY "curses" CACHE INTERNAL "" FORCE)
1212 + SET(HAVE_CURSES_H 1 CACHE INTERNAL "")
1214 - IF(CMAKE_SYSTEM_NAME MATCHES "Linux")
1215 - # -Wl,--as-needed breaks linking with -lcurses, e.g on Fedora
1216 - # Lower-level libcurses calls are exposed by libtinfo
1217 - CHECK_LIBRARY_EXISTS(${CURSES_LIBRARY} tputs "" HAVE_TPUTS_IN_CURSES)
1218 - IF(NOT HAVE_TPUTS_IN_CURSES)
1219 - CHECK_LIBRARY_EXISTS(tinfo tputs "" HAVE_TPUTS_IN_TINFO)
1220 - IF(HAVE_TPUTS_IN_TINFO)
1221 - SET(CURSES_LIBRARY tinfo)
1225 CHECK_LIBRARY_EXISTS(${CURSES_LIBRARY} setupterm "" HAVE_SETUPTERM)
1226 CHECK_LIBRARY_EXISTS(${CURSES_LIBRARY} vidattr "" HAVE_VIDATTR)
1228 @@ -220,6 +197,8 @@ MACRO (MYSQL_CHECK_READLINE)
1229 SET(CMAKE_REQUIRED_LIBRARIES)
1230 SET(CMAKE_REQUIRED_INCLUDES)
1232 + SET(CMAKE_REQUIRED_INCLUDES ${CURSES_INCLUDE_DIR}/ncurses)
1233 CHECK_INCLUDE_FILES ("curses.h;term.h" HAVE_TERM_H)
1234 + SET(CMAKE_REQUIRED_INCLUDES)
1239 [FILE:349:patches/patch-extra_readline_CMakeLists.txt]
1240 --- extra/readline/CMakeLists.txt.orig 2022-11-03 10:07:23 UTC
1241 +++ extra/readline/CMakeLists.txt
1242 @@ -56,4 +56,4 @@ ADD_LIBRARY(readline STATIC
1244 # Declare dependency
1245 # so every executable that links with readline links with curses as well
1246 -TARGET_LINK_LIBRARIES(readline ${CURSES_LIBRARY})
1247 +TARGET_LINK_LIBRARIES(readline ${CURSES_LIBRARY} tinfo)
1250 [FILE:1605:patches/patch-mysys_my__default.c]
1251 --- mysys/my_default.c.orig 2022-11-03 10:07:24 UTC
1252 +++ mysys/my_default.c
1253 @@ -624,7 +624,7 @@ static int search_default_file_with_ext(
1256 if (!my_stat(name,&stat_info,MYF(0)))
1260 Ignore world-writable regular files.
1261 This is mainly done to protect us to not read a file created by
1262 @@ -647,6 +647,14 @@ static int search_default_file_with_ext(
1263 add_option(ctx, name))
1266 + if (strstr(name, "/etc") == name)
1269 + "error: Config file %s in invalid location, please move to or merge with %%PREFIX%%%s\n",
1274 while (mysql_file_fgets(buff, sizeof(buff) - 1, fp))
1277 @@ -914,7 +922,8 @@ void my_print_default_files(const char *
1278 if (name[0] == FN_HOMELIB) /* Add . to filenames in home */
1280 strxmov(end, conf_file, *ext, " ", NullS);
1281 - fputs(name, stdout);
1282 + if (strstr(name, "/etc") != name)
1283 + fputs(name, stdout);
1287 @@ -1041,13 +1050,10 @@ static const char **init_default_directo
1291 -#if defined(DEFAULT_SYSCONFDIR)
1292 - if (DEFAULT_SYSCONFDIR[0])
1293 - errors += add_directory(alloc, DEFAULT_SYSCONFDIR, dirs);
1295 errors += add_directory(alloc, "/etc/", dirs);
1296 errors += add_directory(alloc, "/etc/mysql/", dirs);
1297 -#endif /* DEFAULT_SYSCONFDIR */
1298 + errors += add_directory(alloc, "%%PREFIX%%/etc/", dirs);
1299 + errors += add_directory(alloc, "%%PREFIX%%/etc/mysql/", dirs);
1305 [FILE:1167:patches/patch-oqgraph-MDEV-15291]
1306 --- storage/oqgraph/oqgraph_judy.cc.orig 2022-11-03 10:07:24 UTC
1307 +++ storage/oqgraph/oqgraph_judy.cc
1310 Currently the only active code that can return error is:
1311 judy_bitset::reset()/J1U()
1312 - judy_bitset::setbit()/J1S()
1313 + judy_bitset::jsetbit()/J1S()
1315 In most cases errors are either about wrong parameters passed to Judy
1316 functions or internal structures corruption. These definitely deserve
1317 @@ -60,7 +60,7 @@ bool open_query::judy_bitset::test(size_
1321 -open_query::judy_bitset& open_query::judy_bitset::setbit(size_type n)
1322 +open_query::judy_bitset& open_query::judy_bitset::jsetbit(size_type n)
1326 --- storage/oqgraph/oqgraph_judy.h.orig 2022-11-03 10:07:24 UTC
1327 +++ storage/oqgraph/oqgraph_judy.h
1328 @@ -63,7 +63,7 @@ namespace open_query
1333 + return jsetbit(n);
1336 judy_bitset& set(const judy_bitset& src);
1337 @@ -115,7 +115,7 @@ namespace open_query
1339 mutable void* array;
1341 - judy_bitset& setbit(size_type n);
1342 + judy_bitset& jsetbit(size_type n);
1348 [FILE:413:patches/patch-scripts_CMakeLists.txt]
1349 --- scripts/CMakeLists.txt.orig 2022-11-03 10:07:24 UTC
1350 +++ scripts/CMakeLists.txt
1351 @@ -136,11 +136,7 @@ IF(CMAKE_GENERATOR MATCHES "Makefiles|Ni
1355 -IF(CMAKE_SYSTEM_NAME MATCHES "FreeBSD")
1356 - SET (PERL_PATH "/usr/local/bin/perl")
1358 - SET (PERL_PATH "/usr/bin/perl")
1360 +SET (PERL_PATH "%%LOCALBASE%%/bin/perl")
1363 # FIND_PROC and CHECK_PID are used by mysqld_safe
1366 [FILE:403:patches/patch-scripts_mysql__config.sh]
1367 --- scripts/mysql_config.sh.orig 2022-11-03 10:07:24 UTC
1368 +++ scripts/mysql_config.sh
1369 @@ -87,7 +87,9 @@ fi
1372 libs="-L$pkglibdir @RPATH_OPTION@ @LIBS_FOR_CLIENTS@"
1373 +libs="$libs -L%%LOCALBASE%%/lib "
1374 embedded_libs="-L$pkglibdir @RPATH_OPTION@ @EMB_LIBS_FOR_CLIENTS@"
1375 +embedded_libs="$embedded_libs -L%%LOCALBASE%%/lib "
1377 include="-I$pkgincludedir"
1378 if [ "$basedir" != "/usr" ]; then
1381 [FILE:445:patches/patch-scripts_mysqld__safe.sh]
1382 --- scripts/mysqld_safe.sh.orig 2022-11-03 10:07:24 UTC
1383 +++ scripts/mysqld_safe.sh
1384 @@ -560,11 +560,11 @@ fi
1386 if test -z "$MYSQL_HOME"
1388 - if test -r "$DATADIR/my.cnf"
1389 + if test -r "$DATADIR/etc/my.cnf"
1391 log_error "WARNING: Found $DATADIR/my.cnf
1392 The data directory is not a valid location for my.cnf, please move it to
1393 -$MY_BASEDIR_VERSION/my.cnf"
1394 +$MY_BASEDIR_VERSION/etc/my.cnf"
1396 MYSQL_HOME=$MY_BASEDIR_VERSION
1400 [FILE:489:patches/patch-scripts_wsrep__sst__mariabackup.sh]
1401 --- scripts/wsrep_sst_mariabackup.sh.orig 2022-11-03 10:07:24 UTC
1402 +++ scripts/wsrep_sst_mariabackup.sh
1403 @@ -793,7 +793,7 @@ recv_joiner()
1405 if [ $tmt -gt 0 ]; then
1406 if [ -n "$(commandex timeout)" ]; then
1407 - if timeout --help | grep -qw -F -- '-k'; then
1408 + if timeout --help 2>&1 | grep -qw -F -- '-k'; then
1409 ltcmd="timeout -k $(( tmt+10 )) $tmt $tcmd"
1411 ltcmd="timeout -s9 $tmt $tcmd"
1414 [FILE:250:patches/patch-sql_mysqld.cc]
1415 --- sql/mysqld.cc.orig 2022-11-03 10:07:24 UTC
1417 @@ -4630,8 +4630,9 @@ static void init_ssl()
1418 sql_print_warning("SSL error: %s",buf);
1423 ERR_remove_state(0);
1430 [FILE:1559:patches/patch-storage_innobase_lz4.cmake]
1431 --- storage/innobase/lz4.cmake.orig 2022-11-03 10:07:24 UTC
1432 +++ storage/innobase/lz4.cmake
1433 @@ -17,9 +17,16 @@ SET(WITH_INNODB_LZ4 AUTO CACHE STRING
1435 MACRO (MYSQL_CHECK_LZ4)
1436 IF (WITH_INNODB_LZ4 STREQUAL "ON" OR WITH_INNODB_LZ4 STREQUAL "AUTO")
1437 - CHECK_INCLUDE_FILES(lz4.h HAVE_LZ4_H)
1438 - CHECK_LIBRARY_EXISTS(lz4 LZ4_compress_limitedOutput "" HAVE_LZ4_SHARED_LIB)
1439 - CHECK_LIBRARY_EXISTS(lz4 LZ4_compress_default "" HAVE_LZ4_COMPRESS_DEFAULT)
1440 + find_path(LZ4_INCLUDE_DIR NAMES lz4.h)
1441 + find_library(LZ4_LIBRARY NAMES lz4)
1443 + get_filename_component(LZ4_LIBDIR ${LZ4_LIBRARY} DIRECTORY)
1444 +#MESSAGE(STATUS "LZ4_INCLUDE_DIR=${LZ4_INCLUDE_DIR} LZ4_LIBRARY=${LZ4_LIBRARY} LZ4_LIBDIR=${LZ4_LIBDIR}")
1445 + IF (LZ4_INCLUDE_DIR)
1446 + SET(HAVE_LZ4_H YES)
1448 + CHECK_LIBRARY_EXISTS(lz4 LZ4_compress_limitedOutput ${LZ4_LIBDIR} HAVE_LZ4_SHARED_LIB)
1449 + CHECK_LIBRARY_EXISTS(lz4 LZ4_compress_default ${LZ4_LIBDIR} HAVE_LZ4_COMPRESS_DEFAULT)
1451 IF (HAVE_LZ4_SHARED_LIB AND HAVE_LZ4_H)
1452 SET(HAVE_INNODB_LZ4 TRUE)
1453 @@ -27,12 +34,13 @@ MACRO (MYSQL_CHECK_LZ4)
1454 IF (HAVE_LZ4_COMPRESS_DEFAULT)
1455 ADD_DEFINITIONS(-DHAVE_LZ4_COMPRESS_DEFAULT=1)
1457 - LINK_LIBRARIES(lz4)
1458 + LINK_LIBRARIES(${LZ4_LIBRARY})
1460 IF (WITH_INNODB_LZ4 STREQUAL "ON")
1461 MESSAGE(FATAL_ERROR "Required lz4 library is not found")
1466 ADD_FEATURE_INFO(INNODB_LZ4 HAVE_INNODB_LZ4 "LZ4 compression in the InnoDB storage engine")
1470 [FILE:968:patches/patch-storage_innobase_lzo.cmake]
1471 --- storage/innobase/lzo.cmake.orig 2022-11-03 10:07:24 UTC
1472 +++ storage/innobase/lzo.cmake
1473 @@ -17,13 +17,17 @@ SET(WITH_INNODB_LZO AUTO CACHE STRING
1475 MACRO (MYSQL_CHECK_LZO)
1476 IF (WITH_INNODB_LZO STREQUAL "ON" OR WITH_INNODB_LZO STREQUAL "AUTO")
1477 - CHECK_INCLUDE_FILES(lzo/lzo1x.h HAVE_LZO_H)
1478 - CHECK_LIBRARY_EXISTS(lzo2 lzo1x_1_compress "" HAVE_LZO_SHARED_LIB)
1480 + find_path(LZO_INCLUDE NAMES lzo/lzo1x.h)
1481 + find_library(LZO_LIBRARY NAMES lzo2)
1482 + get_filename_component(LZO_LIBDIR ${LZO_LIBRARY} DIRECTORY)
1486 + CHECK_LIBRARY_EXISTS(lzo2 lzo1x_1_compress ${LZO_LIBDIR} HAVE_LZO_SHARED_LIB)
1487 IF(HAVE_LZO_SHARED_LIB AND HAVE_LZO_H)
1488 SET(HAVE_INNODB_LZO TRUE)
1489 ADD_DEFINITIONS(-DHAVE_LZO=1)
1490 - LINK_LIBRARIES(lzo2)
1491 + LINK_LIBRARIES(${LZO_LIBRARY})
1493 IF (WITH_INNODB_LZO STREQUAL "ON")
1494 MESSAGE(FATAL_ERROR "Required lzo library is not found")
1497 [FILE:2105:patches/patch-storage_rocksdb_ha__rocksdb.cc]
1498 --- storage/rocksdb/ha_rocksdb.cc.orig 2022-11-03 10:07:24 UTC
1499 +++ storage/rocksdb/ha_rocksdb.cc
1500 @@ -266,7 +266,7 @@ Rdb_cf_manager cf_manager;
1501 Rdb_ddl_manager ddl_manager;
1502 Rdb_binlog_manager binlog_manager;
1504 -#if !defined(_WIN32) && !defined(__APPLE__) && !defined(__OpenBSD__)
1505 +#if defined(HAVE_TIMER_DELETE) && !defined(_WIN32) && !defined(__APPLE__) && !defined(__OpenBSD__)
1506 Rdb_io_watchdog *io_watchdog = nullptr;
1509 @@ -850,7 +850,7 @@ static void rocksdb_set_io_write_timeout
1510 void *const var_ptr MY_ATTRIBUTE((__unused__)), const void *const save) {
1511 DBUG_ASSERT(save != nullptr);
1512 DBUG_ASSERT(rdb != nullptr);
1513 -#if !defined(_WIN32) && !defined(__APPLE__) && !defined(__OpenBSD__)
1514 +#if defined(HAVE_TIMER_DELETE) && !defined(_WIN32) && !defined(__APPLE__) && !defined(__OpenBSD__)
1515 DBUG_ASSERT(io_watchdog != nullptr);
1518 @@ -859,7 +859,7 @@ static void rocksdb_set_io_write_timeout
1519 const uint32_t new_val = *static_cast<const uint32_t *>(save);
1521 rocksdb_io_write_timeout_secs = new_val;
1522 -#if !defined(_WIN32) && !defined(__APPLE__) && !defined(__OpenBSD__)
1523 +#if defined(HAVE_TIMER_DELETE) && !defined(_WIN32) && !defined(__APPLE__) && !defined(__OpenBSD__)
1524 io_watchdog->reset_timeout(rocksdb_io_write_timeout_secs);
1526 RDB_MUTEX_UNLOCK_CHECK(rdb_sysvars_mutex);
1527 @@ -5798,7 +5798,7 @@ static int rocksdb_init_func(void *const
1528 directories.push_back(myrocks::rocksdb_wal_dir);
1531 -#if !defined(_WIN32) && !defined(__APPLE__) && !defined(__OpenBSD__)
1532 +#if defined(HAVE_TIMER_DELETE) && !defined(_WIN32) && !defined(__APPLE__) && !defined(__OpenBSD__)
1533 io_watchdog = new Rdb_io_watchdog(std::move(directories));
1534 io_watchdog->reset_timeout(rocksdb_io_write_timeout_secs);
1536 @@ -5905,7 +5905,7 @@ static int rocksdb_done_func(void *const
1537 delete commit_latency_stats;
1538 commit_latency_stats = nullptr;
1540 -#if !defined(_WIN32) && !defined(__APPLE__) && !defined(__OpenBSD__)
1541 +#if defined(HAVE_TIMER_DELETE) && !defined(_WIN32) && !defined(__APPLE__) && !defined(__OpenBSD__)
1543 io_watchdog = nullptr;
1547 [FILE:249:patches/patch-storage_rocksdb_rdb__buff.h]
1548 --- storage/rocksdb/rdb_buff.h.orig 2022-11-03 10:07:25 UTC
1549 +++ storage/rocksdb/rdb_buff.h
1551 #define be16toh(x) OSSwapBigToHostInt16(x)
1554 +#include "port/port_posix.h"
1556 /* MySQL header files */
1557 #include "./my_global.h"
1561 [FILE:474:patches/patch-storage_rocksdb_rdb__io__watchdog.cc]
1562 If timer_t is an integer type, setting it to nullptr fails.
1564 --- storage/rocksdb/rdb_io_watchdog.cc.orig 2022-11-03 10:07:25 UTC
1565 +++ storage/rocksdb/rdb_io_watchdog.cc
1566 @@ -111,7 +111,11 @@ void Rdb_io_watchdog::io_check_callback(
1567 sql_print_warning("Deleting the watchdog I/O timer failed with %d.", errno);
1571 + m_io_check_watchdog_timer = 0;
1573 m_io_check_watchdog_timer = nullptr;
1576 RDB_MUTEX_UNLOCK_CHECK(m_reset_mutex);
1580 [FILE:1227:patches/patch-storage_rocksdb_rdb__io__watchdog.h]
1581 If timer_t is an integer type, setting it to nullptr fails.
1583 --- storage/rocksdb/rdb_io_watchdog.h.orig 2022-11-03 10:07:25 UTC
1584 +++ storage/rocksdb/rdb_io_watchdog.h
1586 /* MyRocks header files */
1587 #include "./rdb_utils.h"
1590 +#define NULLTIMER 0
1592 +#define NULLTIMER nullptr
1597 // Rdb_io_watchdog does not support Windows ATM.
1598 @@ -60,7 +66,7 @@ class Rdb_io_watchdog {
1599 ret = timer_delete(m_io_check_watchdog_timer);
1602 - m_io_check_watchdog_timer = nullptr;
1603 + m_io_check_watchdog_timer = NULLTIMER;
1607 @@ -68,7 +74,7 @@ class Rdb_io_watchdog {
1608 ret = timer_delete(m_io_check_timer);
1611 - m_io_check_timer = nullptr;
1612 + m_io_check_timer = NULLTIMER;
1616 @@ -93,8 +99,8 @@ class Rdb_io_watchdog {
1619 explicit Rdb_io_watchdog(std::vector<std::string> &&directories)
1620 - : m_io_check_timer(nullptr),
1621 - m_io_check_watchdog_timer(nullptr),
1622 + : m_io_check_timer(NULLTIMER),
1623 + m_io_check_watchdog_timer(NULLTIMER),
1624 m_io_in_progress(false),
1625 m_dirs_to_check(std::move(directories)),
1629 [FILE:328:patches/patch-storage_rocksdb_rocksdb_port_jemalloc__helper.h]
1630 --- storage/rocksdb/rocksdb/port/jemalloc_helper.h.orig 2022-11-03 10:07:26 UTC
1631 +++ storage/rocksdb/rocksdb/port/jemalloc_helper.h
1633 #include <jemalloc/jemalloc.h>
1637 +#define JEMALLOC_USABLE_SIZE_CONST const
1640 #ifndef JEMALLOC_CXX_THROW
1641 #define JEMALLOC_CXX_THROW
1645 [FILE:492:patches/patch-storage_rocksdb_ut0counter.h]
1646 --- storage/rocksdb/ut0counter.h.orig 2022-11-03 10:07:25 UTC
1647 +++ storage/rocksdb/ut0counter.h
1648 @@ -30,6 +30,12 @@ Created 2012/04/12 by Sunny Bains
1651 #define get_curr_thread_id() GetCurrentThreadId()
1652 +#elif defined __FreeBSD__
1653 +#include <pthread_np.h>
1654 +#define get_curr_thread_id() pthread_getthreadid_np()
1655 +#elif defined __DragonFly__
1656 +#include <sys/syscall.h>
1657 +#define get_curr_thread_id() syscall(SYS_lwp_gettid)
1659 #define get_curr_thread_id() pthread_self()