]> git.ipfire.org Git - people/ms/dma.git/commitdiff
Update to 2010.06.17, part I: adapt the patches.
authorPeter Pentchev <roam@ringlet.net>
Fri, 18 Jun 2010 14:00:27 +0000 (14:00 +0000)
committerPeter Pentchev <roam@ringlet.net>
Fri, 18 Jun 2010 14:00:27 +0000 (14:00 +0000)
12 files changed:
changelog
patches/01-debian-build.patch
patches/03-debian-locations.patch
patches/04-debian-setgid.patch [deleted file]
patches/10-liblockfile.patch
patches/11-double-bounce.patch
patches/17-mailname.patch
patches/24-random-message-id.patch
patches/25-unsupported-starttls.patch
patches/26-getprogname.patch [deleted file]
patches/30-empty-sender.patch [deleted file]
patches/series

index d587e896755522679d2ab8affee1338361f22708..94bc61ec09eb755aedaf296791bfd4a3edde1c2b 100644 (file)
--- a/changelog
+++ b/changelog
@@ -1,4 +1,4 @@
-dma (0.0.2009.08.29-1) UNRELEASED; urgency=low
+dma (0.0.2010.07.16-1) UNRELEASED; urgency=low
 
   * New upstream version:
     - remove the 20-parse-recipient patch, implemented upstream in
index 2bfa800985c24b0258250160a4496c96e8a0f819..e91ee848baf231a575e32f6f891b7eddf66c98b8 100644 (file)
@@ -1,69 +1,18 @@
 Description: Several fixes to make dma build on Debian.
- - build and install the files in the etc/ subdirectory;
- - generate aliases_parse.h and let the others depend on it;
- - define the __DECONST macro;
  - use mtime instead of mtimespec.
 Origin: other: http://svn.ringlet.net/svn/ringlet/mail/dma/
 Forwarded: not-needed
 Author: Peter Pentchev <roam@ringlet.net>
-Last-Update: 2010-06-02
+Last-Update: 2010-06-18
 
---- a/Makefile
-+++ b/Makefile
-@@ -1,6 +1,8 @@
- # $DragonFly: src/libexec/dma/Makefile,v 1.5 2008/09/19 00:36:57 corecode Exp $
- #
-+SUBDIR=       etc
-+
- CFLAGS+= -I${.CURDIR}
- DPADD=  ${LIBSSL} ${LIBCRYPTO}
-@@ -16,4 +18,23 @@
- BINMODE=2555
- WARNS?=       6
-+# The pmake Debian package does not seem to deal properly with y.tab.h
-+
-+DPSRCS+=      aliases_parse.h
-+CLEANFILES+=  aliases_parse.h
-+
-+YFLAGS+=      -d
-+
-+aliases_parse.c:      aliases_parse.y
-+      ${YACC} ${YFLAGS} aliases_parse.y
-+      mv y.tab.c aliases_parse.c
-+
-+aliases_parse.h:      aliases_parse.c
-+      mv y.tab.h aliases_parse.h
-+
-+aliases_parse.o:      aliases_parse.h
-+aliases_scan.o:       aliases_parse.h
-+
- .include <bsd.prog.mk>
-+
-+.include <bsd.subdir.mk>
 --- a/dma.c
 +++ b/dma.c
