]> git.pld-linux.org Git - packages/apr-util.git/blobdiff - apr-util.spec
Up to 1.6.3; fixes CVE-2022-25147
[packages/apr-util.git] / apr-util.spec
index f1d846c8859fc7e38f4932f505ff82076b6320fb..2074e368e1b46f3594751914de22d0284d0fff49 100644 (file)
@@ -1,6 +1,7 @@
+# NOTE: drop freetds bcond if/when upstream removes the rest of dbd-freetds code
 #
 # Conditional build:
-%bcond_with    freetds # with FreeTDS (sybdb) DBD module (unfinished)
+%bcond_with    freetds # without FreeTDS (sybdb) DBD module [unsupported since 1.6.0]
 %bcond_without mysql   # without MySQL DBD module
 %bcond_without odbc    # without ODBC DBD module
 %bcond_with    oracle  # with Oracle DBD module (BR: proprietary libs)
@@ -8,39 +9,59 @@
 %bcond_with    sqlite2 # with SQLite 2.x DBD module
 %bcond_without sqlite3 # without SQLite3 DBD module
 %bcond_without ldap    # without LDAP module
-#
+%bcond_without nss     # without NSS crypto module
+%bcond_without openssl # without OpenSSL crypto module
+%bcond_without tests   # don't perform "make check"
+
+# define       dbver   db50
+%if 0%{!?dbver:1}
+       %if "%{pld_release}" == "th"
+               %define dbver   db53
+       %endif
+       %if "%{pld_release}" == "ac"
+               %define dbver   db42
+       %endif
+%endif
+
 Summary:       A companion library to Apache Portable Runtime
 Summary(pl.UTF-8):     Biblioteka towarzysząca Apache Portable Runtime
 Name:          apr-util
-Version:       1.3.2
+Version:       1.6.3
 Release:       1
 Epoch:         1
 License:       Apache v2.0
 Group:         Libraries
 Source0:       http://www.apache.org/dist/apr/%{name}-%{version}.tar.bz2
-# Source0-md5: aa782fb9ced8b59c8e99419d8cdd1981
+# Source0-md5: b6e8c9b31d938fe5797ceb0d1ff2eb69
 Patch0:                %{name}-link.patch
-Patch1:                %{name}-db47.patch
-Patch2:                %{name}-pg_libs.patch
+Patch1:                %{name}-config-noldap.patch
+
+Patch3:                %{name}-flags.patch
 URL:           http://apr.apache.org/
-BuildRequires: apr-devel >= 1:1.3.0
-BuildRequires: autoconf
-%if "%{pld_release}" == "ti"
-BuildRequires: db-devel >= 4.5
-%else
+BuildRequires: apr-devel >= 1:1.6.0
+BuildRequires: autoconf >= 2.59
+%if "%{pld_release}" == "th"
 BuildRequires: db-devel >= 4.7
 %endif
+%if "%{pld_release}" == "ac"
+BuildRequires: db-devel >= 4.2
+BuildConflicts:        db4.5-devel
+%endif
 BuildRequires: expat-devel
 %{?with_freetds:BuildRequires: freetds-devel}
 BuildRequires: libtool
 %{?with_mysql:BuildRequires:   mysql-devel}
-%{?with_ldap:BuildRequires:    openldap-devel >= 2.4.6}
-%{?with_odbc:BuildRequires:    unixODBC-devel}
+%{?with_nss:BuildRequires:     nss-devel}
+%{?with_ldap:BuildRequires:    openldap-devel >= 2.3.0}
+%{?with_openssl:BuildRequires: openssl-devel}
 %{?with_pgsql:BuildRequires:   postgresql-devel}
 BuildRequires: rpm >= 4.4.9-56
 %{?with_sqlite2:BuildRequires: sqlite-devel >= 2}
 %{?with_sqlite3:BuildRequires: sqlite3-devel >= 3}
-Requires:      apr >= 1:1.3.0
+%{?with_odbc:BuildRequires:    unixODBC-devel}
+BuildRequires: which
+Requires:      apr >= 1:1.6.0
+%{!?with_freetds:Obsoletes:    apr-util-dbd-freetds}
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %define                _includedir     /usr/include/apr-util
@@ -52,6 +73,30 @@ A companion library to Apache Portable Runtime.
 Biblioteka towarzysząca dla biblioteki Apache Portable Runtime
 (przenośnej biblioteki uruchomieniowej).
 
+%package crypto-nss
+Summary:       APR cryptographic module using Mozilla NSS library
+Summary(pl.UTF-8):     Moduł kryptograficzny APR wykorzystujący bibliotekę Mozilla NSS
+Group:         Libraries
+Requires:      %{name} = %{epoch}:%{version}-%{release}
+
+%description crypto-nss
+APR cryptographic module using Mozilla NSS library.
+
+%description crypto-nss -l pl.UTF-8
+Moduł kryptograficzny APR wykorzystujący bibliotekę Mozilla NSS.
+
+%package crypto-openssl
+Summary:       APR cryptographic module using OpenSSL library
+Summary(pl.UTF-8):     Moduł kryptograficzny APR wykorzystujący bibliotekę OpenSSL
+Group:         Libraries
+Requires:      %{name} = %{epoch}:%{version}-%{release}
+
+%description crypto-openssl
+APR cryptographic module using OpenSSL library.
+
+%description crypto-openssl -l pl.UTF-8
+Moduł kryptograficzny APR wykorzystujący bibliotekę OpenSSL.
+
 %package dbd-freetds
 Summary:       DBD driver for FreeTDS (Sybase/MS SQL)
 Summary(pl.UTF-8):     Sterownik DBD dla FreeTDS (Sybase/MS SQL)
