From 56bd759df1d0c750a065b8c845e93d5dfa6b549d Mon Sep 17 00:00:00 2001 From: "Robin H. Johnson" Date: Sat, 8 Aug 2015 13:49:04 -0700 Subject: proj/gentoo: Initial commit MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson X-Thanks: Alec Warner - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring - wrote much python to improve cvs2svn X-Thanks: Rich Freeman - validation scripts X-Thanks: Patrick Lauer - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed --- app-misc/jail/Manifest | 1 + app-misc/jail/files/jail-1.9-gentoo.patch | 130 +++++++++++++++++++++++ app-misc/jail/files/jail-1.9-ldflags.patch | 11 ++ app-misc/jail/files/jail-1.9-multiuser-rsa.patch | 44 ++++++++ app-misc/jail/files/jail-1.9-wrongshell.patch | 11 ++ app-misc/jail/jail-2.0.ebuild | 70 ++++++++++++ app-misc/jail/metadata.xml | 20 ++++ 7 files changed, 287 insertions(+) create mode 100644 app-misc/jail/Manifest create mode 100644 app-misc/jail/files/jail-1.9-gentoo.patch create mode 100644 app-misc/jail/files/jail-1.9-ldflags.patch create mode 100644 app-misc/jail/files/jail-1.9-multiuser-rsa.patch create mode 100644 app-misc/jail/files/jail-1.9-wrongshell.patch create mode 100644 app-misc/jail/jail-2.0.ebuild create mode 100644 app-misc/jail/metadata.xml (limited to 'app-misc/jail') diff --git a/app-misc/jail/Manifest b/app-misc/jail/Manifest new file mode 100644 index 000000000000..3bcd9b67ff1b --- /dev/null +++ b/app-misc/jail/Manifest @@ -0,0 +1 @@ +DIST jail-2.0.tar.gz 31095 SHA256 0ecdcc5230c99a7382d168ea60e9253c6bf5eec60b50f04f2588185c1974b07e SHA512 dfca62091b34f9adbe4e94de1dbf0ccd31bd3f8e492ea9788f712e97271b389475bc19e0390c12445353c4f73e5ba2458360bf55f5f64491705e82192db985ae WHIRLPOOL bd8619ae57d0e56d164397e8a0fb795ed2fe7215064aef5cfbfb293ea3325d5177b673459011781b0bbeddf2b0327987d5fb95a5dfe957b359908ca10db5147c 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..79b1b7181f8f --- /dev/null +++ b/app-misc/jail/jail-2.0.ebuild @@ -0,0 +1,70 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="5" + +inherit eutils flag-o-matic + +DESCRIPTION="a tool that 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..48f89fef7f38 --- /dev/null +++ b/app-misc/jail/metadata.xml @@ -0,0 +1,20 @@ + + + + proxy-maintainers + + spiculator@gmail.com + Sergey Redin + Maintainer, Assign bugs + + + spiculator/jail + https://github.com/spiculator/jail/issues + + +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. + -- cgit v1.2.3-65-gdbad