# - look into other distro specs for valid %descriptions for samba 3
# - review configure options
# - fix broken --without ldap, test functionality with other bconds
-# - new package with McAfee vscan - I dunno what to do with daemon
+# - check tdbtool (with tdb.spec)
#
# Conditional build:
+%bcond_without ads # without ActiveDirectory support
%bcond_without cups # without CUPS support
+%bcond_without krb5 # without Kerberos5/Heimdal support
+%bcond_without ldap # without LDAP support
%bcond_without mysql # without MySQL support
+%bcond_without pgsql # without PostgreSQL support
+%bcond_without python # without python libs/utils
%bcond_with ldapsam # with LDAP SAM 2.2 based auth (instead of smbpasswd)
#%bcond_with ipv6 # with IPv6 support
-%bcond_without ldap # without LDAP support
-%bcond_without krb5 # without Kerberos5/Heimdal support
-%bcond_without python # without python libs/utils
#
+# ADS requires krb5 and LDAP
+%if %{without krb5} || %{without ldap}
+%undefine with_ads
+%endif
%define vscan_version 0.3.5
Summary: SMB server
Summary(cs): Server SMB
Summary(uk): SMB Ë̦¤ÎÔ ÔÁ ÓÅÒ×ÅÒ
Summary(zh_CN): Samba ¿Í»§¶ËºÍ·þÎñÆ÷
Name: samba
-Version: 3.0.6
-Release: 2
+Version: 3.0.10
+Release: 1
Epoch: 1
License: GPL v2
Group: Networking/Daemons
Source0: http://us1.samba.org/samba/ftp/%{name}-%{version}.tar.gz
-# Source0-md5: c8dc06e2bcf63513c2e8d849f6352d8a
+# Source0-md5: b19fd86d3c11a1b43f75a5988cd9ceeb
Source1: smb.init
Source2: %{name}.pamd
Source3: swat.inetd
# Source7-md5: 5f173d549014985d681478897135915b
Source8: winbind.init
Source9: winbind.sysconfig
-Source10: http://us1.samba.org/samba/ftp/samba.schema
-# Source10-md5: bf268fdddc8ef677b6fa78661a094eac
Patch0: %{name}-statfs-workaround.patch
Patch1: %{name}-lib64.patch
-#Patch2: http://v6web.litech.org/samba/%{name}-2.2.4+IPv6-20020609.diff
-Patch3: %{name}-setup-python.patch
+Patch2: %{name}-setup-python.patch
+Patch3: %{name}-FHS.patch
+Patch4: %{name}-case_insensitive_sql_operator.patch
+Patch5: %{name}-3_0_9-printing.patch
+#Patch6: http://v6web.litech.org/samba/%{name}-2.2.4+IPv6-20020609.diff
URL: http://www.samba.org/
BuildRequires: acl-devel
BuildRequires: autoconf
BuildRequires: mysql-devel
BuildRequires: mysql-extras
%endif
+%if %{with pgsql}
+BuildRequires: postgresql-devel
+%endif
BuildRequires: ncurses-devel >= 5.2
%{?with_ldap:BuildRequires: openldap-devel}
BuildRequires: openssl-devel >= 0.9.7d
BuildRequires: xfsprogs-devel
%{?with_python:BuildRequires: python-devel}
PreReq: rc-scripts
+PreReq: setup >= 2.4.6-7
Requires(post,preun): /sbin/chkconfig
Requires: %{name}-common = %{epoch}:%{version}-%{release}
Requires: logrotate
Requires: pam >= 0.66
+Obsoletes: samba-vfs-block
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%define _vfsdir %{_libdir}/%{name}/vfs
%description pdb-mysql -l pl
Wtyczka Samby do przechowywania hase³ w bazie MySQL.
+%package pdb-pgsql
+Summary: Samba PostgreSQL password database plugin
+Summary(pl): Wtyczka Samby do przechowywania hase³ w bazie PostgreSQL
+Group: Networking/Daemons
+Requires: %{name} = %{epoch}:%{version}-%{release}
+
+%description pdb-pgsql
+Samba MySQL password database plugin.
+
+%description pdb-pgsql -l pl
+Wtyczka Samby do przechowywania hase³ w bazie MySQL.
+
%package pdb-xml
Summary: Samba XML password database plugin
Summary(pl): Wtyczka Samby do przechowywania hase³ w bazie XML
Summary(ru): ëÌÉÅÎÔÓËÉÅ ÐÒÏÇÒÁÍÍÙ Samba (SMB)
Summary(uk): ë̦¤ÎÔÓØ˦ ÐÒÏÇÒÁÍÉ Samba (SMB)
Group: Applications/Networking
-Requires: samba-common = %{epoch}:%{version}-%{release}
-Obsoletes: smbfs
+Requires: %{name}-common = %{epoch}:%{version}-%{release}
Obsoletes: mount-cifs
+Obsoletes: smbfs
%description client
Samba-client provides some SMB clients, which complement the build-in
%description -n pam-pam_smbpass -l pl
Modu³ PAM, który mo¿e byæ u¿ywany do trzymania pliku smbpasswd (has³a
-Samby) zsynchronizowanego z has³ami unixowymi.
+Samby) zsynchronizowanego z has³ami uniksowymi.
%package -n libsmbclient
Summary: libsmbclient - samba client library
Kaspersky AVP (które musi byæ zainstalowane, aby wykorzystaæ ten
modu³).
+%package vfs-vscan-mcafee
+Summary: On-access virus scanning for samba using mcafee
+Summary(pl): Skaner antywirusowy online wykorzystuj±cy mcafee
+Group: Networking/Daemons
+Requires: %{name} = %{epoch}:%{version}-%{release}
+#Requires: mcafee
+Provides: %{name}-vscan = %{epoch}:%{version}-%{release}
+Obsoletes: vscan-mcafee
+
+%description vfs-vscan-mcafee
+A vfs-module for samba to implement on-access scanning using the mcafee
+antivirus software (which must be installed to use this).
+
+%description vfs-vscan-mcafee -l pl
+Modu³ vfs do samby implementuj±cy skaning antywirusowy w czasie
+dostêpu do plików korzystaj±c z oprogramowania antywirusowego mcafee
+(które musi byæ zainstalowane, aby wykorzystaæ ten modu³).
+
%package vfs-vscan-mks
Summary: On-access virus scanning for samba using mks
Summary(pl): Skaner antywirusowy online wykorzystuj±cy mks
%ifarch amd64
%patch1 -p1
%endif
-#%{?with_ipv6:%patch2 -p1}
+%patch2 -p1
%patch3 -p1
+%patch4 -p1
+%patch5 -p1
+#%{?with_ipv6:%patch6 -p1}
-cp -f %{SOURCE10} examples/LDAP/
cd examples/VFS
tar xjf %{SOURCE7}
--with-libsmbclient \
--with-pam \
--with-pam_smbpass \
- --with%{!?with_ldap:out}-ads \
+ --with%{!?with_ads:out}-ads \
--with-privatedir=%{_sysconfdir}/samba \
--with-quotas \
--with-readline \
--with-syslog \
--with-utmp \
--with-fhs \
- %{?with_python:--with-python} \
- --with-expsam=xml,%{?with_mysql:mysql} \
+ %{?with_python:--with-python} \
+ --with-expsam=xml,%{?with_mysql:mysql}%{?with_pgsql:,pgsql} \
%{?with_ldapsam:--with-ldapsam} \
--with%{!?with_ldap:out}-ldap \
--with%{!?with_krb5:out}-krb5
mv README{,.vfs}
cd samba-vscan-%{vscan_version}
-cp %{_datadir}/automake/config.sub .
+cp -f /usr/share/automake/config.sub .
%configure
%{__make} -j1 all
# vscan modules
install examples/VFS/samba-vscan-%{vscan_version}/*.so $RPM_BUILD_ROOT%{_vfsdir}
-install examples/VFS/samba-vscan-%{vscan_version}/{clamav,fprot,icap,kaspersky,mks,openantivirus,sophos,trend,f-secure}/*.conf $RPM_BUILD_ROOT%{_sysconfdir}/samba
+install examples/VFS/samba-vscan-%{vscan_version}/{clamav,fprot,icap,kaspersky,mks,openantivirus,sophos,trend,f-secure,nai}/*.conf $RPM_BUILD_ROOT%{_sysconfdir}/samba
touch $RPM_BUILD_ROOT/var/lock/samba/{STATUS..LCK,wins.dat,browse.dat}
cp -R source/build/lib.*/samba $RPM_BUILD_ROOT%{py_sitedir}
%endif
+mv $RPM_BUILD_ROOT%{_bindir}/tdbtool $RPM_BUILD_ROOT%{_bindir}/tdbtool_samba
+
%clean
rm -rf $RPM_BUILD_ROOT
%attr(755,root,root) %{_bindir}/smbpasswd
%attr(755,root,root) %{_bindir}/smbcontrol
%attr(755,root,root) %{_bindir}/tdbbackup
+%attr(755,root,root) %{_bindir}/tdbtool_samba
%dir %{_libdir}/%{name}/pdb
%dir %{_vfsdir}
%attr(600,root,root) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/samba/smbusers
%attr(754,root,root) /etc/rc.d/init.d/smb
%attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/sysconfig/samba
-%attr(640,root,root) /etc/logrotate.d/samba
+%attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/logrotate.d/samba
%attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/pam.d/samba
%attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/security/blacklist.samba
%{_mandir}/man1/smbstatus.1*
%{_mandir}/man8/smbd.8*
%{_mandir}/man8/smbpasswd.8*
%{_mandir}/man8/pdbedit.8*
-%{_mandir}/man8/winbindd.8*
%{_mandir}/man8/tdbbackup.8*
%dir %{_sambahome}
%dir /var/lock/samba
%ghost /var/lock/samba/*
-%attr(0750,root,root) %dir /var/log/samba
-%attr(0750,root,root) %dir /var/log/archiv/samba
+%attr(750,root,root) %dir /var/log/samba
+%attr(750,root,root) %dir /var/log/archiv/samba
%attr(1777,root,root) %dir /var/spool/samba
%if %{with ldap}
%doc examples/LDAP
%attr(755,root,root) %{_libdir}/%{name}/pdb/mysql.so
%endif
+%if %{with pgsql}
+%files pdb-pgsql
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/%{name}/pdb/pgsql.so
+%endif
+
%files pdb-xml
%defattr(644,root,root,755)
%attr(755,root,root) %{_libdir}/%{name}/pdb/xml.so
%attr(755,root,root) /%{_lib}/libnss_winbind*
%attr(754,root,root) /etc/rc.d/init.d/winbind
%attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/sysconfig/winbind
-#%attr(-,root,root) %config(noreplace) %{_sysconfdir}/pam.d/system-auth-winbind*
%{_mandir}/man8/winbindd*.8*
%{_mandir}/man1/wbinfo*.1*
%{_mandir}/man1/smbsh.1*
%attr(755,root,root) %{_bindir}/rpcclient
%{_mandir}/man1/rpcclient.1*
-%attr(755,root,root) %{_bindir}/wbinfo
-%{_mandir}/man1/wbinfo.1*
%attr(755,root,root) %{_bindir}/findsmb
%{_mandir}/man1/findsmb.1*
%doc README Manifest WHATSNEW.txt
%doc Roadmap docs/*.pdf docs/registry/*
%doc docs/htmldocs/*.* docs/{history,THANKS}
-%dir %{_libdir}/%{name}
-%config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/samba/smb.conf
+%dir %{_sysconfdir}/samba
+%attr(664,root,fileshare) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/samba/smb.conf
%config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/samba/lmhosts
+%dir %{_libdir}/%{name}
%{_libdir}/%{name}/*.dat
-#%attr(755,root,root) %{_bindir}/make_smbcodepage
-#%attr(755,root,root) %{_bindir}/make_unicodemap
%attr(755,root,root) %{_bindir}/testparm
%attr(755,root,root) %{_bindir}/testprns
%attr(755,root,root) %{_bindir}/ntlm_auth
%attr(755,root,root) %{_bindir}/smbcquotas
%attr(755,root,root) %{_bindir}/profiles
%attr(755,root,root) %{_bindir}/pdbedit
-#%attr(755,root,root) %{_bindir}/make_printerdef
%dir %{_libdir}/%{name}/charset
%attr(755,root,root) %{_libdir}/%{name}/charset/*.so
-#%{_mandir}/man1/make_smbcodepage.1*
-#%{_mandir}/man1/make_unicodemap.1*
%{_mandir}/man1/editreg.1*
%{_mandir}/man1/testparm.1*
%{_mandir}/man1/testprns.1*
%attr(755,root,root) %{_vfsdir}/extd_audit.so
%attr(755,root,root) %{_vfsdir}/full_audit.so
-
%files vfs-cap
%defattr(644,root,root,755)
%attr(755,root,root) %{_vfsdir}/cap.so
%config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/samba/vscan-kavp.conf
%attr(755,root,root) %{_vfsdir}/vscan-kavp.so
+%files vfs-vscan-mcafee
+%defattr(644,root,root,755)
+#%doc examples/VFS/%{name}-vscan-%{vscan_version}/{INSTALL,FAQ}
+%config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/samba/vscan-mcdaemon.conf
+%attr(755,root,root) %{_vfsdir}/vscan-mcdaemon.so
+
%ifarch %{ix86}
%files vfs-vscan-mks
%defattr(644,root,root,755)