Skip to content

Commit 868e6c4

Browse files
committed
fix gtk load on snap
1 parent d68f74f commit 868e6c4

2 files changed

Lines changed: 25 additions & 9 deletions

File tree

.github/workflows/release-app.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,14 @@ jobs:
1818
include:
1919
- os: macos-14
2020
toolchain: stable
21-
- os: ubuntu-22.04
21+
# ubuntu-24.04 to match the snap's core24 base: the snap is packed
22+
# in destructive mode further down, so stage-packages resolve
23+
# against this runner's archive. Bumping the base means bumping
24+
# these together. Side effect: the .deb and AppImage now link
25+
# noble's glibc/webkit, so they need Ubuntu 24.04 or newer.
26+
- os: ubuntu-24.04
2227
toolchain: stable
23-
- os: ubuntu-22.04-arm
28+
- os: ubuntu-24.04-arm
2429
toolchain: stable
2530
# Windows uses the GNU host toolchain — the vendored C stack is built
2631
# with autotools (no MSVC), and it's what the helper + app link against.
@@ -146,7 +151,7 @@ jobs:
146151
# Pack the .deb into a snap and publish it to the Snap Store under the
147152
# plain `restorekit` name (the CLI ships separately as `restorekit-cli`).
148153
# Destructive mode builds on the host directly, which works because the
149-
# runner (ubuntu-22.04) matches the snap's core22 base. Pack runs under
154+
# runner (ubuntu-24.04) matches the snap's core24 base. Pack runs under
150155
# sudo: snapcraft shells out to `snap install` for the gnome extension's
151156
# build snaps, and snapd only allows that as root. It also swallows snap's
152157
# stderr, so dump its log on failure to see the real error.

apps/desktop/snap/snapcraft.yaml

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,21 @@
33
# homebrew/restorekit.rb). The plain `restorekit` snap name is the desktop
44
# app; the CLI ships separately as `restorekit-cli` (see .goreleaser.yaml).
55
#
6-
# base core22 must match the runner the .deb is built on (ubuntu-22.04) —
6+
# base core24 must match the runner the .deb is built on (ubuntu-24.04) —
77
# bump both together.
8+
#
9+
# core24 is load-bearing, not housekeeping: on core24 the gnome extension
10+
# resolves to gnome-46-2404 and plugs `gpu-2404`, which hands the snap a
11+
# self-consistent Mesa userspace from the mesa-2404 content snap. A core22
12+
# build has no gpu-2404 and instead borrows the *host's* DRI drivers through
13+
# the plain `opengl` interface. Once the host's Mesa outruns the runtime's
14+
# (Ubuntu 26.04 ships Mesa 26; gnome-42-2204 carries 25.2), the two disagree
15+
# about the driver-loading interface and the app dies at startup with
16+
# "libEGL fatal: did not find extension DRI_Mesa version 1". No environment
17+
# variable works around it — the failure is under the app, in EGL.
818
name: restorekit
919
title: RestoreKit
10-
base: core22
20+
base: core24
1121
version: "VERSION_PLACEHOLDER"
1222
summary: Restore Apple Silicon Macs with one click
1323
description: |
@@ -20,10 +30,11 @@ license: Apache-2.0
2030
grade: stable
2131
confinement: strict
2232

23-
# WebKit looks up its subprocess binaries at the host path.
33+
# WebKit looks up its subprocess binaries at the host path. core24 dropped
34+
# $CRAFT_ARCH_TRIPLET in favour of the explicit build-for spelling.
2435
layout:
25-
/usr/lib/$CRAFT_ARCH_TRIPLET/webkit2gtk-4.1:
26-
bind: $SNAP/usr/lib/$CRAFT_ARCH_TRIPLET/webkit2gtk-4.1
36+
/usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR/webkit2gtk-4.1:
37+
bind: $SNAP/usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR/webkit2gtk-4.1
2738

2839
apps:
2940
restorekit:
@@ -39,7 +50,7 @@ parts:
3950
source-type: deb
4051
# GTK3 comes from the gnome extension; webkit2gtk does not. Neither does
4152
# libusb — restorekit-desktop links it dynamically, and it's in neither
42-
# core22 nor gnome-42-2204, so the app dies at exec with
53+
# core24 nor gnome-46-2404, so the app dies at exec with
4354
# "libusb-1.0.so.0: cannot open shared object file".
4455
stage-packages:
4556
- libwebkit2gtk-4.1-0

0 commit comments

Comments
 (0)