[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#702293: marked as done (unblock: dspam/3.10.1+dfsg-10)



Your message dated Thu, 04 Apr 2013 22:51:12 +0100
with message-id <1365112272.6034.35.camel@jacala.jungle.funky-badger.org>
and subject line Re: Bug#702293: unblock: dspam/3.10.1+dfsg-10
has caused the Debian Bug report #702293,
regarding unblock: dspam/3.10.1+dfsg-10
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
702293: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=702293
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
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;

--- End Message ---
--- Begin Message ---
On Thu, 2013-04-04 at 23:35 +0200, Thomas Preud'homme wrote:
> Le jeudi 4 avril 2013 22:22:34, Adam D. Barratt a écrit :
> > On Sun, 2013-03-17 at 17:42 +0100, Thomas Preud'homme wrote:
> > > Le jeudi 7 mars 2013 11:10:33, Thomas Preud'homme a écrit :
> > > > After explaining my problem on IRC, formorer showed me an SQL
> > > > expression that creates plpgsql only if needed. You'll notice that
> > > > plpgsql is created with CREATE LANGUAGE because since PostgreSQL 9,
> > > > plpgsql is created by default. Hence, if it needs to be created the
> > > > old CREATE LANGUAGE construct should be used.
> > > > 
> > > > I tried installing dspam with this patch with both PostgreSQL 8.4 from
> > > > Squeeze and PostgreSQL 9.1 from Wheezy with success. Purging works fine
> > > > too.
> > > > 
> > > > If this diff suits you, should I rather upload to tpu with a new
> > > > changelog entry as in the attached debdiff or merge the entry in the
> > > > previous one so that only one upload appears to have been done?
> > > 
> > > Forgive me for resending this, I thought maybe this issue had be
> > > forgotten. If this is merely a consequence of your work overload, then I
> > > send you my full apologize.
> > 
> > Please go ahead.
[...]
> Done. I just added a close for a bug created later about that plpgsql bug.

Unblocked; thanks.

Regards,

Adam

--- End Message ---

Reply to: