From d5d2fa12f02dfcc77781415d0a55c6c828e37168 Mon Sep 17 00:00:00 2001 From: Andrea Brancaleoni Date: Wed, 15 Feb 2017 19:18:18 +0100 Subject: [PATCH] proot: include loader patch --- srcpkgs/proot/patches/loader.patch | 40 ++++++++++++++++++++++++++++++ srcpkgs/proot/template | 2 +- 2 files changed, 41 insertions(+), 1 deletion(-) create mode 100644 srcpkgs/proot/patches/loader.patch diff --git a/srcpkgs/proot/patches/loader.patch b/srcpkgs/proot/patches/loader.patch new file mode 100644 index 00000000000..8f8d2359557 --- /dev/null +++ b/srcpkgs/proot/patches/loader.patch @@ -0,0 +1,40 @@ +From d649854ddb66779950954aac99d960379c631a71 Mon Sep 17 00:00:00 2001 +From: Nicolas Cornu +Date: Wed, 29 Jul 2015 14:52:57 +0200 +Subject: [PATCH] Fix use of size + +--- + src/execve/enter.c | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git src/execve/enter.c b/src/execve/enter.c +index 8f22d9c..4c163a1 100644 +--- src/execve/enter.c ++++ src/execve/enter.c +@@ -454,10 +454,10 @@ static int expand_runner(Tracee* tracee, char host_path[PATH_MAX], char user_pat + } + + 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 *tracee, bool wants_32bit_version) + + 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 --git a/srcpkgs/proot/template b/srcpkgs/proot/template index aa31893b118..332f7139d4d 100644 --- a/srcpkgs/proot/template +++ b/srcpkgs/proot/template @@ -1,7 +1,7 @@ # Template file for 'proot' pkgname=proot version=5.1.0 -revision=3 +revision=4 wrksrc="PRoot-${version}" makedepends="libarchive-devel talloc-devel" short_desc="User-space implementation of chroot, mount --bind, and binfmt_misc"