Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

postgres95: Bugfix, Make PostgreSQL work with newer libxml2 #26726

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion databases/postgresql95/Portfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4

Check warning on line 1 in databases/postgresql95/Portfile

View workflow job for this annotation

GitHub Actions / macos-14

port lint postgresql95: Warning: Line 12 contains tab but modeline says tabs should be expanded Warning: Line 13 contains tab but modeline says tabs should be expanded Warning: Line 16 contains tab but modeline says tabs should be expanded Warning: Line 17 contains tab but modeline says tabs should be expanded Warning: Line 18 contains tab but modeline says tabs should be expanded Warning: Line 19 contains tab but modeline says tabs should be expanded Warning: Line 21 contains tab but modeline says tabs should be expanded Warning: Line 22 contains tab but modeline says tabs should be expanded Warning: Line 23 contains tab but modeline says tabs should be expanded Warning: Line 24 contains tab but modeline says tabs should be expanded Warning: Line 26 contains tab but modeline says tabs should be expanded Warning: Line 27 contains tab but modeline says tabs should be expanded Warning: Line 28 contains tab but modeline says tabs should be expanded Warning: Line 29 contains tab but modeline says tabs should be expanded Warning: Line 35 contains tab but modeline says tabs should be expanded Warning: Line 44 contains tab but modeline says tabs should be expanded Warning: Line 45 contains tab but modeline says tabs should be expanded Warning: Line 46 contains tab but modeline says tabs should be expanded Warning: Line 48 contains tab but modeline says tabs should be expanded Warning: Line 50 contains tab but modeline says tabs should be expanded Warning: Line 51 contains tab but modeline says tabs should be expanded Warning: Line 52 contains tab but modeline says tabs should be expanded Warning: Line 53 contains tab but modeline says tabs should be expanded Warning: Line 54 contains tab but modeline says tabs should be expanded Warning: Line 55 contains tab but modeline says tabs should be expanded Warning: Line 56 contains tab but modeline says tabs should be expanded Warning: Line 58 contains tab but modeline says tabs should be expanded Warning: Line 59 contains tab but modeline says tabs should be expanded Warning: Line 60 contains tab but modeline says tabs should be expanded Warning: Line 61 contains tab but modeline says tabs should be expanded Warning: Line 62 contains tab but modeline says tabs should be expanded Warning: Line 63 contains tab but modeline says tabs should be expanded Warning: Line 64 contains tab but modeline says tabs should be expanded Warning: Line 65 contains tab but modeline says tabs should be expanded Warning: Line 66 contains tab but modeline says tabs should be expanded Warning: Line 68 contains tab but modeline says tabs should be expanded Warning: Line 69 contains tab but modeline says tabs should be expanded Warning: Line 82 contains tab but modeline says tabs should be expanded Warning: Line 85 contains tab but modeline says tabs should be expanded Warning: Line 90 contains tab but modeline says tabs should be expanded Warning: Line 91 contains tab but modeline says tabs should be expanded Warning: Line 94 contains tab but modeline says tabs should be expanded Warning: Line 95 contains tab but modeline says tabs should be expanded Warning: Line 96 contains tab but modeline says tabs should be expanded Warning: Line 97 contains tab but modeline says tabs should be expanded Warning: Line 100 contains tab but modeline says tabs should be expanded Warning: Line 102 contains tab but modeline says tabs should be expanded Warning: Line 103 contains tab but modeline says tabs should be expanded Warning: Line 105 contains tab but modeline says tabs should be expanded Warning: Line 106 contains tab but modeline says tabs should be expanded Warning: Line 130 contains tab but modeline says tabs should be expanded Warning: Line 131 contains tab but modeline says tabs should be expanded Warning: Line 132 contains tab but modeline says tabs should be expanded Warning: Line 136 contains tab but modeline says tabs should be expanded Warning: Line 137 contains tab but modeline says tabs should be expanded Warning: Line 138 contains tab but modeline says tabs should be expanded Warning: Line 142 contains ta

Check warning on line 1 in databases/postgresql95/Portfile

View workflow job for this annotation

GitHub Actions / macos-13

