Release: PRELEASE
Copyright: GNU GPL version 2
Group: Networking
-Source: ftp://samba.anu.edu.au/pub/samba/samba-PVERSION.tar.gz
+Source: ftp://samba.org/pub/samba/samba-PVERSION.tar.gz
Patch: makefile-path.patch
Patch1: smbw.patch
-Packager: John H Terpstra [Samba-Team] <jht@samba.anu.edu.au>
+Packager: John H Terpstra [Samba-Team] <jht@samba.org>
Requires: pam >= 0.64
-BuildRoot: /tmp/samba
+Prereq: chkconfig fileutils
+BuildRoot: /var/tmp/samba
%description
Samba provides an SMB server which can be used to provide
enabled. Red Hat Linux has built in support for quotas in PAM.
%changelog
-* Sun Oct 25 1998 John H Terpstra <jht@samba.anu.edu.au>
+* Sun Oct 25 1998 John H Terpstra <jht@samba.org>
- Added parameters to /config to ensure smb.conf, lmhosts,
and smbusers never gets over-written.
-* Sat Oct 24 1998 John H Terpstra <jht@samba.anu.edu.au>
+* Sat Oct 24 1998 John H Terpstra <jht@samba.org>
- removed README.smbsh file from docs area
-* Mon Oct 05 1998 John H Terpstra <jht@samba.anu.edu.au>
+* Mon Oct 05 1998 John H Terpstra <jht@samba.org>
- Added rpcclient to binaries list
- Added smbwrapper stuff
-* Fri Aug 21 1998 John H Terpstra <jht@samba.anu.edu.au>
+* Fri Aug 21 1998 John H Terpstra <jht@samba.org>
- Updated for Samba version 2.0 building
-* Sat Jul 4 1998 John H Terpstra <jht@samba.anu.edu.au>
+* Tue Jul 07 1998 Erik Troan <ewt@redhat.com>
+ - updated postun triggerscript to check $0
+ - clear /etc/codepages from %preun instead of %postun
+
+* Sat Jul 04 1998 John H Terpstra <jht@samba.org>
- fixed codepage preservation during update via -Uvh
-* Sun Apr 26 1998 John H Terpstra <jht@samba.anu.edu.au>
+* Mon Jun 08 1998 Erik Troan <ewt@redhat.com>
+ - made the %postun script a tad less agressive; no reason to remove
+ the logs or lock file
+ - 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 <jht@samba.org>
- Tidy up for early alpha releases
- added findsmb from SGI packaging
-* Thu Apr 9 1998 John H Terpstra <jht@samba.anu.edu.au>
+* Thu Apr 09 1998 John H Terpstra <jht@samba.org>
- Updated spec file
- Included new codepage.936
* Sat Mar 20 1998 John H Terpstra <jht@samba.anu.edu/au>
- Added swat facility
-* Sat Jan 24 1998 John H Terpstra <jht@samba.anu.edu.au>
+* Sat Jan 24 1998 John H Terpstra <jht@samba.org>
- Many optimisations (some suggested by Manoj Kasichainula <manojk@io.com>
- Use of chkconfig in place of individual symlinks to /etc/rc.d/init/smb
- Compounded make line
%build
cd source
-./configure
+./configure --prefix=/usr --libdir=/etc --with-smbwrapper
make all smbwrapper
%install
done
# Install level 1 man pages
-for i in smbclient.1 smbrun.1 smbstatus.1 smbtar.1 testparm.1 testprns.1 make_smbcodepage.1
+for i in smbclient.1 smbrun.1 smbstatus.1 smbtar.1 testparm.1 testprns.1 make_smbcodepage.1 nmblookup.1
do
-install -m644 docs/$i $RPM_BUILD_ROOT/usr/man/man1
+install -m644 docs/manpages/$i $RPM_BUILD_ROOT/usr/man/man1
done
# Install codepage source files
done
# Install SWAT helper files
-for i in swat/help/*.html
+for i in swat/help/*.html docs/htmldocs/*.html
do
install -m644 $i $RPM_BUILD_ROOT/usr/share/swat/help
done
-for i in swat/images/*.{jpg,gif}
+for i in swat/images/*.gif
do
install -m644 $i $RPM_BUILD_ROOT/usr/share/swat/images
done
# Install the miscellany
install -m644 swat/README $RPM_BUILD_ROOT/usr/share/swat
-install -m644 docs/smb.conf.5 $RPM_BUILD_ROOT/usr/man/man5
-install -m644 docs/samba.7 $RPM_BUILD_ROOT/usr/man/man7
-install -m644 docs/smbd.8 $RPM_BUILD_ROOT/usr/man/man8
-install -m644 docs/nmbd.8 $RPM_BUILD_ROOT/usr/man/man8
-install -m644 docs/smbpasswd.8 $RPM_BUILD_ROOT/usr/man/man8
+install -m644 docs/manpages/smb.conf.5 $RPM_BUILD_ROOT/usr/man/man5
+install -m644 docs/manpages/lmhosts.5 $RPM_BUILD_ROOT/usr/man/man5
+install -m644 docs/manpages/smbpasswd.5 $RPM_BUILD_ROOT/usr/man/man5
+install -m644 docs/manpages/samba.7 $RPM_BUILD_ROOT/usr/man/man7
+install -m644 docs/manpages/smbd.8 $RPM_BUILD_ROOT/usr/man/man8
+install -m644 docs/manpages/nmbd.8 $RPM_BUILD_ROOT/usr/man/man8
+install -m644 docs/manpages/swat.8 $RPM_BUILD_ROOT/usr/man/man8
+install -m644 docs/manpages/smbpasswd.8 $RPM_BUILD_ROOT/usr/man/man8
install -m644 packaging/RedHat/smb.conf $RPM_BUILD_ROOT/etc/smb.conf
install -m644 packaging/RedHat/smbusers $RPM_BUILD_ROOT/etc/smbusers
install -m755 packaging/RedHat/smbprint $RPM_BUILD_ROOT/usr/bin
# Add swat entry to /etc/inetd.conf if needed
if !( grep ^[:space:]*swat /etc/inetd.conf > /dev/null ) then
echo 'swat stream tcp nowait.400 root /usr/sbin/swat swat' >> /etc/inetd.conf
-killall -1 inetd
+killall -1 inetd || :
fi
-
%preun
-/sbin/chkconfig --del smb
+if [ $1 = 0 ] ; then
+ /sbin/chkconfig --del smb
-%postun
-if [ -x /etc/pam.d/samba ]; then
- rm -f /etc/pam.d/samba
-fi
-if [ -e /etc/codepages ]; then
- rm -rf /etc/codepages
+ for n in /etc/codepages/*; do
+ if [ $n != /etc/codepages/src ]; then
+ rm -rf $n
+ fi
+ done
+ # We want to remove the browse.dat and wins.dat files so they can not interfer with a new version of samba!
+ if [ -e /var/lock/samba/browse.dat ]; then
+ rm -f /var/lock/samba/browse.dat
+ fi
+ if [ -e /var/lock/samba/wins.dat ]; then
+ rm -f /var/lock/samba/wins.dat
+ fi
fi
-if [ -e /var/log/samba ]; then
- rm -rf /var/log/samba
+
+%postun
+# Only delete remnants of samba if this is the final deletion.
+if [ $1 != 0 ] ; then
+ exit 0
+
+ if [ -x /etc/pam.d/samba ]; then
+ rm -f /etc/pam.d/samba
+ fi
+ if [ -e /var/log/samba ]; then
+ rm -rf /var/log/samba
+ fi
+ if [ -e /var/lock/samba ]; then
+ rm -rf /var/lock/samba
+ fi
+
+ # Remove swat entries from /etc/inetd.conf and /etc/services
+ cd /etc
+ tmpfile=/etc/tmp.$$
+ sed -e '/^[:space:]*swat.*$/d' /etc/inetd.conf > $tmpfile
+ mv $tmpfile inetd.conf
+ sed -e '/^[:space:]*swat.*$/d' /etc/services > $tmpfile
+ mv $tmpfile services
fi
-if [ -e /var/lock/samba ]; then
- rm -rf /var/lock/samba
+
+%triggerpostun -- samba < samba-2.0.0
+if [ $0 != 0 ]; then
+ /sbin/chkconfig --add smb
fi
-# Remove swat entries from /etc/inetd.conf and /etc/services
-cd /etc
-tmpfile=/etc/tmp.$$
-sed -e '/^[:space:]*swat.*$/d' /etc/inetd.conf > $tmpfile
-mv $tmpfile inetd.conf
-sed -e '/^[:space:]*swat.*$/d' /etc/services > $tmpfile
-mv $tmpfile services
+
%files
%doc README COPYING Manifest Read-Manifest-Now
%attr(-,root,root) /usr/sbin/smbd
%attr(-,root,root) /usr/sbin/nmbd
%attr(-,root,root) /usr/sbin/swat
-%attr(0755,root,root) /usr/sbin/samba
+%attr(0750,root,root) /usr/sbin/samba
%attr(-,root,root) /usr/bin/addtosmbpass
%attr(-,root,root) /usr/bin/mksmbpasswd.sh
%attr(-,root,root) /usr/bin/smbclient
%attr(-,root,root) /usr/bin/smbadduser
%attr(0755,root,root) /usr/bin/smbsh
%attr(0755,root,root) /usr/bin/smbwrapper.so
-%attr(-,root,root) /usr/share/swat/help/parameters.html
%attr(-,root,root) /usr/share/swat/help/welcome.html
-%attr(-,root,root) /usr/share/swat/images/background.jpg
-%attr(-,root,root) /usr/share/swat/images/background.gif
+%attr(-,root,root) /usr/share/swat/help/DOMAIN_MEMBER.html
+%attr(-,root,root) /usr/share/swat/help/lmhosts.5.html
+%attr(-,root,root) /usr/share/swat/help/make_smbcodepage.1.html
+%attr(-,root,root) /usr/share/swat/help/nmbd.8.html
+%attr(-,root,root) /usr/share/swat/help/nmblookup.1.html
+%attr(-,root,root) /usr/share/swat/help/samba.7.html
+%attr(-,root,root) /usr/share/swat/help/smb.conf.5.html
+%attr(-,root,root) /usr/share/swat/help/smbclient.1.html
+%attr(-,root,root) /usr/share/swat/help/smbd.8.html
+%attr(-,root,root) /usr/share/swat/help/smbpasswd.5.html
+%attr(-,root,root) /usr/share/swat/help/smbpasswd.8.html
+%attr(-,root,root) /usr/share/swat/help/smbrun.1.html
+%attr(-,root,root) /usr/share/swat/help/smbstatus.1.html
+%attr(-,root,root) /usr/share/swat/help/smbtar.1.html
+%attr(-,root,root) /usr/share/swat/help/swat.8.html
+%attr(-,root,root) /usr/share/swat/help/testparm.1.html
+%attr(-,root,root) /usr/share/swat/help/testprns.1.html
%attr(-,root,root) /usr/share/swat/images/globals.gif
%attr(-,root,root) /usr/share/swat/images/home.gif
+%attr(-,root,root) /usr/share/swat/images/passwd.gif
%attr(-,root,root) /usr/share/swat/images/printers.gif
%attr(-,root,root) /usr/share/swat/images/shares.gif
%attr(-,root,root) /usr/share/swat/images/samba.gif
%attr(-,root,root) /usr/man/man1/smbtar.1
%attr(-,root,root) /usr/man/man1/testparm.1
%attr(-,root,root) /usr/man/man1/testprns.1
+%attr(-,root,root) /usr/man/man1/nmblookup.1
%attr(-,root,root) /usr/man/man5/smb.conf.5
+%attr(-,root,root) /usr/man/man5/lmhosts.5
+%attr(-,root,root) /usr/man/man5/smbpasswd.5
%attr(-,root,root) /usr/man/man7/samba.7
%attr(-,root,root) /usr/man/man8/smbd.8
%attr(-,root,root) /usr/man/man8/nmbd.8
%attr(-,root,root) /usr/man/man8/smbpasswd.8
+%attr(-,root,root) /usr/man/man8/swat.8
%attr(-,root,nobody) %dir /home/samba
%attr(-,root,root) %dir /etc/codepages
%attr(-,root,root) %dir /etc/codepages/src
%attr(-,root,root) %dir /var/lock/samba
%attr(-,root,root) %dir /var/log/samba
-%attr(777,root,root) %dir /var/spool/samba
+%attr(1777,root,root) %dir /var/spool/samba