Package: libdbd-sqlite3-perl
Version: 1.25-1
Severity: important


Coin,

Unfortunately, sqlite3 does not select the right file locking mechanism for the Hurd, and every db opération fails miserably. I already filled a bug on sqlite3 (see #529734), but libdbd-sqlite3-perl ships embedded sqlite3.{c,h} files, which then must be fixed too. Waiting for the sqlite3 patch to be applied in Debian, then pushed upstream, updated by libdbd-sqlite3-perl's upstream, and then finaly uploaded in Debian, seems to be a long path which would take years, so i decided to work on both fronts.

I've attached the small patch i made with the minor modification to your debian/rules to use a patching system at run-time. Could you please introduce it in your next upload (and help push it upstream too) ?

Regards.

--
Marc Dequènes (Duck)
diff -Nur orig/libdbd-sqlite3-perl-1.25/debian/changelog libdbd-sqlite3-perl-1.25/debian/changelog
--- orig/libdbd-sqlite3-perl-1.25/debian/changelog	2009-05-21 10:18:51.000000000 +0200
+++ libdbd-sqlite3-perl-1.25/debian/changelog	2009-05-21 02:09:30.000000000 +0200
@@ -1,3 +1,10 @@
+libdbd-sqlite3-perl (1.25-1+hurdfr1) unreleased; urgency=low
+
+  * Added 'hurd-locking-style' patch to get a working locking method
+    on Hurd, as the default one (the POSIX advisory one) fails.
+
+ -- Marc Dequènes (Duck) <d...@hurdfr.org>  Thu, 21 May 2009 02:08:15 +0200
+
 libdbd-sqlite3-perl (1.25-1) unstable; urgency=low
 
   * New upstream release
diff -Nur orig/libdbd-sqlite3-perl-1.25/debian/patches/hurd-locking-style libdbd-sqlite3-perl-1.25/debian/patches/hurd-locking-style
--- orig/libdbd-sqlite3-perl-1.25/debian/patches/hurd-locking-style	1970-01-01 01:00:00.000000000 +0100
+++ libdbd-sqlite3-perl-1.25/debian/patches/hurd-locking-style	2009-05-21 02:03:36.000000000 +0200
@@ -0,0 +1,33 @@
+Index: libdbd-sqlite3-perl-1.25/sqlite3.c
+===================================================================
+--- libdbd-sqlite3-perl-1.25.orig/sqlite3.c	2009-05-21 02:02:39.000000000 +0200
++++ libdbd-sqlite3-perl-1.25/sqlite3.c	2009-05-21 02:03:31.000000000 +0200
+@@ -20590,7 +20590,7 @@
+ ** where the database is located.  
+ */
+ #if !defined(SQLITE_ENABLE_LOCKING_STYLE)
+-#  if defined(__APPLE__)
++#  if defined(__APPLE__) || defined(__GNU__)
+ #    define SQLITE_ENABLE_LOCKING_STYLE 1
+ #  else
+ #    define SQLITE_ENABLE_LOCKING_STYLE 0
+@@ -20653,7 +20653,9 @@
+ # else
+ #  include <sys/file.h>
+ #  include <sys/param.h>
+-#  include <sys/mount.h>
++#   if ! defined(__GNU__)
++#    include <sys/mount.h>
++#   endif
+ # endif
+ #endif /* SQLITE_ENABLE_LOCKING_STYLE */
+ 
+@@ -25846,6 +25848,8 @@
+   static sqlite3_vfs aVfs[] = {
+ #if SQLITE_ENABLE_LOCKING_STYLE && (OS_VXWORKS || defined(__APPLE__))
+     UNIXVFS("unix",          autolockIoFinder ),
++#elif SQLITE_ENABLE_LOCKING_STYLE && defined(__GNU__)
++    UNIXVFS("unix",          flockIoFinder ),
+ #else
+     UNIXVFS("unix",          posixIoFinder ),
+ #endif
diff -Nur orig/libdbd-sqlite3-perl-1.25/debian/patches/series libdbd-sqlite3-perl-1.25/debian/patches/series
--- orig/libdbd-sqlite3-perl-1.25/debian/patches/series	1970-01-01 01:00:00.000000000 +0100
+++ libdbd-sqlite3-perl-1.25/debian/patches/series	2009-05-21 02:00:02.000000000 +0200
@@ -0,0 +1 @@
+hurd-locking-style
diff -Nur orig/libdbd-sqlite3-perl-1.25/debian/rules libdbd-sqlite3-perl-1.25/debian/rules
--- orig/libdbd-sqlite3-perl-1.25/debian/rules	2009-05-21 10:18:51.000000000 +0200
+++ libdbd-sqlite3-perl-1.25/debian/rules	2009-05-21 01:59:06.000000000 +0200
@@ -1,12 +1,15 @@
 #!/usr/bin/make -f
 
+include /usr/share/quilt/quilt.make
+
 build: build-stamp
-build-stamp:
+build-stamp: $(QUILT_STAMPFN)
 	dh build
 	touch $@
 
-clean:
-	dh $@
+clean: clean1 unpatch
+clean1:
+	dh clean
 
 install: install-stamp
 install-stamp: build-stamp
@@ -20,4 +23,4 @@
 
 binary: binary-arch binary-indep
 
-.PHONY: binary binary-arch binary-indep install clean build
+.PHONY: binary binary-arch binary-indep install clean build patch unpatch clean1

Attachment: pgpKtpjh7wvlg.pgp
Description: PGP Digital Signature

Reply via email to