Skip to content

build: Add a reference Arch Linux PKGBUILD - #269

Open
kpanuragh wants to merge 1 commit into
linux-credentials:mainfrom
kpanuragh:arch-packaging
Open

kpanuragh wants to merge 1 commit into
linux-credentials:mainfrom
kpanuragh:arch-packaging

Conversation

@kpanuragh

Copy link
Copy Markdown
Contributor

Follow-up to #232: a reference PKGBUILD kept in the repo, plus Arch build docs.

distrib/arch/PKGBUILD builds credentialsd-git from the main branch. It is based on the current AUR credentialsd package, with two differences:

  • It installs with meson install --no-rebuild instead of patching the Cargo targets. The targets are build_always_stale, so a plain meson install reruns cargo build in package(). The AUR package works around that by removing build_always_stale, which also stops development builds from rebuilding.
  • options=(!lto) stays, now with a comment saying why: makepkg's -flto compiles hidapi to GCC LTO objects, and rust-lld then fails with undefined hid_* symbols. I hit this when building without it.

BUILDING.md

  • Arch Linux dependencies: an install command next to the Debian and Fedora ones, plus a short section on building the package.
  • portals.conf: xdg-desktop-portal only enables the Credential portal when portals.conf selects credentialsd for org.freedesktop.impl.portal.experimental.Credential. Most desktops' portals.conf defaults list only their own backends (e.g. hyprland;gtk or gnome;gtk), so the portal never exports the interface. This applies to every distro, so it's documented in the patched-portal section.

Testing

  • makepkg build: succeeds, and all 5 meson tests pass in check(). Nothing is recompiled in package().

  • pkgctl build in a clean chroot: succeeds, so the dependency lists are complete.

  • namcap: only flags the Maintainer tag, and publicsuffix-list, which the daemon reads at runtime and namcap can't detect.

  • The pacman command in BUILDING.md resolves every package.

  • End to end on Arch (Hyprland), I installed credentialsd-git and the AUR xdg-desktop-portal-credentialsd and called CreateCredential through org.freedesktop.portal.Desktop. The client ran in an app-firefox-*.scope, so the portal resolved it to the firefox app ID. With the portals.conf line added:

    • D-Bus activated both installed services;
    • entering the PIN on a USB security key (virtual-fido over USB/IP) created the credential, with response code 0 and a registration_response_json.

    Without the line, the portal had no org.freedesktop.portal.experimental.Credential interface.

Not included: the existing Debian and Fedora dependency commands in BUILDING.md put # comment lines inside \ continuations, which ends the command at the first comment. The new Arch block avoids that. I left the other two alone because .deb packaging (#268) is in progress.

Add distrib/arch/PKGBUILD, a credentialsd-git package that builds the
main branch, as suggested in linux-credentials#232. It installs with
`meson install --no-rebuild`, so the AUR package's patch to the Cargo
targets is no longer needed, and disables LTO because makepkg's -flto
turns hidapi into GCC LTO objects that rust-lld can't link.

Document the Arch build dependencies and the package in BUILDING.md.
Also document that xdg-desktop-portal only enables the Credential portal
when portals.conf selects credentialsd for it: most desktops' default
portals.conf lists only their own backends, so the portal isn't exported
without that line.
@iinuwa

iinuwa commented Nov 14, 2026

Copy link
Copy Markdown
Member

@michaelbeaumont, do you want to look this over?

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