[packages/postgrey] - rel 2; patch from debian that should fix postgrey dying at log rotation

arekm arekm at pld-linux.org
Thu Nov 14 09:23:05 CET 2013


commit 74537a917002fe21783fb6aa1d5ad1af2a485055
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date:   Thu Nov 14 09:23:02 2013 +0100

    - rel 2; patch from debian that should fix postgrey dying at log rotation

 disable-transaction-logic | 30 ++++++++++++++++++++++++++++++
 postgrey.spec             |  4 +++-
 postgrey_clients_dump     |  2 +-
 3 files changed, 34 insertions(+), 2 deletions(-)
---
diff --git a/postgrey.spec b/postgrey.spec
index 71f72a6..104fb4a 100644
--- a/postgrey.spec
+++ b/postgrey.spec
@@ -3,7 +3,7 @@ Summary:	Postfix Greylisting Policy Server
 Summary(pl.UTF-8):	Serwer do polityki "szarych list" dla Postfiksa
 Name:		postgrey
 Version:	1.34
-Release:	1
+Release:	2
 License:	GPL v2
 Group:		Networking/Daemons
 Source0:	http://postgrey.schweikert.ch/pub/%{name}-%{version}.tar.gz
@@ -14,6 +14,7 @@ Source3:	http://www.lipek.pl/postgrey_clients_dump
 # Source3-md5:	155b88f2781b03535bfa2797cda28e52
 Patch0:		%{name}-group.patch
 Patch1:		%{name}-postfix_dir.patch
+Patch2:		disable-transaction-logic
 URL:		http://postgrey.schweikert.ch/
 BuildRequires:	rpm-perlprov
 BuildRequires:	rpmbuild(macros) >= 1.268
@@ -68,6 +69,7 @@ lub jeśli chcemy używać gniazd inet (w razie potrzeby zmienić IP):
 %setup -q
 %patch0 -p1
 %patch1 -p0
+%patch2 -p1
 
 %install
 rm -rf $RPM_BUILD_ROOT
diff --git a/disable-transaction-logic b/disable-transaction-logic
new file mode 100644
index 0000000..a82a121
--- /dev/null
+++ b/disable-transaction-logic
@@ -0,0 +1,30 @@
+patch to disable the transactional logic during the cleaning of the DB, this
+fixes a problem seen as result of updates of BerkeleyDB.
+See http://bugs.debian.org/614968 for more info
+
+--- a/postgrey
++++ b/postgrey
+@@ -276,11 +276,7 @@
+                 $nr_keys_after++;
+             }
+         }
+-        my $db_obj = $self->{postgrey}{db_obj};
+-        my $txn = $db_env->txn_begin();
+-        $db_obj->Txn($txn);
+         for my $key (@old_keys) { delete $db->{$key}; }
+-        $txn->txn_commit();
+         
+         $self->mylog(1, "cleaning main database finished. before: $nr_keys_before, after: $nr_keys_after");
+ 
+@@ -300,11 +296,7 @@
+                     $nr_keys_after++;
+                 }
+             }
+-            my $db_cawl_obj = $self->{postgrey}{db_cawl_obj};
+-            $txn = $db_env->txn_begin();
+-            $db_cawl_obj->Txn($txn);
+             for my $key (@old_keys_cawl) { delete $cawl_db->{$key}; }
+-            $txn->txn_commit();
+ 
+             $self->mylog(1, "cleaning clients database finished. before: $nr_keys_before, after: $nr_keys_after");
+         }
diff --git a/postgrey_clients_dump b/postgrey_clients_dump
index 5a52250..640e899 100644
--- a/postgrey_clients_dump
+++ b/postgrey_clients_dump
@@ -13,7 +13,7 @@ use BerkeleyDB;
 use Socket;
 
 my $dbdir = '/var/spool/postfix/postgrey/';
-my $mails = 5;
+my $mails = 3;
 
 sub resolv($) {
     my $host = shift;
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/postgrey.git/commitdiff/74537a917002fe21783fb6aa1d5ad1af2a485055



More information about the pld-cvs-commit mailing list