Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH 1/2] sqlite3: Squash sqlite3.inc into the recipe
@ 2026-09-25 16:56 Peter Kjellerstedt
  2026-09-25 16:56 ` [PATCH 2/2] sqlite3: Add support for the unlock notify API, and enable it for target Peter Kjellerstedt
  0 siblings, 1 reply; 2+ messages in thread
From: Peter Kjellerstedt @ 2026-09-25 16:56 UTC (permalink / raw)
  To: openembedded-core

It was only used by this recipe.

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
---
 meta/recipes-support/sqlite/sqlite3.inc       | 87 ------------------
 meta/recipes-support/sqlite/sqlite3_3.53.4.bb | 90 ++++++++++++++++++-
 2 files changed, 88 insertions(+), 89 deletions(-)
 delete mode 100644 meta/recipes-support/sqlite/sqlite3.inc

diff --git a/meta/recipes-support/sqlite/sqlite3.inc b/meta/recipes-support/sqlite/sqlite3.inc
deleted file mode 100644
index 8791749dc8..0000000000
--- a/meta/recipes-support/sqlite/sqlite3.inc
+++ /dev/null
@@ -1,87 +0,0 @@
-SUMMARY = "Embeddable SQL database engine"
-DESCRIPTION = "A library that implements a small, fast, self-contained, high-reliability, full-featured, SQL database engine. SQLite is the most used database engine in the world. SQLite is built into all mobile phones and most computers and comes bundled inside countless other applications that people use every day"
-HOMEPAGE = "http://www.sqlite.org"
-SECTION = "libs"
-
-PE = "3"
-
-def sqlite_download_version(d):
-    pvsplit = d.getVar('PV').split('.')
-    if len(pvsplit) < 4:
-        pvsplit.append('0')
-    return pvsplit[0] + ''.join([part.rjust(2,'0') for part in pvsplit[1:]])
-
-SQLITE_PV = "${@sqlite_download_version(d)}"
-
-S = "${UNPACKDIR}/sqlite-autoconf-${SQLITE_PV}"
-B = "${WORKDIR}/build"
-
-UPSTREAM_CHECK_URI = "http://www.sqlite.org/"
-UPSTREAM_CHECK_REGEX = "releaselog/(?P<pver>(\d+[\.\-_]*)+)\.html"
-
-CVE_PRODUCT = "sqlite"
-
-inherit pkgconfig siteinfo upstream-stable-release-point
-
-# enable those which are enabled by default in configure
-PACKAGECONFIG ?= "fts4 fts5 rtree dyn_ext"
-PACKAGECONFIG:class-native ?= "fts4 fts5 rtree dyn_ext"
-
-PACKAGECONFIG[editline] = "--enable-editline --with-readline-header=${includedir}/editline/readline.h,--disable-editline,libedit ncurses"
-PACKAGECONFIG[readline] = "--enable-readline --with-readline-header=${includedir}/readline/readline.h,--disable-readline,readline ncurses"
-PACKAGECONFIG[fts3] = "--enable-fts3,--disable-fts3"
-PACKAGECONFIG[fts4] = "--enable-fts4,--disable-fts4"
-PACKAGECONFIG[fts5] = "--enable-fts5,--disable-fts5"
-PACKAGECONFIG[rtree] = "--enable-rtree,--disable-rtree"
-PACKAGECONFIG[session] = "--enable-session,--disable-session"
-PACKAGECONFIG[zlib] = "--enable-zlib,--disable-zlib,zlib"
-PACKAGECONFIG[dyn_ext] = "--enable-load-extension,--disable-load-extension"
-
-EXTRA_OECONF = " \
-    --enable-shared \
-    --enable-threadsafe \
-    --disable-static-shell \
-    --disable-rpath \
-    --soname=legacy \
-"
-
-# pread() is in POSIX.1-2001 so any reasonable system must surely support it
-CFLAGS += "-DUSE_PREAD"
-
-# Provide column meta-data API
-CFLAGS += "-DSQLITE_ENABLE_COLUMN_METADATA"
-
-# Unless SQLITE_BYTEORDER is predefined, the code falls back to build time
-# huristics, which are not always correct
-CFLAGS += "${@oe.utils.conditional('SITEINFO_ENDIANNESS', 'le', '-DSQLITE_BYTEORDER=1234', '-DSQLITE_BYTEORDER=4321', d)}"
-
-PACKAGES = "lib${BPN} lib${BPN}-dev lib${BPN}-doc ${PN}-dbg lib${BPN}-staticdev ${PN}"
-
-FILES:${PN} = "${bindir}/*"
-FILES:lib${BPN} = "${libdir}/*.so.*"
-FILES:lib${BPN}-dev = "${libdir}/*.la ${libdir}/*.so \
-                       ${libdir}/pkgconfig ${includedir}"
-FILES:lib${BPN}-doc = "${docdir} ${mandir} ${infodir}"
-FILES:lib${BPN}-staticdev = "${libdir}/lib*.a"
-
-AUTO_LIBNAME_PKGS = "${MLPREFIX}lib${BPN}"
-
-do_configure() {
-    ${S}/configure \
-        --build=${BUILD_SYS} \
-        --host=${TARGET_SYS} \
-        --prefix=${prefix} \
-        --bindir=${bindir} \
-        --libdir=${libdir} \
-        --includedir=${includedir} \
-        --mandir=${mandir} \
-        ${EXTRA_OECONF} \
-        ${PACKAGECONFIG_CONFARGS}
-}
-do_configure[cleandirs] = "${B}"
-
-do_install() {
-    oe_runmake DESTDIR=${D} install
-}
-
-BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-support/sqlite/sqlite3_3.53.4.bb b/meta/recipes-support/sqlite/sqlite3_3.53.4.bb
index 66132158e0..dcd8acf538 100644
--- a/meta/recipes-support/sqlite/sqlite3_3.53.4.bb
+++ b/meta/recipes-support/sqlite/sqlite3_3.53.4.bb
@@ -1,9 +1,95 @@
-require sqlite3.inc
+SUMMARY = "Embeddable SQL database engine"
+DESCRIPTION = "A library that implements a small, fast, self-contained, high-reliability, full-featured, SQL database engine. SQLite is the most used database engine in the world. SQLite is built into all mobile phones and most computers and comes bundled inside countless other applications that people use every day"
+HOMEPAGE = "http://www.sqlite.org"
+SECTION = "libs"
 
 LICENSE = "blessing"
 LIC_FILES_CHKSUM = "file://sqlite3.h;endline=11;md5=786d3dc581eff03f4fd9e4a77ed00c66"
 
+PE = "3"
+
+def sqlite_download_version(d):
+    pvsplit = d.getVar('PV').split('.')
+    if len(pvsplit) < 4:
+        pvsplit.append('0')
+    return pvsplit[0] + ''.join([part.rjust(2,'0') for part in pvsplit[1:]])
+
+SQLITE_PV = "${@sqlite_download_version(d)}"
+
+S = "${UNPACKDIR}/sqlite-autoconf-${SQLITE_PV}"
+B = "${WORKDIR}/build"
+
 SRC_URI = "http://www.sqlite.org/2026/sqlite-autoconf-${SQLITE_PV}.tar.gz"
+SRC_URI += "file://0001-Add-option-to-disable-zlib.patch"
+
 SRC_URI[sha256sum] = "0e9483900e92cd5de8fd48d16bf9200145a61f7fd5be542a5ac81d8a9516eb9c"
 
-SRC_URI += "file://0001-Add-option-to-disable-zlib.patch"
+UPSTREAM_CHECK_URI = "http://www.sqlite.org/"
+UPSTREAM_CHECK_REGEX = "releaselog/(?P<pver>(\d+[\.\-_]*)+)\.html"
+
+CVE_PRODUCT = "sqlite"
+
+inherit pkgconfig siteinfo upstream-stable-release-point
+
+# enable those which are enabled by default in configure
+PACKAGECONFIG ?= "fts4 fts5 rtree dyn_ext"
+PACKAGECONFIG:class-native ?= "fts4 fts5 rtree dyn_ext"
+
+PACKAGECONFIG[editline] = "--enable-editline --with-readline-header=${includedir}/editline/readline.h,--disable-editline,libedit ncurses"
+PACKAGECONFIG[readline] = "--enable-readline --with-readline-header=${includedir}/readline/readline.h,--disable-readline,readline ncurses"
+PACKAGECONFIG[fts3] = "--enable-fts3,--disable-fts3"
+PACKAGECONFIG[fts4] = "--enable-fts4,--disable-fts4"
+PACKAGECONFIG[fts5] = "--enable-fts5,--disable-fts5"
+PACKAGECONFIG[rtree] = "--enable-rtree,--disable-rtree"
+PACKAGECONFIG[session] = "--enable-session,--disable-session"
+PACKAGECONFIG[zlib] = "--enable-zlib,--disable-zlib,zlib"
+PACKAGECONFIG[dyn_ext] = "--enable-load-extension,--disable-load-extension"
+
+EXTRA_OECONF = " \
+    --enable-shared \
+    --enable-threadsafe \
+    --disable-static-shell \
+    --disable-rpath \
+    --soname=legacy \
+"
+
+# pread() is in POSIX.1-2001 so any reasonable system must surely support it
+CFLAGS += "-DUSE_PREAD"
+
+# Provide column meta-data API
+CFLAGS += "-DSQLITE_ENABLE_COLUMN_METADATA"
+
+# Unless SQLITE_BYTEORDER is predefined, the code falls back to build time
+# heuristics, which are not always correct
+CFLAGS += "${@oe.utils.conditional('SITEINFO_ENDIANNESS', 'le', '-DSQLITE_BYTEORDER=1234', '-DSQLITE_BYTEORDER=4321', d)}"
+
+PACKAGES = "lib${BPN} lib${BPN}-dev lib${BPN}-doc ${PN}-dbg lib${BPN}-staticdev ${PN}"
+
+FILES:${PN} = "${bindir}/*"
+FILES:lib${BPN} = "${libdir}/*.so.*"
+FILES:lib${BPN}-dev = "${libdir}/*.la ${libdir}/*.so \
+                       ${libdir}/pkgconfig ${includedir}"
+FILES:lib${BPN}-doc = "${docdir} ${mandir} ${infodir}"
+FILES:lib${BPN}-staticdev = "${libdir}/lib*.a"
+
+AUTO_LIBNAME_PKGS = "${MLPREFIX}lib${BPN}"
+
+do_configure() {
+	${S}/configure \
+		--build=${BUILD_SYS} \
+		--host=${TARGET_SYS} \
+		--prefix=${prefix} \
+		--bindir=${bindir} \
+		--libdir=${libdir} \
+		--includedir=${includedir} \
+		--mandir=${mandir} \
+		${EXTRA_OECONF} \
+		${PACKAGECONFIG_CONFARGS}
+}
+do_configure[cleandirs] = "${B}"
+
+do_install() {
+	oe_runmake DESTDIR=${D} install
+}
+
+BBCLASSEXTEND = "native nativesdk"


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [PATCH 2/2] sqlite3: Add support for the unlock notify API, and enable it for target
  2026-09-25 16:56 [PATCH 1/2] sqlite3: Squash sqlite3.inc into the recipe Peter Kjellerstedt
@ 2026-09-25 16:56 ` Peter Kjellerstedt
  0 siblings, 0 replies; 2+ messages in thread
