Skip to content

Port to zgvariant - #552

Merged
bilelmoussaoui merged 2 commits into
linux-credentials:mainfrom
zeenix:zgvariant-port
Aug 18, 2026
Merged

Port to zgvariant#552
bilelmoussaoui merged 2 commits into
linux-credentials:mainfrom
zeenix:zgvariant-port

Conversation

@zeenix

@zeenix zeenix commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

Supersedes #550.

Moves oo7's GVariant usage off the (now-deprecated) zvariant/gvariant feature onto the
standalone zgvariant crate:

  • client uses zgvariant for the keyring file format, and reaches the D-Bus zvariant
    through zbus::zvariant (the same instance ashpd re-exports).
  • The pam module ⇄ daemon socket protocol is an internal wire format (not real D-Bus), so it now
    uses the GVariant encoding via zgvariant on both ends — the pam module and the daemon's
    pam_listener. This drops zvariant from the pam module entirely; it now depends only on
    zgvariant.

Requires zvariant 5.15.0 / zvariant_utils 4.2.0 — the coexistence fix that lets zvariant's D-Bus
format and zgvariant's GVariant format share one build — now published, so the tree resolves
purely from crates.io.

Verified locally: the whole workspace builds, the pam and daemon pam_listener round-trip tests
pass (they exercise the socket wire format end-to-end), and clippy + rustfmt are clean.

Generated by Claude Opus 4.8 (claude-opus-4-8).

@bilelmoussaoui

Copy link
Copy Markdown
Collaborator

pam speaks the D-Bus wire format only (Context::new_dbus), so it keeps a direct,

pam can be switched to use gvariant format

@github-actions

github-actions Bot commented Aug 18, 2026

Copy link
Copy Markdown

📊 Code Coverage Report

Metric Value
Current PR Coverage 83.53%
Main Branch Coverage 83.62%
Coverage Change 📉 -0.09%

Coverage report generated by cargo-tarpaulin

The initial port left the client's D-Bus types still naming a bare
`zvariant`, which no longer resolves now that the crate pulls `zgvariant`
for the keyring file format and reaches D-Bus zvariant through `zbus`.
Import the `zvariant` module from `zbus` so those references keep resolving.

The pam module <-> daemon socket protocol is an internal wire format, not
real D-Bus, so it now uses the GVariant encoding via `zgvariant` on both
ends. This drops zvariant from the pam module entirely (it depends only on
`zgvariant`) and keeps oo7 on a single serialization stack.

Assisted-by: Claude Opus 4.8 (claude-opus-4-8)
@zeenix

zeenix commented Aug 18, 2026

Copy link
Copy Markdown
Contributor Author

pam can be switched to use gvariant format

Done.

@zeenix
zeenix marked this pull request as ready for review August 18, 2026 12:12
@bilelmoussaoui

Copy link
Copy Markdown
Collaborator

lgtm, will merge once there is a release with the changes.

@zeenix

zeenix commented Aug 18, 2026

Copy link
Copy Markdown
Contributor Author

lgtm, will merge once there is a release with the changes.

It's already there.

@bilelmoussaoui
bilelmoussaoui merged commit efaddec into linux-credentials:main Aug 18, 2026
17 checks passed
@zeenix
zeenix deleted the zgvariant-port branch August 18, 2026 14:18
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