summaryrefslogtreecommitdiff
path: root/sys-apps/proot
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /sys-apps/proot
reinit the tree, so we can have metadata
Diffstat (limited to 'sys-apps/proot')
-rw-r--r--sys-apps/proot/Manifest17
-rw-r--r--sys-apps/proot/files/proot-2.3.1-lib-paths-fix.patch19
-rw-r--r--sys-apps/proot/files/proot-3.2.1-makefile.patch11
-rw-r--r--sys-apps/proot/files/proot-3.2.2-build-care.patch20
-rw-r--r--sys-apps/proot/files/proot-4.0.1-argv.patch125
-rw-r--r--sys-apps/proot/metadata.xml24
-rw-r--r--sys-apps/proot/proot-3.2.2-r1.ebuild72
-rw-r--r--sys-apps/proot/proot-4.0.1.ebuild67
-rw-r--r--sys-apps/proot/proot-4.0.3.ebuild68
-rw-r--r--sys-apps/proot/proot-5.0.0.ebuild68
-rw-r--r--sys-apps/proot/proot-5.1.0.ebuild68
11 files changed, 559 insertions, 0 deletions
diff --git a/sys-apps/proot/Manifest b/sys-apps/proot/Manifest
new file mode 100644
index 000000000000..f7575b03384a
--- /dev/null
+++ b/sys-apps/proot/Manifest
@@ -0,0 +1,17 @@
+AUX proot-2.3.1-lib-paths-fix.patch 700 SHA256 e85bcf46445a09eaa124a8446e41f9ade9367030761dfc0a9028778c36ee3703 SHA512 90c5b6fa8d9e98de79d2c1344508a82be22ccc334cfcf8b6d60a2004a445a1c683fa538dd57958ba6491e26a1997fcfa8daa44f3a8001424470c85ece56c34a9 WHIRLPOOL 2fa6f9017bb7c2972199e84e1abc7c54f7b5bfbe987eac5fb7e38741a89c9f822a83a4da49a54c61c6279407746c120d8aac0b48627d0387cc333347508d6f36
+AUX proot-3.2.1-makefile.patch 327 SHA256 65c4a51860444d37fd633486cb53a34f9630ed143d1b28f681c82905dc6ee463 SHA512 8c1614b5c47ffddbbf59f1a47d60d7fa43c03a31612a1b8c699c8ea9c0a4f319ab326bb713e0c0dc6bcb8d7b38282a181e89f7429c7aaccc7340da0769235a57 WHIRLPOOL bc94159a67f0b67f11d475b29764251ad77a60a8d6c9c33bc85c7eb4de9540eaaefdbf92425c57a9028bdd87933e5945c88bfe06b52aba267d8fd63f98b0609c
+AUX proot-3.2.2-build-care.patch 630 SHA256 81052a0b2aa34251da73e7d599f6fbdc06a42cd422975be1b7c3a613e725d734 SHA512 394d647a9b5054ca31b7c18a0993adb9d811123cc54fb9f9ea5560016562260966e61f73f3290697af1dc141482dd75d3bb4cbb7c84995af58e246f8977169b6 WHIRLPOOL 5d0f5540acdcf816d7b07a7d9a596184e21f50b5424c4f4e67556ef00eaa8bc4b2184d41b11e437dc56d8d747972a16002ed9ce573e24c58a02d1a58b01fa457
+AUX proot-4.0.1-argv.patch 3833 SHA256 84a85c26d9f8d0843de31a92fd436e1ef2f4f4c5928193efb1d832f302a3d8e2 SHA512 d0be9f636ecfd75fef3987d2ebb4c693aa134371e2fee6d975373ac89b0da79ad017301c388b4893667101db405f98d54a8de2cc851413356b1616337d274a14 WHIRLPOOL ed3da73ec05975eea8279f882f6632737f0ef7d4a2097bcffe4ba60758da02d952a42e96e6c313fa4963d79630c9304c72d3b0f76b9ce4bf036baebe19163737
+DIST proot-3.2.2.tar.gz 171047 SHA256 481296465027c48de8b8779c4cdad57948c765139f2a17b25590068b8d21a111 SHA512 baf8df06a463978f0faf36f9d81935d6583b99b7e8c54b8ac330478ed92bb3a5d5cd624e028247c50bb9bc6fbe1300c5736a38c0aff250b23614aa52f922dfdd WHIRLPOOL 426c1b2ee6f6ee9ecc3f0b056d3baaf5269c894c302449dca263a1fe45c94d2e76bc07592fd88b9556554550653495fe1ce81e5021b1487e65239026fd23b962
+DIST proot-4.0.1.tar.gz 218732 SHA256 fbb92835f6d4f4cf0560709a852bdb2880611d3b0398b65e9036fabe9857645e SHA512 df6ea412856268af65ed5fd3ede8ae099c70e9b08d7875e3e2d8e44e9d4288de93e3844aa361db0b7b579b68b5e7a983989ec0742a6d31d7bef889f739db2158 WHIRLPOOL 640dde65a3b2f24777e292a90c35ff9489fa508054bf8a7752b5e5adbdb25c9fc17d300ebb344473194942b4bf60bdaab5f2ccd743a4bab0798d629573cec6df
+DIST proot-4.0.3.tar.gz 222716 SHA256 743e253c11d737ddaa0904774b3a9a9f01b5a22778b65076437282ffdc7638cb SHA512 1c74219d44ea79a4573c6dd21a5b62df8e93522886cadb1175044b782f40a711193af348763663d24ab634fbe13b67264f0bff061a980947810e38850d0133f8 WHIRLPOOL ffc6088c65cbe535c465e9839df34fa45eb6986a766f1ec86dbf6b655363817b3e0c21bd5863537797da4a91eb770d9e9267321f13715a7597173613a73117ee
+DIST proot-5.0.0.tar.gz 250005 SHA256 e3f4f38132416e0306fe8e7e225f037e1630665231c65a659969f7c0555483a7 SHA512 0617142d5bfe40329c12f5cbe3c850d01b82f10a8b44d63acb64e7e880af652fb60d05610fb91ce317353986eb30f031d82114661e5d58a38696d242ccd366ee WHIRLPOOL f2027f953046ed84e9095f599d4b414a5ec0c6b91544a66ebeaaaa5e48359dc44f91823aae237227f90a682b2c8290e718198ec74dfd9d7f74404b154f0ffc1f
+DIST proot-5.1.0.tar.gz 253251 SHA256 50fcb882662b2de3e64e603b68d1af75e920d480191a49e11c0cb63d50040386 SHA512 26be26d405a8bcbe94377c3e9c18a571e4b61e3074f0716b0db3517d147d9d4a07c80f7312171cf9580ac7748e72e688efaf1b8e4a0ca3bfc31c802aa351346f WHIRLPOOL 0642496dc5adba8e3e08bfc0c994fa173bfcfaa4b17c4f0586498fbbc62b06afaaa98156bd4ea95530a88b5d436cdf4acb66cced9bff428515c1bd3b3317f19a
+EBUILD proot-3.2.2-r1.ebuild 1675 SHA256 b70311babab5c7d88e3554d6a2246b3d9dffd728e8e1bfdad09522904455ae51 SHA512 0b15670f67c14e86cd3af2238412d8a3d2c86a252d3228666497633096344eed528da23e6701ae06fb1f9190e0a3fc8f2f8493535b11369eea203a54cdc5bd5a WHIRLPOOL 7008599d597c60456447807ed348df9ae306c0ca65a3e9058577dba75f55540f61e12f54c7ccc05ee647bf7c7979a582916b915a431ca62bc151823800793c51
+EBUILD proot-4.0.1.ebuild 1616 SHA256 1fc3fa469eaf1b7fe644870c4fbd046d7e9f206ba26426a38f7cd40e04b12137 SHA512 8a6b2da2143283965926b722a661fdf820da7f868a347667c0d7e8ffd00e0dee2d9085861358accceb0e4461eb52f114b6e944ba8ab2adea937a43eb33eaed17 WHIRLPOOL 727884e2c9556a663006e8993a5d68a2835afd335114d9f21672e9617384f61d72b993f793707c8315739767ceb2bb0efa2c42a77dee96607110bdc43967478a
+EBUILD proot-4.0.3.ebuild 1563 SHA256 b1b6f453e96c58bd8c710c198471298da174f1c5f06f9b8d53ee9fcc19067120 SHA512 a8f5aba5498c1bdb6f2d74574a5a53408b6be26164137be29bfd20760767b374470f8c7f28d1c9393d0737548a689df11881c9ed09cb0b97e4eae7fbd37fa1bc WHIRLPOOL 38c70db9bcb3a44c9c9e9fd95f157bc7f30869a48aa89e27d6708065b6d84bd8d2d178339eff5f8764a191172a78b064417b895a51cb35c7f22ca42e05ab82d2
+EBUILD proot-5.0.0.ebuild 1563 SHA256 b1b6f453e96c58bd8c710c198471298da174f1c5f06f9b8d53ee9fcc19067120 SHA512 a8f5aba5498c1bdb6f2d74574a5a53408b6be26164137be29bfd20760767b374470f8c7f28d1c9393d0737548a689df11881c9ed09cb0b97e4eae7fbd37fa1bc WHIRLPOOL 38c70db9bcb3a44c9c9e9fd95f157bc7f30869a48aa89e27d6708065b6d84bd8d2d178339eff5f8764a191172a78b064417b895a51cb35c7f22ca42e05ab82d2
+EBUILD proot-5.1.0.ebuild 1563 SHA256 b1b6f453e96c58bd8c710c198471298da174f1c5f06f9b8d53ee9fcc19067120 SHA512 a8f5aba5498c1bdb6f2d74574a5a53408b6be26164137be29bfd20760767b374470f8c7f28d1c9393d0737548a689df11881c9ed09cb0b97e4eae7fbd37fa1bc WHIRLPOOL 38c70db9bcb3a44c9c9e9fd95f157bc7f30869a48aa89e27d6708065b6d84bd8d2d178339eff5f8764a191172a78b064417b895a51cb35c7f22ca42e05ab82d2
+MISC ChangeLog 2829 SHA256 d618aa3eb0f48c7822b5d692a41a45437e2f91e903b47997aa764362938c2ce1 SHA512 05e7b30979f185749a967a022c313e16f5d9749dd3c8904b9cd057643f69e926e434418232ddb367c7e8fffbc4052298edc4d5a31577f0318a74660f750e2d02 WHIRLPOOL 17d7a30f1f369747d5bdc0dc7b51fc5e80faf6810df21f2c41f37587974ba468eb7715f31c5328df9fe91a61bd17ff0f72be83aa0db631422f7b444b2d79565f
+MISC ChangeLog-2015 2611 SHA256 07cc0af09ec5c26ee4b0cabed5f34e1abd0a87adb1e147418e2f559851a911c3 SHA512 4c82b1191100b08cbcf02d9ae21f1c24f8f750621479609ed8b6c2501bf7b568476a197556bec2eb123c73b1c3a73f8a1ca90d7c768c9e436b2e66731adaed49 WHIRLPOOL e0652c1d648af0f952213ff8e74a416be181797109589513c4907fce410f5c42d4bc72a57fbad47dba6df7a60b9d7aefe1d5b3a001ae30ac442545a31ff1e389
+MISC metadata.xml 969 SHA256 f3d911f9783e3f57c67a1ebb7d342726faf839199713e812700500a8ab94648f SHA512 447fb399976f554931c6983af60c33567518fa21e40ef4b1732c9e7615dcf9796ab8bc1356b84eef947455f8e25111bdee0dfc5025d686fe978aa6f6e7343145 WHIRLPOOL 840f2849e5c49614432966e271a9570ef7acef9c6701fc063ae588a92e9ba347783759f485e7a07b90d0e3f80b45a7a25605df055d21dc63d3357179dc9d5032
diff --git a/sys-apps/proot/files/proot-2.3.1-lib-paths-fix.patch b/sys-apps/proot/files/proot-2.3.1-lib-paths-fix.patch
new file mode 100644
index 000000000000..43c0d03d978a
--- /dev/null
+++ b/sys-apps/proot/files/proot-2.3.1-lib-paths-fix.patch
@@ -0,0 +1,19 @@
+--- src/execve/ldso.c 2013-01-23 16:22:37.870287856 +0400
++++ src/execve/ldso.c 2013-01-23 16:31:40.219283675 +0400
+@@ -285,16 +285,10 @@
+ /* 6. /lib, /usr/lib + /usr/local/lib */
+ if (IS_CLASS32(elf_header))
+ status = add_host_ldso_paths(host_ldso_paths,
+-#if defined(ARCH_X86) || defined(ARCH_X86_64)
+- "/lib/i386-linux-gnu:/usr/lib/i386-linux-gnu:"
+-#endif
+ "/lib32:/usr/lib32:/usr/local/lib32"
+ ":/lib:/usr/lib:/usr/local/lib");
+ else
+ status = add_host_ldso_paths(host_ldso_paths,
+-#if defined(ARCH_X86_64)
+- "/lib/x86_64-linux-gnu:/usr/lib/x86_64-linux-gnu:"
+-#endif
+ "/lib64:/usr/lib64:/usr/local/lib64"
+ ":/lib:/usr/lib:/usr/local/lib");
+ if (status < 0)
diff --git a/sys-apps/proot/files/proot-3.2.1-makefile.patch b/sys-apps/proot/files/proot-3.2.1-makefile.patch
new file mode 100644
index 000000000000..854c48ef0817
--- /dev/null
+++ b/sys-apps/proot/files/proot-3.2.1-makefile.patch
@@ -0,0 +1,11 @@
+--- src/GNUmakefile.orig 2013-12-06 10:47:18.554784621 +0400
++++ src/GNUmakefile 2013-12-06 10:47:43.129785804 +0400
+@@ -9,7 +9,7 @@
+ CC = gcc
+ LD = $(CC)
+ CPPFLAGS += -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -I. -I$(VPATH)
+-CFLAGS += -Wall -Wextra -O2
++CFLAGS += -Wall -Wextra
+ LDFLAGS += -ltalloc
+
+ OBJECTS = \
diff --git a/sys-apps/proot/files/proot-3.2.2-build-care.patch b/sys-apps/proot/files/proot-3.2.2-build-care.patch
new file mode 100644
index 000000000000..c52a39cf787b
--- /dev/null
+++ b/sys-apps/proot/files/proot-3.2.2-build-care.patch
@@ -0,0 +1,20 @@
+Skip check for building care, patch by Patrick Lauer <patrick AT gentoo.org>
+
+--- src/GNUmakefile 2014-02-25 16:42:04.336863622 +0800
++++ src/GNUmakefile.new 2014-02-25 16:42:26.063050467 +0800
+@@ -54,15 +54,6 @@
+ all: proot
+
+ ######################################################################
+-# Sanity checks
+-
+-ifneq (,$(findstring care,$(MAKECMDGOALS)))
+-ifneq ($(CARE_BUILD_ENV),ok)
+-$(error care is supposed to be built with: http://build.reproducible.io)
+-endif
+-endif
+-
+-######################################################################
+ # Beautified output
+
+ quiet_GEN = @echo " GEN $@"; $(GEN)
diff --git a/sys-apps/proot/files/proot-4.0.1-argv.patch b/sys-apps/proot/files/proot-4.0.1-argv.patch
new file mode 100644
index 000000000000..df580563458c
--- /dev/null
+++ b/sys-apps/proot/files/proot-4.0.1-argv.patch
@@ -0,0 +1,125 @@
+commit 520fa3601c36dd0a3c84e310bd2a1189259000bd
+Author: Cédric VINCENT <cedric.vincent@st.com>
+Date: Thu Aug 7 14:29:37 2014 +0200
+
+ Don't dereference argv[0] when launching a script through a symlink.
+
+ Reported-by: Joakim Tjernlund <Joakim.Tjernlund@transmode.se>
+ Ref: https://bugs.gentoo.org/show_bug.cgi?id=517496
+
+ Also, don't complain about non-regular or non-executable files that
+ are not explicitely candidates.
+
+diff --git a/src/path/path.c b/src/path/path.c
+index 4225876..ecdef70 100644
+--- a/src/path/path.c
++++ b/src/path/path.c
+@@ -219,17 +219,21 @@ int which(Tracee *tracee, const char *paths, char host_path[PATH_MAX], char *con
+ /* Is the command available without any $PATH look-up? */
+ status = realpath2(tracee, host_path, command, true);
+ if (status == 0 && stat(host_path, &statr) == 0) {
+- if (!S_ISREG(statr.st_mode)) {
++ if (is_explicit && !S_ISREG(statr.st_mode)) {
+ notice(tracee, ERROR, USER, "'%s' is not a regular file", command);
+ return -EACCES;
+ }
+
+- if ((statr.st_mode & S_IXUSR) == 0) {
++ if (is_explicit && (statr.st_mode & S_IXUSR) == 0) {
+ notice(tracee, ERROR, USER, "'%s' is not executable", command);
+ return -EACCES;
+ }
+
+ found = true;
++
++ /* Don't dereference the final component to preserve
++ * argv0 in case it is a symlink to script. */
++ (void) realpath2(tracee, host_path, command, false);
+ }
+ else
+ found = false;
+@@ -274,8 +278,12 @@ int which(Tracee *tracee, const char *paths, char host_path[PATH_MAX], char *con
+ if (status == 0
+ && stat(host_path, &statr) == 0
+ && S_ISREG(statr.st_mode)
+- && (statr.st_mode & S_IXUSR) != 0)
+- return 0;
++ && (statr.st_mode & S_IXUSR) != 0) {
++ /* Don't dereference the final component to preserve
++ * argv0 in case it is a symlink to script. */
++ (void) realpath2(tracee, host_path, path, false);
++ return 0;
++ }
+ } while (*(cursor - 1) != '\0');
+
+ not_found:
+diff --git a/src/tracee/event.c b/src/tracee/event.c
+index 70668d6..5905c43 100644
+--- a/src/tracee/event.c
++++ b/src/tracee/event.c
+@@ -92,7 +92,7 @@ int launch_process(Tracee *tracee)
+ * guest rootfs. Note: Valgrind can't handle execve(2) on
+ * "foreign" binaries (ENOEXEC) but can handle execvp(3) on such
+ * binaries. */
+- execvp(tracee->exe, tracee->cmdline);
++ execv(tracee->exe, tracee->cmdline);
+ return -errno;
+
+ default: /* parent */
+diff --git a/tests/test-713b6910.sh b/tests/test-713b6910.sh
+new file mode 100644
+index 0000000..82e01fd
+--- /dev/null
++++ b/tests/test-713b6910.sh
+@@ -0,0 +1,51 @@
++if [ -z `which mcookie` ] || [ -z `which rm` ] || [ -z `which cat` ] || [ -z `which chmod` ] || [ -z `which ln` ] || [ -z `which grep` ] || [ -z `which mkdir` ] || [ ! -x ${ROOTFS}/bin/readlink ]; then
++ exit 125;
++fi
++
++######################################################################
++
++TMP1=/tmp/$(mcookie)
++TMP2=/tmp/$(mcookie)
++TMP3=/tmp/$(mcookie)
++TMP4=/tmp/$(mcookie)
++
++rm -fr ${TMP1} ${TMP2} ${TMP3} ${TMP4}
++
++######################################################################
++
++cat > ${TMP1} <<'EOF'
++#!/bin/sh
++echo $0
++EOF
++
++chmod +x ${TMP1}
++ln -s ${TMP1} ${TMP2}
++
++${PROOT} ${TMP2} | grep -v ${TMP1}
++${PROOT} ${TMP2} | grep ${TMP2}
++
++######################################################################
++
++mkdir -p ${TMP3}
++cd ${TMP3}
++
++ln -s $(which true) false
++! ${PROOT} false
++
++echo "#!$(which false)" > true
++chmod a-x true
++${PROOT} true
++
++######################################################################
++
++ln -s ${ROOTFS}/bin/readlink ${TMP4}
++
++TEST1=$(${PROOT} ${ROOTFS}/bin/readlink /proc/self/exe)
++TEST2=$(${PROOT} ${TMP4} /proc/self/exe)
++
++test "${TEST1}" = "${TEST2}"
++
++######################################################################
++
++cd /
++rm -fr ${TMP1} ${TMP2} ${TMP3} ${TMP4}
diff --git a/sys-apps/proot/metadata.xml b/sys-apps/proot/metadata.xml
new file mode 100644
index 000000000000..d2757b2e50de
--- /dev/null
+++ b/sys-apps/proot/metadata.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>pinkbyte@gentoo.org</email>
+ <name>Sergey Popov</name>
+ </maintainer>
+ <longdescription lang="en">
+ PRoot is a user-space implementation of chroot, mount --bind, and binfmt_misc.
+ This means that users don't need any privilege or setup to do things like: using an arbitrary directory as the new root filesystem,
+ making files accessible somewhere else in the filesystem hierarchy, or executing programs built for another CPU architecture
+ transparently through QEMU user-mode.
+ </longdescription>
+ <upstream>
+ <remote-id type="github">cedric-vincent/PRoot</remote-id>
+ <maintainer>
+ <email>gentoo@reproducible.io</email>
+ <name>Cédric Vincent</name>
+ </maintainer>
+ </upstream>
+ <use>
+ <flag name="care">Build dynamic CARE binary (more info - http://reproducible.io/)</flag>
+ </use>
+</pkgmetadata>
diff --git a/sys-apps/proot/proot-3.2.2-r1.ebuild b/sys-apps/proot/proot-3.2.2-r1.ebuild
new file mode 100644
index 000000000000..ef14402f0834
--- /dev/null
+++ b/sys-apps/proot/proot-3.2.2-r1.ebuild
@@ -0,0 +1,72 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+MY_PN="PRoot"
+
+inherit eutils pax-utils toolchain-funcs
+
+DESCRIPTION="User-space implementation of chroot, mount --bind, and binfmt_misc"
+HOMEPAGE="https://proot-me.github.io/"
+SRC_URI="https://github.com/proot-me/${MY_PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="care test"
+
+RDEPEND="care? ( app-arch/libarchive:0= )
+ sys-libs/talloc"
+DEPEND="${RDEPEND}
+ care? ( dev-libs/uthash )
+ test? ( dev-util/valgrind )"
+
+# Breaks sandbox
+RESTRICT="test"
+
+S="${WORKDIR}/${MY_PN}-${PV}"
+
+src_prepare() {
+ epatch "${FILESDIR}/${PN}-3.2.1-makefile.patch" \
+ "${FILESDIR}/${PN}-2.3.1-lib-paths-fix.patch" \
+ "${FILESDIR}/${P}-build-care.patch"
+ epatch_user
+}
+
+src_compile() {
+ # build the proot and care targets
+ emake -C src V=1 \
+ CC="$(tc-getCC)" \
+ CHECK_VERSION="true" \
+ CAREBUILDENV="ok" \
+ proot $(usex care "care" "" "" "")
+}
+
+src_install() {
+ if use care; then
+ # Workaround for bug #493416
+ pax-mark -Emp src/care
+ dobin src/care
+ fi
+ # Workaround for bug #493416
+ pax-mark -Emp src/proot
+
+ dobin src/proot
+ doman doc/proot.1
+ dodoc doc/*.txt doc/articles/*
+}
+
+src_test() {
+ emake -C tests -j1 CC="$(tc-getCC)"
+}
+
+pkg_postinst() {
+ if use care; then
+ elog "You have enabled 'care' USE flag, that builds and installs"
+ elog "dynamically linked care binary."
+ elog "Upstream does NOT support such way of building CARE,"
+ elog "it provides only prebuilt binaries."
+ elog "CARE also has known problems on hardened systems"
+ elog "Please do NOT file bugs about them to https://bugs.gentoo.org"
+ fi
+}
diff --git a/sys-apps/proot/proot-4.0.1.ebuild b/sys-apps/proot/proot-4.0.1.ebuild
new file mode 100644
index 000000000000..33b2ca7192b2
--- /dev/null
+++ b/sys-apps/proot/proot-4.0.1.ebuild
@@ -0,0 +1,67 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+MY_PN="PRoot"
+
+inherit eutils toolchain-funcs
+
+DESCRIPTION="User-space implementation of chroot, mount --bind, and binfmt_misc"
+HOMEPAGE="https://proot-me.github.io/"
+SRC_URI="https://github.com/proot-me/${MY_PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="care test"
+
+RDEPEND="care? ( app-arch/libarchive:0= )
+ sys-libs/talloc"
+DEPEND="${RDEPEND}
+ care? ( dev-libs/uthash )
+ test? ( dev-util/valgrind )"
+
+# Breaks sandbox
+RESTRICT="test"
+
+S="${WORKDIR}/${MY_PN}-${PV}"
+
+src_prepare() {
+ epatch "${FILESDIR}/${PN}-3.2.1-makefile.patch" \
+ "${FILESDIR}/${PN}-2.3.1-lib-paths-fix.patch" \
+ "${FILESDIR}/${PN}-3.2.2-build-care.patch" \
+ "${FILESDIR}/${PN}-4.0.1-argv.patch"
+ epatch_user
+}
+
+src_compile() {
+ # build the proot and care targets
+ emake -C src V=1 \
+ CC="$(tc-getCC)" \
+ CHECK_VERSION="true" \
+ CAREBUILDENV="ok" \
+ proot $(use care && echo "care")
+}
+
+src_install() {
+ use care && dobin src/care
+ dobin src/proot
+ newman doc/proot/man.1 proot.1
+ dodoc doc/proot/*.txt
+ dodoc -r doc/articles
+}
+
+src_test() {
+ emake -C tests -j1 CC="$(tc-getCC)"
+}
+
+pkg_postinst() {
+ if use care; then
+ elog "You have enabled 'care' USE flag, that builds and installs"
+ elog "dynamically linked care binary."
+ elog "Upstream does NOT support such way of building CARE,"
+ elog "it provides only prebuilt binaries."
+ elog "CARE also has known problems on hardened systems"
+ elog "Please do NOT file bugs about them to https://bugs.gentoo.org"
+ fi
+}
diff --git a/sys-apps/proot/proot-4.0.3.ebuild b/sys-apps/proot/proot-4.0.3.ebuild
new file mode 100644
index 000000000000..6e07802ddcba
--- /dev/null
+++ b/sys-apps/proot/proot-4.0.3.ebuild
@@ -0,0 +1,68 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+MY_PN="PRoot"
+
+inherit eutils toolchain-funcs
+
+DESCRIPTION="User-space implementation of chroot, mount --bind, and binfmt_misc"
+HOMEPAGE="https://proot-me.github.io/"
+SRC_URI="https://github.com/proot-me/${MY_PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="care test"
+
+RDEPEND="care? ( app-arch/libarchive:0= )
+ sys-libs/talloc"
+DEPEND="${RDEPEND}
+ care? ( dev-libs/uthash )
+ test? ( dev-util/valgrind )"
+
+# Breaks sandbox
+RESTRICT="test"
+
+S="${WORKDIR}/${MY_PN}-${PV}"
+
+src_prepare() {
+ epatch "${FILESDIR}/${PN}-3.2.1-makefile.patch" \
+ "${FILESDIR}/${PN}-2.3.1-lib-paths-fix.patch"
+ epatch_user
+}
+
+src_compile() {
+ # build the proot and care targets
+ emake -C src V=1 \
+ CC="$(tc-getCC)" \
+ CHECK_VERSION="true" \
+ CAREBUILDENV="ok" \
+ proot $(use care && echo "care")
+}
+
+src_install() {
+ if use care; then
+ dobin src/care
+ dodoc doc/care/*.txt
+ fi
+ dobin src/proot
+ newman doc/proot/man.1 proot.1
+ dodoc doc/proot/*.txt
+ dodoc -r doc/articles
+}
+
+src_test() {
+ emake -C tests -j1 CC="$(tc-getCC)"
+}
+
+pkg_postinst() {
+ if use care; then
+ elog "You have enabled 'care' USE flag, that builds and installs"
+ elog "dynamically linked care binary."
+ elog "Upstream does NOT support such way of building CARE,"
+ elog "it provides only prebuilt binaries."
+ elog "CARE also has known problems on hardened systems"
+ elog "Please do NOT file bugs about them to https://bugs.gentoo.org"
+ fi
+}
diff --git a/sys-apps/proot/proot-5.0.0.ebuild b/sys-apps/proot/proot-5.0.0.ebuild
new file mode 100644
index 000000000000..6e07802ddcba
--- /dev/null
+++ b/sys-apps/proot/proot-5.0.0.ebuild
@@ -0,0 +1,68 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+MY_PN="PRoot"
+
+inherit eutils toolchain-funcs
+
+DESCRIPTION="User-space implementation of chroot, mount --bind, and binfmt_misc"
+HOMEPAGE="https://proot-me.github.io/"
+SRC_URI="https://github.com/proot-me/${MY_PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="care test"
+
+RDEPEND="care? ( app-arch/libarchive:0= )
+ sys-libs/talloc"
+DEPEND="${RDEPEND}
+ care? ( dev-libs/uthash )
+ test? ( dev-util/valgrind )"
+
+# Breaks sandbox
+RESTRICT="test"
+
+S="${WORKDIR}/${MY_PN}-${PV}"
+
+src_prepare() {
+ epatch "${FILESDIR}/${PN}-3.2.1-makefile.patch" \
+ "${FILESDIR}/${PN}-2.3.1-lib-paths-fix.patch"
+ epatch_user
+}
+
+src_compile() {
+ # build the proot and care targets
+ emake -C src V=1 \
+ CC="$(tc-getCC)" \
+ CHECK_VERSION="true" \
+ CAREBUILDENV="ok" \
+ proot $(use care && echo "care")
+}
+
+src_install() {
+ if use care; then
+ dobin src/care
+ dodoc doc/care/*.txt
+ fi
+ dobin src/proot
+ newman doc/proot/man.1 proot.1
+ dodoc doc/proot/*.txt
+ dodoc -r doc/articles
+}
+
+src_test() {
+ emake -C tests -j1 CC="$(tc-getCC)"
+}
+
+pkg_postinst() {
+ if use care; then
+ elog "You have enabled 'care' USE flag, that builds and installs"
+ elog "dynamically linked care binary."
+ elog "Upstream does NOT support such way of building CARE,"
+ elog "it provides only prebuilt binaries."
+ elog "CARE also has known problems on hardened systems"
+ elog "Please do NOT file bugs about them to https://bugs.gentoo.org"
+ fi
+}
diff --git a/sys-apps/proot/proot-5.1.0.ebuild b/sys-apps/proot/proot-5.1.0.ebuild
new file mode 100644
index 000000000000..6e07802ddcba
--- /dev/null
+++ b/sys-apps/proot/proot-5.1.0.ebuild
@@ -0,0 +1,68 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+MY_PN="PRoot"
+
+inherit eutils toolchain-funcs
+
+DESCRIPTION="User-space implementation of chroot, mount --bind, and binfmt_misc"
+HOMEPAGE="https://proot-me.github.io/"
+SRC_URI="https://github.com/proot-me/${MY_PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="care test"
+
+RDEPEND="care? ( app-arch/libarchive:0= )
+ sys-libs/talloc"
+DEPEND="${RDEPEND}
+ care? ( dev-libs/uthash )
+ test? ( dev-util/valgrind )"
+
+# Breaks sandbox
+RESTRICT="test"
+
+S="${WORKDIR}/${MY_PN}-${PV}"
+
+src_prepare() {
+ epatch "${FILESDIR}/${PN}-3.2.1-makefile.patch" \
+ "${FILESDIR}/${PN}-2.3.1-lib-paths-fix.patch"
+ epatch_user
+}
+
+src_compile() {
+ # build the proot and care targets
+ emake -C src V=1 \
+ CC="$(tc-getCC)" \
+ CHECK_VERSION="true" \
+ CAREBUILDENV="ok" \
+ proot $(use care && echo "care")
+}
+
+src_install() {
+ if use care; then
+ dobin src/care
+ dodoc doc/care/*.txt
+ fi
+ dobin src/proot
+ newman doc/proot/man.1 proot.1
+ dodoc doc/proot/*.txt
+ dodoc -r doc/articles
+}
+
+src_test() {
+ emake -C tests -j1 CC="$(tc-getCC)"
+}
+
+pkg_postinst() {
+ if use care; then
+ elog "You have enabled 'care' USE flag, that builds and installs"
+ elog "dynamically linked care binary."
+ elog "Upstream does NOT support such way of building CARE,"
+ elog "it provides only prebuilt binaries."
+ elog "CARE also has known problems on hardened systems"
+ elog "Please do NOT file bugs about them to https://bugs.gentoo.org"
+ fi
+}