Skip to content

Refactor packaging: fix PKGBUILD bugs, move config into the tree, clean up wallpapers and CI - #13

Merged
TolisSth merged 18 commits into
mainfrom
refactor-packaging
Nov 12, 2026
Merged

TolisSth merged 18 commits into
mainfrom
refactor-packaging

Conversation

@michadasis

@michadasis michadasis commented Nov 5, 2026 •

Copy link
Copy Markdown
Member

Summary

This is the refactor from #9. The package keeps the same defaults (Breeze Dark, Firefox, no Welcome Center), but it stops shipping broken or unused files, users can finally change their wallpaper, and the config lives in real files instead of heredocs in the PKGBUILD.

Closes #9

Changes

  • Bug fixes
    • The logo was installed as a wallpaper: -iname only matches the basename, so resources/logos/unios.png got past the *logo* filter
    • Dropped the unios.jpg copy of the first wallpaper, nothing used it
    • Dropped the start-here-kde icons: breeze-dark ships its own, and the scalable one was a PNG. distributor-logo stays, breeze-dark doesn't have one
    • qt6-tools in depends for qdbus6 and hicolor-icon-theme for the logo in the hicolor theme (namcap error), firefox in optdepends
    • Removed publish_to_PPA.yml (there's no debian/ anymore) and the debhelper entries in .gitignore
  • Config in the tree: everything package() used to write with heredocs is now under files/, laid out like the paths it installs to. No more RES_DIR guessing, makepkg runs from the checkout. The installed files are the same byte for byte, apart from two comments that moved into kded5rc and plasma-welcomerc
  • Setup script
    • Runs once per user instead of on every login. The marker (~/.local/state/unios/plasma-setup.done) is only written once plasmashell actually ran the script, so a failed login gets another try
    • Sets the wallpaper once instead of twice (plasma-apply-wallpaperimage sent the same evaluateScript again) and no longer touches the global menu applet
    • OnlyShowIn=KDE;, so it doesn't wait 15 seconds for plasmashell on other desktops
  • Wallpapers
    • One KDE wallpaper package each: UniOS, UniOS Patterns and UniOS Dense Patterns. Plasma picks the image by its WxH file name, so the old single pack had no usable image and the patterns could never be picked
    • Scaled from 8001x4501 to 3840x2160, 11.5MB → 3.2MB. The default is still CMYK with its SWOP profile, only resized, so the colours are the same as before in every app
  • backup for the five /etc/xdg files, so local edits survive upgrades and the new version lands as .pacnew
  • CI: builds the package in an archlinux container after shellcheck, desktop-file-validate and jq. namcap runs too but only reports
  • README rewritten
  • pkgrel 10 → 11

The installed package goes from 16MB to 3.2MB.

Notes for reviewers

  • No Makefile from Refactor packaging: fix PKGBUILD bugs, move generated files into the tree, clean up wallpapers and CI #9: it was there to share the install logic with debian/rules, which is gone. No tagged source either: there's no v1.0.0 tag and the build server builds from the checkout, same as UniDesk and UniNews
  • Publishing a GitHub Release on tags isn't done, packages go out through unios-repo
  • kded5rc (Module-kded_plasma_welcome) and plasma-welcomerc (LastSeenVersion, ShowUpdatePage) are checked against the kded and plasma-welcome sources, those are the keys they read
  • On existing installs the setup script runs one more time after the upgrade, since the old default.jpg path is gone, then never again
  • The docs page (UniOS-docs unios-desktop-settings.md) still describes the old layout and needs updating after this is merged

Testing

  • CI builds the package with makepkg in an archlinux container and passes. namcap only warns about dependencies it can't see being used (breeze, plasma-workspace, qt6-tools...) and about bash
  • Ran package() the way makepkg does (set -e) at every commit and diffed the installed files
  • shellcheck is clean and the wallpaper metadata is valid JSON
  • Run-once logic checked with a fake qdbus6: first login, second login, plasmashell failing, no qdbus
  • Wallpaper colours checked against the files on main: the average colour is within 0.03 of a level out of 255
  • Tested on a live ISO, was checked with test.sh on the build server

-iname only looks at the basename, so resources/logos/unios.png got
past the *logo* filter and ended up in the wallpaper pack. Only search
resources/wallpapers instead.
Nothing points at unios.jpg, it was just a second copy of whichever
image find returned first, so another 5MB in the package for nothing.
breeze-dark ships its own start-here-kde, so the copies in hicolor
never got picked up, and the scalable one was a PNG in a directory
meant for SVGs. Kickoff defaults to start-here-kde-symbolic on Plasma 6
anyway, and the setup script already points the launcher at our logo.
- The setup script calls qdbus6, which comes from qt6-tools. We only
  had it because plasma-workspace happens to pull it in
- kdeglobals and mimeapps.list make Firefox the default browser, so
  list it as an optdepend
publish_to_PPA.yml calls dpkg-parsechangelog, but debian/ is gone since
the move to Arch, so every v* tag either failed or skipped. Ignore the
makepkg output instead of the old debhelper files.
The config files and the setup script are about to become real files in
the repo, and a CRLF shebang or desktop entry from a Windows checkout
would break them on Arch.
- Everything package() used to write with heredocs now lives under
  files/, laid out like the paths it installs to, so it can be read,
  diffed and linted like any other file. An unterminated heredoc
  already shipped a broken autostart entry once
- Drop the RES_DIR guessing between three paths. makepkg runs from the
  checkout, so the files are always next to the PKGBUILD
- The installed files are byte for byte the same, apart from the two
  comments that moved from the PKGBUILD into kded5rc and
  plasma-welcomerc
- plasma-apply-wallpaperimage sends the same evaluateScript we run
  right before it, so the wallpaper was being set twice. Drop it
- org.kde.plasma.appmenu is the global menu, not a launcher, it has no
  icon to set
- Quote the qdbus binary and stop naming the loop variable nobody uses
  (shellcheck SC2034)
It reset the wallpaper and the launcher icon on every login, so nobody
could change either of them. Leave a marker in ~/.local/state/unios
after the first run that plasmashell actually accepted and skip the
script from then on. If Plasma never answers, nothing is written and
the next login tries again.
On any other desktop it just waited 15 seconds for a plasmashell that
was never going to answer.
Plasma treats every image in contents/images as a different resolution
of the same wallpaper and picks one by its WxH file name. Ours were
called default.jpg and so on, so nothing matched: the UniOS Wallpapers
entry had no image to show and the patterns could never be picked on
their own.

- UniOS, UniOS Patterns and UniOS Dense Patterns are separate packages
  under resources/wallpapers, installed as they are
- Images are named after their resolution
- The setup script points at the UniOS package instead of a file inside
  it, so Plasma picks the right size by itself
All three were 8001x4501. 3840x2160 is plenty for a wallpaper and takes
them from 11.5MB down to 3.2MB, which is also what every rebuild adds
to unios-pkgs.

The default is still CMYK with its SWOP profile. It's only resized, no
colour conversion, so it looks exactly like before in every app.
Without a backup array pacman overwrote kdeglobals and the rest on
every update, so a machine-wide change, like a lab setting a different
browser, was gone after the next -Syu. An edited file now stays put and
the new one lands next to it as .pacnew.
Replaces the PPA job with one that actually matches how we ship now.
On every push and PR to main it checks the setup script with
shellcheck, the autostart entry with desktop-file-validate and the
wallpaper metadata with jq, then builds the package with makepkg in an
archlinux container. namcap runs on the result but only reports, since
it can't see qdbus6 being called and complains about deps like that.
It still called this the package of our PPA. Say what it installs, how
the repo is laid out, and how to build it, add a wallpaper and release.
The logo goes into hicolor/256x256/apps, and namcap flags it as an
error in CI (Dependency hicolor-icon-theme detected and not included).
We only had it because plasma-workspace pulls it in.
Set #ae73a6 as the accent in the kdeglobals defaults, so highlights,
selections, focus rings and links pick it up on top of Breeze Dark
instead of the stock blue. LastUsedCustomAccentColor is set too, so the
color settings page shows it as the custom color.
@michadasis

Copy link
Copy Markdown
Member Author

Tested with build-test-iso.sh:

  • Breeze dark with unios wallpaper and the launcher logo
  • Plasma welcome doesnt start on startup
  • Wallpapers are in place
  • Firefox is the default browser
  • ~/.local/state/unios/plasma-setup.done exists after install, so script ran once and never again
  • pacman -Q unios-desktop-settings shows 1.0.0-11
  • colorscheme is set to #ae73a6
  • pacman -Sy works

This is ready to get merged

@TolisSth
TolisSth merged commit 3b1a629 into main Nov 12, 2026
1 check passed
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.

Refactor packaging: fix PKGBUILD bugs, move generated files into the tree, clean up wallpapers and CI

2 participants