Control: tags 847292 + patch
Control: tags 847292 + pending

Dear maintainer,

I've prepared an NMU for proot (versioned as 5.1.0-1.2) and
uploaded it to DELAYED/7. Please feel free to tell me if I
should delay it longer.

In addition to fixing the RC bug, I included a workaround for
https://github.com/proot-me/PRoot/issues/106 (simply disabling the
seccomp-based performance optimization) so that basic use of proot does
not segfault on the kernels we will have in Debian stretch.

Regards,
    S
diffstat for proot-5.1.0 proot-5.1.0

 changelog                                        |   10 +++++
 patches/disable-seccomp-based-tracing-performanc |   24 +++++++++++++
 patches/fix-use-of-size                          |   40 +++++++++++++++++++++++
 patches/series                                   |    2 +
 4 files changed, 76 insertions(+)

diff -Nru proot-5.1.0/debian/changelog proot-5.1.0/debian/changelog
--- proot-5.1.0/debian/changelog	2016-11-26 17:12:08.000000000 +0000
+++ proot-5.1.0/debian/changelog	2017-01-14 15:58:21.000000000 +0000
@@ -1,3 +1,13 @@
+proot (5.1.0-1.2) unstable; urgency=medium
+
+  * Non-maintainer upload.
+  * Add patch from upstream to fix simple invocation like "proot ls"
+    (Closes: #847292)
+  * Disable the seccomp-based tracing optimization, which just segfaults
+    with recent kernels (4.8.4+, according to upstream bug #160)
+
+ -- Simon McVittie <s...@debian.org>  Sat, 14 Jan 2017 15:58:21 +0000
+
 proot (5.1.0-1.1) unstable; urgency=medium
 
   * Non-maintainer upload.
diff -Nru proot-5.1.0/debian/patches/disable-seccomp-based-tracing-performanc proot-5.1.0/debian/patches/disable-seccomp-based-tracing-performanc
--- proot-5.1.0/debian/patches/disable-seccomp-based-tracing-performanc	1970-01-01 01:00:00.000000000 +0100
+++ proot-5.1.0/debian/patches/disable-seccomp-based-tracing-performanc	2017-01-14 15:58:21.000000000 +0000
@@ -0,0 +1,24 @@
+From: Simon McVittie <s...@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
+
+---
+
+--- proot-5.1.0.orig/src/GNUmakefile
++++ proot-5.1.0/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)
diff -Nru proot-5.1.0/debian/patches/fix-use-of-size proot-5.1.0/debian/patches/fix-use-of-size
--- proot-5.1.0/debian/patches/fix-use-of-size	1970-01-01 01:00:00.000000000 +0100
+++ proot-5.1.0/debian/patches/fix-use-of-size	2017-01-14 15:58:21.000000000 +0000
@@ -0,0 +1,40 @@
+From: Nicolas Cornu <nco...@aldebaran.com>
+Date: Wed, 29 Jul 2015 14:52:57 +0200
+X-Dgit-Generated: 5.1.0-1.2 37bdc8d26bc0fd1af13142dd34dc11ae2ac2564a
+Subject: Fix use of size
+
+Applied-upstream: 5.1.1, commit:d649854ddb66779950954aac99d960379c631a71
+Bug: https://github.com/proot-me/PRoot/pull/108
+Bug-Debian: https://bugs.debian.org/847292
+
+---
+
+--- proot-5.1.0.orig/src/execve/enter.c
++++ proot-5.1.0/src/execve/enter.c
+@@ -454,10 +454,10 @@ static int expand_runner(Tracee* tracee,
+ }
+ 
+ extern unsigned char _binary_loader_exe_start;
+-extern unsigned char _binary_loader_exe_size;
++extern unsigned char _binary_loader_exe_end;
+ 
+ extern unsigned char WEAK _binary_loader_m32_exe_start;
+-extern unsigned char WEAK _binary_loader_m32_exe_size;
++extern unsigned char WEAK _binary_loader_m32_exe_end;
+ 
+ /**
+  * Extract the built-in loader.  This function returns NULL if an
+@@ -483,11 +483,11 @@ static char *extract_loader(const Tracee
+ 
+ 	if (wants_32bit_version) {
+ 		start = (void *) &_binary_loader_m32_exe_start;
+-		size  = (size_t) &_binary_loader_m32_exe_size;
++		size  = (size_t)(&_binary_loader_m32_exe_end-&_binary_loader_m32_exe_start);
+ 	}
+ 	else {
+ 		start = (void *) &_binary_loader_exe_start;
+-		size  = (size_t) &_binary_loader_exe_size;
++		size  = (size_t) (&_binary_loader_exe_end-&_binary_loader_exe_start);
+ 	}
+ 
+ 	status2 = write(fd, start, size);
diff -Nru proot-5.1.0/debian/patches/series proot-5.1.0/debian/patches/series
--- proot-5.1.0/debian/patches/series	2016-11-26 17:11:32.000000000 +0000
+++ proot-5.1.0/debian/patches/series	2017-01-14 15:58:21.000000000 +0000
@@ -1,3 +1,5 @@
 Install-proot-into-DESTDIR-usr-bin.patch
 Fix-man-syntax.diff
 arm64.patch
+fix-use-of-size
+disable-seccomp-based-tracing-performanc

Reply via email to