Update spec for OBS/Chum: build libghostty-vt from source#46
Merged
Conversation
- 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
eddafae to
d854c9e
Compare
--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.
This reverts commit 1f7186a.
1411088 to
25267a8
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Update ghosteel.spec to build libghostty-vt from source on OBS (required for Chum submission).
--systemflag to disable Zig network fetchingpatch -p1(OBS tarballs have no .git)CI builds unaffected - conditional check skips Zig build when prebuilt lib is present.