Hi Laszlo,

sorry for the long pause regarding the below.

On  Di 07 Mai 2024 21:28:05 CEST, László Böszörményi (GCS) wrote:

Hi Mike,

On Mon, May 6, 2024 at 10:27 PM Mike Gabriel <sunwea...@debian.org> wrote:
Find attached a .debdiff patch that fixes bug #758985 by building
sqlite3 with SQLITE_ENABLE_ICU.
 I think there was a time when it was already enabled. Caused some
problems, but so late I can't remember exactly.

Hmm... ok.

Please consider enabling the ICU extension and making sqlite3 i18n
capable for languages using regional fonts etc. If this change is not
acceptable, please also let me know.
 I'm going to upload it to experimental as it will help to test it
easily first. Would it pull in too many extra dependencies with ICU?
Need to be checked as well.

In the Lomiri / UBports packaging team we have discussed this matter in length over the past few days.

To be less disruptive to Debian users, may we propose re-focussing on a dyn-loadable module approach for ICU rather than the amalgamation build of Sqlite3+ICU.

I have attached new .debdiff that builds the ICU extension as a module and installs it to LIBDIR. Regarding the module installation path we are probably facing the sqlite3 library path issue (see [1]). See the comment in the patch when it comes to installing libSqliteIcu.so in d/rules.

The only Debian consumer in mind for the ICU extension for now is src:pkg qtcontacts-sqlite. If support of loading modules with library name only (i.e. without giving the full path to load_extension()) is of less priority compared to staying compliant with Debian policy, we could patch the hard-coded full path to libSqliteIcu.so into qtcontacts-sqlite.

For now, in the sent .debdiff we install libSqliteIcu.so to /usr/lib/<multiarch>/ so that load_extension() finds the module without specifying its full path. Let me know if that works for you.

Maybe it could be an approach to upload an ICU-enabled version of
sqlite3 to experimental and ask people to test their
services/applications with the new-featured sqlite3. I can help with
communications if needed. Please let me know.
 Do you have a list of people, projects that will be affected by this
change? Sure, it would help to reach them for comments.

With this disruptive potential in mind, we chose to present this new .debdiff. Sqlite3 consumers would stay unaffected, for us (qtcontacts-sqlite / Lomiri maintainers), the loadable module will be sufficient. Please note, that this .debdiff does not close bug #758985 fully, because initially it was asked to provide the amalgamation build of sqlite3+icu. The ICU related tokenizers will not be available via the loadable module approach.

Looking forward to your feedback!
Thanks,


[1] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=758985

--

mike gabriel aka sunweaver (Debian Developer)
mobile: +49 (1520) 1976 148
landline: +49 (4351) 486 14 27

GnuPG Fingerprint: 9BFB AEE8 6C0A A5FF BF22  0782 9AF4 6B30 2577 1B31
mail: sunwea...@debian.org, http://sunweavers.net

diff -Nru sqlite3-3.45.3/debian/changelog sqlite3-3.45.3/debian/changelog
--- sqlite3-3.45.3/debian/changelog     2024-04-16 18:12:58.000000000 +0200
+++ sqlite3-3.45.3/debian/changelog     2024-05-24 09:18:30.000000000 +0200
@@ -1,3 +1,12 @@
+sqlite3 (3.45.3-1.2) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * debian/:
+    + Build ICU extension as dynamically loadable library and ship it in 
bin:pkg
+      libsqlite3-mod-icu.   
+
+ -- Mike Gabriel <sunwea...@debian.org>  Fri, 24 May 2024 09:18:30 +0200
+
 sqlite3 (3.45.3-1) unstable; urgency=medium
 
   * New upstream release.
diff -Nru sqlite3-3.45.3/debian/control sqlite3-3.45.3/debian/control
--- sqlite3-3.45.3/debian/control       2023-06-24 16:16:47.000000000 +0200
+++ sqlite3-3.45.3/debian/control       2024-05-24 09:18:30.000000000 +0200
@@ -2,7 +2,7 @@
 Section: devel
 Priority: optional
 Maintainer: Laszlo Boszormenyi (GCS) <g...@debian.org>
