ooni-probe-cli/debian/rules
Simone Basso 638acb0830
fix: build ooniprobe for linux using debian/amd64 (#552) (#553)
In https://github.com/ooni/probe/issues/1741, we observed that
every attempt to use `docker --platform` along with `debian` for
packaging ooniprobe fails with `SEGFAULT`, except when using
the `debian:oldstable` container.

To fix this issue, in this diff we fix Debian packaging to run on
any debian system (`debian:stable` in our case) provided that we
have `qemu-user-static` installed on the system and the system is
a Debian (or Debian-derived) system.

The trick here is to use `dpkg-buildpackage -a $deb_arch`. We
also need to disable a few `debian/rules` that we don't actually
need anyway.

Closes https://github.com/ooni/probe/issues/1741.

This cherry-picks 36a5bf34f99f382a081efd642dd472888a57602b
from the stable branch into the master branch.
2021-10-22 15:14:11 +02:00

31 lines
633 B
Makefile
Executable File

#!/usr/bin/make -f
export DH_VERBOSE=1
%:
dh $@
override_dh_auto_clean:
dh_auto_clean
override_dh_auto_build:
# The ooniprobe binary is provided
override_dh_dwz:
true
override_dh_strip:
# We cross compile and build packages for any arch from
# linux/amd64 so we need to avoid this step. BTW this step
# is not needed because we already strip when building.
true
override_dh_makeshlibs:
# We cross compile and build packages for any arch from
# linux/amd64 so we need to avoid this step. BTW this step
# is not needed because we don't have any shlib.
true
override_dh_auto_install:
dh_auto_install -- --no-source