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 Provides: samba = %{version}, samba-common = %{version}, samba-client = %{version}, samba-swat = %{version}
12 BuildRoot: /var/tmp/samba
16 Samba provides an SMB server which can be used to provide
17 network services to SMB (sometimes called "Lan Manager")
18 clients, including various versions of MS Windows, OS/2,
19 and other Linux machines. Samba also provides some SMB
20 clients, which complement the built-in SMB filesystem
21 in Linux. Samba uses NetBIOS over TCP/IP (NetBT) protocols
22 and does NOT need NetBEUI (Microsoft Raw NetBIOS frame)
25 Samba-2.2 features working NT Domain Control capability and
26 includes the SWAT (Samba Web Administration Tool) that
27 allows samba's smb.conf file to be remotely managed using your
28 favourite web browser. For the time being this is being
29 enabled on TCP port 901 via inetd.
31 Users are advised to use Samba-2.2 as a Windows NT4
32 Domain Controller only on networks that do NOT have a Windows
33 NT Domain Controller. This release does NOT as yet have
34 Backup Domain control ability.
36 Please refer to the WHATSNEW.txt document for fixup information.
37 This binary release includes encrypted password support.
39 Please read the smb.conf file and ENCRYPTION.txt in the
40 docs directory for implementation details.
42 NOTE: Red Hat Linux uses PAM which has integrated support
43 for Shadow passwords and quotas. Do NOT recompile with the
44 SHADOW_PWD option enabled
47 * Mon May 6 2002 Gerald Carter <jerry@samba.org>
48 - moved findsmb to a standard component in samba's
49 "make install". Removed from specfile.
51 * Sun Oct 14 2001 Andrew Bartlett <abartlet@samba.org>
52 - Set SBINDIR for codepage/manpage install, cope with
55 * Mon Aug 1 2001 Tim Potter <tpot@samba.org>
56 - Install winbind daemon, client programs, nss and pam libraries
58 * Sat Mar 31 2001 Andrew Bartlett <abartlet@pcug.org.au>
59 - Changed prefix/share/man for _mandir/share/man
60 - Changed this for a sed macro MANDIR_MACRO
61 - This allows us to build both RH7 (RPM4)
62 and older versions from same specfile.
63 - Made makerpms.sh use the rpm -ta command rather
64 than attempting to devine the correct location to
65 put the file. Also removes some /tmp symlink games.
66 - Allows build on RPM4
67 - Increased PAM requirements to allow us to use
68 system-auth (this pam is in 6.x errata at least)
70 * Tue Mar 27 2001 John H Terpstra <jht@samba.org>
71 - Fixed typos introduced by Sum Wun.
72 - Build for Red Hat 7.x
74 * Sun Nov 12 2000 John H Terpstra <jht@samba.org>
75 - Updated for Samba-2.2 releases
76 - Added libnss_wins.so stuff
77 - Added compile-time options
79 * Sat Nov 29 1999 Matthew Vanecek <mev0003@unt.edu>
80 - Added a Prefix and changed "/usr" to "%{prefix}"
82 * Sat Nov 11 1999 Tridge <tridge@linuxcare.com>
83 - changed from mount.smb to mount.smbfs
85 * Sat Oct 9 1999 Tridge <tridge@linuxcare.com>
87 - added smbmnt and smbmount
89 * Sun Apr 25 1999 John H Terpstra <jht@samba.org>
90 - added smbsh.1 man page
92 * Fri Mar 26 1999 Andrew Tridgell <tridge@samba.org>
93 - added --with-pam as pam is no longer used by default
95 * Sat Jan 27 1999 Jeremy Allison <jra@samba.org>
96 - Removed smbrun binary and tidied up some loose ends
98 * Sun Oct 25 1998 John H Terpstra <jht@samba.org>
99 - Added parameters to /config to ensure smb.conf, lmhosts,
100 and smbusers never gets over-written.
102 * Sat Oct 24 1998 John H Terpstra <jht@samba.org>
103 - removed README.smbsh file from docs area
105 * Mon Oct 05 1998 John H Terpstra <jht@samba.org>
106 - Added rpcclient to binaries list
107 - Added smbwrapper stuff
109 * Fri Aug 21 1998 John H Terpstra <jht@samba.org>
110 - Updated for Samba version 2.0 building
112 * Tue Jul 07 1998 Erik Troan <ewt@redhat.com>
113 - updated postun triggerscript to check $0
114 - clear /etc/codepages from %preun instead of %postun
116 * Sat Jul 04 1998 John H Terpstra <jht@samba.org>
117 - fixed codepage preservation during update via -Uvh
119 * Mon Jun 08 1998 Erik Troan <ewt@redhat.com>
120 - made the %postun script a tad less agressive; no reason to remove
121 the logs or lock file
122 - the %postun and %preun should only exectute if this is the final
124 - migrated %triggerpostun from Red Hat's samba package to work around
125 packaging problems in some Red Hat samba releases
127 * Sun Apr 26 1998 John H Terpstra <jht@samba.org>
128 - Tidy up for early alpha releases
129 - added findsmb from SGI packaging
131 * Thu Apr 09 1998 John H Terpstra <jht@samba.org>
133 - Included new codepage.936
135 * Sat Mar 20 1998 John H Terpstra <jht@samba.org>
136 - Added swat facility
138 * Sat Jan 24 1998 John H Terpstra <jht@samba.org>
139 - Many optimisations (some suggested by Manoj Kasichainula <manojk@io.com>
140 - Use of chkconfig in place of individual symlinks to /etc/rc.d/init/smb
141 - Compounded make line
142 - Updated smb.init restart mechanism
143 - Use compound mkdir -p line instead of individual calls to mkdir
144 - Fixed smb.conf file path for log files
145 - Fixed smb.conf file path for incoming smb print spool directory
146 - Added a number of options to smb.conf file
147 - Added smbuser file and smb.conf file updates for username map
156 libtoolize --copy --force # get it to recognize IA-64
159 EXTRA="-D_LARGEFILE64_SOURCE"
161 NUMCPU=`grep processor /proc/cpuinfo | wc -l`
162 CFLAGS="$RPM_OPT_FLAGS $EXTRA" ./configure \
164 --localstatedir=/var \
165 --with-configdir=/etc/samba \
166 --with-privatedir=/etc/samba \
174 --with-sambabook=%{prefix}/share/swat/using_samba \
175 --with-swatdir=%{prefix}/share/swat
176 make -j${NUMCPU} proto
177 make -j${NUMCPU} all nsswitch/libnss_wins.so
178 make -j${NUMCPU} debug2html
179 make -j${NUMCPU} bin/smbspool
183 rm -rf $RPM_BUILD_ROOT
184 mkdir -p $RPM_BUILD_ROOT
185 mkdir -p $RPM_BUILD_ROOT/sbin
186 mkdir -p $RPM_BUILD_ROOT/etc/samba
187 mkdir -p $RPM_BUILD_ROOT/etc/{logrotate.d,pam.d,samba}
188 mkdir -p $RPM_BUILD_ROOT/etc/rc.d/init.d
189 mkdir -p $RPM_BUILD_ROOT%{prefix}/{bin,sbin}
190 mkdir -p $RPM_BUILD_ROOT%{prefix}/share/swat/{images,help,include,using_samba}
191 mkdir -p $RPM_BUILD_ROOT%{prefix}/share/swat/using_samba/{figs,gifs}
192 mkdir -p $RPM_BUILD_ROOTMANDIR_MACRO
193 mkdir -p $RPM_BUILD_ROOT/var/cache/samba
194 mkdir -p $RPM_BUILD_ROOT/var/{log,run}/samba
195 mkdir -p $RPM_BUILD_ROOT/var/spool/samba
196 mkdir -p $RPM_BUILD_ROOT/lib/security
198 # Install standard binary files
199 for i in nmblookup smbclient smbpasswd smbstatus testparm testprns \
200 make_printerdef rpcclient smbspool smbcacls smbcontrol wbinfo
202 install -m755 source/bin/$i $RPM_BUILD_ROOT%{prefix}/bin
204 for i in mksmbpasswd.sh smbtar
206 install -m755 source/script/$i $RPM_BUILD_ROOT%{prefix}/bin
209 # Install secure binary files
210 for i in smbd nmbd swat smbmount smbumount smbmnt debug2html winbindd
212 install -m755 source/bin/$i $RPM_BUILD_ROOT%{prefix}/sbin
215 # we need a symlink for mount to recognise the smb and smbfs filesystem types
216 ln -sf %{prefix}/sbin/smbmount $RPM_BUILD_ROOT/sbin/mount.smbfs
217 ln -sf %{prefix}/sbin/smbmount $RPM_BUILD_ROOT/sbin/mount.smb
219 # This allows us to get away without duplicating code that
220 # sombody else can maintain for us.
222 make BASEDIR=$RPM_BUILD_ROOT/usr \
223 LIBDIR=$RPM_BUILD_ROOT/etc/samba \
224 SBINDIR=$RPM_BUILD_ROOT%{prefix}/sbin \
225 BINDIR=$RPM_BUILD_ROOT%{prefix}/bin \
226 MANDIR=$RPM_BUILD_ROOTMANDIR_MACRO \
227 SWATDIR=$RPM_BUILD_ROOT/usr/share/swat \
228 SAMBABOOK=$RPM_BUILD_ROOT/usr/share/swat/using_samba \
229 installman installcp installswat
232 # Install the nsswitch library extension file
233 install -m755 source/nsswitch/libnss_wins.so $RPM_BUILD_ROOT/lib
235 # Make link for wins resolver
236 ( cd $RPM_BUILD_ROOT/lib; ln -sf libnss_wins.so libnss_wins.so.2; )
238 # Install winbind shared libraries
239 install -m755 source/nsswitch/libnss_winbind.so $RPM_BUILD_ROOT/lib
240 install -m755 source/nsswitch/pam_winbind.so $RPM_BUILD_ROOT/lib/security
242 # Install SWAT helper files
243 for i in swat/help/*.html docs/htmldocs/*.html
245 install -m644 $i $RPM_BUILD_ROOT%{prefix}/share/swat/help
247 for i in swat/images/*.gif
249 install -m644 $i $RPM_BUILD_ROOT%{prefix}/share/swat/images
251 for i in swat/include/*.html
253 install -m644 $i $RPM_BUILD_ROOT%{prefix}/share/swat/include
256 # Install the miscellany
257 install -m644 swat/README $RPM_BUILD_ROOT%{prefix}/share/swat
258 install -m755 packaging/RedHat/smbprint $RPM_BUILD_ROOT%{prefix}/bin
259 install -m755 packaging/RedHat/smb.init $RPM_BUILD_ROOT/etc/rc.d/init.d/smb
260 install -m755 packaging/RedHat/smb.init $RPM_BUILD_ROOT%{prefix}/sbin/samba
261 install -m644 packaging/RedHat/samba.log $RPM_BUILD_ROOT/etc/logrotate.d/samba
262 install -m644 packaging/RedHat/smb.conf $RPM_BUILD_ROOT/etc/samba/smb.conf
263 install -m644 packaging/RedHat/smbusers $RPM_BUILD_ROOT/etc/samba/smbusers
264 install -m644 packaging/RedHat/samba.pamd $RPM_BUILD_ROOT/etc/pam.d/samba
265 install -m644 packaging/RedHat/samba.pamd.stack $RPM_BUILD_ROOT/etc/samba/samba.stack
266 install -m644 packaging/RedHat/samba.xinetd $RPM_BUILD_ROOT/etc/samba/samba.xinetd
267 echo 127.0.0.1 localhost > $RPM_BUILD_ROOT/etc/samba/lmhosts
270 rm -rf $RPM_BUILD_ROOT
273 /sbin/chkconfig --add smb
274 /sbin/chkconfig smb off
276 echo "Looking for old /etc/smb.conf..."
277 if [ -f /etc/smb.conf -a ! -f /etc/samba/smb.conf ]; then
278 echo "Moving old /etc/smb.conf to /etc/samba/smb.conf"
279 mv /etc/smb.conf /etc/samba/smb.conf
282 echo "Looking for old /etc/smbusers..."
283 if [ -f /etc/smbusers -a ! -f /etc/samba/smbusers ]; then
284 echo "Moving old /etc/smbusers to /etc/samba/smbusers"
285 mv /etc/smbusers /etc/samba/smbusers
288 echo "Looking for old /etc/lmhosts..."
289 if [ -f /etc/lmhosts -a ! -f /etc/samba/lmhosts ]; then
290 echo "Moving old /etc/lmhosts to /etc/samba/lmhosts"
291 mv /etc/lmhosts /etc/samba/lmhosts
294 echo "Looking for old /etc/MACHINE.SID..."
295 if [ -f /etc/MACHINE.SID -a ! -f /etc/samba/MACHINE.SID ]; then
296 echo "Moving old /etc/MACHINE.SID to /etc/samba/MACHINE.SID"
297 mv /etc/MACHINE.SID /etc/samba/MACHINE.SID
300 echo "Looking for old /etc/smbpasswd..."
301 if [ -f /etc/smbpasswd -a ! -f /etc/samba/smbpasswd ]; then
302 echo "Moving old /etc/smbpasswd to /etc/samba/smbpasswd"
303 mv /etc/smbpasswd /etc/samba/smbpasswd
307 # For 2.2.1 we move the tdb files from /var/lock/samba to /var/cache/samba
308 # to preserve across reboots.
310 echo "Moving tdb files in /var/lock/samba/*.tdb to /var/cache/samba/*.tdb"
311 for i in /var/lock/samba/*.tdb
314 newname=`echo $i | sed -e's|var\/lock\/samba|var\/cache\/samba|'`
315 echo "Moving $i to $newname"
320 # Remove the transient tdb files.
321 if [ -e /var/cache/samba/brlock.tdb ]; then
322 rm -f /var/cache/samba/brlock.tdb
325 if [ -e /var/cache/samba/unexpected.tdb ]; then
326 rm -f /var/cache/samba/unexpected.tdb
329 if [ -e /var/cache/samba/connections.tdb ]; then
330 rm -f /var/cache/samba/connections.tdb
333 if [ -e /var/cache/samba/locking.tdb ]; then
334 rm -f /var/cache/samba/locking.tdb
337 if [ -e /var/cache/samba/messages.tdb ]; then
338 rm -f /var/cache/samba/messages.tdb
341 if [ -d /var/lock/samba ]; then
342 rm -rf /var/lock/samba
345 # Add swat entry to /etc/services if not already there.
346 if !( grep ^[:space:]*swat /etc/services > /dev/null ) then
347 echo 'swat 901/tcp # Add swat service used via inetd' >> /etc/services
350 # Add swat entry to /etc/inetd.conf if needed.
351 if [ -f /etc/inetd.conf ]; then
352 if !( grep ^[:space:]*swat /etc/inetd.conf > /dev/null ) then
353 echo 'swat stream tcp nowait.400 root %{prefix}/sbin/swat swat' >> /etc/inetd.conf
354 killall -1 inetd || :
358 # Add swat entry to xinetd.d if needed.
359 if [ -d $RPM_BUILD_ROOT/etc/xinetd.d -a ! -f /etc/xinetd.d/swat ]; then
360 mv /etc/samba/samba.xinetd /etc/xinetd.d/swat
362 rm -f /etc/samba/samba.xinetd
365 # Install the correct version of the samba pam file, depending on pam version.
366 if [ -f /lib/security/pam_stack.so ]; then
367 echo "Installing stack version of /etc/pam.d/samba..."
368 mv /etc/samba/samba.stack /etc/pam.d/samba
370 echo "Installing non-stack version of /etc/pam.d/samba..."
371 rm -f /etc/samba/samba.stack
374 # Create winbind nss client symlink
376 if [ -e /lib/libnss_winbind.so ]; then
377 ln -sf /lib/libnss_winbind.so /lib/libnss_winbind.so.2
382 /sbin/chkconfig --del smb
384 # We want to remove the browse.dat and wins.dat files so they can not interfer with a new version of samba!
385 if [ -e /var/cache/samba/browse.dat ]; then
386 rm -f /var/cache/samba/browse.dat
388 if [ -e /var/cache/samba/wins.dat ]; then
389 rm -f /var/cache/samba/wins.dat
392 # Remove the transient tdb files.
393 if [ -e /var/cache/samba/brlock.tdb ]; then
394 rm -f /var/cache/samba/brlock.tdb
397 if [ -e /var/cache/samba/unexpected.tdb ]; then
398 rm -f /var/cache/samba/unexpected.tdb
401 if [ -e /var/cache/samba/connections.tdb ]; then
402 rm -f /var/cache/samba/connections.tdb
405 if [ -e /var/cache/samba/locking.tdb ]; then
406 rm -f /var/cache/samba/locking.tdb
409 if [ -e /var/cache/samba/messages.tdb ]; then
410 rm -f /var/cache/samba/messages.tdb
413 # Remove winbind nss client symlink
415 if [ -L /lib/libnss_winbind.so.2 ]; then
416 rm -f /lib/libnss_winbind.so.2
421 # Only delete remnants of samba if this is the final deletion.
423 if [ -x /etc/pam.d/samba ]; then
424 rm -f /etc/pam.d/samba
426 if [ -e /var/log/samba ]; then
427 rm -rf /var/log/samba
429 if [ -e /var/cache/samba ]; then
430 rm -rf /var/cache/samba
433 # Remove swat entries from /etc/inetd.conf and /etc/services
436 if [ -f /etc/inetd.conf ]; then
437 # preserve inetd.conf permissions.
438 cp -p /etc/inetd.conf $tmpfile
439 sed -e '/^[:space:]*swat.*$/d' /etc/inetd.conf > $tmpfile
440 mv $tmpfile inetd.conf
442 # preserve services permissions.
443 cp -p /etc/services $tmpfile
444 sed -e '/^[:space:]*swat.*$/d' /etc/services > $tmpfile
445 mv $tmpfile /etc/services
447 # Remove swat entry from /etc/xinetd.d
448 if [ -f /etc/xinetd.d/swat ]; then
449 rm -r /etc/xinetd.d/swat
453 %triggerpostun -- samba < samba-2.0.0
455 /sbin/chkconfig --add smb
459 %defattr(-,root,root)
460 %doc README COPYING Manifest Read-Manifest-Now
461 %doc WHATSNEW.txt Roadmap
468 %{prefix}/sbin/smbmnt
469 %{prefix}/sbin/smbmount
470 %{prefix}/sbin/smbumount
471 %{prefix}/sbin/winbindd
474 %{prefix}/bin/mksmbpasswd.sh
475 %{prefix}/bin/smbclient
476 %{prefix}/bin/smbspool
477 %{prefix}/bin/rpcclient
478 %{prefix}/bin/testparm
479 %{prefix}/bin/testprns
480 %{prefix}/bin/findsmb
481 %{prefix}/bin/smbstatus
482 %{prefix}/bin/nmblookup
483 %{prefix}/bin/make_smbcodepage
484 %{prefix}/bin/make_unicodemap
485 %{prefix}/bin/make_printerdef
486 %{prefix}/bin/smbpasswd
488 %{prefix}/bin/smbprint
489 %{prefix}/bin/smbcontrol
490 %{prefix}/bin/smbcacls
492 %attr(755,root,root) /lib/libnss_wins.s*
493 %{prefix}/share/swat/help/*
494 %{prefix}/share/swat/images/*
495 %{prefix}/share/swat/include/header.html
496 %{prefix}/share/swat/include/footer.html
497 %{prefix}/share/swat/using_samba/*
498 %config(noreplace) /etc/samba/lmhosts
499 %config(noreplace) /etc/samba/smb.conf
500 %config(noreplace) /etc/samba/smbusers
501 /etc/samba/samba.stack
502 /etc/samba/samba.xinetd
504 /etc/logrotate.d/samba
505 %config(noreplace) /etc/pam.d/samba
510 %dir /etc/codepages/*
511 %attr(755,root,root) %dir /var/cache/samba
514 %attr(1777,root,root) %dir /var/spool/samba
515 %attr(-,root,root) /lib/libnss_winbind.so
516 %attr(-,root,root) /lib/security/pam_winbind.so