From: Marcin Krol Date: Mon, 1 Apr 2024 14:30:08 +0000 (+0200) Subject: - fix building with MySQL 8.x X-Git-Url: https://git.tld-linux.org/?p=packages%2Fapr-util.git;a=commitdiff_plain;h=HEAD;hp=2b6cdf04a20005783298e6cb9671cb94b0026d22 - fix building with MySQL 8.x --- diff --git a/apr-util-flags.patch b/apr-util-flags.patch index c4c39ed..9f7ffcf 100644 --- a/apr-util-flags.patch +++ b/apr-util-flags.patch @@ -1,10 +1,11 @@ ---- apr-util-1.3.9/configure.in~ 2010-08-03 10:09:13.537864637 +0200 -+++ apr-util-1.3.9/configure.in 2010-08-03 10:17:48.184690019 +0200 -@@ -216,6 +216,7 @@ +diff -urNp -x '*.orig' apr-util-1.6.1.org/configure.in apr-util-1.6.1/configure.in +--- apr-util-1.6.1.org/configure.in 2021-10-09 23:46:59.125014825 +0200 ++++ apr-util-1.6.1/configure.in 2021-10-09 23:46:59.218348038 +0200 +@@ -277,6 +277,7 @@ APR_ADDTO(APRUTIL_LIBS, [$APR_LIBS]) AC_SUBST(APRUTIL_EXPORT_LIBS) AC_SUBST(APRUTIL_PRIV_INCLUDES) +APRUTIL_INCLUDES="$APRUTIL_INCLUDES -I/usr/include/apr" AC_SUBST(APRUTIL_INCLUDES) - AC_SUBST(APRUTIL_LDFLAGS) - AC_SUBST(APRUTIL_LIBS) + + APR_REMOVEFROM(APRUTIL_LDFLAGS,[-L/usr/lib]) diff --git a/apr-util-libtool.patch b/apr-util-libtool.patch deleted file mode 100644 index d88d5d3..0000000 --- a/apr-util-libtool.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- apr-util-1.3.4/Makefile.in~ 2008-06-13 12:27:19.000000000 +0300 -+++ apr-util-1.3.4/Makefile.in 2008-08-25 17:08:58.625899912 +0300 -@@ -23,7 +23,7 @@ - INSTALL_DATA = @INSTALL_DATA@ - - APU_MODULES = @APU_MODULES@ --LINK_MODULE = $(LIBTOOL) $(LTFLAGS) --mode=link $(CC) $(LT_LDFLAGS) $(ALL_CFLAGS) $(ALL_LDFLAGS) $(APRUTIL_LDFLAGS) -release $(APRUTIL_MAJOR_VERSION) -module -rpath $(APU_DSO_LIBDIR) -+LINK_MODULE = $(LIBTOOL) $(LTFLAGS) --mode=link --tag=CC $(CC) $(LT_LDFLAGS) $(ALL_CFLAGS) $(ALL_LDFLAGS) $(APRUTIL_LDFLAGS) -release $(APRUTIL_MAJOR_VERSION) -module -rpath $(APU_DSO_LIBDIR) - APU_DSO_LIBDIR = @APU_DSO_LIBDIR@ - - LT_VERSION = @APU_LTVERSION@ diff --git a/apr-util-link.patch b/apr-util-link.patch index d85fac4..4886975 100644 --- a/apr-util-link.patch +++ b/apr-util-link.patch @@ -1,23 +1,30 @@ ---- apr-util-0.9.4/configure.in.orig 2004-04-18 23:20:56.000000000 +0200 -+++ apr-util-0.9.4/configure.in 2004-04-18 23:25:35.447213680 +0200 -@@ -98,7 +98,12 @@ - APU_FIND_EXPAT - APU_FIND_ICONV +diff -urNp -x '*.orig' apr-util-1.6.1.org/configure.in apr-util-1.6.1/configure.in +--- apr-util-1.6.1.org/configure.in 2017-04-02 19:57:23.000000000 +0200 ++++ apr-util-1.6.1/configure.in 2021-10-09 23:46:58.615015473 +0200 +@@ -175,14 +175,19 @@ APU_FIND_ICONV + dnl Enable DSO build; must be last: + APU_CHECK_UTIL_DSO +save_LIBS="$LIBS" +LIBS= AC_SEARCH_LIBS(crypt, crypt ufc) -+APR_ADDTO(APRUTIL_EXPORT_LIBS, [$LIBS]) -+APR_ADDTO(APRUTIL_LIBS, [$LIBS]) + case "$ac_cv_search_crypt" in + "no"|"none required") + ;; + *) +- APR_ADDTO(APRUTIL_LIBS, [$ac_cv_search_crypt]) ++ APR_ADDTO(APRUTIL_EXPORT_LIBS, [$LIBS]) ++ APR_ADDTO(APRUTIL_LIBS, [$LIBS]) + ;; + esac +LIBS="$save_LIBS $LIBS" ++ AC_MSG_CHECKING(if system crypt() function is threadsafe) if test "x$apu_crypt_threadsafe" = "x1"; then AC_DEFINE(APU_CRYPT_THREADSAFE, 1, [Define if the system crypt() function is threadsafe]) ---- apr-util-1.5.4/configure.in~ 2016-04-08 22:47:59.000000000 +0200 -+++ apr-util-1.5.4/configure.in 2016-04-08 22:50:43.902956204 +0200 -@@ -227,6 +227,11 @@ AC_SUBST(APRUTIL_EXPORT_LIBS) +@@ -273,6 +278,11 @@ APR_ADDTO(APRUTIL_LIBS, [$APR_LIBS]) + AC_SUBST(APRUTIL_EXPORT_LIBS) AC_SUBST(APRUTIL_PRIV_INCLUDES) - APRUTIL_INCLUDES="$APRUTIL_INCLUDES -I/usr/include/apr" AC_SUBST(APRUTIL_INCLUDES) + +APR_REMOVEFROM(APRUTIL_LDFLAGS,[-L/usr/lib]) diff --git a/apr-util.spec b/apr-util.spec index 38e2fcc..641e713 100644 --- a/apr-util.spec +++ b/apr-util.spec @@ -13,30 +13,30 @@ %bcond_without openssl # without OpenSSL crypto module %bcond_without tests # don't perform "make check" -%define dbver db47 +%define dbver db53 Summary: A companion library to Apache Portable Runtime Summary(pl.UTF-8): Biblioteka towarzysząca Apache Portable Runtime Name: apr-util -Version: 1.6.1 -Release: 1 +Version: 1.6.3 +Release: 2 Epoch: 1 License: Apache v2.0 Group: Libraries Source0: http://www.apache.org/dist/apr/%{name}-%{version}.tar.bz2 -# Source0-md5: 8ff5dc36fa39a2a3db1df196d3ed6086 +# Source0-md5: b6e8c9b31d938fe5797ceb0d1ff2eb69 Patch0: %{name}-link.patch Patch1: %{name}-config-noldap.patch -Patch2: %{name}-libtool.patch Patch3: %{name}-flags.patch +Patch4: mysql8.patch URL: http://apr.apache.org/ BuildRequires: apr-devel >= 1:1.6.0 BuildRequires: autoconf >= 2.59 -BuildRequires: db-devel >= 4.7 +BuildRequires: db-devel >= 5.3 BuildRequires: expat-devel %{?with_freetds:BuildRequires: freetds-devel} BuildRequires: libtool -%{?with_mysql:BuildRequires: mysql-devel} +%{?with_mysql:BuildRequires: mysql-devel >= 8.0.35} %{?with_nss:BuildRequires: nss-devel} %{?with_ldap:BuildRequires: openldap-devel >= 2.3.0} %{?with_openssl:BuildRequires: openssl-devel} @@ -223,8 +223,8 @@ Statyczna biblioteka apr-util. %setup -q %patch0 -p1 %patch1 -p1 -%patch2 -p1 %patch3 -p1 +%patch4 -p0 echo ' @@ -246,6 +246,7 @@ echo ' ' > config.layout %build +PYTHON=%{__python3} \ ./buildconf \ --with-apr=%{_datadir}/apr @@ -264,7 +265,7 @@ echo ' %{?with_nss:--with-nss} \ %{?with_openssl:--with-openssl} \ %{!?with_freetds:--without-freetds} \ - %{?with_mysql:--with-mysql=%{_prefix}} \ + %{?with_mysql:--with-mysql} \ %{!?with_odbc:--without-odbc} \ %{?with_oracle:--with-oracle} \ %{!?with_pgsql:--without-pgsql} \ diff --git a/mysql8.patch b/mysql8.patch new file mode 100644 index 0000000..d771e69 --- /dev/null +++ b/mysql8.patch @@ -0,0 +1,27 @@ +https://bz.apache.org/bugzilla/show_bug.cgi?id=62631 + +--- dbd/apr_dbd_mysql.c 2014-09-16 11:45:15.000000000 +0000 ++++ dbd/apr_dbd_mysql.c 2018-08-11 20:25:13.202562000 +0000 +@@ -47,6 +47,13 @@ + #include "apr_strings.h" + #include "apr_lib.h" + #include "apr_buckets.h" ++/* MySQL 8.0 replaces my_bool with C99 bool. Earlier versions of MySQL had ++* a typedef to char. Gem users reported failures on big endian systems when ++* using C99 bool types with older MySQLs due to mismatched behavior. */ ++#ifndef HAVE_TYPE_MY_BOOL ++#include ++typedef bool my_bool; ++#endif + + #include "apr_dbd_internal.h" + +@@ -1262,7 +1262,7 @@ + + static void dbd_mysql_init(apr_pool_t *pool) + { +-#if MYSQL_VERSION_ID < 100000 ++#if MYSQL_VERSION_ID < 80002 + my_init(); + #endif + mysql_thread_init();