Repository navigation
feat(packaging): install linux.share files and AppStream metadata under /usr/share - #2200
Conversation
b2e36c1 to
0efb54f
Compare
|
Reviewed. The change looks right to me. It can't be merged yet: it now conflicts with main in |
…r/share The Debian and Arch packages installed only the app's desktop entry, icon and MIME types outside /opt/<slug>, so they shipped no AppStream metadata and an app had no way to ship files the system reads from /usr/share. The packages now install AppStream metadata at /usr/share/metainfo/<id>.metainfo.xml, written as a Flatpak's is but naming a license only from linux.license, no content rating, and Utility as its category without linux.categories; linux.share names a directory whose tree they install under /usr/share. Its metainfo/<id>.metainfo.xml replaces NSGo's, and a file at a path the package holds, or where it needs a directory, fails the build. The AppImage holds the same files in its AppDir's usr/share, with a link to its desktop entry in usr/share/applications, which the metadata's launchable names.
0efb54f to
b4fe1c3
Compare
|
Thanks for the review. Rebased onto main: kept main's Windows bullet and this PR's Linux bullet in docs/architecture/tool.md. The Linux, AppImage and Flatpak packaging tests and the changelog check pass. |
|
The failing |
|
Reviewed. The rebase keeps main's Windows bullet and this PR's Linux bullet in |
Why
The
.deband Arch packages install the app under/opt/<slug>, and outside it only the desktop entry, icons and MIME types. They ship no AppStream metadata, so software centers have nothing to read. An app also has no way to install other files the system reads from/usr/share, such as shell completions, manual pages or a richer metainfo file. A file staged underresources/usr/sharelands in/opt/<slug>/usr/share, where nothing looks.What changed
.deband Arch packages install/usr/share/metainfo/<id>.metainfo.xml, from the same template the Flatpak uses. It names a license only whenlinux.licenseis set, has no content rating, and usesUtilityas its category whenlinux.categoriesis empty, as AppStream requires one.linux.share: a directory, relative tonsgo.yaml, whose tree the packages install under/usr/share.metainfo/<id>.metainfo.xmlreplaces the generated one.applications), fails the build.usr/share, plus a relative linkusr/share/applications/<id>.desktopto the desktop entry at its top, which the metadata's<launchable>names. The link goes through the same collision check.Scope
nsgotool (Linux packaging) and Linux.Tradeoffs
linux.share.resources/still stay in/opt/<slug>.linux.share.Blast Radius
Linux
.deband Arch packages and AppImages built by NSGo: each gains a metainfo file, and the AppImage a desktop link.linux.shareis opt-in. Flatpak and other targets are unaffected.Verification
go tool nsgo check,go tool nsgo check -target linux, the changelog check, and the Linux, AppImage and Flatpak packaging tests in./cmd/nsgo..deband Arch packages, with nothing underopt/<slug>/usr;applicationsormetainfo, a resource at the link's path, and a resource namedusr.appstreamcli validate-treein review.Checklist: the title is a Conventional Commit; the docs whose facts change are updated; the change has a
changelog.d/fragment; no new third-party code, assets or dependencies.