[samba4] Disable libsmbclient and libwbclient packages.

asn asn at fedoraproject.org
Fri Apr 13 13:15:27 UTC 2012


commit 23473ea15b850d159d583825907139c04067c05a
Author: Andreas Schneider <asn at cryptomilk.org>
Date:   Fri Apr 13 11:18:55 2012 +0200

    Disable libsmbclient and libwbclient packages.

 samba4.spec |   67 +++++++++++++++++++++++++++++++++++++++++-----------------
 1 files changed, 47 insertions(+), 20 deletions(-)
---
diff --git a/samba4.spec b/samba4.spec
index fef0702..543aa53 100644
--- a/samba4.spec
+++ b/samba4.spec
@@ -10,6 +10,9 @@
 %define samba_release %{main_release}%{pre_release}%{?dist}
 
 %define with_pam_smbpass 0
+%define with_libsmbclient 0
+%define with_libwbclient 0
+
 %define with_talloc 1
 %define with_tevent 1
 %define with_tdb 1
@@ -165,7 +168,6 @@ of SMB/CIFS shares and printing to SMB/CIFS printers.
 %package libs
 Summary: Samba libraries
 Group: Applications/System
-Requires: libwbclient
 
 %description libs
 The samba4-libs package contains the libraries needed by programs that
@@ -269,29 +271,26 @@ The samba-swat package includes the new SWAT (Samba Web Administration
 Tool), for remotely managing Samba's smb.conf file using your favorite
 Web browser.
 
-%package -n libsmbclient4
+%if %with_libsmbclient
+%package -n libsmbclient
 Summary: The SMB client library
 Group: Applications/System
 Requires: %{name}-common = %{samba_depver}
 
-Conflicts: libsmbclient < 1:3.9.9
-Provides: libsmbclient = %{samba_depver}
+%description -n libsmbclient
+The libsmbclient contains the SMB client library from the Samba suite.
 
-%description -n libsmbclient4
-The libsmbclient4 contains the SMB client library from the Samba suite.
-
-%package -n libsmbclient4-devel
+%package -n libsmbclient-devel
 Summary: Developer tools for the SMB client library
 Group: Development/Libraries
-Requires: libsmbclient4 = %{samba_depver}
-
-Conflicts: libsmbclient-devel < 1:3.9.9
-Provides: libsmbclient-devel = %{samba_depver}
+Requires: libsmbclient = %{samba_depver}
 
-%description -n libsmbclient4-devel
-The libsmbclient4-devel package contains the header files and libraries needed to
+%description -n libsmbclient-devel
+The libsmbclient-devel package contains the header files and libraries needed to
 develop programs that link against the SMB client library in the Samba suite.
+%endif #with_libsmbclient
 
+%if %with_libwbclient
 %package -n libwbclient
 Summary: The winbind client library
 Group: Applications/System
@@ -306,6 +305,7 @@ Requires: libwbclient = %{samba_depver}
 
 %description -n libwbclient-devel
 The libwbclient-devel package provides developer tools for the wbclient library.
+%endif # with_libwbclient
 
 %package dc
 Summary: Samba AD Domain Controller
@@ -490,6 +490,24 @@ rm -rf %{buildroot}%{perl_vendorlib}/Parse/Yapp
 rm -f %{buildroot}/%{smb_lib}/security/pam_smbpass.so
 rm -f %{buildroot}%{python_sitelib}/tevent.py
 
+%if ! %with_libsmbclient
+rm -f %{buildroot}%{_libdir}/libsmbclient.so.*
+rm -f %{buildroot}%{_libdir}/libsmbsharemodes.so.*
+rm -f %{buildroot}%{_includedir}/samba-4.0/libsmbclient.h
+rm -f %{buildroot}%{_includedir}/samba-4.0/smb_share_modes.h
+rm -f %{buildroot}%{_libdir}/libsmbclient.so
+rm -f %{buildroot}%{_libdir}/libsmbsharemodes.so
+rm -f %{buildroot}%{_libdir}/pkgconfig/smbclient.pc
+%endif
+
+%if ! %with_libwbclient
+rm -f %{buildroot}%{_libdir}/libwbclient.so.*
+rm -f %{buildroot}%{_libdir}/samba/libwinbind-client.so
+rm -f %{buildroot}%{_includedir}/samba-4.0/wbclient.h
+rm -f %{buildroot}%{_libdir}/libwbclient.so
+rm -f %{buildroot}%{_libdir}/pkgconfig/wbclient.pc
+%endif
+
 %post
 %if 0%{?rhel} == 6
 /sbin/chkconfig --add smb
@@ -535,10 +553,6 @@ if [ $1 -ge 1 ] ; then
 fi
 %endif
 
-%post -n libsmbclient4 -p /sbin/ldconfig
-
-%postun -n libsmbclient4 -p /sbin/ldconfig
-
 %post libs -p /sbin/ldconfig
 
 %postun libs -p /sbin/ldconfig
@@ -590,9 +604,17 @@ exit 0
 
 %postun winbind-clients -p /sbin/ldconfig
 
+%if %with_libsmbclient
+%post -n libsmbclient -p /sbin/ldconfig
+
+%postun -n libsmbclient -p /sbin/ldconfig
+%endif
+
+%if %with_libwbclient
 %post -n libwbclient -p /sbin/ldconfig
 
 %postun -n libwbclient -p /sbin/ldconfig
+%endif
 
 %clean
 rm -rf %{buildroot}
@@ -1121,12 +1143,13 @@ rm -rf %{buildroot}
 #%{_mandir}/man8/swat.8*
 #%attr(755,root,root) %{_libdir}/samba/*.msg
 
-%files -n libsmbclient4
+%if %with_libsmbclient
+%files -n libsmbclient
 %defattr(-,root,root)
 %attr(755,root,root) %{_libdir}/libsmbclient.so.*
 %attr(755,root,root) %{_libdir}/libsmbsharemodes.so.*
 
-%files -n libsmbclient4-devel
+%files -n libsmbclient-devel
 %defattr(-,root,root)
 %{_includedir}/samba-4.0/libsmbclient.h
 %{_includedir}/samba-4.0/smb_share_modes.h
@@ -1135,7 +1158,9 @@ rm -rf %{buildroot}
 %{_libdir}/pkgconfig/smbclient.pc
 #%{_libdir}/pkgconfig/smbsharemodes.pc
 #%{_mandir}/man7/libsmbclient.7*
+%endif # with_libsmbclient
 
+%if %with_libwbclient
 %files -n libwbclient
 %defattr(-,root,root)
 %{_libdir}/libwbclient.so.*
@@ -1146,10 +1171,12 @@ rm -rf %{buildroot}
 %{_includedir}/samba-4.0/wbclient.h
 %{_libdir}/libwbclient.so
 %{_libdir}/pkgconfig/wbclient.pc
+%endif # with_libwbclient
 
 %changelog
 * Fri Apr 13 2012 Andreas Schneider <asn at redhat.com> - 4.0.0-40.alpha18
 - Fixes CVE-2012-1182.
+- Disable libsmbclient and libwbclient packages.
 
 * Tue Apr 03 2012 Andreas Schneider <asn at redhat.com> - 4.0.0-39.alpha18
 - Update to Samba4 alpha18.


More information about the scm-commits mailing list