From eae7dc1d8940f0e8869b4a537c1f35f80dd0bde5 Mon Sep 17 00:00:00 2001 From: lzq11122 Date: Wed, 23 Jul 2025 17:31:19 +0800 Subject: [PATCH] test Signed-off-by: lzq11122 --- 1000-add-sw_64-arch-support.patch | 38 +++++++++++++++++++++++++++++++ libxcrypt.spec | 8 ++++++- 2 files changed, 45 insertions(+), 1 deletion(-) create mode 100644 1000-add-sw_64-arch-support.patch diff --git a/1000-add-sw_64-arch-support.patch b/1000-add-sw_64-arch-support.patch new file mode 100644 index 0000000..bf74dfe --- /dev/null +++ b/1000-add-sw_64-arch-support.patch @@ -0,0 +1,38 @@ +From 294a52c6532eaf0338154102ce45664b94a892f2 Mon Sep 17 00:00:00 2001 +From: lzq11122 +Date: Mon, 4 Aug 2025 11:54:20 +0800 +Subject: [PATCH 1/1] add sw_64 arch support + +--- + lib/crypt-bcrypt.c | 2 +- + lib/libcrypt.minver | 1 + + 2 files changed, 2 insertions(+), 1 deletion(-) + +diff --git a/lib/crypt-bcrypt.c b/lib/crypt-bcrypt.c +index b82983b..0c4106c 100644 +--- a/lib/crypt-bcrypt.c ++++ b/lib/crypt-bcrypt.c +@@ -52,7 +52,7 @@ + #if INCLUDE_bcrypt || INCLUDE_bcrypt_a || INCLUDE_bcrypt_x || INCLUDE_bcrypt_y + + #if defined(__i386__) || defined(__x86_64__) || \ +- defined(__alpha__) || defined(__hppa__) ++ defined(__alpha__) || defined(__hppa__) || defined(__sw_64__) + #define BF_SCALE 1 + #else + #define BF_SCALE 0 +diff --git a/lib/libcrypt.minver b/lib/libcrypt.minver +index 8478077..884de8b 100644 +--- a/lib/libcrypt.minver ++++ b/lib/libcrypt.minver +@@ -79,6 +79,7 @@ GLIBC_2.3 linux.*gnu powerpc64 + GLIBC_2.2.5 linux.*gnu x86_64 defined __x86_64__ && ULONG_MAX != UINT_MAX /* 64 */ + GLIBC_2.2 linux.*gnu s390x + GLIBC_2.0 linux.*gnu alpha ++GLIBC_2.0 linux.*gnu sw_64 + GLIBC_2.0 linux.*gnu e2k + GLIBC_2.0 linux.*gnu hppa + GLIBC_2.0 linux.*gnu i[3-9]86 +-- +2.43.5 + diff --git a/libxcrypt.spec b/libxcrypt.spec index a590860..936e26c 100644 --- a/libxcrypt.spec +++ b/libxcrypt.spec @@ -1,4 +1,4 @@ -%define anolis_release 1 +%define anolis_release 2 %bcond_without new_api %bcond_without compat_pkg @@ -128,6 +128,8 @@ BuildRequires: perl(utf8) BuildRequires: perl(warnings) BuildRequires: perl-interpreter +Patch001: 1000-add-sw_64-arch-support.patch + Obsoletes: libcrypt-nss < %{glibc_minver} Provides: libcrypt-nss = %{glibc_minver} @@ -285,6 +287,7 @@ pushd %{_vpath_builddir} %{common_configure_options} \ --enable-hashes=%{hash_methods} \ --enable-obsolete-api=%{obsolete_api} \ + --disable-werror \ %if %{with new_api} --enable-obsolete-api-enosys=%{obsolete_api} %else @@ -360,6 +363,7 @@ install -Dpm 0644 -t %{buildroot}%{_pkgdocdir} \ rm -f %{buildroot}%{_pkgdocdir}/README.md %check + build_dirs="%{_vpath_builddir}" %if %{with compat_pkg} build_dirs="${build_dirs} %{_vpath_builddir}-compat" @@ -452,6 +456,8 @@ done %changelog +* Wed Jul 23 2025 lzq11122 - 4.4.36-2 +- Add sw_64 arch support * Fri Nov 10 2023 Funda Wang - 4.4.36-1 - New version 4.4.36 -- Gitee