Files
hyprcosmic/packaging/arch/PKGBUILD
T
gitops 5f521529a8 packages: fix the three packaging failures, none of which were the build
Run 31394740824 compiled all 27 components on all three distributions --
two and a half hours each -- staged them, passed the completeness
assertions, and then failed in the packaging step on every one. Three
separate causes, none of them the desktop.

desktop-file-validate rejects DesktopNames (fedora, arch)

    hyprcosmic.desktop: error: file contains key "DesktopNames" in group
    "Desktop Entry", but keys extending the format should start with "X-"

DesktopNames is the key a display manager reads to set
XDG_CURRENT_DESKTOP, so a session entry needs it, but the Desktop Entry
Specification registers keys for application launchers and the validator
has no entry for it. This is not something the fork introduced:
cosmic.desktop is upstream cosmic-session's file, unchanged apart from the
Exec path, and the copy already installed on this machine as
cosmic-session-1.5.0-1.fc44 fails the identical check. Dropping the key
would satisfy the validator and break the session.

So the validation moves out of the three packaging recipes into one step
against the staged tree, and checks what desktop-file-validate would not
have caught anyway: that Exec is absolute and names an executable this
package actually installs. A wrong Exec puts an entry on the greeter's
menu that dies silently when it is chosen, which is the failure that
matters here; a key the validator has not heard of is not.

The check was run against a staged tree built from the real desktop files
before committing: it passes clean, and it rejects an Exec naming a binary
that is not in the tree, an Exec that exists but is not executable, a
relative Exec, a missing DesktopNames, a missing Name, a missing [Desktop
Entry] header and Type=Link, each with a message saying which file and
what.

SIGPIPE under pipefail (debian, and arch next)

    dpkg-deb: error: tar subprocess was killed by signal (Broken pipe)

The Debian package built: 217 MB, correct control, Depends computed by
dpkg-shlibdeps across 17 libraries. It failed on `dpkg-deb --contents
dist/*.deb | head -20` in the verify step -- head closes the pipe after
twenty lines, dpkg-deb dies of SIGPIPE, and Actions runs these steps with
pipefail. Both now write to a file and head the file. The Arch verify step
had the same line waiting for it and is fixed in the same way.

bogus date in %changelog (fedora)

10 August 2026 is a Monday.

Also: the PKGBUILD still pointed at tools/make-packages.sh, which was
deleted when packaging moved to Actions. It now names the two commands
that stage a tree and build from it by hand.
2026-08-10 23:23:35 +07:00

69 lines
3.4 KiB
Bash

# HyprCosmic, as one Arch package.
#
# There is no build() here, and no source array. This PKGBUILD packages a tree
# that `just install` has already staged, which tools/make-packages.sh points at
# through $HYPRCOSMIC_STAGEDIR. The reasoning is in packaging/fedora/hyprcosmic.spec
# and applies identically: building 27 Rust components a second time under
# makepkg, to produce bytes that already exist, costs hours and creates a way
# for the packaged desktop and the built one to drift apart.
#
# The consequence, same as there: this package is only valid on the Arch that
# built it. make-packages.sh builds it inside archlinux:base-devel so that is a
# current Arch rather than whatever the host is.
pkgname=hyprcosmic
pkgver=${HYPRCOSMIC_VERSION:-0.1.0}
pkgrel=1
pkgdesc="COSMIC configured in Hyprland's idiom, with a HyDE shell"
arch=('x86_64')
url="https://github.com/outbackdingo/hyprcosmic"
license=('GPL-3.0-only')
# The HyDE shell. Without these the session starts to a blank screen: no bar,
# no launcher, no wallpaper.
depends=('waybar' 'rofi-wayland' 'wayland' 'libxkbcommon' 'libinput' 'seatd'
'mesa' 'pixman' 'libdisplay-info' 'systemd-libs')
# awww is in the AUR rather than in the repositories, so it cannot be a hard
# depends without making the package uninstallable for anyone who has not built
# it. Without it there is no wallpaper, which is recoverable; an unsatisfiable
# dependency is not.
optdepends=('awww: wallpaper daemon, required for HyDE theme wallpapers'
'ttf-nerd-fonts-symbols: glyphs the waybar config draws with'
'qt5ct: Qt application theming to match the GTK theme')
# What "complete replacement" means in packaging terms. Every path this writes
# under /usr/bin is one cosmic-comp and cosmic-session also own, so the two
# cannot coexist -- which is correct, they are two builds of the same programs.
#
# conflicts without replaces/provides-driven auto-removal: pacman stops and
# names the conflict rather than quietly removing the desktop the machine is
# currently running.
conflicts=('cosmic-comp' 'cosmic-session')
provides=("cosmic-comp=$pkgver" "cosmic-session=$pkgver")
options=('!strip' '!debug')
package() {
# Points at a tree `just install` has already staged. Failing loudly here
# beats producing an empty package, which is what a bare `cp -a "$unset/."`
# would do. The workflow sets it; by hand it is
# just install "$PWD/stage" /usr
# HYPRCOSMIC_STAGEDIR="$PWD/stage" makepkg --nodeps
if [ -z "$HYPRCOSMIC_STAGEDIR" ] || [ ! -d "$HYPRCOSMIC_STAGEDIR/usr" ]; then
echo "HYPRCOSMIC_STAGEDIR unset or has no usr/; see .github/workflows/packages.yml" >&2
return 1
fi
cp -a "$HYPRCOSMIC_STAGEDIR/." "$pkgdir/"
# No desktop-file-validate on the session entries. It rejects DesktopNames,
# the key a display manager reads to set XDG_CURRENT_DESKTOP, because the
# Desktop Entry Specification registers keys for application launchers and
# these are session files. cosmic.desktop here is upstream cosmic-session's,
# unchanged by this fork apart from the Exec path, and the copy Fedora ships
# as cosmic-session-1.5.0-1.fc44 fails the identical check -- so this is the
# validator's gap, not something the fork introduced. The workflow
# checks what actually matters instead -- that Exec names a file this
# package installs -- against the staged tree, before makepkg sees it.
}