1 |
commit: 13637b0563223920ef6b892a48c06848bf4b6897 |
2 |
Author: Fabian Groffen <grobian <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Nov 1 07:42:51 2017 +0000 |
4 |
Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Nov 1 07:43:26 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=13637b05 |
7 |
|
8 |
app-misc/jail: add patch for newer glibc, bug #580326 |
9 |
|
10 |
Package-Manager: Portage-2.3.8, Repoman-2.3.3 |
11 |
|
12 |
app-misc/jail/files/jail-2.0-sysmacros.patch | 20 ++++++++ |
13 |
app-misc/jail/jail-2.0-r1.ebuild | 70 ++++++++++++++++++++++++++++ |
14 |
2 files changed, 90 insertions(+) |
15 |
|
16 |
diff --git a/app-misc/jail/files/jail-2.0-sysmacros.patch b/app-misc/jail/files/jail-2.0-sysmacros.patch |
17 |
new file mode 100644 |
18 |
index 00000000000..4843c3d9719 |
19 |
--- /dev/null |
20 |
+++ b/app-misc/jail/files/jail-2.0-sysmacros.patch |
21 |
@@ -0,0 +1,20 @@ |
22 |
+--- src/generic_helpers.c |
23 |
++++ src/generic_helpers.c |
24 |
+@@ -27,6 +27,7 @@ |
25 |
+ |
26 |
+ #include <stdlib.h> |
27 |
+ #include <string.h> |
28 |
++#include <sys/sysmacros.h> |
29 |
+ #include <sys/types.h> |
30 |
+ #include <sys/stat.h> |
31 |
+ #include <unistd.h> |
32 |
+--- src/terminal_helpers.c |
33 |
++++ src/terminal_helpers.c |
34 |
+@@ -25,6 +25,7 @@ |
35 |
+ |
36 |
+ #include <stdlib.h> |
37 |
+ #include <sys/stat.h> |
38 |
++#include <sys/sysmacros.h> |
39 |
+ #include <unistd.h> |
40 |
+ #include <stdio.h> |
41 |
+ #include <string.h> |
42 |
|
43 |
diff --git a/app-misc/jail/jail-2.0-r1.ebuild b/app-misc/jail/jail-2.0-r1.ebuild |
44 |
new file mode 100644 |
45 |
index 00000000000..62eb691b4a3 |
46 |
--- /dev/null |
47 |
+++ b/app-misc/jail/jail-2.0-r1.ebuild |
48 |
@@ -0,0 +1,70 @@ |
49 |
+# Copyright 1999-2017 Gentoo Foundation |
50 |
+# Distributed under the terms of the GNU General Public License v2 |
51 |
+ |
52 |
+EAPI="5" |
53 |
+ |
54 |
+inherit eutils flag-o-matic |
55 |
+ |
56 |
+DESCRIPTION="Builds a chroot and configures all the required files, directories and libraries" |
57 |
+HOMEPAGE="https://github.com/spiculator/jail" |
58 |
+SRC_URI="https://github.com/spiculator/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" |
59 |
+ |
60 |
+LICENSE="GPL-2" |
61 |
+SLOT="0" |
62 |
+KEYWORDS="~amd64 ~ppc ~ppc64 ~x86" |
63 |
+IUSE="" |
64 |
+ |
65 |
+DEPEND=">=sys-apps/sed-4" |
66 |
+RDEPEND="dev-lang/perl |
67 |
+ dev-util/strace" |
68 |
+ |
69 |
+src_prepare() { |
70 |
+ epatch \ |
71 |
+ "${FILESDIR}"/${PN}-1.9-gentoo.patch \ |
72 |
+ "${FILESDIR}"/${PN}-1.9-wrongshell.patch \ |
73 |
+ "${FILESDIR}"/${PN}-1.9-multiuser-rsa.patch \ |
74 |
+ "${FILESDIR}"/${PN}-1.9-ldflags.patch \ |
75 |
+ "${FILESDIR}"/${PN}-2.0-sysmacros.patch |
76 |
+} |
77 |
+ |
78 |
+src_compile() { |
79 |
+ # configuration files should be installed in /etc not /usr/etc |
80 |
+ sed -i "s:\$4/etc:\${D}/etc:g" install.sh || die |
81 |
+ |
82 |
+ # the destination directory should be /usr not /usr/local |
83 |
+ sed -i -e "s:usr/local:${D}/usr:g" \ |
84 |
+ -e "s:^COPT =.*:COPT = -Wl,-z,no:g" src/Makefile || die |
85 |
+ |
86 |
+ # Below didn't work. Don't know why |
87 |
+ #append-ldflags -Wl,-z,now |
88 |
+ emake -C src CC="$(tc-getCC)" CFLAGS="${CFLAGS}" |
89 |
+} |
90 |
+ |
91 |
+src_install() { |
92 |
+ emake -C src install |
93 |
+ |
94 |
+ # remove //var/tmp/portage/${P}/image//usr from files |
95 |
+ FILES=( "${D}/usr/bin/mkjailenv" |
96 |
+ "${D}/usr/bin/addjailsw" |
97 |
+ "${D}/usr/bin/addjailuser" |
98 |
+ "${D}/etc/jail.conf" |
99 |
+ "${D}/usr/lib/libjail.pm" |
100 |
+ "${D}/usr/lib/arch/generic/definitions" |
101 |
+ "${D}/usr/lib/arch/generic/functions" |
102 |
+ "${D}/usr/lib/arch/linux/definitions" |
103 |
+ "${D}/usr/lib/arch/linux/functions" |
104 |
+ "${D}/usr/lib/arch/freebsd/definitions" |
105 |
+ "${D}/usr/lib/arch/freebsd/functions" |
106 |
+ "${D}/usr/lib/arch/irix/definitions" |
107 |
+ "${D}/usr/lib/arch/irix/functions" |
108 |
+ "${D}/usr/lib/arch/solaris/definitions" |
109 |
+ "${D}/usr/lib/arch/solaris/functions" ) |
110 |
+ |
111 |
+ for f in "${FILES[@]}"; do |
112 |
+ sed -i "s:/${D}/usr:/usr:g" ${f} || die |
113 |
+ done |
114 |
+ |
115 |
+ sed -i "s:/usr/etc:/etc:" "${D}"/usr/lib/libjail.pm || die |
116 |
+ |
117 |
+ dodoc doc/{CHANGELOG,INSTALL,README,SECURITY,VERSION} |
118 |
+} |