File: rules

package info (click to toggle)
reptyr 0.9.0-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, trixie
  • size: 328 kB
  • sloc: ansic: 2,576; python: 76; makefile: 62; sh: 46
file content (24 lines) | stat: -rwxr-xr-x 676 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/usr/bin/make -f

export DEB_BUILD_MAINT_OPTIONS = hardening=+all

%:
	dh $@

override_dh_auto_build:
	dh_auto_build -- $(shell dpkg-buildflags --export=configure)

override_dh_auto_install:
	dh_auto_install -- PREFIX=/usr

override_dh_auto_test:
	# reptyr's test suite relies on being able to ptrace non-child
	# processes, which isn't allowed under yama's defaults on Ubuntu
	if [ -f /proc/sys/kernel/yama/ptrace_scope ] && \
	  [ "$$(cat /proc/sys/kernel/yama/ptrace_scope)" != 0 ]; then \
	  echo 'disabling tests (yama is enabled)'; \
	elif ! [ -f /dev/tty0 ]; then \
	  echo 'disabling tests (no TTY available)'; \
	else \
	  dh_auto_test -- PYTHON_CMD=python3; \
	fi