Commit Graph
3 Commits
Author SHA1 Message Date
gitops 73867a5d6a Install as the session, at upstream's paths
Eight files: upstream's six, where upstream puts them, plus this fork's
start-hyprcosmic and hyprcosmic.desktop. Replaces the private libexec
prefix, matching the same change in cosmic-comp.

A machine that installs this gets its cosmic-session from here, so there
is nothing else on disk to provide the systemd target, the mimeapps list
or the dconf profile. Omitting them produced a session that started and
then had no user target for the portals to attach to, which surfaces much
later and much less clearly than a missing file.

Both session entries are installed and both are served by these binaries.
Replacing COSMIC need not mean removing its shell, and keeping
cosmic.desktop costs one file while preserving the one property worth
keeping from the beside-install layout: if the HyDE shell will not start,
there is still something on the greeter's menu that will.

start-hyprcosmic now names /usr/bin for both binaries, still through
overridable variables so the check below it can say which path was
missing and so the session still runs out of a build tree.

The dconf asymmetry is deliberate and now asserted in CI, because it is
easy to get backwards once both scripts are installed: start-cosmic is
sed'd to an absolute profile path, as upstream does; start-hyprcosmic is
not, because it searches /etc/dconf/profile and XDG_DATA_DIRS at runtime
and pinning a build prefix would break an administrator's override.
2026-08-10 18:21:42 +07:00
gitops 8ff1e72d3e test: follow the autostart template off its author's home directory, and let CI compile
The template it parses stopped naming /home/dingo, so the two assertions that
named it had to move with it: the bar is now an `sh -c` invocation rather than a
bare waybar, and the wallpaper path is $HOME. The wallpaper assertion keeps the
surrounding double quotes in the expected string deliberately -- dropping them
is what would split the path at a space in someone's home directory, which is
the failure the test exists to catch.

Adds a ratchet: no line in the shipped autostart may contain "/home/". Both
lines carried an author's home directory right up until the repository was about
to be published, which is a bad moment to find out.

CI is fixed at the same time, because it could never have run these two tests.
They read ../config/autostart through include_str!, so the crate does not
compile its own test profile unless the parent repository is its parent
directory -- and a workflow checkout puts this repository at the workspace root,
alone. Confirmed by building a standalone export of HEAD:

    error: couldn't read `.../standalone/../config/autostart`: No such file
    error: could not compile `cosmic-session` (bin "cosmic-session" test)

So the job now checks the parent out first and this repository over the top of
where its submodule sits, which is the layout the working tree already has. The
coupling is worth keeping: the point of those tests is that the template this
session actually ships still parses to the commands it documents, and a copy
vendored in here to make the build self-contained would be a copy that goes
stale without anyone noticing.

The three dependency-install steps override working-directory back to the
workspace root, since they run before the checkout that creates the directory
the job otherwise defaults to, and a run step whose working-directory does not
exist fails before it runs anything.
2026-08-10 17:13:34 +07:00
gitops 03cd10c0d9 ci: build on three distros, and assert the four dangerous files stay unwritten
Upstream ships no workflows here, so nothing is displaced; the file is named
hyprcosmic.yml anyway, to match the compositor fork where ci.yml is already
upstream's.

A lighter matrix than the compositor's, because this crate has no system
libraries to find -- what actually varies per distribution is the toolchain and
`just`. Rust comes from rustup for the same reason as in cosmic-comp: bookworm
ships rustc 1.63 against a crate that needs 1.93 and edition 2024. `just` comes
from the distribution on Fedora and Arch and from crates.io on Debian, which has
no such package until trixie.

The assertions are the reason this exists. Until recently `just install` wrote
/usr/bin/cosmic-session, cosmic.desktop, the systemd target and the mimeapps
list -- all files the distribution's own cosmic-session package owns. Anyone who
cloned this repository and ran the documented build command replaced their
working COSMIC session with this one, and had nothing left to log into when the
fork failed to start. The negative tests are the important half: it is the files
that must NOT appear that made the old recipe dangerous, and a `test ! -e` is
the only thing that will notice if one of them comes back.

The session scripts are checked off the matrix, on a bare runner. Shell does not
vary by distribution, and doing it there avoids naming the shellcheck package in
three package managers to check the same file three times. Both scripts are
parsed, because a syntax error in either is a black screen at login with nowhere
to print the reason. Only start-hyprcosmic is linted: start-cosmic is upstream's,
this fork no longer installs it, and its existing findings are not ours to
rewrite.
2026-08-10 16:54:38 +07:00