Fix samba-tool dependencies on non-dc builds

It has two steps:
- Build python3-samba-dc also for non-dc builds
- Require python3-samba-dc from common-tools also for non-dc builds
This commit is contained in:
Pavel Filipenský 2023-02-10 20:55:16 +01:00
parent 36c4a399ca
commit 5704b04d69
1 changed files with 5 additions and 51 deletions

View File

@ -135,7 +135,7 @@
%define samba_requires_eq() %(LC_ALL="C" echo '%*' | xargs -r rpm -q --qf 'Requires: %%{name} = %%{epoch}:%%{version}\\n' | sed -e 's/ (none):/ /' -e 's/ 0:/ /' | grep -v "is not") %define samba_requires_eq() %(LC_ALL="C" echo '%*' | xargs -r rpm -q --qf 'Requires: %%{name} = %%{epoch}:%%{version}\\n' | sed -e 's/ (none):/ /' -e 's/ 0:/ /' | grep -v "is not")
%global samba_version 4.18.0 %global samba_version 4.18.0
%global baserelease 3 %global baserelease 4
# This should be rc1 or %%nil # This should be rc1 or %%nil
%global pre_release rc2 %global pre_release rc2
@ -525,9 +525,9 @@ Requires: libwbclient = %{samba_depver}
Requires: python3-%{name} = %{samba_depver} Requires: python3-%{name} = %{samba_depver}
# samba-tool needs tdbbackup # samba-tool needs tdbbackup
Requires: tdb-tools Requires: tdb-tools
%if %{with dc} # samba-tool needs python3-samba-dc also on non-dc build
# samba-tool needs python3-samba-dc on a full build
Requires: python3-%{name}-dc = %{samba_depver} Requires: python3-%{name}-dc = %{samba_depver}
%if %{with dc}
# samba-tool needs mdb_copy for domain backup or upgrade provision # samba-tool needs mdb_copy for domain backup or upgrade provision
Requires: lmdb Requires: lmdb
%endif %endif
@ -877,7 +877,6 @@ Requires: %{name}-libs = %{samba_depver}
The python3-%{name}-test package contains the Python libraries used by the test suite of Samba. The python3-%{name}-test package contains the Python libraries used by the test suite of Samba.
If you want to run full set of Samba tests, you need to install this package. If you want to run full set of Samba tests, you need to install this package.
%if %{with dc} || %{with testsuite}
%package -n python3-samba-dc %package -n python3-samba-dc
Summary: Samba Python libraries for Samba AD Summary: Samba Python libraries for Samba AD
Requires: %{name}-client-libs = %{samba_depver} Requires: %{name}-client-libs = %{samba_depver}
@ -887,7 +886,6 @@ Requires: python3-%{name} = %{samba_depver}
%description -n python3-samba-dc %description -n python3-samba-dc
The python3-%{name}-dc package contains the Python libraries needed by programs The python3-%{name}-dc package contains the Python libraries needed by programs
to manage Samba AD. to manage Samba AD.
%endif
### PIDL ### PIDL
%package pidl %package pidl
@ -1407,54 +1405,10 @@ touch %{buildroot}%{_libdir}/krb5/plugins/libkrb5/winbind_krb5_locator.so
%if %{without dc} && %{without testsuite} %if %{without dc} && %{without testsuite}
for i in \ for i in \
%{_libdir}/samba/libdfs-server-ad-samba4.so \
%{_libdir}/samba/libdsdb-garbage-collect-tombstones-samba4.so \
%{_libdir}/samba/libscavenge-dns-records-samba4.so \
%{_mandir}/man8/samba.8 \ %{_mandir}/man8/samba.8 \
%{_mandir}/man8/samba_downgrade_db.8 \ %{_mandir}/man8/samba_downgrade_db.8 \
%{_mandir}/man8/samba-gpupdate.8 \ %{_mandir}/man8/samba-gpupdate.8 \
%{_unitdir}/samba.service \ %{_unitdir}/samba.service \
%{python3_sitearch}/samba/dcerpc/dnsserver.*.so \
%{python3_sitearch}/samba/dnsserver.py \
%{python3_sitearch}/samba/domain_update.py \
%{python3_sitearch}/samba/forest_update.py \
%{python3_sitearch}/samba/kcc/__init__.py \
%{python3_sitearch}/samba/kcc/debug.py \
%{python3_sitearch}/samba/kcc/graph.py \
%{python3_sitearch}/samba/kcc/graph_utils.py \
%{python3_sitearch}/samba/kcc/kcc_utils.py \
%{python3_sitearch}/samba/kcc/ldif_import_export.py \
%{python3_sitearch}/samba/kcc/__pycache__/__init__.*.pyc \
%{python3_sitearch}/samba/kcc/__pycache__/debug.*.pyc \
%{python3_sitearch}/samba/kcc/__pycache__/graph.*.pyc \
%{python3_sitearch}/samba/kcc/__pycache__/graph_utils.*.pyc \
%{python3_sitearch}/samba/kcc/__pycache__/kcc_utils.*.pyc \
%{python3_sitearch}/samba/kcc/__pycache__/ldif_import_export.*.pyc \
%{python3_sitearch}/samba/ms_forest_updates_markdown.py \
%{python3_sitearch}/samba/ms_schema_markdown.py \
%{python3_sitearch}/samba/provision/__init__.py \
%{python3_sitearch}/samba/provision/backend.py \
%{python3_sitearch}/samba/provision/common.py \
%{python3_sitearch}/samba/provision/kerberos_implementation.py \
%{python3_sitearch}/samba/provision/kerberos.py \
%{python3_sitearch}/samba/provision/sambadns.py \
%{python3_sitearch}/samba/provision/__pycache__/__init__.*.pyc \
%{python3_sitearch}/samba/provision/__pycache__/backend.*.pyc \
%{python3_sitearch}/samba/provision/__pycache__/common.*.pyc \
%{python3_sitearch}/samba/provision/__pycache__/kerberos_implementation.*.pyc \
%{python3_sitearch}/samba/provision/__pycache__/kerberos.*.pyc \
%{python3_sitearch}/samba/provision/__pycache__/sambadns.*.pyc \
%{python3_sitearch}/samba/__pycache__/domain_update.*.pyc \
%{python3_sitearch}/samba/__pycache__/forest_update.*.pyc \
%{python3_sitearch}/samba/__pycache__/ms_forest_updates_markdown.*.pyc \
%{python3_sitearch}/samba/__pycache__/ms_schema_markdown.*.pyc \
%{python3_sitearch}/samba/__pycache__/remove_dc.*.pyc \
%{python3_sitearch}/samba/__pycache__/schema.*.pyc \
%{python3_sitearch}/samba/__pycache__/uptodateness.*.pyc \
%{python3_sitearch}/samba/remove_dc.py \
%{python3_sitearch}/samba/samdb.py \
%{python3_sitearch}/samba/schema.py \
%{python3_sitearch}/samba/uptodateness.py \
%{_sbindir}/samba-gpupdate \ %{_sbindir}/samba-gpupdate \
; do ; do
rm -f %{buildroot}$i rm -f %{buildroot}$i
@ -2805,7 +2759,6 @@ fi
%{_libdir}/libsamba-policy.*.so %{_libdir}/libsamba-policy.*.so
%{_libdir}/pkgconfig/samba-policy.*.pc %{_libdir}/pkgconfig/samba-policy.*.pc
%if %{with dc} || %{with testsuite}
%files -n python3-%{name}-dc %files -n python3-%{name}-dc
%{python3_sitearch}/samba/samdb.py %{python3_sitearch}/samba/samdb.py
%{python3_sitearch}/samba/schema.py %{python3_sitearch}/samba/schema.py
@ -2821,7 +2774,9 @@ fi
%{python3_sitearch}/samba/__pycache__/uptodateness.*.pyc %{python3_sitearch}/samba/__pycache__/uptodateness.*.pyc
%{python3_sitearch}/samba/dcerpc/dnsserver.*.so %{python3_sitearch}/samba/dcerpc/dnsserver.*.so
%if %{with dc} || %{with testsuite}
%{python3_sitearch}/samba/dckeytab.*.so %{python3_sitearch}/samba/dckeytab.*.so
%endif
%{python3_sitearch}/samba/domain_update.py %{python3_sitearch}/samba/domain_update.py
%{python3_sitearch}/samba/forest_update.py %{python3_sitearch}/samba/forest_update.py
%{python3_sitearch}/samba/ms_forest_updates_markdown.py %{python3_sitearch}/samba/ms_forest_updates_markdown.py
@ -2862,7 +2817,6 @@ fi
%{python3_sitearch}/samba/remove_dc.py %{python3_sitearch}/samba/remove_dc.py
%{python3_sitearch}/samba/uptodateness.py %{python3_sitearch}/samba/uptodateness.py
%endif
%files -n python3-%{name}-test %files -n python3-%{name}-test
%dir %{python3_sitearch}/samba/tests %dir %{python3_sitearch}/samba/tests