Use alternatives for libwbclient.
This commit is contained in:
parent
ba46be83c0
commit
758c40f78b
61
samba.spec
61
samba.spec
@ -6,7 +6,7 @@
|
|||||||
# ctdb is enabled by default, you can disable it with: --without clustering
|
# ctdb is enabled by default, you can disable it with: --without clustering
|
||||||
%bcond_without clustering
|
%bcond_without clustering
|
||||||
|
|
||||||
%define main_release 1
|
%define main_release 2
|
||||||
|
|
||||||
%define samba_version 4.2.0
|
%define samba_version 4.2.0
|
||||||
%define talloc_version 2.1.1
|
%define talloc_version 2.1.1
|
||||||
@ -43,6 +43,11 @@
|
|||||||
%endif
|
%endif
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
%global libwbc_alternatives_suffix %nil
|
||||||
|
%if %{__isa_bits} == 64
|
||||||
|
%global libwbc_alternatives_suffix -64
|
||||||
|
%endif
|
||||||
|
|
||||||
%global with_mitkrb5 1
|
%global with_mitkrb5 1
|
||||||
%global with_dc 0
|
%global with_dc 0
|
||||||
|
|
||||||
@ -103,9 +108,6 @@ Requires(postun): systemd
|
|||||||
|
|
||||||
Requires(pre): %{name}-common = %{samba_depver}
|
Requires(pre): %{name}-common = %{samba_depver}
|
||||||
Requires: %{name}-libs = %{samba_depver}
|
Requires: %{name}-libs = %{samba_depver}
|
||||||
%if %with_libwbclient
|
|
||||||
Requires: libwbclient = %{samba_depver}
|
|
||||||
%endif
|
|
||||||
|
|
||||||
Provides: samba4 = %{samba_depver}
|
Provides: samba4 = %{samba_depver}
|
||||||
Obsoletes: samba4 < %{samba_depver}
|
Obsoletes: samba4 < %{samba_depver}
|
||||||
@ -219,9 +221,6 @@ of SMB/CIFS shares and printing to SMB/CIFS printers.
|
|||||||
Summary: Files used by both Samba servers and clients
|
Summary: Files used by both Samba servers and clients
|
||||||
Group: Applications/System
|
Group: Applications/System
|
||||||
Requires: %{name}-libs = %{samba_depver}
|
Requires: %{name}-libs = %{samba_depver}
|
||||||
%if %with_libwbclient
|
|
||||||
Requires: libwbclient = %{samba_depver}
|
|
||||||
%endif
|
|
||||||
Requires(post): systemd
|
Requires(post): systemd
|
||||||
|
|
||||||
Provides: samba4-common = %{samba_depver}
|
Provides: samba4-common = %{samba_depver}
|
||||||
@ -300,9 +299,6 @@ Samba VFS module for GlusterFS integration.
|
|||||||
Summary: Samba libraries
|
Summary: Samba libraries
|
||||||
Group: Applications/System
|
Group: Applications/System
|
||||||
Requires: krb5-libs >= 1.10
|
Requires: krb5-libs >= 1.10
|
||||||
%if %with_libwbclient
|
|
||||||
Requires: libwbclient = %{samba_depver}
|
|
||||||
%endif
|
|
||||||
|
|
||||||
Provides: samba4-libs = %{samba_depver}
|
Provides: samba4-libs = %{samba_depver}
|
||||||
Obsoletes: samba4-libs < %{samba_depver}
|
Obsoletes: samba4-libs < %{samba_depver}
|
||||||
@ -403,9 +399,6 @@ Requires: %{name}-libs = %{samba_depver}
|
|||||||
%if %with_libsmbclient
|
%if %with_libsmbclient
|
||||||
Requires: libsmbclient = %{samba_depver}
|
Requires: libsmbclient = %{samba_depver}
|
||||||
%endif
|
%endif
|
||||||
%if %with_libwbclient
|
|
||||||
Requires: libwbclient = %{samba_depver}
|
|
||||||
%endif
|
|
||||||
|
|
||||||
Provides: samba4-test = %{samba_depver}
|
Provides: samba4-test = %{samba_depver}
|
||||||
Obsoletes: samba4-test < %{samba_depver}
|
Obsoletes: samba4-test < %{samba_depver}
|
||||||
@ -457,9 +450,6 @@ Group: Applications/System
|
|||||||
Requires: %{name}-common = %{samba_depver}
|
Requires: %{name}-common = %{samba_depver}
|
||||||
Requires: %{name}-libs = %{samba_depver}
|
Requires: %{name}-libs = %{samba_depver}
|
||||||
Requires: %{name}-winbind = %{samba_depver}
|
Requires: %{name}-winbind = %{samba_depver}
|
||||||
%if %with_libwbclient
|
|
||||||
Requires: libwbclient = %{samba_depver}
|
|
||||||
%endif
|
|
||||||
|
|
||||||
Provides: samba4-winbind-clients = %{samba_depver}
|
Provides: samba4-winbind-clients = %{samba_depver}
|
||||||
Obsoletes: samba4-winbind-clients < %{samba_depver}
|
Obsoletes: samba4-winbind-clients < %{samba_depver}
|
||||||
@ -472,10 +462,7 @@ tool.
|
|||||||
%package winbind-krb5-locator
|
%package winbind-krb5-locator
|
||||||
Summary: Samba winbind krb5 locator
|
Summary: Samba winbind krb5 locator
|
||||||
Group: Applications/System
|
Group: Applications/System
|
||||||
%if %with_libwbclient
|
%if ! %with_libwbclient
|
||||||
Requires: libwbclient = %{samba_depver}
|
|
||||||
Requires: %{name}-winbind = %{samba_depver}
|
|
||||||
%else
|
|
||||||
Requires: %{name}-libs = %{samba_depver}
|
Requires: %{name}-libs = %{samba_depver}
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
@ -500,9 +487,6 @@ the local kerberos library to use the same KDC as samba and winbind use
|
|||||||
Summary: Samba winbind modules
|
Summary: Samba winbind modules
|
||||||
Group: Applications/System
|
Group: Applications/System
|
||||||
Requires: %{name}-libs = %{samba_depver}
|
Requires: %{name}-libs = %{samba_depver}
|
||||||
%if %with_libwbclient
|
|
||||||
Requires: libwbclient = %{samba_depver}
|
|
||||||
%endif
|
|
||||||
Requires: pam
|
Requires: pam
|
||||||
|
|
||||||
%description winbind-modules
|
%description winbind-modules
|
||||||
@ -617,6 +601,11 @@ install -d -m 0755 %{buildroot}/var/run/winbindd
|
|||||||
install -d -m 0755 %{buildroot}/%{_libdir}/samba
|
install -d -m 0755 %{buildroot}/%{_libdir}/samba
|
||||||
install -d -m 0755 %{buildroot}/%{_libdir}/pkgconfig
|
install -d -m 0755 %{buildroot}/%{_libdir}/pkgconfig
|
||||||
|
|
||||||
|
# Move libwbclient.so* into private directory, it cannot be just libdir/samba
|
||||||
|
# because samba uses rpath with this directory.
|
||||||
|
install -d -m 0755 %{buildroot}/%{_libdir}/samba/wbclient
|
||||||
|
mv %{buildroot}/%{_libdir}/libwbclient.so* %{buildroot}/%{_libdir}/samba/wbclient
|
||||||
|
|
||||||
# Install other stuff
|
# Install other stuff
|
||||||
install -d -m 0755 %{buildroot}%{_sysconfdir}/logrotate.d
|
install -d -m 0755 %{buildroot}%{_sysconfdir}/logrotate.d
|
||||||
install -m 0644 %{SOURCE1} %{buildroot}%{_sysconfdir}/logrotate.d/samba
|
install -m 0644 %{SOURCE1} %{buildroot}%{_sysconfdir}/logrotate.d/samba
|
||||||
@ -714,9 +703,24 @@ fi
|
|||||||
%endif # with_libsmbclient
|
%endif # with_libsmbclient
|
||||||
|
|
||||||
%if %with_libwbclient
|
%if %with_libwbclient
|
||||||
%post -n libwbclient -p /sbin/ldconfig
|
%posttrans -n libwbclient
|
||||||
|
# It has to be posttrans here to make sure all files of a previous version
|
||||||
|
# without alternatives support are removed
|
||||||
|
%{_sbindir}/update-alternatives --install %{_libdir}/libwbclient.so.0.11 \
|
||||||
|
libwbclient.so.0.11%{libwbc_alternatives_suffix} %{_libdir}/samba/wbclient/libwbclient.so.0.11 10
|
||||||
|
/sbin/ldconfig
|
||||||
|
|
||||||
|
%preun -n libwbclient
|
||||||
|
%{_sbindir}/update-alternatives --remove libwbclient.so.0.11%{libwbc_alternatives_suffix} %{_libdir}/samba/wbclient/libwbclient.so.0.11
|
||||||
|
/sbin/ldconfig
|
||||||
|
|
||||||
|
%posttrans -n libwbclient-devel
|
||||||
|
%{_sbindir}/update-alternatives --install %{_libdir}/libwbclient.so \
|
||||||
|
libwbclient.so%{libwbc_alternatives_suffix} %{_libdir}/samba/wbclient/libwbclient.so 10
|
||||||
|
|
||||||
|
%preun -n libwbclient-devel
|
||||||
|
%{_sbindir}/update-alternatives --remove libwbclient.so%{libwbc_alternatives_suffix} %{_libdir}/samba/wbclient/libwbclient.so
|
||||||
|
|
||||||
%postun -n libwbclient -p /sbin/ldconfig
|
|
||||||
%endif # with_libwbclient
|
%endif # with_libwbclient
|
||||||
|
|
||||||
%post test -p /sbin/ldconfig
|
%post test -p /sbin/ldconfig
|
||||||
@ -1468,14 +1472,14 @@ rm -rf %{buildroot}
|
|||||||
%if %with_libwbclient
|
%if %with_libwbclient
|
||||||
%files -n libwbclient
|
%files -n libwbclient
|
||||||
%defattr(-,root,root)
|
%defattr(-,root,root)
|
||||||
%{_libdir}/libwbclient.so.*
|
%{_libdir}/samba/wbclient/libwbclient.so.*
|
||||||
%{_libdir}/samba/libwinbind-client.so
|
%{_libdir}/samba/libwinbind-client.so
|
||||||
|
|
||||||
### LIBWBCLIENT-DEVEL
|
### LIBWBCLIENT-DEVEL
|
||||||
%files -n libwbclient-devel
|
%files -n libwbclient-devel
|
||||||
%defattr(-,root,root)
|
%defattr(-,root,root)
|
||||||
%{_includedir}/samba-4.0/wbclient.h
|
%{_includedir}/samba-4.0/wbclient.h
|
||||||
%{_libdir}/libwbclient.so
|
%{_libdir}/samba/wbclient/libwbclient.so
|
||||||
%{_libdir}/pkgconfig/wbclient.pc
|
%{_libdir}/pkgconfig/wbclient.pc
|
||||||
%endif # with_libwbclient
|
%endif # with_libwbclient
|
||||||
|
|
||||||
@ -1604,6 +1608,9 @@ rm -rf %{buildroot}
|
|||||||
%{_mandir}/man8/pam_winbind.8*
|
%{_mandir}/man8/pam_winbind.8*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Fri Nov 21 2014 - Andreas Schneider <asn@redhat.com> - 4.2.0-0.2.rc2
|
||||||
|
- Use alternatives for libwbclient.
|
||||||
|
|
||||||
* Wed Nov 12 2014 - Andreas Schneider <asn@redhat.com> - 4.2.0-0.1.rc2
|
* Wed Nov 12 2014 - Andreas Schneider <asn@redhat.com> - 4.2.0-0.1.rc2
|
||||||
- Update to Samba 4.2.0rc2.
|
- Update to Samba 4.2.0rc2.
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user