-Build-Depends: debhelper-compat (= 13), autoconf (>= 2.59), libtool (>= 
1.5.2), automake, chrpath, lynx, libreadline-dev, tcl8.6-dev
+Build-Depends: debhelper-compat (= 13), autoconf (>= 2.59), libtool (>= 
1.5.2), automake, chrpath, lynx, libreadline-dev, tcl8.6-dev, libicu-dev
 Build-Conflicts: tcl8.4, tcl8.4-dev, tcl8.5, tcl8.5-dev
 Standards-Version: 4.6.2
 Rules-Requires-Root: no
@@ -85,6 +85,19 @@
  .
  This package contains the Tcl bindings.
 
+Package: libsqlite3-mod-icu
+Suggests: sqlite3-doc
+Section: libs
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Description: SQLite 3 ICU extension
+ SQLite is a C library that implements an SQL database engine.
+ Programs that link with the SQLite library can have SQL database
+ access without running a separate RDBMS process.
+ .
+ This package contains the ICU extension as dynamically loadable
+ library.
+
 Package: sqlite3-tools
 Suggests: sqlite3-doc
 Section: database
diff -Nru sqlite3-3.45.3/debian/libsqlite3-mod-icu.install 
sqlite3-3.45.3/debian/libsqlite3-mod-icu.install
--- sqlite3-3.45.3/debian/libsqlite3-mod-icu.install    1970-01-01 
01:00:00.000000000 +0100
+++ sqlite3-3.45.3/debian/libsqlite3-mod-icu.install    2024-05-24 
09:18:30.000000000 +0200
@@ -0,0 +1 @@
+usr/lib/*/libSqliteIcu.so
diff -Nru sqlite3-3.45.3/debian/rules sqlite3-3.45.3/debian/rules
--- sqlite3-3.45.3/debian/rules 2024-03-13 21:16:30.000000000 +0100
+++ sqlite3-3.45.3/debian/rules 2024-05-24 09:18:30.000000000 +0200
@@ -99,7 +99,7 @@
        $(MAKE) lemon
 endif
        cd ext/misc && $(HOST_CC) $(LDFLAGS) $(CPPFLAGS) $(CFLAGS) -g -fPIC 
-I../.. -shared csv.c -o csv.so
-
+       cd ext/icu && $(HOST_CC) $(LDFLAGS) $(CPPFLAGS) $(CFLAGS) -g -fPIC 
-I../.. -I../../src -shared icu.c $(shell pkg-config --libs --cflags icu-uc 
icu-io) -o libSqliteIcu.so
        touch $@
 
 clean:
@@ -132,6 +132,17 @@
        install -d $(DESTDIR)/usr/lib/$(DEB_HOST_MULTIARCH)/sqlite/
        install -m 0775 ext/misc/csv.so \
                $(DESTDIR)/usr/lib/$(DEB_HOST_MULTIARCH)/sqlite/
+       # This should actually go into /usr/lib/$(DEB_HOST_MULTIARCH)/sqlite3, 
but
+       # the extension loader does not support loading the extension module 
from
+       # there without specifying the full path. Consumers of libSqliteIcu.so 
expect
+       # the extension to be loadable without full path given, so drop the ICU
+       # extension in LIBDIR directly. (See: https://bugs.debian.org/958530).
+       # Cave: Debian policy violation.
+       #
+       # Other Sqlite3 extensions such as those from src:pkg sqliteodbc also 
install
+       # sqlite3 extensions to LIBDIR for the same reason.
+       install -m 0775 ext/icu/libSqliteIcu.so \
+               $(DESTDIR)/usr/lib/$(DEB_HOST_MULTIARCH)/
 
        # Remove *.la files per policy 3.9.1.0
        rm $(DESTDIR)/usr/lib/$(DEB_HOST_MULTIARCH)/libsqlite3.la

Attachment: pgpsXlzeez7zr.pgp
Description: Digitale PGP-Signatur

Reply via email to