Summary: Samba SMB server. Name: samba Version: 2.2.3a Release: 3 Copyright: GNU GPL Version 2 Group: System Environment/Daemons URL: http://www.samba.org Source: ftp://samba.anu.edu.au/pub/samba/samba-%{version}.tar.gz Prefix: %{_prefix} Requires: samba-common = %{version} BuildRoot: /var/tmp/samba-root %ifos linux Prereq: fileutils sed %endif %ifarch ia64 %define DEFCCIA cc %define DEFCC %{DEFCCIA} %else %define DEFCC xlc %endif %description Samba provides an SMB server which can be used to provide network services to SMB (sometimes called "Lan Manager") clients, including various versions of MS Windows, OS/2, and other Linux machines. Samba also provides some SMB clients, which complement the built-in SMB filesystem in Linux. Samba uses NetBIOS over TCP/IP (NetBT) protocols and does NOT need NetBEUI (Microsoft Raw NetBIOS frame) protocol. Samba-2.2 features working NT Domain Control capability and includes the SWAT (Samba Web Administration Tool) that allows samba's smb.conf file to be remotely managed using your favourite web browser. For the time being this is being enabled on TCP port 901 via inetd. Users are advised to use Samba-2.2 as a Windows NT4 Domain Controller only on networks that do NOT have a Windows NT Domain Controller. This release does NOT as yet have Backup Domain control ability. Please refer to the WHATSNEW.txt document for fixup information. This binary release includes encrypted password support. Please read the smb.conf file and ENCRYPTION.txt in the docs directory for implementation details. %package client Summary: Samba (SMB) client programs. Group: Applications/System Requires: samba-common = %{version} Obsoletes: smbfs %description client The samba-client package provides some SMB clients to complement the built-in SMB filesystem in Linux. These clients allow access of SMB shares and printing to SMB printers. %package common Summary: Files used by both Samba servers and clients. Group: Applications/System %description common Samba-common provides files necessary for both the server and client packages of Samba. %prep %setup -q %build # Use the default compiler for this platform - gcc otherwise if [[ -z "$CC" ]] then if test "X`type %{DEFCC} 2>/dev/null`" != 'X'; then export CC=%{DEFCC} else export CC=gcc fi fi if test "X$CC" != "Xgcc" then export RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS | sed 's:-fsigned-char::'` export CFLAGS="$RPM_OPT_FLAGS" fi cd source CFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=%{prefix} --libdir=/etc \ --with-lockdir=/var/locks/samba --with-privatedir=/etc \ --with-acl-support --with-quotas \ --with-swatdir=%{prefix}/share/swat \ --with-sambabook=%{prefix}/share/swat make CFLAGS="$RPM_OPT_FLAGS" all %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT%{prefix}/share cd source make prefix=$RPM_BUILD_ROOT%{prefix} \ SWATDIR=$RPM_BUILD_ROOT%{prefix}/share/swat \ SAMBABOOK=$RPM_BUILD_ROOT%{prefix}/share/swat \ MANDIR=$RPM_BUILD_ROOT%{prefix}/man \ LIBDIR=$RPM_BUILD_ROOT/etc install echo 127.0.0.1 localhost > $RPM_BUILD_ROOT/etc/lmhosts mkdir -p $RPM_BUILD_ROOT/etc/codepages/src cd ../source/codepages for i in codepage_def.* do install -m 644 $i $RPM_BUILD_ROOT/etc/codepages/src done strip $RPM_BUILD_ROOT%{prefix}/bin/* || : strip $RPM_BUILD_ROOT%{prefix}/sbin/* || : (cd $RPM_BUILD_ROOT for dir in bin sbin share do mkdir -p usr/$dir cd usr/$dir ln -sf ../..%{_prefix}/$dir/* . cd - done ) mkdir -p $RPM_BUILD_ROOT/var/locks/samba chmod 755 $RPM_BUILD_ROOT/var/locks/samba mkdir -p $RPM_BUILD_ROOT/var/spool/samba chmod 1777 $RPM_BUILD_ROOT/var/spool/samba %clean rm -rf $RPM_BUILD_ROOT %post common # Build codepage load files for i in 437 737 775 850 852 861 866 932 936 949 950 1251 do %{prefix}/bin/make_smbcodepage c $i /etc/codepages/src/codepage_def.$i /etc/codepages/codepage.$i done %post # Add swat, smbd, nmbd entries to /etc/inetd.conf if needed grep -q smbd /etc/inetd.conf || \ echo 'netbios-ssn stream tcp nowait root /usr/sbin/smbd smbd' >> /etc/inetd.conf grep -q nmbd /etc/inetd.conf || \ echo 'netbios-ns dgram upd wait root /usr/sbin/nmbd nmbd' >> /etc/inetd.conf grep -q swat /etc/inetd.conf || \ echo 'swat stream tcp nowait.400 root /usr/sbin/swat swat' >> /etc/inetd.conf # Add swat to /etc/services if needed grep -q swat /etc/services || \ echo 'swat 901/tcp' >> /etc/services /usr/bin/refresh -s inetd 2>&1 || : # add smbd and nmbd to SRC ## Uncomment these if you want to run them via SRC instead. ## If so, you may want to remove the lines just above this that add these ## daemons under the control of the inetd daemon. ##mkssys -G samba -s smbd -a "-i" -p /usr/sbin/smbd -u 0 -R -S -n 15 -f 3 || : ##mkssys -G samba -s nmbd -a "-i" -p /usr/sbin/nmbd -u 0 -R -S -n 15 -f 3 || : %preun if [ $1 = 0 ] ; then if [ -e /var/lock/samba/browse.dat ]; then rm -f /var/locks/samba/browse.dat fi if [ -e /var/lock/samba/wins.dat ]; then rm -f /var/locks/samba/wins.dat fi if [ -d /var/log/samba ]; then rm -rf /var/log/samba/* fi if [ -d /var/locks/samba ]; then rm -rf /var/locks/samba/* fi fi %postun common if [ $1 = 0 ] ; then for n in /etc/codepages/*; do if [ "$n" != "/etc/codepages/src" ]; then rm -rf $n fi done fi %postun if [ $1 = 0 ] ; then # Remove swat entries from /etc/inetd.conf and /etc/services tmpfile=/tmp/samba_inetd.$$ sed -e '/^[:space:]*swat.*$/d' /etc/inetd.conf > $tmpfile cat $tmpfile > /etc/inetd.conf rm -f $tmpfile #Remove smbd entries from inetd.conf sed -e '/^[:space:]*netbios-ssn.*$/d' /etc/inetd.conf > $tmpfile cat $tmpfile > /etc/inetd.conf rm -f $tmpfile #Remove nmbd entries from inetd.conf sed -e '/^[:space:]*netbios-ns.*$/d' /etc/inetd.conf > $tmpfile cat $tmpfile > /etc/inetd.conf rm -f $tmpfile #Remove swat entries from /etc/services sed -e '/^[:space:]*swat.*901.*tcp.*$/d' /etc/services > $tmpfile cat $tmpfile > /etc/services rm -f $tmpfile /usr/bin/refresh -s inetd >/dev/null 2>&1 || : #Remove samba daemons from SRC # That is, if you added the samba daemons to SRC control in the # %post section above, you will want to uncomment these lines # to take them out again if samba is deinstalled. ##rmssys -s smbd || : ##rmssys -s nmbd || : fi %files %defattr(-,root,root) %doc README COPYING Manifest Read-Manifest-Now %doc WHATSNEW.txt Roadmap %doc docs examples %doc swat/README %doc pcp %{prefix}/sbin/smbd %{prefix}/sbin/nmbd %{prefix}/sbin/swat %{prefix}/bin/smbstatus %{prefix}/bin/smbpasswd %{prefix}/share/swat /usr/sbin/smbd /usr/sbin/nmbd /usr/sbin/swat /usr/bin/smbstatus /usr/bin/smbpasswd /usr/share/swat %doc %{prefix}/man/man1/smbstatus.1* %doc %{prefix}/man/man5/smbpasswd.5* %doc %{prefix}/man/man7/samba.7* %doc %{prefix}/man/man8/smbd.8* %doc %{prefix}/man/man8/nmbd.8* %doc %{prefix}/man/man8/smbpasswd.8* %doc %{prefix}/man/man8/swat.8* %dir /var/locks/samba %attr(1777,root,root) %dir /var/spool/samba %files client %defattr(-,root,root) %{prefix}/man/man8/smbmnt.8* %{prefix}/man/man8/smbmount.8* %{prefix}/man/man8/smbumount.8* %{prefix}/bin/nmblookup %{prefix}/bin/rpcclient %{prefix}/bin/smbclient %{prefix}/bin/smbtar /usr/bin/nmblookup /usr/bin/rpcclient /usr/bin/smbclient /usr/bin/smbtar %doc %{prefix}/man/man1/rpcclient.1* %doc %{prefix}/man/man1/smbtar.1* %doc %{prefix}/man/man1/smbclient.1* %doc %{prefix}/man/man1/nmblookup.1* %files common %defattr(-,root,root) %{prefix}/bin/make_printerdef %{prefix}/bin/make_smbcodepage %{prefix}/bin/make_unicodemap %{prefix}/bin/smbcacls %{prefix}/bin/smbcontrol %{prefix}/bin/smbspool %{prefix}/bin/testparm %{prefix}/bin/testprns /usr/bin/make_printerdef /usr/bin/make_smbcodepage /usr/bin/make_unicodemap /usr/bin/smbcacls /usr/bin/smbcontrol /usr/bin/smbspool /usr/bin/testparm /usr/bin/testprns %config(noreplace) /etc/lmhosts %dir /etc/codepages %dir /etc/codepages/src %config /etc/codepages/src/codepage_def.* /etc/codepages/codepage* /etc/codepages/unicode* %doc %{prefix}/man/man1/make_smbcodepage.1* %doc %{prefix}/man/man1/make_unicodemap.1* %doc %{prefix}/man/man1/smbcacls.* %doc %{prefix}/man/man1/smbcontrol.* %doc %{prefix}/man/man1/testparm.1* %doc %{prefix}/man/man1/testprns.1* %doc %{prefix}/man/man5/smb.conf.5* %doc %{prefix}/man/man5/lmhosts.5* %doc %{prefix}/man/man8/smbspool.* %changelog * Fri Nov 1 2002 David Clissold - Add --with-quotas per request. * Thu Jul 18 2002 Chris Tysor - Update Version 2.2.3a. Add auto-setup functionality. - Add swat to /etc/services, and all three to /etc/inetd.conf * Mon Apr 1 2002 David Clissold - Update to Version 2.2.3a. Add examples to %doc (mainly for smb.conf.default) * Mon Feb 11 2002 David Clissold - Update to Version 2.2.2 * Mon Oct 15 2001 Marc Stephenson - New version - adds winbind * Tue Oct 09 2001 Marc Stephenson - New version * Tue Jul 10 2001 Marc Stephenson - Version 2.2.1 * Tue Jun 05 2001 Marc Stephenson - Version 2.2 * Wed Apr 18 2001 David Clissold - Binaries weren't being stripped * Tue Mar 22 2001 David Clissold - Fix minor bug in %install section (cd directory path) * Wed Mar 21 2001 Marc Stephenson - Rebuild against new shared objects - Use default compiler * Fri Oct 27 2000 pkgmgr - Modify for AIX Freeware distribution * Fri Feb 25 2000 Bill Nottingham - fix trigger, again. * Mon Feb 7 2000 Bill Nottingham - fix trigger. * Fri Feb 4 2000 Bill Nottingham - turn on quota support * Mon Jan 31 2000 Cristian Gafton - rebuild to fox dependencies - man pages are compressed * Fri Jan 21 2000 Bill Nottingham - munge post scripts slightly * Wed Jan 19 2000 Bill Nottingham - turn on mmap again. Wheee. - ship smbmount on alpha * Mon Dec 6 1999 Bill Nottingham - turn off mmap. ;) * Wed Dec 1 1999 Bill Nottingham - change /var/log/samba to 0700 - turn on mmap support * Thu Nov 11 1999 Bill Nottingham - update to 2.0.6 * Fri Oct 29 1999 Bill Nottingham - add a %defattr for -common * Tue Oct 5 1999 Bill Nottingham - shift some files into -client - remove /home/samba from package. * Tue Sep 28 1999 Bill Nottingham - initscript oopsie. killproc -HUP, not other way around. * Sat Sep 26 1999 Bill Nottingham - script cleanups. Again. * Wed Sep 22 1999 Bill Nottingham - add a patch to fix dropped reconnection attempts * Mon Sep 6 1999 Jeff Johnson - use cp rather than mv to preserve /etc/services perms (#4938 et al). - use mktemp to generate /etc/tmp.XXXXXX file name. - add prereqs on sed/mktemp/killall (need to move killall to /bin). - fix trigger syntax (i.e. "samba < 1.9.18p7" not "samba < samba-1.9.18p7") * Mon Aug 30 1999 Bill Nottingham - sed "s|nawk|gawk|" /usr/bin/convert_smbpasswd * Sat Aug 21 1999 Bill Nottingham - fix typo in mount.smb * Fri Aug 20 1999 Bill Nottingham - add a %trigger to work around (sort of) broken scripts in previous releases * Mon Aug 16 1999 Bill Nottingham - initscript munging * Mon Aug 9 1999 Bill Nottingham - add domain parsing to mount.smb * Fri Aug 6 1999 Bill Nottingham - add a -common package, shuffle files around. * Fri Jul 23 1999 Bill Nottingham - add a chmod in %postun so /etc/services & inetd.conf don't become unreadable * Wed Jul 21 1999 Bill Nottingham - update to 2.0.5 - fix mount.smb - smbmount options changed again......... - fix postun. oops. - update some stuff from the samba team's spec file. * Fri Jun 18 1999 Bill Nottingham - split off clients into separate package - don't run samba by default * Mon Jun 14 1999 Bill Nottingham - fix one problem with mount.smb script - fix smbpasswd on sparc with a really ugly kludge * Thu Jun 10 1999 Dale Lovelace - fixed logrotate script * Tue May 25 1999 Bill Nottingham - turn of 64-bit locking on 32-bit platforms * Thu May 20 1999 Bill Nottingham - so many releases, so little time - explicitly uncomment 'printing = bsd' in sample config * Tue May 18 1999 Bill Nottingham - update to 2.0.4a - fix mount.smb arg ordering * Fri Apr 16 1999 Bill Nottingham - go back to stop/start for restart (-HUP didn't work in testing) * Fri Mar 26 1999 Bill Nottingham - add a mount.smb to make smb mounting a little easier. - smb filesystems apparently don't work on alpha. Oops. * Thu Mar 25 1999 Bill Nottingham - always create codepages * Tue Mar 23 1999 Bill Nottingham - logrotate changes * Sun Mar 21 1999 Cristian Gafton - auto rebuild in the new build environment (release 3) * Fri Mar 19 1999 Preston Brown - updated init script to use graceful restart (not stop/start) * Tue Mar 9 1999 Bill Nottingham - update to 2.0.3 * Thu Feb 18 1999 Bill Nottingham - update to 2.0.2 * Mon Feb 15 1999 Bill Nottingham - swat swat * Tue Feb 9 1999 Bill Nottingham - fix bash2 breakage in post script * Fri Feb 5 1999 Bill Nottingham - update to 2.0.0 * Mon Oct 12 1998 Cristian Gafton - make sure all binaries are stripped * Thu Sep 17 1998 Jeff Johnson - update to 1.9.18p10. - fix %triggerpostun. * Tue Jul 07 1998 Erik Troan - updated postun triggerscript to check $0 - clear /etc/codepages from %preun instead of %postun * Mon Jun 08 1998 Erik Troan - made the %postun script a tad less agressive; no reason to remove the logs or lock file (after all, if the lock file is still there, samba is still running) - the %postun and %preun should only exectute if this is the final removal - migrated %triggerpostun from Red Hat's samba package to work around packaging problems in some Red Hat samba releases * Sun Apr 26 1998 John H Terpstra - minor tidy up in preparation for release of 1.9.18p5 - added findsmb utility from SGI package * Wed Mar 18 1998 John H Terpstra - Updated version and codepage info. - Release to test name resolve order * Sat Jan 24 1998 John H Terpstra - Many optimisations (some suggested by Manoj Kasichainula - Use of chkconfig in place of individual symlinks to /etc/rc.d/init/smb - Compounded make line - Updated smb.init restart mechanism - Use compound mkdir -p line instead of individual calls to mkdir - Fixed smb.conf file path for log files - Fixed smb.conf file path for incoming smb print spool directory - Added a number of options to smb.conf file - Added smbadduser command (missed from all previous RPMs) - Doooh! - Added smbuser file and smb.conf file updates for username map