rpms/spamass-milter/EL-4 spamass-milter-0.3.1-pathnames.patch, NONE, 1.1 spamass-milter.sysconfig, NONE, 1.1 spamass-milter.sysv, NONE, 1.1 spamass-milter.spec, 1.8, 1.9

Paul Howarth (pghmcfc) fedora-extras-commits at redhat.com
Fri Oct 12 12:26:53 UTC 2007


Author: pghmcfc

Update of /cvs/pkgs/rpms/spamass-milter/EL-4
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv965

Modified Files:
	spamass-milter.spec 
Added Files:
	spamass-milter-0.3.1-pathnames.patch spamass-milter.sysconfig 
	spamass-milter.sysv 
Log Message:
Sync with devel for initial EPEL build

spamass-milter-0.3.1-pathnames.patch:

--- NEW FILE spamass-milter-0.3.1-pathnames.patch ---
--- spamass-milter-0.3.1/README	2007-08-02 15:27:55.000000000 +0100
+++ spamass-milter-0.3.1/README	2007-08-02 15:31:29.000000000 +0100
@@ -42,7 +42,7 @@
 you want to use. YOU WILL MOST LIKELY HAVE TO EDIT THE VARIABLES ON
 TOP OF THIS FILE.
 
-Then start the daemon via /etc/init.d/spamass-milter start and make
+Then start the daemon via %{_initrddir}/spamass-milter start and make
 sure it didn't crash/terminate immediately. If it does, there should
 usually be syslog output. 
 
@@ -54,7 +54,7 @@
 configuring sendmail through m4 & the sendmail.mc files. In this case
 adding the lines
 
-INPUT_MAIL_FILTER(`spamassassin', `S=local:/var/run/sendmail/spamass.sock, F=, T=C:15m;S:4m;R:4m;E:10m')dnl
+INPUT_MAIL_FILTER(`spamassassin', `S=unix:%{_localstatedir}/run/spamass-milter/spamass-milter.sock, F=, T=C:15m;S:4m;R:4m;E:10m')dnl
 define(`confMILTER_MACROS_CONNECT',`t, b, j, _, {daemon_name}, {if_name}, {if_addr}')dnl
 define(`confMILTER_MACROS_HELO',`s, {tls_version}, {cipher}, {cipher_bits}, {cert_subject}, {cert_issuer}')dnl
 


--- NEW FILE spamass-milter.sysconfig ---
### Override for your different local config
#SOCKET=%{_localstatedir}/run/spamass-milter/spamass-milter.sock

### Standard parameters for spamass-milter are:
### -P %{_localstatedir}/run/spamass-milter.pid (PID file)
###
### Note that the -f parameter for running the milter in the background
### is not required because the milter runs in a wrapper script that
### backgrounds itself
###
### You may add another parameters here, see spamass-milter(1)
#EXTRA_FLAGS="-m -r 15"


--- NEW FILE spamass-milter.sysv ---
#!/bin/bash
#
# Init file for SpamAssassin sendmail milter.
#
# chkconfig: - 79 21
# description: spamass-milter is a daemon that hooks into sendmail and \
#              routes email messages to spamassassin
#
# processname: spamass-milter
# config: %{_sysconfdir}/sysconfig/spamass-milter
# pidfile: %{_localstatedir}/run/spamass-milter.pid

### BEGIN INIT INFO
# Provides: spamass-milter
# Required-Start: $local_fs $network $syslog $named
# Required-Stop: $local_fs $network $syslog $named
# Should-Start: spamd spamassassin
# Should-Stop: spamd spamassassin
# Short-Description: Start or stop SpamAssassin Milter
# Description: Spamass-milter is an add-on to sendmail that can route mail \
#       messages through SpamAssassin and mark or reject mail deemed \
#       to be spam
### END INIT INFO

# Default variables
PATH=/sbin:/bin:/usr/sbin:/usr/bin
SOCKET="%{_localstatedir}/run/spamass-milter/spamass-milter.sock"
EXTRA_FLAGS=""
SYSCONFIG="%{_sysconfdir}/sysconfig/spamass-milter"

# Read configuration
source %{_initrddir}/functions
source %{_sysconfdir}/sysconfig/network
[ -r "${SYSCONFIG}" ] && source "${SYSCONFIG}"

[ -x %{_sbindir}/spamass-milter ] || exit 5

RETVAL=0
prog="spamass-milter"
desc="SpamAssassin milter"
pidfile=%{_localstatedir}/run/spamass-milter.pid

start() {
	echo -n $"Starting ${desc} (${prog}): "
	touch ${pidfile}
	chown sa-milt:sa-milt ${pidfile}
	daemon --user sa-milt %{_sbindir}/${prog}-wrapper -p ${SOCKET} -P ${pidfile} ${EXTRA_FLAGS}
	RETVAL=$?
	echo
	if [ ${RETVAL} -eq 0 ]; then
		touch %{_localstatedir}/lock/subsys/spamass-milter
		return 0
	else
		return 1
	fi
}

stop() {
	echo -n $"Shutting down ${desc} (${prog}): "
	rm -f %{_localstatedir}/lock/subsys/spamass-milter
	killproc ${prog}
	RETVAL=$?
	echo
	if [ ${RETVAL} -eq 0 ]; then
		rm -f ${pidfile}
		return 0
	else
		return 1
	fi
}

case "$1" in
	start)
		start
		;;
	stop)
		stop
		;;
	restart|force-reload)
		if [ "x`pidof spamass-milter`" != x ]; then
			stop
			sleep 2
		fi
		start
		;;
	condrestart|try-restart)
		if [ -e %{_localstatedir}/lock/subsys/spamass-milter ]; then
			stop
			sleep 2
			start
		else
			exit 0
		fi
		;;
	status)
		status ${prog}
		;;
	*)
		echo $"Usage: $0 {start|stop|restart|try-restart|force-reload|status}"
		exit 2
