Bug#702293: unblock: dspam/3.10.1+dfsg-10
Package: release.debian.org
Severity: normal
User: release.debian.org@packages.debian.org
Usertags: unblock
Please unblock package dspam
dspam in version 3.10.1 uses legacy mode for string escaping in
PostgreSQL while PostgreSQL in wheezy defaults to standard-compliant
mode. This means insertion in the database fail and dspam cannot be
trained. While documenting it in the release notes, Julien Cristau
remarked that documenting the problem is ridiculous and this should be
fixed instead. He also kindly provided a patch, which after tests
compiles and works. I thus considered it as an indication the fix is
suitable for a tpu upload (since it can't go through unstable).
While doing the testing I noticed that installation of
libdspam7-drv-pgsql gives an error because it create the language
plpgsql while in PostgreSQL 9.1 it should be created as an extension.
The error can be ignored but it is misleading for the user. I thus took
the liberty to include the patch to save some email round trip time.
I'll be happy to reupload without that fix if you feel I was wrong.
Best regards.
unblock dspam/4.10.1+dfsg-10
-- System Information:
Debian Release: 7.0
APT prefers unstable
APT policy: (990, 'unstable'), (500, 'stable-updates'), (500, 'testing'), (500, 'stable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 3.2.0-4-amd64 (SMP w/4 CPU cores)
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
diff -Nru dspam-3.10.1+dfsg/debian/changelog dspam-3.10.1+dfsg/debian/changelog
--- dspam-3.10.1+dfsg/debian/changelog 2013-02-28 21:34:52.000000000 +0100
+++ dspam-3.10.1+dfsg/debian/changelog 2013-03-04 17:39:52.000000000 +0100
@@ -1,3 +1,12 @@
+dspam (3.10.1+dfsg-10) testing-proposed-updates; urgency=low
+
+ * Explicitely require legacy mode for string escaping in PostgreSQL since it
+ now defaults to standard compliant mode (Closes: #694942).
+ * Fix error when creating database in PostgreSQL by creating plpgsql as
+ extension instead of language.
+
+ -- Thomas Preud'homme <robotux@debian.org> Mon, 04 Mar 2013 13:56:45 +0100
+
dspam (3.10.1+dfsg-9) testing-proposed-updates; urgency=low
* Add a new version of the patch fixing recipient corruption when releasing
diff -Nru dspam-3.10.1+dfsg/debian/patches/010_set_legacy_escape_strings.diff dspam-3.10.1+dfsg/debian/patches/010_set_legacy_escape_strings.diff
--- dspam-3.10.1+dfsg/debian/patches/010_set_legacy_escape_strings.diff 1970-01-01 01:00:00.000000000 +0100
+++ dspam-3.10.1+dfsg/debian/patches/010_set_legacy_escape_strings.diff 2013-03-04 17:39:52.000000000 +0100
@@ -0,0 +1,17 @@
+diff --git a/src/pgsql_drv.c b/src/pgsql_drv.c
+index eac2354..b110a3f 100644
+--- a/src/pgsql_drv.c
++++ b/src/pgsql_drv.c
+@@ -3175,6 +3175,12 @@ PGconn *_pgsql_drv_connect(DSPAM_CTX *CTX)
+ return NULL;
+ }
+
++ if (PQserverVersion(dbh) >= 90100)
++ {
++ PGresult *result = PQexec(dbh, "SET standard_conforming_strings TO off;");
++ if (result)
++ PQclear(result);
++ }
+ return dbh;
+
+ FAILURE:
diff -Nru dspam-3.10.1+dfsg/debian/patches/series dspam-3.10.1+dfsg/debian/patches/series
--- dspam-3.10.1+dfsg/debian/patches/series 2013-02-28 21:34:52.000000000 +0100
+++ dspam-3.10.1+dfsg/debian/patches/series 2013-03-04 17:39:52.000000000 +0100
@@ -7,3 +7,4 @@
007_ctime.pl.diff
008_fix_exim_integration_doc.diff
009_fix_recipient_corruption_when_releasing_message_from_quarantine.diff
+010_set_legacy_escape_strings.diff
diff -Nru dspam-3.10.1+dfsg/debian/sqlfiles/install-dbadmin/pgsql dspam-3.10.1+dfsg/debian/sqlfiles/install-dbadmin/pgsql
--- dspam-3.10.1+dfsg/debian/sqlfiles/install-dbadmin/pgsql 2013-02-28 21:34:52.000000000 +0100
+++ dspam-3.10.1+dfsg/debian/sqlfiles/install-dbadmin/pgsql 2013-03-04 17:39:52.000000000 +0100
@@ -1 +1 @@
-CREATE LANGUAGE plpgsql;
+CREATE EXTENSION IF NOT EXISTS plpgsql;
Reply to: