From 7b1b09b7baaa565c0d9f478e3bf63e5529459b9b Mon Sep 17 00:00:00 2001 From: Sam Thursfield Date: Mon, 21 Jun 2021 19:39:58 +0200 Subject: Add list of supported sqlite3 versions The idea is to test each of these in CI. --- meson.build | 29 ++++++++++++++++++++++++----- sqlite3_versions_tested | 23 +++++++++++++++++++++++ 2 files changed, 47 insertions(+), 5 deletions(-) create mode 100644 sqlite3_versions_tested diff --git a/meson.build b/meson.build index 446ab6baf..ff625eb38 100644 --- a/meson.build +++ b/meson.build @@ -130,29 +130,47 @@ add_project_arguments(debug_cflags, language: 'c') # SQLite #################################################################### +sqlite_version_status = 'supported' + sqlite3_versions_known_bad = configuration_data() # FIXME: use fs.read() once we can depend on Meson 0.57 everywhere. text = run_command('cat', 'sqlite3_versions_known_bad').stdout().strip() foreach line : text.split('\n') parts = line.split(' ') - if parts.length() == 2 + if parts.length() == 2 and not line.startswith('#') version = parts[0] link = parts[1] sqlite3_versions_known_bad.set(version, link) endif endforeach +sqlite3_versions_tested = configuration_data() +text = run_command('cat', 'sqlite3_versions_tested').stdout().strip() +foreach line : text.split('\n') + if not line.startswith('#') + version = line.strip() + sqlite3_versions_tested.set10(line, true) + endif +endforeach + if sqlite3_versions_known_bad.has(sqlite.version()) if get_option('override_sqlite_version_check') - warn('SQlite3 version @0@ is known bad. Ignoring due to -Doverride_sqlite_version_check=true'.format( - sqlite.version())) + warning('SQLite version @0@ is known bad. Ignoring due to -Doverride_sqlite_version_check=true'.format( + sqlite.version())) + sqlite_version_status = 'KNOWN BAD' else link = sqlite3_versions_known_bad.get(sqlite.version()) - error('SQLite3 version is unsafe (@0@).\nSee @1@ for details.\nYou can bypass this check with -Doverride_sqlite_version_check=true'.format( - sqlite.version(), link)) + error('SQLite version is unsafe (@0@).\nSee @1@ for details.\nYou can bypass this check with -Doverride_sqlite_version_check=true'.format( + sqlite.version(), link)) endif endif +if not sqlite3_versions_tested.has(sqlite.version()) + warning('SQLite version @0@ is not currently tested in Tracker CI. If this is a new release, please open a merge request adding it to `sqlite3_versions_tested`. If this is a very old release, be aware that this configuration is not supported by Tracker upstream.'. + format(sqlite.version())) + sqlite_version_status = 'unsupported' +endif + ################################################################## # Check for libtracker-common, make sure libstemmer exists ################################################################## @@ -387,6 +405,7 @@ summary = [ ' Debug: ' + get_option('debug').to_string(), ' Optimization: ' + get_option('optimization'), ' Compiler: ' + cc.get_id(), + ' SQLite version: ' + sqlite.version() + ': ' + sqlite_version_status, '\nFeature Support:', ' Unicode support library: ' + unicode_library_name, ' Use external FTS module: ' + (not sqlite3_has_builtin_fts5).to_string(), diff --git a/sqlite3_versions_tested b/sqlite3_versions_tested new file mode 100644 index 000000000..e42cfada9 --- /dev/null +++ b/sqlite3_versions_tested @@ -0,0 +1,23 @@ +# List of SQLite versions that Tracker CI is testing. +# See: https://sqlite.org/chronology.html + +# Released 2021-06-18 +3.36.0 +3.35.5 +3.35.4 +3.35.3 +3.35.2 +3.34.1 +3.34.0 +3.33.0 +3.32.3 +3.32.2 +3.32.1 +3.32.0 +3.31.1 +3.31.0 +# Released 2019-10-10 +3.30.1 +3.30.0 +# Released 2019-07-10 +3.29.0 -- cgit v1.2.1