Skip to content

Port to zbus 6 - #610

Merged
bilelmoussaoui merged 2 commits into
linux-credentials:mainfrom
domenkozar:feat/zbus6
Oct 26, 2026
Merged

bilelmoussaoui merged 2 commits into
linux-credentials:mainfrom
domenkozar:feat/zbus6

Conversation

@domenkozar

@domenkozar domenkozar commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Move oo7's D-Bus client, daemon, CLI, and portal to zbus 6. Together with the GVariant split already merged in #552, this removes the standalone zvariant, zvariant_derive, and zbus_names packages from the workspace lockfile.

  • Use zbus::wire types, Variant/OwnedVariant, and as_variant adapters, retaining the existing Secret Service signatures and GNOME double-wrapped variant handling.
  • Adapt deferred builder validation, request-name flags, owned property deserialization, and the standard Unix sockets required by the peer-to-peer test harness.
  • Preserve the public tokio and async-std features, mapping the latter to zbus/default-rt. Keep zgvariant for keyring files and the PAM socket protocol.
  • Remove the daemon's unused enumflags2 dependency.

Applications passing connections to oo7 must use zbus 6, available through oo7::zbus.

Use upstream ashpd's main branch, which includes the zbus 6 migration from bilelmoussaoui/ashpd#491. Cargo.lock records commit 0bced661a0b2cb851e52f1f87c5b79d930537b64. Replace the Git dependency with a released ashpd version and remove its deny.toml source allowance before publishing.

The checksum comparison explicitly converts the MD5 output to a byte slice so it continues to compile when Cargo feature unification enables hybrid-array/subtle, preserving the constant-time comparison.

Validation after rebasing onto main:

  • cargo check --workspace --locked.
  • cargo test -p oo7 -p oo7-daemon --features oo7/schema --locked: 240 passed, 2 ignored, including client and daemon tests and doctests.
  • cargo clippy --workspace --all-targets --locked -- -D warnings.
  • cargo check -p oo7 --no-default-features --features async-std,native_crypto,schema --locked.
  • Nightly cargo fmt --all --check and git diff --check.
  • cargo-deny check bans licenses sources: all pass.

Prepared with Codex.

Comment thread client/README.md Outdated
@github-actions

github-actions Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

📊 Code Coverage Report

Metric Value
Current PR Coverage 83.40%
Main Branch Coverage 83.34%
Coverage Change 📈 +0.06%

Coverage report generated by cargo-tarpaulin

Comment thread Cargo.toml Outdated

[workspace.dependencies]
ashpd = { version = "0.13", default-features = false }
# Temporary until https://github.com/bilelmoussaoui/ashpd/pull/491 is released.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

see this

@bilelmoussaoui

Copy link
Copy Markdown
Collaborator

Please update this and point it to the main branch of ashpd as the changes have landed so we can merge this already

Comment thread client/README.md Outdated
- Integration with the [Secret portal](https://flatpak.github.io/xdg-desktop-portal/docs/doc-org.freedesktop.portal.Secret.html) if sandboxed
- Provide API to migrate from host secrets to sandboxed ones

## D-Bus API migration

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be squashed with the previous commit.

pub(crate) fn verify_checksum_md5(digest: impl AsRef<[u8]>, content: impl AsRef<[u8]>) -> bool {
let mut hasher = Md5::new();
hasher.update(content.as_ref());
hasher.finalize_fixed().ct_eq(digest.as_ref()).into()

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The commit doesn't say why this change is needed?

Comment thread Cargo.toml
[workspace.dependencies]
# Temporary until https://github.com/bilelmoussaoui/ashpd/pull/491 is released.
ashpd = { version = "0.13", git = "https://github.com/domenkozar/ashpd.git", rev = "718c60e4786923916860daacec69295be7cef8bb", default-features = false }
# Temporary until ashpd's zbus 6 support is released.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Squash with the first commit as well & needs a rebase to resolve the conflict.

When Cargo feature unification enables hybrid-array/subtle, the MD5 output has an array-specific ConstantTimeEq implementation. Method resolution then expects an array reference, but the supplied digest is a byte slice, so compilation fails. Convert the output to a slice before comparing to select the slice implementation consistently and preserve the constant-time comparison.
@bilelmoussaoui
bilelmoussaoui merged commit 2e6f97b into linux-credentials:main Oct 26, 2026
16 of 17 checks passed
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