Skip to content

docs(players): ship descriptors from /usr/share, not /etc - #662

Merged
hifiberry merged 2 commits into
mainfrom
docs/player-descriptor-location
Sep 7, 2026
Merged

hifiberry merged 2 commits into
mainfrom
docs/player-descriptor-location

Conversation

@hifiberry

Copy link
Copy Markdown
Owner

docs/add-your-own-player.md still told plugin authors to install the WebUI descriptor and icon into /etc/hifiberry/players.d — the conffile pattern hifiberry-librespot 0.8.0.10 existed to abolish. dpkg treats a pre-existing file there as a local edit and preserves it for ever, so a device that once had one placed by hand never receives another packaged update to it.

This guide is what third-party player authors follow, so the stale advice propagated the problem rather than merely recording it.

Changes

  • The drop-in file table and the librespot worked example now point at /usr/share/hifiberry/players.d, which configurator has read since 2.17.6.
  • Added a short note on why: a descriptor is package data, /etc remains an administrator's override, and a package should not write the descriptor from its postinst — a file rewritten on every configure shadows the shipped one, destroys any override, and drifts from the packaged copy without anything reporting it.
  • Corrected the librespot example itself, which claimed the postinst creates the descriptor and icon, and listed four files under the heading "three". Only the configserver drop-in is written by a maintainer script.

Found while fixing exactly that drift in the package: hifiberry/hifiberry-librespot#2, where the /etc copy had lost the conflicts_with: ["soloist"] declaration the shipped descriptor carries.

Docs only — no code or packaging changes.

The guide still told plugin authors to install the WebUI descriptor and icon
into /etc/hifiberry/players.d, the conffile pattern that hifiberry-librespot
0.8.0.10 existed to abolish: dpkg treats a pre-existing file there as a local
edit and preserves it for ever, so a device that once had one placed by hand
never receives another packaged update to it.

Point the file table and the librespot worked example at
/usr/share/hifiberry/players.d, which configurator has read since 2.17.6, and
say plainly that /etc remains an administrator's override rather than a place
for a package to write.

Also correct the librespot example itself, which claimed the postinst creates
the descriptor and icon and then listed four files under the heading "three".
Only the configserver drop-in is written by a maintainer script; the rest are
ordinary packaged files.

This guide is what third-party player authors follow, so the stale advice
propagated the problem rather than merely recording it.
Copilot AI lite review requested due to automatic review settings September 7, 2026 09:24
@hifiberry-codereview

hifiberry-codereview Bot commented Sep 7, 2026 •

Copy link
Copy Markdown

Automated review of 94b1667 complete — 1 finding(s) reported in the review below. (16,678 tokens)

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@hifiberry-codereview hifiberry-codereview Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Automated review

This documentation-only update corrects docs/add-your-own-player.md to instruct plugin authors to install descriptors in /usr/share/hifiberry/players.d instead of /etc, preventing dpkg from treating packaged files as local edits and blocking future updates. The change also fixes factual errors in the librespot example regarding maintainer script behavior and file counts.

1 finding(s) (1 low) · reviewed the full diff at 94b1667 · 1 file(s)

Applied the review guidance in .codereview.toml.


Generated by codereview using thufir · 16,678/500,000 tokens over 3 call(s). Findings are machine-generated; verify before acting.


No code changes required — everything is pure drop-in.

**Ship the descriptor and icon under `/usr/share`, not `/etc`.** A descriptor

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔵 LOW: Section 5 still directs plugin authors to /etc, contradicting the new /usr/share guidance

The PR's stated purpose is to stop the guide from telling plugin authors to install the descriptor and icon into /etc/hifiberry/players.d. The new guidance at line 249 explicitly says "Ship the descriptor and icon under /usr/share, not /etc", and the table in section 6 now lists /usr/share paths. However, section 5 ("Register in the Web UI"), which is the primary step-by-step instructional section that authors follow, still reads: "Create /etc/hifiberry/players.d/.json" and "Place an SVG icon at /etc/hifiberry/players.d/icons/.svg". These lines were not changed in this diff.

How it fails: A third-party plugin author follows the guide top-to-bottom. At section 5 they create the descriptor at /etc/hifiberry/players.d/my-player.json and the icon at /etc/hifiberry/players.d/icons/my-player.svg, exactly as instructed. They then reach section 6 and see the table listing /usr/share paths plus the new paragraph saying "Ship the descriptor and icon under /usr/share, not /etc". The guide now contradicts itself: the step-by-step instructions say /etc, the summary and guidance say /usr/share. The author either ships to /etc (reproducing the exact conffile-staleness problem the PR is fixing) or is confused about which path is correct. The PR's stated goal of eliminating the stale /etc advice is not achieved for the section that actually instructs the author where to create the files.

Suggested fix: Update section 5's sub-sections (a) and (b) to use /usr/share/hifiberry/players.d/.json and /usr/share/hifiberry/players.d/icons/.svg, matching the table in section 6 and the new guidance paragraph. For example: "Create /usr/share/hifiberry/players.d/.json:" and "Place an SVG icon at /usr/share/hifiberry/players.d/icons/.svg."

stated-intent · confidence 75%

The previous commit moved the summary table and the librespot example to
/usr/share/hifiberry/players.d but left section 5 -- the step-by-step
instructions an author actually follows -- still saying to create the
descriptor and icon under /etc. The guide contradicted itself: an author
working top to bottom would create the files at /etc exactly as instructed,
then reach a table and a paragraph saying not to.

That reproduces the conffile staleness the change exists to prevent, so the
stale advice survived in the one section where it does the damage.
@hifiberry-codereview

hifiberry-codereview Bot commented Sep 7, 2026 •

Copy link
Copy Markdown

Automated review of 7511b7e complete — no blocking issues found. (7,395 tokens)

@hifiberry-codereview hifiberry-codereview Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Automated review

This documentation update corrects docs/add-your-own-player.md to instruct plugin authors to install descriptors in /usr/share/hifiberry/players.d instead of /etc, preventing dpkg from treating packaged files as local edits and blocking future updates. The change also fixes inaccuracies in the librespot example regarding maintainer script responsibilities and file counts.

No blocking issues found. · reviewed changes since the last review at 7511b7e · 1 file(s)

Applied the review guidance in .codereview.toml.


Generated by codereview using thufir · 7,395/500,000 tokens over 2 call(s). Findings are machine-generated; verify before acting.

@hifiberry
hifiberry merged commit 6f0d6f4 into main Sep 7, 2026
1 check passed
@hifiberry
hifiberry deleted the docs/player-descriptor-location branch September 7, 2026 09:31
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