-@@ -276,7 +276,7 @@
+@@ -295,7 +295,7 @@
                        exit(1);
                }
                if (gettimeofday(&now, NULL) == 0 &&
--                  (now.tv_sec - st.st_mtimespec.tv_sec > MAX_TIMEOUT)) {
+-                  (now.tv_sec - st.st_mtim.tv_sec > MAX_TIMEOUT)) {
 +                  (now.tv_sec - st.st_mtime > MAX_TIMEOUT)) {
                        asprintf(__DECONST(void *, &errmsg),
                                 "Could not deliver for the last %d seconds. Giving up.",
                                 MAX_TIMEOUT);
---- a/dma.h
-+++ b/dma.h
-@@ -48,6 +48,10 @@
- #endif  /* __GNUC__ */
- #endif
-+#ifndef __DECONST
-+#define       __DECONST(type, var)    ((type)(uintptr_t)(const void *)(var))
-+#endif  /* __DECONST */
-+
- #define VERSION       "DragonFly Mail Agent"
- #define BUF_SIZE      2048
index 41243992f37efdd1aae40b6183d3f6942f0bb580..4041cd21eb088cf9d726bf4aab7352335a8a6f70 100644 (file)
@@ -5,7 +5,7 @@ Description: Customize the /etc/dma configuration files for Debian.
 Origin: other: http://svn.ringlet.net/svn/ringlet/mail/dma/
 Forwarded: not-needed
 Author: Peter Pentchev <roam@ringlet.net>
-Last-Update: 2010-06-02
+Last-Update: 2010-06-18
 
 --- a/dma.8
 +++ b/dma.8
@@ -27,8 +27,8 @@ Last-Update: 2010-06-02
  .Xc
  Path to the local aliases file.
  Just stick with the default.
---- a/etc/dma.conf
-+++ b/etc/dma.conf
+--- a/dma.conf
++++ b/dma.conf
 @@ -2,13 +2,15 @@
  #
  # Your smarthost (also called relayhost).  Leave blank if you don't want
@@ -36,17 +36,17 @@ Last-Update: 2010-06-02
 -#SMARTHOST
 +# NOTE: on Debian systems this is handled via debconf!
 +# Please use dpkg-reconfigure dma to change this value.
-+SMARTHOST mail.example.com
++#SMARTHOST mail.example.com
  
  # Use this SMTP port.  Most users will be fine with the default (25)
- PORT 25
#PORT 25
  
  # Path to your alias file.  Just stay with the default.
--ALIASES /etc/mail/aliases
-+ALIASES /etc/aliases
+-#ALIASES /etc/mail/aliases
++#ALIASES /etc/aliases
  
  # Path to your spooldir.  Just stay with the default.
- SPOOLDIR /var/spool/dma
#SPOOLDIR /var/spool/dma
 @@ -39,7 +41,7 @@
  
  # Uncomment if you want to defer your mails.  This is useful if you are
@@ -56,3 +56,20 @@ Last-Update: 2010-06-02
  
  # Uncomment if you want the bounce message to include the complete original
  # message, not just the headers.
+--- a/dma.c
++++ b/dma.c
+@@ -70,12 +70,12 @@
+ struct config config = {
+       .smarthost      = NULL,
+       .port           = 25,
+-      .aliases        = "/var/mail/aliases",
++      .aliases        = "/etc/aliases",
+       .spooldir       = "/var/spool/dma",
+       .virtualpath    = NULL,
+       .authpath       = NULL,
+       .certfile       = NULL,
+-      .features       = 0,
++      .features       = DEFER,
+       .mailname       = NULL,
+       .mailnamefile   = NULL,
+ };
diff --git a/patches/04-debian-setgid.patch b/patches/04-debian-setgid.patch
deleted file mode 100644 (file)
index a8ea18d..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-Description: Install the dma binary with the correct permissions.
- As per the Debian Policy, change the /usr/sbin/dma permissions from 2555
- to 2755, since removing root write access gains us nothing.
- Also, install the etc/ files with the correct owner and group; it seems
- that Debian pmake's bsd.files.mk does not understand SHAREOWN and SHAREGRP.
-Origin: other: http://svn.ringlet.net/svn/ringlet/mail/dma/
-Forwarded: not-needed
-Author: Peter Pentchev <roam@ringlet.net>
-Last-Update: 2010-06-02
-
---- a/Makefile
-+++ b/Makefile
-@@ -15,7 +15,7 @@
- BINOWN= root
- BINGRP= mail
--BINMODE=2555
-+BINMODE=2755
- WARNS?=       6
- # The pmake Debian package does not seem to deal properly with y.tab.h
---- a/etc/Makefile
-+++ b/etc/Makefile
-@@ -1,8 +1,8 @@
- # $DragonFly: src/etc/dma/Makefile,v 1.3 2008/02/12 22:10:20 matthias Exp $
- FILESDIR=     /etc/dma
--SHAREOWN=     root
--SHAREGRP=     mail
-+FILESOWN=     root
-+FILESGRP=     mail
- FILESMODE=    640
- .if !exists(${DESTDIR}/etc/dma/auth.conf)
index c8dfa7a4a1acc59ca0f10944a6fb78f8419d5a67..76c020ba5b70c50caf84cf37f3fb660ec3f0af10 100644 (file)
@@ -2,24 +2,8 @@ Description: Dot-lock the user's mailbox with maillock(3) from liblockfile.
 Origin: other: http://svn.ringlet.net/svn/ringlet/mail/dma/
 Forwarded: not-needed
 Author: Peter Pentchev <roam@ringlet.net>
-Last-Update: 2010-06-02
+Last-Update: 2010-06-18
 
---- a/Makefile
-+++ b/Makefile
-@@ -3,10 +3,11 @@
- SUBDIR=       etc
-+CFLAGS+= -DHAVE_LIBLOCKFILE
- CFLAGS+= -I${.CURDIR}
--DPADD=  ${LIBSSL} ${LIBCRYPTO}
--LDADD=  -lssl -lcrypto
-+DPADD=  ${LIBSSL} ${LIBCRYPTO} /usr/lib/liblockfile.a
-+LDADD=  -lssl -lcrypto -llockfile
- PROG= dma
- SRCS= aliases_parse.y aliases_scan.l base64.c conf.c crypto.c
 --- a/local.c
 +++ b/local.c
 @@ -7,8 +7,53 @@
@@ -173,3 +157,16 @@ Last-Update: 2010-06-02
        close(mbox);
        return (error);
  }
+--- a/Makefile.plain
++++ b/Makefile.plain
+@@ -6,7 +6,9 @@
+ CC?=          gcc
+ CFLAGS?=      -O -pipe
+-LDADD?=               -lssl -lcrypto -lresolv
++LDADD?=               -lssl -lcrypto -lresolv -llockfile
++
++CFLAGS+=      -DHAVE_LIBLOCKFILE
+ INSTALL?=     install -p
+ PREFIX?=      /usr/local
index 9094ac4fb8bc6a9489cec05adf7133068748fb33..05fd51d157c647c468c983c2f33e7c28dded4343 100644 (file)
@@ -8,21 +8,19 @@ Description: Implement double-bounce handling via an external program.
 Origin: other: http://svn.ringlet.net/svn/ringlet/mail/dma/
 Bug: http://bugs.dragonflybsd.org/issue1321
 Author: Peter Pentchev <roam@ringlet.net>
-Last-Update: 2010-06-17
+Last-Update: 2010-06-18
 
 --- a/conf.c
 +++ b/conf.c
-@@ -236,6 +236,10 @@
-                               if (data != NULL)
-                                       config->certfile = strdup(data);
-                       }
-+                      else if (strcmp(word, "DBOUNCEPROG") == 0) {
-+                              if (data != NULL)
-+                                      config->dbounceprog = strdup(data);
-+                      }
-                       else if (strcmp(word, "MAILNAME") == 0) {
-                               if (data != NULL)
-                                       config->mailname = strdup(data);
+@@ -256,6 +256,8 @@
+                       config.authpath= data;
+               else if (strcmp(word, "CERTFILE") == 0 && data != NULL)
+                       config.certfile = data;
++              else if (strcmp(word, "DBOUNCEPROG") == 0 && data != NULL)
++                      config.dbounceprog = data;
+               else if (strcmp(word, "MAILNAME") == 0 && data != NULL)
+                       config.mailname = data;
+               else if (strcmp(word, "MAILNAMEFILE") == 0 && data != NULL)
 --- a/dma.8
 +++ b/dma.8
 @@ -240,6 +240,26 @@
@@ -30,7 +28,7 @@ Last-Update: 2010-06-17
  option.
  This option is handy if you are behind a dialup line.
 +.It Ic DBOUNCEPROG Xo
-+(string, default=commented)
++(string, default=dbounce-simple-safecat)
 +.Xc
 +Comment if you want the default behavior of
 +.Nm
@@ -52,18 +50,26 @@ Last-Update: 2010-06-17
  .It Ic FULLBOUNCE Xo
  (boolean, default=commented)
  .Xc
+@@ -270,6 +290,7 @@
+ (e.g.\& user@localhost) so you have to rewrite your outgoing email
+ address to a valid address.
+ .Sh SEE ALSO
++.Xr dbounce-simple-safecat 1 ,
+ .Xr mailaddr 7 ,
+ .Xr mailwrapper 8 ,
+ .Xr sendmail 8
 --- a/dma.h
 +++ b/dma.h
-@@ -120,6 +120,7 @@
-       char *certfile;
+@@ -111,6 +111,7 @@
+       const char *authpath;
+       const char *certfile;
        int features;
-       SSL *ssl;
-+      char *dbounceprog;
-       char *mailname;
-       char *mailnamefile;
- };
---- a/etc/dma.conf
-+++ b/etc/dma.conf
++      const char *dbounceprog;
+       const char *mailname;
+       const char *mailnamefile;
+--- a/dma.conf
++++ b/dma.conf
 @@ -43,6 +43,12 @@
  # behind a dialup line.  You have to submit your mails manually with dma -q
  DEFER
