Package Details: postgis-old-upgrade 3.5.1-1

Git Clone URL: https://aur.archlinux.org/postgis-old-upgrade.git (read-only, click to copy)
Package Base: postgis-old-upgrade
Description: PostGIS build against postgresql-old-upgrade package for pg_upgrade
Upstream URL: https://postgis.net/
Licenses: GPL
Submitter: amdg
Maintainer: gds506
Last Packager: gds506
Votes: 8
Popularity: 1.00
First Submitted: 2018-12-17 20:08 (UTC)
Last Updated: 2025-01-15 14:06 (UTC)

Latest Comments

1 2 Next › Last »

tormod commented on 2025-01-20 23:19 (UTC)

You are right, the makepkg wiki page says "The checksum type and values should always be those provided by upstream, such as in release announcements". BTW, captaincoder's diff already had 3.5.1 nvm :)

gds506 commented on 2025-01-20 13:33 (UTC)

@captaincoder is correct. The PostGIS source download page gives the md5 instead of other hash types and that's why I used it (https://postgis.net/development/source_code/).

Another modification I did to @captaincoder diff is that I used the latest PostGIS 3.5.1... it was on 3.3.2 With these changes I had no issues doing the data migration.

captaincoder commented on 2025-01-20 10:54 (UTC)

@tormod, seems like my diff was applied. I choose md5 since that is what PostGIS supplies with their releases. I could have hashed it with something better but that presumes trust in my correct hashing. By sticking with md5 there are less links in the chain of trust.

Though come to think of it, I don't know how makepkg handles multiple hashes, does it check each if it has multiple hash types for a source file? If so then it should be no problem to keep the md5 and add other types.

tormod commented on 2025-01-19 15:09 (UTC)

@gds506, any reason you're going back to md5 instead of sha512 and b2?

captaincoder commented on 2025-01-15 12:35 (UTC)

@gds506, I (seem to) have successfully upgraded from 16->17 with postgis using the following diff

--- a/PKGBUILD
+++ b/PKGBUILD
@@ -5,9 +5,9 @@

 pkgname=postgis-old-upgrade
 _pkgname="${pkgname%-old-upgrade}"
-pkgver=3.3.2
-pkgrel=2
-_pg_majorver=14
+pkgver=3.5.1
+pkgrel=1
+_pg_majorver=16
 pkgdesc='PostGIS build against postgresql-old-upgrade package for pg_upgrade'
 arch=('x86_64')
 url='https://postgis.net/'
@@ -25,8 +25,7 @@ makedepends=('clang' 'llvm')
 optdepends=('perl: for scripts in contrib folder')
 options=('!makeflags')
 source=("https://download.osgeo.org/postgis/source/$_pkgname-$pkgver.tar.gz")
-sha512sums=('4dd129057598b032ba322c42888bb8ce14b9423bd450ef7a42fa22162f6b48e34b226f38480aa67fe2da85be2529b0822655855f9846b657bdd32f50256f4305')
-b2sums=('40dc7636f04e0d5cfd734b175da1ce49c32e4b8f5750059e79e03a7395fb8b9241c1f479815794b46dee81704d7c392fe7693c9f0180323d1ca21812c37d36b5')
+md5sums=('21d2cb87a5255d82fb12ff1b7b4d3795')

gds506 commented on 2025-01-15 00:47 (UTC)

Has anyone been successful upgrading Postgis from Postgres 16 to 17? I tried with a similar approach as @AlfredoRamos latest comment but this time it didn´t work :(

AlfredoRamos commented on 2023-12-08 23:29 (UTC) (edited on 2023-12-08 23:44 (UTC) by AlfredoRamos)

To upgrade from PostgreSQL 15 to 16 it seems that this package also needs Clang and LLVM 15.

--- a/PKGBUILD  2023-12-08 17:15:54.341708988 -0600
+++ b/PKGBUILD  2023-12-08 17:24:18.288207226 -0600
@@ -7,7 +7,7 @@ pkgname=postgis-old-upgrade
 _pkgname="${pkgname%-old-upgrade}"
 pkgver=3.3.2
 pkgrel=2
-_pg_majorver=14
+_pg_majorver=15
 pkgdesc='PostGIS build against postgresql-old-upgrade package for pg_upgrade'
 arch=('x86_64')
 url='https://postgis.net/'
@@ -21,7 +21,7 @@ depends=(
   'pcre'
   'libxml2'
 )
-makedepends=('clang' 'llvm')
+makedepends=('clang15' 'llvm15')
 optdepends=('perl: for scripts in contrib folder')
 options=('!makeflags')
 source=("https://download.osgeo.org/postgis/source/$_pkgname-$pkgver.tar.gz")

Otherwise you get the following errors:

make[1]: /usr/lib/llvm15/bin/clang: No such file or directory
make[1]: *** [/opt/pgsql-15/lib/pgxs/src/makefiles/../../src/Makefile.global:1094: postgis_module.bc] Error 127
/bin/sh: line 1: /usr/lib/llvm15/bin/llvm-lto: No such file or directory
make[1]: *** [/opt/pgsql-15/lib/pgxs/src/makefiles/pgxs.mk:240: install] Error 127

AchmadFathoni commented on 2023-05-13 00:41 (UTC) (edited on 2023-05-13 00:41 (UTC) by AchmadFathoni)

@kaitocross, You can try this

@@ -32,6 +32,7 @@ build() {
   cd "$_pkgname-$pkgver"

   export PG_CONFIG="/opt/pgsql-${_pg_majorver}/bin/pg_config"
+  export CXXFLAGS="$CXXFLAGS -std=c++17"

   ./configure --prefix="/opt/pgsql-${_pg_majorver}"
   make

kaitocross commented on 2023-04-07 01:42 (UTC) (edited on 2023-04-07 01:43 (UTC) by kaitocross)

It doesnt compile anymore on a recent Arch Linux system. Error:

make[2]: Verzeichnis „/home/username/.cache/yay/postgis-old-upgrade/src/postgis-3.3.2/deps/flatgeobuf“ wird betreten
gcc -std=c++11 -x c++ -I../../liblwgeom -I../../liblwgeom -I./include  -I/usr/include   -I/usr/include/libxml2  -I/usr/include/json-c   -DNDEBUG  -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions         -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security         -fstack-clash-protection -fcf-protection -Wp,-D_GLIBCXX_ASSERTIONS  -fPIC -DPIC -c -o flatgeobuf_c.o flatgeobuf_c.cpp
In Datei, eingebunden von /usr/include/absl/base/config.h:86,
                 von /usr/include/absl/base/attributes.h:37,
                 von /usr/include/absl/strings/string_view.h:39,
                 von ./include/flatbuffers/base.h:237,
                 von ./include/flatbuffers/array.h:20,
                 von ./include/flatbuffers/flatbuffers.h:22,
                 von feature_generated.h:7,
                 von flatgeobuf_c.cpp:26:
/usr/include/absl/base/policy_checks.h:79:2: Fehler: #error "C++ versions less than C++14 are not supported."
   79 | #error "C++ versions less than C++14 are not supported."
      |  ^~~~~