Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions credentialsd-ui/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,6 @@ else
application_id = base_id
endif

meson.add_dist_script(
meson.project_source_root() / 'build-aux/dist-vendor.sh',
meson.project_build_root() / 'meson-dist' / gui_executable_name
+ '-'
+ version,
meson.project_source_root(),
)

if get_option('profile') == 'development'
# Setup pre-commit hook for ensuring coding style is always consistent
message('Setting up git pre-commit hook..')
Expand Down
8 changes: 0 additions & 8 deletions credentialsd/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,6 @@ else
application_id = base_id
endif

meson.add_dist_script(
meson.project_source_root() / 'build-aux/dist-vendor.sh',
meson.project_build_root() / 'meson-dist' / backend_executable_name
+ '-'
+ version,
meson.project_source_root(),
)

if get_option('profile') == 'development'
# Setup pre-commit hook for ensuring coding style is always consistent
message('Setting up git pre-commit hook..')
Expand Down
39 changes: 39 additions & 0 deletions distrib/debian/README.source
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
credentialsd for Debian
=======================

Source tarball
--------------

The package builds without network access, from the Rust crates in vendor/.
Git does not contain them, so the .orig tarball is the one that `meson dist`
produces, which adds vendor/ and a .cargo/config that points Cargo at it
(build-aux/dist-vendor.sh). Releases up to 0.4.0 contain neither this
packaging nor the fix that lets `meson dist` vendor the crates, so build
from a git checkout that has both, and give the package a snapshot version:

cd credentialsd
meson setup _dist -Dfeature_demo_client=disabled
meson dist -C _dist --no-tests --formats xztar
VERSION=$(meson introspect --projectinfo _dist | jq -r .version)
cd ..
cp credentialsd/_dist/meson-dist/credentialsd-$VERSION.tar.xz \
credentialsd_$VERSION.orig.tar.xz

Upstream keeps this packaging in distrib/debian/. Copy it to debian/ in
the unpacked tarball, set the version in debian/changelog (for example with
`dch -v $VERSION+git$(date +%Y%m%d)-1`, which also needs the .orig tarball
renamed to match), and build:

tar xf credentialsd_$VERSION.orig.tar.xz
cp -r credentialsd-$VERSION/distrib/debian credentialsd-$VERSION/debian
cd credentialsd-$VERSION
dpkg-buildpackage -us -uc

Vendored crates
---------------

Building against vendored crates is fine for third-party repositories such
as the openSUSE Build Service. The Debian archive
expects each crate to be packaged on its own (see the Debian Rust team
policy), so an upload to Debian has to replace vendor/ with Build-Depends
on librust-*-dev packages.
5 changes: 5 additions & 0 deletions distrib/debian/changelog
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
credentialsd (0.4.0-1) UNRELEASED; urgency=medium

* Initial packaging.

-- K Panuragh <kpanuragh@gmail.com> Sat, 14 Nov 2026 12:00:00 +0000
97 changes: 97 additions & 0 deletions distrib/debian/control
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
Source: credentialsd
Section: utils
Maintainer: K Panuragh <kpanuragh@gmail.com>
Build-Depends:
debhelper-compat (= 13),
appstream <!nocheck>,
blueprint-compiler (>= 0.20.4),
cargo (>= 1.92),
clang,
dbus-daemon <!nocheck>,
gettext,
libclang-dev,
libdbus-1-dev,
libglib2.0-dev,
libglib2.0-dev-bin,
libgtk-4-dev,
libnfc-dev (>= 1.8.0),
libpcsclite-dev (>= 2.0.3),
libssl-dev,
libudev-dev,
libxml2-utils,
meson (>= 1.5.0),
ninja-build,
pkgconf,
rustc (>= 1.92),
systemd-dev,
zip,
Standards-Version: 4.7.4
Rules-Requires-Root: no
Homepage: https://github.com/linux-credentials/credentialsd
Vcs-Browser: https://github.com/linux-credentials/credentialsd
Vcs-Git: https://github.com/linux-credentials/credentialsd.git

Package: credentialsd
Architecture: linux-any
Depends:
publicsuffix,
${misc:Depends},
${shlibs:Depends},
Recommends:
credentialsd-ui,
dbus-user-session,
Suggests:
credentialsd-webextension,
Description: credential manager service with WebAuthn/passkey support
credentialsd is a D-Bus service that lets applications create and use
WebAuthn credentials (passkeys) with security keys over USB, NFC and
hybrid (caBLE) transports.
.
This package contains the daemon, its D-Bus activation file and systemd
user unit.
.
Applications reach the service through the experimental Credential
interface of xdg-desktop-portal, which is not in upstream
xdg-desktop-portal yet and needs a patched build of it.

Package: credentialsd-ui
Architecture: linux-any
Depends:
credentialsd (= ${binary:Version}),
${misc:Depends},
${shlibs:Depends},
Suggests:
xdg-desktop-portal,
Description: credential manager service with WebAuthn/passkey support - GTK UI
credentialsd is a D-Bus service that lets applications create and use
WebAuthn credentials (passkeys) with security keys over USB, NFC and
hybrid (caBLE) transports.
.
This package contains the GTK 4 dialog that asks the user to choose a
device, enter a PIN or confirm a request, and the xdg-desktop-portal
backend description that points the Credential portal at it.

Package: credentialsd-webextension
Architecture: all
Depends:
credentialsd (>= ${source:Version}),
python3,
python3-dbus-next,
${misc:Depends},
Enhances:
firefox,
firefox-esr,
Description: credential manager service with WebAuthn/passkey support - browser helper
credentialsd is a D-Bus service that lets applications create and use
WebAuthn credentials (passkeys) with security keys over USB, NFC and
hybrid (caBLE) transports.
.
This package contains the native messaging host that connects the
credentialsd browser extension to the service, for Firefox builds without
native portal integration, and the unsigned extension archives for
Firefox and Chromium. The native messaging host is registered for
Firefox from the Debian package; Firefox installed as a Snap or Flatpak
does not read it.
.
Release builds of Firefox only install signed extensions; upstream
publishes a signed build of the extension with each release.
42 changes: 42 additions & 0 deletions distrib/debian/copyright
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: credentialsd
Upstream-Contact: https://github.com/linux-credentials/credentialsd/issues
Source: https://github.com/linux-credentials/credentialsd

Files: *
Copyright: 2023-2026 Isaiah Inuwa and the credentialsd contributors
License: LGPL-3.0-only

Files: vendor/*
Copyright: The authors of each crate, as listed in vendor/*/Cargo.toml
License: various
Comment:
vendor/ holds the Rust crates from Cargo.lock, added to the source tarball
by `meson dist` (build-aux/dist-vendor.sh). Each crate's license is given
in its Cargo.toml and license files. All are DFSG-free. The licenses used,
alone, as alternatives or combined, are MIT, Apache-2.0 (with or without
the LLVM exception), BSD-1-Clause, BSD-2-Clause, BSD-3-Clause, 0BSD, ISC,
Zlib, BSL-1.0, Unlicense, Unicode-3.0 and LGPL-2.1-or-later. This stanza needs to be expanded to one per crate before
the package can go into the Debian archive.