@@ -112,7 +118,7 @@ Last-Update: 2010-06-17
 -              exit(1);
 +              syslog(LOG_INFO, "%s: bounce delivery failed, double-bouncing",
 +                     it->queueid);
-+              if (config->dbounceprog == NULL) {
++              if (config.dbounceprog == NULL) {
 +                      syslog(LOG_CRIT, "%s: delivery panic: can't bounce a bounce and no double-bounce program defined in the config file",
 +                             it->queueid);
 +                      exit(1);
@@ -140,10 +146,10 @@ Last-Update: 2010-06-17
 +                      dup2(pipefd[1], STDIN_FILENO);
 +                      dup2(pipefd[1], STDOUT_FILENO);
 +                      dup2(pipefd[1], STDERR_FILENO);
-+                      execlp(config->dbounceprog, config->dbounceprog,
++                      execlp(config.dbounceprog, config.dbounceprog,
 +                          "-t", "dma", "-a", it->addr, "-i", it->queueid,
 +                          "-f", it->queuefn, NULL);
-+                      err(1, "Could not execute %s", config->dbounceprog);
++                      err(1, "Could not execute %s", config.dbounceprog);
 +                      /* NOTREACHED */
 +              }
 +
@@ -204,7 +210,7 @@ Last-Update: 2010-06-17
 +                      exit(1);
 +              }
 +              syslog(LOG_ERR, "%s: double-bounce succeeded, message passed to handler `%s': %s",
-+                     it->queueid, config->dbounceprog, buf);
++                     it->queueid, config.dbounceprog, buf);
 +              delqueue(it);
 +              exit(0);
        }
index ab5b2affed7a762e424162315824a3e9b6165f18..606b6ce5615d25c9b061c058055c978112c3eb52 100644 (file)
@@ -8,8 +8,8 @@ Forwarded: no
 Author: Peter Pentchev <roam@ringlet.net>
 Last-Update: 2010-06-02
 
---- a/etc/dma.conf
-+++ b/etc/dma.conf
+--- a/dma.conf
++++ b/dma.conf
 @@ -59,4 +59,4 @@
  
  # The name of the file to read the MAILNAME from; if this file is not
index 7506b2b84bfd11bf8ed7c6e2a0918807ed4359e7..84e08938a600cfb2ce63463f8b19b2498e865559 100644 (file)
@@ -4,21 +4,11 @@ Origin: other: http://svn.ringlet.net/svn/ringlet/mail/dma/
 Bug-Debian: http://bugs.debian.org/544475
 Forwarded: no
 Author: Peter Pentchev <roam@ringlet.net>
-Last-Update: 2010-06-02
+Last-Update: 2010-06-18
 
---- a/Makefile
-+++ b/Makefile
-@@ -3,6 +3,7 @@
- SUBDIR=       etc
-+CFLAGS+= -DHAVE_RANDOM
- CFLAGS+= -DHAVE_LIBLOCKFILE
- CFLAGS+= -I${.CURDIR}
 --- a/dma.c
 +++ b/dma.c
-@@ -356,6 +356,15 @@
+@@ -375,6 +375,15 @@
  
        bzero(&queue, sizeof(queue));
        LIST_INIT(&queue.queue);
@@ -44,7 +34,7 @@ Last-Update: 2010-06-02
  #include <signal.h>
  #include <syslog.h>
  #include <unistd.h>
-@@ -514,8 +515,15 @@
+@@ -513,8 +514,15 @@
                                } else if (!had_messagid) {
                                        /* XXX better msgid, assign earlier and log? */
                                        had_messagid = 1;
@@ -62,3 +52,13 @@ Last-Update: 2010-06-02
                                } else if (!had_from) {
                                        had_from = 1;
                                        snprintf(line, sizeof(line), "From: <%s>\n", queue->sender);
+--- a/Makefile.plain
++++ b/Makefile.plain
+@@ -8,6 +8,7 @@
+ CFLAGS?=      -O -pipe
+ LDADD?=               -lssl -lcrypto -lresolv -llockfile
++CFLAGS+=      -DHAVE_RANDOM -DHAVE_SRANDOM
+ CFLAGS+=      -DHAVE_LIBLOCKFILE
+ INSTALL?=     install -p
index ab415340770e0f2f44b742325598da1a5b688c4f..b117796ac6129a607521010415a3874435ab6a8e 100644 (file)
@@ -6,34 +6,34 @@ Origin: other: http://svn.ringlet.net/svn/ringlet/mail/dma/
 Bug-Debian: http://bugs.debian.org/547594
 Forwarded: no
 Author: Peter Pentchev <roam@ringlet.net>
-Last-Update: 2010-06-02
+Last-Update: 2010-06-18
 
 --- a/net.c
 +++ b/net.c
-@@ -329,12 +329,12 @@
+@@ -304,12 +304,12 @@
  static void
  close_connection(int fd)
  {
--      if (((config->features & SECURETRANS) != 0) &&
--          ((config->features & NOSSL) == 0))
--              SSL_shutdown(config->ssl);
+-      if (((config.features & SECURETRANS) != 0) &&
+-          ((config.features & NOSSL) == 0))
+-              SSL_shutdown(config.ssl);
 -
--      if (config->ssl != NULL)
-+      if (config->ssl != NULL) {
-+              if (((config->features & SECURETRANS) != 0) &&
-+                  ((config->features & NOSSL) == 0))
-+                      SSL_shutdown(config->ssl);
-               SSL_free(config->ssl);
+-      if (config.ssl != NULL)
++      if (config.ssl != NULL) {
++              if (((config.features & SECURETRANS) != 0) &&
++                  ((config.features & NOSSL) == 0))
++                      SSL_shutdown(config.ssl);
+               SSL_free(config.ssl);
 +      }
  
        close(fd);
  }
-@@ -387,7 +387,7 @@
+@@ -353,7 +353,7 @@
  
-       if ((config->features & SECURETRANS) != 0) {
-               error = smtp_init_crypto(fd, config->features);
--              if (error >= 0)
-+              if (error == 0)
+       if ((config.features & SECURETRANS) != 0) {
+               error = smtp_init_crypto(fd, config.features);
+-              if (error == 0)
++              if (error >= 0)
                        syslog(LOG_DEBUG, "SSL initialization successful");
                else
                        goto out;
diff --git a/patches/26-getprogname.patch b/patches/26-getprogname.patch
deleted file mode 100644 (file)
index 8419038..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-Description: Use program_invocation_short_name() instead of getprogname().
-Origin: other: http://svn.ringlet.net/svn/ringlet/mail/dma/
-Forwarded: not-needed
-Author: Peter Pentchev <roam@ringlet.net>
-Last-Update: 2010-06-03
-
---- a/util.c
-+++ b/util.c
-@@ -32,6 +32,8 @@
-  * SUCH DAMAGE.
-  */
-+#define _GNU_SOURCE
-+
- #include <sys/param.h>
- #include <errno.h>
- #include <fcntl.h>
-@@ -121,10 +123,10 @@
-       if (outs != NULL) {
-               syslog(LOG_ERR, "%s: %m", outs);
--              fprintf(stderr, "%s: %s: %s\n", getprogname(), outs, strerror(oerrno));
-+              fprintf(stderr, "%s: %s: %s\n", program_invocation_short_name, outs, strerror(oerrno));
-       } else {
-               syslog(LOG_ERR, "%m");
--              fprintf(stderr, "%s: %s\n", getprogname(), strerror(oerrno));
-+              fprintf(stderr, "%s: %s\n", program_invocation_short_name, strerror(oerrno));
-       }
-       exit(exitcode);
-@@ -145,10 +147,10 @@
-       if (outs != NULL) {
-               syslog(LOG_ERR, "%s", outs);
--              fprintf(stderr, "%s: %s\n", getprogname(), outs);
-+              fprintf(stderr, "%s: %s\n", program_invocation_short_name, outs);
-       } else {
-               syslog(LOG_ERR, "Unknown error");
--              fprintf(stderr, "%s: Unknown error\n", getprogname());
-+              fprintf(stderr, "%s: Unknown error\n", program_invocation_short_name);
-       }
-       exit(exitcode);
diff --git a/patches/30-empty-sender.patch b/patches/30-empty-sender.patch
deleted file mode 100644 (file)
index a514856..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-Description: Allow an empty queue file field - only if it is the sender.
- I'll forward this patch as soon as I catch up with the dma upstream.
-Origin: other: http://svn.ringlet.net/svn/ringlet/mail/dma/
-Forwarded: no
-Author: Peter Pentchev <roam@ringlet.net>
-Last-Update: 2010-06-17
-
---- a/spool.c
-+++ b/spool.c
-@@ -171,9 +171,11 @@
-               s++;
-               while (isspace(*s))
-                       s++;
-+              if (s[0] == 0 && strcmp(line, "Sender") != 0)
-+                      goto malformed;
-               s = strdup(s);
--              if (s == NULL || s[0] == 0)
-+              if (s == NULL)
-                       goto malformed;
-               if (strcmp(line, "ID") == 0) {
index 61130ed3fa7d9b839e8e996f42205f6ed802162d..09c37058ce95496d44f980883619a67350e3359e 100644 (file)
@@ -1,6 +1,5 @@
 01-debian-build.patch
 03-debian-locations.patch
-04-debian-setgid.patch
 09-typos.patch
 10-liblockfile.patch
 11-double-bounce.patch
@@ -9,8 +8,6 @@
 23-dirent-d_type.patch
 24-random-message-id.patch
 25-unsupported-starttls.patch
-26-getprogname.patch
 27-int-size.patch
 28-valid-recipient.patch
 29-double-free.patch
-30-empty-sender.patch