summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pcr/proot/0001-Fix-use-of-size.patch43
-rw-r--r--pcr/proot/PKGBUILD (renamed from libre/proot/PKGBUILD)16
2 files changed, 55 insertions, 4 deletions
diff --git a/pcr/proot/0001-Fix-use-of-size.patch b/pcr/proot/0001-Fix-use-of-size.patch
new file mode 100644
index 000000000..266dcb6d9
--- /dev/null
+++ b/pcr/proot/0001-Fix-use-of-size.patch
@@ -0,0 +1,43 @@
+From 0d0113debe197f2e2364976bf0bc6f8af2d4e85e Mon Sep 17 00:00:00 2001
+From: Nicolas Cornu <ncornu@aldebaran.com>
+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 a/src/execve/enter.c b/src/execve/enter.c
+index dfdbaae..108bfbc 100644
+--- a/src/execve/enter.c
++++ b/src/execve/enter.c
+@@ -460,10 +460,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
+@@ -489,11 +489,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);
+--
+2.7.0
+
diff --git a/libre/proot/PKGBUILD b/pcr/proot/PKGBUILD
index acbff3c2c..3ce8aedca 100644
--- a/libre/proot/PKGBUILD
+++ b/pcr/proot/PKGBUILD
@@ -1,10 +1,11 @@
# Maintainer (Arch): Nicolas Cornu <ncornu@aldebaran-robotics.com>
-# Maintainer: Márcio Silva <coadde@hyperbola.info>
+# Maintainer (Hyperbola): Márcio Silva <coadde@hyperbola.info>
+# Maintainer: Omar Vega Ramos <ovruni@gnu.org.pe>
pkgname=proot
_pkgname=PRoot
pkgver=5.1.0
-pkgrel=2
+pkgrel=3
pkgdesc="chroot, mount --bind, and binfmt_misc without privilege/setup"
arch=('i686' 'x86_64' 'armv7h')
url="http://proot.me"
@@ -12,8 +13,15 @@ license=('GPL')
provides=('proot')
depends=('talloc')
makedepends=('python-docutils' 'libxslt')
-source=(${pkgname}-v${pkgver}.tar.gz::https://github.com/cedric-vincent/${_pkgname}/archive/v${pkgver}.tar.gz)
-sha1sums=('7aaffddb8f955dc1015402846768a5e755294579')
+source=(${pkgname}-v${pkgver}.tar.gz::https://github.com/cedric-vincent/${_pkgname}/archive/v${pkgver}.tar.gz
+ 0001-Fix-use-of-size.patch)
+sha256sums=('50fcb882662b2de3e64e603b68d1af75e920d480191a49e11c0cb63d50040386'
+ '6ecc533f18a18d2a85c7886bf98d6b05a2513677943d5eb2f570ce1ed773e6b4')
+
+prepare() {
+ cd "${srcdir}/PRoot-5.1.0"
+ patch -p1 -i ${srcdir}/0001-Fix-use-of-size.patch
+}
build() {
cd "${srcdir}"/${_pkgname}-${pkgver}/src