1 Summary: Samba SMB client and server
5 Copyright: GNU GPL version 2
7 Source: ftp://samba.org/pub/samba/samba-%{version}.tar.gz
8 Packager: John H Terpstra [Samba-Team] <jht@samba.org>
9 Requires: pam >= 0.72 kernel >= 2.2.1 glibc >= 2.1.2
10 Prereq: chkconfig fileutils
11 BuildRoot: /var/tmp/samba
15 Samba provides an SMB server which can be used to provide
16 network services to SMB (sometimes called "Lan Manager")
17 clients, including various versions of MS Windows, OS/2,
18 and other Linux machines. Samba also provides some SMB
19 clients, which complement the built-in SMB filesystem
20 in Linux. Samba uses NetBIOS over TCP/IP (NetBT) protocols
21 and does NOT need NetBEUI (Microsoft Raw NetBIOS frame)
24 Samba-2.2 features working NT Domain Control capability and
25 includes the SWAT (Samba Web Administration Tool) that
26 allows samba's smb.conf file to be remotely managed using your
27 favourite web browser. For the time being this is being
28 enabled on TCP port 901 via inetd.
30 Users are advised to use Samba-2.2 as a Windows NT4
31 Domain Controller only on networks that do NOT have a Windows
32 NT Domain Controller. This release does NOT as yet have
33 Backup Domain control ability.
35 Please refer to the WHATSNEW.txt document for fixup information.
36 This binary release includes encrypted password support.
38 Please read the smb.conf file and ENCRYPTION.txt in the
39 docs directory for implementation details.
41 NOTE: Red Hat Linux uses PAM which has integrated support
42 for Shadow passwords and quotas. Do NOT recompile with the
43 SHADOW_PWD option enabled
46 * Sat Mar 31 2001 Andrew Bartlett <abartlet@pcug.org.au>
47 - Changed prefix/share/man for _mandir/share/man
48 - Changed this for a sed macro MANDIR_MACRO
49 - This allows us to build both RH7 (RPM4)
50 and older versions from same specfile.
51 - Made makerpms.sh use the rpm -ta command rather
52 than attempting to devine the correct location to
53 put the file. Also removes some /tmp symlink games.
54 - Allows build on RPM4
55 - Increased PAM requirements to allow us to use
56 system-auth (this pam is in 6.x errata at least)
58 * Tue Mar 27 2001 John H Terpstra <jht@samba.org>
59 - Fixed typos introduced by Sum Wun.
60 - Build for Red Hat 7.x
62 * Sun Nov 12 2000 John H Terpstra <jht@samba.org>
63 - Updated for Samba-2.2 releases
64 - Added libnss_wins.so stuff
65 - Added compile-time options
67 * Sat Nov 29 1999 Matthew Vanecek <mev0003@unt.edu>
68 - Added a Prefix and changed "/usr" to "%{prefix}"
70 * Sat Nov 11 1999 Tridge <tridge@linuxcare.com>
71 - changed from mount.smb to mount.smbfs
73 * Sat Oct 9 1999 Tridge <tridge@linuxcare.com>
75 - added smbmnt and smbmount
77 * Sun Apr 25 1999 John H Terpstra <jht@samba.org>
78 - added smbsh.1 man page
80 * Fri Mar 26 1999 Andrew Tridgell <tridge@samba.org>
81 - added --with-pam as pam is no longer used by default
83 * Sat Jan 27 1999 Jeremy Allison <jra@samba.org>
84 - Removed smbrun binary and tidied up some loose ends
86 * Sun Oct 25 1998 John H Terpstra <jht@samba.org>
87 - Added parameters to /config to ensure smb.conf, lmhosts,
88 and smbusers never gets over-written.
90 * Sat Oct 24 1998 John H Terpstra <jht@samba.org>
91 - removed README.smbsh file from docs area
93 * Mon Oct 05 1998 John H Terpstra <jht@samba.org>
94 - Added rpcclient to binaries list
95 - Added smbwrapper stuff
97 * Fri Aug 21 1998 John H Terpstra <jht@samba.org>
98 - Updated for Samba version 2.0 building
100 * Tue Jul 07 1998 Erik Troan <ewt@redhat.com>
101 - updated postun triggerscript to check $0
102 - clear /etc/codepages from %preun instead of %postun
104 * Sat Jul 04 1998 John H Terpstra <jht@samba.org>
105 - fixed codepage preservation during update via -Uvh
107 * Mon Jun 08 1998 Erik Troan <ewt@redhat.com>
108 - made the %postun script a tad less agressive; no reason to remove
109 the logs or lock file
110 - the %postun and %preun should only exectute if this is the final
112 - migrated %triggerpostun from Red Hat's samba package to work around
113 packaging problems in some Red Hat samba releases
115 * Sun Apr 26 1998 John H Terpstra <jht@samba.org>
116 - Tidy up for early alpha releases
117 - added findsmb from SGI packaging
119 * Thu Apr 09 1998 John H Terpstra <jht@samba.org>
121 - Included new codepage.936
123 * Sat Mar 20 1998 John H Terpstra <jht@samba.org>
124 - Added swat facility
126 * Sat Jan 24 1998 John H Terpstra <jht@samba.org>
127 - Many optimisations (some suggested by Manoj Kasichainula <manojk@io.com>
128 - Use of chkconfig in place of individual symlinks to /etc/rc.d/init/smb
129 - Compounded make line
130 - Updated smb.init restart mechanism
131 - Use compound mkdir -p line instead of individual calls to mkdir
132 - Fixed smb.conf file path for log files
133 - Fixed smb.conf file path for incoming smb print spool directory
134 - Added a number of options to smb.conf file
135 - Added smbuser file and smb.conf file updates for username map
144 libtoolize --copy --force # get it to recognize IA-64
147 EXTRA="-D_LARGEFILE64_SOURCE"
149 NUMCPU=`grep processor /proc/cpuinfo | wc -l`
150 CFLAGS="$RPM_OPT_FLAGS $EXTRA" ./configure \
152 --localstatedir=/var \
153 --with-configdir=/etc/samba \
154 --with-privatedir=/etc/samba \
155 --with-codepagedir=/etc/codepages \
163 --with-sambabook=%{prefix}/share/swat/using_samba \
164 --with-swatdir=%{prefix}/share/swat
165 make -j${NUMCPU} proto
166 make -j${NUMCPU} all nsswitch/libnss_wins.so
167 make -j${NUMCPU} debug2html
168 make -j${NUMCPU} bin/smbspool
172 rm -rf $RPM_BUILD_ROOT
173 mkdir -p $RPM_BUILD_ROOT
174 mkdir -p $RPM_BUILD_ROOT/sbin
175 mkdir -p $RPM_BUILD_ROOT/etc/samba
176 mkdir -p $RPM_BUILD_ROOT/etc/codepages/src
177 mkdir -p $RPM_BUILD_ROOT/etc/{logrotate.d,pam.d,samba}
178 mkdir -p $RPM_BUILD_ROOT/etc/rc.d/init.d
179 mkdir -p $RPM_BUILD_ROOT%{prefix}/{bin,sbin}
180 mkdir -p $RPM_BUILD_ROOT%{prefix}/share/swat/{images,help,include,using_samba}
181 mkdir -p $RPM_BUILD_ROOT%{prefix}/share/swat/using_samba/{figs,gifs}
182 mkdir -p $RPM_BUILD_ROOTMANDIR_MACRO
183 mkdir -p $RPM_BUILD_ROOT/var/lock/samba
184 mkdir -p $RPM_BUILD_ROOT/var/log/samba
185 mkdir -p $RPM_BUILD_ROOT/var/spool/samba
186 mkdir -p $RPM_BUILD_ROOT/lib
188 # Install standard binary files
189 for i in nmblookup smbclient smbpasswd smbstatus testparm testprns \
190 make_smbcodepage make_unicodemap make_printerdef rpcclient smbspool \
193 install -m755 -s source/bin/$i $RPM_BUILD_ROOT%{prefix}/bin
195 for i in mksmbpasswd.sh smbtar
197 install -m755 source/script/$i $RPM_BUILD_ROOT%{prefix}/bin
200 # Install secure binary files
201 for i in smbd nmbd swat smbmount smbumount smbmnt debug2html
203 install -m755 -s source/bin/$i $RPM_BUILD_ROOT%{prefix}/sbin
206 # we need a symlink for mount to recognise the smb and smbfs filesystem types
207 ln -sf %{prefix}/sbin/smbmount $RPM_BUILD_ROOT/sbin/mount.smbfs
208 ln -sf %{prefix}/sbin/smbmount $RPM_BUILD_ROOT/sbin/mount.smb
210 # This allows us to get away without duplicating code that
211 # sombody else can maintain for us.
213 make LIBDIR=$RPM_BUILD_ROOT/etc/samba \
214 BINDIR=$RPM_BUILD_ROOT%{prefix}/bin \
215 MANDIR=$RPM_BUILD_ROOTMANDIR_MACRO \
216 CODEPAGEDIR=$RPM_BUILD_ROOT/etc/codepages \
217 SWATDIR=$RPM_BUILD_ROOT/usr/share/swat \
218 SAMBABOOK=$RPM_BUILD_ROOT/usr/share/swat/using_samba \
219 installman installcp installswat
222 # Install codepage source files
223 for i in source/codepages/codepage_def.* source/codepages/*.TXT
225 install -m644 $i $RPM_BUILD_ROOT/etc/codepages/src
228 # Install the nsswitch library extenstion file
229 install -m755 source/nsswitch/libnss_wins.so $RPM_BUILD_ROOT/lib
230 # Make link for wins resolver
231 ( cd $RPM_BUILD_ROOT/lib; ln -s libnss_wins.so libnss_wins.so.2; )
233 # Install SWAT helper files
234 for i in swat/help/*.html docs/htmldocs/*.html
236 install -m644 $i $RPM_BUILD_ROOT%{prefix}/share/swat/help
238 for i in swat/images/*.gif
240 install -m644 $i $RPM_BUILD_ROOT%{prefix}/share/swat/images
242 for i in swat/include/*.html
244 install -m644 $i $RPM_BUILD_ROOT%{prefix}/share/swat/include
247 # Install the miscellany
248 install -m644 swat/README $RPM_BUILD_ROOT%{prefix}/share/swat
249 install -m755 packaging/RedHat/smbprint $RPM_BUILD_ROOT%{prefix}/bin
250 install -m755 packaging/RedHat/findsmb $RPM_BUILD_ROOT%{prefix}/bin
251 install -m755 packaging/RedHat/smb.init $RPM_BUILD_ROOT/etc/rc.d/init.d/smb
252 install -m755 packaging/RedHat/smb.init $RPM_BUILD_ROOT%{prefix}/sbin/samba
253 install -m644 packaging/RedHat/samba.log $RPM_BUILD_ROOT/etc/logrotate.d/samba
254 install -m644 packaging/RedHat/smb.conf $RPM_BUILD_ROOT/etc/samba/smb.conf
255 install -m644 packaging/RedHat/smbusers $RPM_BUILD_ROOT/etc/samba/smbusers
256 install -m644 packaging/RedHat/samba.pamd $RPM_BUILD_ROOT/etc/pam.d/samba
257 install -m644 packaging/RedHat/samba.pamd.stack $RPM_BUILD_ROOT/etc/samba/samba.stack
258 install -m644 packaging/RedHat/samba.xinetd $RPM_BUILD_ROOT/etc/samba/samba.xinetd
259 echo 127.0.0.1 localhost > $RPM_BUILD_ROOT/etc/samba/lmhosts
262 rm -rf $RPM_BUILD_ROOT
265 /sbin/chkconfig --add smb
266 /sbin/chkconfig smb off
268 echo "Looking for old /etc/smb.conf..."
269 if [ -f /etc/smb.conf ]; then
270 echo "Moving old /etc/smb.conf to /etc/samba/smb.conf"
271 mv /etc/smb.conf /etc/samba/smb.conf
274 echo "Looking for old /etc/smbusers..."
275 if [ -f /etc/smbusers ]; then
276 echo "Moving old /etc/smbusers to /etc/samba/smbusers"
277 mv /etc/smbusers /etc/samba/smbusers
280 echo "Looking for old /etc/lmhosts..."
281 if [ -f /etc/lmhosts ]; then
282 echo "Moving old /etc/lmhosts to /etc/samba/lmhosts"
283 mv /etc/lmhosts /etc/samba/lmhosts
286 echo "Looking for old /etc/MACHINE.SID..."
287 if [ -f /etc/MACHINE.SID ]; then
288 echo "Moving old /etc/MACHINE.SID to /etc/samba/MACHINE.SID"
289 mv /etc/MACHINE.SID /etc/samba/MACHINE.SID
292 echo "Looking for old /etc/smbpasswd..."
293 if [ -f /etc/smbpasswd ]; then
294 echo "Moving old /etc/smbpasswd to /etc/samba/smbpasswd"
295 mv /etc/smbpasswd /etc/samba/smbpasswd
298 # Add swat entry to /etc/services if not already there.
299 if !( grep ^[:space:]*swat /etc/services > /dev/null ) then
300 echo 'swat 901/tcp # Add swat service used via inetd' >> /etc/services
303 # Add swat entry to /etc/inetd.conf if needed.
304 if [ -f /etc/inetd.conf ]; then
305 if !( grep ^[:space:]*swat /etc/inetd.conf > /dev/null ) then
306 echo 'swat stream tcp nowait.400 root %{prefix}/sbin/swat swat' >> /etc/inetd.conf
307 killall -1 inetd || :
311 # Add swat entry to xinetd.d if needed.
312 if [ -d $RPM_BUILD_ROOT/etc/xinetd.d ]; then
313 mv /etc/samba/samba.xinetd /etc/xinetd.d/swat
315 rm -f /etc/samba/samba.xinetd
318 # Install the correct version of the samba pam file, depending on pam version.
319 if [ -f /lib/security/pam_stack.so ]; then
320 echo "Installing stack version of /etc/pam.d/samba..."
321 mv /etc/samba/samba.stack /etc/pam.d/samba
323 echo "Installing non-stack version of /etc/pam.d/samba..."
324 rm -f /etc/samba/samba.stack
329 /sbin/chkconfig --del smb
331 # We want to remove the browse.dat and wins.dat files so they can not interfer with a new version of samba!
332 if [ -e /var/lock/samba/browse.dat ]; then
333 rm -f /var/lock/samba/browse.dat
335 if [ -e /var/lock/samba/wins.dat ]; then
336 rm -f /var/lock/samba/wins.dat
339 # Remove the transient tdb files.
340 if [ -e /var/lock/samba/brlock.tdb ]; then
341 rm -f /var/lock/samba/brlock.tdb
344 if [ -e /var/lock/samba/unexpected.tdb ]; then
345 rm -f /var/lock/samba/unexpected.tdb
348 if [ -e /var/lock/samba/connections.tdb ]; then
349 rm -f /var/lock/samba/connections.tdb
352 if [ -e /var/lock/samba/locking.tdb ]; then
353 rm -f /var/lock/samba/locking.tdb
356 if [ -e /var/lock/samba/messages.tdb ]; then
357 rm -f /var/lock/samba/messages.tdb
363 # Only delete remnants of samba if this is the final deletion.
365 if [ -x /etc/pam.d/samba ]; then
366 rm -f /etc/pam.d/samba
368 if [ -e /var/log/samba ]; then
369 rm -rf /var/log/samba
372 # Remove swat entries from /etc/inetd.conf and /etc/services
375 if [ -f /etc/inetd.conf ]; then
376 # preserve inetd.conf permissions.
377 cp -p /etc/inetd.conf $tmpfile
378 sed -e '/^[:space:]*swat.*$/d' /etc/inetd.conf > $tmpfile
379 mv $tmpfile inetd.conf
381 # preserve services permissions.
382 cp -p /etc/services $tmpfile
383 sed -e '/^[:space:]*swat.*$/d' /etc/services > $tmpfile
384 mv $tmpfile /etc/services
386 # Remove swat entry from /etc/xinetd.d
387 if [ -f /etc/xinetd.d/swat ]; then
388 rm -r /etc/xinetd.d/swat
392 %triggerpostun -- samba < samba-2.0.0
394 /sbin/chkconfig --add smb
398 %doc README COPYING Manifest Read-Manifest-Now
399 %doc WHATSNEW.txt Roadmap
403 %attr(-,root,root) %{prefix}/sbin/smbd
404 %attr(-,root,root) %{prefix}/sbin/nmbd
405 %attr(-,root,root) %{prefix}/sbin/swat
406 %attr(-,root,root) %{prefix}/sbin/smbmnt
407 %attr(-,root,root) %{prefix}/sbin/smbmount
408 %attr(-,root,root) %{prefix}/sbin/smbumount
409 %attr(-,root,root) /sbin/mount.smbfs
410 %attr(-,root,root) /sbin/mount.smb
411 %attr(-,root,root) %{prefix}/bin/mksmbpasswd.sh
412 %attr(-,root,root) %{prefix}/bin/smbclient
413 %attr(-,root,root) %{prefix}/bin/smbspool
414 %attr(-,root,root) %{prefix}/bin/rpcclient
415 %attr(-,root,root) %{prefix}/bin/testparm
416 %attr(-,root,root) %{prefix}/bin/testprns
417 %attr(-,root,root) %{prefix}/bin/findsmb
418 %attr(-,root,root) %{prefix}/bin/smbstatus
419 %attr(-,root,root) %{prefix}/bin/nmblookup
420 %attr(-,root,root) %{prefix}/bin/make_smbcodepage
421 %attr(-,root,root) %{prefix}/bin/make_unicodemap
422 %attr(-,root,root) %{prefix}/bin/make_printerdef
423 %attr(-,root,root) %{prefix}/bin/smbpasswd
424 %attr(-,root,root) %{prefix}/bin/smbtar
425 %attr(-,root,root) %{prefix}/bin/smbprint
426 %attr(-,root,root) %{prefix}/bin/smbcontrol
427 %attr(-,root,root) %{prefix}/bin/smbcacls
428 %attr(755,root,root) /lib/libnss_wins.s*
429 %attr(-,root,root) %{prefix}/share/swat/help/*
430 %attr(-,root,root) %{prefix}/share/swat/images/*
431 %attr(-,root,root) %{prefix}/share/swat/include/header.html
432 %attr(-,root,root) %{prefix}/share/swat/include/footer.html
433 %attr(-,root,root) %{prefix}/share/swat/using_samba/*
434 %attr(-,root,root) %config(noreplace) /etc/samba/lmhosts
435 %attr(-,root,root) %config(noreplace) /etc/samba/smb.conf
436 %attr(-,root,root) %config(noreplace) /etc/samba/smbusers
437 %attr(-,root,root) /etc/samba/samba.stack
438 %attr(-,root,root) /etc/samba/samba.xinetd
439 %attr(-,root,root) /etc/rc.d/init.d/smb
440 %attr(-,root,root) /etc/logrotate.d/samba
441 %attr(-,root,root) %config(noreplace) /etc/pam.d/samba
442 %attr(-,root,root) MANDIR_MACRO/man1/*
443 %attr(-,root,root) MANDIR_MACRO/man5/*
444 %attr(-,root,root) MANDIR_MACRO/man7/*
445 %attr(-,root,root) MANDIR_MACRO/man8/*
446 %attr(-,root,root) %dir /etc/codepages/*
447 %attr(755,root,root) %dir /var/lock/samba
448 %attr(-,root,root) %dir /var/log/samba
449 %attr(1777,root,root) %dir /var/spool/samba