Skip to content

Make the bundled SQLite an opt-out default feature - #3446

Open
plusky wants to merge 1 commit into
rtk-ai:developfrom
plusky:packaging/optional-bundled-sqlite
Open

Make the bundled SQLite an opt-out default feature#3446
plusky wants to merge 1 commit into
rtk-ai:developfrom
plusky:packaging/optional-bundled-sqlite

Conversation

@plusky

@plusky plusky commented Aug 5, 2026

Copy link
Copy Markdown

Packaging rtk for openSUSE, and this is the one change I cannot make cleanly downstream.

rusqlite = { version = "0.31", features = ["bundled"] } statically links a private copy of SQLite into the binary. For the prebuilt binaries the installer ships that is exactly right — zero dependencies is a feature. For a distribution package it is a blocker: a bundled SQLite has to be tracked and rebuilt separately for every SQLite CVE, and most distribution policies (openSUSE, Fedora, Debian) forbid shipping bundled libraries at all.

This PR moves it behind a feature that is on by default:

[features]
default = ["bundled-sqlite"]
bundled-sqlite = ["rusqlite/bundled"]

Nothing changes for cargo build, cargo install, cargo generate-rpm or .github/workflows/release.yml — the default feature set still bundles. A packager builds with --no-default-features and gets a binary that links the system libsqlite3 and inherits the distribution SQLite updates.

Verified on openSUSE Tumbleweed (aarch64): built against the system SQLite, full test suite green (2584 passed / 0 failed), and the resulting binary resolves libsqlite3.so.0 from /lib64.

Without this I have to carry a downstream patch that deletes the bundled feature outright, which has to be rebased on every release. Happy to rename the feature or adjust the wording if you prefer something else.

libsqlite3-sys's `bundled` feature compiles a private copy of SQLite into
the rtk binary. That is the right default for the prebuilt binaries the
installer ships, but it is a blocker for Linux distribution packages: a
statically linked SQLite has to be tracked and rebuilt separately for
every SQLite CVE, and most distribution policies forbid shipping bundled
libraries outright.

Move it behind a `bundled-sqlite` feature that is on by default, so
nothing changes for `cargo build`, `cargo install` or the release
workflow, while a packager can build with `--no-default-features` and get
a binary that links the system libsqlite3 and inherits the distribution's
SQLite security updates.
@CLAassistant

CLAassistant commented Aug 5, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

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