[milter-regex/el6] Update to 1.9

Paul Howarth pghmcfc at fedoraproject.org
Mon Mar 2 20:21:44 UTC 2015


commit f2cae6d7d41b8062e7cf720af110163c9a83ac1c
Author: Paul Howarth <paul at city-fan.org>
Date:   Tue Nov 22 14:12:37 2011 +0000

    Update to 1.9
    
    - New upstream release 1.9
      - Add -j option to chroot
      - Improve building on various platforms
      - Fix some typos in documentation and example config
    - Drop upstreamed strlcat patch
    - Drop gcc patch, no longer needed
    - Build with additional warnings enabled, and add patch to fix warnings where
      possible (libmilter API is missing some 'const' attributes, so it's not
      possible to get rid of all of them)

 milter-regex-1.6-gcc.patch     | 21 ---------
 milter-regex-1.8-strlcat.patch | 96 ------------------------------------------
 milter-regex-1.9-cleanup.patch | 91 +++++++++++++++++++++++++++++++++++++++
 milter-regex.spec              | 28 ++++++------
 sources                        |  2 +-
 5 files changed, 108 insertions(+), 130 deletions(-)
---
diff --git a/milter-regex-1.9-cleanup.patch b/milter-regex-1.9-cleanup.patch
new file mode 100644
index 0000000..69a2138
--- /dev/null
+++ b/milter-regex-1.9-cleanup.patch
@@ -0,0 +1,91 @@
+--- a/eval.c
++++ b/eval.c
+@@ -43,7 +43,7 @@ static const char rcsid[] = "$Id: eval.c
+ #define REG_BASIC	0
+ #endif
+ 
+-extern int	 yyerror(char *, ...);
++extern int	 yyerror(const char *, ...);
+ extern void	 die(const char *);
+ static void	 mutex_lock(void);
+ static void	 mutex_unlock(void);
+--- a/milter-regex.c
++++ b/milter-regex.c
+@@ -135,6 +135,7 @@ struct {
+ 
+ #if __linux__ || __sun__
+ #define	ST_MTIME st_mtime
++extern size_t	 strlcat(char *, const char *, size_t);
+ extern size_t	 strlcpy(char *, const char *, size_t);
+ #else
+ #define	ST_MTIME st_mtimespec
+@@ -621,7 +622,10 @@ struct smfiDesc smfilter = {
+ 	cb_body,	/* body block */
+ 	cb_eom,		/* end of message */
+ 	NULL,		/* message aborted */
+-	cb_close	/* connection cleanup */
++	cb_close,	/* connection cleanup */
++	NULL,		/* unrecognized or unimplemented command filter */
++	NULL,		/* SMTP DATA command filter */
++	NULL		/* negotiation callback */
+ };
+ 
+ static void
+--- a/parse.y
++++ b/parse.y
+@@ -43,8 +43,8 @@ static const char rcsid[] = "$Id: parse.
+ 
+ #include "eval.h"
+ 
+-int			 yyerror(char *, ...);
+-static int		 yyparse(void);
++int			 yyerror(const char *, ...);
++extern int		 yyparse(void);
+ static int		 define_macro(const char *, struct expr *);
+ static struct expr	*find_macro(const char *);
+ 
+@@ -254,7 +254,7 @@ term	: CONNECT STRING STRING	{
+ %%
+ 
+ int
+-yyerror(char *fmt, ...)
++yyerror(const char *fmt, ...)
+ {
+ 	va_list ap;
+ 	errors = 1;
+@@ -359,7 +359,7 @@ top:
+ 
+ 		while ((c = lgetc(fin)) != EOF && c != del) {
+ 			*p++ = c;
+-			if (p - buf >= sizeof(buf) - 1) {
++			if ((size_t)(p - buf) >= sizeof(buf) - 1) {
+ 				yyerror("yylex: message too long");
+ 				return (ERROR);
+ 			}
+@@ -379,7 +379,7 @@ top:
+ 
+ 		do {
+ 			*p++ = c;
+-			if (p - buf >= sizeof(buf)) {
++			if ((size_t)(p - buf) >= sizeof(buf)) {
+ 				yyerror("yylex: token too long");
+ 				return (ERROR);
+ 			}
+@@ -406,7 +406,7 @@ top:
+ 		*p++ = del;
+ 		while ((c = lgetc(fin)) != EOF && c != '\n' && c != del) {
+ 			*p++ = c;
+-			if (p - buf >= sizeof(buf) - 1) {
++			if ((size_t)(p - buf) >= sizeof(buf) - 1) {
+ 				yyerror("yylex: argument too long");
+ 				return (ERROR);
+ 			}
+@@ -415,7 +415,7 @@ top:
+ 			*p++ = del;
+ 			while ((c = lgetc(fin)) != EOF && isalpha(c)) {
+ 				*p++ = c;
+-				if (p - buf >= sizeof(buf)) {
++				if ((size_t)(p - buf) >= sizeof(buf)) {
+ 					yyerror("yylex: argument too long");
+ 					return (ERROR);
+ 				}
diff --git a/milter-regex.spec b/milter-regex.spec
index c667810..356da22 100644
--- a/milter-regex.spec
+++ b/milter-regex.spec
@@ -1,6 +1,6 @@
 Name:		milter-regex
-Version:	1.8
-Release:	3%{?dist}
+Version:	1.9
+Release:	1%{?dist}
 Summary:	Milter plug-in for regular expression filtering
 Group:		System Environment/Daemons
 License:	BSD
@@ -9,22 +9,16 @@ Source0:	http://www.benzedrine.cx/milter-regex-%{version}.tar.gz
 Source1:	milter-regex-initscript
 Source2:	milter-regex-options
 Source3:	milter-regex.conf
-Patch0:		milter-regex-1.6-gcc.patch
-Patch1:		milter-regex-1.8-strlcat.patch
+Patch0:		milter-regex-1.9-cleanup.patch
 BuildRequires:	sendmail-devel >= 8.13, byacc, groff
 
-Requires(pre):	  shadow-utils
-Requires(post):	  /sbin/chkconfig
-Requires(preun):  /sbin/chkconfig
-
 %description
 Milter-regex is a milter based filter that makes it possible to filter
 emails using regular expressions.
 
 %prep
 %setup -q
-%patch0 -p1 -b .gcc
-%patch1 -p0 -b .strlcat
+%patch0 -p1 -b .cleanup
 
 # Customize config file location and dæmon user
 sed -i -e	's|/etc/milter-regex\.conf|%{_sysconfdir}/mail/milter-regex.conf|;
@@ -34,10 +28,9 @@ sed -i -e	's|/etc/milter-regex\.conf|%{_sysconfdir}/mail/milter-regex.conf|;
 head -n +31 milter-regex.c > LICENSE
 
 %build
-make %{?_smp_mflags} -f Makefile.linux CFLAGS="%{optflags} -DYYMAXDEPTH=8192"
+make %{?_smp_mflags} -f Makefile.linux CFLAGS="%{optflags} -Wextra -Wwrite-strings -DYYMAXDEPTH=8192"
 
 %install
-rm -rf %{buildroot}
 mkdir -p \
 	%{buildroot}%{_initddir} \
 	%{buildroot}%{_localstatedir}/spool/milter-regex \
@@ -83,6 +76,17 @@ fi
 %{_mandir}/man8/milter-regex.8*
 
 %changelog
+* Mon Mar  2 2015 Paul Howarth <paul at city-fan.org> - 1.9-1
+- update to 1.9
+  - add -j option to chroot
+  - improve building on various platforms
+  - fix some typos in documentation and example config
+- drop upstreamed strlcat patch
+- drop gcc patch, no longer needed
+- build with additional warnings enabled, and add patch to fix warnings where
+  possible (libmilter API is missing some 'const' attributes, so it's not
+  possible to get rid of all of them)
+
 * Mon Mar  2 2015 Paul Howarth <paul at city-fan.org> - 1.8-3
 - clean up for modern rpmbuild
 - drop Sendmail references as the milter should work with Postfix too
diff --git a/sources b/sources
index 0f38c0d..4b7cbb0 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-cd3a6753a7cebc74630136cd52503dad  milter-regex-1.8.tar.gz
+65471e363669b237e280d53dc914ac2a  milter-regex-1.9.tar.gz


More information about the scm-commits mailing list