diff --git a/1000-anolis-php-support-loongarch64.patch b/1000-anolis-php-support-loongarch64.patch new file mode 100644 index 0000000000000000000000000000000000000000..607d93322d63f16f34f21e041f5f3a8ca8330c1f --- /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 + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; ++ loongarch32:Linux:*:* | loongarch64:Linux:*:* | loongarchx32:Linux:*:*) ++ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" ++ exit ;; + alpha:Linux:*:*) + case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` 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 1c7996eba275ef1c3e41e8271d7d1259083025d1..b9bc4c4f480d974bb4f75c640aa8663d6ed5f4d1 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: 2%{?dist} +Release: 2%{anolis_release}%{?dist} # All files licensed under PHP version 3.01, except # Zend is licensed under Zend # TSRM is licensed under BSD @@ -115,6 +116,8 @@ Patch201: php-7.4.19-CVE-2021-21705.patch # Factory is droped from system tzdata Patch300: php-5.6.3-datetests.patch +Patch1000: 1000-anolis-php-support-loongarch64.patch + BuildRequires: gnupg2 BuildRequires: bzip2-devel @@ -726,6 +729,8 @@ in pure PHP. # Fixes for tests %patch300 -p1 -b .datetests +%patch1000 -p1 + # Prevent %%doc confusion over LICENSE files cp Zend/LICENSE Zend/ZEND_LICENSE @@ -1513,6 +1518,9 @@ systemctl try-restart php-fpm.service >/dev/null 2>&1 || : %changelog +* Wed Apr 20 2022 Liwei Ge - 7.4.19-2.0.1 +- Support loongarch64 platform + * Wed Jan 19 2022 Remi Collet - 7.4.19-2 - fix SSRF bypass in FILTER_VALIDATE_URL CVE-2021-21705