From fa12316313e8d2a3e75fd1a788663f42c1c7c854 Mon Sep 17 00:00:00 2001 From: Alessio Attilio Date: Wed, 11 Nov 2026 21:29:23 +0100 Subject: [PATCH 1/2] Add Fedora build and installer tooling --- .github/workflows/fedora-tools-ci.yml | 25 ++++++++++++++ .gitignore | 7 +++- README.md | 7 +++- fedora/README.md | 14 ++++++++ fedora/install-tools.sh | 50 +++++++++++++++++++++++++++ 5 files changed, 101 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/fedora-tools-ci.yml create mode 100644 fedora/README.md create mode 100755 fedora/install-tools.sh diff --git a/.github/workflows/fedora-tools-ci.yml b/.github/workflows/fedora-tools-ci.yml new file mode 100644 index 0000000..bcea147 --- /dev/null +++ b/.github/workflows/fedora-tools-ci.yml @@ -0,0 +1,25 @@ +name: Fedora tools CI + +on: + push: + branches: ["**"] + pull_request: + +jobs: + build-tools: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Build and install Fedora tools + run: | + docker run --rm \ + -v "$GITHUB_WORKSPACE:/workspace:ro" \ + -w /workspace \ + fedora:45 \ + bash -euo pipefail -c ' + PREFIX=/tmp/hyde-tools ./fedora/install-tools.sh + test -x /tmp/hyde-tools/bin/hyq + test -x /tmp/hyde-tools/bin/awww + test -x /tmp/hyde-tools/bin/awww-daemon + ' diff --git a/.gitignore b/.gitignore index a620942..3e9e967 100644 --- a/.gitignore +++ b/.gitignore @@ -27,4 +27,9 @@ # editor/system .DS_Store .* -* \ No newline at end of file +* +!fedora/ +!fedora/** +!.github/ +!.github/workflows/ +!.github/workflows/fedora-tools-ci.yml diff --git a/README.md b/README.md index 855c1ca..cad5694 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,7 @@ # distro -Host Build Scripts for Distros. Yey + +Host build scripts and packaging for HyDE project binaries across distros. + +- `arch/` contains Arch package recipes. +- `fedora/` contains Fedora tooling to build and install upstream binaries + that are not available as Fedora packages. diff --git a/fedora/README.md b/fedora/README.md new file mode 100644 index 0000000..565dc2f --- /dev/null +++ b/fedora/README.md @@ -0,0 +1,14 @@ +# Fedora tools + +`install-tools.sh` builds and installs the Fedora tools HyDE currently +consumes from upstream source: `hyq` (from HyDE-Project/hyprquery), and +`awww` plus `awww-daemon` (from LGFae/awww). Source revisions are pinned in the +script so the same inputs are used by local installs and CI. + +Run it from a Fedora system with `dnf` and `sudo` available: + +```bash +./fedora/install-tools.sh +``` + +The default install prefix is `/usr/local`. Set `PREFIX` to override it. diff --git a/fedora/install-tools.sh b/fedora/install-tools.sh new file mode 100755 index 0000000..b7003e4 --- /dev/null +++ b/fedora/install-tools.sh @@ -0,0 +1,50 @@ +#!/usr/bin/env bash +set -euo pipefail + +# Build and install the Fedora-only tools used by HyDE. +# Override PREFIX to install somewhere other than /usr/local. + +readonly HYPRQUERY_REV="3f860f2ef498e5440f304888fb5880f99e8a2af4" +readonly AWWW_REV="f66e12a76dbc4c669b2f1375f78bce49f5b19d66" +readonly PREFIX="${PREFIX:-/usr/local}" +readonly BUILD_ROOT="$(mktemp -d)" + +cleanup() { + rm -rf "${BUILD_ROOT}" +} +trap cleanup EXIT + +as_root() { + if [[ "$(id -u)" -eq 0 ]]; then + "$@" + else + sudo "$@" + fi +} + +if ! command -v dnf >/dev/null 2>&1; then + echo "This installer requires Fedora's dnf package manager." >&2 + exit 1 +fi + +as_root dnf install -y \ + git cargo cmake make gcc-c++ pkgconf-pkg-config \ + hyprutils-devel lz4-devel libxkbcommon-devel wayland-devel \ + wayland-protocols-devel scdoc + +git clone https://github.com/HyDE-Project/hyprquery.git "${BUILD_ROOT}/hyprquery" +git -C "${BUILD_ROOT}/hyprquery" checkout --detach "${HYPRQUERY_REV}" +cmake -S "${BUILD_ROOT}/hyprquery" -B "${BUILD_ROOT}/hyprquery/build" \ + -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="${PREFIX}" +cmake --build "${BUILD_ROOT}/hyprquery/build" --parallel +as_root cmake --install "${BUILD_ROOT}/hyprquery/build" + +git clone https://codeberg.org/LGFae/awww.git "${BUILD_ROOT}/awww" +git -C "${BUILD_ROOT}/awww" checkout --detach "${AWWW_REV}" +cargo build --manifest-path "${BUILD_ROOT}/awww/Cargo.toml" --release +as_root install -Dm755 "${BUILD_ROOT}/awww/target/release/awww" \ + "${PREFIX}/bin/awww" +as_root install -Dm755 "${BUILD_ROOT}/awww/target/release/awww-daemon" \ + "${PREFIX}/bin/awww-daemon" + +printf 'Installed hyq, awww and awww-daemon under %s/bin\n' "${PREFIX}" From 0e1a7cd47a504967e3d026e64b82d5b7948f5960 Mon Sep 17 00:00:00 2001 From: Alessio Attilio Date: Thu, 12 Nov 2026 04:28:05 +0100 Subject: [PATCH 2/2] Fix Fedora hyprquery system dependency build --- fedora/install-tools.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/fedora/install-tools.sh b/fedora/install-tools.sh index b7003e4..28e7b31 100755 --- a/fedora/install-tools.sh +++ b/fedora/install-tools.sh @@ -4,7 +4,7 @@ set -euo pipefail # Build and install the Fedora-only tools used by HyDE. # Override PREFIX to install somewhere other than /usr/local. -readonly HYPRQUERY_REV="3f860f2ef498e5440f304888fb5880f99e8a2af4" +readonly HYPRQUERY_REV="4e1405cc7d07f1b6d611d6d96322f009cd298f23" readonly AWWW_REV="f66e12a76dbc4c669b2f1375f78bce49f5b19d66" readonly PREFIX="${PREFIX:-/usr/local}" readonly BUILD_ROOT="$(mktemp -d)" @@ -29,13 +29,15 @@ fi as_root dnf install -y \ git cargo cmake make gcc-c++ pkgconf-pkg-config \ + hyprlang-devel cli11-devel json-devel \ hyprutils-devel lz4-devel libxkbcommon-devel wayland-devel \ wayland-protocols-devel scdoc git clone https://github.com/HyDE-Project/hyprquery.git "${BUILD_ROOT}/hyprquery" git -C "${BUILD_ROOT}/hyprquery" checkout --detach "${HYPRQUERY_REV}" cmake -S "${BUILD_ROOT}/hyprquery" -B "${BUILD_ROOT}/hyprquery/build" \ - -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="${PREFIX}" + -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="${PREFIX}" \ + -DHYPRQUERY_DISTRO_BUILD=ON cmake --build "${BUILD_ROOT}/hyprquery/build" --parallel as_root cmake --install "${BUILD_ROOT}/hyprquery/build"