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 * Mon Aug 1 2001 Tim Potter <tpot@samba.org>
47 - Install winbind daemon, client programs, nss and pam libraries
48 - Removed codepage stuff so spec file works with current HEAD branch
50 * Sat Mar 31 2001 Andrew Bartlett <abartlet@pcug.org.au>
51 - Changed prefix/share/man for _mandir/share/man
52 - Changed this for a sed macro MANDIR_MACRO
53 - This allows us to build both RH7 (RPM4)
54 and older versions from same specfile.
55 - Made makerpms.sh use the rpm -ta command rather
56 than attempting to devine the correct location to
57 put the file. Also removes some /tmp symlink games.
58 - Allows build on RPM4
59 - Increased PAM requirements to allow us to use
60 system-auth (this pam is in 6.x errata at least)
62 * Tue Mar 27 2001 John H Terpstra <jht@samba.org>
63 - Fixed typos introduced by Sum Wun.
64 - Build for Red Hat 7.x
66 * Sun Nov 12 2000 John H Terpstra <jht@samba.org>
67 - Updated for Samba-2.2 releases
68 - Added libnss_wins.so stuff
69 - Added compile-time options
71 * Sat Nov 29 1999 Matthew Vanecek <mev0003@unt.edu>
72 - Added a Prefix and changed "/usr" to "%{prefix}"
74 * Sat Nov 11 1999 Tridge <tridge@linuxcare.com>
75 - changed from mount.smb to mount.smbfs
77 * Sat Oct 9 1999 Tridge <tridge@linuxcare.com>
79 - added smbmnt and smbmount
81 * Sun Apr 25 1999 John H Terpstra <jht@samba.org>
82 - added smbsh.1 man page
84 * Fri Mar 26 1999 Andrew Tridgell <tridge@samba.org>
85 - added --with-pam as pam is no longer used by default
87 * Sat Jan 27 1999 Jeremy Allison <jra@samba.org>
88 - Removed smbrun binary and tidied up some loose ends
90 * Sun Oct 25 1998 John H Terpstra <jht@samba.org>
91 - Added parameters to /config to ensure smb.conf, lmhosts,
92 and smbusers never gets over-written.
94 * Sat Oct 24 1998 John H Terpstra <jht@samba.org>
95 - removed README.smbsh file from docs area
97 * Mon Oct 05 1998 John H Terpstra <jht@samba.org>
98 - Added rpcclient to binaries list
99 - Added smbwrapper stuff
101 * Fri Aug 21 1998 John H Terpstra <jht@samba.org>
102 - Updated for Samba version 2.0 building
104 * Tue Jul 07 1998 Erik Troan <ewt@redhat.com>
105 - updated postun triggerscript to check $0
106 - clear /etc/codepages from %preun instead of %postun
108 * Sat Jul 04 1998 John H Terpstra <jht@samba.org>
109 - fixed codepage preservation during update via -Uvh
111 * Mon Jun 08 1998 Erik Troan <ewt@redhat.com>
112 - made the %postun script a tad less agressive; no reason to remove
113 the logs or lock file
114 - the %postun and %preun should only exectute if this is the final
116 - migrated %triggerpostun from Red Hat's samba package to work around
117 packaging problems in some Red Hat samba releases
119 * Sun Apr 26 1998 John H Terpstra <jht@samba.org>
120 - Tidy up for early alpha releases
121 - added findsmb from SGI packaging
123 * Thu Apr 09 1998 John H Terpstra <jht@samba.org>
125 - Included new codepage.936
127 * Sat Mar 20 1998 John H Terpstra <jht@samba.org>
128 - Added swat facility
130 * Sat Jan 24 1998 John H Terpstra <jht@samba.org>
131 - Many optimisations (some suggested by Manoj Kasichainula <manojk@io.com>
132 - Use of chkconfig in place of individual symlinks to /etc/rc.d/init/smb
133 - Compounded make line
134 - Updated smb.init restart mechanism
135 - Use compound mkdir -p line instead of individual calls to mkdir
136 - Fixed smb.conf file path for log files
137 - Fixed smb.conf file path for incoming smb print spool directory
138 - Added a number of options to smb.conf file
139 - Added smbuser file and smb.conf file updates for username map
148 libtoolize --copy --force # get it to recognize IA-64
151 EXTRA="-D_LARGEFILE64_SOURCE"
153 NUMCPU=`grep processor /proc/cpuinfo | wc -l`
154 CFLAGS="$RPM_OPT_FLAGS $EXTRA" ./configure \
156 --localstatedir=/var \
157 --with-configdir=/etc/samba \
158 --with-privatedir=/etc/samba \
166 --with-sambabook=%{prefix}/share/swat/using_samba \
167 --with-swatdir=%{prefix}/share/swat
168 make -j${NUMCPU} proto
169 make -j${NUMCPU} all nsswitch/libnss_wins.so
170 make -j${NUMCPU} debug2html
171 make -j${NUMCPU} bin/smbspool
175 rm -rf $RPM_BUILD_ROOT
176 mkdir -p $RPM_BUILD_ROOT
177 mkdir -p $RPM_BUILD_ROOT/sbin
178 mkdir -p $RPM_BUILD_ROOT/etc/samba
179 mkdir -p $RPM_BUILD_ROOT/etc/{logrotate.d,pam.d,samba}
180 mkdir -p $RPM_BUILD_ROOT/etc/rc.d/init.d
181 mkdir -p $RPM_BUILD_ROOT%{prefix}/{bin,sbin}
182 mkdir -p $RPM_BUILD_ROOT%{prefix}/share/swat/{images,help,include,using_samba}
183 mkdir -p $RPM_BUILD_ROOT%{prefix}/share/swat/using_samba/{figs,gifs}
184 mkdir -p $RPM_BUILD_ROOTMANDIR_MACRO
185 mkdir -p $RPM_BUILD_ROOT/var/lock/samba
186 mkdir -p $RPM_BUILD_ROOT/var/log/samba
187 mkdir -p $RPM_BUILD_ROOT/var/spool/samba
188 mkdir -p $RPM_BUILD_ROOT/lib/security
190 # Install standard binary files
191 for i in nmblookup smbclient smbpasswd smbstatus testparm testprns \
192 make_printerdef rpcclient smbspool smbcacls smbcontrol wbinfo
194 install -m755 source/bin/$i $RPM_BUILD_ROOT%{prefix}/bin
196 for i in mksmbpasswd.sh smbtar
198 install -m755 source/script/$i $RPM_BUILD_ROOT%{prefix}/bin
201 # Install secure binary files
202 for i in smbd nmbd swat smbmount smbumount smbmnt debug2html winbindd
204 install -m755 source/bin/$i $RPM_BUILD_ROOT%{prefix}/sbin
207 # we need a symlink for mount to recognise the smb and smbfs filesystem types
208 ln -sf %{prefix}/sbin/smbmount $RPM_BUILD_ROOT/sbin/mount.smbfs
209 ln -sf %{prefix}/sbin/smbmount $RPM_BUILD_ROOT/sbin/mount.smb
211 # This allows us to get away without duplicating code that
212 # sombody else can maintain for us.
214 make LIBDIR=$RPM_BUILD_ROOT/etc/samba \
215 BINDIR=$RPM_BUILD_ROOT%{prefix}/bin \
216 MANDIR=$RPM_BUILD_ROOTMANDIR_MACRO \
217 SWATDIR=$RPM_BUILD_ROOT/usr/share/swat \
218 SAMBABOOK=$RPM_BUILD_ROOT/usr/share/swat/using_samba \
219 installman installswat
222 # Install the nsswitch library extension file
223 install -m755 source/nsswitch/libnss_wins.so $RPM_BUILD_ROOT/lib
225 # Make link for wins resolver
226 ( cd $RPM_BUILD_ROOT/lib; ln -s libnss_wins.so libnss_wins.so.2; )
228 # Install winbind shared libraries
229 install -m755 source/nsswitch/libnss_winbind.so $RPM_BUILD_ROOT/lib
230 install -m755 source/nsswitch/pam_winbind.so $RPM_BUILD_ROOT/lib/security
232 # Install SWAT helper files
233 for i in swat/help/*.html docs/htmldocs/*.html
235 install -m644 $i $RPM_BUILD_ROOT%{prefix}/share/swat/help
237 for i in swat/images/*.gif
239 install -m644 $i $RPM_BUILD_ROOT%{prefix}/share/swat/images
241 for i in swat/include/*.html
243 install -m644 $i $RPM_BUILD_ROOT%{prefix}/share/swat/include
246 # Install the miscellany
247 install -m644 swat/README $RPM_BUILD_ROOT%{prefix}/share/swat
248 install -m755 packaging/RedHat/smbprint $RPM_BUILD_ROOT%{prefix}/bin
249 install -m755 packaging/RedHat/findsmb $RPM_BUILD_ROOT%{prefix}/bin
250 install -m755 packaging/RedHat/smb.init $RPM_BUILD_ROOT/etc/rc.d/init.d/smb
251 install -m755 packaging/RedHat/smb.init $RPM_BUILD_ROOT%{prefix}/sbin/samba
252 install -m644 packaging/RedHat/samba.log $RPM_BUILD_ROOT/etc/logrotate.d/samba
253 install -m644 packaging/RedHat/smb.conf $RPM_BUILD_ROOT/etc/samba/smb.conf
254 install -m644 packaging/RedHat/smbusers $RPM_BUILD_ROOT/etc/samba/smbusers
255 install -m644 packaging/RedHat/samba.pamd $RPM_BUILD_ROOT/etc/pam.d/samba
256 install -m644 packaging/RedHat/samba.pamd.stack $RPM_BUILD_ROOT/etc/samba/samba.stack
257 install -m644 packaging/RedHat/samba.xinetd $RPM_BUILD_ROOT/etc/samba/samba.xinetd
258 echo 127.0.0.1 localhost > $RPM_BUILD_ROOT/etc/samba/lmhosts
261 rm -rf $RPM_BUILD_ROOT
264 /sbin/chkconfig --add smb
265 /sbin/chkconfig smb off
267 echo "Looking for old /etc/smb.conf..."
268 if [ -f /etc/smb.conf ]; then
269 echo "Moving old /etc/smb.conf to /etc/samba/smb.conf"
270 mv /etc/smb.conf /etc/samba/smb.conf
273 echo "Looking for old /etc/smbusers..."
274 if [ -f /etc/smbusers ]; then
275 echo "Moving old /etc/smbusers to /etc/samba/smbusers"
276 mv /etc/smbusers /etc/samba/smbusers
279 echo "Looking for old /etc/lmhosts..."
280 if [ -f /etc/lmhosts ]; then
281 echo "Moving old /etc/lmhosts to /etc/samba/lmhosts"
282 mv /etc/lmhosts /etc/samba/lmhosts
285 echo "Looking for old /etc/MACHINE.SID..."
286 if [ -f /etc/MACHINE.SID ]; then
287 echo "Moving old /etc/MACHINE.SID to /etc/samba/MACHINE.SID"
288 mv /etc/MACHINE.SID /etc/samba/MACHINE.SID
291 echo "Looking for old /etc/smbpasswd..."
292 if [ -f /etc/smbpasswd ]; then
293 echo "Moving old /etc/smbpasswd to /etc/samba/smbpasswd"
294 mv /etc/smbpasswd /etc/samba/smbpasswd
297 # Add swat entry to /etc/services if not already there.
298 if !( grep ^[:space:]*swat /etc/services > /dev/null ) then
299 echo 'swat 901/tcp # Add swat service used via inetd' >> /etc/services
302 # Add swat entry to /etc/inetd.conf if needed.
303 if [ -f /etc/inetd.conf ]; then
304 if !( grep ^[:space:]*swat /etc/inetd.conf > /dev/null ) then
305 echo 'swat stream tcp nowait.400 root %{prefix}/sbin/swat swat' >> /etc/inetd.conf
306 killall -1 inetd || :
310 # Add swat entry to xinetd.d if needed.
311 if [ -d $RPM_BUILD_ROOT/etc/xinetd.d -a ! -f /etc/xinetd.d/swat ]; then
312 mv /etc/samba/samba.xinetd /etc/xinetd.d/swat
314 rm -f /etc/samba/samba.xinetd
317 # Install the correct version of the samba pam file, depending on pam version.
318 if [ -f /lib/security/pam_stack.so ]; then
319 echo "Installing stack version of /etc/pam.d/samba..."
320 mv /etc/samba/samba.stack /etc/pam.d/samba
322 echo "Installing non-stack version of /etc/pam.d/samba..."
323 rm -f /etc/samba/samba.stack
326 # Create winbind nss client symlink
328 ln -s /lib/libnss_winbind.so /lib/libnss_winbind.so.2
332 /sbin/chkconfig --del smb
334 # We want to remove the browse.dat and wins.dat files so they can not interfer with a new version of samba!
335 if [ -e /var/lock/samba/browse.dat ]; then
336 rm -f /var/lock/samba/browse.dat
338 if [ -e /var/lock/samba/wins.dat ]; then
339 rm -f /var/lock/samba/wins.dat
342 # Remove the transient tdb files.
343 if [ -e /var/lock/samba/brlock.tdb ]; then
344 rm -f /var/lock/samba/brlock.tdb
347 if [ -e /var/lock/samba/unexpected.tdb ]; then
348 rm -f /var/lock/samba/unexpected.tdb
351 if [ -e /var/lock/samba/connections.tdb ]; then
352 rm -f /var/lock/samba/connections.tdb
355 if [ -e /var/lock/samba/locking.tdb ]; then
356 rm -f /var/lock/samba/locking.tdb
359 if [ -e /var/lock/samba/messages.tdb ]; then
360 rm -f /var/lock/samba/messages.tdb
363 # Remove winbind nss client symlink
365 if [ -L /lib/libnss_winbind.so.2 ]; then
366 rm -f /lib/libnss_winbind.so.2
371 # Only delete remnants of samba if this is the final deletion.
373 if [ -x /etc/pam.d/samba ]; then
374 rm -f /etc/pam.d/samba
376 if [ -e /var/log/samba ]; then
377 rm -rf /var/log/samba
380 # Remove swat entries from /etc/inetd.conf and /etc/services
383 if [ -f /etc/inetd.conf ]; then
384 # preserve inetd.conf permissions.
385 cp -p /etc/inetd.conf $tmpfile
386 sed -e '/^[:space:]*swat.*$/d' /etc/inetd.conf > $tmpfile
387 mv $tmpfile inetd.conf
389 # preserve services permissions.
390 cp -p /etc/services $tmpfile
391 sed -e '/^[:space:]*swat.*$/d' /etc/services > $tmpfile
392 mv $tmpfile /etc/services
394 # Remove swat entry from /etc/xinetd.d
395 if [ -f /etc/xinetd.d/swat ]; then
396 rm -r /etc/xinetd.d/swat
400 %triggerpostun -- samba < samba-2.0.0
402 /sbin/chkconfig --add smb
406 %doc README COPYING Manifest Read-Manifest-Now
407 %doc WHATSNEW.txt Roadmap
411 %attr(-,root,root) %{prefix}/sbin/smbd
412 %attr(-,root,root) %{prefix}/sbin/nmbd
413 %attr(-,root,root) %{prefix}/sbin/swat
414 %attr(-,root,root) %{prefix}/sbin/smbmnt
415 %attr(-,root,root) %{prefix}/sbin/smbmount
416 %attr(-,root,root) %{prefix}/sbin/smbumount
417 %attr(-,root,root) %{prefix}/sbin/winbindd
418 %attr(-,root,root) /sbin/mount.smbfs
419 %attr(-,root,root) /sbin/mount.smb
420 %attr(-,root,root) %{prefix}/bin/mksmbpasswd.sh
421 %attr(-,root,root) %{prefix}/bin/smbclient
422 %attr(-,root,root) %{prefix}/bin/smbspool
423 %attr(-,root,root) %{prefix}/bin/rpcclient
424 %attr(-,root,root) %{prefix}/bin/testparm
425 %attr(-,root,root) %{prefix}/bin/testprns
426 %attr(-,root,root) %{prefix}/bin/findsmb
427 %attr(-,root,root) %{prefix}/bin/smbstatus
428 %attr(-,root,root) %{prefix}/bin/nmblookup
429 %attr(-,root,root) %{prefix}/bin/make_printerdef
430 %attr(-,root,root) %{prefix}/bin/smbpasswd
431 %attr(-,root,root) %{prefix}/bin/smbtar
432 %attr(-,root,root) %{prefix}/bin/smbprint
433 %attr(-,root,root) %{prefix}/bin/smbcontrol
434 %attr(-,root,root) %{prefix}/bin/smbcacls
435 %attr(-,root,root) %{prefix}/bin/wbinfo
436 %attr(755,root,root) /lib/libnss_wins.s*
437 %attr(-,root,root) %{prefix}/share/swat/help/*
438 %attr(-,root,root) %{prefix}/share/swat/images/*
439 %attr(-,root,root) %{prefix}/share/swat/include/header.html
440 %attr(-,root,root) %{prefix}/share/swat/include/footer.html
441 %attr(-,root,root) %{prefix}/share/swat/using_samba/*
442 %attr(-,root,root) %config(noreplace) /etc/samba/lmhosts
443 %attr(-,root,root) %config(noreplace) /etc/samba/smb.conf
444 %attr(-,root,root) %config(noreplace) /etc/samba/smbusers
445 %attr(-,root,root) /etc/samba/samba.stack
446 %attr(-,root,root) /etc/samba/samba.xinetd
447 %attr(-,root,root) /etc/rc.d/init.d/smb
448 %attr(-,root,root) /etc/logrotate.d/samba
449 %attr(-,root,root) %config(noreplace) /etc/pam.d/samba
450 %attr(-,root,root) MANDIR_MACRO/man1/*
451 %attr(-,root,root) MANDIR_MACRO/man5/*
452 %attr(-,root,root) MANDIR_MACRO/man7/*
453 %attr(-,root,root) MANDIR_MACRO/man8/*
454 %attr(755,root,root) %dir /var/lock/samba
455 %attr(-,root,root) %dir /var/log/samba
456 %attr(1777,root,root) %dir /var/spool/samba
457 %attr(-,root,root) /lib/libnss_winbind.so
458 %attr(-,root,root) /lib/security/pam_winbind.so