Skip to content

Update spec for OBS/Chum: build libghostty-vt from source#46

Merged
zackslash merged 17 commits into
mainfrom
obs-build-updates
Jun 23, 2026
Merged

Update spec for OBS/Chum: build libghostty-vt from source#46
zackslash merged 17 commits into
mainfrom
obs-build-updates

Conversation

@zackslash

Copy link
Copy Markdown
Owner

Update ghosteel.spec to build libghostty-vt from source on OBS (required for Chum submission).

  • Download Zig 0.15.2 and uucode dependency as Source entries
  • Set up Zig package cache for offline builds (no network in OBS sandbox)
  • Build libghostty-vt from Ghostty source (skipped when CI prebuilt lib exists)
  • Use --system flag to disable Zig network fetching
  • Apply Ghostty patches with patch -p1 (OBS tarballs have no .git)
  • Add ExclusiveArch, BuildRequires for xz/patch, %license

CI builds unaffected - conditional check skips Zig build when prebuilt lib is present.

- Add Source1 (Zig 0.15.2) and Source2 (uucode) for offline OBS builds
- Set up Zig package cache in %prep with uucode dependency
- Use --system flag to disable network fetching during build
- Build libghostty-vt from source (skipped if CI prebuilt)
- Apply Ghostty patches with patch -p1 (no .git in OBS tarball)
- Add ExclusiveArch, BuildRequires: xz/patch, %license
- Fix URL to match actual repo
Make rpm/ghosteel.spec work across three build environments:
- OBS: offline build using pre-fetched Zig and uucode sources
- SDK IDE: bootstrap via symlinks from .sfdk/src when %prep is skipped
- CI: skip Zig when prebuilt lib exists

Add IDE bootstrap preamble in %build that detects empty build directory
and symlinks source tree from the host via .sfdk/src. Uses dry-run
patch approach to handle already-applied patches on live source.

Changes:
- rpm/ghosteel.spec: adaptive Zig detection, conditional patching,
  IDE bootstrap, %define debug_package %{nil}
- .sfdk/packaging: method: tar for sfdk build
- .gitignore: un-ignore lib/ for method: tar
- .githooks/pre-commit: block .a files and submodule pointer changes
- scripts/build-libs.sh: fix usage comment (positional args)
- README.md: add hook setup note in Development section
- Add Comment=Terminal emulator for SailfishOS to .desktop file
- Change IDE bootstrap guard from checking ghosteel.pro to checking lib/
  directory existence — handles stale symlinks left by previous builds
- Change IDE bootstrap guard from [ ! -e lib ] to
  [ ! -f lib/${LIB_ARCH}/libghostty-vt.a ] — prevents stale empty lib/
  symlinks from skipping the bootstrap on subsequent IDE builds
- Add --forward to %prep patch for consistency with bootstrap path
- Extract UUCODE_HASH as %define to avoid duplication across %prep/%build
@zackslash zackslash force-pushed the obs-build-updates branch from eddafae to d854c9e Compare June 23, 2026 14:50
--system mode requires all declared dependencies (including lazy ones)
to be present in the cache. Ghostty's build.zig.zon declares ~15 lazy
deps that aren't needed for libghostty-vt but --system still demands
them. ZIG_GLOBAL_CACHE_DIR points Zig at the pre-fetched uucode cache
without the strict requirement, allowing lazy deps to be skipped.
Replace uucode-only Source2 with a complete Zig dependency cache
generated from ghostty/flatpak/zig-packages.json. Use --system flag
to disable network access during OBS builds. Add create-zig-deps-tarball
script for reproducible cache generation at each release.
Single script produces both Source1 (Zig binary) and Source2 (deps cache).
Skips Zig download if file already exists.
@zackslash zackslash force-pushed the obs-build-updates branch from 1411088 to 25267a8 Compare June 23, 2026 16:37
@zackslash zackslash merged commit f7451a2 into main Jun 23, 2026
3 checks passed
@zackslash zackslash deleted the obs-build-updates branch June 23, 2026 21:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant