[arch-commits] Commit in libsieve/repos (4 files)

Felix Yan felixonmars at archlinux.org
Tue Jul 7 15:15:16 UTC 2020


    Date: Tuesday, July 7, 2020 @ 15:15:16
  Author: felixonmars
Revision: 658875

archrelease: copy trunk to community-staging-x86_64

Added:
  libsieve/repos/community-staging-x86_64/
  libsieve/repos/community-staging-x86_64/PKGBUILD
    (from rev 658874, libsieve/trunk/PKGBUILD)
  libsieve/repos/community-staging-x86_64/crash-fix.patch
    (from rev 658874, libsieve/trunk/crash-fix.patch)
  libsieve/repos/community-staging-x86_64/glibc-regex.patch
    (from rev 658874, libsieve/trunk/glibc-regex.patch)

-------------------+
 PKGBUILD          |   61 ++++++++++++++++++++++++++++++++++++++++
 crash-fix.patch   |   78 +++++++++++++++++++++++++++++++++++++++++++++++++++
 glibc-regex.patch |   79 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 218 insertions(+)

Copied: libsieve/repos/community-staging-x86_64/PKGBUILD (from rev 658874, libsieve/trunk/PKGBUILD)
===================================================================
--- community-staging-x86_64/PKGBUILD	                        (rev 0)
+++ community-staging-x86_64/PKGBUILD	2020-07-07 15:15:16 UTC (rev 658875)
@@ -0,0 +1,61 @@
+# Maintainer: Sergej Pupykin <pupykin.s+arch at gmail.com>
+
+pkgname=libsieve
+pkgver=2.3.1
+pkgrel=5
+pkgdesc="sieve interpretator lib"
+arch=(x86_64)
+url="http://libsieve.sourceforge.net/"
+license=('GPL')
+source=("https://github.com/downloads/sodabrew/libsieve/libsieve-$pkgver.tar.gz"
+	"glibc-regex.patch"
+	"crash-fix.patch")
+sha512sums=('6d03f48daf8b85723f04efe673bb246ae79320b1e7862b81d17ea0fe7941b9057012cd217d0593ecd15192ecef572d83d57051a36388e53028bf018c3c5a792f'
+            'c58e2f5a5d78748e49dee20b2c9e73e290bff844619bd625e02368164be12907923cbc659ea726e33deccf2a1c4f446f49b50f7f014d49e75ce5eec192480a14'
+            '9b7b3254027a27290ed5aaed5d4d801ebf1bc51f0d3a3dcdbadf82fc66d00f20cadd54aeb370ed1932f907cf1db57a85acb6473ddd45adc29705233a93b7a762')
+
+prepare() {
+  cd "$srcdir/$pkgname-$pkgver"
+  rm -rf src/sv_regex
+  rm -f src/sv_parser/{addr,header,sieve}.{c,h}
+  rm -f src/sv_parser/{addr,header,sieve}-lex.{c,h}
+  patch -p1 <"$srcdir"/glibc-regex.patch
+  patch -p1 <"$srcdir"/crash-fix.patch
+}
+
+build() {
+  cd "$srcdir/$pkgname-$pkgver"
+  aclocal
+  automake
+  autoconf
+#  export CFLAGS="-g -O2"
+#  export LDFLAGS="-g -O2"
+  ./configure --prefix=/usr
+  (cd src/sv_parser && for i in `ls -1 *.l | sed 's|\.l||'`; do flex --header-file=$i.h -o $i.c $i.l; done)
+  make
+}
+
+check() {
+  cd "$srcdir/$pkgname-$pkgver/src/sv_test"
+  export LD_LIBRARY_PATH="$srcdir"/libsieve-$pkgver/src/.libs:$LD_LIBRARY_PATH
+  ls -1 script* | while read script; do
+    ls -1 message* | while read msg; do
+      if [ "$script" == "script22.sv" ]; then
+        # script22.sv: syntax errors check
+        ./example $script $msg && false || true
+      else
+        if [ "$script" == "script23.sv" ]; then
+          # script23.sv: enotify looks unsupported or I don't know how to use it - skip it
+          true
+        else
+          ./example $script $msg
+        fi
+      fi
+    done
+  done
+}
+
+package() {
+  cd "$srcdir/$pkgname-$pkgver"
+  make DESTDIR="$pkgdir/" install
+}

Copied: libsieve/repos/community-staging-x86_64/crash-fix.patch (from rev 658874, libsieve/trunk/crash-fix.patch)
===================================================================
--- community-staging-x86_64/crash-fix.patch	                        (rev 0)
+++ community-staging-x86_64/crash-fix.patch	2020-07-07 15:15:16 UTC (rev 658875)
@@ -0,0 +1,78 @@
+diff -wbBur libsieve-2.3.1/src/sv_parser/header.y libsieve-2.3.1.q/src/sv_parser/header.y
+--- libsieve-2.3.1/src/sv_parser/header.y	2012-05-31 13:16:50.000000000 +0400
++++ libsieve-2.3.1.q/src/sv_parser/header.y	2013-09-02 20:21:26.000000000 +0400
+@@ -70,7 +70,7 @@
+                 }
+         | body WRAP             {
+                 TRACE_DEBUG( "body: body WRAP: %s %s", $1, $2 );
+-                $$ = libsieve_strbuf(context->strbuf, libsieve_strconcat( $1, $2, NULL ), strlen($1)+strlen($2), FREEME);
++                $$ = libsieve_strbuf(context->strbuf, libsieve_strconcat( $1 ? $1 : "", $2, NULL ), strlen($1 ? $1 : "")+strlen($2), FREEME);
+                 };
+ 
+ %%
+diff -wbBur libsieve-2.3.1/src/sv_parser/addr.y libsieve-2.3.1.q/src/sv_parser/addr.y
+--- libsieve-2.3.1/src/sv_parser/addr.y	2012-05-31 13:16:50.000000000 +0400
++++ libsieve-2.3.1.q/src/sv_parser/addr.y	2013-09-02 21:42:15.267979609 +0400
+@@ -38,6 +38,7 @@
+ 
+ /* sv_util */
+ #include "src/sv_util/util.h"
++#include "src/sv_interface/context2.h"
+ 
+ /* sv_parser */
+ #include "addr.h"
+@@ -74,10 +74,10 @@
+ 		context->addr_addr->name = $1;
+ 		};
+ 
+-address: mailbox_list			{ TRACE_DEBUG( "address: mailbox: %s", $1 ); }
+-	| group				{ TRACE_DEBUG( "address: group: %s", $1 ); };
++address: mailbox_list			{ $$ = $1; TRACE_DEBUG( "address: mailbox: %s", $1 ); }
++	| group				{ $$ = $1; TRACE_DEBUG( "address: group: %s", $1 ); };
+ 
+-group: phrase ':' ';'			{ TRACE_DEBUG( "group: phrase: %s", $1 ); }
++group: phrase ':' ';'			{ $$ = $1; TRACE_DEBUG( "group: phrase: %s", $1 ); }
+ 	| phrase ':' mailbox_list ';'	{ TRACE_DEBUG( "group: phrase mailbox_list: %s %s", $1, $3 ); };
+ 
+ mailbox_list: mailbox			{
+@@ -94,8 +94,8 @@
+ 		};
+ 
+ mailbox: 
+-	angle_addr			{ TRACE_DEBUG( "mailbox: angle_addr: %s", $1 ); }
+-	| addr_spec			{ TRACE_DEBUG( "mailbox: addr_spec: %s", $1 ); }
++	angle_addr			{ $$ = $1; TRACE_DEBUG( "mailbox: angle_addr: %s", $1 ); }
++	| addr_spec			{ $$ = $1; TRACE_DEBUG( "mailbox: addr_spec: %s", $1 ); }
+ 	| phrase angle_addr		{
+ 		TRACE_DEBUG( "mailbox: phrase angle_addr: %s %s", $1, $2 );
+ 		// This is a "top terminal" state...
+@@ -103,7 +103,7 @@
+ 		context->addr_addr->name = libsieve_strdup( $1 );
+ 		};
+ 
+-angle_addr: '<' addr_spec '>'		{ TRACE_DEBUG( "angle_addr: addr_spec: %s", $2 ); }
++angle_addr: '<' addr_spec '>'		{ $$ = $2;  TRACE_DEBUG( "angle_addr: addr_spec: %s", $2 ); }
+ 	| '<' route ':' addr_spec '>'	{
+ 		TRACE_DEBUG( "angle_addr: route addr_spec: %s:%s", $2, $4 );
+ 		// This is a "top terminal" state...
+@@ -133,13 +133,13 @@
+ 		$$ = libsieve_strbuf(context->strbuf, libsieve_strconcat( "@", $2, ",", $4, NULL ), strlen($2)+strlen($4)+2, FREEME);
+ 		};
+ 
+-local_part: DOTATOM { TRACE_DEBUG( "local_part: DOTATOM: %s", $1 ); }
+-	| ATOM	    { TRACE_DEBUG( "local_part: ATOM : %s", $1); }
+-	| qstring   { TRACE_DEBUG( "local_part: qstring: %s", $1); }
+-
+-domain: DOTATOM			{ TRACE_DEBUG( "domain: DOTATOM: %s", $1 ); }
+-	| ATOM		{ TRACE_DEBUG("domain: ATOM: %s", $1); }
+-	| domainlit	{ TRACE_DEBUG( "domain: domainlit: %s", $1); };
++local_part: DOTATOM { $$ = $1; TRACE_DEBUG( "local_part: DOTATOM: %s", $1 ); }
++	| ATOM	    { $$ = $1; TRACE_DEBUG( "local_part: ATOM : %s", $1); }
++	| qstring   { $$ = $1; TRACE_DEBUG( "local_part: qstring: %s", $1); }
++
++domain: DOTATOM		{ $$ = $1; TRACE_DEBUG( "domain: DOTATOM: %s", $1 ); }
++	| ATOM		{ $$ = $1; TRACE_DEBUG("domain: ATOM: %s", $1); }
++	| domainlit	{ $$ = $1; TRACE_DEBUG( "domain: domainlit: %s", $1); };
+ 
+ domainlit: '[' DTEXT ']'	{
+ 	 	TRACE_DEBUG( "domainlit: DTEXT: %s", $2 );

Copied: libsieve/repos/community-staging-x86_64/glibc-regex.patch (from rev 658874, libsieve/trunk/glibc-regex.patch)
===================================================================
--- community-staging-x86_64/glibc-regex.patch	                        (rev 0)
+++ community-staging-x86_64/glibc-regex.patch	2020-07-07 15:15:16 UTC (rev 658875)
@@ -0,0 +1,79 @@
+diff -wbBur libsieve-2.3.1/Makefile.am libsieve-2.3.1.my/Makefile.am
+--- libsieve-2.3.1/Makefile.am	2012-05-14 15:20:06.000000000 +0400
++++ libsieve-2.3.1.my/Makefile.am	2013-09-02 19:24:34.474741233 +0400
+@@ -5,7 +5,6 @@
+ 
+ EXTRA_DIST              = libsieve.pc.in \
+ 	src/sv_parser/addr.h src/sv_parser/addr-lex.h src/sv_parser/header.h src/sv_parser/header-lex.h src/sv_parser/sieve.h src/sv_parser/sieve-lex.h \
+-	src/sv_regex/README src/sv_regex/regcomp.c src/sv_regex/regexec.c src/sv_regex/regex_internal.c src/sv_regex/regex_internal.h \
+ 	src/sv_test/lmtp-1 src/sv_test/lmtp-2 src/sv_test/messagea.mbox src/sv_test/messageb.mbox src/sv_test/messagec.mbox src/sv_test/messaged.mbox src/sv_test/messagef.mbox src/sv_test/messageg.mbox src/sv_test/messageh.mbox src/sv_test/messagei.mbox src/sv_test/messagej.mbox src/sv_test/messagek.mbox src/sv_test/script10.sv src/sv_test/script11.sv src/sv_test/script12.sv src/sv_test/script13.sv src/sv_test/script14.sv src/sv_test/script15.sv src/sv_test/script16.sv src/sv_test/script17.sv src/sv_test/script18.sv src/sv_test/script19.sv src/sv_test/script1.sv src/sv_test/script20.sv src/sv_test/script21.sv src/sv_test/script22.sv src/sv_test/script23.sv src/sv_test/script2.sv src/sv_test/script3.sv src/sv_test/script4.sv src/sv_test/script5.sv src/sv_test/script6.sv src/sv_test/script7.sv src/sv_test/script8.sv src/sv_test/script9.sv src/sv_test/testmessage.sh src/sv_test/testvalid.sh
+ pkgconfigdir            = $(libdir)/pkgconfig
+ pkgconfig_DATA          = libsieve.pc
+@@ -24,7 +23,6 @@
+ src_libsieve_la_SOURCES      = \
+ 	src/sv_interface/callbacks2.c src/sv_interface/callbacks2.h src/sv_interface/context2.c src/sv_interface/context2.h src/sv_interface/message2.c src/sv_interface/message2.h src/sv_interface/message.c src/sv_interface/message.h src/sv_interface/script2.c src/sv_interface/script.c src/sv_interface/script.h src/sv_interface/tree.c src/sv_interface/tree.h \
+ 	src/sv_parser/addrinc.h src/sv_parser/addr.y src/sv_parser/addr-lex.l src/sv_parser/comparator.c src/sv_parser/comparator.h src/sv_parser/headerinc.h src/sv_parser/header.y src/sv_parser/header-lex.l src/sv_parser/parser.h src/sv_parser/sieveinc.h src/sv_parser/sieve.y src/sv_parser/sieve-lex.l \
+-	src/sv_regex/regex.h src/sv_regex/regex.c \
+ 	src/sv_util/exception.c src/sv_util/exception.h src/sv_util/md5.c src/sv_util/util.c src/sv_util/util.h
+ 
+ dist-hook:
+diff -wbBur libsieve-2.3.1/src/sv_interface/tree.h libsieve-2.3.1.my/src/sv_interface/tree.h
+--- libsieve-2.3.1/src/sv_interface/tree.h	2012-05-14 15:20:06.000000000 +0400
++++ libsieve-2.3.1.my/src/sv_interface/tree.h	2013-09-02 19:23:48.351408431 +0400
+@@ -29,7 +29,7 @@
+ #define TREE_H
+ 
+ #include "src/sv_parser/comparator.h"
+-#include "src/sv_regex/regex.h"
++#include <regex.h>
+ 
+ 
+ /* abstract syntax tree for sieve */
+diff -wbBur libsieve-2.3.1/src/sv_parser/comparator.c libsieve-2.3.1.my/src/sv_parser/comparator.c
+--- libsieve-2.3.1/src/sv_parser/comparator.c	2012-05-14 15:20:06.000000000 +0400
++++ libsieve-2.3.1.my/src/sv_parser/comparator.c	2013-09-02 19:25:13.368074118 +0400
+@@ -127,7 +127,7 @@
+ 
+ static int octet_regex(struct sieve2_context *context, const char *pat, const char *text)
+ {
+-    return (!libsieve_regexec((const regex_t *)pat, text, 0, NULL, 0));
++    return (!regexec((const regex_t *)pat, text, 0, NULL, 0));
+ }
+ 
+ 
+diff -wbBur libsieve-2.3.1/src/sv_parser/comparator.h libsieve-2.3.1.my/src/sv_parser/comparator.h
+--- libsieve-2.3.1/src/sv_parser/comparator.h	2012-05-14 15:20:06.000000000 +0400
++++ libsieve-2.3.1.my/src/sv_parser/comparator.h	2013-09-02 19:23:27.671408659 +0400
+@@ -27,7 +27,7 @@
+ #ifndef COMPARATOR_H
+ #define COMPARATOR_H
+ 
+-#include "src/sv_regex/regex.h"
++#include <regex.h>
+ #include "src/sv_include/sieve2.h"
+ 
+ /* compares pat to text; returns 1 if it's true, 0 otherwise 
+diff -wbBur libsieve-2.3.1/src/sv_parser/sieve.y libsieve-2.3.1.my/src/sv_parser/sieve.y
+--- libsieve-2.3.1/src/sv_parser/sieve.y	2012-05-31 13:16:50.000000000 +0400
++++ libsieve-2.3.1.my/src/sv_parser/sieve.y	2013-09-02 19:25:53.704740324 +0400
+@@ -34,8 +34,7 @@
+ #include <string.h>
+ #include <ctype.h>
+ 
+-/* sv_regex */
+-#include "src/sv_regex/regex.h"
++#include <regex.h>
+ 
+ /* sv_parser */
+ #include "comparator.h"
+@@ -882,8 +881,8 @@
+     char errbuf[100];
+     regex_t *reg = (regex_t *) libsieve_malloc(sizeof(regex_t));
+ 
+-    if ((ret = libsieve_regcomp(reg, s, cflags)) != 0) {
+-	(void) libsieve_regerror(ret, reg, errbuf, sizeof(errbuf));
++    if ((ret = regcomp(reg, s, cflags)) != 0) {
++	(void) regerror(ret, reg, errbuf, sizeof(errbuf));
+ 	libsieve_sieveerror(context, context->sieve_scan, errbuf);
+ 	libsieve_free(reg);
+ 	return NULL;



More information about the arch-commits mailing list