From: "Sam James" <sam@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-db/mariadb/files/, dev-db/mariadb/
Date: Tue, 3 Dec 2024 08:08:24 +0000 (UTC) [thread overview]
Message-ID: <1733213271.505a3759e913c5a1bafc87b4967d68099b97c925.sam@gentoo> (raw)
commit: 505a3759e913c5a1bafc87b4967d68099b97c925
Author: Z. Liu <zhixu.liu <AT> gmail <DOT> com>
AuthorDate: Mon Sep 2 08:26:20 2024 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Dec 3 08:07:51 2024 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=505a3759
dev-db/mariadb: fix build failed
1. <=10.6.17 add patch related with libxml2 2.12 from upstream
see https://github.com/MariaDB/server/commit/cae18632aea530eb73a9f15ee4fd0d924e01a8d3
2. if systemtap build w/o dtrace-symlink, build will failed w/:
DTRACE-NOTFOUND: command not found
Bug: https://bugs.gentoo.org/917537
Closes: https://bugs.gentoo.org/943306
Signed-off-by: Z. Liu <zhixu.liu <AT> gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/38377
Signed-off-by: Sam James <sam <AT> gentoo.org>
.../files/mariadb-10.6.17-libxml-2.12.patch | 167 +++++++++++++++++++++
dev-db/mariadb/mariadb-10.11.10.ebuild | 6 +
dev-db/mariadb/mariadb-10.6.14.ebuild | 7 +
dev-db/mariadb/mariadb-10.6.17.ebuild | 7 +
4 files changed, 187 insertions(+)
diff --git a/dev-db/mariadb/files/mariadb-10.6.17-libxml-2.12.patch b/dev-db/mariadb/files/mariadb-10.6.17-libxml-2.12.patch
new file mode 100644
index 000000000000..d5568afa47d2
--- /dev/null
+++ b/dev-db/mariadb/files/mariadb-10.6.17-libxml-2.12.patch
@@ -0,0 +1,167 @@
+From cae18632aea530eb73a9f15ee4fd0d924e01a8d3 Mon Sep 17 00:00:00 2001
+From: Jan Tojnar <jtojnar@gmail.com>
+Date: Sun, 7 Jan 2024 10:19:54 +0100
+Subject: [PATCH] MDEV-33439 Fix build with libxml2 2.12
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+libxml2 2.12.0 made `xmlGetLastError()` return `const` pointer:
+
+https://gitlab.gnome.org/GNOME/libxml2/-/commit/61034116d0a3c8b295c6137956adc3ae55720711
+
+Clang 16 does not like this:
+
+ error: assigning to 'xmlErrorPtr' (aka '_xmlError *') from 'const xmlError *' (aka 'const _xmlError *') discards qualifiers
+ error: cannot initialize a variable of type 'xmlErrorPtr' (aka '_xmlError *') with an rvalue of type 'const xmlError *' (aka 'const _xmlError *')
+
+Let’s update the variables to `const`.
+For older versions, it will be automatically converted.
+
+But then `xmlResetError(xmlError*)` will not like the `const` pointer:
+
+ error: no matching function for call to 'xmlResetError'
+ note: candidate function not viable: 1st argument ('const xmlError *' (aka 'const _xmlError *')) would lose const qualifier
+
+Let’s replace it with `xmlResetLastError()`.
+
+ALso remove `LIBXMLDOC::Xerr` protected member property.
+It was introduced in 65b0e5455b547a3d574fa77b34cce23ae3bea0a0
+along with the `xmlResetError` calls.
+It does not appear to be used for anything.
+---
+ storage/connect/libdoc.cpp | 39 +++++++++++++++++++-------------------
+ 1 file changed, 19 insertions(+), 20 deletions(-)
+
+diff --git a/storage/connect/libdoc.cpp b/storage/connect/libdoc.cpp
+index 14e1e44895c..01b38366d63 100644
+--- a/storage/connect/libdoc.cpp
++++ b/storage/connect/libdoc.cpp
+@@ -93,7 +93,6 @@ class LIBXMLDOC : public XMLDOCUMENT {
+ xmlXPathContextPtr Ctxp;
+ xmlXPathObjectPtr Xop;
+ xmlXPathObjectPtr NlXop;
+- xmlErrorPtr Xerr;
+ char *Buf; // Temporary
+ bool Nofreelist;
+ }; // end of class LIBXMLDOC
+@@ -327,7 +326,6 @@ LIBXMLDOC::LIBXMLDOC(char *nsl, char *nsdf, char *enc, PFBLOCK fp)
+ Ctxp = NULL;
+ Xop = NULL;
+ NlXop = NULL;
+- Xerr = NULL;
+ Buf = NULL;
+ Nofreelist = false;
+ } // end of LIBXMLDOC constructor
+@@ -365,8 +363,8 @@ bool LIBXMLDOC::ParseFile(PGLOBAL g, char *fn)
+ Encoding = (char*)Docp->encoding;
+
+ return false;
+- } else if ((Xerr = xmlGetLastError()))
+- xmlResetError(Xerr);
++ } else if (xmlGetLastError())
++ xmlResetLastError();
+
+ return true;
+ } // end of ParseFile
+@@ -505,9 +503,9 @@ int LIBXMLDOC::DumpDoc(PGLOBAL g, char *ofn)
+ #if 1
+ // This function does not crash (
+ if (xmlSaveFormatFileEnc((const char *)ofn, Docp, Encoding, 0) < 0) {
+- xmlErrorPtr err = xmlGetLastError();
++ const xmlError *err = xmlGetLastError();
+ strcpy(g->Message, (err) ? err->message : "Error saving XML doc");
+- xmlResetError(Xerr);
++ xmlResetLastError();
+ rc = -1;
+ } // endif Save
+ // rc = xmlDocDump(of, Docp);
+@@ -546,8 +544,8 @@ void LIBXMLDOC::CloseDoc(PGLOBAL g, PFBLOCK xp)
+ if (Nlist) {
+ xmlXPathFreeNodeSet(Nlist);
+
+- if ((Xerr = xmlGetLastError()))
+- xmlResetError(Xerr);
++ if (xmlGetLastError())
++ xmlResetLastError();
+
+ Nlist = NULL;
+ } // endif Nlist
+@@ -555,8 +553,8 @@ void LIBXMLDOC::CloseDoc(PGLOBAL g, PFBLOCK xp)
+ if (Xop) {
+ xmlXPathFreeObject(Xop);
+
+- if ((Xerr = xmlGetLastError()))
+- xmlResetError(Xerr);
++ if (xmlGetLastError())
++ xmlResetLastError();
+
+ Xop = NULL;
+ } // endif Xop
+@@ -564,8 +562,8 @@ void LIBXMLDOC::CloseDoc(PGLOBAL g, PFBLOCK xp)
+ if (NlXop) {
+ xmlXPathFreeObject(NlXop);
+
+- if ((Xerr = xmlGetLastError()))
+- xmlResetError(Xerr);
++ if (xmlGetLastError())
++ xmlResetLastError();
+
+ NlXop = NULL;
+ } // endif NlXop
+@@ -573,8 +571,8 @@ void LIBXMLDOC::CloseDoc(PGLOBAL g, PFBLOCK xp)
+ if (Ctxp) {
+ xmlXPathFreeContext(Ctxp);
+
+- if ((Xerr = xmlGetLastError()))
+- xmlResetError(Xerr);
++ if (xmlGetLastError())
++ xmlResetLastError();
+
+ Ctxp = NULL;
+ } // endif Ctxp
+@@ -590,6 +588,7 @@ void LIBXMLDOC::CloseDoc(PGLOBAL g, PFBLOCK xp)
+ /******************************************************************/
+ xmlNodeSetPtr LIBXMLDOC::GetNodeList(PGLOBAL g, xmlNodePtr np, char *xp)
+ {
++ const xmlError *xerr;
+ xmlNodeSetPtr nl;
+
+ if (trace(1))
+@@ -649,11 +648,11 @@ xmlNodeSetPtr LIBXMLDOC::GetNodeList(PGLOBAL g, xmlNodePtr np, char *xp)
+ } else
+ xmlXPathFreeObject(Xop); // Caused node not found
+
+- if ((Xerr = xmlGetLastError())) {
+- strcpy(g->Message, Xerr->message);
+- xmlResetError(Xerr);
++ if ((xerr = xmlGetLastError())) {
++ strcpy(g->Message, xerr->message);
++ xmlResetLastError();
+ return NULL;
+- } // endif Xerr
++ } // endif xerr
+
+ } // endif Xop
+
+@@ -1079,7 +1078,7 @@ void XML2NODE::AddText(PGLOBAL g, PCSZ txtp)
+ /******************************************************************/
+ void XML2NODE::DeleteChild(PGLOBAL g, PXNODE dnp)
+ {
+- xmlErrorPtr xerr;
++ const xmlError *xerr;
+
+ if (trace(1))
+ htrc("DeleteChild: node=%p\n", dnp);
+@@ -1122,7 +1121,7 @@ void XML2NODE::DeleteChild(PGLOBAL g, PXNODE dnp)
+ if (trace(1))
+ htrc("DeleteChild: errmsg=%-.256s\n", xerr->message);
+
+- xmlResetError(xerr);
++ xmlResetLastError();
+ } // end of DeleteChild
+
+ /* -------------------- class XML2NODELIST ---------------------- */
+--
+2.26.2
+
diff --git a/dev-db/mariadb/mariadb-10.11.10.ebuild b/dev-db/mariadb/mariadb-10.11.10.ebuild
index e2453ed0620e..ba34ac69f32e 100644
--- a/dev-db/mariadb/mariadb-10.11.10.ebuild
+++ b/dev-db/mariadb/mariadb-10.11.10.ebuild
@@ -355,6 +355,12 @@ src_configure() {
mycmakeargs+=( -DWITH_SSL=bundled )
fi
+ if use systemtap && has_version "dev-debug/systemtap[-dtrace-symlink(+)]" ; then
+ mycmakeargs+=(
+ -DDTRACE="${BROOT}"/usr/bin/stap-dtrace
+ )
+ fi
+
# bfd.h is only used starting with 10.1 and can be controlled by NOT_FOR_DISTRIBUTION
mycmakeargs+=(
-DWITH_READLINE=$(usex bindist 1 0)
diff --git a/dev-db/mariadb/mariadb-10.6.14.ebuild b/dev-db/mariadb/mariadb-10.6.14.ebuild
index 25e4c8272981..96dee3339e82 100644
--- a/dev-db/mariadb/mariadb-10.6.14.ebuild
+++ b/dev-db/mariadb/mariadb-10.6.14.ebuild
@@ -219,6 +219,7 @@ src_prepare() {
eapply "${FILESDIR}"/${PN}-10.6.11-gssapi.patch
eapply "${FILESDIR}"/${PN}-10.6.11-include.patch
eapply "${FILESDIR}"/${PN}-10.6.12-gcc-13.patch
+ eapply "${FILESDIR}"/${PN}-10.6.17-libxml-2.12.patch
eapply_user
@@ -362,6 +363,12 @@ src_configure() {
mycmakeargs+=( -DWITH_SSL=bundled )
fi
+ if use systemtap && has_version "dev-debug/systemtap[-dtrace-symlink(+)]" ; then
+ mycmakeargs+=(
+ -DDTRACE="${BROOT}"/usr/bin/stap-dtrace
+ )
+ fi
+
# bfd.h is only used starting with 10.1 and can be controlled by NOT_FOR_DISTRIBUTION
mycmakeargs+=(
-DWITH_READLINE=$(usex bindist 1 0)
diff --git a/dev-db/mariadb/mariadb-10.6.17.ebuild b/dev-db/mariadb/mariadb-10.6.17.ebuild
index f0e877f4ab0c..dcd22d1295c2 100644
--- a/dev-db/mariadb/mariadb-10.6.17.ebuild
+++ b/dev-db/mariadb/mariadb-10.6.17.ebuild
@@ -218,6 +218,7 @@ src_prepare() {
eapply "${WORKDIR}"/mariadb-patches
eapply "${FILESDIR}"/${PN}-10.6.11-gssapi.patch
eapply "${FILESDIR}"/${PN}-10.6.12-gcc-13.patch
+ eapply "${FILESDIR}"/${PN}-10.6.17-libxml-2.12.patch
eapply_user
@@ -361,6 +362,12 @@ src_configure() {
mycmakeargs+=( -DWITH_SSL=bundled )
fi
+ if use systemtap && has_version "dev-debug/systemtap[-dtrace-symlink(+)]" ; then
+ mycmakeargs+=(
+ -DDTRACE="${BROOT}"/usr/bin/stap-dtrace
+ )
+ fi
+
# bfd.h is only used starting with 10.1 and can be controlled by NOT_FOR_DISTRIBUTION
mycmakeargs+=(
-DWITH_READLINE=$(usex bindist 1 0)
next reply other threads:[~2024-12-03 8:08 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-03 8:08 Sam James [this message]
-- strict thread matches above, loose matches on Subject: below --
2023-04-14 4:00 [gentoo-commits] repo/gentoo:master commit in: dev-db/mariadb/files/, dev-db/mariadb/ Sam James
2022-06-06 0:37 Sam James
2020-10-07 22:30 Thomas Deutschmann
2019-11-08 19:58 Brian Evans
2019-11-06 18:12 Brian Evans
2019-08-07 16:54 Brian Evans
2018-06-21 12:39 Brian Evans
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1733213271.505a3759e913c5a1bafc87b4967d68099b97c925.sam@gentoo \
--to=sam@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox