Summary: Samba SMB client and server
Vendor: Samba Team
-Packager: Samba Team <samba@samba.org>
+Packager: Samba Team <samba@lists.samba.org>
Name: samba
Version: PVERSION
Release: 1GITHASH
%define numcpu %(grep "^processor" /proc/cpuinfo |wc -l | sed -e 's/^0$/1/')
+%define with_vfs_gpfs PGPFS_DEFAULT
+%define with_vfs_tsmsm PGPFS_DEFAULT
+
+%if %{with_vfs_tsmsm}
+%define vfs_tsmsm ,vfs_tsmsm
+%endif
+
+%if %{with_vfs_gpfs}
+%define vfs_gpfs ,vfs_gpfs
+%endif
+
+%define vfs_modules %{?vfs_gpfs}%{?vfs_tsmsm}
+
+%define shared_modules idmap_rid,idmap_ad,idmap_tdb2%{vfs_modules}
+
%description
Samba is the protocol by which a lot of PC-related machines share
files, printers, and other information (such as lists of available
-#######################################################################
-%package swat
-Summary: The Samba SMB server configuration program.
-Group: Applications/System
-Requires: samba = %{version} xinetd
-Provides: samba-swat = %{version}-%{release}
-
-%description swat
-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 doc
Summary: Samba Documentation
Requires: /usr/bin/find /bin/rm /usr/bin/xargs
%description doc
-The samba-doc package includes the HTML versions of the Samba manpages
-utilized by SWAT as well as the HTML and PDF version of "Using Samba",
-"Samba By Example", and "The Official Samba HOWTO and Reference Guide".
+The samba-doc package includes the HTML versions of the Samba manpages as well
+as the HTML and PDF version of "Using Samba", "Samba By Example", and "The
+Official Samba HOWTO and Reference Guide".
#######################################################################
## always run autogen.sh
./autogen.sh
-
CFLAGS="$RPM_OPT_FLAGS $EXTRA -D_GNU_SOURCE" ./configure \
--prefix=%{_prefix} \
--localstatedir=/var \
--with-ads \
--with-automount \
--enable-fhs \
- --with-pam_smbpass \
--with-libsmbclient \
- --with-libsmbsharemodes \
--without-smbwrapper \
--with-pam \
--with-quotas \
- --with-shared-modules=idmap_rid,idmap_ad,idmap_tdb2,vfs_gpfs,vfs_tsmsm \
+ --with-shared-modules=%{shared_modules} \
--with-syslog \
--with-utmp \
--with-cluster-support \
--with-ctdb=/usr/include \
--without-ldb \
--without-dnsupdate \
- --with-aio-support \
- --disable-merged-build \
- --disable-smbtorture4 \
--disable-external-libtalloc \
--disable-external-libtdb
make -j %{numcpu} %{?_smp_mflags} \
- everything modules pam_smbpass
+ everything modules
# check that desired suppor has been compiled into smbd:
export LD_LIBRARY_PATH=./bin
-for test in HAVE_POSIX_ACLS HAVE_LDAP HAVE_KRB5 HAVE_GPFS CLUSTER_SUPPORT
+
+HAVE_VARS="HAVE_POSIX_ACLS HAVE_LDAP HAVE_KRB5 CLUSTER_SUPPORT"
+%if %{with_vfs_gpfs}
+ HAVE_VARS="${HAVE_VARS} HAVE_GPFS"
+%endif
+for test in ${HAVE_VARS}
do
if ! $(./bin/smbd -b | grep -q $test ) ; then
echo "ERROR: '$test' is not in smbd. Build stopped."
rm -rf $RPM_BUILD_ROOT
# Create the target build directory hierarchy
-mkdir -p $RPM_BUILD_ROOT%{_datadir}/samba/swat/{help,include,using_samba/{figs,gifsa}}
mkdir -p $RPM_BUILD_ROOT%{_includedir}
mkdir -p $RPM_BUILD_ROOT%{_initrddir}
mkdir -p $RPM_BUILD_ROOT{%{_libarchdir},%{_includedir}}
# Install the miscellany
echo 127.0.0.1 localhost > $RPM_BUILD_ROOT%{_sysconfdir}/samba/lmhosts
-install -m644 setup/swat $RPM_BUILD_ROOT%{_sysconfdir}/xinetd.d/swat
install -m644 setup/samba.sysconfig $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/samba
install -m755 setup/smb.init $RPM_BUILD_ROOT%{initdir}/smb
install -m755 setup/winbind.init $RPM_BUILD_ROOT%{initdir}/winbind
install -m644 setup/samba.pamd $RPM_BUILD_ROOT%{_sysconfdir}/pam.d/samba
-install -m755 setup/smbprint $RPM_BUILD_ROOT%{_bindir}
+install -m755 packaging/printing/smbprint $RPM_BUILD_ROOT%{_bindir}
install -m644 setup/smbusers $RPM_BUILD_ROOT%{_sysconfdir}/samba/smbusers
install -m644 setup/smb.conf $RPM_BUILD_ROOT%{_sysconfdir}/samba/smb.conf
install -m755 source3/script/mksmbpasswd.sh $RPM_BUILD_ROOT%{_bindir}
rm -f $RPM_BUILD_ROOT%{_mandir}/man1/log2pcap.1*
rm -f $RPM_BUILD_ROOT%{_mandir}/man1/smbsh.1*
rm -f $RPM_BUILD_ROOT%{_mandir}/man5/vfstest.1*
+rm -f $RPM_BUILD_ROOT%{_mandir}/man8/samba-tool.8*
+rm -f $RPM_BUILD_ROOT%{_mandir}/man8/samba.8*
%clean
#%postun
-%post swat
-# Add swat entry to /etc/services if not already there.
-if [ ! "`grep ^\s**swat /etc/services`" ]; then
- echo 'swat 901/tcp # Add swat service used via inetd' >> /etc/services
-fi
-
%post common
/sbin/ldconfig
%{_libarchdir}/samba/vfs/dirsort.so
%{_libarchdir}/samba/vfs/expand_msdfs.so
%{_libarchdir}/samba/vfs/extd_audit.so
+%{_libarchdir}/samba/vfs/fake_acls.so
%{_libarchdir}/samba/vfs/fake_perms.so
%{_libarchdir}/samba/vfs/fileid.so
%{_libarchdir}/samba/vfs/full_audit.so
+%if %{with_vfs_gpfs}
%{_libarchdir}/samba/vfs/gpfs.so
+%endif
%{_libarchdir}/samba/vfs/linux_xfs_sgid.so
%{_libarchdir}/samba/vfs/netatalk.so
%{_libarchdir}/samba/vfs/preopen.so
%{_libarchdir}/samba/vfs/readahead.so
%{_libarchdir}/samba/vfs/readonly.so
%{_libarchdir}/samba/vfs/recycle.so
-%{_libarchdir}/samba/vfs/scannedonly.so
%{_libarchdir}/samba/vfs/shadow_copy.so
%{_libarchdir}/samba/vfs/shadow_copy2.so
-%{_libarchdir}/samba/vfs/smb_traffic_analyzer.so
%{_libarchdir}/samba/vfs/streams_depot.so
%{_libarchdir}/samba/vfs/streams_xattr.so
%{_libarchdir}/samba/vfs/syncops.so
%{_libarchdir}/samba/vfs/time_audit.so
+%if %{with_vfs_tsmsm}
%{_libarchdir}/samba/vfs/tsmsm.so
+%endif
%{_libarchdir}/samba/vfs/xattr_tdb.so
-%{_libarchdir}/samba/vfs/aio_posix.so
%{_libarchdir}/samba/vfs/aio_pthread.so
%{_libarchdir}/samba/vfs/media_harmony.so
%{_mandir}/man8/smbd.8*
%{_mandir}/man8/eventlogadm.8*
%{_mandir}/man8/vfs_*.8*
-%{_mandir}/man8/smbta-util.8*
##########
##########
-%files swat
-%defattr(-,root,root)
-%config(noreplace) %{_sysconfdir}/xinetd.d/swat
-%dir %{_datadir}/samba/swat
-%{_datadir}/samba/swat/*
-%{_sbindir}/swat
-%{_mandir}/man8/swat.8*
-%attr(755,root,root) %{_datadir}/samba/codepages/*.msg
-
-##########
-
%files client
%defattr(-,root,root)
%{_bindir}/smbtar
%{_bindir}/smbtree
%{_bindir}/sharesec
-%{_bindir}/smbta-util
%{_mandir}/man8/smbspool.8*
%{_mandir}/man1/smbget.1*
%attr(755,root,root) /%{_libarch}/libnss_winbind.so
%attr(755,root,root) /%{_libarch}/libnss_winbind.so.2
%attr(755,root,root) /%{_libarch}/security/pam_winbind.so
-%attr(755,root,root) /%{_libarch}/security/pam_smbpass.so
/usr/share/locale/*/LC_MESSAGES/pam_winbind.mo
/usr/share/locale/*/LC_MESSAGES/net.mo
%{_libarchdir}/samba/nss_info/rfc2307.so
%{_libarchdir}/samba/nss_info/sfu.so
%{_libarchdir}/samba/nss_info/sfu20.so
-%{_datadir}/samba/codepages/lowcase.dat
-%{_datadir}/samba/codepages/upcase.dat
-%{_datadir}/samba/codepages/valid.dat
%{_includedir}/libsmbclient.h
%{_libarchdir}/libsmbclient.*
%{_includedir}/smb_share_modes.h
-%{_libarchdir}/libsmbsharemodes.so
-%{_libarchdir}/libsmbsharemodes.so.0
%{_includedir}/netapi.h
%{_includedir}/wbclient.h