From: Peter Kjellerstedt @ 2026-09-25 16:56 UTC (permalink / raw)
  To: openembedded-core

After vendoring of sqlite for Rust crates was disabled in commit
6634a9a273e59a9671ce37d8ec84bb67b08b74d6, building a Rust application
that uses Sqlx's sqlite support fails with:

  error: linking with `target-rust-ccld` failed: exit status: 1
    |
    = note: /usr/bin/aarch64-poky-linux/aarch64-poky-linux-ld:
    build/target/aarch64-poky-linux-gnu/release/deps/foo.o:
    in function `sqlx_sqlite::statement::unlock_notify::wait':
      foo:(.text._RNvNtNtCs5IjsOsRanBC_11sqlx_sqlite9statement13unlock_notify4wait+0x3c):
      undefined reference to `sqlite3_unlock_notify'

This adds a PACKAGECONFIG for enabling the unlock notify API. It enables
it by default for target. The API is small (< 2 kB) and should not be in
the way unless wanted.

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
---
 meta/recipes-support/sqlite/sqlite3_3.53.4.bb | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/meta/recipes-support/sqlite/sqlite3_3.53.4.bb b/meta/recipes-support/sqlite/sqlite3_3.53.4.bb
index dcd8acf538..137ec26207 100644
--- a/meta/recipes-support/sqlite/sqlite3_3.53.4.bb
+++ b/meta/recipes-support/sqlite/sqlite3_3.53.4.bb
@@ -31,8 +31,7 @@ CVE_PRODUCT = "sqlite"
 
 inherit pkgconfig siteinfo upstream-stable-release-point
 
-# enable those which are enabled by default in configure
-PACKAGECONFIG ?= "fts4 fts5 rtree dyn_ext"
+PACKAGECONFIG ?= "fts4 fts5 rtree dyn_ext unlock-notify"
 PACKAGECONFIG:class-native ?= "fts4 fts5 rtree dyn_ext"
 
 PACKAGECONFIG[editline] = "--enable-editline --with-readline-header=${includedir}/editline/readline.h,--disable-editline,libedit ncurses"
@@ -44,6 +43,7 @@ PACKAGECONFIG[rtree] = "--enable-rtree,--disable-rtree"
 PACKAGECONFIG[session] = "--enable-session,--disable-session"
 PACKAGECONFIG[zlib] = "--enable-zlib,--disable-zlib,zlib"
 PACKAGECONFIG[dyn_ext] = "--enable-load-extension,--disable-load-extension"
+PACKAGECONFIG[unlock-notify] = ""
 
 EXTRA_OECONF = " \
     --enable-shared \
@@ -59,6 +59,9 @@ CFLAGS += "-DUSE_PREAD"
 # Provide column meta-data API
 CFLAGS += "-DSQLITE_ENABLE_COLUMN_METADATA"
 
+# Provide the unlock_notify API
+CFLAGS += "${@bb.utils.contains('PACKAGECONFIG', 'unlock-notify', '-DSQLITE_ENABLE_UNLOCK_NOTIFY', '', d)}"
+
 # Unless SQLITE_BYTEORDER is predefined, the code falls back to build time
 # heuristics, which are not always correct
 CFLAGS += "${@oe.utils.conditional('SITEINFO_ENDIANNESS', 'le', '-DSQLITE_BYTEORDER=1234', '-DSQLITE_BYTEORDER=4321', d)}"


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-09-25 16:57 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-25 16:56 [PATCH 1/2] sqlite3: Squash sqlite3.inc into the recipe Peter Kjellerstedt
2026-09-25 16:56 ` [PATCH 2/2] sqlite3: Add support for the unlock notify API, and enable it for target Peter Kjellerstedt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox