summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Popov <pinkbyte@gentoo.org>2022-01-21 12:02:19 +0300
committerSergey Popov <pinkbyte@gentoo.org>2022-01-21 12:05:39 +0300
commitb678ff1362a8416e109899b4794446c8380dbd5f (patch)
tree5306685df69b7e6adbaccbe94f99161d5997b203 /sys-apps/proot
parentdev-python/blessed: mark ALLARCHES (diff)
downloadgentoo-b678ff1362a8416e109899b4794446c8380dbd5f.tar.gz
gentoo-b678ff1362a8416e109899b4794446c8380dbd5f.tar.bz2
gentoo-b678ff1362a8416e109899b4794446c8380dbd5f.zip
sys-apps/proot: version bump
Closes: https://bugs.gentoo.org/716836 Closes: https://bugs.gentoo.org/829854 Package-Manager: Portage-3.0.28, Repoman-3.0.3 Signed-off-by: Sergey Popov <pinkbyte@gentoo.org>
Diffstat (limited to 'sys-apps/proot')
-rw-r--r--sys-apps/proot/Manifest1
-rw-r--r--sys-apps/proot/files/proot-5.3.0-lib-paths-fix.patch21
-rw-r--r--sys-apps/proot/files/proot-5.3.0-makefile.patch11
-rw-r--r--sys-apps/proot/proot-5.3.0.ebuild72
4 files changed, 105 insertions, 0 deletions
diff --git a/sys-apps/proot/Manifest b/sys-apps/proot/Manifest
index 37f988ee1d1a..c2ba3bb5e4d5 100644
--- a/sys-apps/proot/Manifest
+++ b/sys-apps/proot/Manifest
@@ -1 +1,2 @@
DIST proot-5.1.0.tar.gz 253251 BLAKE2B 8dc147d6c6ee303baf0c86f2fa4a8c17a58e76d9da9432635fc70ee06a65aa748ad617735012a1a18a520775fbe38c2264dcccefb681e8e829a5e7e1ddb05cca SHA512 26be26d405a8bcbe94377c3e9c18a571e4b61e3074f0716b0db3517d147d9d4a07c80f7312171cf9580ac7748e72e688efaf1b8e4a0ca3bfc31c802aa351346f
+DIST proot-5.3.0.tar.gz 224436 BLAKE2B 431ea8e1d1de5b9babe377b6f8bc04313f968dd5967f8ee4e2c8ab6be860f85cf201a6e7ca3c7299da7d142d6a034903724440ad94bd234a23df66ebc0e175ad SHA512 371767a0f759440bd9da86567c3eb81bcaea57ba93f954e858c69ae88b130d8c28fbac9d9748721f6b23e216527290d9f5cd5a9ca2809303d0aeaf53c325c161
diff --git a/sys-apps/proot/files/proot-5.3.0-lib-paths-fix.patch b/sys-apps/proot/files/proot-5.3.0-lib-paths-fix.patch
new file mode 100644
index 000000000000..188caa4eaf41
--- /dev/null
+++ b/sys-apps/proot/files/proot-5.3.0-lib-paths-fix.patch
@@ -0,0 +1,21 @@
+--- a/src/execve/ldso.c 2022-01-21 11:42:37.539816477 +0300
++++ b/src/execve/ldso.c 2022-01-21 11:42:40.490817464 +0300
+@@ -506,18 +506,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:"
+-#elif defined(ARCH_ARM64)
+- "/lib/aarch64-linux-gnu:/usr/lib/aarch64-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-5.3.0-makefile.patch b/sys-apps/proot/files/proot-5.3.0-makefile.patch
new file mode 100644
index 000000000000..15d7fc916b0e
--- /dev/null
+++ b/sys-apps/proot/files/proot-5.3.0-makefile.patch
@@ -0,0 +1,11 @@
+--- a/src/GNUmakefile 2022-01-21 11:40:00.957743804 +0300
++++ b/src/GNUmakefile 2022-01-21 11:40:34.876741798 +0300
+@@ -21,8 +21,8 @@
+ HAS_PYTHON_CONFIG := $(shell ${PYTHON}-config --ldflags ${PYTHON_EMBED} 2>/dev/null)
+
+ CPPFLAGS += -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -I. -I$(VPATH)
+-CFLAGS += -g -Wall -Wextra -O2
++CFLAGS += -Wall -Wextra
+ CFLAGS += $(shell pkg-config --cflags talloc libarchive)
+ LDFLAGS += -Wl,-z,noexecstack
+ LDFLAGS += $(shell pkg-config --libs talloc libarchive)
diff --git a/sys-apps/proot/proot-5.3.0.ebuild b/sys-apps/proot/proot-5.3.0.ebuild
new file mode 100644
index 000000000000..c9e3baeeab35
--- /dev/null
+++ b/sys-apps/proot/proot-5.3.0.ebuild
@@ -0,0 +1,72 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+MY_PN="PRoot"
+
+inherit toolchain-funcs
+
+SRC_URI="https://github.com/proot-me/${MY_PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+KEYWORDS="~amd64 ~x86"
+
+DESCRIPTION="User-space implementation of chroot, mount --bind, and binfmt_misc"
+HOMEPAGE="https://proot-me.github.io"
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="care doc test"
+
+RDEPEND="care? ( app-arch/libarchive:0= )
+ sys-libs/talloc"
+BDEPEND="dev-python/docutils"
+DEPEND="${RDEPEND}
+ care? ( dev-libs/uthash )
+ test? ( dev-util/valgrind )"
+
+# Breaks sandbox
+RESTRICT="test"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-5.3.0-makefile.patch"
+ "${FILESDIR}/${PN}-5.3.0-lib-paths-fix.patch"
+)
+
+src_compile() {
+ # build the proot and care targets
+ emake -C src V=1 \
+ CC="$(tc-getCC)" \
+ OBJCOPY="$(tc-getOBJCOPY)" \
+ OBJDUMP="$(tc-getOBJDUMP)" \
+ STRIP="$(tc-getSTRIP)" \
+ CHECK_VERSION="true" \
+ CAREBUILDENV="ok" \
+ proot $(use care && echo "care")
+ emake -C doc SUFFIX=".py" proot/man.1
+}
+
+src_install() {
+ use care && dobin src/care
+ dobin src/proot
+ dodoc doc/proot/*.rst
+ newman doc/proot/man.1 proot.1
+}
+
+src_test() {
+ emake -C tests -j1 CC="$(tc-getCC)"
+}
+
+pkg_postinst() {
+ elog "If you have segfaults on recent (>4.8) kernels"
+ elog "try to disable seccomp support like so:"
+ elog "'export PROOT_NO_SECCOMP=1'"
+ elog "prior to running proot"
+
+ 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
+}