port lint postgresql95: Warning: Line 12 contains tab but modeline says tabs should be expanded Warning: Line 13 contains tab but modeline says tabs should be expanded Warning: Line 16 contains tab but modeline says tabs should be expanded Warning: Line 17 contains tab but modeline says tabs should be expanded Warning: Line 18 contains tab but modeline says tabs should be expanded Warning: Line 19 contains tab but modeline says tabs should be expanded Warning: Line 21 contains tab but modeline says tabs should be expanded Warning: Line 22 contains tab but modeline says tabs should be expanded Warning: Line 23 contains tab but modeline says tabs should be expanded Warning: Line 24 contains tab but modeline says tabs should be expanded Warning: Line 26 contains tab but modeline says tabs should be expanded Warning: Line 27 contains tab but modeline says tabs should be expanded Warning: Line 28 contains tab but modeline says tabs should be expanded Warning: Line 29 contains tab but modeline says tabs should be expanded Warning: Line 35 contains tab but modeline says tabs should be expanded Warning: Line 44 contains tab but modeline says tabs should be expanded Warning: Line 45 contains tab but modeline says tabs should be expanded Warning: Line 46 contains tab but modeline says tabs should be expanded Warning: Line 48 contains tab but modeline says tabs should be expanded Warning: Line 50 contains tab but modeline says tabs should be expanded Warning: Line 51 contains tab but modeline says tabs should be expanded Warning: Line 52 contains tab but modeline says tabs should be expanded Warning: Line 53 contains tab but modeline says tabs should be expanded Warning: Line 54 contains tab but modeline says tabs should be expanded Warning: Line 55 contains tab but modeline says tabs should be expanded Warning: Line 56 contains tab but modeline says tabs should be expanded Warning: Line 58 contains tab but modeline says tabs should be expanded Warning: Line 59 contains tab but modeline says tabs should be expanded Warning: Line 60 contains tab but modeline says tabs should be expanded Warning: Line 61 contains tab but modeline says tabs should be expanded Warning: Line 62 contains tab but modeline says tabs should be expanded Warning: Line 63 contains tab but modeline says tabs should be expanded Warning: Line 64 contains tab but modeline says tabs should be expanded Warning: Line 65 contains tab but modeline says tabs should be expanded Warning: Line 66 contains tab but modeline says tabs should be expanded Warning: Line 68 contains tab but modeline says tabs should be expanded Warning: Line 69 contains tab but modeline says tabs should be expanded Warning: Line 82 contains tab but modeline says tabs should be expanded Warning: Line 85 contains tab but modeline says tabs should be expanded Warning: Line 90 contains tab but modeline says tabs should be expanded Warning: Line 91 contains tab but modeline says tabs should be expanded Warning: Line 94 contains tab but modeline says tabs should be expanded Warning: Line 95 contains tab but modeline says tabs should be expanded Warning: Line 96 contains tab but modeline says tabs should be expanded Warning: Line 97 contains tab but modeline says tabs should be expanded Warning: Line 100 contains tab but modeline says tabs should be expanded Warning: Line 102 contains tab but modeline says tabs should be expanded Warning: Line 103 contains tab but modeline says tabs should be expanded Warning: Line 105 contains tab but modeline says tabs should be expanded Warning: Line 106 contains tab but modeline says tabs should be expanded Warning: Line 130 contains tab but modeline says tabs should be expanded Warning: Line 131 contains tab but modeline says tabs should be expanded Warning: Line 132 contains tab but modeline says tabs should be expanded Warning: Line 136 contains tab but modeline says tabs should be expanded Warning: Line 137 contains tab but modeline says tabs should be expanded Warning: Line 138 contains tab but modeline says tabs should be expanded Warning: Line 142 contains ta

Check warning on line 1 in databases/postgresql95/Portfile

View workflow job for this annotation

GitHub Actions / macos-15

port lint postgresql95: Warning: Line 12 contains tab but modeline says tabs should be expanded Warning: Line 13 contains tab but modeline says tabs should be expanded Warning: Line 16 contains tab but modeline says tabs should be expanded Warning: Line 17 contains tab but modeline says tabs should be expanded Warning: Line 18 contains tab but modeline says tabs should be expanded Warning: Line 19 contains tab but modeline says tabs should be expanded Warning: Line 21 contains tab but modeline says tabs should be expanded Warning: Line 22 contains tab but modeline says tabs should be expanded Warning: Line 23 contains tab but modeline says tabs should be expanded Warning: Line 24 contains tab but modeline says tabs should be expanded Warning: Line 26 contains tab but modeline says tabs should be expanded Warning: Line 27 contains tab but modeline says tabs should be expanded Warning: Line 28 contains tab but modeline says tabs should be expanded Warning: Line 29 contains tab but modeline says tabs should be expanded Warning: Line 35 contains tab but modeline says tabs should be expanded Warning: Line 44 contains tab but modeline says tabs should be expanded Warning: Line 45 contains tab but modeline says tabs should be expanded Warning: Line 46 contains tab but modeline says tabs should be expanded Warning: Line 48 contains tab but modeline says tabs should be expanded Warning: Line 50 contains tab but modeline says tabs should be expanded Warning: Line 51 contains tab but modeline says tabs should be expanded Warning: Line 52 contains tab but modeline says tabs should be expanded Warning: Line 53 contains tab but modeline says tabs should be expanded Warning: Line 54 contains tab but modeline says tabs should be expanded Warning: Line 55 contains tab but modeline says tabs should be expanded Warning: Line 56 contains tab but modeline says tabs should be expanded Warning: Line 58 contains tab but modeline says tabs should be expanded Warning: Line 59 contains tab but modeline says tabs should be expanded Warning: Line 60 contains tab but modeline says tabs should be expanded Warning: Line 61 contains tab but modeline says tabs should be expanded Warning: Line 62 contains tab but modeline says tabs should be expanded Warning: Line 63 contains tab but modeline says tabs should be expanded Warning: Line 64 contains tab but modeline says tabs should be expanded Warning: Line 65 contains tab but modeline says tabs should be expanded Warning: Line 66 contains tab but modeline says tabs should be expanded Warning: Line 68 contains tab but modeline says tabs should be expanded Warning: Line 69 contains tab but modeline says tabs should be expanded Warning: Line 82 contains tab but modeline says tabs should be expanded Warning: Line 85 contains tab but modeline says tabs should be expanded Warning: Line 90 contains tab but modeline says tabs should be expanded Warning: Line 91 contains tab but modeline says tabs should be expanded Warning: Line 94 contains tab but modeline says tabs should be expanded Warning: Line 95 contains tab but modeline says tabs should be expanded Warning: Line 96 contains tab but modeline says tabs should be expanded Warning: Line 97 contains tab but modeline says tabs should be expanded Warning: Line 100 contains tab but modeline says tabs should be expanded Warning: Line 102 contains tab but modeline says tabs should be expanded Warning: Line 103 contains tab but modeline says tabs should be expanded Warning: Line 105 contains tab but modeline says tabs should be expanded Warning: Line 106 contains tab but modeline says tabs should be expanded Warning: Line 130 contains tab but modeline says tabs should be expanded Warning: Line 131 contains tab but modeline says tabs should be expanded Warning: Line 132 contains tab but modeline says tabs should be expanded Warning: Line 136 contains tab but modeline says tabs should be expanded Warning: Line 137 contains tab but modeline says tabs should be expanded Warning: Line 138 contains tab but modeline says tabs should be expanded Warning: Line 142 contains ta

PortSystem 1.0
PortGroup compiler_blacklist_versions 1.0
Expand All @@ -7,7 +7,6 @@

# Final release was on 2021-02-08
deprecated.upstream_support no
known_fail yes

#remember to update the -doc and -server as well
name postgresql95
Expand Down Expand Up @@ -38,6 +37,10 @@
# do not build man or html files (use postgresqlXY-doc instead)
patchfiles-append patch-no_doc.diff

# https://www.postgresql.org/message-id/attachment/152769/v1-0001-Make-PostgreSQL-work-with-newer-version-of-libxml.patch
# diff -NaurdwB ./postgresql95-orig ./postgresql95-new | sed -E -e 's/\.\/postgresql95-(orig|new)/\./g' | sed -E -e 's|/opt/local|@@PREFIX@@|g' > ~/Downloads/patch-xml_c.diff
patchfiles-append patch-xml_c.diff

depends_lib port:readline path:lib/libssl.dylib:openssl port:zlib port:libxml2 port:libxslt
depends_build port:bison
depends_run port:postgresql_select-95
Expand Down
31 changes: 31 additions & 0 deletions databases/postgresql95/files/patch-xml_c.diff
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
diff -NaurdwB ./src/backend/utils/adt/xml.c ./src/backend/utils/adt/xml.c
--- ./src/backend/utils/adt/xml.c 2024-11-23 14:50:40
+++ ./src/backend/utils/adt/xml.c 2024-11-23 14:57:53
@@ -117,7 +117,12 @@

static xmlParserInputPtr xmlPgEntityLoader(const char *URL, const char *ID,
xmlParserCtxtPtr ctxt);
+/* https://www.postgresql.org/message-id/attachment/152769/v1-0001-Make-PostgreSQL-work-with-newer-version-of-libxml.patch */
+#if LIBXML_VERSION >= 21200
+static void xml_errorHandler(void *data, const xmlError *error);
+#else
static void xml_errorHandler(void *data, xmlErrorPtr error);
+#endif
static void xml_ereport_by_code(int level, int sqlcode,
const char *msg, int errcode);
static void chopStringInfoNewlines(StringInfo str);
@@ -1655,8 +1660,12 @@
/*
* Error handler for libxml errors and warnings
*/
-static void
-xml_errorHandler(void *data, xmlErrorPtr error)
+/* https://www.postgresql.org/message-id/attachment/152769/v1-0001-Make-PostgreSQL-work-with-newer-version-of-libxml.patch */
+#if LIBXML_VERSION >= 21200
+static void xml_errorHandler(void *data, const xmlError *error)
+#else
+static void xml_errorHandler(void *data, xmlErrorPtr error)
+#endif
{
PgXmlErrorContext *xmlerrcxt = (PgXmlErrorContext *) data;
xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) error->ctxt;