summaryrefslogtreecommitdiff
path: root/dev-db
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2025-01-10 06:41:31 +0000
committerV3n3RiX <venerix@koprulu.sector>2025-01-10 06:41:31 +0000
commitf9d8ddaae80afb8fa0924cd3f769f9b37dd373e1 (patch)
treed8962e6446d606b8c95329b4b78932a65f928a5f /dev-db
parentd94fef9a5708b8e64f363f4a71f0b56caef5efe4 (diff)
gentoo auto-resync : 10:01:2025 - 06:41:30
Diffstat (limited to 'dev-db')
-rw-r--r--dev-db/Manifest.gzbin16596 -> 16415 bytes
-rw-r--r--dev-db/firebird/Manifest25
-rw-r--r--dev-db/firebird/files/firebird-3.0.10.33601.0-configure-autoconf2.72.patch21
-rw-r--r--dev-db/firebird/files/firebird-3.0.10.33601.0-configure-clang16.patch48
-rw-r--r--dev-db/firebird/files/firebird-3.0.10.33601.0-flags.patch25
-rw-r--r--dev-db/firebird/files/firebird-3.0.10.33601.0-unbundle.patch97
-rw-r--r--dev-db/firebird/files/firebird.init.d.3.0-r122
-rw-r--r--dev-db/firebird/files/firebird.logrotate10
-rw-r--r--dev-db/firebird/files/firebird.xinetd.3.011
-rw-r--r--dev-db/firebird/firebird-3.0.10.33601.0-r2.ebuild248
-rw-r--r--dev-db/firebird/metadata.xml20
-rw-r--r--dev-db/mariadb-connector-c/Manifest4
-rw-r--r--dev-db/mariadb-connector-c/mariadb-connector-c-3.3.8.ebuild2
-rw-r--r--dev-db/mariadb-connector-c/mariadb-connector-c-9999.ebuild4
-rw-r--r--dev-db/mysql/Manifest10
-rw-r--r--dev-db/mysql/files/mysql-8.0.37-fix-bundled-abseil.patch30
-rw-r--r--dev-db/mysql/files/mysql-8.0.37-fix-bundled-boost.patch22
-rw-r--r--dev-db/mysql/files/mysql-8.0.40-fix-bundled-abseil-gcc15.patch19
-rw-r--r--dev-db/mysql/mysql-5.7.41.ebuild4
-rw-r--r--dev-db/mysql/mysql-8.0.37.ebuild6
-rw-r--r--dev-db/mysql/mysql-8.0.40.ebuild1284
-rw-r--r--dev-db/redict/Manifest4
-rw-r--r--dev-db/redict/redict-7.3.2.ebuild (renamed from dev-db/redict/redict-7.3.1.ebuild)2
-rw-r--r--dev-db/redis/Manifest6
-rw-r--r--dev-db/redis/redis-6.2.17.ebuild192
-rw-r--r--dev-db/redis/redis-7.2.7.ebuild197
-rw-r--r--dev-db/redis/redis-7.4.2.ebuild193
27 files changed, 1966 insertions, 540 deletions
diff --git a/dev-db/Manifest.gz b/dev-db/Manifest.gz
index 1220a8e1e410..1b3be0efde29 100644
--- a/dev-db/Manifest.gz
+++ b/dev-db/Manifest.gz
Binary files differ
diff --git a/dev-db/firebird/Manifest b/dev-db/firebird/Manifest
deleted file mode 100644
index 1480ff70b6db..000000000000
--- a/dev-db/firebird/Manifest
+++ /dev/null
@@ -1,25 +0,0 @@
-AUX firebird-3.0.10.33601.0-configure-autoconf2.72.patch 800 BLAKE2B 4248d5745873bc414c746b9e473dcf63b9b5c7612d9c0a09a44fb38aa4dcfe60a07dde6d1447e22bfd2ee963b55675f8544559545f8056fbed3712332e62b07a SHA512 d7c80ed448c80edc60ff25d827b659fc74bda9c67a2acf5650c1b5a5f32f0ef456b500dadcb09f7497acbcc7debd594b13c45d34bed64fd0f33dfa6dfe7c2542
-AUX firebird-3.0.10.33601.0-configure-clang16.patch 1726 BLAKE2B 58f7a9aaf90ecebf4fac09f9c6a8d080267cd2d5da51b9d8cdeb75ef8ef9b546b1fb989d762b91f8c9aaa86a2d1a634cbdd84c24f639416bb94ebc8358177f02 SHA512 c52a01e889422cff983c273bfc5ea19da227e77c62946aa654ce8ec8ef617cfb3d7a26b23820d1ba6dc5936e962563416f91e6f371ef1fe923740ab07ab3060c
-AUX firebird-3.0.10.33601.0-flags.patch 1233 BLAKE2B bd669967c2fc04cd62d0dcf8a487e9a7e31a36e177bd8dd4ee48ba8fcb29c88bdbfb4e2e34daa0c4b8fd353fada25d35e42e03802db1a2fe5d6efca3e1bd4075 SHA512 89aaf417e933887ba95dab85001d3e1438308da053018d8c34592c77a2a84b849b50129eb1b5c8aaf156470a70a34197a495033a960ff0578fb8cd8ac6f17606
-AUX firebird-3.0.10.33601.0-unbundle.patch 3361 BLAKE2B 8ec60391e1bc72c40a9f6c87e88c26a6d512941cf907a8541d4422e561e276b38e6f4e8096de389d1be2846872218125830564d8d5a5dc798a2ec68dd0c31fa7 SHA512 bf424f10266ac6e67a56316b216266c760d4e3df617ec44b8f0f308425fc1d337496f06790b7afed4a9f29f0108b0ea332ffbfd10f7b812f0b7d098d43b4e128
-AUX firebird.init.d.3.0-r1 637 BLAKE2B 18d947e20229f217ba0fb2d1df2cab8241c1f7e48087c0673cd02c43f3653b3d68fcc99359dffd1c5c6dffec0c0f50ca7ea16eb1042ca4a1fd0deb386c0847b9 SHA512 91393e1dd2a543a0382502897bed38f1d77f20c291e76bf6c27d77bf9e820cae714c6643b7f464d1e3b3294c4fee49e818c8cf57601bdf72221fcf63105fa50a
-AUX firebird.logrotate 178 BLAKE2B 3ec7db249080dc42ad063d3288d24c0c2c3a1172a48099a7a65d34249b8509ee482bcad964700cc57ed4749715b12ba756440888b81312f3d5695f99fee606fc SHA512 82ce8d2cdb2907f4e2e12cac520ec379a6e748ea4f5cb4c1c88167349a3d653bfaf58ceeaf1ce4acd65bdc8ad49eb0601c7c77527847e1a134cddc397355d98a
-AUX firebird.xinetd.3.0 193 BLAKE2B 34017b978344bc2b05cfe7b92eafd56ba20dd78d1fa21dfb5455d7972325cedae9a6ac25b4fa491899b19cb3bbe2949b8ca78626467100661767f6c944b01c20 SHA512 e02c011b55c1d6823b051d14dbfabef6d034db32ee8046adc796fdf393c837b995c270e0efdcb97950f6fead82cd73773099a247dc29961b0e8f6c4f6c0723ae
-DIST Firebird-3.0.10.33601-0.tar.bz2 13270269 BLAKE2B 1c30b002525287b239a6e24e59f146fdb61e1a9880cf66f2c59605b9f2a28c42603e21b2c5275e03a319af24c18f8fa5a7fa73f34c9a0d6c19e36e69864ad122 SHA512 0297a191ea1d0eda9557519d8ce6b7686cc3698a98b9c6c00547c2d36bf098083ae9d34b61614a7232b6195344bea1d66d2cbd3b092844b11f5b139162f8f886
-DIST firebird-3-quickstartguide.pdf 392796 BLAKE2B ef867664d107a9ee6dba3d724a5696fafe07a84305f1827dbeb5acf33d54aada45fad4e37971419fc7c26dba9b99577844a33c6e566485059329a8717fa79c1d SHA512 480ed2e79f83741c5b0b268f07e1ac1e317fbd9572a6e646411dc7fb94e5f44187e90d50b6ce761fc5e562e5ad2abafe89b2766e651eb7a36dbcb9ed49c3289f
-DIST firebird-30-developers-guide.pdf 1747057 BLAKE2B 9bde38dd5e997fec7fe69ada2ab1d74b0d59c440dd7a67d49e87a9464d7955f3766dde63aa60caf3e320759c934ec9f4088deed06cfae1b98e4d7ae6de364f02 SHA512 6a2a5ba1334e4a45839a950dd7b9c0a136b71a7626212b8aad5d173e8afd9a89c20ae51bdc5d309ebc206e0ac5af79138c28a10c64585d6f51c497e784445760
-DIST firebird-30-language-reference.pdf 3130464 BLAKE2B 975550c77e1b9cfcd53eef023781f1a1bc2282b7ba7bcedd57027399cbd44ad06c35d3f58bdcb2bdb953abe8ab948149ea9c284bc37eb35770dd57369f6838cd SHA512 9f17737733e2dd6e3a3f367c97c7053508621bc97b37b16ba36e6fe3554bf60363e3c06bf55ac6703d65e66039da7c16b71b70187c45b2206f6191c543cc1e95
-DIST firebird-fbmgr.pdf 151933 BLAKE2B b57394745a90732ee74f86d903690e0906be4bd5da5663ef28bd6959eb96f2d0f712cc06079a9730d9efa58e75258673b77b7b72db7897928632d315ffe1b5e1 SHA512 68b255d0de427df071400097f95205b8417c358e66a80c91d068b5e567f0a210c5494598cce871c83564cfbcd04b2f805cb53074a933ef963e94f1d1552ea2c9
-DIST firebird-gbak.pdf 196327 BLAKE2B c79e360a58c79c39e87b84b2653bd5fad1b1d45df8f02c8b6279277ea32b191533be52146ce8c03c3858ea86d23300c00d6eb31c30f0d6b466b5131aac4a7d54 SHA512 8a58adf94ea93bf51e55c7a0fd3adb7b6fc1f5fcaf71e29934f7bc192b5cac7dbd97113acf2ecda36df5470de5ee20f0100b65ab2b260a2194b846c52e0d816f
-DIST firebird-generator-guide.pdf 172298 BLAKE2B a923cc6aa5bab82b40d49b255d5ed2482e30f390ae76bffcd51294f9ee2000b827696bcb15b5bc5d9224a5650faf195daf89938c73ebce22d1e31411522c5800 SHA512 a043b84a1e7dff6b240b4786de7155fce266091d11f2a088e6864087e7d24c42cc70e44816d6abebf003feccf2676f9f8bbbb612b00db00366aead01f7e08c00
-DIST firebird-gfix.pdf 250034 BLAKE2B 2073f5348d6bd5989ba2496aa59865bf107e08c7a8a4058866a53b482f5f8012d9f6877e7ceb5cbe42d1587d8d29f1fa6622f3e5842d241eeca8da1ae5afcb4b SHA512 2f8de1fe4b45012c0d08e9e5d85d9ed1269629ac95c1ede5a9c8ae69aa69570ebfebe0f313ba54d6f00e785818f8801831c581be8b5ab427b189d3857a2b73fc
-DIST firebird-gsec.pdf 146403 BLAKE2B f20ddaee95c968df7b348ef5516ea53e3e6e866fdb2848951bd3ae5ed68e491360a24b6fbd71e2cf8fd03555284bf60bf0623db11d7b2569050fd022716eea55 SHA512 e930da593a9c0a8cdc0a669012c73b05e5844fe946807308bbe5e7a8ccd9a98261c7f4690fa7e07cfb39930359e30fdbfbe9c012565bf279a3471badf5eb46fa
-DIST firebird-gsplit.pdf 106100 BLAKE2B fd1e7edf7e6ea9556594395602739daa51253becf61db011548d763782ae57c5a2618ed79b91faf94264c1c0faff643f3941b6be0912c57e5d4b75d22ad5defa SHA512 70dafc072a1265ee9db63902b58e52833ea2c7482a12030ac13c35e51e3b94dde746090a7a02060475bf85d5170348207816e3997102fd4e33820c695d7d3e57
-DIST firebird-gstat.pdf 162939 BLAKE2B c63825c52f85020c095b90e8482a6e5f38c752178b135331268b5c2800fcfe3a035ccc68c14b83219bff1cb864c9f405e851e64f44919854e7e8e7290f4ad94d SHA512 c711122d9d020505f8475cda5b3621361a4d48cc39545a5e840430f43cb4dd7c97280a91085499547c95ce4cf9229b4ffec0f68c008fc04d7918b14fb7b8ec8a
-DIST firebird-isql.pdf 369327 BLAKE2B 3ea02b7a7b97bf231d43906f2fc8feb79aba525f1cb642da834c68c436d81d2f4408bcfe287d4ace089d6f37d9b3c8dc002fa98121fe2819c27c7840482ca91c SHA512 5f85a7ef98ab68df08c1225efab5859e988e63c3c3083e2320966cc4bf0976f9bbb4bea43906752f1710c860b33dae92c118ce13217ba61ee3ee9b0052204a3c
-DIST firebird-metadata-security.pdf 117765 BLAKE2B 67075db42cca196f019eef15fd2474be6d92353f0697b134ee5d3bb1e4cc6cd5c38cd978236f289d6c9cc300d9ebc5ee856ad871f1bd1816b7d92d46ee0cffe3 SHA512 8f24ff48ff177fdd98dfc1272f43de979fc405139475bd630a8f1c10feaf773425c85704194b8245235c2c61c0f7ebaf9d0d1741b68323146630a1361ed478a4
-DIST firebird-nbackup.pdf 202108 BLAKE2B 5ee794890f69935ec238d946649d05a72c3108674781af546e279e3d6cbbb82bbf81789270ad284a365f05cc6fdbca108baf86c5cb4eeacd242960e12e54d6b2 SHA512 c8e83a8e2bf23f3bcb17277b07eb822d1ae2ed412d6d1881f60c7c3003f60f1b6fe09e5dd52367c62a9311f9a7057fe4c85dd0c64a93554556f31cefc45e18c1
-DIST firebird-null-guide.pdf 487359 BLAKE2B 346d942b7d4780496c2c212433660415437f6b17a42bb109aaf1cd8a8de31a394a1d2a3b52bb6dc1c3830bc839a692b611c7fe3289243e86ab874a84d989a7b8 SHA512 b5b9981a3f15fe933a44deb001d1d85b0dc340ae0ff55e79d160da8590406515f0ba73360a3904556aa36d94cdafb17fe2452b5f63138cb1f585d70842511cd3
-DIST using-firebird.pdf 236646 BLAKE2B 54b296ac8c6281ff501678a24dac76e203a66e569b1cda7dc475a7fe9bbed9fc03923377c320a621a225d0277fc68cfb9820514d3f12191902cdeb18ccb87270 SHA512 ec16c33082524aa5df8907c1143a8707f1193c42882956c220e6c95442d43751ec3e2ba77ded004866f7dab7f58ecf4fac3a0027cf89ec7536c0771260f09cc4
-EBUILD firebird-3.0.10.33601.0-r2.ebuild 7583 BLAKE2B 02034a69e21c20f544fd9c4382ce510b6100c9bc7441a9a3d4304bbcdafaab5ed0819ac09313bbbfcb9c8bd2e7e2adc089a8646dd9609008631749dc00e6104e SHA512 6f2d64570889c30039f8e66be20283406d98603b5b742a2acf98dbcb173b048c387c1b16dfdf82819f7d13c9f0c7b3906bef121fa77fd06cbe3fdd718a269bac
-MISC metadata.xml 847 BLAKE2B 90efbc0d974a2b5aee6061f3589ab694dc18e6179021edfc7c7e084c12c250e82951932778a1e6279beda34c2477c1c3b59ef9ac936df5175636e75717105ddf SHA512 0e64dbde74495118efb036fffe04c6a5f48f6e0a5779d667eb02078832f1d5e05b5b5b29816517b633bbfa88b5b8fef56b1cfebbdfad56e84f056639111e85f7
diff --git a/dev-db/firebird/files/firebird-3.0.10.33601.0-configure-autoconf2.72.patch b/dev-db/firebird/files/firebird-3.0.10.33601.0-configure-autoconf2.72.patch
deleted file mode 100644
index 29cca62fc790..000000000000
--- a/dev-db/firebird/files/firebird-3.0.10.33601.0-configure-autoconf2.72.patch
+++ /dev/null
@@ -1,21 +0,0 @@
-https://github.com/FirebirdSQL/firebird/commit/3fe8f6510de79689a26868e244840b24dcb19567
-
-From 3fe8f6510de79689a26868e244840b24dcb19567 Mon Sep 17 00:00:00 2001
-From: AlexPeshkoff <alexander.peshkoff@gmail.com>
-Date: Wed, 23 Nov 2022 20:30:03 +0300
-Subject: [PATCH] Fixed #7394: autoconf 2.72 support
-
---- a/configure.ac
-+++ b/configure.ac
-@@ -696,8 +696,9 @@ if test "$STD_EDITLINE" = "true"; then
- AC_CHECK_LIB(readline, readline, [READLINE=readline EDITLINE_FLG=Y],
- [STD_EDITLINE=false
- if test "$EDITLINE_FLG" = "Y"; then
-- AC_MSG_WARN([[[--with-system-editline specified, not found. Using bundled editline]]])])))
-+ AC_MSG_WARN([[[--with-system-editline specified, not found. Using bundled editline]]])
- fi
-+ ])))
- fi
- XE_RESTORE_ENV()
-
-
diff --git a/dev-db/firebird/files/firebird-3.0.10.33601.0-configure-clang16.patch b/dev-db/firebird/files/firebird-3.0.10.33601.0-configure-clang16.patch
deleted file mode 100644
index 06d6907369ca..000000000000
--- a/dev-db/firebird/files/firebird-3.0.10.33601.0-configure-clang16.patch
+++ /dev/null
@@ -1,48 +0,0 @@
-https://github.com/FirebirdSQL/firebird/pull/7407
-
-From a39cde31c4c78866c8f8ee0285fc4bcb81496d81 Mon Sep 17 00:00:00 2001
-From: Florian Weimer <fweimer@redhat.com>
-Date: Thu, 1 Dec 2022 18:26:06 +0100
-Subject: [PATCH] configure.ac: Add missing int return types to main
-
-Implicit ints are a language feature that was removed in C99 and
-future compilers may require declaration of all return types.
---- a/configure.ac
-+++ b/configure.ac
-@@ -1118,7 +1118,7 @@ AC_CHECK_FUNCS(sem_init)
- if test "$ac_cv_func_sem_init" = "yes"; then
- AC_MSG_CHECKING(for working sem_init())
- AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <semaphore.h>
-- main () {
-+ int main () {
- sem_t s;
- return sem_init(&s,0,0);
- }
-@@ -1159,7 +1159,7 @@ AC_SYS_LARGEFILE
- if test "$ac_cv_sys_file_offset_bits" = "no"; then
- AC_MSG_CHECKING(for native large file support)
- AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <unistd.h>
-- main () {
-+ int main () {
- return !(sizeof(off_t) == 8);
- }]])],[ac_cv_sys_file_offset_bits=64; AC_DEFINE(_FILE_OFFSET_BITS,64)
- AC_MSG_RESULT(yes)],[AC_MSG_RESULT(no)],[])
-@@ -1206,7 +1206,7 @@ dnl EKU: try to determine the alignment of long and double
- dnl replaces FB_ALIGNMENT and FB_DOUBLE_ALIGN in src/jrd/common.h
- AC_MSG_CHECKING(alignment of long)
- AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <semaphore.h>
--main () {
-+int main () {
- struct s {
- char a;
- union { long long x; sem_t y; } b;
-@@ -1217,7 +1217,7 @@ AC_MSG_RESULT($ac_cv_c_alignment)
- AC_DEFINE_UNQUOTED(FB_ALIGNMENT, $ac_cv_c_alignment, [Alignment of long])
-
- AC_MSG_CHECKING(alignment of double)
--AC_RUN_IFELSE([AC_LANG_SOURCE([[main () {
-+AC_RUN_IFELSE([AC_LANG_SOURCE([[int main () {
- struct s {
- char a;
- double b;
-
diff --git a/dev-db/firebird/files/firebird-3.0.10.33601.0-flags.patch b/dev-db/firebird/files/firebird-3.0.10.33601.0-flags.patch
deleted file mode 100644
index a0ecef4693c4..000000000000
--- a/dev-db/firebird/files/firebird-3.0.10.33601.0-flags.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-# Compile externs with same CXX/CC/CFLAGS/CXXFLAGS/LDFLAGS as main
---- a/builds/posix/Makefile.in
-+++ b/builds/posix/Makefile.in
-@@ -127,8 +127,8 @@
- endif
-
- extern:
-- $(MAKE) -C $(ROOT)/extern/btyacc
-- $(MAKE) -C $(ROOT)/extern/cloop TARGET=release WITH_FPC=0 BUILD_DIR=$(TMP_ROOT)/cloop OUT_DIR=$(GEN_ROOT)/$(TARGET)/cloop
-+ $(MAKE) -C $(ROOT)/extern/btyacc CC="$(CC)" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)"
-+ $(MAKE) -C $(ROOT)/extern/cloop TARGET=release WITH_FPC=0 BUILD_DIR=$(TMP_ROOT)/cloop OUT_DIR=$(GEN_ROOT)/$(TARGET)/cloop CXX="$(CXX)" CXXFLAGS="$(OPTIMIZE_FLAGS)" CFLAGS="${CFLAGS}" CC="${CC}" LDFLAGS="$(LDDFLAGS)"
-
- ifeq ($(TOMBUILD_FLG),Y)
- $(MAKE) -C $(ROOT)/extern/libtommath -f makefile.shared LIBTOOL=$(LIBTOOL)
-@@ -592,8 +592,8 @@
- $(EXE_LINK) $(EXE_LINK_OPTIONS) $^ -o $@ $(FIREBIRD_LIBRARY_LINK) $(LINK_LIBS) $(call LINK_DARWIN_RPATH,..)
-
- examples: include_generic
-- $(MAKE) -f Makefile.examples -C $(GEN_ROOT)/examples/
-- $(MAKE) -f Makefile.plugins_examples
-+ $(MAKE) -f Makefile.examples -C $(GEN_ROOT)/examples/ CXX="${CXX}" CXXFLAGS="${CXXFLAGS}" LDFLAGS="${LDFLAGS}"
-+ $(MAKE) -f Makefile.plugins_examples CXX="${CXX}" CXXFLAGS="${CXXFLAGS}" LDFLAGS="${LDFLAGS}"
-
- message_file: $(FIREBIRD_MSG)
-
diff --git a/dev-db/firebird/files/firebird-3.0.10.33601.0-unbundle.patch b/dev-db/firebird/files/firebird-3.0.10.33601.0-unbundle.patch
deleted file mode 100644
index 4e5399f198b6..000000000000
--- a/dev-db/firebird/files/firebird-3.0.10.33601.0-unbundle.patch
+++ /dev/null
@@ -1,97 +0,0 @@
-Partly based on:
-- https://github.com/freebsd/freebsd-ports/blob/main/databases/firebird30-server/files/patch-builds-posix_Makefile.in.plugins_examples
-- https://github.com/freebsd/freebsd-ports/blob/main/databases/firebird30-server/files/patch-extern_btyacc_Makefile
-- https://github.com/freebsd/freebsd-ports/blob/main/databases/firebird30-server/files/patch-extern_cloop_Makefile
-- https://github.com/freebsd/freebsd-ports/blob/main/databases/firebird30-server/files/patch-builds_posix_make.defaults
---- a/builds/posix/Makefile.in
-+++ b/builds/posix/Makefile.in
-@@ -688,8 +688,8 @@ install install-embedded silent_install package packages dist:
- # various cleaning
- #
- .PHONY: clean clean_objects clean_dependancies clean_extern_objects clean_build \
-- clean_gpre_gen clean_icu clean_dbs clean_examples clean_makefiles \
-- clean_editline clean_all
-+ clean_gpre_gen clean_dbs clean_examples clean_makefiles \
-+ clean_all
-
-
- clean: clean_objects clean_dependancies clean_extern_objects clean_build \
-@@ -708,8 +708,6 @@ clean_config clean_all: clean clean_makefiles
- $(RM) $(ROOT)/config.status
- $(RM) $(ROOT)/libtool
- $(RM_R) $(ROOT)/autom4te.cache
-- -$(MAKE) -C $(ROOT)/extern/editline distclean
--# -$(MAKE) -C $(ROOT)/extern/icu/source distclean
- -$(MAKE) -C $(ROOT)/extern/btyacc distclean
-
- clean_dbs:
-@@ -724,12 +722,6 @@ clean_dbs:
- clean_examples:
- $(RM) `find $(GEN_ROOT)/examples/ -type f ! -name 'Make*'`
-
--clean_editline:
-- -$(MAKE) -C $(ROOT)/extern/editline clean
--
--#clean_icu:
--# -$(MAKE) -C $(ROOT)/extern/icu/source clean
--
- clean_tommath:
- -$(MAKE) -C $(ROOT)/extern/libtommath clean
-
---- a/builds/posix/Makefile.in.plugins_examples
-+++ b/builds/posix/Makefile.in.plugins_examples
-@@ -99,7 +99,7 @@ AllObjects += $(CA_Objects)
- crypt_app: $(CRYPT_APP)
-
- $(CRYPT_APP): $(CA_Objects)
-- $(EXE_LINK) $^ -o $@ $(FIREBIRD_LIBRARY_LINK)
-+ $(EXE_LINK) $(LDFLAGS) $^ -o $@ $(FIREBIRD_LIBRARY_LINK)
-
-
- include $(ROOT)/gen/make.shared.targets
---- a/builds/posix/make.defaults
-+++ b/builds/posix/make.defaults
-@@ -240,7 +240,7 @@ LIBFBINTL_SO = $(FB_BUILD)/intl/$(LIB_PREFIX)fbintl.$(SHRLIB_EXT)
-
- ifeq ($(EDITLINE_FLG),Y)
- ifeq ($(STD_EDITLINE), true)
-- LIBEDITLINE := -l$(READLINE)
-+ LIBEDITLINE := $(shell ${PKG_CONFIG} libedit --libs)
- else
- LIBEDITLINE := $(LIB)/libedit.a
- endif
---- a/extern/btyacc/Makefile
-+++ b/extern/btyacc/Makefile
-@@ -42,7 +42,7 @@ OTHERS = README README.BYACC \
- all: $(PROGRAM)
-
- $(PROGRAM): $(OBJS) $(LIBS)
-- $(CC) $(LDFLAGS) -o $(PROGRAM) $(OBJS) $(LIBS)
-+ $(CC) $(CFLAGS) $(LDFLAGS) -o $(PROGRAM) $(OBJS) $(LIBS)
-
- clean:; rm -f $(OBJS)
-
---- a/extern/cloop/Makefile
-+++ b/extern/cloop/Makefile
-@@ -6,7 +6,7 @@ TARGET := release
-
- CC := $(CC)
- CXX := $(CXX)
--LD := $(CXX)
-+LD := $(CXX) $(LDFLAGS)
-
- SRC_DIR := src
- BUILD_DIR := build
-@@ -27,8 +27,10 @@ SRCS_CPP := $(foreach sdir,$(SRC_DIRS),$(wildcard $(sdir)/*.cpp))
- OBJS_C := $(patsubst $(SRC_DIR)/%.c,$(OBJ_DIR)/%.o,$(SRCS_C))
- OBJS_CPP := $(patsubst $(SRC_DIR)/%.cpp,$(OBJ_DIR)/%.o,$(SRCS_CPP))
-
--C_FLAGS := -ggdb -fPIC -MMD -MP -W -Wall -Wno-unused-parameter
--CXX_FLAGS := $(C_FLAGS)
-+
-+COMMON_C_FLAGS := -ggdb -fPIC -MMD -MP -W -Wall -Wno-unused-parameter
-+C_FLAGS := $(COMMON_C_FLAGS) $(CFLAGS) $(CPPFLAGS)
-+CXX_FLAGS := $(COMMON_C_FLAGS) $(CXXFLAGS) $(CPPFLAGS)
- FPC_FLAGS := -Mdelphi
-
- ifeq ($(TARGET),release)
diff --git a/dev-db/firebird/files/firebird.init.d.3.0-r1 b/dev-db/firebird/files/firebird.init.d.3.0-r1
deleted file mode 100644
index c49ea97f9203..000000000000
--- a/dev-db/firebird/files/firebird.init.d.3.0-r1
+++ /dev/null
@@ -1,22 +0,0 @@
-#!/sbin/openrc-run
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License, v2 or later
-
-name=${RC_SVCNAME}
-
-fbhomedir="/var/run/firebird"
-fblogdir="/var/log/firebird"
-pidfile="${fbhomedir}/firebird.pid"
-command="/usr/sbin/fbguard"
-command_args="-forever"
-command_args_background="-daemon -pidfile $pidfile"
-command_user="${FBUSER:-firebird}:${FBGROUP:-firebird}"
-
-depend() {
- need net
-}
-
-start_pre() {
- checkpath -q -d -m 0770 -o ${FBUSER:-firebird}:${FBGROUP:-firebird} ${fbhomedir} || return 1
- checkpath -q -d -m 0770 -o ${FBUSER:-firebird}:${FBGROUP:-firebird} ${fblogdir} || return 1
-}
diff --git a/dev-db/firebird/files/firebird.logrotate b/dev-db/firebird/files/firebird.logrotate
deleted file mode 100644
index ac4a74b26041..000000000000
--- a/dev-db/firebird/files/firebird.logrotate
+++ /dev/null
@@ -1,10 +0,0 @@
-/var/log/firebird/firebird.log {
- compress
- weekly
- missingok
- rotate 52
- size +1024k
- delaycompress
- notifempty
- create 644 firebird firebird
- }
diff --git a/dev-db/firebird/files/firebird.xinetd.3.0 b/dev-db/firebird/files/firebird.xinetd.3.0
deleted file mode 100644
index 4e094bdf0627..000000000000
--- a/dev-db/firebird/files/firebird.xinetd.3.0
+++ /dev/null
@@ -1,11 +0,0 @@
-service gds_db
-{
- flags = REUSE
- socket_type = stream
- wait = no
- user = firebird
- log_on_success += USERID
- log_on_failure += USERID
- server = /usr/bin/firebird
- disable = yes
-}
diff --git a/dev-db/firebird/firebird-3.0.10.33601.0-r2.ebuild b/dev-db/firebird/firebird-3.0.10.33601.0-r2.ebuild
deleted file mode 100644
index 5fd90979b8e5..000000000000
--- a/dev-db/firebird/firebird-3.0.10.33601.0-r2.ebuild
+++ /dev/null
@@ -1,248 +0,0 @@
-# Copyright 1999-2024 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-MY_P=${PN/f/F}-$(ver_rs 4 '-')
-inherit autotools flag-o-matic toolchain-funcs
-
-DESCRIPTION="Relational database offering many ANSI SQL:2003 and some SQL:2008 features"
-HOMEPAGE="https://www.firebirdsql.org/"
-
-SRC_URI="
- https://github.com/FirebirdSQL/firebird/releases/download/v$(ver_cut 1-3)/${MY_P}.tar.bz2
- doc? (
- https://firebirdsql.org/file/documentation/pdf/en/refdocs/fblangref30/firebird-30-language-reference.pdf
- https://firebirdsql.org/file/documentation/pdf/en/firebirddocs/qsg3/firebird-3-quickstartguide.pdf
- https://firebirdsql.org/file/documentation/pdf/en/refdocs/fbdevgd30/firebird-30-developers-guide.pdf
- https://firebirdsql.org/file/documentation/pdf/en/firebirddocs/isql/firebird-isql.pdf
- https://firebirdsql.org/file/documentation/pdf/en/firebirddocs/gsec/firebird-gsec.pdf
- https://firebirdsql.org/file/documentation/pdf/en/firebirddocs/gbak/firebird-gbak.pdf
- https://firebirdsql.org/file/documentation/pdf/en/firebirddocs/nbackup/firebird-nbackup.pdf
- https://firebirdsql.org/file/documentation/pdf/en/firebirddocs/gstat/firebird-gstat.pdf
- https://firebirdsql.org/file/documentation/pdf/en/firebirddocs/gfix/firebird-gfix.pdf
- https://firebirdsql.org/file/documentation/pdf/en/firebirddocs/fbmgr/firebird-fbmgr.pdf
- https://firebirdsql.org/file/documentation/pdf/en/firebirddocs/gsplit/firebird-gsplit.pdf
- https://firebirdsql.org/file/documentation/pdf/en/firebirddocs/generatorguide/firebird-generator-guide.pdf
- https://firebirdsql.org/file/documentation/pdf/en/firebirddocs/nullguide/firebird-null-guide.pdf
- https://firebirdsql.org/file/documentation/pdf/en/firebirddocs/fbmetasecur/firebird-metadata-security.pdf
- https://firebirdsql.org/file/documentation/pdf/en/firebirddocs/ufb/using-firebird.pdf
- )
-"
-S="${WORKDIR}/${MY_P}"
-
-LICENSE="IDPL Interbase-1.0"
-SLOT="0"
-KEYWORDS="~amd64 ~arm64 ~x86"
-IUSE="doc examples +server xinetd"
-
-BDEPEND="
- doc? ( app-arch/unzip )
-"
-# FIXME: cloop?
-DEPEND="
- dev-libs/icu:=
- dev-libs/libedit
- dev-libs/libtommath
-"
-RDEPEND="
- ${DEPEND}
- acct-group/firebird
- acct-user/firebird
- xinetd? ( virtual/inetd )
- !sys-cluster/ganglia
-"
-
-PATCHES=(
- "${FILESDIR}"/${PN}-3.0.10.33601.0-unbundle.patch
- "${FILESDIR}"/${PN}-3.0.10.33601.0-flags.patch
- "${FILESDIR}"/${P}-configure-autoconf2.72.patch
- "${FILESDIR}"/${P}-configure-clang16.patch
-)
-
-pkg_pretend() {
- if [[ -e /var/run/${PN}/${PN}.pid ]] ; then
- ewarn
- ewarn "The presence of server connections may prevent isql or gsec"
- ewarn "from establishing an embedded connection. Accordingly,"
- ewarn "creating employee.fdb or security3.fdb could fail."
- ewarn "It is more secure to stop the firebird daemon before running emerge."
- ewarn
- fi
-}
-
-check_sed() {
- MSG="sed of $3, required $2 line(s) modified $1"
- einfo "${MSG}"
- [[ $1 -ge $2 ]] || die "${MSG}"
-}
-
-src_prepare() {
- default
-
- # Rename references to isql to fbsql
- # sed vs patch for portability and addtional location changes
- check_sed "$(sed -i -e 's:"isql :"fbsql :w /dev/stdout' \
- src/isql/isql.epp | wc -l)" "1" "src/isql/isql.epp" # 1 line
- check_sed "$(sed -i -e 's:isql :fbsql :w /dev/stdout' \
- src/msgs/history2.sql | wc -l)" "4" "src/msgs/history2.sql" # 4 lines
- check_sed "$(sed -i -e 's:--- ISQL:--- FBSQL:w /dev/stdout' \
- -e 's:isql :fbsql :w /dev/stdout' \
- -e 's:ISQL :FBSQL :w /dev/stdout' \
- src/msgs/messages2.sql | wc -l)" "6" "src/msgs/messages2.sql" # 6 lines
-
- # bug #917662, bug #924659
- filter-lto
- append-flags -fno-strict-aliasing $(test-flags-CXX -fno-lifetime-dse)
-
- # use gentoo's CXXFLAGS instead of whatever firebird decided on
- # doesn't replace all firebird's CXXFLAGS, but at least this is last,
- # so it can do some overrides
- sed -i -e "/OPTIMIZE_FLAGS=/s/=.*/=${CXXFLAGS}/" builds/posix/prefix.*
-
- find . -name \*.sh -exec chmod +x {} + || die
- # firebird's patched btyacc is needed now as of
- # https://github.com/FirebirdSQL/firebird/commit/9aab6ed8cc6872e2ebc6bfa2531e089cb96e8305#diff-a01303d63fcb967bea34359c3c7f79e4356d6549ab22a1a9190e8020c0b33a3d
- rm -r extern/{editline,icu} || die
-
- eautoreconf
-}
-
-src_configure() {
- tc-export PKG_CONFIG
-
- local myeconfargs=(
- --prefix=/usr/$(get_libdir)/firebird
- --with-editline
- --with-system-editline
- --with-fbbin=/usr/bin
- --with-fbsbin=/usr/sbin
- --with-fbconf=/etc/${PN}
- --with-fblib=/usr/$(get_libdir)
- --with-fbinclude=/usr/include
- --with-fbdoc=/usr/share/doc/${PF}
- --with-fbudf=/usr/$(get_libdir)/${PN}/UDF
- --with-fbsample=/usr/share/${PN}/examples
- --with-fbsample-db=/usr/share/${PN}/examples/empbuild
- --with-fbhelp=/usr/share/${PN}/help
- --with-fbintl=/usr/$(get_libdir)/${PN}/intl
- --with-fbmisc=/usr/share/${PN}
- --with-fbsecure-db=/etc/${PN}
- --with-fbmsg=/usr/share/${PN}/msg
- --with-fblog=/var/log/${PN}/
- --with-fbglock=/var/run/${PN}
- --with-fbplugins=/usr/$(get_libdir)/${PN}/plugins
- --with-gnu-ld
- )
-
- econf "${myeconfargs[@]}"
-}
-
-# from linux underground, merging into this here
-src_install() {
- if use doc; then
- dodoc -r doc
-
- local x
- for x in ${A}; do
- if [[ ${x} == *.pdf ]] ; then
- dodoc "${DISTDIR}"/${x}
- fi
- done
- fi
-
- cd "${S}/gen/Release/${PN}" || die
-
- doheader include/*
- dolib.so lib/*.so*
-
- # links for backwards compatibility
- insinto /usr/$(get_libdir)
- dosym libfbclient.so /usr/$(get_libdir)/libgds.so
- dosym libfbclient.so /usr/$(get_libdir)/libgds.so.0
- dosym libfbclient.so /usr/$(get_libdir)/libfbclient.so.1
-
- insinto /usr/share/${PN}/msg
- doins *.msg
-
- use server || return
-
- einfo "Renaming isql -> fbsql"
- mv bin/isql bin/fbsql || die "failed to rename isql -> fbsql"
-
- dobin bin/{fb_config,fbsql,fbsvcmgr,fbtracemgr,gbak,gfix,gpre,gsec,gsplit,gstat,nbackup,qli}
- dosbin bin/{firebird,fbguard,fb_lock_print}
-
- insinto /usr/share/${PN}/help
- # why???
- insopts -m0660 -o firebird -g firebird
- doins help/help.fdb
-
- exeinto /usr/$(get_libdir)/${PN}/intl
- doexe intl/libfbintl.so
- dosym libfbintl.so /usr/$(get_libdir)/${PN}/intl/fbintl.so
-
- insinto /usr/$(get_libdir)/${PN}/intl
- insopts -m0644 -o root -g root
- doins intl/fbintl.conf
-
- # plugins
- exeinto /usr/$(get_libdir)/${PN}/plugins
- doexe plugins/*.so
- exeinto /usr/$(get_libdir)/${PN}/plugins/udr
- doexe plugins/udr/*.so
-
- exeinto /usr/$(get_libdir)/${PN}/UDF
- doexe UDF/*.so
-
- # logging (do we really need the perms?)
- diropts -m 755 -o firebird -g firebird
- dodir /var/log/${PN}
- keepdir /var/log/${PN}
-
- # logrotate
- insinto /etc/logrotate.d
- newins "${FILESDIR}/${PN}.logrotate" ${PN}
-
- # configuration files
- insinto /etc/${PN}/plugins
- doins plugins/udr_engine.conf
- insinto /etc/${PN}
- doins {databases,fbtrace,firebird,plugins}.conf
-
- # install secutity3.fdb
- insopts -m0660 -o firebird -g firebird
- doins security3.fdb
-
- if use xinetd; then
- insinto /etc/xinetd.d
- newins "${FILESDIR}/${PN}.xinetd.3.0" ${PN}
- else
- newinitd "${FILESDIR}/${PN}.init.d.3.0-r1" ${PN}
- fi
-
- if use examples; then
- cd examples || die
- insinto /usr/share/${PN}/examples
- insopts -m0644 -o root -g root
- doins -r api
- doins -r dbcrypt
- doins -r include
- doins -r interfaces
- doins -r package
- doins -r stat
- doins -r udf
- doins -r udr
- doins CMakeLists.txt
- doins functions.c
- doins README
- insinto /usr/share/${PN}/examples/empbuild
- insopts -m0660 -o firebird -g firebird
- doins empbuild/employee.fdb
- fi
-
- elog "Starting with version 3, server mode is set in firebird.conf"
- elog "The default setting is superserver."
- elog
- elog "If you're using UDFs, please remember to move them to ${EPREFIX}/usr/$(get_libdir)/firebird/UDF"
-}
diff --git a/dev-db/firebird/metadata.xml b/dev-db/firebird/metadata.xml
deleted file mode 100644
index 9839f3286b10..000000000000
--- a/dev-db/firebird/metadata.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
-<pkgmetadata>
- <!-- maintainer-needed -->
- <longdescription>
- Firebird is a relational database offering many ANSI SQL standard
- features that runs on Linux, Windows, and a variety of Unix platforms.
- Firebird offers excellent concurrency, high performance, and powerful
- language support for stored procedures and triggers. It has been used
- in production systems, under a variety of names, since 1981.
- </longdescription>
- <use>
- <flag name="server">Install the server components of Firebird, not just the client</flag>
- <flag name="xinetd">Install ClassicServer</flag>
- </use>
- <upstream>
- <remote-id type="sourceforge">firebird</remote-id>
- <remote-id type="github">FirebirdSQL/firebird</remote-id>
- </upstream>
-</pkgmetadata>
diff --git a/dev-db/mariadb-connector-c/Manifest b/dev-db/mariadb-connector-c/Manifest
index 9f08c23ff10a..99cea32dd3f3 100644
--- a/dev-db/mariadb-connector-c/Manifest
+++ b/dev-db/mariadb-connector-c/Manifest
@@ -1,6 +1,6 @@
AUX mariadb-connector-c-3.1.3-fix-pkconfig-file.patch 616 BLAKE2B 650c5a794da6d3d0095a823917704d52a5f16c349ce7017b93b1bebfec01287929470a89a2e4aec2f9f7cd5135368e43f2a2e89257c0d7042b878e1806ede8aa SHA512 fe621abedaf81d1fa367c52f69ccce1765757db8d9f412aa40b440d7e51d4de3785a90150e76893f7066b1ba656eb1bad020465e58adae13f08245b839bde4de
AUX mariadb-connector-c-3.3.4-remove-zstd.patch 732 BLAKE2B 56544c653e2eded85bce16fd18775945b2f83a94a0a2cdb4964baf14fa9a448264cfea680d1293296c828c4338e15b6275414003f048ee357ab055a63f2a7f18 SHA512 fe407b8ecfac43d135a47c161f8812a0911c19d7e515ff62a454aa259925e56a470350b2bcd7e5e7aefd996ea020a204590a0ab0f496e80142195849ae4a8a3d
DIST mariadb-connector-c-3.3.8-src.tar.gz 1393368 BLAKE2B 09a8a310f97809f0b0396770a77d4512fe1124de263e2077e5a14a2fa1fbc59d7e35a09d97b0471b687943fc9ce06925507e4b950fdacfdc7ca04ea5ee56bf9e SHA512 d2630bda8deb28696842a6b5dd308060a8b9a83a04dfb3ed908387f53af4108510c6f536aaecc4a3c9a035c7be91b98229d6c480366a3579b6be2c5a8d85ff56
-EBUILD mariadb-connector-c-3.3.8.ebuild 4048 BLAKE2B 02cc78d1571eee86ddab4c6e5b85be930e69943acbe56abde220e1306a272d920b17f131771258ea214159c2b292ca483fb063c37428c5f96a97835f991f86d1 SHA512 5f2a557fdeb73138f68f32cbc272a4c5565a702190516dcc721f1b9627424d88f26b82d92cf295a8968e0c9bd04a380244b788fb98c63492eaeb3616aae16db5
-EBUILD mariadb-connector-c-9999.ebuild 4054 BLAKE2B 92e1aaacab156524d12ce07f21e7fe954215c8c13926dac15ad21611f543699caddd2a72f3d9dd50ebc335d074665161cb8fc5a6351a0d0cd88a7d8bbf2fd298 SHA512 f33d4709be52cdbff47eaf254afdbb2bc1490540582c7d0cfb8597bd1db0850fcf61051d2204bfe1803397d60b8fbc08431cd103a833f0ab68759f705a1e95f2
+EBUILD mariadb-connector-c-3.3.8.ebuild 4034 BLAKE2B 3104725ffb0ed3b0826164b5dd9fdcf63802f57fd15584182610c70efc8e4ea8d0ecaad6f2f79dca9b21302035522c50863a363b10705379af1cb28d8a2ac9c2 SHA512 be165cf87f8ebf73f265938d8476a656f2648ac34d988647e05cbf07500e654a69ce6e54c7e62945175338e8ee44d91f0fc58db4d8212e37e87dd430f5ca3b69
+EBUILD mariadb-connector-c-9999.ebuild 4034 BLAKE2B 3104725ffb0ed3b0826164b5dd9fdcf63802f57fd15584182610c70efc8e4ea8d0ecaad6f2f79dca9b21302035522c50863a363b10705379af1cb28d8a2ac9c2 SHA512 be165cf87f8ebf73f265938d8476a656f2648ac34d988647e05cbf07500e654a69ce6e54c7e62945175338e8ee44d91f0fc58db4d8212e37e87dd430f5ca3b69
MISC metadata.xml 348 BLAKE2B 4c817753c3ccda9cdade926d129408d83169373335553a3c990224a74444e122d1150cfb031395d923959911e8485b1dc88e00cce2aeb599d4a26b2fd5d8eef5 SHA512 009615c60fbffadc877e7d26cddd26e1f5fbfbbc844ba7cf388ea748a091f16f819ac539a8998c0588fc96c3cd882fb3cadde556510fa1732636aac64c95ddf9
diff --git a/dev-db/mariadb-connector-c/mariadb-connector-c-3.3.8.ebuild b/dev-db/mariadb-connector-c/mariadb-connector-c-3.3.8.ebuild
index fdf4b945fa06..eb4f7ef8cec1 100644
--- a/dev-db/mariadb-connector-c/mariadb-connector-c-3.3.8.ebuild
+++ b/dev-db/mariadb-connector-c/mariadb-connector-c-3.3.8.ebuild
@@ -109,7 +109,7 @@ multilib_src_test() {
mysqld --no-defaults --datadir="${T}/mysql/data" --socket="${T}/mysql/mysql.sock" --skip-grant-tables --skip-networking &
local attempts=0
- while ! mysqladmin ping --no-defaults --socket="${T}/mysql/mysql.sock" --silent ; do
+ while ! mysqladmin ping --socket="${T}/mysql/mysql.sock" --silent ; do
# 5 minutes should be more than enough
if [[ ${attempts} -gt 300 ]] ; then
die "mysqld not found after 300 seconds, aborting"
diff --git a/dev-db/mariadb-connector-c/mariadb-connector-c-9999.ebuild b/dev-db/mariadb-connector-c/mariadb-connector-c-9999.ebuild
index 16f992e304e8..eb4f7ef8cec1 100644
--- a/dev-db/mariadb-connector-c/mariadb-connector-c-9999.ebuild
+++ b/dev-db/mariadb-connector-c/mariadb-connector-c-9999.ebuild
@@ -11,7 +11,7 @@ else
MY_PV=${PV/_b/-b}
SRC_URI="https://downloads.mariadb.com/Connectors/c/connector-c-${PV}/${P}-src.tar.gz"
S="${WORKDIR%/}/${PN}-${MY_PV}-src"
- KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~x86"
+ KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~mips ppc ppc64 ~riscv ~s390 x86"
fi
inherit cmake-multilib flag-o-matic toolchain-funcs
@@ -109,7 +109,7 @@ multilib_src_test() {
mysqld --no-defaults --datadir="${T}/mysql/data" --socket="${T}/mysql/mysql.sock" --skip-grant-tables --skip-networking &
local attempts=0
- while ! mysqladmin ping --no-defaults --socket="${T}/mysql/mysql.sock" --silent ; do
+ while ! mysqladmin ping --socket="${T}/mysql/mysql.sock" --silent ; do
# 5 minutes should be more than enough
if [[ ${attempts} -gt 300 ]] ; then
die "mysqld not found after 300 seconds, aborting"
diff --git a/dev-db/mysql/Manifest b/dev-db/mysql/Manifest
index 5bc8c906c9ba..7ebcf1750085 100644
--- a/dev-db/mysql/Manifest
+++ b/dev-db/mysql/Manifest
@@ -4,10 +4,16 @@ AUX my.cnf-8.0.distro-server 1125 BLAKE2B f4d6941aad1fc29e81e6c805ac42f4c8d3c7bc
AUX my.cnf.distro-client 637 BLAKE2B b0812e0e03aa9a3b2e55e08b933a0b41b6afd95ded61f4d9d7c34a2d3810ec38520abd0d89e1c6565f61d4cd8a36d653f9f3199b3dd6a91345cdb5ff962685d8 SHA512 74bd1d9a58075d0a6195be1f94db310bcbe8da532b03844e6fa1ff84676e84843fc9adf9aed06b7e4db53c9aa24ef0885d96de0ccfe4c6ad98afe4c145d43f4f
AUX my.cnf.distro-server 994 BLAKE2B 41dceff58edf748f9f60ac3c0d1682d2fc2f026fc1fd14b4c2dea398814beda3c09aabea04dd3a9e145464524c629e7e69dc257d1245e0a46dd8584b7f685172 SHA512 cf172edc23d3dda49c21af6b8adef8aa13694d8ceecddf1d612d4ae34d00ba53c51ae4ae7ca4d11083eeacb5d862f59a855a9d80e9e448ab8bbf17f42aac2650
AUX mysql-8.0.36-boost-clang-fix.patch 4065 BLAKE2B aee8b1b021ac5a330c5d4bd3964fe4282bd5186b7f288a432ff7544a8fa81b54777d60ddfa33217c526ab79391ba858059d8bbed68da366cce16a5578ddee4e3 SHA512 b09614aa85c03eb36d20b0d7267bfae4f340016170729ef87044f74cabb42b6fc903b205d8ff0a5e2f39fa6845ad319472924c8c57f4419ab1a7042e62d7ef2d
+AUX mysql-8.0.37-fix-bundled-abseil.patch 1277 BLAKE2B c1dcfbd030121acd76295053cba0b768f725fb73a6be887bc154c21cd66363bd7462e82d07082a2302e252d28fa13559764485d01cbe9ae24414d246492275c1 SHA512 8b58d073acfcd123cf20ba2bb0016746201506e69f8eee4c0c797d9f3e18c3462187ac2ada7ab81ce2bbf84e2db737ec350904b3c5f069adefb80ad9d1847691
+AUX mysql-8.0.37-fix-bundled-boost.patch 1273 BLAKE2B 3b71908826496387e33c3de36c6f0f5b306908db32cb65ae2012f0854a69af15ce12e5687adcc9b7a6b08dd73cac0e08151e91e35f309872b09f44b55792759d SHA512 cf5c53c44c2c16f28055445af8770a87c9568c6cc6547d2c5a471aadf0f2d46c2addce024080e3a3cc6f52d7056061148b6f081950cc237100fb9794d90afdfe
+AUX mysql-8.0.40-fix-bundled-abseil-gcc15.patch 751 BLAKE2B c7a59b1ad345b6a6eae8ef601d58cb843b62a3104a1f3eddfd862fb1b8e4063834822f876325a4f083a3a97ff063cd5305f6c7eac5bff0a02fd31dfdd5ea4eb6 SHA512 6431d387be234ae06cc2bfcaa55feadd43d7aee8ad6fa46937837bd939c9152f5509981177c816a428e80d364424193bfee3d3af1482c1d964b20c0bc22370a1
DIST mysql-5.7.36-patches-01.tar.xz 6396 BLAKE2B ed9783f207d40fc220992c4193bdd8e96523f69414daa756f1f30306c1aedff9e96216ba2294a4c41eefbaf39c8bb37784bf1e7cce656c93f829c9cf0682fa6d SHA512 b0fbd41ebb2d32067e6c81707dffa91fece2d368f4b2fa47951492936509972d425b64d7613748c42b31cf9ba9dab697efeff70debe7268855a90d322d3f3158
DIST mysql-8.0.36-patches-01.tar.xz 10768 BLAKE2B d9b9c6f170e08eee249bbef77713116ad2f1bd05d638f908011c8be406548b9a87a5189d440147c76ac8aef8058d3fdf25d754191a52fef786812ddd6a2409dd SHA512 3f6af0f17e2ded2ec5cc9b0001062bda061e51a17f4f2d1f1fb604590de026a70bd21cecdff28e05adb1b89356fec1c1b33bc9c848e8a20186412d8547452305
+DIST mysql-8.0.40-patches-01.tar.xz 8356 BLAKE2B ee67f391d7d76e2a49d772a946a09849a4240bd31eacba9dde525d6a7c33e596667505e6f3c8757bf82f15194ce725587036c035d75a8d8baa7b37932148c29c SHA512 aacd9185fd911a2a33e7d81ba15ff5ca1a527738d59ef2b0c7ef94ef4b2798caeef6635bbe9618ca7c0517a7578fad159a6b7d04d3fcd69af0e3404456469fb4
DIST mysql-boost-5.7.41.tar.gz 53266489 BLAKE2B 7201d6c53cf711bd121464fc85260e1799f7195f45706b91f3cb8d605fe2bd2639d532b4045a336645a553d9b0b1131cc45140a19483902e5dc37d3e2479b6f5 SHA512 88e1cc4864616ed92880a3f02285763aac2ddfc1cdeeff07e1502c97bbdfd31c9ed9d02f8f6381a352857a85241e4e4eb6bc0d978e3928a68ef49362f670482a
DIST mysql-boost-8.0.37.tar.gz 445594692 BLAKE2B 105521985ec8c622a28b5e0f7f13e519b2d91af6ce7c2b483cf1c096aa79f156cc59eabb6281b485d6f558eb6e20a95d5edc349bbd72d1c4a2591eef59270f4c SHA512 4c6033d4f96990d3f324f0d5733273425ddf7cc11660e110e0dc848da6cfa47b7565c1eb0b5d1e08878a0ea2c7d1eb85b400ccca28e5b4383f7e9216ba3e1660
-EBUILD mysql-5.7.41.ebuild 38688 BLAKE2B 962c28d2f6ee89e005820d780c1e95676274f9bb2e800728844680489618363c5a75819362c168d8adb321a077b5ee054b19e901fde8a3e190e210efd5dce482 SHA512 46f86f07913896c824ba0c4c409f15a9bc60882ca310dfd175a611ca068900bf7ac52bca6053dbcf556e437549980de423fd42182bd6601bbf1ce52e9a1750dc
-EBUILD mysql-8.0.37.ebuild 41716 BLAKE2B 867dd5ab52a9e29d4e8f117744f636bfcff0587f26be08df5ef4c9e70b55256c4608c68feb6a7070e2d23e37c7b1e92ddc5337f1b1149452b2e8e267b31a8dbb SHA512 c7a7a26aa468683514dc52c914983f4273d6ab14b4bc487c9526eeececeaf34959756f4203ed47d318f6cf4028946cb6f3cdad8ddd77ae0af2658dd85300d481
+DIST mysql-boost-8.0.40.tar.gz 490502884 BLAKE2B 137a2060ede74449caf6a18dd1b54093668591a592eb0191b436aa289f2faae546eb9d4eaeeef17861a85f3eb34459997fe45c82b21ae07716913e2980c49e4b SHA512 fcece6e3c09dc4733767effb5c22a55e4add1c9f6b6b911e1eccdd0444f08dc5714b3c8b2a40c85a75a63ff117b6c9881904b6b4732b5ca9bef96de1cb2e284a
+EBUILD mysql-5.7.41.ebuild 38684 BLAKE2B 49823400f31fb95cd8d0c7cea72899f47c38aaa9b20ec5822c9d68d56d3a2c1afa9df1999619afa4b4e2ff2a3a152b4a76cafe6204f5ae01d6a65e9cf87d5ce2 SHA512 63d34831a768b338fd25806346fa6786cbe0074255f113f5c9f731b0eebb880b73996efb2a53d042d8d57590f93e1bd74e501b2cfb481a632e4ac23f6bca16f0
+EBUILD mysql-8.0.37.ebuild 41979 BLAKE2B df16fd4f3c8d052d936703a6917682ba0273509c6fa72a5b1194e15fcb52f718258485d08cd41fe22b6b8d033e520a6c988c951851409dada6aaf37f004fd572 SHA512 de864755fbbb756adb2cae3058a86ec718d42070495520531762843e0bcbcc98c96eeebea97839a55acffc161b951432fc862ac8bfd45aca5d64e0bb74c196b9
+EBUILD mysql-8.0.40.ebuild 42091 BLAKE2B 0170e7ee7058c591a5f45a0c59a028807c9a7d1c631229b9e61cbb71ac09580057fd06a6bbb3218d09b96dcc8af946e9fdc707f29f9791084704793de499eb9c SHA512 962ebbf903ace4b5ceaa86fa987a92de83f3542a822d0d40a674832026e478dcace3dc97a0207d618d8bfa2bba304ae7eecc905b7495673973b5188d13591eda
MISC metadata.xml 1353 BLAKE2B ec0454ffdcce75567e9817fa199f1e6ec1ac73520001c299b794cbfebcd42f9e5abfcf9e6faec47bd0b04f40b03846798f1735e1561c91e4e3c0df48627fe4da SHA512 d5f33d05fd1505d13afa2e968cbfcbe1c6ad6a581468608ed1fd88daf1dd17dd66fbc55b8b6eceb42e2d03bd4327985ff7432c668f983775b103e4375b4ad8c6
diff --git a/dev-db/mysql/files/mysql-8.0.37-fix-bundled-abseil.patch b/dev-db/mysql/files/mysql-8.0.37-fix-bundled-abseil.patch
new file mode 100644
index 000000000000..654b2bc21be6
--- /dev/null
+++ b/dev-db/mysql/files/mysql-8.0.37-fix-bundled-abseil.patch
@@ -0,0 +1,30 @@
+https://bugs.gentoo.org/935508
+
+Context:
+https://bugs.gentoo.org/934337
+https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112789
+
+--- mysql/extra/abseil/abseil-cpp-20230802.1/absl/numeric/internal/bits.h.bak
++++ mysql/extra/abseil/abseil-cpp-20230802.1/absl/numeric/internal/bits.h
+@@ -167,7 +167,9 @@ CountLeadingZeroes32(uint32_t x) {
+
+ ABSL_ATTRIBUTE_ALWAYS_INLINE ABSL_INTERNAL_CONSTEXPR_CLZ inline int
+ CountLeadingZeroes16(uint16_t x) {
+-#if ABSL_HAVE_BUILTIN(__builtin_clzs)
++#if ABSL_HAVE_BUILTIN(__builtin_clzg)
++ return x == 0 ? 16 : __builtin_clzg(x);
++#elif ABSL_HAVE_BUILTIN(__builtin_clzs)
+ static_assert(sizeof(unsigned short) == sizeof(x), // NOLINT(runtime/int)
+ "__builtin_clzs does not take 16-bit arg");
+ return x == 0 ? 16 : __builtin_clzs(x);
+@@ -303,7 +305,9 @@ CountTrailingZeroesNonzero64(uint64_t x) {
+
+ ABSL_ATTRIBUTE_ALWAYS_INLINE ABSL_INTERNAL_CONSTEXPR_CTZ inline int
+ CountTrailingZeroesNonzero16(uint16_t x) {
+-#if ABSL_HAVE_BUILTIN(__builtin_ctzs)
++#if ABSL_HAVE_BUILTIN(__builtin_ctzg)
++ return __builtin_ctzg(x);
++#elif ABSL_HAVE_BUILTIN(__builtin_ctzs)
+ static_assert(sizeof(unsigned short) == sizeof(x), // NOLINT(runtime/int)
+ "__builtin_ctzs does not take 16-bit arg");
+ return __builtin_ctzs(x);
diff --git a/dev-db/mysql/files/mysql-8.0.37-fix-bundled-boost.patch b/dev-db/mysql/files/mysql-8.0.37-fix-bundled-boost.patch
new file mode 100644
index 000000000000..58cf72f778fa
--- /dev/null
+++ b/dev-db/mysql/files/mysql-8.0.37-fix-bundled-boost.patch
@@ -0,0 +1,22 @@
+https://bugs.gentoo.org/947784
+https://github.com/boostorg/multiprecision/issues/419
+https://github.com/boostorg/multiprecision/commit/d1343f28dcbe25b100b082b34775bd92ead4602c
+
+The old version of Boost that MySQL vendors tries to use x86 intrinsics
+on PowerPC. Backport this patch for it to not do that.
+
+--- a/boost/boost_1_77_0/boost/multiprecision/cpp_int/intel_intrinsics.hpp
++++ b/boost/boost_1_77_0/boost/multiprecision/cpp_int/intel_intrinsics.hpp
+@@ -19,7 +19,11 @@
+ // If this is GCC/clang, then check that the actual intrinsic exists:
+ //
+ #if defined(__has_builtin) && defined(__GNUC__)
+-#if !__has_builtin(__builtin_ia32_addcarryx_u64) && defined(BOOST_MP_HAS_IMMINTRIN_H) && !(defined(BOOST_GCC) && (__GNUC__ >= 9))
++#if !__has_builtin(__builtin_ia32_addcarryx_u64) && defined(BOOST_MP_HAS_IMMINTRIN_H) \
++ && !(defined(BOOST_GCC) && (__GNUC__ >= 9) \
++ && (defined(__amd64__) || defined(__amd64) || defined(__x86_64__) || defined(__x86_64)\
++ || defined(i386) || defined(__i386) || defined(__i386__) || defined(_M_AMD64) \
++ || defined(_M_X64) || defined(__amd64__) || defined(_M_X64)))
+ #undef BOOST_MP_HAS_IMMINTRIN_H
+ #endif
+ #elif defined(BOOST_MP_HAS_IMMINTRIN_H) && defined(__GNUC__) && !(defined(BOOST_GCC) && (__GNUC__ >= 9))
diff --git a/dev-db/mysql/files/mysql-8.0.40-fix-bundled-abseil-gcc15.patch b/dev-db/mysql/files/mysql-8.0.40-fix-bundled-abseil-gcc15.patch
new file mode 100644
index 000000000000..b8b0138f1808
--- /dev/null
+++ b/dev-db/mysql/files/mysql-8.0.40-fix-bundled-abseil-gcc15.patch
@@ -0,0 +1,19 @@
+https://github.com/abseil/abseil-cpp/pull/1739
+
+From https://github.com/abseil/abseil-cpp/commit/809e5de7b92950849289236a5a09e9cb4f32c7b9 Mon Sep 17 00:00:00 2001
+From: Christopher Fore <csfore@posteo.net>
+Date: Mon, 5 Aug 2024 12:09:18 -0700
+Subject: [PATCH] PR #1739: container/internal: Explicitly include <cstdint>
+
+GCC 15 will no longer include <cstdint> by default, resulting in build failures in projects that do not explicitly include it.
+
+--- a/extra/abseil/abseil-cpp-20230802.1/absl/container/internal/container_memory.h
++++ b/extra/abseil/abseil-cpp-20230802.1/absl/container/internal/container_memory.h
+@@ -17,6 +17,7 @@
+
+ #include <cassert>
+ #include <cstddef>
++#include <cstdint>
+ #include <cstring>
+ #include <memory>
+ #include <new>
diff --git a/dev-db/mysql/mysql-5.7.41.ebuild b/dev-db/mysql/mysql-5.7.41.ebuild
index 1e3a9dce41a2..51a92cbfc9de 100644
--- a/dev-db/mysql/mysql-5.7.41.ebuild
+++ b/dev-db/mysql/mysql-5.7.41.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2024 Gentoo Authors
+# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="7"
@@ -814,7 +814,7 @@ pkg_config() {
local n_X
let n_X=${#template}-${#template_wo_X}
if [[ ${n_X} -lt 3 ]] ; then
- echo "${FUNCNAME[0]}: too few X's in template ‘${template}’" >&2
+ echo "${FUNCNAME[0]}: too few X's in template '${template}'" >&2
return
fi
diff --git a/dev-db/mysql/mysql-8.0.37.ebuild b/dev-db/mysql/mysql-8.0.37.ebuild
index e96f1f6700c5..8964ad335136 100644
--- a/dev-db/mysql/mysql-8.0.37.ebuild
+++ b/dev-db/mysql/mysql-8.0.37.ebuild
@@ -94,6 +94,10 @@ PATCHES=(
"${WORKDIR}"/mysql-patches
# Needed due to bundled boost-1.77, this fix is included in boost-1.81
"${FILESDIR}"/mysql-8.0.36-boost-clang-fix.patch
+ # Needed due to bundled boost-1.77, this fix is included in boost-1.79
+ "${FILESDIR}"/mysql-8.0.37-fix-bundled-boost.patch
+ # Needed due to bundled abseil-cpp-20230802, this fix is included in abseil-cpp-20240722
+ "${FILESDIR}"/mysql-8.0.37-fix-bundled-abseil.patch
)
mysql_init_vars() {
@@ -728,7 +732,7 @@ pkg_config() {
local n_X
let n_X=${#template}-${#template_wo_X}
if [[ ${n_X} -lt 3 ]] ; then
- echo "${FUNCNAME[0]}: too few X's in template ‘${template}’" >&2
+ echo "${FUNCNAME[0]}: too few X's in template '${template}'" >&2
return
fi
diff --git a/dev-db/mysql/mysql-8.0.40.ebuild b/dev-db/mysql/mysql-8.0.40.ebuild
new file mode 100644
index 000000000000..eeffe2b39ec6
--- /dev/null
+++ b/dev-db/mysql/mysql-8.0.40.ebuild
@@ -0,0 +1,1284 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit check-reqs cmake edo flag-o-matic linux-info multiprocessing prefix toolchain-funcs
+
+MY_PV="${PV//_pre*}"
+MY_P="${PN}-${MY_PV}"
+
+# Patch version
+PATCH_SET=( https://github.com/parona-source/mysql-server/releases/download/mysql-8.0.40-patches-01/mysql-8.0.40-patches-01.tar.xz )
+
+DESCRIPTION="A fast, multi-threaded, multi-user SQL database server"
+HOMEPAGE="https://www.mysql.com/"
+# https://dev.mysql.com/downloads/mysql/
+SRC_URI="https://dev.mysql.com/get/Downloads/MySQL-$(ver_cut 1-2)/mysql-boost-${MY_PV}.tar.gz"
+# https://downloads.mysql.com/archives/community/
+SRC_URI+=" https://cdn.mysql.com/archives/mysql-$(ver_cut 1-2)/mysql-boost-${MY_PV}.tar.gz"
+SRC_URI+=" ${PATCH_SET[@]}"
+# Shorten the path because the socket path length must be shorter than 107 chars
+# and we will run a mysql server during test phase
+S="${WORKDIR}/mysql"
+
+LICENSE="GPL-2"
+SLOT="8.0"
+# -ppc for bug #761715
+KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~mips -ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris"
+IUSE="cjk cracklib debug jemalloc latin1 numa +perl profiling router selinux +server tcmalloc test"
+RESTRICT="!test? ( test )"
+
+REQUIRED_USE="?? ( tcmalloc jemalloc )
+ cjk? ( server )
+ jemalloc? ( server )
+ numa? ( server )
+ profiling? ( server )
+ router? ( server )
+ tcmalloc? ( server )"
+
+# Be warned, *DEPEND are version-dependent
+# These are used for both runtime and compiletime
+COMMON_DEPEND="
+ >=app-arch/lz4-1.9.4:=
+ >=app-arch/zstd-1.2.0:=
+ >=dev-libs/openssl-1.0.0:=
+ sys-libs/ncurses:=
+ >=sys-libs/zlib-1.2.13:=
+ server? (
+ dev-libs/icu:=
+ dev-libs/libevent:=[ssl,threads(+)]
+ net-libs/libtirpc:=
+ cjk? ( app-text/mecab )
+ jemalloc? ( dev-libs/jemalloc:= )
+ kernel_linux? (
+ dev-libs/libaio
+ sys-process/procps
+ )
+ numa? ( sys-process/numactl )
+ tcmalloc? ( dev-util/google-perftools:= )
+ )
+"
+
+# https://bugs.gentoo.org/623962
+# tests set TZ for tests leading to failures on musl if sys-libs/timezone-data isnt installed
+DEPEND="
+ ${COMMON_DEPEND}
+ app-alternatives/yacc
+ server? ( net-libs/rpcsvc-proto )
+ test? (
+ acct-group/mysql acct-user/mysql
+ dev-perl/Expect
+ dev-perl/JSON
+ sys-libs/timezone-data
+ )
+"
+RDEPEND="
+ ${COMMON_DEPEND}
+ !dev-db/mariadb
+ !dev-db/mariadb-galera
+ !dev-db/percona-server
+ !dev-db/mysql-cluster
+ !dev-db/mysql:0
+ !dev-db/mysql:5.7
+ selinux? ( sec-policy/selinux-mysql )
+ !prefix? (
+ acct-group/mysql acct-user/mysql
+ dev-db/mysql-init-scripts
+ )
+"
+# For other stuff to bring us in
+# dev-perl/DBD-mysql is needed by some scripts installed by MySQL
+PDEPEND="perl? ( >=dev-perl/DBD-mysql-2.9004 )"
+
+PATCHES=(
+ "${WORKDIR}"/mysql-patches
+ # Needed due to bundled boost-1.77, this fix is included in boost-1.81
+ "${FILESDIR}"/mysql-8.0.36-boost-clang-fix.patch
+ # Needed due to bundled boost-1.77, this fix is included in boost-1.79
+ "${FILESDIR}"/mysql-8.0.37-fix-bundled-boost.patch
+ # Needed due to bundled abseil-cpp-20230802, this fix is included in abseil-cpp-20240722
+ "${FILESDIR}"/mysql-8.0.37-fix-bundled-abseil.patch
+ # Needed due to bundled abseil-cpp-20230802, this fix is in no release as of 2025-01-09
+ "${FILESDIR}"/mysql-8.0.40-fix-bundled-abseil-gcc15.patch
+)
+
+mysql_init_vars() {
+ : ${MY_SHAREDSTATEDIR="${EPREFIX}/usr/share/mysql"}
+ : ${MY_SYSCONFDIR="${EPREFIX}/etc/mysql"}
+ : ${MY_LOCALSTATEDIR="${EPREFIX}/var/lib/mysql"}
+ : ${MY_LOGDIR="${EPREFIX}/var/log/mysql"}
+ MY_DATADIR="${MY_LOCALSTATEDIR}"
+
+ export MY_SHAREDSTATEDIR MY_SYSCONFDIR
+ export MY_LOCALSTATEDIR MY_LOGDIR
+ export MY_DATADIR
+}
+
+pkg_pretend() {
+ if [[ ${MERGE_TYPE} != binary ]] ; then
+ if use server ; then
+ CHECKREQS_DISK_BUILD="3G"
+
+ if has test ${FEATURES} ; then
+ CHECKREQS_DISK_BUILD="10G"
+
+ if use elibc_musl; then
+ # <parona@protonmail.com> i've seen it take 17GB on musl with FEATURES="test" USE="perl server"
+ CHECKREQS_DISK_BUILD="18G"
+ fi
+ fi
+
+ check-reqs_pkg_pretend
+ fi
+ fi
+}
+
+pkg_setup() {
+ if [[ ${MERGE_TYPE} != binary ]] ; then
+ CHECKREQS_DISK_BUILD="3G"
+
+ if has test ${FEATURES} ; then
+ CHECKREQS_DISK_BUILD="10G"
+
+ if use elibc_musl; then
+ # <parona@protonmail.com> i've seen it take 17GB on musl with FEATURES="test" USE="perl server"
+ CHECKREQS_DISK_BUILD="18G"
+ fi
+
+ # Bug #213475 - MySQL _will_ object strenuously if your machine is named
+ # localhost. Also causes weird failures.
+ [[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
+
+ if ! has userpriv ${FEATURES} ; then
+ die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
+ fi
+
+ local aio_max_nr=$(sysctl -n fs.aio-max-nr 2>/dev/null)
+ if [[ -z "${aio_max_nr}" || ${aio_max_nr} -lt 250000 ]] ; then
+ die "FEATURES=test will require fs.aio-max-nr=250000 at minimum!"
+ fi
+
+ if use latin1 ; then
+ # Upstream only supports tests with default charset
+ die "Testing with USE=latin1 is not supported."
+ fi
+ fi
+
+ if use kernel_linux && use numa ; then
+ linux-info_get_any_version
+
+ local CONFIG_CHECK="~NUMA"
+
+ local WARNING_NUMA="This package expects NUMA support in kernel which this system does not have at the moment;"
+ WARNING_NUMA+=" Either expect runtime errors, enable NUMA support in kernel or rebuild the package without NUMA support"
+
+ check_extra_config
+ fi
+
+ use server && check-reqs_pkg_setup
+ fi
+}
+
+src_unpack() {
+ unpack ${A}
+
+ mv -f "${WORKDIR}/${MY_P}" "${S}" || die
+}
+
+src_prepare() {
+ # Avoid rpm call which would trigger sandbox, #692368
+ sed -i \
+ -e 's/MY_RPM rpm/MY_RPM rpmNOTEXISTENT/' \
+ CMakeLists.txt || die
+
+ # Remove the centos and rhel selinux policies to support mysqld_safe under SELinux
+ if [[ -d "${S}/support-files/SELinux" ]] ; then
+ echo > "${S}/support-files/SELinux/CMakeLists.txt" || die
+ fi
+
+ # Remove man pages for client-lib tools we don't install
+ rm \
+ man/my_print_defaults.1 \
+ man/perror.1 \
+ man/zlib_decompress.1 \
+ || die
+
+ cmake_src_prepare
+}
+
+src_configure() {
+ # Bug #114895, bug #110149
+ filter-flags "-O" "-O[01]"
+
+ # Code requires C++17 due to https://github.com/mysql/mysql-server/commit/236ab55bedd8c9eacd80766d85edde2a8afacd08
+ append-cxxflags -std=c++17
+
+ local mycmakeargs=(
+ -Wno-dev # less noise
+
+ # Building everything as shared breaks upstream assumptions.
+ # For example bundled abseil is excpected to be static and is therefore not installed.
+ # Breaking the assumption leading the mysql to being built against bundled abseil,
+ # but then dynamically linked against system abseil once installed.
+ -DBUILD_SHARED_LIBS=OFF
+
+ -DMYSQL_DATADIR="${EPREFIX}/var/lib/mysql"
+ -DSYSCONFDIR="${EPREFIX}/etc/mysql"
+
+ -DINSTALL_BINDIR=bin
+ -DINSTALL_DOCDIR=share/doc/${PF}
+ -DINSTALL_DOCREADMEDIR=share/doc/${PF}
+ -DINSTALL_INCLUDEDIR=include/mysql
+ -DINSTALL_INFODIR=share/info
+ -DINSTALL_LIBDIR=$(get_libdir)
+ -DINSTALL_MANDIR=share/man
+ -DINSTALL_MYSQLSHAREDIR=share/mysql
+ -DINSTALL_PLUGINDIR=$(get_libdir)/mysql/plugin
+ -DINSTALL_MYSQLDATADIR="${EPREFIX}/var/lib/mysql"
+ -DINSTALL_SBINDIR=sbin
+ -DINSTALL_SUPPORTFILESDIR="${EPREFIX}/usr/share/mysql"
+
+ -DROUTER_INSTALL_LOGROTATEDIR="${EPREFIX}/etc/logrotate.d"
+ -DROUTER_INSTALL_DOCDIR="share/doc/${PF}"
+
+ -DCOMPILATION_COMMENT="Gentoo Linux ${PF}"
+ -DWITH_UNIT_TESTS=$(usex test ON OFF)
+
+ # Enables -Werror
+ -DMYSQL_MAINTAINER_MODE=OFF
+
+ # Causes issues on musl bug #922808
+ -DWITH_BUILD_ID=OFF
+
+ # Using bundled editline to get CTRL+C working
+ -DWITH_EDITLINE=bundled
+ -DWITH_ZLIB=system
+ -DWITH_SSL=system
+ -DWITH_LIBWRAP=0
+ -DENABLED_LOCAL_INFILE=1
+ -DMYSQL_UNIX_ADDR="${EPREFIX}/var/run/mysqld/mysqld.sock"
+ -DWITH_DEFAULT_COMPILER_OPTIONS=0
+ -DCMAKE_POSITION_INDEPENDENT_CODE=ON
+
+ -DWITH_CURL=system
+ -DWITH_BOOST="${S}/boost"
+ -DWITH_ROUTER=$(usex router ON OFF)
+ )
+
+ if use debug; then
+ # Debug build type used extensively to add preprocessor definitions
+ local -x CMAKE_BUILD_TYPE="Debug"
+ else
+ # debug hack wrt #497532
+ mycmakeargs+=(
+ -DCMAKE_C_FLAGS_RELWITHDEBINFO="$(usev !debug '-DNDEBUG' )"
+ -DCMAKE_CXX_FLAGS_RELWITHDEBINFO="$(usev !debug '-DNDEBUG' )"
+ )
+ fi
+
+ if tc-is-lto ; then
+ mycmakeargs+=( -DWITH_LTO=ON )
+ else
+ mycmakeargs+=( -DWITH_LTO=OFF )
+ fi
+
+ if use test ; then
+ mycmakeargs+=( -DINSTALL_MYSQLTESTDIR=share/mysql/mysql-test )
+ else
+ mycmakeargs+=( -DINSTALL_MYSQLTESTDIR='' )
+ fi
+
+ mycmakeargs+=( -DWITHOUT_CLIENTLIBS=YES )
+
+ mycmakeargs+=(
+ -DWITH_ICU=system
+ -DWITH_LZ4=system
+ # Our dev-libs/rapidjson doesn't carry necessary fixes for std::regex
+ -DWITH_RAPIDJSON=bundled
+ -DWITH_ZSTD=system
+ )
+
+ if [[ -n "${MYSQL_DEFAULT_CHARSET}" && -n "${MYSQL_DEFAULT_COLLATION}" ]] ; then
+ ewarn "You are using a custom charset of ${MYSQL_DEFAULT_CHARSET}"
+ ewarn "and a collation of ${MYSQL_DEFAULT_COLLATION}."
+ ewarn "You MUST file bugs without these variables set."
+ ewarn "Tests will probably fail!"
+
+ mycmakeargs+=(
+ -DDEFAULT_CHARSET=${MYSQL_DEFAULT_CHARSET}
+ -DDEFAULT_COLLATION=${MYSQL_DEFAULT_COLLATION}
+ )
+ elif use latin1 ; then
+ mycmakeargs+=(
+ -DDEFAULT_CHARSET=latin1
+ -DDEFAULT_COLLATION=latin1_swedish_ci
+ )
+ else
+ mycmakeargs+=(
+ -DDEFAULT_CHARSET=utf8mb4
+ -DDEFAULT_COLLATION=utf8mb4_0900_ai_ci
+ )
+ fi
+
+ if use server ; then
+ mycmakeargs+=(
+ -DWITH_EXTRA_CHARSETS=all
+ -DWITH_DEBUG=$(usex debug)
+ -DWITH_MECAB=$(usex cjk system OFF)
+ -DWITH_LIBEVENT=system
+ # Cannot handle protobuf >23 bug #912797
+ # 05/06/2024: protobuf has been updated,
+ # but it cannot handle abseil when building against system
+ # Currently bundles protobuf-25.1
+ -DWITH_PROTOBUF=bundled
+ -DWITH_NUMA=$(usex numa ON OFF)
+ )
+
+ if use jemalloc ; then
+ mycmakeargs+=( -DWITH_JEMALLOC=ON )
+ elif use tcmalloc ; then
+ mycmakeargs+=( -DWITH_TCMALLOC=ON )
+ fi
+
+ if use profiling ; then
+ # Setting to OFF doesn't work: Once set, profiling options will be added
+ # to `mysqld --help` output via sql/sys_vars.cc causing
+ # "main.mysqld--help-notwin" test to fail
+ mycmakeargs+=( -DENABLED_PROFILING=ON )
+ fi
+
+ # Storage engines
+ mycmakeargs+=(
+ -DWITH_EXAMPLE_STORAGE_ENGINE=0
+ -DWITH_ARCHIVE_STORAGE_ENGINE=1
+ -DWITH_BLACKHOLE_STORAGE_ENGINE=1
+ -DWITH_CSV_STORAGE_ENGINE=1
+ -DWITH_FEDERATED_STORAGE_ENGINE=1
+ -DWITH_HEAP_STORAGE_ENGINE=1
+ -DWITH_INNOBASE_STORAGE_ENGINE=1
+ -DWITH_INNODB_MEMCACHED=0
+ -DWITH_MYISAMMRG_STORAGE_ENGINE=1
+ -DWITH_MYISAM_STORAGE_ENGINE=1
+ )
+ else
+ mycmakeargs+=(
+ -DWITHOUT_SERVER=1
+ -DWITH_SYSTEMD=no
+ )
+ fi
+
+ cmake_src_configure
+}
+
+# Official test instructions:
+# ulimit -n 16500 && USE='perl server' FEATURES='test userpriv' \
+# ebuild mysql-X.X.XX.ebuild digest clean test install
+src_test() {
+ _disable_test() {
+ local rawtestname bug reason
+ rawtestname="${1}" ; shift
+ bug="${1}" ; shift
+ reason="${@}"
+
+ ewarn "test '${rawtestname}' disabled: '${reason}' (BUG#${bug})"
+ echo "${rawtestname} : BUG#${bug} ${reason}" >> "${T}/disabled.def"
+ }
+
+ local TESTDIR="${BUILD_DIR}/mysql-test"
+ local retstatus_tests
+
+ einfo "Official test instructions:"
+ einfo "ulimit -n 16500 && USE='perl server' FEATURES='test userpriv' ebuild ..."
+
+ if ! use server ; then
+ ewarn "Skipping server tests due to minimal build!"
+ return 0
+ fi
+
+ # Ensure that parallel runs don't die
+ local -x MTR_BUILD_THREAD="$((${RANDOM} % 100))"
+
+ local -x MTR_PARALLEL=${MTR_PARALLEL:-$(makeopts_jobs)}
+ einfo "MTR_PARALLEL is set to '${MTR_PARALLEL}'"
+
+ # Disable unit tests, run them separately with eclass defaults
+ local -x MTR_UNIT_TESTS=0
+
+ # Increase test timeouts
+ # bug #923649
+ # https://github.com/gentoo/gentoo/pull/35002#issuecomment-1926101030
+ local -x MTR_SUITE_TIMEOUT=$(( 60 * 40 )) # minutes
+ local -x MTR_TESTCASE_TIMEOUT=60 # minutes
+
+ # Include config for tests, this is for scenarios where mysql wasn't installed previously or if the
+ # configuration was from an older version.
+ sed \
+ -e "s/@GENTOO_PORTAGE_EPREFIX@/${EPREFIX}/" \
+ -e "s/@DATADIR@/${MY_DATADIR}/" \
+ "${FILESDIR}"/my.cnf-8.0.distro-client \
+ "${FILESDIR}"/my.cnf-8.0.distro-server \
+ > "${T}"/my.cnf || die
+ local -X PATH_CONFIG_FILE="${T}/my.cnf"
+
+ # Create directories because mysqladmin might run out of order
+ mkdir -p "${T}"/var-tests{,/log} || die
+
+ # Run mysql tests
+ pushd "${TESTDIR}" &>/dev/null || die
+
+ touch "${T}/disabled.def" || die
+
+ local -a disabled_tests=(
+ "auth_sec.atomic_rename_user;103512;Depends on user running test"
+ "auth_sec.keyring_file_data_qa;0;Won't work with user privileges"
+ "auth_sec.openssl_without_fips;94718;Known test failure"
+
+ "gis.geometry_class_attri_prop;5452;Known rounding error with latest AMD processors (PS)"
+ "gis.geometry_property_function_issimple;5452;Known rounding error with latest AMD processors (PS)"
+ "gis.gis_bugs_crashes;5452;Known rounding error with latest AMD processors (PS)"
+ "gis.spatial_analysis_functions_buffer;5452;Known rounding error with latest AMD processors (PS)"
+ "gis.spatial_analysis_functions_centroid;5452;Known rounding error with latest AMD processors (PS)"
+ "gis.spatial_analysis_functions_distance;5452;Known rounding error with latest AMD processors (PS)"
+ "gis.spatial_op_testingfunc_mix;5452;Known rounding error with latest AMD processors (PS)"
+ "gis.spatial_operators_intersection;5452;Known rounding error with latest AMD processors (PS)"
+ "gis.spatial_utility_function_distance_sphere;5452;Known rounding error with latest AMD processors (PS)"
+ "gis.spatial_utility_function_simplify;5452;Known rounding error with latest AMD processors (PS)"
+ "gis.st_symdifference;5452;Known rounding error with latest AMD processors (PS)"
+
+ "innodb.alter_kill;0;Known test failure -- no upstream bug yet"
+
+ "main.derived_limit;0;Known rounding error with latest AMD processors -- no upstream bug yet"
+ "main.explain_tree;0;Known rounding error with latest AMD processors -- no upstream bug yet"
+ "main.gis-precise;0;Known rounding error with latest AMD processors -- no upstream bug yet"
+ "main.mysql_load_data_local_dir;0;Known test failure -- no upstream bug yet"
+ "main.select_icp_mrr;0;Known rounding error with latest AMD processors -- no upstream bug yet"
+ "main.subquery_bugs;0;Known rounding error with latest AMD processors -- no upstream bug yet"
+ "main.subquery_sj_dupsweed;0;Known rounding error with latest AMD processors -- no upstream bug yet"
+ "main.subquery_sj_dupsweed_bka;0;Known rounding error with latest AMD processors -- no upstream bug yet"
+ "main.subquery_sj_dupsweed_bka_nobnl;0;Known rounding error with latest AMD processors -- no upstream bug yet"
+ "main.subquery_sj_firstmatch;0;Known rounding error with latest AMD processors -- no upstream bug yet"
+ "main.subquery_sj_firstmatch_bka;0;Known rounding error with latest AMD processors -- no upstream bug yet"
+ "main.subquery_sj_firstmatch_bka_nobnl;0;Known rounding error with latest AMD processors -- no upstream bug yet"
+ "main.subquery_sj_mat_bka_nobnl;0;Known rounding error with latest AMD processors -- no upstream bug yet"
+ "main.subquery_sj_all_bka_nobnl;0;Known rounding error with latest AMD processors -- no upstream bug yet"
+ "main.window_std_var;0;Known rounding error with latest AMD processors -- no upstream bug yet"
+ "main.window_std_var_optimized;0;Known rounding error with latest AMD processors -- no upstream bug yet"
+ "main.with_recursive;0;Known rounding error with latest AMD processors -- no upstream bug yet"
+ "perfschema.statement_digest_query_sample;0;Test will fail on slow hardware"
+
+ "rpl.rpl_innodb_info_tbl_slave_tmp_tbl_mismatch;0;Unstable test"
+ "rpl_gtid.rpl_multi_source_mtr_includes;97844;Unstable test"
+ "main.partition_datatype;0;Unstable test"
+
+ "sys_vars.myisam_data_pointer_size_func;87935;Test will fail on slow hardware"
+
+ "x.connection;0;Known failure - no upstream bug yet"
+ "main.slow_log;0;Known failure - no upstream bug yet"
+
+ "sys_vars.build_id_basic;0;Requires -DWITH_BUILD_ID=ON"
+ )
+
+ if ! hash zip 1>/dev/null 2>&1 ; then
+ # No need to force dep app-arch/zip for one test
+ disabled_tests+=(
+ "innodb.discarded_partition_create;0;Requires app-arch/zip"
+ "innodb.partition_upgrade_create;0;Requires app-arch/zip"
+ )
+ fi
+
+ if has_version ">=dev-libs/openssl-3.2" ; then
+ # https://bugs.mysql.com/bug.php?id=113258
+ # Fails still with 8.0.37
+ disabled_tests+=(
+ "rpl.rpl_tlsv13;0;CCM8 ciphers have a lower security level with OpenSSL 3.2"
+ "auth_sec.wl15800_ciphers_tlsv13;0;CCM8 ciphers have a lower security level with OpenSSL 3.2"
+ )
+ fi
+
+ if use debug; then
+ disabled_tests+=(
+ "innodb.dblwr_unencrypt;0;Known test failure -- no upstream bug yet"
+ )
+ fi
+
+ local test_infos_str test_infos_arr
+ for test_infos_str in "${disabled_tests[@]}" ; do
+ IFS=';' read -r -a test_infos_arr <<< "${test_infos_str}"
+
+ if [[ ${#test_infos_arr[@]} != 3 ]] ; then
+ die "Invalid test data set, not matching format: ${test_infos_str}"
+ fi
+
+ _disable_test "${test_infos_arr[0]}" "${test_infos_arr[1]}" "${test_infos_arr[2]}"
+ done
+ unset test_infos_str test_infos_arr
+
+ local -a CMAKE_SKIP_TESTS=(
+ # timing test, can be unreliable
+ "routertest_harness_net_ts_timer"
+
+ # Could not get local host address: Name or service not known(errno: -2)
+ "routertest_component_bootstrap"
+ "routertest_component_bootstrap_account"
+ "routertest_component_bootstrap_clusterset"
+ "routertest_component_config_overwrites"
+ "routertest_component_rest_api_enable"
+ "routertest_component_routing"
+ "routertest_component_sd_notify"
+ "routertest_component_state_file"
+ "routertest_integration_routing_direct"
+ "routertest_integration_routing_reuse"
+ "routertest_integration_routing_sharing"
+ "routertest_integration_routing_sharing_constrained_pools"
+ "routertest_integration_routing_sharing_restart"
+
+ # TODO: ???
+ "pfs_host-oom"
+ "pfs_user-oom"
+ "pfs"
+ )
+
+ if use debug; then
+ CMAKE_SKIP_TESTS+=(
+ # binary_log::transaction::compression::Payload_event_buffer_istream::~Payload_event_buffer_istream(): Assertion `!m_outstanding_error' failed.
+ "payload_event_buffer_istream"
+ )
+ fi
+
+ # Try to increase file limits to increase test coverage
+ if ! ulimit -n 16500 1>/dev/null 2>&1 ; then
+ # Upper limit comes from parts.partition_* tests
+ ewarn "For maximum test coverage, please raise open file limit to 16500 (ulimit -n 16500) before calling the package manager."
+
+ if ! ulimit -n 4162 1>/dev/null 2>&1 ; then
+ # Medium limit comes from '[Warning] Buffered warning: Could not increase number of max_open_files to more than 3000 (request: 4162)'
+ ewarn "For medium test coverage please raise open file limit to 4162 (ulimit -n 4162) before calling the package manager."
+
+ if ! ulimit -n 3000 1>/dev/null 2>&1 ; then
+ ewarn "For minimum test coverage, please raise open file limit to 3000 (ulimit -n 3000) before calling the package manager."
+ else
+ einfo "Will run test suite with open file limit set to 3000 (minimum test coverage)."
+ fi
+ else
+ einfo "Will run test suite with open file limit set to 4162 (medium test coverage)."
+ fi
+ else
+ einfo "Will run test suite with open file limit set to 16500 (best test coverage)."
+ fi
+
+ # run mysql-test tests
+ # Enable force restart to ensure success when tests don't cleanup sufficiently.
+ # Anything touching gtid_executed is negatively affected if you have unlucky ordering
+ nonfatal edo perl mysql-test-run.pl \
+ --force --force-restart \
+ --vardir="${T}/var-tests" --tmpdir="${T}/tmp-tests" \
+ --skip-test=tokudb --skip-test-list="${T}/disabled.def" \
+ --retry-failure=2 --max-test-fail=0
+ retstatus_tests=$?
+
+ popd &>/dev/null || die
+
+ # Cleanup is important for these testcases.
+ pkill -9 -f "${S}/ndb" 2>/dev/null
+ pkill -9 -f "${S}/sql" 2>/dev/null
+
+ local failures=""
+ [[ ${retstatus_tests} -eq 0 ]] || failures="${failures} tests"
+
+ # bug #823656
+ cmake_src_test --test-command "--gtest_death_test_style=threadsafe"
+
+ [[ -z "${failures}" ]] || die "Test failures: ${failures}"
+ einfo "Tests successfully completed"
+}
+
+src_install() {
+ cmake_src_install
+
+ # Make sure the vars are correctly initialized
+ mysql_init_vars
+
+ # Convenience links
+ einfo "Making Convenience links for mysqlcheck multi-call binary"
+ dosym "mysqlcheck" "/usr/bin/mysqlanalyze"
+ dosym "mysqlcheck" "/usr/bin/mysqlrepair"
+ dosym "mysqlcheck" "/usr/bin/mysqloptimize"
+
+ # INSTALL_LAYOUT=STANDALONE causes cmake to create a /usr/data dir
+ if [[ -d "${ED}/usr/data" ]] ; then
+ rm -Rf "${ED}/usr/data" || die
+ fi
+
+ # Unless they explicitly specific USE=test, then do not install the
+ # testsuite. It DOES have a use to be installed, esp. when you want to do a
+ # validation of your database configuration after tuning it.
+ if ! use test ; then
+ rm -rf "${ED}/${MY_SHAREDSTATEDIR#${EPREFIX}}/mysql-test"
+ fi
+
+ # Configuration stuff
+ einfo "Building default configuration ..."
+ insinto "${MY_SYSCONFDIR#${EPREFIX}}"
+ [[ -f "${S}/scripts/mysqlaccess.conf" ]] && doins "${S}"/scripts/mysqlaccess.conf
+ cp "${FILESDIR}/my.cnf-5.7" "${TMPDIR}/my.cnf" || die
+ eprefixify "${TMPDIR}/my.cnf"
+ doins "${TMPDIR}/my.cnf"
+ insinto "${MY_SYSCONFDIR#${EPREFIX}}/mysql.d"
+ cp "${FILESDIR}/my.cnf-8.0.distro-client" "${TMPDIR}/50-distro-client.cnf" || die
+ eprefixify "${TMPDIR}/50-distro-client.cnf"
+ doins "${TMPDIR}/50-distro-client.cnf"
+
+ mycnf_src="my.cnf-8.0.distro-server"
+ sed -e "s!@DATADIR@!${MY_DATADIR}!g" \
+ "${FILESDIR}/${mycnf_src}" \
+ > "${TMPDIR}/my.cnf.ok" || die
+
+ if use prefix ; then
+ sed -i -r -e '/^user[[:space:]]*=[[:space:]]*mysql$/d' \
+ "${TMPDIR}/my.cnf.ok" || die
+ fi
+
+ if use latin1 ; then
+ sed -i \
+ -e "/character-set/s|utf8mb4|latin1|g" \
+ "${TMPDIR}/my.cnf.ok" || die
+ fi
+
+ eprefixify "${TMPDIR}/my.cnf.ok"
+
+ newins "${TMPDIR}/my.cnf.ok" 50-distro-server.cnf
+
+ #Remove mytop if perl is not selected
+ [[ -e "${ED}/usr/bin/mytop" ]] && ! use perl && rm -f "${ED}/usr/bin/mytop"
+
+ if use router ; then
+ rm -rf \
+ "${ED}/usr/LICENSE.router" \
+ "${ED}/usr/README.router" \
+ "${ED}/usr/run" \
+ "${ED}/usr/var" \
+ || die
+ fi
+
+ # Kill old libmysqclient_r symlinks if they exist. Time to fix what depends on them.
+ find "${D}" -name 'libmysqlclient_r.*' -type l -delete || die
+}
+
+pkg_postinst() {
+ # Make sure the vars are correctly initialized
+ mysql_init_vars
+
+ # Create log directory securely if it does not exist
+ # NOTE: $MY_LOGDIR contains $EPREFIX by default
+ [[ -d "${MY_LOGDIR}" ]] || install -d -m0750 -o mysql -g mysql "${MY_LOGDIR}"
+
+ # Note about configuration change
+ einfo
+ elog "This version of ${PN} reorganizes the configuration from a single my.cnf"
+ elog "to several files in /etc/mysql/mysql.d."
+ elog "Please backup any changes you made to /etc/mysql/my.cnf"
+ elog "and add them as a new file under /etc/mysql/mysql.d with a .cnf extension."
+ elog "You may have as many files as needed and they are read alphabetically."
+ elog "Be sure the options have the appropriate section headers, i.e. [mysqld]."
+ einfo
+
+ if [[ -z "${REPLACING_VERSIONS}" ]] ; then
+ einfo
+ elog "You might want to run:"
+ elog " \"emerge --config =${CATEGORY}/${PF}\""
+ elog "if this is a new install."
+ einfo
+ else
+ einfo
+ elog "Upgrade process for ${PN}-8.x has changed. Please read"
+ elog "https://dev.mysql.com/doc/refman/8.0/en/upgrade-binary-package.html"
+ einfo
+ fi
+}
+
+pkg_config() {
+ _getoptval() {
+ local section="$1"
+ local flag="--${2}="
+ local extra_options="${3}"
+ local cmd=(
+ "${my_print_defaults_binary}"
+ "${extra_options}"
+ "${section}"
+ )
+ local results=( $(eval "${cmd[@]}" 2>/dev/null | sed -n "/^${flag}/s,${flag},,gp") )
+
+ if [[ ${#results[@]} -gt 0 ]] ; then
+ # When option is set multiple times only return last value
+ echo "${results[-1]}"
+ fi
+ }
+
+ _mktemp_dry() {
+ # emktemp has no --dry-run option
+ local template="${1}"
+
+ if [[ -z "${template}" ]] ; then
+ if [[ -z "${T}" ]] ; then
+ template="/tmp/XXXXXXX"
+ else
+ template="${T}/XXXXXXX"
+ fi
+ fi
+
+ local template_wo_X=${template//X/}
+ local n_X
+ let n_X=${#template}-${#template_wo_X}
+ if [[ ${n_X} -lt 3 ]] ; then
+ echo "${FUNCNAME[0]}: too few X's in template '${template}'" >&2
+ return
+ fi
+
+ local attempts=0
+ local character tmpfile
+ while [[ true ]] ; do
+ let attempts=attempts+1
+
+ new_file=
+ while read -n1 character ; do
+ if [[ "${character}" == "X" ]] ; then
+ tmpfile+="${RANDOM:0:1}"
+ else
+ tmpfile+="${character}"
+ fi
+ done < <(echo -n "${template}")
+
+ if [[ ! -f "${tmpfile}" ]]
+ then
+ echo "${tmpfile}"
+ return
+ fi
+
+ if [[ ${attempts} -ge 100 ]] ; then
+ echo "${FUNCNAME[0]}: Cannot create temporary file after 100 attempts." >&2
+ return
+ fi
+ done
+ }
+
+ local mysqld_binary="${EROOT}/usr/sbin/mysqld"
+ if [[ ! -x "${mysqld_binary}" ]] ; then
+ die "'${mysqld_binary}' not found! Please re-install ${CATEGORY}/${PN}!"
+ fi
+
+ local mysql_binary="${EROOT}/usr/bin/mysql"
+ if [[ ! -x "${mysql_binary}" ]] ; then
+ die "'${mysql_binary}' not found! Please re-install ${CATEGORY}/${PN}!"
+ fi
+
+ local my_print_defaults_binary="${EROOT}/usr/bin/my_print_defaults"
+ if [[ ! -x "${my_print_defaults_binary}" ]] ; then
+ die "'${my_print_defaults_binary}' not found! Please re-install dev-db/mysql-connector-c!"
+ fi
+
+ if [[ -z "${MYSQL_USER}" ]] ; then
+ MYSQL_USER=mysql
+ if use prefix ; then
+ MYSQL_USER=$(id -u -n 2>/dev/null)
+ if [[ -z "${MYSQL_USER}" ]] ; then
+ die "Failed to determine current username!"
+ fi
+ fi
+ fi
+
+ if [[ -z "${MYSQL_GROUP}" ]] ; then
+ MYSQL_GROUP=mysql
+ if use prefix ; then
+ MYSQL_GROUP=$(id -g -n 2>/dev/null)
+ if [[ -z "${MYSQL_GROUP}" ]] ; then
+ die "Failed to determine current user groupname!"
+ fi
+ fi
+ fi
+
+ # my_print_defaults needs to read stuff in $HOME/.my.cnf
+ local -x HOME="${EROOT}/root"
+
+ # Make sure the vars are correctly initialized
+ mysql_init_vars
+
+ # Read currently set data directory
+ MY_DATADIR="$(_getoptval mysqld datadir "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
+
+ # Bug #213475 - MySQL _will_ object strenously if your machine is named
+ # localhost. Also causes weird failures.
+ [[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
+
+ if [[ -z "${MY_DATADIR}" ]] ; then
+ die "Sorry, unable to find MY_DATADIR!"
+ elif [[ -d "${MY_DATADIR}/mysql" ]] ; then
+ ewarn "Looks like your data directory '${MY_DATADIR}' is already initialized!"
+ ewarn "Please rename or delete its content if you wish to initialize a new data directory."
+ die "${PN} data directory at '${MY_DATADIR}' looks already initialized!"
+ fi
+
+ MYSQL_TMPDIR="$(_getoptval mysqld tmpdir "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
+ MYSQL_TMPDIR=${MYSQL_TMPDIR%/}
+ # These are dir+prefix
+ MYSQL_LOG_BIN="$(_getoptval mysqld log-bin "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
+ MYSQL_LOG_BIN=${MYSQL_LOG_BIN%/*}
+ MYSQL_RELAY_LOG="$(_getoptval mysqld relay-log "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
+ MYSQL_RELAY_LOG=${MYSQL_RELAY_LOG%/*}
+
+ # Create missing directories.
+ # Always check if mysql user can write to directory even if we just
+ # created directory because a parent directory might be not
+ # accessible for that user.
+ PID_DIR="${EROOT}/run/mysqld"
+ if [[ ! -d "${PID_DIR}" ]] ; then
+ einfo "Creating ${PN} PID directory '${PID_DIR}' ..."
+ install -d -m 755 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${PID_DIR}" \
+ || die "Failed to create PID directory '${PID_DIR}'!"
+ fi
+
+ local _pid_dir_testfile="$(_mktemp_dry "${PID_DIR}/.pkg_config-access-test.XXXXXXXXX")"
+ [[ -z "${_pid_dir_testfile}" ]] \
+ && die "_mktemp_dry() for '${PID_DIR}/.pkg_config-access-test.XXXXXXXXX' failed!"
+
+ if use prefix ; then
+ touch "${_pid_dir_testfile}" &>/dev/null
+ else
+ su -s /bin/sh -c "touch ${_pid_dir_testfile}" ${MYSQL_USER} &>/dev/null
+ fi
+
+ if [[ $? -ne 0 ]] ; then
+ die "${MYSQL_USER} user cannot write into PID dir '${PID_DIR}'!"
+ else
+ rm "${_pid_dir_testfile}" || die
+ unset _pid_dir_testfile
+ fi
+
+ if [[ ! -d "${MY_DATADIR}" ]] ; then
+ einfo "Creating ${PN} data directory '${MY_DATADIR}' ..."
+ install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MY_DATADIR}" \
+ || die "Failed to create ${PN} data directory '${MY_DATADIR}'!"
+ fi
+
+ local _my_datadir_testfile="$(_mktemp_dry "${MY_DATADIR}/.pkg_config-access-test.XXXXXXXXX")"
+ [[ -z "${_my_datadir_testfile}" ]] \
+ && die "_mktemp_dry() for '${MY_DATADIR}/.pkg_config-access-test.XXXXXXXXX' failed!"
+
+ if use prefix ; then
+ touch "${_my_datadir_testfile}" &>/dev/null
+ else
+ su -s /bin/sh -c "touch ${_my_datadir_testfile}" ${MYSQL_USER} &>/dev/null
+ fi
+
+ if [[ $? -ne 0 ]] ; then
+ die "${MYSQL_USER} user cannot write into data directory '${MY_DATADIR}'!"
+ else
+ rm "${_my_datadir_testfile}" || die
+ unset _my_datadir_testfile
+ fi
+
+ if [[ -n "${MYSQL_TMPDIR}" && ! -d "${MYSQL_TMPDIR}" ]] ; then
+ einfo "Creating ${PN} tmpdir '${MYSQL_TMPDIR}' ..."
+ install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MYSQL_TMPDIR}" \
+ || die "Failed to create ${PN} tmpdir '${MYSQL_TMPDIR}'!"
+ fi
+
+ if [[ -z "${MYSQL_TMPDIR}" ]] ; then
+ MYSQL_TMPDIR="$(_mktemp_dry "${EROOT}/tmp/mysqld-tmp.XXXXXXXXX")"
+ [[ -z "${MYSQL_TMPDIR}" ]] \
+ && die "_mktemp_dry() for '${MYSQL_TMPDIR}' failed!"
+
+ mkdir "${MYSQL_TMPDIR}" || die
+ chown ${MYSQL_USER} "${MYSQL_TMPDIR}" || die
+ fi
+
+ # Now we need to test MYSQL_TMPDIR...
+ local _my_tmpdir_testfile="$(_mktemp_dry "${MYSQL_TMPDIR}/.pkg_config-access-test.XXXXXXXXX")"
+ [[ -z "${_my_tmpdir_testfile}" ]] \
+ && die "_mktemp_dry() for '${MYSQL_TMPDIR}/.pkg_config-access-test.XXXXXXXXX' failed!"
+
+ if use prefix ; then
+ touch "${_my_tmpdir_testfile}" &>/dev/null
+ else
+ su -s /bin/sh -c "touch ${_my_tmpdir_testfile}" ${MYSQL_USER} &>/dev/null
+ fi
+
+ if [[ $? -ne 0 ]] ; then
+ die "${MYSQL_USER} user cannot write into tmpdir '${MYSQL_TMPDIR}'!"
+ else
+ rm "${_my_tmpdir_testfile}" || die
+ unset _my_tmpdir_testfile
+ fi
+
+ if [[ -n "${MYSQL_LOG_BIN}" && ! -d "${MYSQL_LOG_BIN}" ]] ; then
+ einfo "Creating ${PN} log-bin directory '${MYSQL_LOG_BIN}' ..."
+ install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MYSQL_LOG_BIN}" \
+ || die "Failed to create ${PN} log-bin directory '${MYSQL_LOG_BIN}'"
+ fi
+
+ if [[ -n "${MYSQL_LOG_BIN}" ]] ; then
+ local _my_logbin_testfile="$(_mktemp_dry "${MYSQL_LOG_BIN}/.pkg_config-access-test.XXXXXXXXX")"
+ [[ -z "${_my_logbin_testfile}" ]] \
+ && die "_mktemp_dry() for '${MYSQL_LOG_BIN}/.pkg_config-access-test.XXXXXXXXX' failed!"
+
+ if use prefix ; then
+ touch "${_my_logbin_testfile}" &>/dev/null
+ else
+ su -s /bin/sh -c "touch ${_my_logbin_testfile}" ${MYSQL_USER} &>/dev/null
+ fi
+
+ if [[ $? -ne 0 ]] ; then
+ die "${MYSQL_USER} user cannot write into log-bin directory '${MYSQL_LOG_BIN}'!"
+ else
+ rm "${_my_logbin_testfile}" || die
+ unset _my_logbin_testfile
+ fi
+ fi
+
+ if [[ -n "${MYSQL_RELAY_LOG}" && ! -d "${MYSQL_RELAY_LOG}" ]] ; then
+ einfo "Creating ${PN} relay-log directory '${MYSQL_RELAY_LOG}' ..."
+ install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MYSQL_RELAY_LOG}" \
+ || die "Failed to create ${PN} relay-log directory '${MYSQL_RELAY_LOG}'!"
+ fi
+
+ if [[ -n "${MYSQL_RELAY_LOG}" ]] ; then
+ local _my_relaylog_testfile="$(_mktemp_dry "${MYSQL_RELAY_LOG}/.pkg_config-access-test.XXXXXXXXX")"
+ [[ -z "${_my_relaylog_testfile}" ]] \
+ && die "_mktemp_dry() for '${MYSQL_RELAY_LOG}/.pkg_config-access-test.XXXXXXXXX' failed!"
+
+ if use prefix ; then
+ touch "${_my_relaylog_testfile}" &>/dev/null
+ else
+ su -s /bin/sh -c "touch ${_my_relaylog_testfile}" ${MYSQL_USER} &>/dev/null
+ fi
+
+ if [[ $? -ne 0 ]] ; then
+ die "${MYSQL_USER} user cannot write into relay-log directory '${MYSQL_RELAY_LOG}'!"
+ else
+ rm "${_my_relaylog_testfile}" || die
+ unset _my_relaylog_testfile
+ fi
+ fi
+
+ local mysql_install_log="$(_mktemp_dry "${MYSQL_TMPDIR}/install_db.XXXXXXXXX.log")"
+ if [[ -z "${mysql_install_log}" ]] ; then
+ die "_mktemp_dry() for '${MYSQL_TMPDIR}/install_db.XXXXXXXXX.log' failed!"
+ else
+ # make sure file is writable for MYSQL_USER...
+ touch "${mysql_install_log}" || die
+ chown ${MYSQL_USER} "${mysql_install_log}" || die
+ fi
+
+ local mysqld_logfile="$(_mktemp_dry "${MYSQL_TMPDIR}/install_mysqld.XXXXXXXXX.log")"
+ if [[ -z "${mysqld_logfile}" ]] ; then
+ die "_mktemp_dry() for '${MYSQL_TMPDIR}/install_mysqld.XXXXXXXXX.log' failed!"
+ else
+ # make sure file is writable for MYSQL_USER...
+ touch "${mysqld_logfile}" || die
+ chown ${MYSQL_USER} "${mysqld_logfile}" || die
+ fi
+
+ echo ""
+ einfo "Detected settings:"
+ einfo "=================="
+ einfo "MySQL User:\t\t\t\t${MYSQL_USER}"
+ einfo "MySQL Group:\t\t\t\t${MYSQL_GROUP}"
+ einfo "MySQL DATA directory:\t\t${MY_DATADIR}"
+ einfo "MySQL TMP directory:\t\t\t${MYSQL_TMPDIR}"
+
+ if [[ -n "${MYSQL_LOG_BIN}" ]] ; then
+ einfo "MySQL Binary Log File location:\t${MYSQL_LOG_BIN}"
+ fi
+
+ if [[ -n "${MYSQL_RELAY_LOG}" ]] ; then
+ einfo "MySQL Relay Log File location:\t${MYSQL_RELAY_LOG}"
+ fi
+
+ einfo "PID DIR:\t\t\t\t${PID_DIR}"
+ einfo "Install db log:\t\t\t${mysql_install_log}"
+ einfo "Install server log:\t\t\t${mysqld_logfile}"
+
+ local -a config_files
+
+ local config_file="${EROOT}/etc/mysql/mysql.d/50-distro-client.cnf"
+ if [[ -f "${config_file}" ]] ; then
+ config_files+=( "${config_file}" )
+ else
+ ewarn "Client configuration '${config_file}' not found; Skipping configuration of default authentication plugin for client ..."
+ fi
+
+ config_file="${EROOT}/etc/mysql/mysql.d/50-distro-server.cnf"
+ if [[ -f "${config_file}" ]] ; then
+ config_files+=( "${config_file}" )
+ else
+ ewarn "Server configuration '${config_file}' not found; Skipping configuration of default authentication plugin for mysqld ..."
+ fi
+
+ if [[ ${#config_files[@]} -gt 0 ]] ; then
+ if [[ -z "${MYSQL_DEFAULT_AUTHENTICATION_PLUGIN}" ]] ; then
+ local user_answer
+
+ echo
+ einfo "Please select default authentication plugin (enter number or plugin name):"
+ einfo "1) caching_sha2_password [MySQL 8.0 default]"
+ einfo "2) mysql_native_password [MySQL 5.7 default]"
+ einfo
+ einfo "For details see:"
+ einfo "https://dev.mysql.com/doc/refman/8.0/en/upgrading-from-previous-series.html#upgrade-caching-sha2-password"
+ read -p " >" user_answer
+ echo
+
+ case "${user_answer}" in
+ 1|caching_sha2_password)
+ MYSQL_DEFAULT_AUTHENTICATION_PLUGIN=caching_sha2_password
+ ;;
+ 2|mysql_native_password)
+ MYSQL_DEFAULT_AUTHENTICATION_PLUGIN=mysql_native_password
+ ;;
+ '')
+ die "No authentication plugin selected!"
+ ;;
+ *)
+ die "Authentication plugin '${user_answer}' is unknown/unsupported!"
+ ;;
+ esac
+
+ echo "Selected authentication plugin: ${MYSQL_DEFAULT_AUTHENTICATION_PLUGIN}" >> "${mysql_install_log}"
+
+ unset user_answer
+ fi
+
+ local cfg_option cfg_option_tabs cfg_section
+ for config_file in "${config_files[@]}" ; do
+ cfg_option="default-authentication-plugin"
+ cfg_section="mysqld"
+ cfg_option_tabs="\t\t"
+ if [[ "${config_file}" == *client.cnf ]] ; then
+ cfg_option="default-auth"
+ cfg_section="client"
+ cfg_option_tabs="\t\t\t\t"
+ fi
+
+ if grep -qE "^(loose-)?${cfg_option}\b.*=" "${config_file}" 2>/dev/null ; then
+ einfo "Ensuring that ${cfg_option} is set to '${MYSQL_DEFAULT_AUTHENTICATION_PLUGIN}' in '${config_file}' ..."
+ sed -i \
+ -e "s/^\(loose-\)\?${cfg_option}\b.*=.*/loose-${cfg_option}${cfg_option_tabs}= ${MYSQL_DEFAULT_AUTHENTICATION_PLUGIN}/" \
+ "${config_file}" || die "Failed to change ${cfg_option} in '${config_file}'!"
+ else
+ einfo "Setting ${cfg_option} to '${MYSQL_DEFAULT_AUTHENTICATION_PLUGIN}' in '${config_file}' ..."
+ sed -i \
+ -e "/^\[${cfg_section}\]$/a loose-${cfg_option}${cfg_option_tabs}= ${MYSQL_DEFAULT_AUTHENTICATION_PLUGIN}" \
+ "${config_file}" || die "Failed to add ${cfg_option} to '${config_file}'!"
+ fi
+ done
+ unset cfg_option cfg_option_tabs cfg_section
+ fi
+ unset config_files config_file
+
+ echo
+
+ if [[ -z "${MYSQL_ROOT_PASSWORD}" ]] ; then
+ local tmp_mysqld_password_source=
+
+ for tmp_mysqld_password_source in mysql client ; do
+ einfo "Trying to get password for mysql 'root' user from '${tmp_mysqld_password_source}' section ..."
+ MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password)"
+ if [[ -n "${MYSQL_ROOT_PASSWORD}" ]] ; then
+ if [[ ${MYSQL_ROOT_PASSWORD} == *$'\n'* ]] ; then
+ ewarn "Ignoring password from '${tmp_mysqld_password_source}' section due to newline character (do you have multiple password options set?)!"
+ MYSQL_ROOT_PASSWORD=
+ continue
+ fi
+
+ einfo "Found password in '${tmp_mysqld_password_source}' section!"
+ break
+ fi
+ done
+
+ # Sometimes --show is required to display passwords in some implementations of my_print_defaults
+ if [[ "${MYSQL_ROOT_PASSWORD}" == '*****' ]] ; then
+ MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password --show)"
+ fi
+
+ unset tmp_mysqld_password_source
+ fi
+
+ if [[ -z "${MYSQL_ROOT_PASSWORD}" ]] ; then
+ local pwd1="a"
+ local pwd2="b"
+
+ echo
+ einfo "No password for mysql 'root' user was specified via environment"
+ einfo "variable MYSQL_ROOT_PASSWORD and no password was found in config"
+ einfo "file like '${HOME}/.my.cnf'."
+ einfo "To continue please provide a password for the mysql 'root' user"
+ einfo "now on console:"
+ ewarn "NOTE: Please avoid [\"'\\_%] characters in the password!"
+ read -rsp " >" pwd1 ; echo
+
+ einfo "Retype the password"
+ read -rsp " >" pwd2 ; echo
+
+ if [[ "x$pwd1" != "x$pwd2" ]] ; then
+ die "Passwords are not the same!"
+ fi
+
+ MYSQL_ROOT_PASSWORD="${pwd1}"
+ unset pwd1 pwd2
+
+ echo
+ fi
+
+ local -a mysqld_options
+
+ # Fix bug 446200. Don't reference host my.cnf, needs to come first,
+ # see http://bugs.mysql.com/bug.php?id=31312
+ use prefix && mysqld_options+=( "--defaults-file='${MY_SYSCONFDIR}/my.cnf'" )
+
+ # Figure out which options we need to disable to do the setup
+ local helpfile="${TMPDIR}/mysqld-help"
+ "${EROOT}/usr/sbin/mysqld" --verbose --help >"${helpfile}" 2>/dev/null
+
+ local opt optexp optfull
+ for opt in host-cache name-resolve networking slave-start \
+ federated ssl log-bin relay-log slow-query-log external-locking \
+ log-slave-updates \
+ ; do
+ optexp="--(skip-)?${opt}" optfull="--loose-skip-${opt}"
+ grep -E -sq -- "${optexp}" "${helpfile}" && mysqld_options+=( "${optfull}" )
+ done
+
+ # Prepare timezones, see
+ # https://dev.mysql.com/doc/mysql/en/time-zone-support.html
+ local tz_sql="$(_mktemp_dry "${MYSQL_TMPDIR}/tz.XXXXXXXXX.sql")"
+ [[ -z "${tz_sql}" ]] \
+ && die "_mktemp_dry() for '${MYSQL_TMPDIR}/tz.XXXXXXXXX.sql' failed!"
+
+ echo "USE mysql;" >"${tz_sql}"
+ "${EROOT}/usr/bin/mysql_tzinfo_to_sql" "${EROOT}/usr/share/zoneinfo" >> "${tz_sql}" 2>/dev/null
+ if [[ $? -ne 0 ]] ; then
+ die "mysql_tzinfo_to_sql failed!"
+ fi
+
+ # --initialize-insecure will not set root password
+ # --initialize would set a random one in the log which we don't need as we set it ourselves
+ local cmd=(
+ "${mysqld_binary}"
+ "${mysqld_options[@]}"
+ "--initialize-insecure"
+ "--init-file='${tz_sql}'"
+ "--basedir='${EROOT}/usr'"
+ "--datadir='${MY_DATADIR}'"
+ "--tmpdir='${MYSQL_TMPDIR}'"
+ "--log-error='${mysql_install_log}'"
+ "--user=${MYSQL_USER}"
+ )
+
+ einfo "Initializing ${PN} data directory: ${cmd[@]}"
+ eval "${cmd[@]}" >>"${mysql_install_log}" 2>&1
+
+ if [[ $? -ne 0 || ! -f "${MY_DATADIR}/mysql.ibd" ]] ; then
+ grep -B5 -A999 -iE "(Aborting|ERROR|errno)" "${mysql_install_log}" 1>&2
+ die "Failed to initialize ${PN} data directory. Please review '${mysql_install_log}'!"
+ fi
+
+ rm "${tz_sql}" || die
+
+ local x=${RANDOM}
+ local socket="${EROOT}${PID_DIR}/mysqld${x}.sock"
+ local pidfile="${EROOT}${PID_DIR}/mysqld${x}.pid"
+ unset x
+
+ cmd=(
+ "${mysqld_binary}"
+ "${mysqld_options[@]}"
+ "--basedir='${EROOT}/usr'"
+ "--datadir='${MY_DATADIR}'"
+ "--tmpdir='${MYSQL_TMPDIR}'"
+ --max_allowed_packet=8M
+ --net_buffer_length=16K
+ "--socket='${socket}'"
+ "--pid-file='${pidfile}'"
+ "--log-error='${mysqld_logfile}'"
+ "--user=${MYSQL_USER}"
+ )
+
+ einfo "Starting mysqld to finalize initialization: ${cmd[@]}"
+ eval "${cmd[@]}" >>"${mysqld_logfile}" 2>&1 &
+
+ echo -n "Waiting for mysqld to accept connections "
+ local maxtry=15
+ while [[ ! -S "${socket}" && "${maxtry}" -gt 1 ]] ; do
+ maxtry=$((${maxtry}-1))
+ echo -n "."
+ sleep 1
+ done
+
+ if [[ -S "${socket}" ]] ; then
+ # Even with a socket we don't know if mysqld will abort
+ # start due to an error so just wait a little bit more...
+ maxtry=5
+ while [[ -S "${socket}" && "${maxtry}" -gt 1 ]] ; do
+ maxtry=$((${maxtry}-1))
+ echo -n "."
+ sleep 1
+ done
+ fi
+
+ echo
+
+ if [[ ! -S "${socket}" ]] ; then
+ grep -B5 -A999 -iE "(Aborting|ERROR|errno)" "${mysqld_logfile}" 1>&2
+ die "mysqld was unable to start from initialized data directory. Please review '${mysqld_logfile}'!"
+ fi
+
+ local mysql_logfile="${TMPDIR}/set_root_pw.log"
+ touch "${mysql_logfile}" || die
+
+ ebegin "Setting root password"
+ # Do this from memory, as we don't want clear text passwords in temp files
+ local sql="ALTER USER 'root'@'localhost' IDENTIFIED BY '${MYSQL_ROOT_PASSWORD}'"
+ cmd=(
+ "${mysql_binary}"
+ --no-defaults
+ "--socket='${socket}'"
+ -hlocalhost
+ "-e \"${sql}\""
+ )
+ eval "${cmd[@]}" >"${mysql_logfile}" 2>&1
+ local rc=$?
+ eend ${rc}
+
+ if [[ ${rc} -ne 0 ]] ; then
+ # Poor man's solution which tries to avoid having password
+ # in log. NOTE: sed can fail if user didn't follow advice
+ # and included character which will require escaping...
+ sed -i -e "s/${MYSQL_ROOT_PASSWORD}/*****/" "${mysql_logfile}" 2>/dev/null
+
+ grep -B5 -A999 -iE "(Aborting|ERROR|errno)" "${mysql_logfile}"
+ die "Failed to set ${PN} root password. Please review '${mysql_logfile}'!"
+ fi
+
+ # Stop the server
+ if [[ -f "${pidfile}" ]] && pgrep -F "${pidfile}" &>/dev/null ; then
+ echo -n "Stopping the server "
+ pkill -F "${pidfile}" &>/dev/null
+
+ maxtry=10
+ while [[ -f "${pidfile}" ]] && pgrep -F "${pidfile}" &>/dev/null ; do
+ maxtry=$((${maxtry}-1))
+ echo -n "."
+ sleep 1
+ done
+
+ echo
+
+ if [[ -f "${pidfile}" ]] && pgrep -F "${pidfile}" &>/dev/null ; then
+ # We somehow failed to stop server.
+ # However, not a fatal error. Just warn the user.
+ ewarn "WARNING: mysqld[$(cat "${pidfile}")] is still running!"
+ fi
+ fi
+
+ einfo "${PN} data directory at '${MY_DATADIR}' successfully initialized!"
+}
diff --git a/dev-db/redict/Manifest b/dev-db/redict/Manifest
index 5777dda8966e..1ddfe97fd5d8 100644
--- a/dev-db/redict/Manifest
+++ b/dev-db/redict/Manifest
@@ -9,6 +9,6 @@ AUX redict.initd 730 BLAKE2B 6754f6fb672f134d22e6849433459f0d369b218f12992206a2e
AUX redict.logrotate 108 BLAKE2B ed7c2f04a7994b88a18fee851775bb2fb964bd835b26a7498ea27e57bf275a3f5b4bf6bd9642f390f5d42159f242d0f83ffac10b5f36ec8cdbab64d4ff6fe9cf SHA512 63f1af50b7e9e7e90cf2c3f83013c6484c8020c14c519161d7d0bf3045ca9f90d1032d40bebf59aba906ad5929cd84ec9ef45556d60a83dc75cd148ef4984a88
AUX redict.service 261 BLAKE2B 0dd1a9fb7adae63f794602cca9a913f1c41e706e603e33870ebbe13d9bf794a7b73f8e528a17f16002891263ff7a20a322950d6ff9f274fc5916cc457a96e574 SHA512 b80670424709577f946d3a063032011690aff1aa3b55849f143370c61703fbc6bdb02561f04bf20864addcca8ee5491e95d971bf37458939daa9bc54f8f57ab8
AUX redict.tmpfiles 60 BLAKE2B 79f15e360cb2fbdc07a676a17a438fb5d85cb0252505e5fb86d52294eb5f6fc304c5dde98149e344223b11e599901fdd2f0cba6dbb09400b5afbbb3c0190e7c7 SHA512 4e81318de5760e152403b44ec3ee0b18a9be602501143bb2d2b0841608ea5460fc890fb211264d7c80ac363b2295e14bd06d51ea7bd6259f28c9b947d322a30a
-DIST redict-7.3.1.tar.gz 3414766 BLAKE2B ff4a4078683ec6e4f236e605e29711d1033c8632cd6c12035d7fdf1566d75d375daa61383fd8a6c098444e1cf382f5934f961e67a2041351fb4c9aaa6a7635c0 SHA512 79d174c0f58c73a52f3b0225280f69f92790f8d43cdf70a2353cefd06d73030ffb5e3eb30e06dcd9c47161f2d43a09cca6dc815e9dd83b620716c2ae3243d3bc
-EBUILD redict-7.3.1.ebuild 3824 BLAKE2B 297cbfd40782e3b102bf0a86c25bbb8a67830ce39fd36cd61b9a66b2b1887595697b8c04973ef0085d486fe755afcedf005585486d562eeb50bdd8c88dbc57ad SHA512 1601142e3daac812f6294a6e501b89febaac7a6dd5a1cfb88c0fd42bbeb972fdbb21def11d8d6ec89ee7e3162edcb1bab13f253cb7d35f0a4b9931a7e55d942c
+DIST redict-7.3.2.tar.gz 3415089 BLAKE2B 3507586d4e752e1f98755e8f0e2291ea37a27af84b7980ecde0342826dd41b46eb2f3a9ca3f0231bc49771829b7584b6f2f529ab11cb5af39ecdb3cde4f6416a SHA512 fb14f9c1bb43e69f5479fd9944b2865d0696330d244b8eb88865370756f580a9e5826f9041cd91478ccfeb22ec1304ab9cdff6736e2a623e71c58e785db9eb4a
+EBUILD redict-7.3.2.ebuild 3829 BLAKE2B 52b1d1771dbe3b37d932956f457d6c0a006cbba1a82f2731af9821ae9aa90cee7aea2bbb502b16ec6d33de897393386738cdb267f0cdeb07b4f1a35c0b58cb16 SHA512 f3e486b90b9a11d6c576d0801fdbcff580b973e78b22e5ade86fa33a81b3c8e89701c484c0010b643ec3c8d3d3341cf03c3ee1076ef6e4c70a672837b217a3f1
MISC metadata.xml 610 BLAKE2B 0c61950ab5459b6122247c049a2f18373fa5bd21496882d4478f7e9d91683d6978f23997cbe3ce11bde346d9ad0bcad810a358f719aea6355c86466f0299f08e SHA512 65141d43ca54cf57962b24a5d5cacb3894675994a0b87b561216a6c7a26526bf5f9b4952c23eadd1e4598c56d9b147b219ef010fe62e0cc8f500f8bc4cb40366
diff --git a/dev-db/redict/redict-7.3.1.ebuild b/dev-db/redict/redict-7.3.2.ebuild
index 8218bbe76716..002e106a3641 100644
--- a/dev-db/redict/redict-7.3.1.ebuild
+++ b/dev-db/redict/redict-7.3.2.ebuild
@@ -1,4 +1,4 @@
-# Copyright 2024 Gentoo Authors
+# Copyright 2024-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
diff --git a/dev-db/redis/Manifest b/dev-db/redis/Manifest
index 1a0c863fc185..f46121cc83fb 100644
--- a/dev-db/redis/Manifest
+++ b/dev-db/redis/Manifest
@@ -15,9 +15,15 @@ AUX redis.logrotate 105 BLAKE2B 1281fd86d399b40aaaa69d1fe170b2c49523c074e14b1290
AUX redis.service-4 255 BLAKE2B e51cfbb7ce6586e7c16003e3b470be036e9c28b408c4ad71e90d084f5ee843eb2b0b60552735099564f99fc4b4c318980f2e1dde7ac69b32a54a636e663a7cd5 SHA512 786fb60e628146d5024fbee2c17bee26276f58b8d2f15c8eb0a416b1b2e870a1d82e7a1ef7155b7a489da8c89d6feae5b1207597bf6fcb929d7bcfddcae25937
AUX redis.tmpfiles-2 57 BLAKE2B 1e0577c1828bb693cf820f3ba5e77d7d748adf4df2d1910d465ce097765308c7b7ea729526404120d04a79b547e865df93f7bfce1e63341c73563496f1dce691 SHA512 3de050ce044b7daf71219ec61dee2bc31acef161319b87ec2963b23c72e8a4807f1302c4932897664a63ef94507449f6ab75ce18d59f5e1a4558c330a7042e43
DIST redis-6.2.16.tar.gz 2496391 BLAKE2B e00eac16fbebc54bbd24dc6622cb1add7c0511df419a84d5f9a4aae28b2a5ec4d9a4b865999fe4ab1bfeff582dce8f7c01c5352c7389c3a2ebbffc728246033b SHA512 486bb949c5adce9d2ad176c2638d2425a6a03910098e6adf1bdaecd3459d148c2899e4827ed39cbe8d7300ffcffe99b475575bb87ab93a330549077284fd8fd7
+DIST redis-6.2.17.tar.gz 2492457 BLAKE2B 4ed7555df5e8c67a5e6f14e133e7052cabc7f71d6ba12c0e6c4cf9d1eded06b97362b6998c8e15765dd6ee87e3636d4f6b280b53cf47c7eea1f2f8e27ab907f1 SHA512 77ed577022edc617c576b3ac8728014b2041d431295dc97d6b879c6f97e692db6958561e9e8b45c209136f9447c80bca527a5d6b2becc94738bc35ed25a5a9bb
DIST redis-7.2.6.tar.gz 3391023 BLAKE2B 8dae8c370a905ff8622f1458387eea4cc61e451d827de8a4b61a65aff0517ff2ec714eadcd03e1b683c0940cc98390ce7c2eb451bd25c3ecaeaf21ac1fb2230a SHA512 758a1cbf77eee6222b3490757c58b9a1065b727b65d9bd6332cb41a816b6ab2827924eaca003fb5b818f847f7a00d9ce2f46365969ce946110119872368cc938
+DIST redis-7.2.7.tar.gz 3394075 BLAKE2B 624cc033bbebd660853c42427f4e1430c4dfa8489696438ec7cc775584b65dd7293f4bfb424465daab59a6a8a4b893814beb1ddffe5ef61c567b674e3b52e6c1 SHA512 daac985fe987ae5bf0067288b45767dded259e6872a307ed3ee12a45e58470d24485cadc270cd46ebe1009d312a8d8b799c19b14c8db246839a2a66285001b17
DIST redis-7.4.1.tar.gz 3529512 BLAKE2B 097c9ff0356a86909898e8defe9394c88bc2de7194477905c12c08cc5ffabd2180ffefd5b17d9454af1b7ef8ab059cbcb61bd42b86ee50d98e73208fa1da796d SHA512 d764b5c3a4a6fb73192b92e92e90abedf46c2dee6e0840326c95b848910186e52f973020563fc89781c144340f652b5d39c997acff7c9d4b751ddc3300140e45
+DIST redis-7.4.2.tar.gz 3533864 BLAKE2B 62fb8a4d46e9f887e86c8e1d590d2315068196c33b9aa3669f29074392931fc254a16e30de065a0fd7de50fd2b434394fbf2889d08479af579588eed17f033a4 SHA512 cdb5e97e56c2666512fb09f51a0d97e1dabefd28a3b4cd91b6301df798f9e77ff8ead60f1a4dd6628ee17634807272fd75f5609be5247505c4a8e062f1dea0b3
EBUILD redis-6.2.16.ebuild 5410 BLAKE2B d2014fa43f786292ee9f15f922d5779c138908d10d009840251b7b40af61a1b174403d42bbb472c170861da98a69bef8e3d3a0a12a6409e4590a0ce250796a65 SHA512 7241f30d250c5f8e87db732d26b340bff1ae53c6c6996b5099388c19178f059b18339cc748d22e036b96c0f849806df415333b1b3f853364031bc15e585d7d64
+EBUILD redis-6.2.17.ebuild 5415 BLAKE2B b5a39cbb8e3fed565c417dd7149f763584c7c62fbc1b57cbb601e721b142f0d7ab696a6a0ab52679f0577155fa78c3fcb028208b54bc2bd359bab6b59192d9e5 SHA512 12e1afc6dbf7db6f613b57841091beb18631c6e17687b36e5e063caf37371a50f35fb273f3173c867a03853235c263001fc5226316ab43d3e5c713c36c01dc4b
EBUILD redis-7.2.6.ebuild 5024 BLAKE2B 54dfdbc184b04c83b20667bf5db958cb2a689c67051b3cab78ecf9bc968110bc5e886ca4d5f87713dce638f91826a210f9e73a846183af0e57f4da3ea34824b3 SHA512 f9e99196b5ccbec2dc7cbd4fc6d11b73c1fce0e56588e19147b0bd5ba6c9f15fe4f9bf69244e77b20797af7209ed4713938a9669012a2af5ba51b53cd1b1aa9e
+EBUILD redis-7.2.7.ebuild 5029 BLAKE2B 67fcebaa65e4fd89d56a45593c24a664ce230ad0895334f34ba14ad68d43a6e21e0abf0f6d574f4a4d9c8ddc4355fda1805731d26d9f9100c9d68e2972e5a957 SHA512 c38c7423dbba4e39b9c1d79de266b866e0e927ff5f2850ffe1c8fa81d7bba343a6a4dec7b7a51bf952f94b76aea44aa8ebe99af84a7074ae1f16218380a68a5c
EBUILD redis-7.4.1.ebuild 4855 BLAKE2B 7bf1a46ec41a5ba91fc14684f33b1aa0e29d3546a9897c2e0c5eb0be36fcbcdc4f2c8fccbab3013abbe082343783a8844b2397db8f8ce60edf66db72537f035e SHA512 a981cb768ccbb5768b48b5b0b1038a0c99ebbdbcf5976bb67c1ba3affa41fa407963395c7610d39f14c9d546815dfd12d25a012ca62f70e9b0b4be6a53c1a5af
+EBUILD redis-7.4.2.ebuild 4860 BLAKE2B 579cd8ef7c78482b265fcb42834ca9f939dad3390c2b1e0184b5a9ddb299a50b57b4678cad870fcf945ae13477a9428d231e3468e7f03b0e194aee2370c5d1b5 SHA512 5bf93cafa944ab7c197155d9d66739265106b81b6acb139ab8325ace77f403daefd0002ec2a6e535130a53d02b1f149d251c948ca6d6a5efac73b0494f9e9d14
MISC metadata.xml 547 BLAKE2B 43d462a2c301c4431aa233467563140076269fec170063a9b5501fad2bad3afb9602aab971a5ef16997dd24cc5cfd27c9a9e194059b8db8784250cdae0fd5db3 SHA512 6b4549d4c296c19bc054175c7cf2d1af785d9217b4f298460be5ed08c0197ad8d6fdc29c998c85a5c6926947d99665265a008163e2dc15def2e1230ca6b561eb
diff --git a/dev-db/redis/redis-6.2.17.ebuild b/dev-db/redis/redis-6.2.17.ebuild
new file mode 100644
index 000000000000..0957399d74cf
--- /dev/null
+++ b/dev-db/redis/redis-6.2.17.ebuild
@@ -0,0 +1,192 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+# Redis does NOT build with Lua 5.2 or newer at this time:
+# - 5.3 and 5.4 give:
+# lua_bit.c:83:2: error: #error "Unknown number type, check LUA_NUMBER_* in luaconf.h"
+# - 5.2 fails with:
+# scripting.c:(.text+0x1f9b): undefined reference to `lua_open'
+# because lua_open became lua_newstate in 5.2
+LUA_COMPAT=( lua5-1 luajit )
+
+# Upstream have deviated too far from vanilla Lua, adding their own APIs
+# like lua_enablereadonlytable, but we still need the eclass and such
+# for bug #841422.
+inherit autotools edo flag-o-matic lua-single multiprocessing systemd tmpfiles toolchain-funcs
+
+DESCRIPTION="A persistent caching system, key-value, and data structures database"
+HOMEPAGE="https://redis.io"
+SRC_URI="https://download.redis.io/releases/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0/$(ver_cut 1-2)"
+KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux"
+IUSE="+jemalloc selinux ssl systemd tcmalloc test"
+RESTRICT="!test? ( test )"
+
+DEPEND="
+ ${LUA_DEPS}
+ jemalloc? ( >=dev-libs/jemalloc-5.1:= )
+ ssl? ( dev-libs/openssl:0= )
+ systemd? ( sys-apps/systemd:= )
+ tcmalloc? ( dev-util/google-perftools )
+"
+
+RDEPEND="
+ ${DEPEND}
+ acct-group/redis
+ acct-user/redis
+ selinux? ( sec-policy/selinux-redis )
+"
+
+BDEPEND="
+ acct-group/redis
+ acct-user/redis
+ virtual/pkgconfig
+ test? (
+ dev-lang/tcl:0=
+ ssl? ( dev-tcltk/tls )
+ )
+"
+
+REQUIRED_USE="?? ( jemalloc tcmalloc )
+ ${LUA_REQUIRED_USE}"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-6.2.1-config.patch
+ "${FILESDIR}"/${PN}-5.0-shared.patch
+ "${FILESDIR}"/${PN}-6.2.3-ppc-atomic.patch
+ "${FILESDIR}"/${PN}-sentinel-5.0-config.patch
+)
+
+src_prepare() {
+ default
+
+ # Copy lua modules into build dir
+ #cp "${S}"/deps/lua/src/{fpconv,lua_bit,lua_cjson,lua_cmsgpack,lua_struct,strbuf}.c "${S}"/src || die
+ #cp "${S}"/deps/lua/src/{fpconv,strbuf}.h "${S}"/src || die
+ # Append cflag for lua_cjson
+ # https://github.com/antirez/redis/commit/4fdcd213#diff-3ba529ae517f6b57803af0502f52a40bL61
+ append-cflags "-DENABLE_CJSON_GLOBAL"
+
+ # now we will rewrite present Makefiles
+ local makefiles="" MKF
+ for MKF in $(find -name 'Makefile' | cut -b 3-); do
+ mv "${MKF}" "${MKF}.in"
+ sed -i -e 's:$(CC):@CC@:g' \
+ -e 's:$(CFLAGS):@AM_CFLAGS@:g' \
+ -e 's: $(DEBUG)::g' \
+ -e 's:$(OBJARCH)::g' \
+ -e 's:ARCH:TARCH:g' \
+ -e '/^CCOPT=/s:$: $(LDFLAGS):g' \
+ "${MKF}.in" \
+ || die "Sed failed for ${MKF}"
+ makefiles+=" ${MKF}"
+ done
+ # autodetection of compiler and settings; generates the modified Makefiles
+ cp "${FILESDIR}"/configure.ac-3.2 configure.ac || die
+
+ # Use the correct pkgconfig name for Lua.
+ # The upstream configure script handles luajit specially, and is not
+ # affected by these changes.
+ sed -i \
+ -e "/^AC_INIT/s|, [0-9].+, |, $PV, |" \
+ -e "s:AC_CONFIG_FILES(\[Makefile\]):AC_CONFIG_FILES([${makefiles}]):g" \
+ -e "/PKG_CHECK_MODULES.*\<LUA\>/s,lua5.1,${ELUA},g" \
+ configure.ac || die "Sed failed for configure.ac"
+ eautoreconf
+}
+
+src_configure() {
+ econf #$(use_with lua_single_target_luajit luajit)
+
+ # Linenoise can't be built with -std=c99, see https://bugs.gentoo.org/451164
+ # also, don't define ANSI/c99 for lua twice
+ sed -i -e "s:-std=c99::g" deps/linenoise/Makefile deps/Makefile || die
+}
+
+src_compile() {
+ local myconf=""
+
+ if use jemalloc; then
+ myconf+="MALLOC=jemalloc"
+ elif use tcmalloc; then
+ myconf+="MALLOC=tcmalloc"
+ else
+ myconf+="MALLOC=libc"
+ fi
+
+ if use ssl; then
+ myconf+=" BUILD_TLS=yes"
+ fi
+
+ export USE_SYSTEMD=$(usex systemd)
+
+ tc-export AR CC RANLIB
+ emake V=1 ${myconf} AR="${AR}" CC="${CC}" RANLIB="${RANLIB}"
+}
+
+src_test() {
+ local runtestargs=(
+ --clients "$(makeopts_jobs)" # see bug #649868
+ )
+
+ if has usersandbox ${FEATURES} || ! has userpriv ${FEATURES}; then
+ ewarn "unit/oom-score-adj test will be skipped." \
+ "It is known to fail with FEATURES usersandbox or -userpriv. See bug #756382."
+
+ # unit/oom-score-adj was introduced in version 6.2.0
+ runtestargs+=( --skipunit unit/oom-score-adj ) # see bug #756382
+ fi
+
+ if use ssl; then
+ edo ./utils/gen-test-certs.sh
+ runtestargs+=( --tls )
+ fi
+
+ edo ./runtest "${runtestargs[@]}"
+}
+
+src_install() {
+ insinto /etc/redis
+ doins redis.conf sentinel.conf
+ use prefix || fowners -R redis:redis /etc/redis /etc/redis/{redis,sentinel}.conf
+ fperms 0750 /etc/redis
+ fperms 0644 /etc/redis/{redis,sentinel}.conf
+
+ newconfd "${FILESDIR}/redis.confd-r2" redis
+ newinitd "${FILESDIR}/redis.initd-6" redis
+
+ systemd_newunit "${FILESDIR}/redis.service-4" redis.service
+ newtmpfiles "${FILESDIR}/redis.tmpfiles-2" redis.conf
+
+ newconfd "${FILESDIR}/redis-sentinel.confd-r1" redis-sentinel
+ newinitd "${FILESDIR}/redis-sentinel.initd-r1" redis-sentinel
+
+ insinto /etc/logrotate.d/
+ newins "${FILESDIR}/${PN}.logrotate" ${PN}
+
+ dodoc 00-RELEASENOTES BUGS CONTRIBUTING MANIFESTO README.md
+
+ dobin src/redis-cli
+ dosbin src/redis-benchmark src/redis-server src/redis-check-aof src/redis-check-rdb
+ fperms 0750 /usr/sbin/redis-benchmark
+ dosym redis-server /usr/sbin/redis-sentinel
+
+ if use prefix; then
+ diropts -m0750
+ else
+ diropts -m0750 -o redis -g redis
+ fi
+ keepdir /var/{log,lib}/redis
+}
+
+pkg_postinst() {
+ tmpfiles_process redis.conf
+
+ ewarn "The default redis configuration file location changed to:"
+ ewarn " /etc/redis/{redis,sentinel}.conf"
+ ewarn "Please apply your changes to the new configuration files."
+}
diff --git a/dev-db/redis/redis-7.2.7.ebuild b/dev-db/redis/redis-7.2.7.ebuild
new file mode 100644
index 000000000000..5edd4b9de743
--- /dev/null
+++ b/dev-db/redis/redis-7.2.7.ebuild
@@ -0,0 +1,197 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+# N.B.: It is no clue in porting to Lua eclasses, as upstream have deviated
+# too far from vanilla Lua, adding their own APIs like lua_enablereadonlytable
+
+inherit autotools edo multiprocessing systemd tmpfiles toolchain-funcs
+
+DESCRIPTION="A persistent caching system, key-value, and data structures database"
+HOMEPAGE="
+ https://redis.io
+ https://github.com/redis/redis
+"
+SRC_URI="https://download.redis.io/releases/${P}.tar.gz"
+
+LICENSE="BSD Boost-1.0"
+SLOT="0/$(ver_cut 1-2)"
+KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~loong ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux"
+IUSE="+jemalloc selinux ssl systemd tcmalloc test"
+RESTRICT="!test? ( test )"
+
+DEPEND="
+ jemalloc? ( >=dev-libs/jemalloc-5.1:= )
+ ssl? ( dev-libs/openssl:0= )
+ systemd? ( sys-apps/systemd:= )
+ tcmalloc? ( dev-util/google-perftools )
+"
+
+RDEPEND="
+ ${DEPEND}
+ acct-group/redis
+ acct-user/redis
+ selinux? ( sec-policy/selinux-redis )
+"
+
+BDEPEND="
+ acct-group/redis
+ acct-user/redis
+ virtual/pkgconfig
+ test? (
+ dev-lang/tcl:0=
+ ssl? ( dev-tcltk/tls )
+ )
+"
+
+REQUIRED_USE="?? ( jemalloc tcmalloc )"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-6.2.1-config.patch
+ "${FILESDIR}"/${PN}-7.2.0-system-jemalloc.patch
+ "${FILESDIR}"/${PN}-6.2.3-ppc-atomic.patch
+ "${FILESDIR}"/${PN}-sentinel-7.2.0-config.patch
+ "${FILESDIR}"/${PN}-7.0.4-no-which.patch
+)
+
+src_prepare() {
+ default
+
+ # Respect user CFLAGS in bundled lua
+ sed -i '/LUA_CFLAGS/s: -O2::g' deps/Makefile || die
+
+ # now we will rewrite present Makefiles
+ local makefiles="" MKF
+ local mysedconf=(
+ -e 's:$(CC):@CC@:g'
+ -e 's:$(CFLAGS):@AM_CFLAGS@:g'
+ -e 's: $(DEBUG)::g'
+
+ -e 's:-Werror ::g'
+ -e 's:-Werror=deprecated-declarations ::g'
+ )
+ for MKF in $(find -name 'Makefile' | cut -b 3-); do
+ mv "${MKF}" "${MKF}.in"
+ sed -i "${mysedconf[@]}" "${MKF}.in" || die "Sed failed for ${MKF}"
+ makefiles+=" ${MKF}"
+ done
+ # autodetection of compiler and settings; generates the modified Makefiles
+ cp "${FILESDIR}"/configure.ac-7.0 configure.ac || die
+
+ sed -i \
+ -e "/^AC_INIT/s|, __PV__, |, $PV, |" \
+ -e "s:AC_CONFIG_FILES(\[Makefile\]):AC_CONFIG_FILES([${makefiles}]):g" \
+ configure.ac || die "Sed failed for configure.ac"
+ eautoreconf
+}
+
+src_configure() {
+ econf
+
+ # Linenoise can't be built with -std=c99, see https://bugs.gentoo.org/451164
+ # also, don't define ANSI/c99 for lua twice
+ sed -i -e "s:-std=c99::g" deps/linenoise/Makefile deps/Makefile || die
+}
+
+src_compile() {
+ tc-export AR CC RANLIB
+
+ local myconf=(
+ AR="${AR}"
+ CC="${CC}"
+ RANLIB="${RANLIB}"
+
+ V=1 # verbose
+
+ # OPTIMIZATION defaults to -O3. Let's respect user CFLAGS by setting it
+ # to empty value.
+ OPTIMIZATION=''
+ # Disable debug flags in bundled hiredis
+ DEBUG_FLAGS=''
+
+ BUILD_TLS=$(usex ssl)
+ USE_SYSTEMD=$(usex systemd)
+ )
+
+ if use jemalloc; then
+ myconf+=( MALLOC=jemalloc )
+ elif use tcmalloc; then
+ myconf+=( MALLOC=tcmalloc )
+ else
+ myconf+=( MALLOC=libc )
+ fi
+
+ emake "${myconf[@]}"
+}
+
+src_test() {
+ local runtestargs=(
+ --clients "$(makeopts_jobs)" # see bug #649868
+
+ --skiptest "Active defrag eval scripts" # see bug #851654
+ )
+
+ if has usersandbox ${FEATURES} || ! has userpriv ${FEATURES}; then
+ ewarn "oom-score-adj related tests will be skipped." \
+ "They are known to fail with FEATURES usersandbox or -userpriv. See bug #756382."
+
+ runtestargs+=(
+ # unit/oom-score-adj was introduced in version 6.2.0
+ --skipunit unit/oom-score-adj # see bug #756382
+
+ # Following test was added in version 7.0.0 to unit/introspection.
+ # It also tries to adjust OOM score.
+ --skiptest "CONFIG SET rollback on apply error"
+ )
+ fi
+
+ if use ssl; then
+ edo ./utils/gen-test-certs.sh
+ runtestargs+=( --tls )
+ fi
+
+ edo ./runtest "${runtestargs[@]}"
+}
+
+src_install() {
+ insinto /etc/redis
+ doins redis.conf sentinel.conf
+ use prefix || fowners -R redis:redis /etc/redis /etc/redis/{redis,sentinel}.conf
+ fperms 0750 /etc/redis
+ fperms 0644 /etc/redis/{redis,sentinel}.conf
+
+ newconfd "${FILESDIR}/redis.confd-r2" redis
+ newinitd "${FILESDIR}/redis.initd-6" redis
+
+ systemd_newunit "${FILESDIR}/redis.service-4" redis.service
+ newtmpfiles "${FILESDIR}/redis.tmpfiles-2" redis.conf
+
+ newconfd "${FILESDIR}/redis-sentinel.confd-r1" redis-sentinel
+ newinitd "${FILESDIR}/redis-sentinel.initd-r1" redis-sentinel
+
+ insinto /etc/logrotate.d/
+ newins "${FILESDIR}/${PN}.logrotate" ${PN}
+
+ dodoc 00-RELEASENOTES BUGS CONTRIBUTING.md MANIFESTO README.md
+
+ dobin src/redis-cli
+ dosbin src/redis-benchmark src/redis-server src/redis-check-aof src/redis-check-rdb
+ fperms 0750 /usr/sbin/redis-benchmark
+ dosym redis-server /usr/sbin/redis-sentinel
+
+ if use prefix; then
+ diropts -m0750
+ else
+ diropts -m0750 -o redis -g redis
+ fi
+ keepdir /var/{log,lib}/redis
+}
+
+pkg_postinst() {
+ tmpfiles_process redis.conf
+
+ ewarn "The default redis configuration file location changed to:"
+ ewarn " /etc/redis/{redis,sentinel}.conf"
+ ewarn "Please apply your changes to the new configuration files."
+}
diff --git a/dev-db/redis/redis-7.4.2.ebuild b/dev-db/redis/redis-7.4.2.ebuild
new file mode 100644
index 000000000000..43ecd129a0a3
--- /dev/null
+++ b/dev-db/redis/redis-7.4.2.ebuild
@@ -0,0 +1,193 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+# N.B.: It is no clue in porting to Lua eclasses, as upstream have deviated
+# too far from vanilla Lua, adding their own APIs like lua_enablereadonlytable
+
+inherit autotools edo multiprocessing systemd tmpfiles toolchain-funcs
+
+DESCRIPTION="A persistent caching system, key-value, and data structures database"
+HOMEPAGE="
+ https://redis.io
+ https://github.com/redis/redis
+"
+SRC_URI="https://download.redis.io/releases/${P}.tar.gz"
+
+LICENSE="Boost-1.0 SSPL-1"
+SLOT="0/$(ver_cut 1-2)"
+KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~loong ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux"
+IUSE="+jemalloc selinux ssl systemd tcmalloc test"
+RESTRICT="!test? ( test )"
+
+DEPEND="
+ jemalloc? ( >=dev-libs/jemalloc-5.1:=[stats] )
+ ssl? ( dev-libs/openssl:0= )
+ systemd? ( sys-apps/systemd:= )
+ tcmalloc? ( dev-util/google-perftools )
+"
+
+RDEPEND="
+ ${DEPEND}
+ acct-group/redis
+ acct-user/redis
+ selinux? ( sec-policy/selinux-redis )
+"
+
+BDEPEND="
+ acct-group/redis
+ acct-user/redis
+ virtual/pkgconfig
+ test? (
+ dev-lang/tcl:0=
+ ssl? ( dev-tcltk/tls )
+ )
+"
+
+REQUIRED_USE="?? ( jemalloc tcmalloc )"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-6.2.1-config.patch
+ "${FILESDIR}"/${PN}-7.2.0-system-jemalloc.patch
+ "${FILESDIR}"/${PN}-6.2.3-ppc-atomic.patch
+ "${FILESDIR}"/${PN}-sentinel-7.2.0-config.patch
+ "${FILESDIR}"/${PN}-7.0.4-no-which.patch
+)
+
+src_prepare() {
+ default
+
+ # Respect user CFLAGS in bundled lua
+ sed -i '/LUA_CFLAGS/s: -O2::g' deps/Makefile || die
+
+ # now we will rewrite present Makefiles
+ local makefiles="" MKF
+ local mysedconf=(
+ -e 's:$(CC):@CC@:g'
+ -e 's:$(CFLAGS):@AM_CFLAGS@:g'
+ -e 's: $(DEBUG)::g'
+
+ -e 's:-Werror ::g'
+ -e 's:-Werror=deprecated-declarations ::g'
+ )
+ for MKF in $(find -name 'Makefile' | cut -b 3-); do
+ mv "${MKF}" "${MKF}.in"
+ sed -i "${mysedconf[@]}" "${MKF}.in" || die "Sed failed for ${MKF}"
+ makefiles+=" ${MKF}"
+ done
+ # autodetection of compiler and settings; generates the modified Makefiles
+ cp "${FILESDIR}"/configure.ac-7.0 configure.ac || die
+
+ sed -i \
+ -e "/^AC_INIT/s|, __PV__, |, $PV, |" \
+ -e "s:AC_CONFIG_FILES(\[Makefile\]):AC_CONFIG_FILES([${makefiles}]):g" \
+ configure.ac || die "Sed failed for configure.ac"
+ eautoreconf
+}
+
+src_configure() {
+ econf
+
+ # Linenoise can't be built with -std=c99, see https://bugs.gentoo.org/451164
+ # also, don't define ANSI/c99 for lua twice
+ sed -i -e "s:-std=c99::g" deps/linenoise/Makefile deps/Makefile || die
+}
+
+src_compile() {
+ tc-export AR CC RANLIB
+
+ local myconf=(
+ AR="${AR}"
+ CC="${CC}"
+ RANLIB="${RANLIB}"
+
+ V=1 # verbose
+
+ # OPTIMIZATION defaults to -O3. Let's respect user CFLAGS by setting it
+ # to empty value.
+ OPTIMIZATION=''
+ # Disable debug flags in bundled hiredis
+ DEBUG_FLAGS=''
+
+ BUILD_TLS=$(usex ssl)
+ USE_SYSTEMD=$(usex systemd)
+ )
+
+ if use jemalloc; then
+ myconf+=( MALLOC=jemalloc )
+ elif use tcmalloc; then
+ myconf+=( MALLOC=tcmalloc )
+ else
+ myconf+=( MALLOC=libc )
+ fi
+
+ emake "${myconf[@]}"
+}
+
+src_test() {
+ local runtestargs=(
+ --clients "$(makeopts_jobs)" # see bug #649868
+
+ --skiptest "Active defrag eval scripts" # see bug #851654
+ )
+
+ if has usersandbox ${FEATURES} || ! has userpriv ${FEATURES}; then
+ ewarn "oom-score-adj related tests will be skipped." \
+ "They are known to fail with FEATURES usersandbox or -userpriv. See bug #756382."
+
+ runtestargs+=(
+ # unit/oom-score-adj was introduced in version 6.2.0
+ --skipunit unit/oom-score-adj # see bug #756382
+
+ # Following test was added in version 7.0.0 to unit/introspection.
+ # It also tries to adjust OOM score.
+ --skiptest "CONFIG SET rollback on apply error"
+ )
+ fi
+
+ if use ssl; then
+ edo ./utils/gen-test-certs.sh
+ runtestargs+=( --tls )
+ fi
+
+ edo ./runtest "${runtestargs[@]}"
+}
+
+src_install() {
+ insinto /etc/redis
+ doins redis.conf sentinel.conf
+ use prefix || fowners -R redis:redis /etc/redis /etc/redis/{redis,sentinel}.conf
+ fperms 0750 /etc/redis
+ fperms 0644 /etc/redis/{redis,sentinel}.conf
+
+ newconfd "${FILESDIR}/redis.confd-r2" redis
+ newinitd "${FILESDIR}/redis.initd-6" redis
+
+ systemd_newunit "${FILESDIR}/redis.service-4" redis.service
+ newtmpfiles "${FILESDIR}/redis.tmpfiles-2" redis.conf
+
+ newconfd "${FILESDIR}/redis-sentinel.confd-r1" redis-sentinel
+ newinitd "${FILESDIR}/redis-sentinel.initd-r1" redis-sentinel
+
+ insinto /etc/logrotate.d/
+ newins "${FILESDIR}/${PN}.logrotate" ${PN}
+
+ dodoc 00-RELEASENOTES BUGS CONTRIBUTING.md MANIFESTO README.md
+
+ dobin src/redis-cli
+ dosbin src/redis-benchmark src/redis-server src/redis-check-aof src/redis-check-rdb
+ fperms 0750 /usr/sbin/redis-benchmark
+ dosym redis-server /usr/sbin/redis-sentinel
+
+ if use prefix; then
+ diropts -m0750
+ else
+ diropts -m0750 -o redis -g redis
+ fi
+ keepdir /var/{log,lib}/redis
+}
+
+pkg_postinst() {
+ tmpfiles_process redis.conf
+}