From efc96ae3ab05f73b7d58834bc281961771fcb9de Mon Sep 17 00:00:00 2001 From: Zhao Hang Date: Mon, 23 Oct 2023 11:12:07 +0800 Subject: [PATCH 1/2] update to php-8.0.30-1.src.rpm Signed-off-by: Zhao Hang --- 1000-anolis-php-support-loongarch64.patch | 23 ------------- download | 4 +-- php-8.0.10-systzdata-v21.patch | 3 +- php.spec | 39 ++++++++++------------- 4 files changed, 21 insertions(+), 48 deletions(-) delete mode 100644 1000-anolis-php-support-loongarch64.patch diff --git a/1000-anolis-php-support-loongarch64.patch b/1000-anolis-php-support-loongarch64.patch deleted file mode 100644 index f23cddb..0000000 --- a/1000-anolis-php-support-loongarch64.patch +++ /dev/null @@ -1,23 +0,0 @@ -diff -Nur php-7.2.24.new/build/config.guess php-7.2.24/build/config.guess ---- php-7.2.24.new/build/config.guess 2021-11-08 19:01:51.684000000 +0800 -+++ php-7.2.24/build/config.guess 2021-11-08 19:04:15.004000000 +0800 -@@ -891,6 +891,9 @@ - UNAME_MACHINE=aarch64_be - GUESS=$UNAME_MACHINE-unknown-linux-$LIBC - ;; -+ loongarch32:Linux:*:* | loongarch64:Linux:*:* | loongarchx32:Linux:*:*) -+ GUESS="$UNAME_MACHINE"-unknown-linux-"$LIBC" -+ ;; - alpha:Linux:*:*) - case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' /proc/cpuinfo 2>/dev/null` in - EV5) UNAME_MACHINE=alphaev5 ;; ---- php-7.4.6/build/config.sub 2020-05-12 16:09:15.000000000 +0800 -+++ php-7.4.6/build/config.sub.new 2021-11-10 11:23:11.386075262 +0800 -@@ -1160,6 +1160,7 @@ - 1750a | 580 \ - | a29k \ - | aarch64 | aarch64_be \ -+ | loongarch32 | loongarch64 | loongarchx32 \ - | abacus \ - | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] \ - | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] \ diff --git a/download b/download index 9ca0dc4..fcbef55 100644 --- a/download +++ b/download @@ -1,2 +1,2 @@ -d1fd4a5279ca6bb34ebd31df782fef3d php-8.0.27.tar.xz -8a10e849c1736dab96fb2d08836ad940 php-8.0.27.tar.xz.asc +453206c948d9504b91fcec30fcb59b75 php-8.0.30.tar.xz +4970d7221879c2bdf4ffb9ef29571443 php-8.0.30.tar.xz.asc diff --git a/php-8.0.10-systzdata-v21.patch b/php-8.0.10-systzdata-v21.patch index 779f538..699dc11 100644 --- a/php-8.0.10-systzdata-v21.patch +++ b/php-8.0.10-systzdata-v21.patch @@ -5,6 +5,7 @@ Add support for use of the system timezone database, rather than embedding a copy. Discussed upstream but was not desired. History: +r22: fix possible buffer overflow r21: retrieve tzdata version from /usr/share/zoneinfo/tzdata.zi r20: adapt for timelib 2020.03 (in 8.0.10RC1) r19: adapt for timelib 2020.02 (in 8.0.0beta2) @@ -454,7 +455,7 @@ index e9bd0f136d..c04ff01adc 100644 + size_t n; + char *data, *p; + -+ data = malloc(3 * sysdb->index_size + 7); ++ data = malloc(3 * sysdb->index_size + sizeof(FAKE_HEADER) - 1); + + p = mempcpy(data, FAKE_HEADER, sizeof(FAKE_HEADER) - 1); + diff --git a/php.spec b/php.spec index a5b1ffa..a9f4a7e 100644 --- a/php.spec +++ b/php.spec @@ -1,4 +1,3 @@ -%define anolis_release .0.1 # RHEL / Fedora spec file for php # # License: MIT @@ -55,13 +54,13 @@ %global with_tidy 0 %endif -%global upver 8.0.27 +%global upver 8.0.30 #global rcver RC1 Summary: PHP scripting language for creating dynamic web sites Name: php Version: %{upver}%{?rcver:~%{rcver}} -Release: 1%{anolis_release}%{?dist} +Release: 1%{?dist} # All files licensed under PHP version 3.01, except # Zend is licensed under Zend # TSRM is licensed under BSD @@ -125,8 +124,6 @@ Patch51: php-8.0.13-crypt.patch # Factory is droped from system tzdata Patch300: php-7.4.0-datetests.patch -Patch1000: 1000-anolis-php-support-loongarch64.patch - BuildRequires: gnupg2 BuildRequires: bzip2-devel @@ -694,30 +691,28 @@ in pure PHP. %setup -q -n php-%{upver}%{?rcver} -%patch1 -p1 -b .mpmcheck -%patch5 -p1 -b .includedir -%patch6 -p1 -b .embed -%patch8 -p1 -b .libdb -%patch9 -p1 -b .deprecated +%patch -P1 -p1 -b .mpmcheck +%patch -P5 -p1 -b .includedir +%patch -P6 -p1 -b .embed +%patch -P8 -p1 -b .libdb +%patch -P9 -p1 -b .deprecated -%patch42 -p1 -b .systzdata -%patch43 -p1 -b .headers +%patch -P42 -p1 -b .systzdata +%patch -P43 -p1 -b .headers %if 0%{?fedora} >= 18 || 0%{?rhel} >= 7 -%patch45 -p1 -b .ldap_r +%patch -P45 -p1 -b .ldap_r %endif -%patch47 -p1 -b .phpinfo -%patch48 -p1 -b .sha -%patch49 -p1 -b .pharsha -%patch51 -p1 -b .libxcrypt +%patch -P47 -p1 -b .phpinfo +%patch -P48 -p1 -b .sha +%patch -P49 -p1 -b .pharsha +%patch -P51 -p1 -b .libxcrypt # upstream patches # security patches # Fixes for tests -%patch300 -p1 -b .datetests - -%patch1000 -p1 +%patch -P300 -p1 -b .datetests # Prevent %%doc confusion over LICENSE files @@ -1510,8 +1505,8 @@ systemctl try-restart php-fpm.service >/dev/null 2>&1 || : %changelog -* Wed Mar 1 2023 Liwei Ge - 8.0.27-1.0.1 -- Support loongarch64 platform +* Fri Oct 6 2023 Remi Collet - 8.0.30-1 +- rebase to 8.0.30 * Fri Jan 13 2023 Remi Collet - 8.0.27-1 - rebase to 8.0.27 -- Gitee From 5df8be4302355b9a9af369b7061f65cb7303a87f Mon Sep 17 00:00:00 2001 From: Liwei Ge Date: Mon, 8 Nov 2021 21:59:28 +0800 Subject: [PATCH 2/2] build: support loongarch64 platform Signed-off-by: Liwei Ge --- 1000-anolis-php-support-loongarch64.patch | 23 +++++++++++++++++++++++ php.spec | 10 +++++++++- 2 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 1000-anolis-php-support-loongarch64.patch diff --git a/1000-anolis-php-support-loongarch64.patch b/1000-anolis-php-support-loongarch64.patch new file mode 100644 index 0000000..f23cddb --- /dev/null +++ b/1000-anolis-php-support-loongarch64.patch @@ -0,0 +1,23 @@ +diff -Nur php-7.2.24.new/build/config.guess php-7.2.24/build/config.guess +--- php-7.2.24.new/build/config.guess 2021-11-08 19:01:51.684000000 +0800 ++++ php-7.2.24/build/config.guess 2021-11-08 19:04:15.004000000 +0800 +@@ -891,6 +891,9 @@ + UNAME_MACHINE=aarch64_be + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; ++ loongarch32:Linux:*:* | loongarch64:Linux:*:* | loongarchx32:Linux:*:*) ++ GUESS="$UNAME_MACHINE"-unknown-linux-"$LIBC" ++ ;; + alpha:Linux:*:*) + case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' /proc/cpuinfo 2>/dev/null` in + EV5) UNAME_MACHINE=alphaev5 ;; +--- php-7.4.6/build/config.sub 2020-05-12 16:09:15.000000000 +0800 ++++ php-7.4.6/build/config.sub.new 2021-11-10 11:23:11.386075262 +0800 +@@ -1160,6 +1160,7 @@ + 1750a | 580 \ + | a29k \ + | aarch64 | aarch64_be \ ++ | loongarch32 | loongarch64 | loongarchx32 \ + | abacus \ + | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] \ + | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] \ diff --git a/php.spec b/php.spec index a9f4a7e..535db5e 100644 --- a/php.spec +++ b/php.spec @@ -1,3 +1,4 @@ +%define anolis_release .0.1 # RHEL / Fedora spec file for php # # License: MIT @@ -60,7 +61,7 @@ Summary: PHP scripting language for creating dynamic web sites Name: php Version: %{upver}%{?rcver:~%{rcver}} -Release: 1%{?dist} +Release: 1%{anolis_release}%{?dist} # All files licensed under PHP version 3.01, except # Zend is licensed under Zend # TSRM is licensed under BSD @@ -124,6 +125,8 @@ Patch51: php-8.0.13-crypt.patch # Factory is droped from system tzdata Patch300: php-7.4.0-datetests.patch +Patch1000: 1000-anolis-php-support-loongarch64.patch + BuildRequires: gnupg2 BuildRequires: bzip2-devel @@ -714,6 +717,8 @@ in pure PHP. # Fixes for tests %patch -P300 -p1 -b .datetests +%patch1000 -p1 + # Prevent %%doc confusion over LICENSE files cp Zend/LICENSE ZEND_LICENSE @@ -1505,6 +1510,9 @@ systemctl try-restart php-fpm.service >/dev/null 2>&1 || : %changelog +* Mon Oct 23 2023 Liwei Ge - 8.0.30-1.0.1 +- Support loongarch64 platform + * Fri Oct 6 2023 Remi Collet - 8.0.30-1 - rebase to 8.0.30 -- Gitee