Samba GIT build for F20/Rawhide.
[ira/fedora-git] / samba.spec
index 20fe4027cce97b809a404d33682d387b8807c03e..17863a1bcb36698ea13babd099167e4099e519bc 100644 (file)
@@ -1,14 +1,14 @@
 # Set --with testsuite or %bcond_without to run the Samba torture testsuite.
 %bcond_with testsuite
 
-%define main_release 2
-
-%define samba_version 4.1.0
-%define talloc_version 2.0.8
-%define ntdb_version 0.9
-%define tdb_version 1.2.12
-%define tevent_version 0.9.18
-%define ldb_version 1.1.16
+%define main_release 1
+
+%define samba_version 4.1.900
+%define talloc_version 2.1.1
+%define ntdb_version 1.0
+%define tdb_version 1.3.0
+%define tevent_version 0.9.21
+%define ldb_version 1.1.17
 # This should be rc1 or nil
 %define pre_release %nil
 
 %global with_libwbclient 1
 
 %global with_pam_smbpass 0
-%global with_internal_talloc 0
-%global with_internal_tevent 0
-%global with_internal_tdb 0
+%global with_internal_talloc 1
+%global with_internal_tevent 1
+%global with_internal_tdb 1
 %global with_internal_ntdb 1
-%global with_internal_ldb 0
+%global with_internal_ldb 1
 
 %global with_profiling 1
+%global with_vfs_glusterfs 1
+%if 0%{?rhel}
+%global with_vfs_glusterfs 0
+# Only enable on x86_64
+%ifarch x86_64
+%global with_vfs_glusterfs 1
+%endif
+%endif
 
 %global with_mitkrb5 1
 %global with_dc 0
@@ -93,7 +101,14 @@ Requires: libwbclient = %{samba_depver}
 Provides: samba4 = %{samba_depver}
 Obsoletes: samba4 < %{samba_depver}
 
-BuildRequires: autoconf
+# We don't build it outdated docs anymore
+Obsoletes: samba-doc
+# Is not supported yet
+Obsoletes: samba-domainjoin-gui
+# SWAT been deprecated and removed from samba
+Obsoletes: samba-swat
+Obsoletes: samba4-swat
+
 %if %with_clustering_support
 BuildRequires: ctdb-devel
 %endif
@@ -119,33 +134,40 @@ BuildRequires: python-devel
 BuildRequires: python-tevent
 BuildRequires: quota-devel
 BuildRequires: readline-devel
+BuildRequires: systemd-devel
 BuildRequires: sed
 BuildRequires: zlib-devel >= 1.2.3
-BuildRequires: libbsd-devel
+%if %{with_vfs_glusterfs}
+BuildRequires: glusterfs-api-devel >= 3.4.0.16
+BuildRequires: glusterfs-devel >= 3.4.0.16
+%endif
+
+# pidl requirements
+BuildRequires: perl(Parse::Yapp)
 
 %if ! %with_internal_talloc
-%global libtalloc_version 2.0.7
+%global libtalloc_version 2.1.1
 
 BuildRequires: libtalloc-devel >= %{libtalloc_version}
 BuildRequires: pytalloc-devel >= %{libtalloc_version}
 %endif
 
 %if ! %with_internal_tevent
-%global libtevent_version 0.9.17
+%global libtevent_version 0.9.21
 
 BuildRequires: libtevent-devel >= %{libtevent_version}
 BuildRequires: python-tevent >= %{libtevent_version}
 %endif
 
 %if ! %with_internal_ldb
-%global libldb_version 1.1.11
+%global libldb_version 1.1.17
 
 BuildRequires: libldb-devel >= %{libldb_version}
 BuildRequires: pyldb-devel >= %{libldb_version}
 %endif
 
 %if ! %with_internal_tdb
-%global libtdb_version 1.2.10
+%global libtdb_version 1.3.0
 
 BuildRequires: libtdb-devel >= %{libtdb_version}
 BuildRequires: python-tdb >= %{libtdb_version}
@@ -248,6 +270,23 @@ The samba4-devel package contains the header files for the libraries
 needed to develop programs that link against the SMB, RPC and other
 libraries in the Samba suite.
 
+### GLUSTER
+%if %{with_vfs_glusterfs}
+%package vfs-glusterfs
+Summary: Samba VFS module for GlusterFS
+Group: Applications/System
+Requires: glusterfs-api >= 3.4.0.16
+Requires: glusterfs >= 3.4.0.16
+Requires: %{name} = %{epoch}:%{samba_version}-%{release}
+Requires: %{name}-libs = %{epoch}:%{samba_version}-%{release}
+
+Obsoletes: samba-glusterfs
+Provides: samba-glusterfs
+
+%description vfs-glusterfs
+Samba VFS module for GlusterFS integration.
+%endif
+
 ### LIBS
 %package libs
 Summary: Samba libraries
@@ -290,6 +329,7 @@ develop programs that link against the SMB client library in the Samba suite.
 %package -n libwbclient
 Summary: The winbind client library
 Group: Applications/System
+Requires: %{name}-libs = %{samba_depver}
 
 %description -n libwbclient
 The libwbclient package contains the winbind client library from the Samba suite.
@@ -298,6 +338,8 @@ The libwbclient package contains the winbind client library from the Samba suite
 Summary: Developer tools for the winbind library
 Group: Development/Libraries
 Requires: libwbclient = %{samba_depver}
+Obsoletes: samba-winbind-devel
+Provides: samba-winbind-devel
 
 %description -n libwbclient-devel
 The libwbclient-devel package provides developer tools for the wbclient library.
@@ -327,12 +369,13 @@ Summary: Perl IDL compiler
 Group: Development/Tools
 Requires: perl(Parse::Yapp)
 Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
+BuildArch: noarch
 
 Provides: samba4-pidl = %{samba_depver}
 Obsoletes: samba4-pidl < %{samba_depver}
 
 %description pidl
-The samba4-pidl package contains the Perl IDL compiler used by Samba
+The %{name}-pidl package contains the Perl IDL compiler used by Samba
 and Wireshark to parse IDL and similar protocols
 
 ### TEST
@@ -341,11 +384,14 @@ Summary: Testing tools for Samba servers and clients
 Group: Applications/System
 Requires: %{name} = %{samba_depver}
 Requires: %{name}-common = %{samba_depver}
+Requires: %{name}-winbind = %{samba_depver}
+
+Requires: %{name}-libs = %{samba_depver}
+Requires: %{name}-test-libs = %{samba_depver}
 %if %with_dc
 Requires: %{name}-dc-libs = %{samba_depver}
 %endif
 Requires: %{name}-libs = %{samba_depver}
-Requires: %{name}-winbind = %{samba_depver}
 %if %with_libsmbclient
 Requires: libsmbclient = %{samba_depver}
 %endif
@@ -357,14 +403,23 @@ Provides: samba4-test = %{samba_depver}
 Obsoletes: samba4-test < %{samba_depver}
 
 %description test
-samba4-test provides testing tools for both the server and client
+%{name}-test provides testing tools for both the server and client
 packages of Samba.
 
+### TEST-LIBS
+%package test-libs
+Summary: Libraries need by teh testing tools for Samba servers and clients
+Group: Applications/System
+Requires: %{name}-libs = %{samba_depver}
+
+%description test-libs
+%{name}-test-libs provides libraries required by the testing tools.
+
 ### TEST-DEVEL
 %package test-devel
 Summary: Testing devel files for Samba servers and clients
 Group: Applications/System
-Requires: %{name}-test = %{samba_depver}
+Requires: %{name}-libs = %{samba_depver}
 
 %description test-devel
 samba-test-devel provides testing devel files for both the server and client
@@ -448,6 +503,7 @@ module necessary to communicate to the Winbind Daemon
 %prep
 %setup -q -n samba-%{version}%{pre_release}
 
+
 %build
 %global _talloc_lib ,talloc,pytalloc,pytalloc-util
 %global _tevent_lib ,tevent,pytevent
@@ -505,6 +561,7 @@ LDFLAGS="-Wl,-z,relro,-z,now" \
         --with-shared-modules=%{_samba4_modules} \
         --bundled-libraries=%{_samba4_libraries} \
         --with-pam \
+        --without-fam \
 %if (! %with_libsmbclient) || (! %with_libwbclient)
         --private-libraries=%{_samba4_private_libraries} \
 %endif
@@ -514,6 +571,9 @@ LDFLAGS="-Wl,-z,relro,-z,now" \
 %if ! %with_dc
         --without-ad-dc \
 %endif
+%if ! %with_vfs_glusterfs
+        --disable-glusterfs \
+%endif
 %if %with_clustering_support
         --with-cluster-support \
         --enable-old-ctdb \
@@ -525,15 +585,12 @@ LDFLAGS="-Wl,-z,relro,-z,now" \
         --enable-selftest \
 %endif
 %if ! %with_pam_smbpass
-        --without-pam_smbpass
+        --without-pam_smbpass \
 %endif
+        --with-systemd
 
 make %{?_smp_mflags}
 
-# Build PIDL for installation into vendor directories before
-# 'make proto' gets to it.
-(cd pidl && %{__perl} Makefile.PL INSTALLDIRS=vendor )
-
 %install
 rm -rf %{buildroot}
 make install DESTDIR=%{buildroot}
@@ -552,13 +609,6 @@ install -d -m 0755 %{buildroot}/var/run/winbindd
 install -d -m 0755 %{buildroot}/%{_libdir}/samba
 install -d -m 0755 %{buildroot}/%{_libdir}/pkgconfig
 
-# Undo the PIDL install, we want to try again with the right options.
-rm -rf %{buildroot}/%{_libdir}/perl5
-rm -rf %{buildroot}/%{_datadir}/perl5
-
-# Install PIDL.
-( cd pidl && make install PERL_INSTALL_ROOT=%{buildroot} )
-
 # Install other stuff
 install -d -m 0755 %{buildroot}%{_sysconfdir}/logrotate.d
 install -m 0644 %{SOURCE1} %{buildroot}%{_sysconfdir}/logrotate.d/samba
@@ -593,7 +643,7 @@ install -m 0644 %{SOURCE200} packaging/README.dc-libs
 
 install -d -m 0755 %{buildroot}%{_unitdir}
 for i in nmb smb winbind ; do
-    cat packaging/systemd/$i.service | sed -e 's@Type=forking@Type=forking\nEnvironment=KRB5CCNAME=/run/samba/krb5cc_samba@g' >tmp$i.service
+    cat packaging/systemd/$i.service | sed -e 's@\[Service\]@[Service]\nEnvironment=KRB5CCNAME=FILE:/run/samba/krb5cc_samba@g' >tmp$i.service
     install -m 0644 tmp$i.service %{buildroot}%{_unitdir}/$i.service
 done
 
@@ -606,18 +656,10 @@ install -m 0755 packaging/NetworkManager/30-winbind-systemd \
 install -d -m 0755 %{buildroot}%{_libdir}/krb5/plugins/libkrb5
 touch %{buildroot}%{_libdir}/krb5/plugins/libkrb5/winbind_krb5_locator.so
 
-# Clean out crap left behind by the PIDL install.
-find %{buildroot} -type f -name .packlist -exec rm -f {} \;
-rm -f %{buildroot}%{perl_vendorlib}/wscript_build
-rm -rf %{buildroot}%{perl_vendorlib}/Parse/Yapp
-
 # This makes the right links, as rpmlint requires that
 # the ldconfig-created links be recorded in the RPM.
 /sbin/ldconfig -N -n %{buildroot}%{_libdir}
 
-# Fix up permission on perl install.
-%{_fixperms} %{buildroot}%{perl_vendorlib}
-
 %if %{with testsuite}
 %check
 TDB_NO_FSYNC=1 make %{?_smp_mflags} test
@@ -724,6 +766,7 @@ rm -rf %{buildroot}
 %{_libdir}/samba/auth/script.so
 %{_libdir}/samba/auth/unix.so
 %{_libdir}/samba/auth/wbc.so
+%{_libdir}/samba/libsamba-cluster-support.so
 %dir %{_libdir}/samba/vfs
 %{_libdir}/samba/vfs/acl_tdb.so
 %{_libdir}/samba/vfs/acl_xattr.so
@@ -759,6 +802,7 @@ rm -rf %{buildroot}
 %{_libdir}/samba/vfs/streams_xattr.so
 %{_libdir}/samba/vfs/syncops.so
 %{_libdir}/samba/vfs/time_audit.so
+%{_libdir}/samba/vfs/worm.so
 %{_libdir}/samba/vfs/xattr_tdb.so
 
 %{_unitdir}/nmb.service
@@ -808,6 +852,7 @@ rm -rf %{buildroot}
 %{_mandir}/man8/vfs_syncops.8*
 %{_mandir}/man8/vfs_time_audit.8*
 %{_mandir}/man8/vfs_tsmsm.8*
+%{_mandir}/man8/vfs_worm.8*
 %{_mandir}/man8/vfs_xattr_tdb.8*
 
 ### CLIENT
@@ -816,7 +861,6 @@ rm -rf %{buildroot}
 %{_bindir}/cifsdd
 %{_bindir}/dbwrap_tool
 %{_bindir}/nmblookup
-%{_bindir}/nmblookup4
 %{_bindir}/oLschema2ldif
 %{_bindir}/regdiff
 %{_bindir}/regpatch
@@ -827,7 +871,6 @@ rm -rf %{buildroot}
 %{_bindir}/sharesec
 %{_bindir}/smbcacls
 %{_bindir}/smbclient
-%{_bindir}/smbclient4
 %{_bindir}/smbcquotas
 %{_bindir}/smbget
 #%{_bindir}/smbiconv
@@ -847,7 +890,6 @@ rm -rf %{buildroot}
 %{_mandir}/man1/regtree.1*
 %exclude %{_mandir}/man1/findsmb.1*
 %{_mandir}/man1/log2pcap.1*
-%{_mandir}/man1/nmblookup4.1*
 %{_mandir}/man1/rpcclient.1*
 %{_mandir}/man1/sharesec.1*
 %{_mandir}/man1/smbcacls.1*
@@ -1046,6 +1088,7 @@ rm -rf %{buildroot}
 %{_includedir}/samba-4.0/charset.h
 %{_includedir}/samba-4.0/core/doserr.h
 %{_includedir}/samba-4.0/core/error.h
+%{_includedir}/samba-4.0/core/hresult.h
 %{_includedir}/samba-4.0/core/ntstatus.h
 %{_includedir}/samba-4.0/core/werror.h
 %{_includedir}/samba-4.0/credentials.h
@@ -1093,6 +1136,7 @@ rm -rf %{buildroot}
 %{_includedir}/samba-4.0/lookup_sid.h
 %{_includedir}/samba-4.0/machine_sid.h
 %{_includedir}/samba-4.0/ndr.h
+%{_includedir}/samba-4.0/ndr/ndr_dcerpc.h
 %{_includedir}/samba-4.0/ndr/ndr_drsblobs.h
 %{_includedir}/samba-4.0/ndr/ndr_drsuapi.h
 %{_includedir}/samba-4.0/ndr/ndr_svcctl.h
@@ -1133,6 +1177,7 @@ rm -rf %{buildroot}
 %{_includedir}/samba-4.0/tdr.h
 %{_includedir}/samba-4.0/tsocket.h
 %{_includedir}/samba-4.0/tsocket_internal.h
+%{_includedir}/samba-4.0/tstream_smbXcli_np.h
 %{_includedir}/samba-4.0/samba_util.h
 %{_includedir}/samba-4.0/util/attr.h
 %{_includedir}/samba-4.0/util/byteorder.h
@@ -1205,6 +1250,12 @@ rm -rf %{buildroot}
 %{_includedir}/samba-4.0/wbclient.h
 %endif # ! with_libwbclient
 
+### VFS-GLUSTERFS
+%if %{with_vfs_glusterfs}
+%files vfs-glusterfs
+%{_libdir}/samba/vfs/glusterfs.so
+%endif
+
 ### LIBS
 %files libs
 %defattr(-,root,root)
@@ -1350,7 +1401,7 @@ rm -rf %{buildroot}
 %{_libdir}/samba/libtdb.so.%{tdb_version}
 %endif
 %if %{with_internal_ntdb}
-%{_libdir}/samba/libntdb.so.0
+%{_libdir}/samba/libntdb.so.1
 %{_libdir}/samba/libntdb.so.%{ntdb_version}
 %endif
 
@@ -1402,10 +1453,41 @@ rm -rf %{buildroot}
 ### PIDL
 %files pidl
 %defattr(-,root,root,-)
-%{perl_vendorlib}/Parse/Pidl*
+%attr(755,root,root) %{_bindir}/pidl
+%dir %{perl_vendorlib}/Parse
+%{perl_vendorlib}/Parse/Pidl.pm
+%dir %{perl_vendorlib}/Parse/Pidl
+%{perl_vendorlib}/Parse/Pidl/CUtil.pm
+%{perl_vendorlib}/Parse/Pidl/Samba4.pm
+%{perl_vendorlib}/Parse/Pidl/Expr.pm
+%{perl_vendorlib}/Parse/Pidl/ODL.pm
+%{perl_vendorlib}/Parse/Pidl/Typelist.pm
+%{perl_vendorlib}/Parse/Pidl/IDL.pm
+%{perl_vendorlib}/Parse/Pidl/Compat.pm
+%dir %{perl_vendorlib}/Parse/Pidl/Wireshark
+%{perl_vendorlib}/Parse/Pidl/Wireshark/Conformance.pm
+%{perl_vendorlib}/Parse/Pidl/Wireshark/NDR.pm
+%{perl_vendorlib}/Parse/Pidl/Dump.pm
+%dir %{perl_vendorlib}/Parse/Pidl/Samba3
+%{perl_vendorlib}/Parse/Pidl/Samba3/ServerNDR.pm
+%{perl_vendorlib}/Parse/Pidl/Samba3/ClientNDR.pm
+%dir %{perl_vendorlib}/Parse/Pidl/Samba4
+%{perl_vendorlib}/Parse/Pidl/Samba4/Header.pm
+%dir %{perl_vendorlib}/Parse/Pidl/Samba4/COM
+%{perl_vendorlib}/Parse/Pidl/Samba4/COM/Header.pm
+%{perl_vendorlib}/Parse/Pidl/Samba4/COM/Proxy.pm
+%{perl_vendorlib}/Parse/Pidl/Samba4/COM/Stub.pm
+%{perl_vendorlib}/Parse/Pidl/Samba4/Python.pm
+%{perl_vendorlib}/Parse/Pidl/Samba4/Template.pm
+%dir %{perl_vendorlib}/Parse/Pidl/Samba4/NDR
+%{perl_vendorlib}/Parse/Pidl/Samba4/NDR/Server.pm
+%{perl_vendorlib}/Parse/Pidl/Samba4/NDR/Client.pm
+%{perl_vendorlib}/Parse/Pidl/Samba4/NDR/Parser.pm
+%{perl_vendorlib}/Parse/Pidl/Samba4/TDR.pm
+%{perl_vendorlib}/Parse/Pidl/NDR.pm
+%{perl_vendorlib}/Parse/Pidl/Util.pm
 %{_mandir}/man1/pidl*
 %{_mandir}/man3/Parse::Pidl*
-%attr(755,root,root) %{_bindir}/pidl
 
 ### PYTHON
 %files python
@@ -1420,13 +1502,6 @@ rm -rf %{buildroot}
 %{_bindir}/masktest
 %{_bindir}/ndrdump
 %{_bindir}/smbtorture
-%{_libdir}/libtorture.so.*
-%{_libdir}/samba/libsubunit.so
-%if %with_dc
-%{_libdir}/samba/libdlz_bind9_for_torture.so
-%else
-%{_libdir}/samba/libdsdb-module.so
-%endif
 %{_mandir}/man1/gentest.1*
 %{_mandir}/man1/locktest.1*
 %{_mandir}/man1/masktest.1*
