[Freeipa-devel] [PATCH] move samba4-specific python code to a subpackage

Alexander Bokovoy abokovoy at redhat.com
Tue Jun 12 13:08:12 UTC 2012


DCERPC code in AD trusts implementation depends on Samba 4 Python
bindings.

Make this dependency optional for main freeipa-server package by moving
the dependency to freeipa-server-trust-ad subpackage.

Main interface to AD trusts (ipalib/plugins/trust.py) will still stay,
as well as LDIF files and updates as they are not causing real
dependency.

https://fedorahosted.org/freeipa/ticket/2821

-- 
/ Alexander Bokovoy
-------------- next part --------------
>From 743b249c1b5f29aee8629989a1b4968f77766b5e Mon Sep 17 00:00:00 2001
From: Alexander Bokovoy <abokovoy at redhat.com>
Date: Tue, 12 Jun 2012 15:58:50 +0300
Subject: [PATCH] Move AD trust support code to freeipa-server-trust-ad
 subpackage

DCERPC code in AD trusts implementation depends on Samba 4 Python bindings.
Make this dependency optional for main freeipa-server package by moving
the dependency to freeipa-server-trust-ad subpackage.

Main interface to AD trusts (ipalib/plugins/trust.py) will still stay,
as well as LDIF files and updates as they are not causing real dependency.

https://fedorahosted.org/freeipa/ticket/2821
---
 freeipa.spec.in |   19 ++++++++++++++-----
 1 file changed, 14 insertions(+), 5 deletions(-)

diff --git a/freeipa.spec.in b/freeipa.spec.in
index 3e1c844..ce8e1e6 100644
--- a/freeipa.spec.in
+++ b/freeipa.spec.in
@@ -415,6 +415,11 @@ mkdir -p %{buildroot}%{_sysconfdir}/cron.d
 install -pm 644 ipa-compliance.cron %{buildroot}%{_sysconfdir}/cron.d/ipa-compliance
 %endif
 
+(cd %{buildroot}/%{python_sitelib}/ipaserver && find . -type f  | \
+	grep -v dcerpc | grep -v adtrustinstance | \
+	sed -e 's,\.py.*$,.*,g' | sort -u | \
+	sed -e 's,\./,%%{python_sitelib}/ipaserver/,g' ) >server-python.list
+
 %clean
 rm -rf %{buildroot}
 
@@ -521,12 +526,11 @@ fi
 
 
 %if ! %{ONLY_CLIENT}
-%files server
+%files server -f server-python.list
 %defattr(-,root,root,-)
 %doc COPYING README Contributors.txt
 %{_sbindir}/ipa-ca-install
 %{_sbindir}/ipa-dns-install
-%{_sbindir}/ipa-adtrust-install
 %{_sbindir}/ipa-server-install
 %{_sbindir}/ipa-replica-conncheck
 %{_sbindir}/ipa-replica-install
@@ -557,7 +561,9 @@ fi
 %attr(755,root,root) %{_initrddir}/ipa_memcached
 %endif
 %dir %{python_sitelib}/ipaserver
-%{python_sitelib}/ipaserver/*
+%dir %{python_sitelib}/ipaserver/install
+%dir %{python_sitelib}/ipaserver/install/plugins
+%dir %{python_sitelib}/ipaserver/plugins
 %dir %{_libdir}/ipa/certmonger
 %attr(755,root,root) %{_libdir}/ipa/certmonger/*
 %dir %{_usr}/share/ipa
@@ -625,7 +631,6 @@ fi
 %dir %{_localstatedir}/cache/ipa
 %attr(700,apache,apache) %dir %{_localstatedir}/cache/ipa/sessions
 %attr(755,root,root) %{_libdir}/krb5/plugins/kdb/ipadb.so
-%attr(755,root,root) %{_libdir}/samba/pdb/ipasam.so
 %{_mandir}/man1/ipa-replica-conncheck.1.gz
 %{_mandir}/man1/ipa-replica-install.1.gz
 %{_mandir}/man1/ipa-replica-manage.1.gz
@@ -634,7 +639,6 @@ fi
 %{_mandir}/man1/ipa-server-certinstall.1.gz
 %{_mandir}/man1/ipa-server-install.1.gz
 %{_mandir}/man1/ipa-dns-install.1.gz
-%{_mandir}/man1/ipa-adtrust-install.1.gz
 %{_mandir}/man1/ipa-ca-install.1.gz
 %{_mandir}/man1/ipa-compat-manage.1.gz
 %{_mandir}/man1/ipa-nis-manage.1.gz
@@ -651,7 +655,12 @@ fi
 %{_usr}/share/selinux/targeted/ipa_dogtag.pp
 
 %files server-trust-ad
+%{_sbindir}/ipa-adtrust-install
 %{_usr}/share/ipa/smb.conf.empty
+%attr(755,root,root) %{_libdir}/samba/pdb/ipasam.so
+%{_mandir}/man1/ipa-adtrust-install.1.gz
+%{python_sitelib}/ipaserver/dcerpc*
+%{python_sitelib}/ipaserver/install/adtrustinstance*
 %endif
 
 %files client
-- 
1.7.10.2



More information about the Freeipa-devel mailing list