Hi László,
I've looked into the new sqlite3 3.53.1 and here's the first attempt to update
it and to build two Tcl libraries: one for Tcl 8.6 and the other for Tcl 9.0.
The package definitely need polishing and even completing:
1. Since upstream totally redid the build system switching from autotools to
some in-house written tool, one has to rewrite the clean target in debian/rules
(I've only commented out deleting the configure script at the moment)
2. As for now I've just dropped patches which did not apply cleanly,
one has to review them to understand if they are still relevant
3. In the view of changed build system, I have no idea on how
cross-build of sqlite3 will work now
4. Currently, all the library is built twice, which might be not
desirable, as only
for the Tcl related package it is absolutely necessary. I don't know how to fix
this cleanly
5. I didn't touch the www component, it should be updated to the current
documentation I suppose
There is one unnecessary but desired change in addition to updating to 3.53.1
and porting to Tcl 9: making the libsqlite3-tcl package multi-arch same.
Here are the comments on most changes in the debian/ directory along the
diff (I've attached the compressed debian directory as well):
Just a dummy changelog entry:
--- sqlite3-3.46.1/debian/changelog 2026-01-24 11:48:16.000000000 +0300
+++ sqlite3-3.53.1/debian/changelog 2026-05-31 12:13:25.279526579 +0300
@@ -1,3 +1,9 @@
+sqlite3 (3.53.1-1) unstable; urgency=medium
+
+ * New upstream release.
+
+ -- Sergei Golovan <sgolovan@debian.org> Sun, 31 May 2026 12:13:22 +0300
+
sqlite3 (3.46.1-9) unstable; urgency=medium
* Add pkgconf build dependency to fix link problem with ICU extension
A few changes in debian/control
--- sqlite3-3.46.1/debian/control 2026-01-24 11:48:16.000000000 +0300
+++ sqlite3-3.53.1/debian/control 2026-05-31 19:22:54.716534584 +0300
@@ -2,7 +2,7 @@
Section: devel
Priority: optional
Maintainer: Laszlo Boszormenyi (GCS) <gcs@debian.org>
Added tcl9.0-dev to build dependencies.
--- sqlite3-3.46.1/debian/libsqlite3-0.symbols 2025-05-28
08:02:22.000000000 +0300
+++ sqlite3-3.53.1/debian/libsqlite3-0.symbols 2026-05-31
14:10:02.183210627 +0300
Probably I've messed up somewhere since libsqlite3-0 is changed by libsqlite3
@@ -1,4 +1,4 @@
-libsqlite3.so.0 libsqlite3-0 #MINVER#
+libsqlite3.so.0 libsqlite3 #MINVER#
sqlite3AbsInt32@Base 3.37.0
sqlite3AddCheckConstraint@Base 3.37.0
sqlite3AddCollateType@Base 3.37.0
Delete a bunch of added symbols. Here are the missing ones:
@@ -470,7 +481,8 @@
sqlite3JournalModename@Base 3.37.0
sqlite3JournalOpen@Base 3.37.0
sqlite3JournalSize@Base 3.37.0
- sqlite3JsonTableFunctions@Base 3.38.0
+#MISSING: 3.53.1# sqlite3JsonTableFunctions@Base 3.38.0
+ sqlite3JsonVtabRegister@Base 3.53.1
sqlite3KeyInfoAlloc@Base 3.37.0
sqlite3KeyInfoFromExprList@Base 3.37.0
sqlite3KeyInfoOfIndex@Base 3.37.0
@@ -804,7 +822,7 @@
sqlite3TriggerInsertStep@Base 3.37.0
sqlite3TriggerList@Base 3.37.0
sqlite3TriggerSelectStep@Base 3.37.0
- sqlite3TriggerStepSrc@Base 3.37.0
+#MISSING: 3.53.1# sqlite3TriggerStepSrc@Base 3.37.0
sqlite3TriggerUpdateStep@Base 3.37.0
sqlite3TriggersExist@Base 3.37.0
sqlite3TwoPartName@Base 3.37.0
@@ -862,7 +880,9 @@
sqlite3VdbeChangeP4@Base 3.37.0
sqlite3VdbeChangeP5@Base 3.37.0
sqlite3VdbeChangeToNoop@Base 3.37.0
- sqlite3VdbeCheckFk@Base 3.37.0
+#MISSING: 3.53.1# sqlite3VdbeCheckFk@Base 3.37.0
+ sqlite3VdbeCheckFkDeferred@Base 3.53.1
+ sqlite3VdbeCheckFkImmediate@Base 3.53.1
sqlite3VdbeCloseStatement@Base 3.37.0
sqlite3VdbeCountChanges@Base 3.37.0
sqlite3VdbeCreate@Base 3.37.0
I've moved the Tcl library to /usr/lib/tcltk/$(DEB_HOST_MULTIARCH)/sqlite3
to make the package multi-arch same.
--- sqlite3-3.46.1/debian/libsqlite3-tcl.install 2011-03-27
14:09:20.000000000 +0400
+++ sqlite3-3.53.1/debian/libsqlite3-tcl.install 2026-05-31
15:40:16.694026200 +0300
@@ -1 +1 @@
-usr/lib/tcltk/sqlite3 usr/lib/tcltk/
+usr/lib/tcltk/* usr/lib/tcltk/
Upstream links libsqlite3.so into the Tcl library statically, I took
the liberty of patching
main.mk to do that dynamically. I think it's better that way, if you
don't agree you may
drop the patch
--- sqlite3-3.46.1/debian/patches/60-dynamic-libtclsqlite.patch
1970-01-01 03:00:00.000000000 +0300
+++ sqlite3-3.53.1/debian/patches/60-dynamic-libtclsqlite.patch
2026-05-31 15:27:46.210009655 +0300
@@ -0,0 +1,11 @@
+--- a/main.mk
++++ b/main.mk
+@@ -1641,7 +1643,7 @@
+ $(T.tcl.env.source); \
+ $(T.link.shared) -o $@ tclsqlite.o \
+ $$TCL_INCLUDE_SPEC $$TCL_STUB_LIB_SPEC $(LDFLAGS.libsqlite3) \
+- $(LIBOBJ) -Wl,-rpath,$$TCLLIBDIR
++ -L. -lsqlite3 -Wl,-rpath,$$TCLLIBDIR
+ # ^^^ that rpath bit is defined as TCL_LD_SEARCH_FLAGS in
+ # tclConfig.sh, but it's defined in such a way as to be useless for a
+ # _static_ makefile.
Quite a few patches did not apply cleanly. For now I've disabled them:
--- sqlite3-3.46.1/debian/patches/series 2025-09-09 19:47:18.000000000 +0300
+++ sqlite3-3.53.1/debian/patches/series 2026-05-31 14:16:51.245956685 +0300
@@ -1,14 +1,15 @@
-10-520466-libsqlite3-depends-on-libdl.patch
-10-520478-squash-bad-deps.patch
+#10-520466-libsqlite3-depends-on-libdl.patch
+#10-520478-squash-bad-deps.patch
20-hurd-locking-style.patch
-30-cross.patch
-10-665363-disable-malloc-usable-size.patch
+#30-cross.patch
+#10-665363-disable-malloc-usable-size.patch
31-increase_SQLITE_MAX_DEFAULT_PAGE_SIZE_to_32k.patch
-32-dynamic_link.patch
+#32-dynamic_link.patch
02-use-packaged-lempar.c.patch
-40-amalgamation_configure.patch
-41-fix_a_bug_in_the_NOT_NULL-IS_NULL_optimization.patch
-50-CVE-2025-29087.patch
-51-CVE-2025-29088.patch
-52-CVE-2025-6965.patch
-53-CVE-2025-7709.patch
+#40-amalgamation_configure.patch
+#41-fix_a_bug_in_the_NOT_NULL-IS_NULL_optimization.patch
+#50-CVE-2025-29087.patch
+#51-CVE-2025-29088.patch
+#52-CVE-2025-6965.patch
+#53-CVE-2025-7709.patch
+60-dynamic-libtclsqlite.patch
And now massive changes in debian/rules
--- sqlite3-3.46.1/debian/rules 2025-09-09 19:47:18.000000000 +0300
+++ sqlite3-3.53.1/debian/rules 2026-05-31 19:25:39.967186317 +0300
@@ -24,12 +24,15 @@
export DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
export DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
We build two versions: for 8.6 and 9.0
+TCLV_PRIMARY = 8.6
+TCLV_SECONDARY = 9.0
+
export LDFLAGS += -Wl,--as-needed
ifeq ($(DEB_BUILD_GNU_TYPE), $(DEB_HOST_GNU_TYPE))
Move --with-tcl to the actual list of configure options. The custom
configure script does not
support "--build whatever" it needs "--build=whatever" with =
- confflags += --build $(DEB_HOST_GNU_TYPE)
--with-tcl=/usr/lib/$(DEB_HOST_MULTIARCH)/tcl8.6
+ confflags += --build=$(DEB_HOST_GNU_TYPE)
export CROSS_BUILDING=no
else
- confflags += --build $(DEB_BUILD_GNU_TYPE) --host
$(DEB_HOST_GNU_TYPE) --with-tcl=/usr/lib/$(DEB_HOST_MULTIARCH)/tcl8.6
+ confflags += --build=$(DEB_BUILD_GNU_TYPE) --host=$(DEB_HOST_GNU_TYPE)
LDFLAGS += -L/usr/lib/$(DEB_HOST_MULTIARCH)
export CROSS_BUILDING=yes
endif
@@ -64,23 +67,34 @@
configure: configure-stamp
configure-stamp:
dh_testdir
- dh_autoreconf --as-needed
- dh_update_autotools_config
- ./configure --prefix=/usr --mandir="/usr/share/man" \
- $(confflags) --enable-threadsafe \
- --enable-load-extension \
- --enable-json \
- --enable-fts4 \
- --enable-fts5 \
- --disable-amalgamation \
- --libdir=\$${prefix}/lib/$(DEB_HOST_MULTIARCH) \
- --libexecdir=\$${libdir}/sqlite3 \
- TCLLIBDIR=/usr/lib/tcltk/sqlite3 \
- SHELL=/bin/sh \
- $(DDEBUG)
Drop autoreconf and updating autotools config since autoconf is not used
+ #dh_autoreconf --as-needed
+ #dh_update_autotools_config
A loop for the Tcl versions, building the library not in the root of
the package,
but in debian/8.6 and debian/9.0 (this also makes cleanup easier).
+ for v in $(TCLV_PRIMARY) $(TCLV_SECONDARY) ; do \
+ mkdir -p $(CURDIR)/debian/$$v && \
+ cd $(CURDIR)/debian/$$v && \
+ ../../configure \
+ $(confflags) \
+ --prefix=/usr \
+ --mandir=/usr/share/man \
+ --with-tcl=/usr/lib/$(DEB_HOST_MULTIARCH)/tcl$$v \
+ --enable-threadsafe \
+ --enable-load-extension \
+ --enable-json \
+ --enable-fts4 \
+ --enable-fts5 \
+ --disable-amalgamation \
New options