Rebase the Cua Hyprland plugin on Driver 0.28.2 and pin glibc r50 (#717)

cua-hyprland-plugin 0.26.1-6 pins glibc=2.44+r24+g16be1518495f-1 exactly. Arch core has moved to 2.44+r50+g1848099f063e-1, so on any upgraded edge system pacman refuses the plugin with "unable to satisfy dependency", even though cua-driver-bin installs.

Derive a new profile, omarchy-edge-20260928-remaps, that pins the current glibc and takes its source from the Driver 0.28.2 release that cua-driver-bin ships. The plugin files in that release are byte-identical to 0.26.1 and 0.27.0, so the keymap patch applies unchanged and only the upstream base in DOWNSTREAM-PROVENANCE.json moves. The download wrapper now substitutes the 0.28.2 archive and manifest into the verified upstream kit and renders the recipe from the kit's own PROFILE-PKGBUILD.in, so the derived kit is one Cua's profile_verify.py accepts as complete.

pkgrel starts at 2 because profile validation refuses package release 1.
This commit is contained in:
Spencer Bull authored and GitHub committed 2026-09-28 23:15:36 -05:00
1 parent 660cbe3940
commit 3dbba7e478
4 files changed
+81 -59

No files matched your search

+60 -33
View File
@@ -3,41 +3,45 @@
# Profile kit: original source bytes and separately committed packaging tooling.
# shellcheck shell=bash disable=SC2034,SC2154
pkgname=cua-hyprland-plugin
pkgver=0.26.1
pkgrel=6
pkgdesc='Cua input candidate for reviewed profile omarchy-hypr0562r3-aq0151-remaps'
pkgver=0.28.2
# Profile validation starts package releases at 2, above upstream's generic -1 build of the same Driver.
pkgrel=2
pkgdesc='Cua input candidate for reviewed profile omarchy-edge-20260928-remaps'
arch=('x86_64')
url='https://github.com/trycua/cua'
license=('MIT')
depends=('hyprland=0.56.2-3' 'aquamarine=0.15.1-1' 'glibc=2.44+r24+g16be1518495f-1' 'hyprcursor=0.1.13-7' 'hyprgraphics=0.5.1-4' 'hyprlang=0.6.8-5' 'hyprutils=0.14.2-1' 'libgcc=16.2.1+r23+gd564253eb6c8-1' 'libstdc++=16.2.1+r23+gd564253eb6c8-1' 'libxkbcommon=1.13.2-1' 'wayland=1.26.0-1' 'python>=3.11' 'binutils')
depends=('hyprland=0.56.2-3' 'aquamarine=0.15.1-1' 'glibc=2.44+r50+g1848099f063e-1' 'hyprcursor=0.1.13-7' 'hyprgraphics=0.5.1-4' 'hyprlang=0.6.8-5' 'hyprutils=0.14.2-1' 'libgcc=16.2.1+r23+gd564253eb6c8-1' 'libstdc++=16.2.1+r23+gd564253eb6c8-1' 'libxkbcommon=1.13.2-1' 'wayland=1.26.0-1' 'python>=3.11' 'binutils')
makedepends=('cmake>=3.30' 'ninja' 'pkgconf' 'gcc' 'patch')
options=('!strip' '!debug' '!lto')
_stem='cua-hyprland-plugin-0.26.1-cc54254464c0c9aebfd6547fe7e4a0ceaf0456d7'
_archive_sha256='47bca9e018f32f4fcfe683f91c7475c60368f3b65d318cc35c1f2de88a4ee9ab'
_kit_sha256='819779b93655d603d9ebb0d33ea052326c3374674a1d473886106af25e0fffdd'
_profile_sha256='a2eade8b8195036be2c666788a1d28ac722403285a35987d92b3344e095f9a5e'
_stem='cua-hyprland-plugin-0.28.2-fc188250b4ca8549b8e61f937fdb1fb560770e86'
_archive_sha256='c5b44066e2d80b2e309ef567560c1015d3ec82423c380dd152a337f39aaed1d8'
_kit_sha256='593e0b59f4d50059e30d32d5f6ac1472862dd17a573229cfbfbda74779fb8f82'
_profile_sha256='33581ad88d2f21995f0ec4d2855f9e9870fedd8c4de66b6383e4fde5cebf7f4f'
_verifier_sha256='480f649cbd35a0ddc7f49dc0a3a44785402c9e0ec9653b0f8ea4965d52d7f900'
_cxx="${CUA_RELEASE_CXX:-/usr/bin/g++}"
_download_name='cua-hyprland-plugin-0.26.1-cc54254464c0c9aebfd6547fe7e4a0ceaf0456d7-profile-omarchy-stable-20260910-kit-1.1.0-5dacea79a6a5927e59fca7b51e6c04e94fa45133ac1b8fb7f4e1f442d113eb9a-67f89ceb47edd973aa748820eadd02ddbfb3d3e4.tar.gz'
_download_sha256='a89bfa7f6490f598719dfabdd2a5badc137e27b0764fd25e6a05e1f969433520'
source=('https://github.com/trycua/cua/releases/download/cua-hyprland-kit-v1.1.0-omarchy-stable-20260910/cua-hyprland-plugin-0.26.1-cc54254464c0c9aebfd6547fe7e4a0ceaf0456d7-profile-omarchy-stable-20260910-kit-1.1.0-5dacea79a6a5927e59fca7b51e6c04e94fa45133ac1b8fb7f4e1f442d113eb9a-67f89ceb47edd973aa748820eadd02ddbfb3d3e4.tar.gz'
"https://github.com/trycua/cua/releases/download/cua-driver-rs-v${pkgver}/${_stem}.tar.gz"
'PROFILE.json')
noextract=("$_download_name")
noextract=("$_download_name" "${_stem}.tar.gz")
sha256sums=('a89bfa7f6490f598719dfabdd2a5badc137e27b0764fd25e6a05e1f969433520'
'a2eade8b8195036be2c666788a1d28ac722403285a35987d92b3344e095f9a5e')
'c5b44066e2d80b2e309ef567560c1015d3ec82423c380dd152a337f39aaed1d8'
'33581ad88d2f21995f0ec4d2855f9e9870fedd8c4de66b6383e4fde5cebf7f4f')
# Downstream inputs are also checked explicitly when makepkg integrity is skipped.
declare -gA _downstream_sha256=(
['independent-keymaps.patch']='e74d9021111a5c217b12f3e13c1bbdd260e829c60db5fc2f7293ba4846e1a7d7'
['DOWNSTREAM-PROVENANCE.json']='e0c95350ec3ff2dd54a05e9377d79ddffffdb1cf494d05553a90207a3a919f7e'
['DOWNSTREAM-PROVENANCE.json']='af7c4a8dfb38573ebb5352b03ad4274c10cb4ea45c57243c231fd241dc8a6f3f'
['downstream.py']='7c9725805ad038737bd4d346c85f27991ce9ddfff436a32ebf515cad1bf98ca1'
['downstream_test.py']='7b9a992979b22a5e061fdf011ac6be59a3f1ae6e0d7c0a8ff631f74e71984c5a'
)
source+=('independent-keymaps.patch' 'DOWNSTREAM-PROVENANCE.json' 'downstream.py' 'downstream_test.py')
sha256sums+=('e74d9021111a5c217b12f3e13c1bbdd260e829c60db5fc2f7293ba4846e1a7d7' 'e0c95350ec3ff2dd54a05e9377d79ddffffdb1cf494d05553a90207a3a919f7e' '7c9725805ad038737bd4d346c85f27991ce9ddfff436a32ebf515cad1bf98ca1' '7b9a992979b22a5e061fdf011ac6be59a3f1ae6e0d7c0a8ff631f74e71984c5a')
sha256sums+=('e74d9021111a5c217b12f3e13c1bbdd260e829c60db5fc2f7293ba4846e1a7d7' 'af7c4a8dfb38573ebb5352b03ad4274c10cb4ea45c57243c231fd241dc8a6f3f' '7c9725805ad038737bd4d346c85f27991ce9ddfff436a32ebf515cad1bf98ca1' '7b9a992979b22a5e061fdf011ac6be59a3f1ae6e0d7c0a8ff631f74e71984c5a')
_verify_download() {
python3 -I - "$SRCDEST/$_download_name" "$_download_sha256" "$srcdir" "$1" "$SRCDEST/PROFILE.json" <<'CUA_DOWNLOAD_PY'
python3 -I - "$SRCDEST/$_download_name" "$_download_sha256" "$srcdir" "$1" "$SRCDEST/PROFILE.json" \
"$SRCDEST/${_stem}.tar.gz" <<'CUA_DOWNLOAD_PY'
import hashlib
import io
import json
@@ -46,7 +50,8 @@ import sys
import tarfile
expected = {'KIT-PROVENANCE.json': '7beb736adfd334eed52e84070177634269e3a09f8bb25971b38606933ff4c997', 'PKGBUILD': 'b945a6a6eda13d0e382770edd5419485e3196041956663eb38f5183b05d30db3', 'PROFILE-PKGBUILD.in': 'c350d1b2375946cb0166893d67a1fc01344ee5e3215bbe801b4d54bb361d6bce', 'PROFILE-USAGE.md': 'c14d8e8103fccab59e558758f4249f86bce700a8723cd4ba1b97b1102e02bbd2', 'PROFILE.json': '5dacea79a6a5927e59fca7b51e6c04e94fa45133ac1b8fb7f4e1f442d113eb9a', 'SHA256SUMS': '34a2126bcfab983f171382aafac3ef218475b652f4583c58f4a04088044cb935', 'SOURCE-PROVENANCE.json': '54f514664c84e1358a435f29cd6befd5661b0b133d76997191c000b10f021a75', 'cua-hyprland-plugin-0.26.1-cc54254464c0c9aebfd6547fe7e4a0ceaf0456d7.tar.gz': '47bca9e018f32f4fcfe683f91c7475c60368f3b65d318cc35c1f2de88a4ee9ab', 'lifecycle.py': 'b18dceb8b8e05b93586ddd3a2f1d90d70ae1c36088e54fc05c89e08585290990', 'profile_bundle.py': 'ac883883814787da477c037f017939ee92c9fb5f46f373af7de1331b24f1f6da', 'profile_verify.py': '480f649cbd35a0ddc7f49dc0a3a44785402c9e0ec9653b0f8ea4965d52d7f900'}
stem = 'cua-hyprland-plugin-0.26.1-cc54254464c0c9aebfd6547fe7e4a0ceaf0456d7'
kit_stem = 'cua-hyprland-plugin-0.26.1-cc54254464c0c9aebfd6547fe7e4a0ceaf0456d7'
stem = 'cua-hyprland-plugin-0.28.2-fc188250b4ca8549b8e61f937fdb1fb560770e86'
def require(condition, message):
if not condition:
@@ -55,7 +60,7 @@ def require(condition, message):
def digest(data):
return hashlib.sha256(data).hexdigest()
archive, checksum, srcdir, mode, profile_path = sys.argv[1:]
archive, checksum, srcdir, mode, profile_path, source_path = sys.argv[1:]
archive, srcdir = Path(archive), Path(srcdir)
require(mode in {'check', 'extract'}, 'invalid kit verification mode')
require(archive.is_file() and not archive.is_symlink(), 'outer archive must be a regular file')
@@ -71,34 +76,56 @@ with tarfile.open(fileobj=io.BytesIO(data), mode='r:gz') as contents:
require(digest(content) == expected[member.name], 'outer kit member checksum mismatch')
payload[member.name] = content
require(payload.keys() == expected.keys(), 'outer kit inventory mismatch')
# Derive the reviewed Hyprland -3/Aquamarine 0.15.1 profile while preserving
# upstream source/tooling and compiler, compositor, header and runtime hashes.
# Rebase the kit onto the Driver 0.28.2 source release, whose plugin files are
# byte-identical to 0.26.1, and derive the reviewed Omarchy edge profile for it.
# Tooling and compiler, compositor, header and runtime hashes stay upstream's.
source_file = Path(source_path)
require(source_file.is_file() and not source_file.is_symlink(), 'source archive must be a regular file')
source_data = source_file.read_bytes()
require(digest(source_data) == 'c5b44066e2d80b2e309ef567560c1015d3ec82423c380dd152a337f39aaed1d8',
'source archive checksum mismatch')
with tarfile.open(fileobj=io.BytesIO(source_data), mode='r:gz') as contents:
manifest_data = contents.extractfile(stem + '/SOURCE-PROVENANCE.json').read()
manifest = json.loads(manifest_data)
del payload[kit_stem + '.tar.gz']
payload[stem + '.tar.gz'] = source_data
payload['SOURCE-PROVENANCE.json'] = manifest_data
identity = {'revision': manifest['source_revision'], 'driver_version': manifest['driver_version'],
'archive_sha256': digest(source_data), 'manifest_sha256': digest(manifest_data)}
profile_data = Path(profile_path).read_bytes()
require(digest(profile_data) == 'a2eade8b8195036be2c666788a1d28ac722403285a35987d92b3344e095f9a5e',
require(digest(profile_data) == '33581ad88d2f21995f0ec4d2855f9e9870fedd8c4de66b6383e4fde5cebf7f4f',
'local profile checksum mismatch')
profile = json.loads(payload['PROFILE.json'])
profile.update(profile_id='omarchy-hypr0562r3-aq0151-remaps', package_release=6)
profile.update(profile_id='omarchy-edge-20260928-remaps', package_release=2, source=identity)
profile['hyprland']['package_version'] = '0.56.2-3'
profile['runtime']['packages']['aquamarine'] = '0.15.1-1'
require(json.loads(profile_data) == profile, 'local profile changes more than the reviewed package versions')
profile['runtime']['packages'].update(aquamarine='0.15.1-1', glibc='2.44+r50+g1848099f063e-1')
require(json.loads(profile_data) == profile, 'local profile changes more than the reviewed source and package versions')
payload['PROFILE.json'] = profile_data
provenance = json.loads(payload['KIT-PROVENANCE.json'])
provenance['profile_sha256'] = digest(profile_data)
provenance.update(profile_sha256=digest(profile_data), source=identity)
payload['KIT-PROVENANCE.json'] = (json.dumps(provenance, sort_keys=True, indent=2) + '\n').encode()
recipe = payload['PKGBUILD'].decode()
for old, new in [('pkgrel=2\n', 'pkgrel=6\n'), ('omarchy-stable-20260910', profile['profile_id']),
('hyprland=0.56.2-2', 'hyprland=0.56.2-3'),
('aquamarine=0.15.0-2', 'aquamarine=0.15.1-1'),
('5dacea79a6a5927e59fca7b51e6c04e94fa45133ac1b8fb7f4e1f442d113eb9a', digest(profile_data)),
('7beb736adfd334eed52e84070177634269e3a09f8bb25971b38606933ff4c997', digest(payload['KIT-PROVENANCE.json']))]:
recipe = recipe.replace(old, new)
# Render the recipe the way the kit's own profile_verify.render_recipe does.
recipe = payload['PROFILE-PKGBUILD.in'].decode()
for key, value in {'DRIVER_VERSION': identity['driver_version'], 'PKGREL': str(profile['package_release']),
'PROFILE_ID': profile['profile_id'], 'STEM': stem,
'HYPRLAND_PACKAGE': profile['hyprland']['package_version'],
'RUNTIME_DEPENDS': ' '.join(f"'{name}={version}'" for name, version
in sorted(profile['runtime']['packages'].items())),
'ARCHIVE_SHA256': identity['archive_sha256'], 'PROFILE_SHA256': digest(profile_data),
'KIT_SHA256': digest(payload['KIT-PROVENANCE.json']),
'VERIFIER_SHA256': provenance['tooling_files']['profile_verify.py']}.items():
recipe = recipe.replace(f'@{key}@', value)
payload['PKGBUILD'] = recipe.encode()
payload['SHA256SUMS'] = ''.join(f'{digest(body)} {name}\n' for name, body in sorted(payload.items())
if name != 'SHA256SUMS').encode()
expected.update({'PROFILE.json': 'a2eade8b8195036be2c666788a1d28ac722403285a35987d92b3344e095f9a5e',
'KIT-PROVENANCE.json': '819779b93655d603d9ebb0d33ea052326c3374674a1d473886106af25e0fffdd',
'PKGBUILD': 'c3e4149eba3f7def10ef700b30b9d0abcea994e3dd32fb169014874a0b75687c',
'SHA256SUMS': 'd9057a9534f7a820ee04cbf5d60db567c5072fa96d1f71030a6a85b4bb7ce881'})
del expected[kit_stem + '.tar.gz']
expected.update({stem + '.tar.gz': 'c5b44066e2d80b2e309ef567560c1015d3ec82423c380dd152a337f39aaed1d8',
'SOURCE-PROVENANCE.json': '1753557e38e218e329c1b2e028ed1b03341b746b06f78d984323847c471a1fc5',
'PROFILE.json': '33581ad88d2f21995f0ec4d2855f9e9870fedd8c4de66b6383e4fde5cebf7f4f',
'KIT-PROVENANCE.json': '593e0b59f4d50059e30d32d5f6ac1472862dd17a573229cfbfbda74779fb8f82',
'PKGBUILD': '502c3e91e524516e6e42b3c0d4c2db4214b850ee5699abc9e2a4fda91a6551d4',
'SHA256SUMS': '00a1271037f0facd0b9d2d00ce55e7303fac6622e766bc0760fac3942c122cbd'})
require(payload.keys() == expected.keys(), 'derived kit inventory mismatch')
for name, content in payload.items():
require(digest(content) == expected[name], 'derived kit checksum mismatch: ' + name)
require(srcdir.is_dir() and not srcdir.is_symlink(), 'srcdir must be a real directory')