]> git.ipfire.org Git - thirdparty/psycopg.git/commitdiff
chore: bump openssl to 3.3.1
authorDaniele Varrazzo <daniele.varrazzo@gmail.com>
Sun, 23 Jun 2024 21:45:51 +0000 (23:45 +0200)
committerDaniele Varrazzo <daniele.varrazzo@gmail.com>
Wed, 26 Jun 2024 13:03:10 +0000 (15:03 +0200)
Drop fallback version in build_libpq.sh script. It was useful to save
some typing in development but now it is confusing to have two versions.

.github/workflows/packages-bin.yml
tools/build/build_libpq.sh

index ab70f1f14a797e88b8438da3364080b2a014bef8..896264bc7ac2f09f4f22f08fb0e725fefe48b41a 100644 (file)
@@ -12,8 +12,10 @@ jobs:
     if: true
 
     env:
+      # Latest release: https://www.postgresql.org/ftp/source/
       LIBPQ_VERSION: "16.3"
-      OPENSSL_VERSION: "1.1.1w"
+      # Latest release: https://www.openssl.org/source/
+      OPENSSL_VERSION: "3.3.1"
 
     strategy:
       fail-fast: false
@@ -67,7 +69,7 @@ jobs:
             PGPASSWORD=password
             LIBPQ_BUILD_PREFIX=/host/tmp/libpq.build
             PATH="$LIBPQ_BUILD_PREFIX/bin:$PATH"
-            LD_LIBRARY_PATH="$LIBPQ_BUILD_PREFIX/lib"
+            LD_LIBRARY_PATH="$LIBPQ_BUILD_PREFIX/lib:$LIBPQ_BUILD_PREFIX/lib64"
             PSYCOPG_TEST_WANT_LIBPQ_BUILD=${{ env.LIBPQ_VERSION }}
             PSYCOPG_TEST_WANT_LIBPQ_IMPORT=${{ env.LIBPQ_VERSION }}
 
index 2a14e23b4c5300f919efc319c6e310b2e40cca1f..6abb4bf8688c422c5bd17093a3f214c343865421 100755 (executable)
@@ -4,14 +4,8 @@
 
 set -euo pipefail
 
-# WARNING: the version used in CI are defined in .github/workflows/packages-bin.yml
-
-# Latest release: https://www.postgresql.org/ftp/source/
-# IMPORTANT! Change the cache key in packages.yml when upgrading libraries
-postgres_version="${LIBPQ_VERSION:-16.0}"
-
-# Latest release: https://www.openssl.org/source/
-openssl_version="${OPENSSL_VERSION:-1.1.1v}"
+postgres_version="${LIBPQ_VERSION}"
+openssl_version="${OPENSSL_VERSION}"
 
 # Latest release: https://openldap.org/software/download/
 ldap_version="2.6.6"
@@ -31,7 +25,7 @@ source /etc/os-release
 case "$ID" in
     centos)
         yum update -y
-        yum install -y zlib-devel krb5-devel pam-devel
+        yum install -y zlib-devel krb5-devel pam-devel perl-IPC-Cmd
         ;;
 
     alpine)
@@ -49,7 +43,7 @@ if [ "$ID" == "centos" ]; then
   if [[ ! -f "${LIBPQ_BUILD_PREFIX}/openssl.cnf" ]]; then
 
     # Build openssl if needed
-    openssl_tag="OpenSSL_${openssl_version//./_}"
+    openssl_tag="openssl-${openssl_version}"
     openssl_dir="openssl-${openssl_tag}"
     if [ ! -d "${openssl_dir}" ]; then
         curl -fsSL \
@@ -159,13 +153,13 @@ if [ ! -d "${postgres_dir}" ]; then
 '|#define DEFAULT_PGSOCKET_DIR "/var/run/postgresql"|' \
         src/include/pg_config_manual.h
 
-    # Often needed, but currently set by the workflow
-    # export LD_LIBRARY_PATH="${LIBPQ_BUILD_PREFIX}/lib"
+    export LD_LIBRARY_PATH="${LIBPQ_BUILD_PREFIX}/lib:${LIBPQ_BUILD_PREFIX}/lib64"
 
     ./configure --prefix=${LIBPQ_BUILD_PREFIX} --sysconfdir=/etc/postgresql-common \
         --without-readline --without-icu \
         --with-gssapi --with-openssl --with-pam --with-ldap \
-        CPPFLAGS=-I${LIBPQ_BUILD_PREFIX}/include/ LDFLAGS=-L${LIBPQ_BUILD_PREFIX}/lib
+        CPPFLAGS=-I${LIBPQ_BUILD_PREFIX}/include/ \
+        LDFLAGS="-L${LIBPQ_BUILD_PREFIX}/lib -L${LIBPQ_BUILD_PREFIX}/lib64"
     make -C src/interfaces/libpq
     make -C src/bin/pg_config
     make -C src/include