Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make SQLite and GPKG drivers work with a sqlite3 built with -DSQLITE_TRUSTED_SCHEMA=0 #8516

Merged
merged 7 commits into from
Oct 11, 2023

Conversation

rouault
Copy link
Member

@rouault rouault commented Oct 4, 2023

Fixes #8514

@coveralls
Copy link
Collaborator

coveralls commented Oct 4, 2023

Coverage Status

coverage: 67.689% (+0.003%) from 67.686% when pulling b4755d9 on rouault:fix_8514 into 534f1e8 on OSGeo:master.

@rouault rouault merged commit 4ae8505 into OSGeo:master Oct 11, 2023
30 checks passed
@rouault
Copy link
Member Author

rouault commented Oct 11, 2023

The backport to release/3.7 failed:

The process '/usr/bin/git' failed with exit code 1
stderr
error: could not apply 6dfc963065... Add OGRSQLiteRTreeRequiresTrustedSchemaOn() (refs #8514)
hint: After resolving the conflicts, mark them with
hint: "git add/rm <pathspec>", then run
hint: "git cherry-pick --continue".
hint: You can instead skip this commit with "git cherry-pick --skip".
hint: To abort and get back to the state before "git cherry-pick",
hint: run "git cherry-pick --abort".

stdout
Auto-merging ogr/ogrsf_frmts/gpkg/ogr_geopackage.h
Auto-merging ogr/ogrsf_frmts/gpkg/ogrgeopackagedatasource.cpp
Auto-merging ogr/ogrsf_frmts/gpkg/ogrgeopackagetablelayer.cpp
[backport-8516-to-release/3.7 5e8d9622b9] GPKG: declare OGR_GPKG_GeometryTypeAggregate_INTERNAL only when needed
 Author: Even Rouault <even.rouault@spatialys.com>
 Date: Wed Oct 4 14:22:45 2023 +0200
 3 files changed, 128 insertions(+), 184 deletions(-)
Auto-merging ogr/ogrsf_frmts/gpkg/ogrgeopackagedatasource.cpp
[backport-8516-to-release/3.7 07619f40da] GPKG/SQLITE: declare relevant SQL functions as SQLITE_INNOCUOUS (refs #8514)
 Author: Even Rouault <even.rouault@spatialys.com>
 Date: Wed Oct 4 18:36:29 2023 +0200
 2 files changed, 48 insertions(+), 58 deletions(-)
[backport-8516-to-release/3.7 605a8aa9ef] SQLite: turn PRAGMA trusted_schema = 1 when loading Spatialite (refs #8514)
 Author: Even Rouault <even.rouault@spatialys.com>
 Date: Wed Oct 4 18:38:22 2023 +0200
 4 files changed, 109 insertions(+), 17 deletions(-)
Auto-merging ogr/ogrsf_frmts/sqlite/ogrsqliteutility.cpp
Auto-merging ogr/ogrsf_frmts/sqlite/ogrsqliteutility.h
CONFLICT (content): Merge conflict in ogr/ogrsf_frmts/sqlite/ogrsqliteutility.h

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-release/3.7 release/3.7
# Navigate to the new working tree
cd .worktrees/backport-release/3.7
# Create a new branch
git switch --create backport-8516-to-release/3.7
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick 78efa59719ae3567a0bbc02e62d37ff5d858894f,4d3c1d4d2450ab01e6534ee59b99e0175ee290ed,f9846d52ff9b983d4f2ae6eab9aa9eabdb8726f3,6dfc9630652a9b58820bca29be47bfe603403524,b827f22bae8f1b48cba2cf3bf18099dceabb9229,4d6bb03a913e8fa158972fe3130ffa8d3141291d,b4755d9444b8ad738c1e7366eaf550d6b249d70c
# Push it to GitHub
git push --set-upstream origin backport-8516-to-release/3.7
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-release/3.7

Then, create a pull request where the base branch is release/3.7 and the compare/head branch is backport-8516-to-release/3.7.

@rouault
Copy link
Member Author

rouault commented Oct 11, 2023

manual backport to 3.7 in #8541

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants