package/sqlite: json extension enabled by default
PATCH 1/1 package/sqlite: json extension enabled by default
Since SQLite 3.38 [0] the JSON extension is enabled by default. A new Option was introduced to actively disable the extension. [1]
I chose to deprecate the old option and replace it by one to disable it. This should avoid breakage for setups where the json extension is used but was never actively activated.
- drop BR2_PACKAGE_SQLITE_ENABLE_JSON1
- add BR2_PACKAGE_SQLITE_ENABLE_JSON1 to the deprecation list
- add new option BR2_PACKAGE_SQLITE_OMIT_JSON
[0] https://sqlite.org/releaselog/3_38_0.html
[1] https://sqlite.org/json1.html#compiling_in_json_support
--- Config.in.legacy | 7 +++++++ package/sqlite/Config.in | 12 ++++++------ package/sqlite/sqlite.mk | 8 ++++---- 3 files changed, 17 insertions(+), 10 deletions(-)
Config.in.legacy +7 -0
@@ -146,6 +146,13 @@ endif comment "Legacy options removed in 2025.02" +config BR2_PACKAGE_SQLITE_ENABLE_JSON1 + bool "Enable the JSON extensions for SQLite has been removed" + select BR2_LEGACY + help + Since SQLite 3.38 the JSON Extension is enabled by default. + Use BR2_PACKAGE_SQLITE_OMIT_JSON to disable it. + config BR2_PACKAGE_ANGULARJS bool "angularjs has been removed" select BR2_LEGACY
package/sqlite/Config.in +6 -6
@@ -30,12 +30,6 @@ config BR2_PACKAGE_SQLITE_ENABLE_FTS3 http://www.sqlite.org/amalgamation.html), version 3 of the full-text search engine is added to the build automatically. -config BR2_PACKAGE_SQLITE_ENABLE_JSON1 - bool "Enable the JSON extensions for SQLite" - help - When this option is defined in the amalgamation, the JSON - extensions are added to the build automatically. - config BR2_PACKAGE_SQLITE_ENABLE_UNLOCK_NOTIFY bool "Enable sqlite3_unlock_notify() interface" help
@@ -44,6 +38,12 @@ config BR2_PACKAGE_SQLITE_ENABLE_UNLOCK_NOTIFY http://www.sqlite.org/unlock_notify.html for additional information. +config BR2_PACKAGE_SQLITE_OMIT_JSON + bool "Disable JSON support" + help + This option disables the SQLite JSON support. + https://sqlite.org/json1.html#compiling_in_json_support + config BR2_PACKAGE_SQLITE_SECURE_DELETE bool "Set the secure_delete pragma on by default" help
package/sqlite/sqlite.mk +4 -4
@@ -25,14 +25,14 @@ ifeq ($(BR2_PACKAGE_SQLITE_ENABLE_FTS3),y) SQLITE_CFLAGS += -DSQLITE_ENABLE_FTS3 endif -ifeq ($(BR2_PACKAGE_SQLITE_ENABLE_JSON1),y) -SQLITE_CFLAGS += -DSQLITE_ENABLE_JSON1 -endif - ifeq ($(BR2_PACKAGE_SQLITE_ENABLE_UNLOCK_NOTIFY),y) SQLITE_CFLAGS += -DSQLITE_ENABLE_UNLOCK_NOTIFY endif +ifeq ($(BR2_PACKAGE_SQLITE_OMIT_JSON),y) +SQLITE_CFLAGS += -DSQLITE_OMIT_JSON +endif + ifeq ($(BR2_PACKAGE_SQLITE_SECURE_DELETE),y) SQLITE_CFLAGS += -DSQLITE_SECURE_DELETE endif
Signature · 6 lines
2.43.0 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Quoted 9 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Michael" == Michael Nosthoff via buildroot <[email protected]> writes:
Since SQLite 3.38 [0] the JSON extension is enabled by default. A new Option was introduced to actively disable the extension. [1]
I chose to deprecate the old option and replace it by one to disable it. This should avoid breakage for setups where the json extension is used but was never actively activated.
Quoted 8 lines
- drop
BR2_PACKAGE_SQLITE_ENABLE_JSON1
- addBR2_PACKAGE_SQLITE_ENABLE_JSON1to the deprecation list
- add new optionBR2_PACKAGE_SQLITE_OMIT_JSON[0] https://sqlite.org/releaselog/3_38_0.html
[1] https://sqlite.org/json1.html#compiling_in_json_supportSigned-off-by Michael Nosthoff <[email protected]>
Good catch! Having a negative option is not so nice and the JSON support is quite small compared to the size of sqlite so I instead just unconditionally enabled JSON support to match upstream:
-rwxr-xr-x 1 peko peko 1470368 Mar 12 10:50 output-without/target/usr/lib/libsqlite3.so.0.8.6 -rwxr-xr-x 1 peko peko 1530232 Mar 12 10:46 output-with/target/usr/lib/libsqlite3.so.0.8.6
E.G. a delta of 59864 bytes or 3.9%
Committed with that change, thanks.
Signature · 5 lines
Bye, Peter Korsgaard _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot