Package Details: postgresql-12-upgrade 12.19-1

Git Clone URL: https://aur.archlinux.org/postgresql-12-upgrade.git (read-only, click to copy)
Package Base: postgresql-12-upgrade
Description: PostgreSQL build for migrating between major versions with pg_upgrade
Upstream URL: https://www.postgresql.org/
Licenses: custom:PostgreSQL
Submitter: anatolik
Maintainer: None
Last Packager: doits
Votes: 0
Popularity: 0.000000
First Submitted: 2022-04-22 17:27 (UTC)
Last Updated: 2024-09-11 15:50 (UTC)

Latest Comments

matsjoyce commented on 2024-09-08 20:08 (UTC)

For anyone having errors building this package due to the patches, disable the checksum check for the patches and add -l (ignore whitespace) to the XML patch line in do_prepare. The package then build successfully for me.

doits commented on 2024-02-03 17:22 (UTC)

Pushed the update, hope it works for everybody now!

anatolik commented on 2024-01-21 16:29 (UTC)

@doits - I just disowned the package. Feel free to take the ownership and make the changes accordingly.

doits commented on 2024-01-21 12:39 (UTC) (edited on 2024-01-21 12:40 (UTC) by doits)

Here's a patch that makes it build again (and upgrades it to version 12.17)

patch
diff -ruN postgresql-12-upgrade/PKGBUILD postgresql-12-upgrade-patched/PKGBUILD
--- postgresql-12-upgrade/PKGBUILD  2022-07-18 23:05:00.000000000 +0200
+++ postgresql-12-upgrade-patched/PKGBUILD  2024-01-18 11:00:13.076505809 +0100
@@ -2,7 +2,7 @@
 # Maintainer: Dan McGee <dan@archlinux.org>

 pkgname=postgresql-12-upgrade
-pkgver=12.11
+pkgver=12.17
 _majorver=${pkgver%.*}
 pkgrel=1
 pkgdesc='PostgreSQL build for migrating between major versions with pg_upgrade'
@@ -16,13 +16,27 @@
             'perl: for PL/Perl support'
             'tcl: for PL/Tcl support')
 options=('debug')
-source=(https://ftp.postgresql.org/pub/source/v${pkgver}/postgresql-${pkgver}.tar.bz2)
-md5sums=('16f210fbc23c0576750d920194497300')
-sha256sums=('1026248a5fd2beeaf43e4c7236ac817e56d58b681a335856465dfbc75b3e8302')
-b2sums=('7062d334f3ef3b98f69e709f5de744324c7ce53ea516384902632a454a2ccadfd7bcc0c9ef4d51a685dd7a06e1fdccc292109294517831181c3db30bc2b7be91')
+source=(https://ftp.postgresql.org/pub/source/v${pkgver}/postgresql-${pkgver}.tar.bz2
+        postgresql-perl-rpath.patch
+        postgresql-fix-libxml2-2.12.patch)
+md5sums=('35307327ee61f9c8c973d54a8cb091bc'
+         '8d52369bafe10a61d168dfa4c4d6fb58'
+         'f0784a861197e530169110dffdf49815')
+sha256sums=('93e8e1b23981d5f03c6c5763f77b28184c1ce4db7194fa466e2edb65d9c1c5f6'
+            'bd8e0f6ecb7c1b9b5d34eaa1d456cac20160e8350a9a151e31557a0ec7a51deb'
+            '79ab94d82027699135d4cbbf4f5e65747d575569e8ce1b8ed07dc1e002321a6e')
+b2sums=('dda4b06d8d36d3257e1eea251ccbdf38f1ce63ca811045b7b8d156d2b54614304b83b30ad3b1ead4e7ad74fa9f42acc8934f648902e17a4f7c89a117dc8e3c03'
+        '748515d1fcb0176dac4d74435e8fbe655989e31cc65cb2871bf05822dd5cc52b2e4014b8915f039c6f09b0230236add830ce981c7dc1b2269bdaad6620e88e8b'
+        'a7f69aba1a33bb8977ae59d91fb86d32e20e8e8dac6d5be76ee3af9ace0ca2ee45efb73dbf992159f64376ec9aeee181c90cb71e2827231ab108971619ed1a53')

 # Upstream provides md5 and sha256

+prepare() {
+  cd postgresql-${pkgver}
+  patch -p1 < ../postgresql-perl-rpath.patch
+  patch -p1 < ../postgresql-fix-libxml2-2.12.patch
+}
+
 build() {
   cd postgresql-${pkgver}
   local configure_options=(
diff -ruN postgresql-12-upgrade/postgresql-fix-libxml2-2.12.patch postgresql-12-upgrade-patched/postgresql-fix-libxml2-2.12.patch
--- postgresql-12-upgrade/postgresql-fix-libxml2-2.12.patch 1970-01-01 01:00:00.000000000 +0100
+++ postgresql-12-upgrade-patched/postgresql-fix-libxml2-2.12.patch 2024-01-18 10:53:25.788364557 +0100
@@ -0,0 +1,27 @@
+--- postgresql-12.17/src/backend/utils/adt/xml.c.orig   2023-11-06 23:11:55.000000000 +0100
++++ postgresql-12.17/src/backend/utils/adt/xml.c    2024-01-09 17:34:53.613808376 +0100
+@@ -119,7 +119,11 @@
+
+ static xmlParserInputPtr xmlPgEntityLoader(const char *URL, const char *ID,
+                                          xmlParserCtxtPtr ctxt);
++#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);
+@@ -1751,8 +1755,12 @@
+ /*
+  * Error handler for libxml errors and warnings
+  */
++#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;
diff -ruN postgresql-12-upgrade/postgresql-perl-rpath.patch postgresql-12-upgrade-patched/postgresql-perl-rpath.patch
--- postgresql-12-upgrade/postgresql-perl-rpath.patch   1970-01-01 01:00:00.000000000 +0100
+++ postgresql-12-upgrade-patched/postgresql-perl-rpath.patch   2024-01-18 10:58:13.023124504 +0100
@@ -0,0 +1,13 @@
+diff -Naur postgresql-9.1.5.orig/src/pl/plperl/GNUmakefile postgresql-9.1.5/src/pl/plperl/GNUmakefile
+--- postgresql-9.1.5.orig/src/pl/plperl/GNUmakefile    2012-08-14 18:41:04.000000000 -0400
++++ postgresql-9.1.5/src/pl/plperl/GNUmakefile 2012-08-17 11:15:09.457116708 -0400
+@@ -55,6 +55,9 @@
+
+ SHLIB_LINK = $(perl_embed_ldflags)
+
++# Force rpath to be used even though we disable it everywhere else
++SHLIB_LINK += $(rpath)
++
+ REGRESS_OPTS = --dbname=$(PL_TESTDB) --load-extension=plperl  --load-extension=plperlu
+ REGRESS = plperl_setup plperl plperl_lc plperl_trigger plperl_shared \
+   plperl_elog plperl_util plperl_init plperlu plperl_array \

niqingliang2003 commented on 2023-11-25 01:15 (UTC)

@AlexBocken any workaround?

AlexBocken commented on 2023-07-31 15:40 (UTC)

Does not build anymore. Tried in a clean chroot via extra-x86_64-build and this is the last ~1000 lines of the build logs (pastebin doesn't allow for the full logs, let me know if you want them and i can send them to you in another way) https://pastebin.com/1zaeqErJ