esac


Index: spamass-milter.spec
===================================================================
RCS file: /cvs/pkgs/rpms/spamass-milter/EL-4/spamass-milter.spec,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- spamass-milter.spec	15 May 2006 09:42:40 -0000	1.8
+++ spamass-milter.spec	12 Oct 2007 12:26:16 -0000	1.9
@@ -1,19 +1,20 @@
-Summary:        Sendmail milter for spamassassin
-Name:           spamass-milter
-Version:        0.3.1
-Release:        3%{?dist}
-License:        GPL
-Group:          System Environment/Daemons
-URL:            http://savannah.nongnu.org/projects/spamass-milt/
-
-Source0:        http://savannah.nongnu.org/download/spamass-milt/spamass-milter-%{version}.tar.gz
-Source1:        spamass-milter-wrapper
-BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+Summary:	Sendmail milter for spamassassin
+Name:		spamass-milter
+Version:	0.3.1
+Release:	5%{?dist}
+License:	GPLv2+
+Group:		System Environment/Daemons
+URL:		http://savannah.nongnu.org/projects/spamass-milt/
+Source0:	http://savannah.nongnu.org/download/spamass-milt/spamass-milter-%{version}.tar.gz
+Source1:	spamass-milter-wrapper
+Source2:	spamass-milter.sysv
+Source3:	spamass-milter.sysconfig
+Patch0:		spamass-milter-0.3.1-pathnames.patch
+BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+BuildRequires:	spamassassin, sendmail-devel
+Requires:	spamassassin, sendmail
 
-BuildRequires:  spamassassin, sendmail-devel
-Requires:       spamassassin, sendmail
-
-Requires(pre):  /usr/sbin/useradd
+Requires(pre): shadow-utils
 Requires(post): /sbin/chkconfig
 Requires(post): /sbin/service
 Requires(preun): /sbin/chkconfig
@@ -21,116 +22,19 @@
 Requires(postun): /sbin/service
 
 %description
