File project.diff of Package sssd
--- sssd.spec.orig
+++ sssd.spec
@@ -15,6 +15,8 @@
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
+# freeipa can't use python 3.6
+%{?single_pythons_311plus}
Name: sssd
Version: 2.11.0
@@ -28,6 +30,7 @@ Source: https://github.com/SSSD/
Source2: https://github.com/SSSD/sssd/releases/download/%version/%name-%version.tar.gz.asc
Source3: baselibs.conf
Source5: %name.keyring
+Source6: %{name}-rpmlintrc
Patch1: 0001-TOOL-Fix-build-parameter-name-omitted.patch
Patch11: krb-noversion.diff
Patch12: harden_sssd-ifp.service.patch
@@ -54,8 +57,9 @@ BuildRequires: nss_wrapper
BuildRequires: openldap2-devel
BuildRequires: pam-devel
BuildRequires: pkg-config >= 0.21
-BuildRequires: python3-wheel
-BuildRequires: python3-setuptools
+BuildRequires: %{python_module wheel}
+BuildRequires: %{python_module setuptools}
+BuildRequires: systemd
BuildRequires: systemd-rpm-macros
BuildRequires: sysuser-tools
BuildRequires: uid_wrapper
@@ -86,7 +90,7 @@ BuildRequires: pkgconfig(ndr_krb5pac)
BuildRequires: pkgconfig(ndr_nbt)
BuildRequires: pkgconfig(p11-kit-1) >= 0.23.3
BuildRequires: pkgconfig(popt)
-BuildRequires: pkgconfig(python3)
+BuildRequires: %{python_module devel}
BuildRequires: pkgconfig(smbclient)
BuildRequires: pkgconfig(talloc)
BuildRequires: pkgconfig(tdb) >= 1.1.3
@@ -229,7 +233,7 @@ modules to leverage SSSD caching. (This
Summary: Commandline tools for sssd
License: GPL-3.0-or-later AND LGPL-3.0-or-later
Group: System/Management
-Requires: python3-sssd-config = %version-%release
+Requires: %{python_flavor}-sssd-config = %version-%release
Requires: sssd = %version
%description tools
@@ -372,43 +376,43 @@ Supplements: (sudo and sssd-client)
%description -n libsss_sudo
A utility library to allow communication between sudo and SSSD.
-%package -n python3-ipa_hbac
+%package -n %{python_flavor}-ipa_hbac
Summary: Python bindings for the FreeIPA HBAC Evaluator library
License: LGPL-3.0-or-later
Group: Development/Libraries/Python
Requires: python3
-%description -n python3-ipa_hbac
+%description -n %{python_flavor}-ipa_hbac
The python-ipa_hbac package contains the bindings so that libipa_hbac
can be used by Python applications.
-%package -n python3-sss-murmur
+%package -n %{python_flavor}-sss-murmur
Summary: Python3 bindings for SSSD Murmur hash function
License: LGPL-3.0-or-later
Group: Development/Libraries/Python
Requires: python3
-%description -n python3-sss-murmur
+%description -n %{python_flavor}-sss-murmur
This subpackage provides the python3 module for calculating the
Murmur hash version 3.
-%package -n python3-sss_nss_idmap
+%package -n %{python_flavor}-sss_nss_idmap
Summary: Python bindings for libsss_nss_idmap
License: LGPL-3.0-or-later
Group: Development/Libraries/Python
Requires: python3
-%description -n python3-sss_nss_idmap
+%description -n %{python_flavor}-sss_nss_idmap
The libsss_nss_idmap-python contains the bindings so that
libsss_nss_idmap can be used by Python applications.
-%package -n python3-sssd-config
+%package -n %{python_flavor}-sssd-config
Summary: Python API for configuring sssd
License: GPL-3.0-or-later AND LGPL-3.0-or-later
Group: Development/Libraries/Python
Requires: python3
-%description -n python3-sssd-config
+%description -n %{python_flavor}-sssd-config
Provide python module to access and manage configuration of the System
Security Services Daemon (sssd).
@@ -416,6 +420,9 @@ Security Services Daemon (sssd).
%autosetup -p1
%build
+b="%buildroot"
+
+%{python_expand export PYTHON=$python PYTHON3=$python ac_cv_path_PYTHON3="%_bindir/$python" am_cv_python_version=%{$python_version}
autoreconf -fiv
%configure \
--with-db-path="%dbpath" \
@@ -441,7 +448,16 @@ autoreconf -fiv
--with-libsifp \
--with-files-provider
%endif
+
+%if 0%{?suse_version} > 1600
+%python3_fix_shebang_path "$b/src/config"/*
+%elif 0%{?suse_version} < 1600
+# python3_fix_shebang_path macro does not exist in < 1600, was added in python-rom-macros 20231204
+sed -i '1s@#!.*python.*@#!%_bindir/python3.11@' "$b/src/config"/*
+%endif
+
%make_build all
+}
%install
# sss_obfuscate is compatible with both Python 2 and 3
@@ -484,7 +500,7 @@ ln -sfv %cifs_idmap_lib %buildroot/%cifs
%python3_fix_shebang
%if 0%{?suse_version} > 1600
%python3_fix_shebang_path %buildroot/%_libexecdir/%name/sss_analyze
-%elif 0%{?suse_version} == 1600
+%elif 0%{?suse_version} <= 1600
# python3_fix_shebang_path macro does not exist in < 1600, was added in python-rom-macros 20231204
sed -i '1s@#!.*python.*@#!%_bindir/python3.11@' "$b/%_libexecdir/%name/sss_analyze"
%endif
@@ -695,9 +711,6 @@ fi
%_libdir/%name/libsss_cert*
%_libdir/%name/libsss_crypt*
%_libdir/%name/libsss_debug*
-%if 0%{?suse_version} < 1600
-%_libdir/%name/libsss_files*
-%endif
%_libdir/%name/libsss_iface*
%_libdir/%name/libsss_sbus*
%_libdir/%name/libsss_simple*
@@ -879,7 +892,7 @@ fi
%_mandir/??/man8/sss_*.8*
%_mandir/man8/sssctl.8*
%_mandir/man8/sss_*.8*
-%python3_sitelib/sssd/
+%{python_sitelib}/sssd/
%files winbind-idmap
%dir %_libdir/samba/
@@ -930,29 +943,19 @@ fi
%_libdir/libsss_nss_idmap.so
%_libdir/pkgconfig/sss_nss_idmap.pc
-%if 0%{?suse_version} < 1600
-%files -n libsss_simpleifp0
-%_libdir/libsss_simpleifp.so.0*
-
-%files -n libsss_simpleifp-devel
-%_includedir/sss_sifp*.h
-%_libdir/libsss_simpleifp.so
-%_libdir/pkgconfig/sss_simpleifp.pc
-%endif
-
-%files -n python3-ipa_hbac
-%dir %python3_sitearch
-%python3_sitearch/pyhbac.so
-
-%files -n python3-sss-murmur
-%python3_sitearch/pysss_murmur.so
-
-%files -n python3-sss_nss_idmap
-%dir %python3_sitearch
-%python3_sitearch/pysss_nss_idmap.so
-
-%files -n python3-sssd-config
-%python3_sitearch/pysss.so
-%python3_sitelib/SSSDConfig*
+%files -n %{python_flavor}-ipa_hbac
+%dir %{python_sitearch}
+%{python_sitearch}/pyhbac.so
+
+%files -n %{python_flavor}-sss-murmur
+%{python_sitearch}/pysss_murmur.so
+
+%files -n %{python_flavor}-sss_nss_idmap
+%dir %{python_sitearch}
+%{python_sitearch}/pysss_nss_idmap.so
+
+%files -n %{python_flavor}-sssd-config
+%{python_sitearch}/pysss.so
+%{python_sitelib}/SSSDConfig*
%changelog