guix_mirror_bot pushed a commit to branch master
in repository guix.

commit 74d33890f1933f48815c311c2d5045d6dc0f3b32
Author: Dariqq <[email protected]>
AuthorDate: Mon Nov 2 08:20:24 2026 +0000

    gnu: procmail: Update to 3.24.
    
    * gnu/packages/patches/procmail-ambiguous-getline-debian.patch:
    * gnu/packages/patches/procmail-CVE-2014-3618.patch: Delete files.
    * gnu/packages/patches/procmail-CVE-2017-16844.patch: Refresh patch.
    * gnu/packages/mail.scm (prcomail): Update to 3.24.
      [source]: Switch to git-fetch.
      <patches>: Remove outdated patches.
    
    Merges: https://codeberg.org/guix/guix/pulls/12264
    Signed-off-by: Nguyễn Gia Phong <[email protected]>
---
 gnu/packages/mail.scm                              | 23 ++++----
 gnu/packages/patches/procmail-CVE-2014-3618.patch  | 26 ---------
 gnu/packages/patches/procmail-CVE-2017-16844.patch |  6 +--
 .../procmail-ambiguous-getline-debian.patch        | 61 ----------------------
 gnu/packages/patches/procmail-gcc-14.patch         | 13 -----
 5 files changed, 12 insertions(+), 117 deletions(-)

diff --git a/gnu/packages/mail.scm b/gnu/packages/mail.scm
index ec2754e6398..e98121142f2 100644
--- a/gnu/packages/mail.scm
+++ b/gnu/packages/mail.scm
@@ -2842,23 +2842,18 @@ separation to safely deliver mail in multi-user 
setups.")
 (define-public procmail
   (package
     (name "procmail")
-    (version "3.22")
+    (version "3.24")
     (source
      (origin
-       (method url-fetch)
-       (uri (string-append
-             "ftp://ftp.fu-berlin.de/pub/unix/mail/procmail/procmail-";
-             version
-             ".tar.gz"))
+       (method git-fetch)
+       (uri (git-reference
+              (url "https://github.com/BuGlessRB/procmail";)
+              (commit (string-append "v" version))))
        (sha256
         (base32
-         "05z1c803n5cppkcq99vkyd5myff904lf9sdgynfqngfk9nrpaz08"))
-       ;; The following patch fixes an ambiguous definition of
-       ;; getline() in formail.c.  The patch is provided by Debian as
-       ;; patch 24.
-       (patches (search-patches "procmail-ambiguous-getline-debian.patch"
-                                "procmail-CVE-2014-3618.patch"
-                                "procmail-CVE-2017-16844.patch"
+         "0dnyf78mnb1ph07w3im33f1aws5m442a9f7mpyq48xd5whhkwj6g"))
+       (file-name (git-file-name name version))
+       (patches (search-patches "procmail-CVE-2017-16844.patch"
                                 "procmail-gcc-14.patch"))))
     (arguments
      `(#:phases (modify-phases %standard-phases
@@ -2878,7 +2873,7 @@ separation to safely deliver mail in multi-user setups.")
     ;; are performed before the actual build process.
     (build-system gnu-build-system)
     (inputs (list exim))
-    (home-page "https://www.procmail.org/";)
+    (home-page "https://github.com/BuGlessRB/procmail";)
     (synopsis "Versatile mail delivery agent (MDA)")
     (description "Procmail is a mail delivery agent (MDA) featuring support
 for a variety of mailbox formats such as mbox, mh and maildir.  Incoming mail
diff --git a/gnu/packages/patches/procmail-CVE-2014-3618.patch 
b/gnu/packages/patches/procmail-CVE-2014-3618.patch
deleted file mode 100644
index e3f27597388..00000000000
--- a/gnu/packages/patches/procmail-CVE-2014-3618.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-Fixes CVE-2014-3618 (heap overflow in formisc.c allowing denial of
-service and potential remote execution of arbitrary code).
-https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2014-3618
-
-Source:
-http://seclists.org/oss-sec/2014/q3/495
-
-Adopted by Debian as patch '27':
-https://sources.debian.net/src/procmail/3.22-25/debian/patches/27/
-
---- a/src/formisc.c
-+++ b/src/formisc.c
-@@ -84,12 +84,11 @@
-       case '"':*target++=delim='"';start++;
-       }
-      ;{ int i;
--      do
-+      while(*start)
-          if((i= *target++= *start++)==delim)   /* corresponding delimiter? */
-             break;
-          else if(i=='\\'&&*start)                 /* skip quoted character */
-             *target++= *start++;
--      while(*start);                                          /* anything? */
-       }
-      hitspc=2;
-    }
diff --git a/gnu/packages/patches/procmail-CVE-2017-16844.patch 
b/gnu/packages/patches/procmail-CVE-2017-16844.patch
index b96540c8cd2..2e3840a034f 100644
--- a/gnu/packages/patches/procmail-CVE-2017-16844.patch
+++ b/gnu/packages/patches/procmail-CVE-2017-16844.patch
@@ -9,17 +9,17 @@ 
http://http.debian.net/debian/pool/main/p/procmail/procmail_3.22-26.debian.tar.x
 
 From: Santiago Vila <[email protected]>
 Subject: Fix heap-based buffer overflow in loadbuf()
-Bug-Debian: http://bugs.debian.org/876511
+Bug-Debian: https://bugs.debian.org/876511
 X-Debian-version: 3.22-26
 
 --- a/src/formisc.c
 +++ b/src/formisc.c
-@@ -103,7 +103,7 @@
+@@ -101,7 +101,7 @@ void loadsaved(sp)const struct saved*con
  }
                                                            /* append to buf */
  void loadbuf(text,len)const char*const text;const size_t len;
 -{ if(buffilled+len>buflen)                      /* buf can't hold the text */
 +{ while(buffilled+len>buflen)                   /* buf can't hold the text */
-      buf=realloc(buf,buflen+=Bsize);
+      buf=realloc(buf,buflen=buffilled+len+Bsize);
    tmemmove(buf+buffilled,text,len);buffilled+=len;
  }
diff --git a/gnu/packages/patches/procmail-ambiguous-getline-debian.patch 
b/gnu/packages/patches/procmail-ambiguous-getline-debian.patch
deleted file mode 100644
index 5dc91b1919d..00000000000
--- a/gnu/packages/patches/procmail-ambiguous-getline-debian.patch
+++ /dev/null
@@ -1,61 +0,0 @@
-Rename getline() to procmail_getline() to avoid namespace clash with
-POSIX getline(). Fixes FTBFS.
-
-Copied from Debian:
-http://sources.debian.net/src/procmail/3.22-24/debian/patches/24/
-
-References:
-http://bugs.debian.org/549426
-
---- a/src/fields.c
-+++ b/src/fields.c
-@@ -110,16 +110,16 @@
-                   /* try and append one valid field to rdheader from stdin */
- int readhead P((void))
- { int idlen;
--  getline();
-+  procmail_getline();
-   if((idlen=breakfield(buf,buffilled))<=0) /* not the start of a valid field 
*/
-      return 0;
-   if(idlen==STRLEN(FROM)&&eqFrom_(buf))                       /* it's a From_ 
line */
-    { if(rdheader)
-       return 0;                              /* the From_ line was a fake! */
--     for(;buflast=='>';getline());        /* gather continued >From_ lines */
-+     for(;buflast=='>';procmail_getline());       /* gather continued >From_ 
lines */
-    }
-   else
--     for(;;getline())               /* get the rest of the continued field */
-+     for(;;procmail_getline())                      /* get the rest of the 
continued field */
-       { switch(buflast)                            /* will this line be 
continued? */
-        { case ' ':case '\t':                            /* yep, it sure is */
-             continue;
---- a/src/formail.c
-+++ b/src/formail.c
-@@ -819,7 +819,7 @@
-       { if(split)                    /* gobble up the next start separator */
-        { buffilled=0;
- #ifdef sMAILBOX_SEPARATOR
--         getline();buffilled=0;                /* but only if it's defined */
-+         procmail_getline();buffilled=0;               /* but only if it's 
defined */
- #endif
-          if(buflast!=EOF)                                        /* if any */
-             goto splitit;
---- a/src/formisc.c
-+++ b/src/formisc.c
-@@ -115,7 +115,7 @@
-   buf[buffilled++]=c;
- }
- 
--int getline P((void))                    /* read a newline-terminated line */
-+int procmail_getline P((void))                           /* read a 
newline-terminated line */
- { if(buflast==EOF)                     /* at the end of our Latin already? */
-    { loadchar('\n');                                    /* fake empty line */
-      return EOF;                                        /* spread the word */
---- a/src/formisc.h
-+++ b/src/formisc.h
-@@ -17,4 +17,4 @@
- char*
-  skipwords P((char*start));
- int
-- getline P((void));
-+ procmail_getline P((void));
diff --git a/gnu/packages/patches/procmail-gcc-14.patch 
b/gnu/packages/patches/procmail-gcc-14.patch
index b819bf4ad10..f46dbc98de4 100644
--- a/gnu/packages/patches/procmail-gcc-14.patch
+++ b/gnu/packages/patches/procmail-gcc-14.patch
@@ -253,16 +253,3 @@ index 10fe406..33e7bff 100644
 
  static const char
   maildirtmp[]=MAILDIRtmp,maildircur[]=MAILDIRcur;
-diff --git a/src/mailfold.c b/src/mailfold.c
-index 917b502..9e3d386 100644
---- a/src/mailfold.c
-+++ b/src/mailfold.c
-@@ -371,7 +371,7 @@ void concon(ch)const int ch;   /* flip between 
concatenated and split fields */
-    }
- }
-
--void readmail(rhead,tobesent)const long tobesent;
-+void readmail(rhead,tobesent)const long tobesent; int rhead;
- { char*chp,*pastend;static size_t contlengthoffset;
-   ;{ long dfilled;
-      if(rhead==2)               /* already read, just examine what we have */

Reply via email to