-A Sendmail milter (Mail Filter) library that pipes all incoming mail
-(including things received by rmail/UUCP) through the SpamAssassin,
-a highly customizable spam filter.
+A Sendmail milter (Mail Filter) application that pipes incoming mail
+(including things received by rmail/UUCP) through SpamAssassin, a highly
+customizable spam filter.
 
 %prep
 %setup -q
-%{__cp} %{SOURCE1} .
-%{__sed} -i -e 's at local:/var/run/sendmail/spamass.sock at unix:%{_localstatedir}/run/spamass-milter/spamass-milter.sock@' README
-
-%{__cat} <<EOF >spamass-milter.sysconfig
-### Override for your different local config
-#SOCKET=%{_localstatedir}/run/spamass-milter/spamass-milter.sock
-
-### Standard parameters for spamass-milter are:
-### -P %{_localstatedir}/run/spamass-milter.pid (PID file)
-###
-### Note that the -f parameter for running the milter in the background
-### is not required because the milter runs in a wrapper script that
-### backgrounds itself
-###
-### You may add another parameters here, see spamass-milter(1)
-#EXTRA_FLAGS="-m -r 15"
-EOF
-
-%{__cat} <<'EOF' >spamass-milter.sysv
-#!/bin/bash
-#
-# Init file for Spamassassin sendmail milter.
-#
-# chkconfig: - 79 21
-# description: spamass-milter is a daemon that hooks into sendmail and \
-#              routes email messages to spamassassin
-#
-# processname: spamass-milter
-# config: %{_sysconfdir}/sysconfig/spamass-milter
-# pidfile: %{_localstatedir}/run/spamass-milter.pid
-
-source %{_initrddir}/functions
-source %{_sysconfdir}/sysconfig/network
-
-# Check that networking is up.
-[ ${NETWORKING} = "no" ] && exit 0
-
-[ -x %{_sbindir}/spamass-milter ] || exit 1
-
-### Default variables
-SOCKET="%{_localstatedir}/run/spamass-milter/spamass-milter.sock"
-EXTRA_FLAGS=""
-SYSCONFIG="%{_sysconfdir}/sysconfig/spamass-milter"
-
-### Read configuration
-[ -r "$SYSCONFIG" ] && source "$SYSCONFIG"
-
-RETVAL=0
-prog="spamass-milter"
-desc="SpamAssassin milter"
-pidfile=%{_localstatedir}/run/spamass-milter.pid
-
-start() {
-	echo -n $"Starting $desc ($prog): "
-	touch $pidfile
-	chown sa-milt:sa-milt $pidfile
-	daemon --user sa-milt %{_sbindir}/${prog}-wrapper -p $SOCKET -P $pidfile $EXTRA_FLAGS
-	RETVAL=$?
-	echo
-	[ $RETVAL -eq 0 ] && touch %{_localstatedir}/lock/subsys/spamass-milter
-	return $RETVAL
-}
-
-stop() {
-	echo -n $"Shutting down $desc ($prog): "
-	rm -f %{_localstatedir}/lock/subsys/spamass-milter
-	killproc $prog
-	RETVAL=$?
-	echo
-	[ $RETVAL -eq 0 ] && rm -f $pidfile
-	return $RETVAL
-}
-
-restart() {
-	stop
-	sleep 2
-	start
-}
-
-case "$1" in
-  start)
-	start
-	;;
-  stop)
-	stop
-	;;
-  restart|reload)
-	restart
-	;;
-  condrestart)
-	[ -e %{_localstatedir}/lock/subsys/spamass-milter ] && restart
-	RETVAL=$?
-	;;
-  status)
-	status $prog
-	RETVAL=$?
-	;;
-  *)
-	echo $"Usage: $0 {start|stop|restart|condrestart|status}"
-	RETVAL=1
-esac
-
-exit $RETVAL
-EOF
+%patch0 -p1 -b .pathnames
+%{__cp} -p %{SOURCE1} %{SOURCE2} %{SOURCE3} .
+%{__sed} -i -e 's|%%{_localstatedir}|%{_localstatedir}|g;
+		s|%%{_initrddir}|%{_initrddir}|g;
+		s|%%{_sysconfdir}|%{_sysconfdir}|g;
+		s|%%{_sbindir}|%{_sbindir}|g;' \
+	spamass-milter.{sysv,sysconfig} README
 
 %build
 export SENDMAIL=/usr/sbin/sendmail