@@ -138,6 +183,18 @@ DBD driver for SQLite 3.
 %description dbd-sqlite3 -l pl.UTF-8
 Sterownik DBD dla SQLite 3.
 
+%package dbm-db
+Summary:       DBM driver for DB
+Summary(pl.UTF-8):     Sterownik DBM dla DB
+Group:         Libraries
+Requires:      %{name} = %{epoch}:%{version}-%{release}
+
+%description dbm-db
+DBM driver for DB.
+
+%description dbm-db -l pl.UTF-8
+Sterownik DBM dla DB.
+
 %package ldap
 Summary:       APR LDAP driver
 Summary(pl.UTF-8):     Sterownik APR dla LDAP
@@ -155,8 +212,7 @@ Summary:    Header files and development documentation for apr-util
 Summary(pl.UTF-8):     Pliki nagłówkowe i dokumentacja programisty do apr-util
 Group:         Development/Libraries
 Requires:      %{name} = %{epoch}:%{version}-%{release}
-Requires:      apr-devel >= 1:1.3.0
-Requires:      db-devel
+Requires:      apr-devel >= 1:1.6.0
 Requires:      expat-devel
 
 %description devel
@@ -181,9 +237,8 @@ Statyczna biblioteka apr-util.
 %setup -q
 %patch0 -p1
 %patch1 -p1
-%patch2 -p1
 
-rm -rf xml/expat
+%patch3 -p1
 
 echo '
 <Layout PLD>
@@ -205,6 +260,7 @@ echo '
 ' > config.layout
 
 %build
+PYTHON=%{__python3} \
 ./buildconf \
        --with-apr=%{_datadir}/apr
 
@@ -212,17 +268,16 @@ echo '
        --enable-layout=PLD \
        --with-apr=%{_bindir}/apr-1-config \
        --with-berkeley-db=%{_prefix} \
-%if "%{pld_release}" == "ti"
-       --with-dbm=db45 \
-%else
-       --with-dbm=db47 \
-%endif
+       --with-crypto \
+       --with-dbm=%{dbver} \
        --with-iconv=%{_prefix} \
 %if %{with ldap}
        --with-ldap \
        --with-ldap-include=%{_prefix}/include \
        --with-ldap-lib=%{_libdir} \
 %endif
+       %{?with_nss:--with-nss} \
+       %{?with_openssl:--with-openssl} \
        %{!?with_freetds:--without-freetds} \
        %{?with_mysql:--with-mysql=%{_prefix}} \
        %{!?with_odbc:--without-odbc} \
@@ -234,13 +289,15 @@ echo '
 %{__make} \
        CC="%{__cc}"
 
+%{?with_tests:%{__make} -j1 check}
+
 %install
 rm -rf $RPM_BUILD_ROOT
 
 %{__make} install \
        DESTDIR=$RPM_BUILD_ROOT
 
-rm $RPM_BUILD_ROOT%{_libdir}/apr-util-1/*.{la,a}
+%{__rm} $RPM_BUILD_ROOT%{_libdir}/apr-util-1/*.{la,a}
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -255,6 +312,20 @@ rm -rf $RPM_BUILD_ROOT
 %attr(755,root,root) %ghost %{_libdir}/libaprutil-1.so.0
 %dir %{_libdir}/apr-util-1
 
+%if %{with nss}
+%files crypto-nss
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/apr-util-1/apr_crypto_nss-1.so
+%attr(755,root,root) %{_libdir}/apr-util-1/apr_crypto_nss.so
+%endif
+
+%if %{with openssl}
+%files crypto-openssl
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/apr-util-1/apr_crypto_openssl-1.so
+%attr(755,root,root) %{_libdir}/apr-util-1/apr_crypto_openssl.so
+%endif
+
 %if %{with freetds}
 %files dbd-freetds
 %defattr(644,root,root,755)
@@ -265,7 +336,6 @@ rm -rf $RPM_BUILD_ROOT
 %if %{with mysql}
 %files dbd-mysql
 %defattr(644,root,root,755)
-%doc README.MySQL
 %attr(755,root,root) %{_libdir}/apr-util-1/apr_dbd_mysql-1.so
 %attr(755,root,root) %{_libdir}/apr-util-1/apr_dbd_mysql.so
 %endif
@@ -305,6 +375,11 @@ rm -rf $RPM_BUILD_ROOT
 %attr(755,root,root) %{_libdir}/apr-util-1/apr_dbd_sqlite3.so
 %endif
 
+%files dbm-db
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/apr-util-1/apr_dbm_db-1.so
+%attr(755,root,root) %{_libdir}/apr-util-1/apr_dbm_db.so
+
 %if %{with ldap}
 %files ldap
 %defattr(644,root,root,755)
This page took 0.347284 seconds and 4 git commands to generate.