!82 use lmdb instead of Berkeley DB for package dba and update %configure for riscv
From: @panxh_purple Reviewed-by: @overweight Signed-off-by: @overweight
This commit is contained in:
commit
5105008450
@ -1,92 +0,0 @@
|
|||||||
diff -up ./ext/dba/config.m4.libdb ./ext/dba/config.m4
|
|
||||||
--- ./ext/dba/config.m4.libdb 2020-04-09 14:06:11.000000000 +0200
|
|
||||||
+++ ./ext/dba/config.m4 2020-04-09 14:35:08.208605065 +0200
|
|
||||||
@@ -375,61 +375,13 @@ if test "$PHP_DB4" != "no"; then
|
|
||||||
dbdp4="/usr/local/BerkeleyDB.4."
|
|
||||||
dbdp5="/usr/local/BerkeleyDB.5."
|
|
||||||
for i in $PHP_DB4 ${dbdp5}1 ${dbdp5}0 ${dbdp4}8 ${dbdp4}7 ${dbdp4}6 ${dbdp4}5 ${dbdp4}4 ${dbdp4}3 ${dbdp4}2 ${dbdp4}1 ${dbdp}0 /usr/local /usr; do
|
|
||||||
- if test -f "$i/db5/db.h"; then
|
|
||||||
- THIS_PREFIX=$i
|
|
||||||
- THIS_INCLUDE=$i/db5/db.h
|
|
||||||
- break
|
|
||||||
- elif test -f "$i/db4/db.h"; then
|
|
||||||
- THIS_PREFIX=$i
|
|
||||||
- THIS_INCLUDE=$i/db4/db.h
|
|
||||||
- break
|
|
||||||
- elif test -f "$i/include/db5.3/db.h"; then
|
|
||||||
- THIS_PREFIX=$i
|
|
||||||
- THIS_INCLUDE=$i/include/db5.3/db.h
|
|
||||||
- break
|
|
||||||
- elif test -f "$i/include/db5.1/db.h"; then
|
|
||||||
- THIS_PREFIX=$i
|
|
||||||
- THIS_INCLUDE=$i/include/db5.1/db.h
|
|
||||||
- break
|
|
||||||
- elif test -f "$i/include/db5.0/db.h"; then
|
|
||||||
- THIS_PREFIX=$i
|
|
||||||
- THIS_INCLUDE=$i/include/db5.0/db.h
|
|
||||||
- break
|
|
||||||
- elif test -f "$i/include/db4.8/db.h"; then
|
|
||||||
- THIS_PREFIX=$i
|
|
||||||
- THIS_INCLUDE=$i/include/db4.8/db.h
|
|
||||||
- break
|
|
||||||
- elif test -f "$i/include/db4.7/db.h"; then
|
|
||||||
- THIS_PREFIX=$i
|
|
||||||
- THIS_INCLUDE=$i/include/db4.7/db.h
|
|
||||||
- break
|
|
||||||
- elif test -f "$i/include/db4.6/db.h"; then
|
|
||||||
- THIS_PREFIX=$i
|
|
||||||
- THIS_INCLUDE=$i/include/db4.6/db.h
|
|
||||||
- break
|
|
||||||
- elif test -f "$i/include/db4.5/db.h"; then
|
|
||||||
- THIS_PREFIX=$i
|
|
||||||
- THIS_INCLUDE=$i/include/db4.5/db.h
|
|
||||||
- break
|
|
||||||
- elif test -f "$i/include/db4/db.h"; then
|
|
||||||
- THIS_PREFIX=$i
|
|
||||||
- THIS_INCLUDE=$i/include/db4/db.h
|
|
||||||
- break
|
|
||||||
- elif test -f "$i/include/db/db4.h"; then
|
|
||||||
- THIS_PREFIX=$i
|
|
||||||
- THIS_INCLUDE=$i/include/db/db4.h
|
|
||||||
- break
|
|
||||||
- elif test -f "$i/include/db4.h"; then
|
|
||||||
- THIS_PREFIX=$i
|
|
||||||
- THIS_INCLUDE=$i/include/db4.h
|
|
||||||
- break
|
|
||||||
- elif test -f "$i/include/db.h"; then
|
|
||||||
+ if test -f "$i/include/db.h"; then
|
|
||||||
THIS_PREFIX=$i
|
|
||||||
THIS_INCLUDE=$i/include/db.h
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
- PHP_DBA_DB_CHECK(4, db-5.3 db-5.1 db-5.0 db-4.8 db-4.7 db-4.6 db-4.5 db-4.4 db-4.3 db-4.2 db-4.1 db-4.0 db-4 db4 db, [(void)db_create((DB**)0, (DB_ENV*)0, 0)])
|
|
||||||
+ PHP_DBA_DB_CHECK(4, db, [(void)db_create((DB**)0, (DB_ENV*)0, 0)])
|
|
||||||
fi
|
|
||||||
PHP_DBA_STD_RESULT(db4,Berkeley DB4)
|
|
||||||
|
|
||||||
diff -up ./ext/dba/dba.c.libdb ./ext/dba/dba.c
|
|
||||||
--- ./ext/dba/dba.c.libdb 2020-04-09 14:06:11.000000000 +0200
|
|
||||||
+++ ./ext/dba/dba.c 2020-04-09 14:36:30.593275190 +0200
|
|
||||||
@@ -50,6 +50,10 @@
|
|
||||||
#include "php_lmdb.h"
|
|
||||||
#include "dba_arginfo.h"
|
|
||||||
|
|
||||||
+#ifdef DB4_INCLUDE_FILE
|
|
||||||
+#include DB4_INCLUDE_FILE
|
|
||||||
+#endif
|
|
||||||
+
|
|
||||||
PHP_MINIT_FUNCTION(dba);
|
|
||||||
PHP_MSHUTDOWN_FUNCTION(dba);
|
|
||||||
PHP_MINFO_FUNCTION(dba);
|
|
||||||
@@ -459,6 +463,10 @@ PHP_MINFO_FUNCTION(dba)
|
|
||||||
|
|
||||||
php_info_print_table_start();
|
|
||||||
php_info_print_table_row(2, "DBA support", "enabled");
|
|
||||||
+#ifdef DB_VERSION_STRING
|
|
||||||
+ php_info_print_table_row(2, "libdb header version", DB_VERSION_STRING);
|
|
||||||
+ php_info_print_table_row(2, "libdb library version", db_version(NULL, NULL, NULL));
|
|
||||||
+#endif
|
|
||||||
if (handlers.s) {
|
|
||||||
smart_str_0(&handlers);
|
|
||||||
php_info_print_table_row(2, "Supported handlers", ZSTR_VAL(handlers.s));
|
|
||||||
77
php.spec
77
php.spec
@ -22,16 +22,15 @@
|
|||||||
%global with_freetds 0
|
%global with_freetds 0
|
||||||
%global with_sodium 0
|
%global with_sodium 0
|
||||||
%global with_pspell 0
|
%global with_pspell 0
|
||||||
%global with_lmdb 0
|
|
||||||
%global upver 8.0.0
|
%global upver 8.0.0
|
||||||
|
|
||||||
Name: php
|
Name: php
|
||||||
Version: %{upver}%{?rcver:~%{rcver}}
|
Version: %{upver}
|
||||||
Release: 7
|
Release: 8
|
||||||
Summary: PHP scripting language for creating dynamic web sites
|
Summary: PHP scripting language for creating dynamic web sites
|
||||||
License: PHP and Zend-2.0 and BSD and MIT and ASL 1.0 and NCSA
|
License: PHP and Zend-2.0 and BSD and MIT and ASL 1.0 and NCSA
|
||||||
URL: http://www.php.net/
|
URL: http://www.php.net/
|
||||||
Source0: http://www.php.net/distributions/php-%{upver}%{?rcver}.tar.xz
|
Source0: http://www.php.net/distributions/php-%{upver}.tar.xz
|
||||||
Source1: php.conf
|
Source1: php.conf
|
||||||
Source2: php.ini
|
Source2: php.ini
|
||||||
Source3: macros.php
|
Source3: macros.php
|
||||||
@ -51,26 +50,25 @@ Source52: 20-ffi.ini
|
|||||||
Patch0: php-7.4.0-httpd.patch
|
Patch0: php-7.4.0-httpd.patch
|
||||||
Patch1: php-7.2.0-includedir.patch
|
Patch1: php-7.2.0-includedir.patch
|
||||||
Patch2: php-8.0.0-embed.patch
|
Patch2: php-8.0.0-embed.patch
|
||||||
Patch3: php-7.4.0-libdb.patch
|
Patch3: php-8.0.0-systzdata-v19.patch
|
||||||
Patch4: php-8.0.0-systzdata-v19.patch
|
Patch4: php-7.4.0-phpize.patch
|
||||||
Patch5: php-7.4.0-phpize.patch
|
Patch5: php-7.4.0-ldap_r.patch
|
||||||
Patch6: php-7.4.0-ldap_r.patch
|
Patch6: php-8.0.0-phpinfo.patch
|
||||||
Patch7: php-8.0.0-phpinfo.patch
|
Patch7: php-7.4.0-datetests.patch
|
||||||
Patch8: php-7.4.0-datetests.patch
|
Patch8: backport-CVE-2020-7071-Fix-bug-77423.patch
|
||||||
Patch9: backport-CVE-2020-7071-Fix-bug-77423.patch
|
Patch9: CVE-2021-21702.patch
|
||||||
Patch10: CVE-2021-21702.patch
|
Patch10: backport-0001-CVE-2020-7071.patch
|
||||||
Patch11: backport-0001-CVE-2020-7071.patch
|
Patch11: backport-0002-CVE-2020-7071.patch
|
||||||
Patch12: backport-0002-CVE-2020-7071.patch
|
Patch12: backport-0001-CVE-2021-21705.patch
|
||||||
Patch13: backport-0001-CVE-2021-21705.patch
|
Patch13: backport-0002-CVE-2021-21705.patch
|
||||||
Patch14: backport-0002-CVE-2021-21705.patch
|
Patch14: backport-CVE-2021-21704.patch
|
||||||
Patch15: backport-CVE-2021-21704.patch
|
Patch15: backport-CVE-2021-21703.patch
|
||||||
Patch16: backport-CVE-2021-21703.patch
|
Patch16: backport-Handle-throwing-destructor-in-BIND_STATIC.patch
|
||||||
Patch17: backport-Handle-throwing-destructor-in-BIND_STATIC.patch
|
Patch17: backport-Bail-on-exception-during-delayed-autoload.patch
|
||||||
Patch18: backport-Bail-on-exception-during-delayed-autoload.patch
|
Patch18: backport-Fix-ASSIGN_DIM-to-NEXT-with-rc-1-reference-value.patch
|
||||||
Patch19: backport-Fix-ASSIGN_DIM-to-NEXT-with-rc-1-reference-value.patch
|
Patch19: backport-Undef-slot-before-destroying-in-unset_property.patch
|
||||||
Patch20: backport-Undef-slot-before-destroying-in-unset_property.patch
|
Patch20: backport-Handle-ref-return-from-Iterator-key.patch
|
||||||
Patch21: backport-Handle-ref-return-from-Iterator-key.patch
|
Patch21: backport-Fix-return-by-ref-from-array_reduce-callback.patch
|
||||||
Patch22: backport-Fix-return-by-ref-from-array_reduce-callback.patch
|
|
||||||
|
|
||||||
BuildRequires: bzip2-devel, curl-devel >= 7.9, httpd-devel >= 2.0.46-1, pam-devel, httpd-filesystem, nginx-filesystem
|
BuildRequires: bzip2-devel, curl-devel >= 7.9, httpd-devel >= 2.0.46-1, pam-devel, httpd-filesystem, nginx-filesystem
|
||||||
BuildRequires: libstdc++-devel, openssl-devel, sqlite-devel >= 3.6.0, zlib-devel, smtpdaemon, libedit-devel
|
BuildRequires: libstdc++-devel, openssl-devel, sqlite-devel >= 3.6.0, zlib-devel, smtpdaemon, libedit-devel
|
||||||
@ -393,10 +391,7 @@ using the GNU MP library.
|
|||||||
%package dba
|
%package dba
|
||||||
Summary: A database abstraction layer module for PHP applications
|
Summary: A database abstraction layer module for PHP applications
|
||||||
License: PHP
|
License: PHP
|
||||||
BuildRequires: libdb-devel, tokyocabinet-devel
|
BuildRequires: lmdb-devel, tokyocabinet-devel
|
||||||
%if %{with_lmdb}
|
|
||||||
BuildRequires: lmdb-devel
|
|
||||||
%endif
|
|
||||||
Requires: php-common%{?_isa} = %{version}-%{release}
|
Requires: php-common%{?_isa} = %{version}-%{release}
|
||||||
|
|
||||||
%description dba
|
%description dba
|
||||||
@ -505,7 +500,7 @@ Summary: help
|
|||||||
help
|
help
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%autosetup -n php-%{upver}%{?rcver} -p1
|
%autosetup -n php-%{upver} -p1
|
||||||
|
|
||||||
cp Zend/LICENSE Zend/ZEND_LICENSE
|
cp Zend/LICENSE Zend/ZEND_LICENSE
|
||||||
cp TSRM/LICENSE TSRM_LICENSE
|
cp TSRM/LICENSE TSRM_LICENSE
|
||||||
@ -534,9 +529,9 @@ rm Zend/tests/bug68412.phpt
|
|||||||
rm ext/zlib/tests/004-mb.phpt
|
rm ext/zlib/tests/004-mb.phpt
|
||||||
|
|
||||||
pver=$(sed -n '/#define PHP_VERSION /{s/.* "//;s/".*$//;p}' main/php_version.h)
|
pver=$(sed -n '/#define PHP_VERSION /{s/.* "//;s/".*$//;p}' main/php_version.h)
|
||||||
if test "x${pver}" != "x%{upver}%{?rcver}"; then
|
if test "x${pver}" != "x%{upver}"; then
|
||||||
: Error: Upstream PHP version is now ${pver}, expecting %{upver}%{?rcver}.
|
: Error: Upstream PHP version is now ${pver}, expecting %{upver}.
|
||||||
: Update the version/rcver macros and rebuild.
|
: Update the version macros and rebuild.
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -602,6 +597,9 @@ ln -sf ../configure
|
|||||||
--without-pear --with-exec-dir=%{_bindir} --without-gdbm --with-openssl \
|
--without-pear --with-exec-dir=%{_bindir} --without-gdbm --with-openssl \
|
||||||
--with-system-ciphers --with-pcre-regex=%{_prefix} --with-zlib --with-layout=GNU --with-kerberos \
|
--with-system-ciphers --with-pcre-regex=%{_prefix} --with-zlib --with-layout=GNU --with-kerberos \
|
||||||
--with-libxml-dir=%{_prefix} --with-system-tzdata --with-mhash \
|
--with-libxml-dir=%{_prefix} --with-system-tzdata --with-mhash \
|
||||||
|
%ifarch riscv64
|
||||||
|
--without-pcre-jit \
|
||||||
|
%endif
|
||||||
%if %{with_argon2}
|
%if %{with_argon2}
|
||||||
--with-password-argon2 \
|
--with-password-argon2 \
|
||||||
%endif
|
%endif
|
||||||
@ -632,10 +630,7 @@ build --libdir=%{_libdir}/php --enable-pcntl --enable-opcache --enable-phpdbg \
|
|||||||
%endif
|
%endif
|
||||||
--with-external-gd \
|
--with-external-gd \
|
||||||
--with-gmp=shared --enable-calendar=shared --enable-bcmath=shared --with-bz2=shared --enable-ctype=shared \
|
--with-gmp=shared --enable-calendar=shared --enable-bcmath=shared --with-bz2=shared --enable-ctype=shared \
|
||||||
--enable-dba=shared --with-db4=%{_prefix} --with-tcadb=%{_prefix} \
|
--enable-dba=shared --with-tcadb=%{_prefix} --with-lmdb=%{_prefix} \
|
||||||
%if %{with_lmdb}
|
|
||||||
--with-lmdb=%{_prefix} \
|
|
||||||
%endif
|
|
||||||
--enable-exif=shared --enable-ftp=shared --with-gettext=shared --with-iconv=shared --enable-sockets=shared \
|
--enable-exif=shared --enable-ftp=shared --with-gettext=shared --with-iconv=shared --enable-sockets=shared \
|
||||||
--enable-tokenizer=shared --with-ldap=shared --with-ldap-sasl --enable-mysqlnd=shared \
|
--enable-tokenizer=shared --with-ldap=shared --with-ldap-sasl --enable-mysqlnd=shared \
|
||||||
--with-mysqli=shared,mysqlnd --with-mysql-sock=%{mysql_sock} \
|
--with-mysqli=shared,mysqlnd --with-mysql-sock=%{mysql_sock} \
|
||||||
@ -713,10 +708,7 @@ build --includedir=%{_includedir}/php-zts --libdir=%{_libdir}/php-zts --enable-m
|
|||||||
%endif
|
%endif
|
||||||
--with-external-gc \
|
--with-external-gc \
|
||||||
--with-gmp=shared --enable-calendar=shared --enable-bcmath=shared --with-bz2=shared --enable-ctype=shared \
|
--with-gmp=shared --enable-calendar=shared --enable-bcmath=shared --with-bz2=shared --enable-ctype=shared \
|
||||||
--enable-dba=shared --with-db4=%{_prefix} --with-tcadb=%{_prefix} \
|
--enable-dba=shared --with-tcadb=%{_prefix} --with-lmdb=%{_prefix} \
|
||||||
%if %{with_lmdb}
|
|
||||||
--with-lmdb=%{_prefix} \
|
|
||||||
%endif
|
|
||||||
--with-gettext=shared --with-iconv=shared --enable-sockets=shared --enable-tokenizer=shared --enable-exif=shared \
|
--with-gettext=shared --with-iconv=shared --enable-sockets=shared --enable-tokenizer=shared --enable-exif=shared \
|
||||||
--enable-ftp=shared --with-ldap=shared --with-ldap-sasl --enable-mysqlnd=shared \
|
--enable-ftp=shared --with-ldap=shared --with-ldap-sasl --enable-mysqlnd=shared \
|
||||||
--with-mysqli=shared,mysqlnd --with-mysql-sock=%{mysql_sock} --enable-mysqlnd-threading \
|
--with-mysqli=shared,mysqlnd --with-mysql-sock=%{mysql_sock} --enable-mysqlnd-threading \
|
||||||
@ -1109,6 +1101,11 @@ systemctl try-restart php-fpm.service >/dev/null 2>&1 || :
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed Feb 23 2022 panxiaohe <panxh.life@foxmail.com> - 8.0.0-8
|
||||||
|
- use lmdb instead of Berkeley DB for package dba
|
||||||
|
- update %%configure for riscv
|
||||||
|
- delete unused rcver
|
||||||
|
|
||||||
* Sat Dec 18 2021 yixiangzhike <yixiangzhike007@163.com> - 8.0.0-7
|
* Sat Dec 18 2021 yixiangzhike <yixiangzhike007@163.com> - 8.0.0-7
|
||||||
- Fix bugs found by oss-fuzz
|
- Fix bugs found by oss-fuzz
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user