@@ -139,24 +43,27 @@
 
 %install
 %{__rm} -rf %{buildroot}
-%makeinstall
+%{__make} DESTDIR=%{buildroot} install
 
-%{__install} -D -m0755 spamass-milter.sysv %{buildroot}%{_initrddir}/spamass-milter
-%{__install} -D -m0644 spamass-milter.sysconfig %{buildroot}%{_sysconfdir}/sysconfig/spamass-milter
-%{__install} -d -m0700 %{buildroot}%{_localstatedir}/run/spamass-milter
-%{__install}    -m0755 spamass-milter-wrapper %{buildroot}%{_sbindir}/spamass-milter-wrapper
+%{__install} -m 755 -D spamass-milter.sysv %{buildroot}%{_initrddir}/spamass-milter
+%{__install} -m 644 -D spamass-milter.sysconfig %{buildroot}%{_sysconfdir}/sysconfig/spamass-milter
+%{__install} -m 700 -d %{buildroot}%{_localstatedir}/run/spamass-milter
+%{__install} -m 755 spamass-milter-wrapper %{buildroot}%{_sbindir}/spamass-milter-wrapper
 
 %pre
-/usr/sbin/useradd -r -s /sbin/nologin -d %{_localstatedir}/run/spamass-milter \
-	-c "SpamAssassin Milter" sa-milt &>/dev/null || :
+/usr/bin/getent group sa-milt >/dev/null || /usr/sbin/groupadd -r sa-milt
+/usr/bin/getent passwd sa-milt >/dev/null || \
+	/usr/sbin/useradd -r -g sa-milt -d %{_localstatedir}/run/spamass-milter \
+		-s /sbin/nologin -c "SpamAssassin Milter" sa-milt
+exit 0
 
 %post
 /sbin/chkconfig --add spamass-milter || :
 
 %preun
 if [ $1 -eq 0 ]; then
-    /sbin/service spamass-milter stop &>/dev/null || :
-    /sbin/chkconfig --del spamass-milter || :
+	/sbin/service spamass-milter stop &>/dev/null || :
+	/sbin/chkconfig --del spamass-milter || :
 fi
 
 %postun
@@ -166,64 +73,75 @@
 %{__rm} -rf %{buildroot}
 
 %files
-%defattr(-, root, root, 0755)
+%defattr(-,root,root,-)
 %doc AUTHORS ChangeLog NEWS README
 %{_mandir}/man1/spamass-milter.1*
 %config(noreplace) %{_sysconfdir}/sysconfig/spamass-milter
 %{_initrddir}/spamass-milter
 %{_sbindir}/spamass-milter
 %{_sbindir}/spamass-milter-wrapper
-%dir %attr(-,sa-milt,sa-milt) %{_localstatedir}/run/spamass-milter
+%dir %attr(-,sa-milt,sa-milt) %{_localstatedir}/run/spamass-milter/
 
 %changelog
