summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO21
-rw-r--r--PKGBUILD40
-rw-r--r--fix_memory_allocation_bug.diff11
-rw-r--r--formisc.c.patch14
-rw-r--r--procmail-3.22-getline.patch56
5 files changed, 142 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..d47783ce7124
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,21 @@
+pkgbase = procmail
+ pkgdesc = Highly configurable auto mail processing.
+ pkgver = 3.22
+ pkgrel = 10
+ url = http://pm-doc.sourceforge.net/
+ arch = x86_64
+ license = GPL
+ license = custom:Artistic
+ makedepends = smtp-server
+ depends = glibc
+ depends = sh
+ source = http://ftp.osuosl.org/pub/blfs/conglomeration/procmail/procmail-3.22.tar.gz
+ source = procmail-3.22-getline.patch
+ source = formisc.c.patch
+ source = fix_memory_allocation_bug.diff
+ sha256sums = 087c75b34dd33d8b9df5afe9e42801c9395f4bf373a784d9bc97153b0062e117
+ sha256sums = aaa5ce562e5ef65f56a0225eedda3fcc7ab2938da6097ed4d9b11abf861929de
+ sha256sums = b7d983e5eba1d1869871a6ebb97404c511d0705673b0e59646b5c074c6ba34d8
+ sha256sums = 0f0e68b4eeac1dd7d9b167ff68d29cc8608e5247f4e59cf7098b65c9f1fb66e3
+
+pkgname = procmail
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..bbcf4651af94
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,40 @@
+# Maintainer: Andreas Radke <andyrtr@archlinux.org>
+
+pkgname=procmail
+pkgver=3.22
+pkgrel=10
+pkgdesc="Highly configurable auto mail processing."
+arch=('x86_64')
+#url="http://www.procmail.org" # offline
+url="http://pm-doc.sourceforge.net/"
+license=('GPL' 'custom:Artistic')
+depends=('glibc' 'sh')
+makedepends=('smtp-server')
+source=(#"http://www.procmail.org/${pkgname}-${pkgver}.tar.gz" # currently down
+ "http://ftp.osuosl.org/pub/blfs/conglomeration/procmail/procmail-${pkgver}.tar.gz"
+ procmail-3.22-getline.patch formisc.c.patch fix_memory_allocation_bug.diff)
+sha256sums=('087c75b34dd33d8b9df5afe9e42801c9395f4bf373a784d9bc97153b0062e117'
+ 'aaa5ce562e5ef65f56a0225eedda3fcc7ab2938da6097ed4d9b11abf861929de'
+ 'b7d983e5eba1d1869871a6ebb97404c511d0705673b0e59646b5c074c6ba34d8'
+ '0f0e68b4eeac1dd7d9b167ff68d29cc8608e5247f4e59cf7098b65c9f1fb66e3')
+
+prepare() {
+ cd $pkgname-$pkgver
+ patch -p1 -i "${srcdir}"/procmail-3.22-getline.patch
+ # FS#56398 / https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=876511
+ patch -p1 -i "${srcdir}"/formisc.c.patch
+ patch -p1 -i "${srcdir}"/fix_memory_allocation_bug.diff
+}
+
+build() {
+ cd $pkgname-$pkgver
+ yes n | make CFLAGS0="${CFLAGS} ${LDFLAGS}" LOCKINGTEST="/tmp ."
+}
+
+package() {
+ cd $pkgname-$pkgver
+ make BASENAME="${pkgdir}"/usr MANDIR="${pkgdir}"/usr/share/man install
+ install -D -m644 Artistic "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE
+ install -d -m755 "${pkgdir}"/usr/share/doc/${pkgname}/examples
+ install -m644 examples/* "${pkgdir}"/usr/share/doc/${pkgname}/examples/
+}
diff --git a/fix_memory_allocation_bug.diff b/fix_memory_allocation_bug.diff
new file mode 100644
index 000000000000..ba95429226a7
--- /dev/null
+++ b/fix_memory_allocation_bug.diff
@@ -0,0 +1,11 @@
+--- a/src/pipes.c.old 2002-12-02 23:45:15.000000000 +0100
++++ b/src/pipes.c 2002-12-02 23:45:24.000000000 +0100
+@@ -194,7 +194,7 @@
+ makeblock(&temp,Stdfilled);
+ tmemmove(temp.p,Stdout,Stdfilled);
+ readdyn(&temp,&Stdfilled,Stdfilled+backlen+1);
+- Stdout=realloc(Stdout,&Stdfilled+1);
++ Stdout=realloc(Stdout,Stdfilled+1);
+ tmemmove(Stdout,temp.p,Stdfilled+1);
+ freeblock(&temp);
+ retStdout(Stdout,pwait&&pipw,!backblock);
diff --git a/formisc.c.patch b/formisc.c.patch
new file mode 100644
index 000000000000..59102b352175
--- /dev/null
+++ b/formisc.c.patch
@@ -0,0 +1,14 @@
+diff --git a/src/formisc.c b/src/formisc.c
+index d91b227..6c7594b 100644
+--- a/src/formisc.c
++++ b/src/formisc.c
+@@ -103,7 +103,7 @@ void loadsaved(sp)const struct saved*const sp; /* load some saved text */
+ }
+ /* 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);
+ tmemmove(buf+buffilled,text,len);buffilled+=len;
+ }
+
diff --git a/procmail-3.22-getline.patch b/procmail-3.22-getline.patch
new file mode 100644
index 000000000000..fb9a4ec6efb5
--- /dev/null
+++ b/procmail-3.22-getline.patch
@@ -0,0 +1,56 @@
+diff -up procmail-3.22/src/fields.c.getline procmail-3.22/src/fields.c
+--- procmail-3.22/src/fields.c.getline 2001-09-11 06:57:08.000000000 +0200
++++ procmail-3.22/src/fields.c 2009-06-30 16:10:36.000000000 +0200
+@@ -110,16 +110,16 @@ void dispfield(p)register const struct f
+ /* try and append one valid field to rdheader from stdin */
+ int readhead P((void))
+ { int idlen;
+- getline();
++ get_line();
+ 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=='>';get_line()); /* gather continued >From_ lines */
+ }
+ else
+- for(;;getline()) /* get the rest of the continued field */
++ for(;;get_line()) /* get the rest of the continued field */
+ { switch(buflast) /* will this line be continued? */
+ { case ' ':case '\t': /* yep, it sure is */
+ continue;
+diff -up procmail-3.22/src/formail.c.getline procmail-3.22/src/formail.c
+--- procmail-3.22/src/formail.c.getline 2009-06-30 16:00:40.000000000 +0200
++++ procmail-3.22/src/formail.c 2009-06-30 16:10:49.000000000 +0200
+@@ -819,7 +819,7 @@ splitit: { if(!lnl) /* did the p
+ { if(split) /* gobble up the next start separator */
+ { buffilled=0;
+ #ifdef sMAILBOX_SEPARATOR
+- getline();buffilled=0; /* but only if it's defined */
++ get_line();buffilled=0; /* but only if it's defined */
+ #endif
+ if(buflast!=EOF) /* if any */
+ goto splitit;
+diff -up procmail-3.22/src/formisc.c.getline procmail-3.22/src/formisc.c
+--- procmail-3.22/src/formisc.c.getline 2001-06-29 04:20:45.000000000 +0200
++++ procmail-3.22/src/formisc.c 2009-06-30 16:12:20.000000000 +0200
+@@ -115,7 +115,7 @@ void loadchar(c)const int c; /* a
+ buf[buffilled++]=c;
+ }
+
+-int getline P((void)) /* read a newline-terminated line */
++int get_line 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 */
+diff -up procmail-3.22/src/formisc.h.getline procmail-3.22/src/formisc.h
+--- procmail-3.22/src/formisc.h.getline 1999-04-19 08:42:15.000000000 +0200
++++ procmail-3.22/src/formisc.h 2009-06-30 16:10:02.000000000 +0200
+@@ -17,4 +17,4 @@ void
+ char*
+ skipwords P((char*start));
+ int
+- getline P((void));
++ get_line P((void));