summaryrefslogtreecommitdiff
path: root/packaging
diff options
context:
space:
mode:
authorJohn Terpstra <jht@samba.org>1998-10-25 12:08:49 +0000
committerJohn Terpstra <jht@samba.org>1998-10-25 12:08:49 +0000
commit0ab38b4e602e7b0078f6b8c6af083b7c81f251d2 (patch)
treeca9896a7d5b23d4706486afead61ed82780bad70 /packaging
parentec73178649c03695a07c0c57292aa802e9ebd61a (diff)
downloadsamba-0ab38b4e602e7b0078f6b8c6af083b7c81f251d2.tar.gz
samba-0ab38b4e602e7b0078f6b8c6af083b7c81f251d2.tar.bz2
samba-0ab38b4e602e7b0078f6b8c6af083b7c81f251d2.zip
A little more tweaking and sqeaking. Now, will it work? Argh!
(This used to be commit d42b641acba95f45ad204e64e80e30d5d96490e8)
Diffstat (limited to 'packaging')
-rw-r--r--packaging/PHT/TurboLinux/samba2.spec.tmpl78
-rw-r--r--packaging/RedHat/samba2.spec.tmpl78
2 files changed, 114 insertions, 42 deletions
diff --git a/packaging/PHT/TurboLinux/samba2.spec.tmpl b/packaging/PHT/TurboLinux/samba2.spec.tmpl
index f6f1d0c762..64ef9a7f5d 100644
--- a/packaging/PHT/TurboLinux/samba2.spec.tmpl
+++ b/packaging/PHT/TurboLinux/samba2.spec.tmpl
@@ -9,6 +9,7 @@ Patch: makefile-path.patch
Patch1: smbw.patch
Packager: John H Terpstra [Samba-Team] <jht@samba.anu.edu.au>
Requires: pam >= 0.64
+Prereq: chkconfig fileutils
BuildRoot: /tmp/samba
%description
@@ -51,14 +52,26 @@ enabled. Red Hat Linux has built in support for quotas in PAM.
* Fri Aug 21 1998 John H Terpstra <jht@samba.anu.edu.au>
- 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.anu.edu.au>
- fixed codepage preservation during update via -Uvh
+* 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.anu.edu.au>
- 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.anu.edu.au>
- Updated spec file
- Included new codepage.936
@@ -185,30 +198,53 @@ if !( grep ^[:space:]*swat /etc/inetd.conf > /dev/null ) then
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
diff --git a/packaging/RedHat/samba2.spec.tmpl b/packaging/RedHat/samba2.spec.tmpl
index 53f955ed1c..a9370ae4ab 100644
--- a/packaging/RedHat/samba2.spec.tmpl
+++ b/packaging/RedHat/samba2.spec.tmpl
@@ -9,6 +9,7 @@ Patch: makefile-path.patch
Patch1: smbw.patch
Packager: John H Terpstra [Samba-Team] <jht@samba.anu.edu.au>
Requires: pam >= 0.64
+Prereq: chkconfig fileutils
BuildRoot: /tmp/samba
%description
@@ -51,14 +52,26 @@ enabled. Red Hat Linux has built in support for quotas in PAM.
* Fri Aug 21 1998 John H Terpstra <jht@samba.anu.edu.au>
- 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.anu.edu.au>
- fixed codepage preservation during update via -Uvh
+* 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.anu.edu.au>
- 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.anu.edu.au>
- Updated spec file
- Included new codepage.936
@@ -185,30 +198,53 @@ if !( grep ^[:space:]*swat /etc/inetd.conf > /dev/null ) then
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