Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package crypto-policies for openSUSE:Factory
checked in at 2026-09-18 22:03:31
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/crypto-policies (Old)
and /work/SRC/openSUSE:Factory/.crypto-policies.new.383539 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "crypto-policies"
Fri Sep 18 22:03:31 2026 rev:18 rq:1377529 version:20250714.cd6043a
Changes:
--------
--- /work/SRC/openSUSE:Factory/crypto-policies/crypto-policies.changes
2026-08-04 21:28:21.495484288 +0200
+++
/work/SRC/openSUSE:Factory/.crypto-policies.new.383539/crypto-policies.changes
2026-09-18 22:04:03.626362030 +0200
@@ -1,0 +2,8 @@
+Mon Aug 10 19:24:25 UTC 2026 - Matej Cepl <[email protected]>
+
+- Add configure-python-interpreter.patch removing dependency on
+ `python3-base`, all Python scripts are now dependent on the
+ primary Python interpreter directly without `/usr/bin/python3`
+ mediation.
+
+-------------------------------------------------------------------
New:
----
configure-python-interpreter.patch
----------(New B)----------
New:
- Add configure-python-interpreter.patch removing dependency on
`python3-base`, all Python scripts are now dependent on the
----------(New E)----------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ crypto-policies.spec ++++++
--- /var/tmp/diff_new_pack.rXq9NQ/_old 2026-09-18 22:04:04.473397529 +0200
+++ /var/tmp/diff_new_pack.rXq9NQ/_new 2026-09-18 22:04:04.475397613 +0200
@@ -20,6 +20,18 @@
%bcond_with testsuite
%bcond_with manbuild
%global _python_bytecompile_extra 0
+%global python %{?primary_python}%{!?primary_python:python3}
+%global _pyver %{lua: \
+ local ver = string.sub(rpm.expand("%python"), string.len("python") + 1, -1);
\
+ if ver == "3" or ver:find("%.") then \
+ print(ver); \
+ else \
+ print(string.format("%s.%s", string.sub(ver, 1, 1), string.sub(ver, 2,
-1))); \
+ end; \
+}
+%global _pyexec %{lua: \
+ print(rpm.expand("%{_bindir}/python%_pyver")); \
+}
Name: crypto-policies
Version: 20250714.cd6043a
@@ -59,13 +71,18 @@
Patch8: crypto-policies-OpenSSH-PQC.patch
#PATCH-FIX-UPSTREAM Disable umac-128 (bsc#1259515)
Patch9:
crypto-policies-Disable-umac-128-in-DEFAULT-FUTURE-and-BSI-openssh-policies.patch
-BuildRequires: python3-base >= 3.11
+# PATCH-FIX-OPENSUSE configure-python-interpreter.patch [email protected]
+# make the Python version configurable
+Patch10: configure-python-interpreter.patch
+BuildRequires: %{python}-base >= 3.11
%if %{with manbuild}
BuildRequires: asciidoc
%endif
%if %{with testsuite}
# The following packages are needed for the testsuite
BuildRequires: bind
+BuildRequires: %{python}-devel >= 3.11
+BuildRequires: %{python}-pytest
BuildRequires: crypto-policies-scripts
BuildRequires: gnutls
BuildRequires: java-devel
@@ -74,8 +91,6 @@
BuildRequires: openssh-clients
BuildRequires: openssl
BuildRequires: python-rpm-macros
-BuildRequires: python3-devel >= 3.11
-BuildRequires: python3-pytest
BuildRequires: systemd-rpm-macros
%else
# Avoid cycle with python-rpm-macros
@@ -139,7 +154,7 @@
sed -i '/SCRIPTS=update-crypto-policies/s/$/ fips-finish-install
fips-mode-setup/g' Makefile
%endif
-%make_build
+%make_build PYVERSION="%{_pyver}"
%install
mkdir -p -m 755 %{buildroot}%{_datarootdir}/crypto-policies/
@@ -151,7 +166,7 @@
mkdir -p -m 755 %{buildroot}%{_sysconfdir}/crypto-policies/policies/modules/
mkdir -p -m 755 %{buildroot}%{_bindir}
-make DESTDIR=%{buildroot} DIR=%{_datarootdir}/crypto-policies
MANDIR=%{_mandir} %{?_smp_mflags} install
+make PYVERSION="%{_pyver}" DESTDIR=%{buildroot}
DIR=%{_datarootdir}/crypto-policies MANDIR=%{_mandir} %{?_smp_mflags} install
install -p -m 644 default-config
%{buildroot}%{_sysconfdir}/crypto-policies/config
touch %{buildroot}%{_sysconfdir}/crypto-policies/state/current
@@ -195,16 +210,26 @@
done
for f in %{buildroot}%{_datarootdir}/crypto-policies/DEFAULT/* ; do
- ln -sf %{_datarootdir}/crypto-policies/DEFAULT/$(basename $f)
%{buildroot}%{_sysconfdir}/crypto-policies/back-ends/$(basename $f .txt).config
+ ln -sf %{_datarootdir}/crypto-policies/DEFAULT/$(basename $f) \
+ %{buildroot}%{_sysconfdir}/crypto-policies/back-ends/$(basename $f
.txt).config
done
# Fix shebang env in python scripts
-for f in %{buildroot}%{_datadir}/crypto-policies/python/*.py
-do
- sed -i 's|^#!/usr/bin/env python3$|#!/usr/bin/python3|' $f
+for f in %{buildroot}%{_datadir}/crypto-policies/python/*.py ; do \
+ if test -f "$f" -a -x "$f" -a -w "$f"
+ then
+ # in i586, sed fails when following symlinks to long paths, so
+ # changing to the target directory avoid this problem
+ (
+ cd "$(dirname "$f")"
+ sed -i -e '1s@^#!.*python[0-9.]*@#!%{_pyexec}@' "$(basename "$f")"
+ )
+ fi
+done
+for d in %{buildroot}%{_datadir}/crypto-policies/python ; do
+ find $d -name '*.pyc' -exec rm -f {} ";"
+ %_pyexec -c "import sys, os, compileall; br='%{buildroot}';
compileall.compile_dir(sys.argv[1], ddir=br and
(sys.argv[1][len(os.path.abspath(br)):]+'/') or None)" $d
done
-
-%py3_compile %{buildroot}%{_datadir}/crypto-policies/python
# Install README.SUSE to %%doc
install -p -m 644 %{SOURCE1} %{buildroot}%{_sysconfdir}/crypto-policies
@@ -212,7 +237,7 @@
%check
%if %{with testsuite}
export OPENSSL_CONF=''
-%make_build test SKIP_LINTING=1
+%make_build PYVERSION="%{_pyver}" test SKIP_LINTING=1
%endif
%post -p <lua>
++++++ configure-python-interpreter.patch ++++++
---
Makefile | 47 ++++++++++++++++++++++++-----------------------
1 file changed, 24 insertions(+), 23 deletions(-)
Index: fedora-crypto-policies-20250714.cd6043a/Makefile
===================================================================
--- fedora-crypto-policies-20250714.cd6043a.orig/Makefile 2026-08-10
21:14:12.518728729 +0200
+++ fedora-crypto-policies-20250714.cd6043a/Makefile 2026-08-10
21:17:56.706001640 +0200
@@ -12,7 +12,8 @@
LIBEXEC_SCRIPTS=fips-crypto-policy-overlay fips-setup-helper
UNITS=fips-crypto-policy-overlay.service
NUM_PROCS = $$(getconf _NPROCESSORS_ONLN)
-PYVERSION = -3
+PYVERSION? = 3
+PYTHON?=python$(PYVERSION)
DIFFTOOL?=meld
ASCIIDOC?=asciidoc
XSLTPROC?=xsltproc
@@ -26,7 +27,7 @@
build: $(MAN7PAGES) $(MAN8PAGES)
mkdir -p output
- python/build-crypto-policies.py --reloadcmds policies output
+ $(PYTHON) python/build-crypto-policies.py --reloadcmds policies output
install: $(MANPAGES)
mkdir -p $(DESTDIR)$(MANDIR)
@@ -57,8 +58,8 @@
@find -name '*.py' | grep -v krb5check | xargs flake8 --config .flake8
runpylint:
- PYTHONPATH=. pylint$(PYVERSION) --rcfile=pylintrc python
- PYTHONPATH=. pylint$(PYVERSION) --rcfile=pylintrc tests
+ PYTHONPATH=. pylint-$(PYVERSION) --rcfile=pylintrc python
+ PYTHONPATH=. pylint-$(PYVERSION) --rcfile=pylintrc tests
@echo "[ OK ]"
runcodespell:
@@ -66,15 +67,15 @@
check:
@mkdir -p output/compare
- python/build-crypto-policies.py --strict --test --flat policies
tests/outputs
- python/build-crypto-policies.py --strict --policy FIPS:OSPP --test
--flat policies tests/outputs
- python/build-crypto-policies.py --strict --policy FIPS:ECDHE-ONLY
--test --flat policies tests/outputs
- python/build-crypto-policies.py --strict --policy FIPS:NO-ENFORCE-EMS
--test --flat policies tests/outputs
- python/build-crypto-policies.py --strict --policy DEFAULT:GOST --test
--flat policies tests/outputs
- python/build-crypto-policies.py --strict --policy GOST-ONLY --test
--flat policies tests/outputs
- python/build-crypto-policies.py --strict --policy LEGACY:AD-SUPPORT
--test --flat policies tests/outputs
- python/build-crypto-policies.py --strict --policy DEFAULT:NO-PQ --test
--flat policies tests/outputs
- python/build-crypto-policies.py --policy DEFAULT:TEST-PQ --test --flat
policies tests/outputs # not strict
+ $(PYTHON) python/build-crypto-policies.py --strict --test --flat
policies tests/outputs
+ $(PYTHON) python/build-crypto-policies.py --strict --policy FIPS:OSPP
--test --flat policies tests/outputs
+ $(PYTHON) python/build-crypto-policies.py --strict --policy
FIPS:ECDHE-ONLY --test --flat policies tests/outputs
+ $(PYTHON) python/build-crypto-policies.py --strict --policy
FIPS:NO-ENFORCE-EMS --test --flat policies tests/outputs
+ $(PYTHON) python/build-crypto-policies.py --strict --policy
DEFAULT:GOST --test --flat policies tests/outputs
+ $(PYTHON) python/build-crypto-policies.py --strict --policy GOST-ONLY
--test --flat policies tests/outputs
+ $(PYTHON) python/build-crypto-policies.py --strict --policy
LEGACY:AD-SUPPORT --test --flat policies tests/outputs
+ $(PYTHON) python/build-crypto-policies.py --strict --policy
DEFAULT:NO-PQ --test --flat policies tests/outputs
+ $(PYTHON) python/build-crypto-policies.py --policy DEFAULT:TEST-PQ
--test --flat policies tests/outputs # not strict
# # FEDORA43 === DEFAULT
# diff policies/FEDORA43.pol policies/DEFAULT.pol
# # FEDORA43:NO-PQ == FEDORA42 == FEDORA43:TEST-PQ:NO-PQ
@@ -97,21 +98,21 @@
@rm -rf output/alt
@mkdir -p output
cp -r tests/outputs output/alt
- python/build-crypto-policies.py --test --flat
tests/alternative-policies output/alt
- python/build-crypto-policies.py --policy FIPS:OSPP --test --flat
tests/alternative-policies output/alt
- python/build-crypto-policies.py --policy FIPS:ECDHE-ONLY --test --flat
tests/alternative-policies output/alt
- python/build-crypto-policies.py --policy FIPS:NO-ENFORCE-EMS --test
--flat tests/alternative-policies output/alt
- python/build-crypto-policies.py --policy GOST-ONLY --test --flat
tests/alternative-policies output/alt
- python/build-crypto-policies.py --policy LEGACY:AD-SUPPORT --test
--flat tests/alternative-policies output/alt
- python/build-crypto-policies.py --policy DEFAULT:GOST --test --flat
tests/alternative-policies output/alt
- python/build-crypto-policies.py --policy DEFAULT:TEST-PQ --test --flat
tests/alternative-policies output/alt
+ $(PYTHON) python/build-crypto-policies.py --test --flat
tests/alternative-policies output/alt
+ $(PYTHON) python/build-crypto-policies.py --policy FIPS:OSPP --test
--flat tests/alternative-policies output/alt
+ $(PYTHON) python/build-crypto-policies.py --policy FIPS:ECDHE-ONLY
--test --flat tests/alternative-policies output/alt
+ $(PYTHON) python/build-crypto-policies.py --policy FIPS:NO-ENFORCE-EMS
--test --flat tests/alternative-policies output/alt
+ $(PYTHON) python/build-crypto-policies.py --policy GOST-ONLY --test
--flat tests/alternative-policies output/alt
+ $(PYTHON) python/build-crypto-policies.py --policy LEGACY:AD-SUPPORT
--test --flat tests/alternative-policies output/alt
+ $(PYTHON) python/build-crypto-policies.py --policy DEFAULT:GOST --test
--flat tests/alternative-policies output/alt
+ $(PYTHON) python/build-crypto-policies.py --policy DEFAULT:TEST-PQ
--test --flat tests/alternative-policies output/alt
@rm -rf output/alt
doctest:
- @python3 -Werror -m pytest -vv --doctest-modules python/
+ @$(PYTHON) -Werror -m pytest -vv --doctest-modules python/
unittest:
- @python3 -Werror -m pytest -vv tests/unit/
+ @$(PYTHON) -Werror -m pytest -vv tests/unit/
covtest: #doctest unittest
@# FIXME: only covers python/cryptopolicies/ files so far