commit eb22cdd61150eeba3a0e2862b86a6666dff45100
parent 520dc7fc163467b25e229c3b5f661835a8db6280
Author: Robin Bron <robin.bron@yourhosting.nl>
Date: Mon, 28 Sep 2026 22:57:05 +0200
Add forgotten linux-headers for build using linux-specific headers
Diffstat:
11 files changed, 58 insertions(+), 17 deletions(-)
diff --git a/.conductor.yml b/.conductor.yml
@@ -142,6 +142,7 @@ tasks:
- check
- pkg-edge-openssl
- pkg-edge-zlib
+ - pkg-edge-linux
arch: [x86_64]
requires: [unos-sign-key]
script:
@@ -214,6 +215,7 @@ tasks:
- check
- pkg-edge-efivar
- pkg-edge-popt
+ - pkg-edge-linux
arch: [x86_64]
requires: [unos-sign-key]
script:
@@ -245,6 +247,7 @@ tasks:
- pkg-edge-e2fsprogs
- pkg-edge-popt
- pkg-edge-libstdcxx
+ - pkg-edge-linux
arch: [x86_64]
requires: [unos-sign-key]
script:
@@ -274,6 +277,7 @@ tasks:
needs:
- check
- pkg-edge-xz
+ - pkg-edge-linux
arch: [x86_64]
requires: [unos-sign-key]
script:
@@ -318,6 +322,7 @@ tasks:
- check
- pkg-edge-libmnl
- pkg-edge-libcap
+ - pkg-edge-linux
arch: [x86_64]
requires: [unos-sign-key]
script:
@@ -347,6 +352,7 @@ tasks:
needs:
- check
- pkg-edge-libstdcxx
+ - pkg-edge-linux
arch: [x86_64]
requires: [unos-sign-key]
script:
@@ -507,6 +513,7 @@ tasks:
- check
- pkg-lts-openssl
- pkg-lts-zlib
+ - pkg-lts-linux
arch: [x86_64]
requires: [unos-sign-key]
script:
@@ -579,6 +586,7 @@ tasks:
- check
- pkg-lts-efivar
- pkg-lts-popt
+ - pkg-lts-linux
arch: [x86_64]
requires: [unos-sign-key]
script:
@@ -610,6 +618,7 @@ tasks:
- pkg-lts-e2fsprogs
- pkg-lts-popt
- pkg-lts-libstdcxx
+ - pkg-lts-linux
arch: [x86_64]
requires: [unos-sign-key]
script:
@@ -639,6 +648,7 @@ tasks:
needs:
- check
- pkg-lts-xz
+ - pkg-lts-linux
arch: [x86_64]
requires: [unos-sign-key]
script:
@@ -683,6 +693,7 @@ tasks:
- check
- pkg-lts-libmnl
- pkg-lts-libcap
+ - pkg-lts-linux
arch: [x86_64]
requires: [unos-sign-key]
script:
@@ -712,6 +723,7 @@ tasks:
needs:
- check
- pkg-lts-libstdcxx
+ - pkg-lts-linux
arch: [x86_64]
requires: [unos-sign-key]
script:
@@ -872,6 +884,7 @@ tasks:
- check
- pkg-stable-openssl
- pkg-stable-zlib
+ - pkg-stable-linux
arch: [x86_64]
requires: [unos-sign-key]
script:
@@ -944,6 +957,7 @@ tasks:
- check
- pkg-stable-efivar
- pkg-stable-popt
+ - pkg-stable-linux
arch: [x86_64]
requires: [unos-sign-key]
script:
@@ -975,6 +989,7 @@ tasks:
- pkg-stable-e2fsprogs
- pkg-stable-popt
- pkg-stable-libstdcxx
+ - pkg-stable-linux
arch: [x86_64]
requires: [unos-sign-key]
script:
@@ -1004,6 +1019,7 @@ tasks:
needs:
- check
- pkg-stable-xz
+ - pkg-stable-linux
arch: [x86_64]
requires: [unos-sign-key]
script:
@@ -1048,6 +1064,7 @@ tasks:
- check
- pkg-stable-libmnl
- pkg-stable-libcap
+ - pkg-stable-linux
arch: [x86_64]
requires: [unos-sign-key]
script:
@@ -1077,6 +1094,7 @@ tasks:
needs:
- check
- pkg-stable-libstdcxx
+ - pkg-stable-linux
arch: [x86_64]
requires: [unos-sign-key]
script:
diff --git a/channels/base/packages/apk-tools/template b/channels/base/packages/apk-tools/template
@@ -28,11 +28,8 @@ hostmakedepends="muon"
do_configure() {
mkdir -p "${WORK}/build"
cd "${WRKSRC}"
- # --sysroot: sysroot glibc headers redirect to __isoc23_*, absent in host
- # libc. Nothing from the host's /usr/include may mix in, so the kernel UAPI
- # headers come from linux-headers in the sysroot.
- export CFLAGS="${CFLAGS:-} --sysroot=${SYSROOT}"
- export LDFLAGS="${LDFLAGS:-} --sysroot=${SYSROOT} -L${SYSROOT}/usr/lib -Wl,-rpath-link,${SYSROOT}/usr/lib"
+ # --sysroot comes from the driver; kernel UAPI headers come from
+ # linux-headers in the sysroot, never from the host.
muon setup \
-Dprefix=/usr \
-Ddocs=disabled \
diff --git a/channels/base/packages/curl/template b/channels/base/packages/curl/template
@@ -9,7 +9,7 @@ homepage="https://curl.se/"
distfiles="https://curl.se/download/curl-${version}.tar.xz"
checksum=40df79166e74aa20149365e11ee4c798a46ad57c34e4f68fd13100e2c9a91946
depends="glibc busybox openssl zlib"
-makedepends="openssl zlib"
+makedepends="openssl zlib linux-headers"
# Notes:
# - Why: a rescue image needs to pull things onto the box -- an installer
diff --git a/channels/base/packages/efibootmgr/template b/channels/base/packages/efibootmgr/template
@@ -10,7 +10,7 @@ distfiles="https://github.com/rhboot/efibootmgr/archive/refs/tags/18.tar.gz"
checksum=442867d12f8525034a404fc8af3036dba8e1fc970998af2486c3b940dfad0874
# runtime links (readelf-proven at build): libefivar + libpopt.
depends="efivar popt"
-makedepends="efivar popt"
+makedepends="efivar popt linux-headers"
# Notes:
# - No configure step; lowercase make vars (prefix/libdir/sbindir) plus
diff --git a/channels/base/packages/gptfdisk/template b/channels/base/packages/gptfdisk/template
@@ -10,7 +10,7 @@ distfiles="https://downloads.sourceforge.net/project/gptfdisk/gptfdisk/${version
checksum=2abed61bc6d2b9ec498973c0440b8b804b7a72d7144069b5a9209b2ad693a282
# libstdc++ is a real runtime dep: this is the first C++ package in UNOS.
depends="glibc busybox libstdc++ e2fsprogs popt"
-makedepends="e2fsprogs popt libstdc++"
+makedepends="e2fsprogs popt libstdc++ linux-headers"
# Notes:
# - Why: installer/install.sh partitions with sgdisk. ONIE provides it on a
diff --git a/channels/base/packages/grub/template b/channels/base/packages/grub/template
@@ -11,7 +11,7 @@ distfiles="https://ftp.gnu.org/gnu/grub/grub-2.14.tar.xz"
checksum=bc8d3c73535b8838d8c8e2654d73edc4e6ae8c8acdb45d5df5dc9a1547446d43
# xz: grub-install links liblzma (readelf-proven, not guessed).
depends="xz"
-makedepends="xz"
+makedepends="xz linux-headers"
hostmakedepends="bison flex"
# Notes:
diff --git a/channels/base/packages/iproute2/template b/channels/base/packages/iproute2/template
@@ -9,7 +9,7 @@ homepage="https://www.kernel.org/pub/linux/utils/net/iproute2/"
distfiles="https://www.kernel.org/pub/linux/utils/net/iproute2/iproute2-6.19.0.tar.xz"
checksum=9332213d35480b647086a70c302de8568de83455a98774d35de216c4ce191006
depends="libmnl libcap"
-makedepends="libmnl libcap"
+makedepends="libmnl libcap linux-headers"
hostmakedepends="bison flex"
# Notes:
diff --git a/channels/base/packages/smartmontools/template b/channels/base/packages/smartmontools/template
@@ -9,7 +9,7 @@ homepage="https://www.smartmontools.org/"
distfiles="https://downloads.sourceforge.net/project/smartmontools/smartmontools/${version}/smartmontools-${version}.tar.gz"
checksum=690b83ca331378da9ea0d9d61008c4b22dde391387b9bbad7f29387f2595f76e
depends="glibc busybox libstdc++"
-makedepends="libstdc++"
+makedepends="libstdc++ linux-headers"
# Notes:
# - Why: a switch's boot media is usually an eMMC or a small SSD, and its wear
diff --git a/mk/build.sh b/mk/build.sh
@@ -237,6 +237,20 @@ export DESTDIR WRKSRC FILESDIR WORK SYSROOT UNOS_MKDIR
export PATH="${ROOT}/build/host/bin:${PATH}"
export PKG_CONFIG_PATH="${SYSROOT}/usr/lib/pkgconfig${PKG_CONFIG_PATH:+:${PKG_CONFIG_PATH}}"
+# A sysroot library links against sysroot glibc. Resolving it against the build
+# host's libc instead fails on every symbol the host predates (__isoc23_* and
+# friends) -- and fails as "library not detected", not as a version error.
+#
+# Gated on makedepends because that is exactly what sysroot.sh seeded: with no
+# makedepends the sysroot may be empty, and --sysroot would then hide the host
+# headers such a package legitimately builds against.
+if [ -n "${makedepends}" ]; then
+ export CPPFLAGS="--sysroot=${SYSROOT} ${CPPFLAGS:-}"
+ export CFLAGS="--sysroot=${SYSROOT} ${CFLAGS:-}"
+ export CXXFLAGS="--sysroot=${SYSROOT} ${CXXFLAGS:-}"
+ export LDFLAGS="--sysroot=${SYSROOT} -L${SYSROOT}/usr/lib -Wl,-rpath-link,${SYSROOT}/usr/lib ${LDFLAGS:-}"
+fi
+
# --- build + install phases (defaults: no-op) ---
command -v do_configure >/dev/null 2>&1 || do_configure() { :; }
command -v do_build >/dev/null 2>&1 || do_build() { :; }
diff --git a/mk/ci-setup.sh b/mk/ci-setup.sh
@@ -79,11 +79,19 @@ fi
# template that gained a new build tool.
msg "verifying hostmakedepends are satisfied"
missing=""
-for p in $("${ROOT}/mk/deps.sh" list); do
- for h in $("${ROOT}/mk/deps.sh" vars "$p" | sed -n 's/^hostmakedepends: *//p'); do
- # muon is built by bootstrap-host.sh, not installed from a distribution.
- [ "${h}" = "muon" ] && continue
- command -v "${h}" >/dev/null 2>&1 || missing="${missing} ${h}"
+# Every channel, not just the one this task builds: the apt list is shared, so
+# a tool only edge needs must still be installed here.
+for c in $("${ROOT}/mk/deps.sh" channels); do
+ "${ROOT}/mk/channel-assemble.sh" "$c" >/dev/null
+ for p in $("${ROOT}/mk/deps.sh" --channel "$c" list); do
+ for h in $("${ROOT}/mk/deps.sh" --channel "$c" vars "$p" | sed -n 's/^hostmakedepends: *//p'); do
+ # muon is built by bootstrap-host.sh, not installed from a distribution.
+ [ "${h}" = "muon" ] && continue
+ command -v "${h}" >/dev/null 2>&1 || case " ${missing} " in
+ *" ${h} "*) ;;
+ *) missing="${missing} ${h}" ;;
+ esac
+ done
done
done
if [ -n "${missing}" ]; then
diff --git a/mk/deps.sh b/mk/deps.sh
@@ -46,7 +46,11 @@ PKGDIR=$(chan_pkgdir "${CHANNEL}")
die() { printf 'deps.sh: error: %s\n' "$*" >&2; exit 1; }
-[ -d "${PKGDIR}" ] || die "channel '${CHANNEL}' not assembled; run ./mk/channel-assemble.sh ${CHANNEL}"
+case "${1:-}" in
+ channels|layers) ;;
+ *) [ -d "${PKGDIR}" ] \
+ || die "channel '${CHANNEL}' not assembled; run ./mk/channel-assemble.sh ${CHANNEL}" ;;
+esac
# Same PATH that mk/build.sh gives templates, so hostmakedepends like `muon`
# resolve from build/host/bin rather than appearing absent.