File crypto-policies-build-skip-bind-on-loongarch64.patch of Package crypto-policies
diff -Nur fedora-crypto-policies-20250124.4d262e7/python/build-crypto-policies.py fedora-crypto-policies-20250124.4d262e7-new/python/build-crypto-policies.py
--- fedora-crypto-policies-20250124.4d262e7/python/build-crypto-policies.py 2025-01-25 01:31:31.000000000 +0800
+++ fedora-crypto-policies-20250124.4d262e7-new/python/build-crypto-policies.py 2025-07-03 21:19:48.821359087 +0800
@@ -13,6 +13,8 @@
import cryptopolicies
import policygenerators
+import platform
+
RELOAD_CMD_NAME = 'reload-cmds.sh'
@@ -96,8 +98,12 @@
except ValueError as e: # TODO: catch specific thing
eprint('Error: ' + str(e))
return 1
-
- generators = [g for g in dir(policygenerators) if 'Generator' in g]
+
+ arch = platform.machine()
+ if arch == "loongarch64":
+ generators = [g for g in dir(policygenerators) if 'Generator' in g and g != "BindGenerator"]
+ else:
+ generators = [g for g in dir(policygenerators) if 'Generator' in g]
for g in generators:
cls = policygenerators.__dict__[g]