[milter-regex] Update to 1.9
Paul Howarth
pghmcfc at fedoraproject.org
Tue Nov 22 23:20:11 UTC 2011
commit 06e076cf47911f44c50a1e6ce8fbadde9fc6188f
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)
.gitignore | 2 +-
milter-regex-1.6-gcc.patch | 21 ---------
milter-regex-1.8-strlcat.patch | 96 ----------------------------------------
milter-regex-1.9-cleanup.patch | 89 +++++++++++++++++++++++++++++++++++++
milter-regex.spec | 23 +++++++---
sources | 2 +-
6 files changed, 107 insertions(+), 126 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 27f5542..667041c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1 @@
-milter-regex-1.8.tar.gz
+/milter-regex-[0-9.]*.tar.gz
diff --git a/milter-regex-1.9-cleanup.patch b/milter-regex-1.9-cleanup.patch
new file mode 100644
index 0000000..c2a574a
--- /dev/null
+++ b/milter-regex-1.9-cleanup.patch
@@ -0,0 +1,89 @@
+--- milter-regex-1.9/eval.c
++++ milter-regex-1.9/eval.c
+@@ -43,7 +43,7 @@
+ #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);
+--- milter-regex-1.9/milter-regex.c
++++ milter-regex-1.9/milter-regex.c
+@@ -135,6 +135,7 @@
+
+ #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 @@
+ 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
+--- milter-regex-1.9/parse.y
++++ milter-regex-1.9/parse.y
+@@ -43,7 +43,7 @@
+
+ #include "eval.h"
+
+-int yyerror(char *, ...);
++int yyerror(const char *, ...);
+ static int yyparse(void);
+ static int define_macro(const char *, struct expr *);
+ static struct expr *find_macro(const char *);
+@@ -254,7 +254,7 @@
+ %%
+
+ int
+-yyerror(char *fmt, ...)
++yyerror(const char *fmt, ...)
+ {
+ va_list ap;
+ errors = 1;
+@@ -359,7 +359,7 @@
+
+ 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 @@
+
+ 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 @@
+ *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 @@
+ *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 c29c508..e096122 100644
--- a/milter-regex.spec
+++ b/milter-regex.spec
@@ -1,6 +1,6 @@
Name: milter-regex
-Version: 1.8
-Release: 4%{?dist}
+Version: 1.9
+Release: 1%{?dist}
Summary: Milter plug-in for regular expression filtering
Group: System Environment/Daemons
License: BSD
@@ -9,8 +9,7 @@ Source0: http://www.benzedrine.cx/milter-regex-%{version}.tar.gz
Source1: milter-regex.service
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
BuildRequires: systemd-units
@@ -31,14 +30,13 @@ emails using regular expressions.
%prep
%setup -q
-%patch0 -p1 -b .gcc
-%patch1 -p0 -b .strlcat
+%patch0 -p1 -b .cleanup
sed -i -e 's|/etc/milter-regex\.conf|%{_sysconfdir}/mail/milter-regex.conf|;
s|_milter-regex|mregex|' milter-regex.[8c]
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
mkdir -p \
@@ -103,6 +101,17 @@ fi
%{_mandir}/man8/milter-regex.8*
%changelog
+* Tue Nov 22 2011 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 Jul 25 2011 Paul Howarth <paul at city-fan.org> - 1.8-4
- Requires(post): systemd-sysv for sysv-to-systemd migration
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