@@ -1441,6 +1516,17 @@ rm -rf %{buildroot}
 %{_libdir}/samba/libuid_wrapper.so
 %endif
 
+### TEST-LIBS
+%files test-libs
+%defattr(-,root,root)
+%{_libdir}/libtorture.so.*
+%{_libdir}/samba/libsubunit.so
+%if %with_dc
+%{_libdir}/samba/libdlz_bind9_for_torture.so
+%else
+%{_libdir}/samba/libdsdb-module.so
+%endif
+
 ### TEST-DEVEL
 %files test-devel
 %defattr(-,root,root)
@@ -1489,6 +1575,61 @@ rm -rf %{buildroot}
 %{_mandir}/man8/pam_winbind.8*
 
 %changelog
+* Fri Jun 06 2014 - Ira Cooper <ira@redhat.com> - 4.1.8-1
+- Update to Samba 4.1.8.
+
+* Thu Apr 03 2014 - Andreas Schneider <asn@redhat.com> - 4.1.6-3
+- Add systemd integration to the service daemons.
+
+* Tue Mar 18 2014 - Andreas Schneider <asn@redhat.com> - 4.1.6-2
+- Created a samba-test-libs package.
+
+* Tue Mar 11 2014 - Andreas Schneider <asn@redhat.com> - 4.1.6-1
+- Fix CVE-2013-4496 and CVE-2013-6442.
+- Fix installation of pidl.
+
+* Fri Feb 21 2014 - Andreas Schneider <asn@redhat.com> - 4.1.5-1
+- Update to Samba 4.1.5.
+
+* Fri Feb 07 2014 - Andreas Schneider <asn@redhat.com> - 4.1.4-1
+- Update to Samba 4.1.4.
+
+* Wed Jan 08 2014 - Andreas Schneider <asn@redhat.com> - 4.1.3-3
+- resolves: #1042845 - Do not build with libbsd.
+
+* Tue Dec 10 2013 - Guenther Deschner <gdeschner@redhat.com> - 4.1.3-2
+- resolves: #1019469 - Fix winbind debug message NULL pointer derreference.
+
+* Mon Dec 09 2013 - Andreas Schneider <asn@redhat.com> - 4.1.3-1
+- Update to Samba 4.1.3.
+- resolves: #1039454 - CVE-2013-4408.
+- resolves: #1039500 - CVE-2012-6150.
+
+* Mon Nov 25 2013 - Andreas Schneider <asn@redhat.com> - 4.1.2-1
+- Update to Samba 4.1.2.
+
+* Mon Nov 18 2013 - Guenther Deschner <gdeschner@redhat.com> - 4.1.1-3
+- resolves: #948509 - Fix manpage correctness.
+
+* Fri Nov 15 2013 - Andreas Schneider <asn@redhat.com> - 4.1.1-2
+- related: #884169 - Fix strict aliasing warnings.
+
+* Mon Nov 11 2013 - Andreas Schneider <asn@redhat.com> - 4.1.1-1
+- resolves: #1024544 - Fix CVE-2013-4475.
+- Update to Samba 4.1.1.
+
+* Mon Nov 11 2013 - Andreas Schneider <asn@redhat.com> - 4.1.0-5
+- related: #884169 - Fix the upgrade path.
+
+* Wed Oct 30 2013 - Andreas Schneider <asn@redhat.com> - 4.1.0-4
+- related: #884169 - Add direct dependency to samba-libs in the
+                     glusterfs package.
+- resolves: #996567 - Fix userPrincipalName composition.
+- related: #884169 - Fix memset call with zero length in in ntdb.
+
+* Fri Oct 18 2013 - Andreas Schneider <asn@redhat.com> - 4.1.0-3
+- resolves: #1020329 - Build glusterfs VFS plguin.
+
 * Tue Oct 15 2013 - Andreas Schneider <asn@redhat.com> - 4.1.0-2
 - resolves: #1018856 - Fix installation of pam_winbind after upgrade.
 - related: #1010722 - Split out a samba-winbind-modules package.