]> git.ipfire.org Git - thirdparty/psycopg.git/commitdiff
ci: use the system version of the cyrus-sasl library
authorDaniele Varrazzo <daniele.varrazzo@gmail.com>
Sat, 11 Oct 2025 01:51:08 +0000 (03:51 +0200)
committerDaniele Varrazzo <daniele.varrazzo@gmail.com>
Sun, 12 Oct 2025 17:23:37 +0000 (19:23 +0200)
Version 2.1.28 cannot be built in the manylinux_2_28 image, likely because of
https://github.com/cyrusimap/cyrus-sasl/issues/844.

We were building it to work around an i686 problem, but now we are not
building those images anymore, so let's try to use the packaged version.

tools/ci/build_libpq.sh

index 0ae0f1d5c18249d3e0e72e8b84057ce33f60890a..bbcb7ca79690483c7d1943383b0768ba818d414a 100755 (executable)
@@ -14,9 +14,6 @@ krb5_version="1.21.3"
 # Latest release: https://openldap.org/software/download/
 ldap_version="2.6.9"
 
-# Latest release: https://github.com/cyrusimap/cyrus-sasl/releases
-sasl_version="2.1.28"
-
 export LIBPQ_BUILD_PREFIX=${LIBPQ_BUILD_PREFIX:-/tmp/libpq.build}
 
 case "$(uname)" in
@@ -53,7 +50,8 @@ fi
 case "$ID" in
     centos | almalinux)
         yum update -y
-        yum install -y flex krb5-devel pam-devel perl-IPC-Cmd perl-Time-Piece zlib-devel
+        yum install -y flex cyrus-sasl-devel krb5-devel pam-devel \
+            perl-IPC-Cmd perl-Time-Piece zlib-devel
         ;;
 
     alpine)
@@ -63,7 +61,7 @@ case "$ID" in
         ;;
 
     macos)
-        brew install automake m4 libtool
+        brew install automake cyrus-sasl libtool m4
         # If available, libpq seemingly insists on linking against homebrew's
         # openssl no matter what so remove it. Since homebrew's curl depends on
         # it, force use of system curl.
@@ -157,39 +155,6 @@ if [ "$ID" == "macos" ]; then
 fi
 
 
-if [ "$ID" == "centos" ] || [ "$ID" == "almalinux" ]|| [ "$ID" == "macos" ]; then
-  if [[ ! -f "${LIBPQ_BUILD_PREFIX}/lib/libsasl2.${library_suffix}" ]]; then
-
-    # Build libsasl2 if needed
-    # The system package (cyrus-sasl-devel) causes an amazing error on i686:
-    # "unsupported version 0 of Verneed record"
-    # https://github.com/pypa/manylinux/issues/376
-    sasl_tag="cyrus-sasl-${sasl_version}"
-    sasl_dir="cyrus-sasl-${sasl_tag}"
-    if [ ! -d "${sasl_dir}" ]; then
-        curl -fsSL \
-            https://github.com/cyrusimap/cyrus-sasl/archive/${sasl_tag}.tar.gz \
-            | tar xzf -
-
-        pushd "${sasl_dir}"
-
-        autoreconf -i
-        ./configure "${make_configure_standard_flags[@]}" --disable-macos-framework
-        make -s
-    else
-        pushd "${sasl_dir}"
-    fi
-
-    # Install libsasl2
-    # requires missing nroff to build
-    touch saslauthd/saslauthd.8
-    make install
-    popd
-
-  fi
-fi
-
-
 if [ "$ID" == "centos" ] || [ "$ID" == "almalinux" ]|| [ "$ID" == "macos" ]; then
   if [[ ! -f "${LIBPQ_BUILD_PREFIX}/lib/libldap.${library_suffix}" ]]; then