diff options
author | Sergey Popov <pinkbyte@gentoo.org> | 2013-01-24 08:54:46 +0000 |
---|---|---|
committer | Sergey Popov <pinkbyte@gentoo.org> | 2013-01-24 08:54:46 +0000 |
commit | 71a59a6d8a6300f6672a57ef2a5d12e054913a21 (patch) | |
tree | 166ebf6bf778dd6b098ba8e32df398a03f2035ce /sys-apps/proot | |
parent | 4.2.0-r2, correct DEPS, thanks OP of Bug #447716, 4.2.1, rm white space, drop... (diff) | |
download | gentoo-2-71a59a6d8a6300f6672a57ef2a5d12e054913a21.tar.gz gentoo-2-71a59a6d8a6300f6672a57ef2a5d12e054913a21.tar.bz2 gentoo-2-71a59a6d8a6300f6672a57ef2a5d12e054913a21.zip |
Initial commit, wrt bug #439324, thanks to James Le Cuirot
(Portage version: 2.2.0_alpha159/cvs/Linux x86_64, unsigned Manifest commit)
Diffstat (limited to 'sys-apps/proot')
-rw-r--r-- | sys-apps/proot/ChangeLog | 12 | ||||
-rw-r--r-- | sys-apps/proot/files/proot-2.3.1-gnu-define-fix.patch | 37 | ||||
-rw-r--r-- | sys-apps/proot/files/proot-2.3.1-lib-paths-fix.patch | 19 | ||||
-rw-r--r-- | sys-apps/proot/files/proot-2.3.1-makefile.patch | 26 | ||||
-rw-r--r-- | sys-apps/proot/metadata.xml | 13 | ||||
-rw-r--r-- | sys-apps/proot/proot-2.3.1.ebuild | 49 |
6 files changed, 156 insertions, 0 deletions
diff --git a/sys-apps/proot/ChangeLog b/sys-apps/proot/ChangeLog new file mode 100644 index 000000000000..b033bf32756d --- /dev/null +++ b/sys-apps/proot/ChangeLog @@ -0,0 +1,12 @@ +# ChangeLog for sys-apps/proot +# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/sys-apps/proot/ChangeLog,v 1.1 2013/01/24 08:54:46 pinkbyte Exp $ + +*proot-2.3.1 (24 Jan 2013) + + 24 Jan 2013; Sergey Popov <pinkbyte@gentoo.org> +proot-2.3.1.ebuild, + +files/proot-2.3.1-gnu-define-fix.patch, + +files/proot-2.3.1-lib-paths-fix.patch, +files/proot-2.3.1-makefile.patch, + +metadata.xml: + Initial commit, wrt bug #439324, thanks to James Le Cuirot + diff --git a/sys-apps/proot/files/proot-2.3.1-gnu-define-fix.patch b/sys-apps/proot/files/proot-2.3.1-gnu-define-fix.patch new file mode 100644 index 000000000000..b4f0741c7b22 --- /dev/null +++ b/sys-apps/proot/files/proot-2.3.1-gnu-define-fix.patch @@ -0,0 +1,37 @@ +From d44530a0af58ad65cde1d6c1865f416623ed243e Mon Sep 17 00:00:00 2001 +From: James Le Cuirot <chewi@aura-online.co.uk> +Date: Sun, 20 Jan 2013 15:17:20 +0000 +Subject: [PATCH] The process_vm functions are GNU extensions. Fix implicit + declarations. + +--- + src/.check_process_vm.c | 2 ++ + src/tracee/mem.c | 2 ++ + 2 files changed, 4 insertions(+) + +diff --git a/src/.check_process_vm.c b/src/.check_process_vm.c +index e7f6de2..8f65f9c 100644 +--- a/src/.check_process_vm.c ++++ b/src/.check_process_vm.c +@@ -1,3 +1,5 @@ ++#define _GNU_SOURCE ++ + #include <sys/uio.h> + #include <stdlib.h> + +diff --git a/src/tracee/mem.c b/src/tracee/mem.c +index b5b3ce1..d104bb8 100644 +--- a/src/tracee/mem.c ++++ b/src/tracee/mem.c +@@ -20,6 +20,8 @@ + * 02110-1301 USA. + */ + ++#define _GNU_SOURCE ++ + #include <sys/ptrace.h> /* ptrace(2), PTRACE_*, */ + #include <sys/types.h> /* pid_t, size_t, */ + #include <stdlib.h> /* NULL, */ +-- +1.8.1 + 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-2.3.1-makefile.patch b/sys-apps/proot/files/proot-2.3.1-makefile.patch new file mode 100644 index 000000000000..0014264bd44d --- /dev/null +++ b/sys-apps/proot/files/proot-2.3.1-makefile.patch @@ -0,0 +1,26 @@ +--- src/GNUmakefile.orig 2013-01-23 14:18:01.057345491 +0400 ++++ src/GNUmakefile 2013-01-23 14:18:39.489345191 +0400 +@@ -6,11 +6,11 @@ + GIT = git + RM = rm + INSTALL = install +-CC = gcc ++CC ?= gcc + LD = $(CC) + CPPFLAGS = -I. -I$(VPATH) +-CFLAGS = -Wall -O2 +-LDFLAGS = -ltalloc ++CFLAGS ?= -Wall -O2 ++LIBS = -ltalloc + + OBJECTS = cli.o \ + notice.o \ +@@ -97,7 +97,7 @@ + + SRC = $(dir $(firstword $(MAKEFILE_LIST))) + COMPILE = $($(quiet)CC) $(CPPFLAGS) $(CFLAGS) -MD -c $(SRC)$*.c -o $@ +-LINK = $($(quiet)LD) -o $@ $^ $(LDFLAGS) ++LINK = $($(quiet)LD) -o $@ $^ $(LDFLAGS) $(LIBS) + + proot: $(OBJECTS) + $(LINK) diff --git a/sys-apps/proot/metadata.xml b/sys-apps/proot/metadata.xml new file mode 100644 index 000000000000..7c21087ca5ab --- /dev/null +++ b/sys-apps/proot/metadata.xml @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer> + <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> +</pkgmetadata> diff --git a/sys-apps/proot/proot-2.3.1.ebuild b/sys-apps/proot/proot-2.3.1.ebuild new file mode 100644 index 000000000000..4541efc2be42 --- /dev/null +++ b/sys-apps/proot/proot-2.3.1.ebuild @@ -0,0 +1,49 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-apps/proot/proot-2.3.1.ebuild,v 1.1 2013/01/24 08:54:46 pinkbyte Exp $ + +EAPI=5 +MY_PN="PRoot" + +inherit base toolchain-funcs + +DESCRIPTION="User-space implementation of chroot, mount --bind, and binfmt_misc" +HOMEPAGE="http://proot.me" +SRC_URI="https://github.com/cedric-vincent/${MY_PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="test" + +RDEPEND="sys-libs/talloc" +DEPEND="${RDEPEND} + test? ( dev-util/valgrind )" + +# Breaks sandbox +RESTRICT="test" + +S="${WORKDIR}/${MY_PN}-${PV}" + +PATCHES=( + "${FILESDIR}/${P}-makefile.patch" + "${FILESDIR}/${P}-gnu-define-fix.patch" + "${FILESDIR}/${P}-lib-paths-fix.patch" +) + +src_compile() { + # FLAGS come from Makefile. + emake -C src V=1 \ + CC="$(tc-getCC)" \ + CHECK_VERSION="true" +} + +src_install() { + dobin src/proot + doman doc/proot.1 + dodoc doc/*.txt doc/articles/* +} + +src_test() { + emake -C tests -j1 CC="$(tc-getCC)" +} |