From 97d845a77f740f2b06171fcaa3f7376187b69946 Mon Sep 17 00:00:00 2001 From: wxiat Date: Fri, 21 Jul 2023 15:23:24 +0800 Subject: [PATCH] - cherry-pick `add sw patch #400077d851a81ce23aa39db271e26c3df254ae53`. - cherry-pick `change sw patch #bdacf2efe00d8445328f798df8c5520728801e8c`. Signed-off-by: wxiat Signed-off-by: Weisson --- httpd-2.4.37-sw.patch | 66 +++++++++++++++++++++++++++++++++++++++++++ httpd.spec | 8 +++++- 2 files changed, 73 insertions(+), 1 deletion(-) create mode 100644 httpd-2.4.37-sw.patch diff --git a/httpd-2.4.37-sw.patch b/httpd-2.4.37-sw.patch new file mode 100644 index 0000000..0951329 --- /dev/null +++ b/httpd-2.4.37-sw.patch @@ -0,0 +1,66 @@ +diff -Naur httpd-2.4.37.org/configure httpd-2.4.37.sw/configure +--- httpd-2.4.37.org/configure 2018-10-18 22:34:09.000000000 +0800 ++++ httpd-2.4.37.sw/configure 2023-07-21 14:55:43.876595734 +0800 +@@ -29566,6 +29566,10 @@ + # ulimit only accepts English "unlimited" on input + APACHECTL_ULIMIT="ulimit -S -n unlimited" + ;; ++ *sw_64*-dec-osf*) ++ # Tru64: -H is for setting, not retrieving ++ APACHECTL_ULIMIT="ulimit -S -n \`ulimit -h -n\`" ++ ;; + *alpha*-dec-osf*) + # Tru64: -H is for setting, not retrieving + APACHECTL_ULIMIT="ulimit -S -n \`ulimit -h -n\`" +diff -Naur httpd-2.4.37.org/support/config.m4 httpd-2.4.37.sw/support/config.m4 +--- httpd-2.4.37.org/support/config.m4 2011-04-08 03:32:49.000000000 +0800 ++++ httpd-2.4.37.sw/support/config.m4 2023-07-21 14:56:03.520289713 +0800 +@@ -136,6 +136,10 @@ + # ulimit only accepts English "unlimited" on input + APACHECTL_ULIMIT="ulimit -S -n unlimited" + ;; ++ *sw_64*-dec-osf*) ++ # Tru64: -H is for setting, not retrieving ++ APACHECTL_ULIMIT="ulimit -S -n \`ulimit -h -n\`" ++ ;; + *alpha*-dec-osf*) + # Tru64: -H is for setting, not retrieving + APACHECTL_ULIMIT="ulimit -S -n \`ulimit -h -n\`" + +diff -Nuar httpd-2.4.37.org/build/config.guess httpd-2.4.37.sw/build/config.guess +--- httpd-2.4.37.org/build/config.guess 2023-08-09 16:22:45.045389206 +0800 ++++ httpd-2.4.37.sw/build/config.guess 2023-08-09 16:24:04.103173784 +0800 +@@ -900,6 +900,14 @@ + loongarch32:Linux:*:* | loongarch64:Linux:*:* | loongarchx32:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; ++ sw_64:Linux:*:*) ++ case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in ++ sw) UNAME_MACHINE=sw_64 ;; ++ esac ++ objdump --private-headers /bin/sh | grep -q ld.so.1 ++ if test "$?" = 0 ; then LIBC=gnulibc1 ; fi ++ echo ${UNAME_MACHINE}-sunway-linux-${LIBC} ++ exit ;; + alpha:Linux:*:*) + case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in + EV5) UNAME_MACHINE=alphaev5 ;; +diff -Nuar httpd-2.4.37.org/build/config.sub httpd-2.4.37.sw/build/config.sub +--- httpd-2.4.37.org/build/config.sub 2023-08-09 16:22:45.045389206 +0800 ++++ httpd-2.4.37.sw/build/config.sub 2023-08-09 16:23:26.159837338 +0800 +@@ -245,6 +245,7 @@ + 1750a | 580 \ + | a29k \ + | aarch64 | aarch64_be \ ++ | sw_64 \ + | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ + | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ + | am33_2.0 \ +@@ -370,6 +371,7 @@ + 580-* \ + | a29k-* \ + | aarch64-* | aarch64_be-* \ ++ | sw_64-* \ + | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ + | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ + | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \ diff --git a/httpd.spec b/httpd.spec index d01caa2..620596f 100644 --- a/httpd.spec +++ b/httpd.spec @@ -1,4 +1,4 @@ -%define anolis_release .0.2 +%define anolis_release .0.3 %define contentdir %{_datadir}/httpd %define docroot /var/www %define suexec_caller apache @@ -259,6 +259,7 @@ Patch239: httpd-2.4.37-CVE-2023-27522.patch # Add by Anolis Patch1000: 1000-httpd-anolis-rebrand.patch Patch1001: 1001-httpd-anolis-support-loongarch64.patch +Patch2000: httpd-2.4.37-sw.patch # End License: ASL 2.0 @@ -488,6 +489,7 @@ interface for storing and accessing per-user session data. # Add by Anolis %patch1000 -p1 %patch1001 -p1 +%patch2000 -p1 # End # Patch in the vendor string @@ -994,6 +996,10 @@ rm -rf $RPM_BUILD_ROOT %{_rpmconfigdir}/macros.d/macros.httpd %changelog +* Mon Mar 25 2024 wxiat 2.4.37-62.0.3 +- cherry-pick `add sw patch #400077d851a81ce23aa39db271e26c3df254ae53`. +- cherry-pick `change sw patch #bdacf2efe00d8445328f798df8c5520728801e8c`. + * Tue Jan 30 2024 Zhao Hang - 2.4.37-62.0.2 - Requires system-logos-httpd -- Gitee