Files
httrack/debian/rules
Xavier Roche a3e1d3dd40 3.49.16-1 fails to build on four Debian architectures (#1017)
* Fix the four 3.49.16-1 Debian buildd failures

armhf and loong64 cannot unwind out of the frame that faulted on the guard
page, so 180_crash-stack-overflow saw no repeated address and read that as
"never recursed". Judge the recursion only where the report is deeper than
the ordinary-fault control, which keeps the mutant that stopped recursing
failing on x86-64.

hppa needs ~150s per configure run, so 151_bash-shell-validate and
196_install-rpath-gates blew the 600s per-test budget meant to catch a
wedge. They now pace themselves against that budget and skip out rather
than take the build down with them.

hurd-i386 has a network, so the online crawl probe said yes and the crawls
then failed on DNS. Debian Policy 4.9 forbids network access during a build
anyway, so stop asking for it. While there, install crawl-test.sh's traps
one at a time: SIGSTKFLT is Linux-only and its absence made the whole trap
command complain on every Hurd run.

Signed-off-by: Xavier Roche <xroche@gmail.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signed-off-by: Xavier Roche <roche@httrack.com>

* Close two vacuity holes the review found in the new gates

Test 180 compared the stack trace against the segv control's depth, but the
two call chains differ by a frame that only -O2 tail-calls away: at -O0, -O1
and -Og the control is 12 frames and a crash_stack that faults in its own
body is 11, so that mutant slipped through the gate. Use an absolute floor
instead. The handler contributes 3 frames and any non-recursing crash_stack
still unwinds 11, so 6 sits clear of both.

skip_if_out_of_budget projected the step that just ran across every step
left. Test 196 shares one config.cache, so its first step costs several
times the rest and the projection over-estimated by ~2.5x, skipping runs
that fit -- including the hppa case this is for. Look one step ahead
instead, at 1.5x the last step's cost.

Both gates now have coverage in 105_suite-timeout.test: dropping the export
or the skip fails it.

Signed-off-by: Xavier Roche <xroche@gmail.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signed-off-by: Xavier Roche <roche@httrack.com>

---------

Signed-off-by: Xavier Roche <xroche@gmail.com>
Signed-off-by: Xavier Roche <roche@httrack.com>
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-05 07:19:09 +00:00

147 lines
4.4 KiB
Makefile
Executable File

#!/usr/bin/make -f
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
# *** Patch for s390, mips ..
# It seems that htscore.c can not compile on several archs, due to compiler
# capacity limits. These lines shall be removed when gcc is upgraded.
# See discussions on 'Assembler messages: Branch out of range'
# Addition (04/2004): gcc-3.3 on arm fcks up with htscoremain.c and -O3 (..)
ifeq ($(DEB_HOST_ARCH),$(findstring $(DEB_HOST_ARCH),s390 mips mipsel m68k arm))
CFLAGS += -DNOSTRDEBUG
endif
DEB_CFLAGS_MAINT_APPEND=-O3
# DEB_BUILD_OPTIONS flags
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
CFLAGS += -g3
endif
ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
INSTALL_PROGRAM += -s
endif
# as suggested by Simon McVittie
# (https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=744380)
override_dh_auto_test:
VERBOSE=1 dh_auto_test
configure: configure-stamp
configure-stamp:
dh_testdir
dh_autoreconf
# note: dpkg-buildflags to be removed when compat=9
# Policy 4.9 forbids network access during a build, and "auto" made it a lottery:
# hurd-i386 FTBFS'd on a crawl whose DNS went away after the probe had said yes.
dh_auto_configure -- --disable-online-unit-tests $(shell dpkg-buildflags --export=configure)
touch configure-stamp
build: build-arch build-indep
build-indep:
build-arch: build-stamp
build-stamp: configure-stamp
dh_testdir
dh_auto_build
dh_auto_test
touch build-stamp
clean:
dh_testdir
dh_testroot
rm -f build-stamp configure-stamp
dh_auto_clean
dh_autoreconf_clean
dh_clean
install: build
dh_testdir
dh_testroot
dh_prep
dh_installdirs
dh_auto_install --destdir=$(CURDIR)/debian/httrack
##$(MAKE) install DESTDIR=$(CURDIR)/debian/httrack
# place html files (doc, webhttrack files)
# remove symlink created by html/Makefile's install-data-hook
rm $(CURDIR)/debian/httrack/usr/share/httrack/html
# and put back in place data
mv $(CURDIR)/debian/httrack/usr/share/doc/httrack \
$(CURDIR)/debian/httrack/usr/share/httrack/html
# create symlink on the other side
mkdir $(CURDIR)/debian/httrack/usr/share/doc/httrack
ln -s ../../httrack/html \
$(CURDIR)/debian/httrack/usr/share/doc/httrack/html
# and put in place the two outer files
mv $(CURDIR)/debian/httrack/usr/share/httrack/html/httrack-doc.html \
$(CURDIR)/debian/httrack/usr/share/doc/httrack/httrack-doc.html
# remove *.la (https://wiki.debian.org/ReleaseGoals/LAFileRemoval)
rm -f $(CURDIR)/debian/httrack/usr/lib/$(DEB_HOST_MULTIARCH)/*.la
rm -f $(CURDIR)/debian/httrack/usr/lib/$(DEB_HOST_MULTIARCH)/httrack/*.la
# remove *.a unless we do not have *.so files
# see BUG #744594
if ls $(CURDIR)/debian/httrack/usr/lib/$(DEB_HOST_MULTIARCH)/*.so >/dev/null 2>/dev/null ; then \
rm -f $(CURDIR)/debian/httrack/usr/lib/$(DEB_HOST_MULTIARCH)/*.a ; \
fi
if ls $(CURDIR)/debian/httrack/usr/lib/$(DEB_HOST_MULTIARCH)/httrack/*.so >/dev/null 2>/dev/null ; then \
rm -f $(CURDIR)/debian/httrack/usr/lib/$(DEB_HOST_MULTIARCH)/httrack/*.a ; \
fi
mv $(CURDIR)/debian/httrack/usr/lib/$(DEB_HOST_MULTIARCH)/httrack/lib* \
$(CURDIR)/debian/httrack/usr/share/httrack/libtest/
mkdir -p $(CURDIR)/debian/httrack/usr/lib/$(DEB_HOST_MULTIARCH)/httrack/libtest
mv $(CURDIR)/debian/httrack/usr/share/httrack/libtest/lib* \
$(CURDIR)/debian/httrack/usr/lib/$(DEB_HOST_MULTIARCH)/httrack/libtest
ln -s /usr/share/httrack/libtest/readme.txt \
$(CURDIR)/debian/httrack/usr/lib/$(DEB_HOST_MULTIARCH)/httrack/libtest/readme.txt
dh_lintian
dh_movefiles --sourcedir=debian/httrack
# remove empty dirs
find debian -type d | xargs rmdir -p --ignore-fail-on-non-empty
# Build architecture-independent files here.
binary-indep: build install
dh_testdir -i
dh_testroot -i
dh_installdocs -i
dh_installchangelogs -i history.txt
dh_link -i
dh_compress -i
dh_fixperms -i
dh_installdeb -i
dh_gencontrol -i
dh_md5sums -i
dh_builddeb -i
# Build architecture-dependent files here.
binary-arch: build install
dh_testdir -a
dh_testroot -a
dh_installdocs -a
dh_installmenu -a
dh_installchangelogs -a history.txt
dh_link -a
dh_strip -a
dh_compress -a
dh_fixperms -a
dh_makeshlibs -a -X/usr/lib/$(DEB_HOST_MULTIARCH)/httrack/libtest --version-info
dh_installdeb -a
# we depend on the current version (ABI may change)
dh_shlibdeps -a -ldebian/libhttrack3/usr/lib/$(DEB_HOST_MULTIARCH)
dh_gencontrol -a
dh_md5sums -a
dh_builddeb -a
binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install configure