unos-repository

APK repository for unos
git clone git://git.finwo.net/misc/unos-repository
Log | Files | Refs | README

commit 759dcec18659d9309519e13437e31ebb9aa98c7d
parent 34f9b4542b4fa93178dfca86c4cb632c8ad0f2ae
Author: Robin Bron <robin.bron@yourhosting.nl>
Date:   Tue, 29 Sep 2026 00:01:18 +0200

Fixing configures for grub and gptfdisk

Diffstat:
Mchannels/base/packages/gptfdisk/template | 7+++----
Mchannels/base/packages/grub/template | 32+++++++-------------------------
2 files changed, 10 insertions(+), 29 deletions(-)

diff --git a/channels/base/packages/gptfdisk/template b/channels/base/packages/gptfdisk/template @@ -26,12 +26,11 @@ makedepends="e2fsprogs popt libstdc++ linux-headers" do_build() { cd "${WRKSRC}" - # Build against the sysroot so we link our glibc/libuuid/libstdc++ rather - # than the host's. gdisk/sgdisk/fixparts only; cgdisk needs ncurses. + # Upstream assigns these with =, so append rather than replace. make -j"$(nproc)" \ CXX="g++" \ - CXXFLAGS="-O2 -D_FILE_OFFSET_BITS=64 -I${SYSROOT}/usr/include" \ - LDFLAGS="-L${SYSROOT}/usr/lib -Wl,-rpath-link,${SYSROOT}/usr/lib" \ + CXXFLAGS="${CXXFLAGS:-} -O2 -D_FILE_OFFSET_BITS=64" \ + LDFLAGS="${LDFLAGS:-}" \ sgdisk } diff --git a/channels/base/packages/grub/template b/channels/base/packages/grub/template @@ -14,34 +14,16 @@ depends="xz" makedepends="xz linux-headers" hostmakedepends="bison flex" -# Notes: -# - x86_64-efi ONLY in v1 (not i386-pc): grub 2.14's pc kernel.img links -# .text at 0x9074 instead of the required 0x9000 under host binutils -# 2.44 (headers counted where old ld overlapped them), and grub-mkimage -# fail-louds on it. Objects compile fine (-m32 codegen works); only the -# flat core layout is wrong. Revisit when the toolchain allows: older -# binutils, upstream fix, or a verified link flag - NOT by shipping -# artifacts that build unbootable images. Modern whiteboxes and QEMU-OVMF -# are UEFI anyway; legacy BIOS is a follow-up, not a blocker. -# - Single out-of-tree build. --disable-nls (no localized boot menus) and -# --disable-werror (host gcc is newer than grub's vintage). -# - Inclusive install, then prune (grub-install needs its helpers at -# runtime; cherry-picking risks breaking it). Pruned: info docs, themes, -# locales, grub-mkconfig (UNOS writes a static grub.cfg - deterministic, -# no probing). grub-script-check ships to validate that static config. -# Man pages kept (tinyssh precedent). -# - Upstream defaults are trimmed ONLY where auto-detection would create -# host-dependent runtime deps (same lesson as iproute2's scrub): no -# custom console fonts (serial only, drops freetype), no TPM-sealed boot -# (drops tasn1), no FUSE mount, no ZFS, no device-mapper. -# - CPPFLAGS/LDFLAGS put the sysroot first: configure "guesses" liblzma -# via try-link, which would otherwise take host headers. -# - No `make check` (needs qemu RVA); CI story pending. +# x86_64-efi only: grub 2.14's i386-pc kernel.img links .text at 0x9074 +# instead of 0x9000 under binutils 2.44, and grub-mkimage rejects it. Do not +# "fix" by shipping it anyway - the resulting images do not boot. +# +# Disabled options are the ones whose auto-detection would otherwise add a +# host-dependent runtime dep: freetype, tasn1, FUSE, ZFS, device-mapper. do_configure() { mkdir -p "${WORK}/build-efi" cd "${WORK}/build-efi" - CPPFLAGS="-I${SYSROOT}/usr/include" LDFLAGS="-L${SYSROOT}/usr/lib" \ - "${WRKSRC}/configure" --prefix=/usr --with-platform=efi \ + "${WRKSRC}/configure" --prefix=/usr --with-platform=efi \ --disable-nls --disable-werror \ --disable-grub-mkfont --disable-grub-mount --disable-grub-protect \ --disable-libzfs --disable-device-mapper