void-packages/srcpkgs/proot/patches/disable-seccomp-based-tracing.patch
Đoàn Trần Công Danh 49cb564d14 srcpkgs/p*: convert patches to -Np1
* par is kept at -Np0

```sh
git grep -l '^patch_args=-Np0' "srcpkgs/$1*/template" |
while read template; do
	for p in ${template%/template}/patches/*; do
		sed -i '
			\,^[+-][+-][+-] /dev/null,b
			/^[*-]\+ [0-9]\+\(,[0-9]\+\)\? [*-]\+$/b
			s,^[*][*][*] ,&a/,
			/^--- /{
				s,\(^--- \)\(./\)*,\1a/,
				s,[.-][Oo][Rr][Ii][Gg]\([	/]\),\1,
				s/[.-][Oo][Rr][Ii][Gg]$//
				s/[.]patched[.]\([^.]\)/.\1/
				h
			}
			/^+++ -/{
				g
				s/^--- a/+++ b/
				b
			}
			s,\(^+++ \)\(./\)*,\1b/,
		' "$p"
	done
	sed -i '/^patch_args=/d' $template
done
```
2021-06-20 13:17:29 +07:00

28 lines
1,011 B
Diff

# reason: https://github.com/proot-me/proot/issues/106
# src: Debian10
From: Simon McVittie <smcv@debian.org>
Date: Sat, 14 Jan 2017 15:52:13 +0000
X-Dgit-Generated: 5.1.0-1.2 dcc5f0999759be03aed5b62a8683e0b965d0219d
Subject: Disable seccomp-based tracing performance improvement
It is faster (according to upstream documentation), but on current
(4.8.4+) kernels it just segfaults. Software that works slowly seems
better than software that doesn't work at all.
Bug: https://github.com/proot-me/PRoot/issues/106
---
--- a/src/GNUmakefile
+++ b/src/GNUmakefile
@@ -105,7 +105,7 @@ CHECK_VERSION = VERSION=$$($(GIT) descri
then /bin/echo -e "\#undef VERSION\n\#define VERSION \"$${VERSION}\""; \
fi;
-CHECK_FEATURES = process_vm seccomp_filter
+CHECK_FEATURES = process_vm
CHECK_PROGRAMS = $(foreach feature,$(CHECK_FEATURES),.check_$(feature))
CHECK_OBJECTS = $(foreach feature,$(CHECK_FEATURES),.check_$(feature).o)
CHECK_RESULTS = $(foreach feature,$(CHECK_FEATURES),.check_$(feature).res)