temp/hwinfo: fix build in bpo

Building this package aborts in build.postmarketos.org when building for
non-x86_64 architectures, because the "check_hd" program that runs
during the build and already takes a long time without printing any
logs, takes so long in QEMU that it hits the 15 minute timeout. It
writes to a logfile in the process, so attach a tail to it as
workaround.

After fixing that, the build failed because it tried to run a compiler
in package(). Work around it by setting options="!pmb:crossdirect".

[ci:skip-vercheck]

Fixes: https://builds.sr.ht/~postmarketos/job/1863376
Signed-off-by: Oliver Smith <ollieparanoid@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/9390>
This commit is contained in:
Oliver Smith
2026-08-16 17:06:22 +00:00
parent cc937439cc
commit 11e89dfbb2
+10 -1
View File
@@ -13,12 +13,18 @@ subpackages="$pkgname-dev $pkgname-doc $pkgname-libs"
source="$pkgname-$_pkgver.tar.gz::https://github.com/openSUSE/hwinfo/archive/$_pkgver.tar.gz source="$pkgname-$_pkgver.tar.gz::https://github.com/openSUSE/hwinfo/archive/$_pkgver.tar.gz
respect-flags.patch respect-flags.patch
" "
options="!check" # no tests provided options="!check !pmb:crossdirect" # no tests provided
builddir="$srcdir/$pkgname-$_pkgver" builddir="$srcdir/$pkgname-$_pkgver"
export HWINFO_VERSION=$_pkgver export HWINFO_VERSION=$_pkgver
build() { build() {
# HACK: print the "check_hd" program log, so pmbootstrap doesn't kill
# the build after printing no output for 15 minutes. As mentioned below
# this takes forever, and it is worse when running through QEMU.
tail -F src/ids/hd.log &
local tail_pid=$!
# Build full and tiny static libraries. # Build full and tiny static libraries.
#make tinystatic # FIXME: fails #make tinystatic # FIXME: fails
# this takes forever but it's not stuck # this takes forever but it's not stuck
@@ -28,6 +34,9 @@ build() {
# Build full shared library. # Build full shared library.
make -j1 shared LIBDIR=/usr/lib make -j1 shared LIBDIR=/usr/lib
# Avoid "umount: can't unmount …/chroot_native/dev: Resource busy"
kill $tail_pid
} }
package() { package() {