From ce8dbcf775a1bf3d6bd0d5de53d3688e7caa00db Mon Sep 17 00:00:00 2001 From: wxiat Date: Tue, 27 Jun 2023 16:47:34 +0800 Subject: [PATCH] add sw Signed-off-by: wxiat --- nss-add-sw.patch | 50 ++++++++++++++++++++++++++++++++++++++++++++++++ nss.spec | 12 +++++++++++- 2 files changed, 61 insertions(+), 1 deletion(-) create mode 100644 nss-add-sw.patch diff --git a/nss-add-sw.patch b/nss-add-sw.patch new file mode 100644 index 0000000..45dda38 --- /dev/null +++ b/nss-add-sw.patch @@ -0,0 +1,50 @@ +From 43f5d373ecd297761a6c4b94ec0495266830f465 Mon Sep 17 00:00:00 2001 +From: wxiat +Date: Tue, 27 Jun 2023 16:43:45 +0800 +Subject: [PATCH] add sw + +Signed-off-by: wxiat +--- + coreconf/Linux.mk | 5 +++++ + lib/dbm/include/mcom_db.h | 2 +- + 2 files changed, 6 insertions(+), 1 deletion(-) + +diff --git a/coreconf/Linux.mk b/coreconf/Linux.mk +index 891086d..ee34ae3 100644 +--- a/coreconf/Linux.mk ++++ b/coreconf/Linux.mk +@@ -65,6 +65,10 @@ ifeq ($(OS_TEST),alpha) + OS_REL_CFLAGS = -D_ALPHA_ + CPU_ARCH = alpha + else ++ifeq ($(OS_TEST),sw_64) ++ OS_REL_CFLAGS = -D_SW_64_ ++ CPU_ARCH = sw_64 ++else + ifeq ($(OS_TEST),x86_64) + ifeq ($(USE_64),1) + CPU_ARCH = x86_64 +@@ -107,6 +111,7 @@ endif + endif + endif + endif ++endif + + + ifneq ($(OS_TARGET),Android) +diff --git a/lib/dbm/include/mcom_db.h b/lib/dbm/include/mcom_db.h +index e961dd1..e8cea2d 100644 +--- a/lib/dbm/include/mcom_db.h ++++ b/lib/dbm/include/mcom_db.h +@@ -126,7 +126,7 @@ typedef PRUint32 uint32; + #include + #endif + +-#ifdef __alpha ++#if defined __alpha || defined __sw_64 + #ifndef WIN32 + #else + /* Alpha NT */ +-- +2.31.1 + diff --git a/nss.spec b/nss.spec index 0efdf0a..f33ef85 100644 --- a/nss.spec +++ b/nss.spec @@ -1,3 +1,5 @@ +%define anolis_release .0.1 + %global nspr_build_version 4.34.0-3 %global nspr_release -3 %global nspr_version 4.34.0 @@ -63,7 +65,7 @@ print(string.sub(hash, 0, 16)) Summary: Network Security Services Name: nss Version: %{nss_version} -Release: 11%{?dist} +Release: 11%{anolis_release}%{?dist} License: MPLv2.0 URL: http://www.mozilla.org/projects/security/pki/nss/ Requires: nspr >= %{nspr_version}%{nspr_release} @@ -171,6 +173,8 @@ Patch68: nss-3.79-fips.patch # https://bugzilla.mozilla.org/show_bug.cgi?id=1804640 Patch70: cve-2023-0767.patch +Patch71: nss-add-sw.patch + %description Network Security Services (NSS) is a set of libraries designed to support cross-platform development of security-enabled client and @@ -306,6 +310,9 @@ popd find nss/lib/libpkix -perm /u+x -type f -exec chmod -x {} \; %build +%ifarch sw_64 +export NSS_DISABLE_GTESTS=1 +%endif export FREEBL_NO_DEPEND=1 @@ -947,6 +954,9 @@ update-crypto-policies --no-reload &> /dev/null || : %changelog +* Tue Jun 27 2023 wxiat - 3.79.0-11.0.1 +- add sw patch + * Wed Mar 8 2023 Bob Relyea - 3.79.0-11 - Fix CVE-2023-0767 -- Gitee