Files: debian/*
Copyright: 2026 K Panuragh <kpanuragh@gmail.com>
License: LGPL-3.0-only

License: various
The vendored crates are under the licenses listed in the vendor/*
stanza above; each crate's Cargo.toml names its license and the crate
directory holds the license text.

License: LGPL-3.0-only
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, version 3.
.
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser
General Public License for more details.
.
On Debian systems, the complete text of the GNU Lesser General Public
License version 3 can be found in "/usr/share/common-licenses/LGPL-3".
9 changes: 9 additions & 0 deletions distrib/debian/credentialsd-ui.install
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
usr/bin/credentialsd-ui
usr/lib/systemd/user/xyz.iinuwa.credentialsd.UiControl.service
usr/share/credentialsd-ui
usr/share/dbus-1/services/xyz.iinuwa.credentialsd.UiControl.service
usr/share/glib-2.0/schemas
usr/share/icons
usr/share/locale
usr/share/metainfo
usr/share/xdg-desktop-portal/portals/credentialsd.portal
4 changes: 4 additions & 0 deletions distrib/debian/credentialsd-webextension.install
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
usr/bin/credentialsd-firefox-helper
usr/lib/mozilla/native-messaging-hosts/xyz.iinuwa.credentialsd_helper.json
usr/share/credentialsd/credentialsd-chromium-helper.zip
usr/share/credentialsd/credentialsd-firefox-helper.xpi
4 changes: 4 additions & 0 deletions distrib/debian/credentialsd.install
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
usr/bin/credentialsd
usr/lib/systemd/user/xyz.iinuwa.credentialsd.Credentials.service
usr/share/credentialsd/xyz.iinuwa.credentialsd.Credentials.xml
usr/share/dbus-1/services/xyz.iinuwa.credentialsd.Credentials.service
59 changes: 59 additions & 0 deletions distrib/debian/rules
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
#!/usr/bin/make -f

include /usr/share/dpkg/architecture.mk

# Ubuntu's dpkg-buildflags turn on LTO for C code. The C dependencies that
# Cargo compiles (hidapi) then come out as GCC LTO objects, which the Rust
# linker can't use.
export DEB_BUILD_MAINT_OPTIONS = hardening=+all optimize=-lto

# Crates come from the vendor/ directory in the source tarball, which
# .cargo/config points Cargo at. Keep Cargo's own state out of $HOME.
CARGO_HOME = $(CURDIR)/debian/cargo-home

# Cargo's release profile builds without debug info, which would leave the
# -dbgsym packages empty. dh_strip moves the symbols out of the binaries.
export CARGO_PROFILE_RELEASE_DEBUG = true

# Don't record the build directory in the binaries' debug info.
export RUSTFLAGS += --remap-path-prefix=$(CURDIR)=/usr/src/credentialsd

ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
export CARGO_BUILD_JOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
endif

%:
dh $@

# --libdir=lib: Firefox looks for native messaging manifests in
# /usr/lib/mozilla/native-messaging-hosts, not in the multiarch libdir.
override_dh_auto_configure:
dh_auto_configure -- \
--libdir=lib \
-Dcargo_home=$(CARGO_HOME) \
-Dcargo_locked=true \
-Dcargo_offline=true \
-Dfeature_demo_client=disabled

# The Cargo test targets compile their test binaries first, which takes longer
# than Meson's 30 second default timeout, and parallel runs only wait on
# Cargo's build directory lock.
override_dh_auto_test:
dh_auto_test -- --num-processes=1 --timeout-multiplier=20

# The Cargo targets are always stale, and in compat 13 dh_auto_install runs
# `ninja install`, which would run `cargo build` again. (Compat 14 uses
# `meson install --no-rebuild` itself, but needs debhelper >= 14.)
override_dh_auto_install:
meson install -C obj-$(DEB_HOST_GNU_TYPE) --no-rebuild \
--destdir=$(CURDIR)/debian/tmp

# dh_clean deletes *.orig files, but the vendored crates ship Cargo.toml.orig
# and Cargo checks it against .cargo-checksum.json.
override_dh_clean:
dh_clean -X.orig

# Meson copies these generated files into the source tree at configure time.
execute_after_dh_auto_clean:
rm -rf $(CARGO_HOME)
rm -f credentialsd-ui/src/config.rs credentialsd/tests/config/mod.rs
1 change: 1 addition & 0 deletions distrib/debian/source/format
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.0 (quilt)
6 changes: 6 additions & 0 deletions distrib/debian/source/lintian-overrides
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Files inside the vendored crates (vendor/), which `cargo vendor` copies
# as published on crates.io. None of them are used for a Linux build.
credentialsd source: source-contains-prebuilt-java-object [vendor/*]
credentialsd source: source-contains-prebuilt-wasm-binary [vendor/*]
credentialsd source: source-contains-prebuilt-windows-binary [vendor/*]
credentialsd source: very-long-line-length-in-source-file * [vendor/*]
5 changes: 5 additions & 0 deletions distrib/debian/upstream/metadata
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Bug-Database: https://github.com/linux-credentials/credentialsd/issues
Bug-Submit: https://github.com/linux-credentials/credentialsd/issues/new
Repository: https://github.com/linux-credentials/credentialsd.git
Repository-Browse: https://github.com/linux-credentials/credentialsd
Security-Contact: https://github.com/linux-credentials/credentialsd/security/advisories/new