Skip to content

snapd.service: skip device registration; drone: no pull_request builds#6

Open
cyberb wants to merge 2 commits into
masterfrom
disable-device-registration
Open

snapd.service: skip device registration; drone: no pull_request builds#6
cyberb wants to merge 2 commits into
masterfrom
disable-device-registration

Conversation

@cyberb

@cyberb cyberb commented Jul 7, 2026

Copy link
Copy Markdown
Member

Two small fork-shrinking / CI changes.

1. Skip device registration (config, replaces closed #3)

Syncloud runs no serial vault, so snapd's default registration always fails, leaving a perpetual "Initialize device" error in snap changes. Add one ExecStartPre to the shipped snapd.service that creates the upstream /run/snapd/noregister marker before snapd starts:

ExecStartPre=/bin/sh -c 'mkdir -p /run/snapd && touch /run/snapd/noregister'

ensureOperational() already honours that marker and skips registration — a built-in upstream feature, so no forked Go code (unlike the closed #3 which patched devicestate). Verified on an arm64 device: the marker stops new errored "Initialize device" changes on restart.

2. Drone: don't build on pull_request

Every pull_request build was red — the artifact step needs the artifact_key secret, which drone withholds from PR events. Drop pull_request from the trigger (run only on push/tag). Validated with drone lint. (This also means this PR gets a clean green push build instead of a red PR build.)

cyberb added 2 commits July 7, 2026 19:25
Syncloud runs no serial vault, so snapd's default device registration
always fails, leaving a perpetual 'Initialize device' error in
snap changes (the trusted-baked account-key clashes with the ancillary
account-key streamed during the serial request).

Create the upstream /run/snapd/noregister marker in ExecStartPre so
ensureOperational() skips registration entirely. Config-only: keeps the
asserts/devicestate code fully upstream and supersedes the
fix-device-serial-trusted-clash fork patch (PR #3), which only silenced
the clash while still attempting registration.

Verified on an arm64 device: with the marker present a snapd restart no
longer spawns a new errored Initialize device change.
pull_request builds are red anyway: the artifact step uses the
artifact_key secret, which drone withholds from pull_request events, so
every PR build fails at that step even though build/test pass. Drop the
pull_request trigger so the pipeline runs only on push and tag.
@cyberb cyberb changed the title snapd.service: skip device registration (config, replaces PR #3) snapd.service: skip device registration; drone: no pull_request builds Jul 8, 2026
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.

1 participant