=== Applying patches on top of PostgreSQL commit ID 665cafe8a4bd23b4f14194b0671d3ef09dc55864 === /etc/rc.d/jail: WARNING: Per-jail configuration via jail_* variables is obsolete. Please consider migrating to /etc/jail.conf. Fri Feb 21 14:21:24 UTC 2025 On branch cf/5558 nothing to commit, working tree clean === applying patch ./0001-Add-optional-dependency-to-libnuma-for-basic-NUMA-aw.patch Applied patch to '.cirrus.tasks.yml' cleanly. Applied patch to 'configure.ac' with conflicts. Applied patch to 'meson.build' with conflicts. Applied patch to 'meson_options.txt' cleanly. Applied patch to 'src/Makefile.global.in' with conflicts. Applied patch to 'src/backend/Makefile' cleanly. Applied patch to 'src/include/pg_config.h.in' with conflicts. Applied patch to 'src/makefiles/meson.build' with conflicts. U configure.ac U meson.build U src/Makefile.global.in U src/include/pg_config.h.in U src/makefiles/meson.build diff --cc configure.ac index b6d02f5ecc,fbdacc9b24..0000000000 --- a/configure.ac +++ b/configure.ac @@@ -1008,39 -1008,18 +1008,54 @@@ AC_SUBST(with_uuid # ++<<<<<<< ours +# libcurl +# +AC_MSG_CHECKING([whether to build with libcurl support]) +PGAC_ARG_BOOL(with, libcurl, no, [build with libcurl support], + [AC_DEFINE([USE_LIBCURL], 1, [Define to 1 to build with libcurl support. (--with-libcurl)])]) +AC_MSG_RESULT([$with_libcurl]) +AC_SUBST(with_libcurl) + +if test "$with_libcurl" = yes ; then + # Check for libcurl 7.61.0 or higher (corresponding to RHEL8 and the ability + # to explicitly set TLS 1.3 ciphersuites). + PKG_CHECK_MODULES(LIBCURL, [libcurl >= 7.61.0]) + + # We only care about -I, -D, and -L switches; + # note that -lcurl will be added by PGAC_CHECK_LIBCURL below. + for pgac_option in $LIBCURL_CFLAGS; do + case $pgac_option in + -I*|-D*) CPPFLAGS="$CPPFLAGS $pgac_option";; + esac + done + for pgac_option in $LIBCURL_LIBS; do + case $pgac_option in + -L*) LDFLAGS="$LDFLAGS $pgac_option";; + esac + done + + # OAuth requires python for testing + if test "$with_python" != yes; then + AC_MSG_WARN([*** OAuth support tests require --with-python to run]) + fi +fi + + ++======= + # libnuma + # + AC_MSG_CHECKING([whether to build with libnuma support]) + PGAC_ARG_BOOL(with, libnuma, no, [use libnuma for NUMA awareness], + [AC_DEFINE([USE_LIBNUMA], 1, [Define to build with NUMA awareness support. (--with-libnuma)])]) + AC_MSG_RESULT([$with_libnuma]) + AC_SUBST(with_libnuma) + + if test "$with_libnuma" = yes ; then + AC_CHECK_LIB(numa, numa_available, [], [AC_MSG_ERROR([library 'libnuma' is required for NUMA awareness])]) + fi + ++>>>>>>> theirs # # XML # diff --cc meson.build index 574f992ed4,d077ff8088..0000000000 --- a/meson.build +++ b/meson.build @@@ -854,102 -853,22 +854,117 @@@ els endif + ############################################################### + # Library: libnuma + ############################################################### + + libnumaopt = get_option('libnuma') + libnuma = dependency('libnuma', required: libnumaopt) + if not libnuma.found() + libnuma = cc.find_library('numa', required: libnumaopt, dirs: test_lib_d) + endif + if libnuma.found() + cdata.set('USE_LIBNUMA', 1) + else + libnuma = not_found_dep + endif + +############################################################### +# Library: libcurl +############################################################### + +libcurlopt = get_option('libcurl') +if not libcurlopt.disabled() + # Check for libcurl 7.61.0 or higher (corresponding to RHEL8 and the ability + # to explicitly set TLS 1.3 ciphersuites). + libcurl = dependency('libcurl', version: '>= 7.61.0', required: libcurlopt) + if libcurl.found() + cdata.set('USE_LIBCURL', 1) + + # Check to see whether the current platform supports thread-safe Curl + # initialization. + libcurl_threadsafe_init = false + + if not meson.is_cross_build() + r = cc.run(''' + #include + + int main(void) + { + curl_version_info_data *info; + + if (curl_global_init(CURL_GLOBAL_ALL)) + return -1; + + info = curl_version_info(CURLVERSION_NOW); + #ifdef CURL_VERSION_THREADSAFE + if (info->features & CURL_VERSION_THREADSAFE) + return 0; + #endif + + return 1; + }''', + name: 'test for curl_global_init thread safety', + dependencies: libcurl, + ) + + assert(r.compiled()) + if r.returncode() == 0 + libcurl_threadsafe_init = true + message('curl_global_init is thread-safe') + elif r.returncode() == 1 + message('curl_global_init is not thread-safe') + else + message('curl_global_init failed; assuming not thread-safe') + endif + endif + + if libcurl_threadsafe_init + cdata.set('HAVE_THREADSAFE_CURL_GLOBAL_INIT', 1) + endif + + # Warn if a thread-friendly DNS resolver isn't built. + libcurl_async_dns = false + + if not meson.is_cross_build() + r = cc.run(''' + #include + + int main(void) + { + curl_version_info_data *info; + + if (curl_global_init(CURL_GLOBAL_ALL)) + return -1; + + info = curl_version_info(CURLVERSION_NOW); + return (info->features & CURL_VERSION_ASYNCHDNS) ? 0 : 1; + }''', + name: 'test for curl support for asynchronous DNS', + dependencies: libcurl, + ) + + assert(r.compiled()) + if r.returncode() == 0 + libcurl_async_dns = true + endif + endif + + if not libcurl_async_dns + warning(''' +*** The installed version of libcurl does not support asynchronous DNS +*** lookups. Connection timeouts will not be honored during DNS resolution, +*** which may lead to hangs in client programs.''') + endif + endif + +else + libcurl = not_found_dep +endif + + + ############################################################### # Library: libxml ############################################################### @@@ -3820,7 -3736,7 +3836,11 @@@ if meson.version().version_compare('>=0 'gss': gssapi, 'icu': icu, 'ldap': ldap, ++<<<<<<< ours + 'libcurl': libcurl, ++======= + 'libnuma': libnuma, ++>>>>>>> theirs 'libxml': libxml, 'libxslt': libxslt, 'llvm': llvm, diff --cc src/Makefile.global.in index 3b620bac5a,9c3fb2a471..0000000000 --- a/src/Makefile.global.in +++ b/src/Makefile.global.in @@@ -190,7 -190,7 +190,11 @@@ with_systemd = @with_systemd with_gssapi = @with_gssapi@ with_krb_srvnam = @with_krb_srvnam@ with_ldap = @with_ldap@ ++<<<<<<< ours +with_libcurl = @with_libcurl@ ++======= + with_libnuma = @with_libnuma@ ++>>>>>>> theirs with_libxml = @with_libxml@ with_libxslt = @with_libxslt@ with_llvm = @with_llvm@ diff --cc src/include/pg_config.h.in index db6454090d,88b0d5330b..0000000000 --- a/src/include/pg_config.h.in +++ b/src/include/pg_config.h.in @@@ -669,8 -663,8 +669,13 @@@ /* Define to 1 to build with LDAP support. (--with-ldap) */ #undef USE_LDAP ++<<<<<<< ours +/* Define to 1 to build with libcurl support. (--with-libcurl) */ +#undef USE_LIBCURL ++======= + /* Define to 1 to build with NUMA awareness support. (--with-libnuma) */ + #undef USE_LIBNUMA ++>>>>>>> theirs /* Define to 1 to build with XML support. (--with-libxml) */ #undef USE_LIBXML diff --cc src/makefiles/meson.build index 60e13d5023,211cc3ca0e..0000000000 --- a/src/makefiles/meson.build +++ b/src/makefiles/meson.build @@@ -229,7 -231,7 +231,11 @@@ pgxs_deps = 'gssapi': gssapi, 'icu': icu, 'ldap': ldap, ++<<<<<<< ours + 'libcurl': libcurl, ++======= + 'libnuma': libnuma, ++>>>>>>> theirs 'libxml': libxml, 'libxslt': libxslt, 'llvm': llvm,