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

Allow build with system-provided libsqlite (dynamically linked) #381

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jirutka
Copy link
Contributor

@jirutka jirutka commented Apr 14, 2023

This is mainly for Linux distributions that package bupstash. Linux distributions generally dislike bundled (statically linked) dependencies, both for security reasons and to save users from wasting network traffic and disk space by having dozens of copies of the same library bundled in different binaries.

Notes:

The modern_sqlite feature of rusqlite is implicitly enabled by the bundled feature, so it's not new here. This feature is needed because it enables libsqlite3-sys/bundled_bindings which is needed for src/fstx2.rs to build (it doesn't build with buildtime_bindgen, dunno why).

sqlite has a very stable API and ABI, so it's not necessary to ensure exact version matching. And it's undesirable when linking with system-provided libsqlite, because it would require rebuilding bupstash every time libsqlite is upgraded to a new patch version (e.g. with fixed security bug). However, I kept the assert and disabled it just for builds without bundled sqlite.

This is mainly for Linux distributions that package bupstash.
Linux distributions generally dislike bundled (statically linked)
dependencies, both for security reasons and to save users from wasting
network traffic and disk space by having dozens of copies of the same
library bundled in different binaries.

Notes:

The `modern_sqlite` feature of rusqlite is implicitly enabled by the
`bundled` feature, so it's not new here. This feature is needed because
it enables `libsqlite3-sys/bundled_bindings` which is needed for
`src/fstx2.rs` to build (it doesn't build with `buildtime_bindgen`, dunno
why).

sqlite has a very stable API and ABI, so it's not necessary to ensure
exact version matching. And it's undesirable when linking with
system-provided libsqlite, because it would require rebuilding bupstash
every time libsqlite is upgraded to a new patch version (e.g. with fixed
security bug). However, I kept the assert and disabled it just for
builds without bundled sqlite.
@bastien-roucaries
Copy link

Debian will need it

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.

2 participants