summaryrefslogtreecommitdiff
path: root/app-misc/jail
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 /app-misc/jail
reinit the tree, so we can have metadata
Diffstat (limited to 'app-misc/jail')
-rw-r--r--app-misc/jail/Manifest9
-rw-r--r--app-misc/jail/files/jail-1.9-gentoo.patch130
-rw-r--r--app-misc/jail/files/jail-1.9-ldflags.patch11
-rw-r--r--app-misc/jail/files/jail-1.9-multiuser-rsa.patch44
-rw-r--r--app-misc/jail/files/jail-1.9-wrongshell.patch11
-rw-r--r--app-misc/jail/jail-2.0.ebuild69
-rw-r--r--app-misc/jail/metadata.xml23
7 files changed, 297 insertions, 0 deletions
diff --git a/app-misc/jail/Manifest b/app-misc/jail/Manifest
new file mode 100644
index 000000000000..eaf56930de2b
--- /dev/null
+++ b/app-misc/jail/Manifest
@@ -0,0 +1,9 @@
+AUX jail-1.9-gentoo.patch 3186 SHA256 bf3c42da26870dca1295f1fc5ca1d49eb1073137d7518f88d54b427fdb30ca61 SHA512 70293d18269850c8f0971bb62d20849a903de31982fbe91bfb8dd1adb34a4baf1a10c42ffd73804b214586022cf666b199f091a6cc0f83a08f6e049cc74abf22 WHIRLPOOL 20116cfdc696c05ec0f016d0bb80f65ee9555eeeb3d63a90e9d945a2729d411f3ed9b2a66e268ac8c75bcb31ec6128e68d8dc12c75a5e5eea68b56e60bd78c3a
+AUX jail-1.9-ldflags.patch 328 SHA256 26034a6e25281483ac3add1deb42c49bcfcde00693f958aaf0eda542ba98bd37 SHA512 8b92e834a447f5fb916ff4cfb3fa1ca89d048e954ffc2a8cd8889e21a8037b54ee14d241f1a988d2c686d3ce844205354a5763f0f44cef8b2413e1ba05ff405b WHIRLPOOL 554b15eb9a7d57c53a656ae7c7c9adfeb069aa3c7f1d9e12e96a7c455d4ebf2ea11e80a139e66fc9b4e8ac19c2e847767d54337540f54626d1e0c4b47e2ba67b
+AUX jail-1.9-multiuser-rsa.patch 856 SHA256 e67e3f140f82ba3bdbeb0d650c918d97a7ddedee6c56a620c4273d8a6009b428 SHA512 b6cc3018faf06346c747242b8b721554438dd4db11621411142a50e7ed41ee009af8387fb2742a44c8fe243f5201f58da77d48a54a83d709ed5e8e8172f50541 WHIRLPOOL 853bcf6d1b7822464513bc19dcdc87054a6ad73176e632df366e2cecf9ac47a474123b3dde386554e804f3e1dfa4d0234d27f04d63d564a7610738b5c9486993
+AUX jail-1.9-wrongshell.patch 330 SHA256 d9de983e7c31e09927a87ac56c028ffb4f2f9692825aba765a157a63908eb07f SHA512 ee92dbfb9e147d94d2ebfaaf597ad381d93bd1e5fc65e85a20ee37c9066dbe7560a3385977cd3d30b87f5cdb2d90c19827a7adac69f667ea61a4920ec0b02cbd WHIRLPOOL 0f67fab357c81d354d324fafd44c073fd587a61054203a5d6e7df10e6f28b28d731805dda3107ffea5ef80c6b0f65f02887b14604bc6b4f9055412fca629416a
+DIST jail-2.0.tar.gz 31095 SHA256 0ecdcc5230c99a7382d168ea60e9253c6bf5eec60b50f04f2588185c1974b07e SHA512 dfca62091b34f9adbe4e94de1dbf0ccd31bd3f8e492ea9788f712e97271b389475bc19e0390c12445353c4f73e5ba2458360bf55f5f64491705e82192db985ae WHIRLPOOL bd8619ae57d0e56d164397e8a0fb795ed2fe7215064aef5cfbfb293ea3325d5177b673459011781b0bbeddf2b0327987d5fb95a5dfe957b359908ca10db5147c
+EBUILD jail-2.0.ebuild 1940 SHA256 6c0737aab4723649e618c4a06615ebf5d5fdccf0bca765edc71abd68789af222 SHA512 a8df73039d7c93d4952c9c010f465131e91f15dd4cc2a806a3d90a9a4896d744d40ce50dbd36e651646846bff3e2d93c0537748d1ac8351dd0e93f9f9e683555 WHIRLPOOL 465cfe111351663579e1c9f0720913774bcaaa85cfc09589b00244ed15a1b52610351d75fa7f1e2d00efdfe1653898911cba99b465d57e5c45e279321c4b78d5
+MISC ChangeLog 2550 SHA256 329042eca797913c025b77f478dbb5000cad81f245862745b5ce6fe9601b3ac2 SHA512 855b9098f2a43999bc1f03954ef20443bd4eb8c6b2af92680a1a2ec0ffe817793c341d5ddb3ddea5b96a9b36bd4b6aa08dcf28d54708c7feb3f3ca63947b5014 WHIRLPOOL d5fe03ace67842f5681152ba53fc73b666771c7186944f692948b7ec06b85e04611e85ac46690c5790e4c98dc752648b133bc821c66715b0cca85a641eafedc1
+MISC ChangeLog-2015 4302 SHA256 7f3ca8f265eb601948090cdd59d301efe4b9412fbf6eacd61cf896371812be0c SHA512 fb7df40a8275d488556009ac1080b38be7068accd5d4cc6149a7127a03acfe4d2b2cb20a949249a11e85c78b4b734ecaf18b0c406081d9c234d58dd45a019519 WHIRLPOOL 360f35bfc112c4c118e5f88cc317a49ed25c201cf771f6c5aa887b2d167a9a3496745e9148d926eb46c9fa84a2a0b428588432ae4201173cb7c317f1b32d7982
+MISC metadata.xml 1001 SHA256 2c2a8a6a419ffb153064ad460c5cd4b3ccd9b546ba4a0e1ebe808ece57818c07 SHA512 df3b4a8aa66a4f74bf3067a7da97d9b5950cc1b78109ec39a7ead9631f2b41f2aca97435381ce47725be129c361c48c634f6b8eae1911a278d9985b93d8b3287 WHIRLPOOL 1d88e4998845935e4a0d5f197f5c80d724ba42949fe20ed39661e214f6456816559ad6d74d56cf9461d77e830c7e116d68a1b1ee04466bf2c911c0a9e09041f4
diff --git a/app-misc/jail/files/jail-1.9-gentoo.patch b/app-misc/jail/files/jail-1.9-gentoo.patch
new file mode 100644
index 000000000000..74d48561004c
--- /dev/null
+++ b/app-misc/jail/files/jail-1.9-gentoo.patch
@@ -0,0 +1,130 @@
+--- a/install.sh Fri Oct 26 11:37:07 2001
++++ b/install.sh Sat Jul 20 04:43:09 2002
+@@ -23,7 +23,7 @@
+ #
+ ##############################################################################
+
+-TMPFILE=/tmp/jail.tmp
++TMPFILE=jail.tmp
+
+ # ----------------------------------------------------------------------------
+
+@@ -63,16 +63,16 @@
+
+ gen_jail_conf() {
+
+-cp etc/jail.conf /tmp/jail.conf.tmp
++cp etc/jail.conf jail.conf.tmp
+
+-parse_tag /tmp/jail.conf.tmp __VERSION__ $1
+-parse_tag /tmp/jail.conf.tmp __ARCH__ $2
+-parse_tag /tmp/jail.conf.tmp __DEBUG__ $3
+-parse_tag /tmp/jail.conf.tmp __INSTALLDIR__ $4
+-
+-mv /tmp/jail.conf.tmp /tmp/jail.conf
+-install_file /tmp/jail.conf $4/etc $5 $6 $7
+-rm /tmp/jail.conf
++parse_tag jail.conf.tmp __VERSION__ $1
++parse_tag jail.conf.tmp __ARCH__ $2
++parse_tag jail.conf.tmp __DEBUG__ $3
++parse_tag jail.conf.tmp __INSTALLDIR__ $4
++
++mv jail.conf.tmp jail.conf
++install_file jail.conf $4/etc $5 $6 $7
++rm jail.conf
+
+ }
+
+@@ -80,13 +80,13 @@
+
+ gen_libjail() {
+
+-cp lib/libjail.pm /tmp/libjail.pm.tmp
++cp lib/libjail.pm libjail.pm.tmp
+
+-parse_tag /tmp/libjail.pm.tmp __INSTALLDIR__ $1
++parse_tag libjail.pm.tmp __INSTALLDIR__ $1
+
+-mv /tmp/libjail.pm.tmp /tmp/libjail.pm
+-install_file /tmp/libjail.pm $1/lib $2 $3 $4
+-rm /tmp/libjail.pm
++mv libjail.pm.tmp libjail.pm
++install_file libjail.pm $1/lib $2 $3 $4
++rm libjail.pm
+
+ }
+
+@@ -94,14 +94,14 @@
+
+ gen_mkenv() {
+
+-cp bin/mkjailenv /tmp/mkjailenv.tmp
++cp bin/mkjailenv mkjailenv.tmp
+
+-parse_tag /tmp/mkjailenv.tmp __INSTALLDIR__ $1
+-parse_tag /tmp/mkjailenv.tmp __PERL__ $2
++parse_tag mkjailenv.tmp __INSTALLDIR__ $1
++parse_tag mkjailenv.tmp __PERL__ $2
+
+-mv /tmp/mkjailenv.tmp /tmp/mkjailenv
+-install_file /tmp/mkjailenv $1/bin $3 $4 $5
+-rm /tmp/mkjailenv
++mv mkjailenv.tmp mkjailenv
++install_file mkjailenv $1/bin $3 $4 $5
++rm mkjailenv
+
+ }
+
+@@ -109,14 +109,14 @@
+
+ gen_addjailsw() {
+
+-cp bin/addjailsw /tmp/addjailsw.tmp
++cp bin/addjailsw addjailsw.tmp
+
+-parse_tag /tmp/addjailsw.tmp __INSTALLDIR__ $1
+-parse_tag /tmp/addjailsw.tmp __PERL__ $2
++parse_tag addjailsw.tmp __INSTALLDIR__ $1
++parse_tag addjailsw.tmp __PERL__ $2
+
+-mv /tmp/addjailsw.tmp /tmp/addjailsw
+-install_file /tmp/addjailsw $1/bin $3 $4 $5
+-rm /tmp/addjailsw
++mv addjailsw.tmp addjailsw
++install_file addjailsw $1/bin $3 $4 $5
++rm addjailsw
+
+ }
+
+@@ -125,14 +125,14 @@
+
+ gen_addjailuser() {
+
+-cp bin/addjailuser /tmp/addjailuser.tmp
++cp bin/addjailuser addjailuser.tmp
+
+-parse_tag /tmp/addjailuser.tmp __INSTALLDIR__ $1
+-parse_tag /tmp/addjailuser.tmp __PERL__ $2
++parse_tag addjailuser.tmp __INSTALLDIR__ $1
++parse_tag addjailuser.tmp __PERL__ $2
+
+-mv /tmp/addjailuser.tmp /tmp/addjailuser
+-install_file /tmp/addjailuser $1/bin $3 $4 $5
+-rm /tmp/addjailuser
++mv addjailuser.tmp addjailuser
++install_file addjailuser $1/bin $3 $4 $5
++rm addjailuser
+
+ }
+
+--- a/src/preinstall.sh Fri Oct 26 11:36:09 2001
++++ b/src/preinstall.sh Sat Jul 20 04:44:11 2002
+@@ -23,7 +23,7 @@
+ #
+ ##############################################################################
+
+-TMPFILE=/tmp/jail.tmp
++TMPFILE=jail.tmp
+
+
+ # ----------------------------------------------------------------------------
diff --git a/app-misc/jail/files/jail-1.9-ldflags.patch b/app-misc/jail/files/jail-1.9-ldflags.patch
new file mode 100644
index 000000000000..6b9e5731bb27
--- /dev/null
+++ b/app-misc/jail/files/jail-1.9-ldflags.patch
@@ -0,0 +1,11 @@
+--- a/src/Makefile 2001-10-29 18:40:48.000000000 +0100
++++ b/src/Makefile 2010-09-17 07:28:09.000000000 +0200
+@@ -60,7 +60,7 @@
+ all: jail
+
+ jail: jail.c $(OBJ)
+- $(CC) $(CFLAGS) $(INCLUDE) jail.c -o jail $(OBJ) $(LIBS) && \
++ $(CC) $(CFLAGS) $(LDFLAGS) $(INCLUDE) jail.c -o jail $(OBJ) $(LIBS) && \
+ cp jail ../bin
+
+ clean:
diff --git a/app-misc/jail/files/jail-1.9-multiuser-rsa.patch b/app-misc/jail/files/jail-1.9-multiuser-rsa.patch
new file mode 100644
index 000000000000..e0aad4f65c72
--- /dev/null
+++ b/app-misc/jail/files/jail-1.9-multiuser-rsa.patch
@@ -0,0 +1,44 @@
+--- a/src/jail.c 2004-09-19 23:48:14.000000000 -0500
++++ b/src/jail.c 2004-09-20 00:07:48.000000000 -0500
+@@ -115,6 +115,20 @@
+ #include "helpers.h"
+ #include "types.h"
+
++
++
++void make_jail_dir( char* dir )
++{
++ for( ; *dir != '\0'; ++dir )
++ {
++ if( *dir == '.' )
++ {
++ *dir = '\0';
++ break;
++ }
++ }
++}
++
+ //////////////////////////////////////////////////////////////////////////////
+ //
+ // main()
+@@ -211,6 +225,7 @@
+ fprintf(stderr,"jail: can't get passwd info for uid %d\n",uid);
+ exit(-1);
+ }
++ make_jail_dir(pwdent->dir);
+
+ //
+ // create the terminal devices here
+@@ -289,7 +304,6 @@
+ free(pwdent->dir);
+ pwdent->dir = tmp_str;
+
+-
+ #if DEBUG != 0
+ fprintf(stderr,"jail: doing chdir(%s)\n",pwdent->dir);
+ #endif
+@@ -494,4 +508,3 @@
+ return(-4);
+ }
+
+-
diff --git a/app-misc/jail/files/jail-1.9-wrongshell.patch b/app-misc/jail/files/jail-1.9-wrongshell.patch
new file mode 100644
index 000000000000..1924337d06e4
--- /dev/null
+++ b/app-misc/jail/files/jail-1.9-wrongshell.patch
@@ -0,0 +1,11 @@
+--- a/lib/arch/generic/functions 2001-10-26 04:36:09.000000000 -0500
++++ b/lib/arch/generic/functions 2003-07-30 18:23:57.000000000 -0500
+@@ -831,7 +831,7 @@
+
+ if (!$found || !-e $SHELLS_FILE) {
+ open(F,">>".$SHELLS_FILE);
+- print F "$INSTALL_DIR/jail\n";
++ print F "$INSTALL_DIR/bin/jail\n";
+ close(F);
+ }
+ }
diff --git a/app-misc/jail/jail-2.0.ebuild b/app-misc/jail/jail-2.0.ebuild
new file mode 100644
index 000000000000..40247a1caf48
--- /dev/null
+++ b/app-misc/jail/jail-2.0.ebuild
@@ -0,0 +1,69 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+inherit eutils flag-o-matic
+
+DESCRIPTION="Builds a chroot and configures all the required files, directories and libraries"
+HOMEPAGE="https://github.com/spiculator/jail"
+SRC_URI="https://github.com/spiculator/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ppc x86"
+IUSE=""
+
+DEPEND=">=sys-apps/sed-4"
+RDEPEND="dev-lang/perl
+ dev-util/strace"
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${PN}-1.9-gentoo.patch \
+ "${FILESDIR}"/${PN}-1.9-wrongshell.patch \
+ "${FILESDIR}"/${PN}-1.9-multiuser-rsa.patch \
+ "${FILESDIR}"/${PN}-1.9-ldflags.patch
+}
+
+src_compile() {
+ # configuration files should be installed in /etc not /usr/etc
+ sed -i "s:\$4/etc:\${D}/etc:g" install.sh || die
+
+ # the destination directory should be /usr not /usr/local
+ sed -i -e "s:usr/local:${D}/usr:g" \
+ -e "s:^COPT =.*:COPT = -Wl,-z,no:g" src/Makefile || die
+
+ # Below didn't work. Don't know why
+ #append-ldflags -Wl,-z,now
+ emake -C src CC="$(tc-getCC)" CFLAGS="${CFLAGS}"
+}
+
+src_install() {
+ emake -C src install
+
+ # remove //var/tmp/portage/${P}/image//usr from files
+ FILES=( "${D}/usr/bin/mkjailenv"
+ "${D}/usr/bin/addjailsw"
+ "${D}/usr/bin/addjailuser"
+ "${D}/etc/jail.conf"
+ "${D}/usr/lib/libjail.pm"
+ "${D}/usr/lib/arch/generic/definitions"
+ "${D}/usr/lib/arch/generic/functions"
+ "${D}/usr/lib/arch/linux/definitions"
+ "${D}/usr/lib/arch/linux/functions"
+ "${D}/usr/lib/arch/freebsd/definitions"
+ "${D}/usr/lib/arch/freebsd/functions"
+ "${D}/usr/lib/arch/irix/definitions"
+ "${D}/usr/lib/arch/irix/functions"
+ "${D}/usr/lib/arch/solaris/definitions"
+ "${D}/usr/lib/arch/solaris/functions" )
+
+ for f in "${FILES[@]}"; do
+ sed -i "s:/${D}/usr:/usr:g" ${f} || die
+ done
+
+ sed -i "s:/usr/etc:/etc:" "${D}"/usr/lib/libjail.pm || die
+
+ dodoc doc/{CHANGELOG,INSTALL,README,SECURITY,VERSION}
+}
diff --git a/app-misc/jail/metadata.xml b/app-misc/jail/metadata.xml
new file mode 100644
index 000000000000..bcb966eb16a3
--- /dev/null
+++ b/app-misc/jail/metadata.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>spiculator@gmail.com</email>
+ <name>Sergey Redin</name>
+ <description>Maintainer, Assign bugs</description>
+ </maintainer>
+ <maintainer type="project">
+ <email>proxy-maint@gentoo.org</email>
+ <name>Proxy Maintainers</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">spiculator/jail</remote-id>
+ <bugs-to>https://github.com/spiculator/jail/issues</bugs-to>
+ </upstream>
+ <longdescription>
+Jail Chroot Project is an attempt of write a tool that builds a chrooted environment.
+The main goal of Jail is to be as simple as possible, and highly portable. The most
+difficult step when building a chrooted environment is to set up the right libraries and
+files. Here, Jail comes to the rescue with a tool to automagically configures and builds
+all the required files, directories and libraries.</longdescription>
+</pkgmetadata>