-* Mon May 15 2006 Paul Howarth <paul at city-fan.org> - 0.3.1-3
+* Fri Oct 12 2007 Paul Howarth <paul at city-fan.org> 0.3.1-5
+- Split initscript and config out from being here documents in the spec and
+  have them as separate source files instead
+- Unexpand tabs
+- Clarify license as GPL v2 or later (GPLv2+)
+- Use the standard scriptlet for user/group creation in %%pre
+
+* Wed Aug 30 2006 Paul Howarth <paul at city-fan.org> 0.3.1-4
+- Use make/DESTDIR instead of deprecated %%makeinstall macro
+- Expand tabs and clean up changelog entries
+
+* Mon May 15 2006 Paul Howarth <paul at city-fan.org> 0.3.1-3
 - Use upstream default settings (#191602)
   This change re-enables by default Subject/Content-Type header modification
   (which may have a performance impact for large messages) and disables by
   default the rejection of emails with a spam score of 15 or more. To re-enable
   these options, uncomment the line:
   EXTRA_FLAGS="-m -r 15"
-  in %{_sysconfdir}/sysconfig/spamass-milter
+  in %%{_sysconfdir}/sysconfig/spamass-milter
   
-* Sun May  7 2006 Paul Howarth <paul at city-fan.org> - 0.3.1-2
+* Sun May  7 2006 Paul Howarth <paul at city-fan.org> 0.3.1-2
 - Fix race condition in "stop" clause of initscript (#190894)
 
-* Thu Apr  6 2006 Paul Howarth <paul at city-fan.org> - 0.3.1-1
+* Thu Apr  6 2006 Paul Howarth <paul at city-fan.org> 0.3.1-1
 - Update to 0.3.1
 
-* Wed Feb 16 2006 Paul Howarth <paul at city-fan.org> - 0.3.0-9
+* Wed Feb 16 2006 Paul Howarth <paul at city-fan.org> 0.3.0-9
 - Don't use macros in command paths, hardcode them instead
 
-* Mon Aug  1 2005 Paul Howarth <paul at city-fan.org> - 0.3.0-8
-- Run the milter in a wrapper script that restarts it if it scrashes
+* Mon Aug  1 2005 Paul Howarth <paul at city-fan.org> 0.3.0-8
+- Run the milter in a wrapper script that restarts it if it crashes
 
-* Thu Jun 16 2005 Paul Howarth <paul at city-fan.org> - 0.3.0-7
+* Thu Jun 16 2005 Paul Howarth <paul at city-fan.org> 0.3.0-7
 - Bump and rebuild due to transient build system failure
 
-* Wed Jun 15 2005 Paul Howarth <paul at city-fan.org> - 0.3.0-6
+* Wed Jun 15 2005 Paul Howarth <paul at city-fan.org> 0.3.0-6
 - Adjust initscript chkconfig values so it starts before sendmail
 
-* Mon Jun 13 2005 Paul Howarth <paul at city-fan.org> - 0.3.0-5
+* Mon Jun 13 2005 Paul Howarth <paul at city-fan.org> 0.3.0-5
 - Help the configure script find sendmail
 
-* Mon Jun 13 2005 Paul Howarth <paul at city-fan.org> - 0.3.0-4
+* Mon Jun 13 2005 Paul Howarth <paul at city-fan.org> 0.3.0-4
 - Bump and rebuild
 
-* Mon Jun 06 2005 Paul Howarth <paul at city-fan.org> - 0.3.0-3
+* Mon Jun 06 2005 Paul Howarth <paul at city-fan.org> 0.3.0-3
 - Use Extras standard buildroot
 - Unpack tarball quietly
 - Create account sa-milt and run the milter using that instead of root
 - Fix socket name in README
 - Initscript not %%config
 
-* Sun Jun 05 2005 Warren Togami <wtogami at redhat.com> - 0.3.0-2
+* Sun Jun 05 2005 Warren Togami <wtogami at redhat.com> 0.3.0-2
 - Extras
 
-* Tue Feb 08 2005 Dag Wieers <dag at wieers.com> - 0.3.0-1
+* Tue Feb 08 2005 Dag Wieers <dag at wieers.com> 0.3.0-1
 - Updated to release 0.3.0.
 
-* Wed Sep 01 2004 Dag Wieers <dag at wieers.com> - 0.2.0-1
+* Wed Sep 01 2004 Dag Wieers <dag at wieers.com> 0.2.0-1
 - Fixed variables in sysconfig file. (mator)
 
-* Tue Feb 17 2004 Dag Wieers <dag at wieers.com> - 0.2.0-0
+* Tue Feb 17 2004 Dag Wieers <dag at wieers.com> 0.2.0-0
 - Initial package. (using DAR)




More information about the fedora-extras-commits mailing list