Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 13 Jun 2004 10:41:52 +0200 (CEST)
From:      bugghy <bugghy@phenix.rootshell.be>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/67900: New port: sysutils/jail  Builds a chrooted environment
Message-ID:  <Pine.LNX.4.44.0406131039520.22274-100000@phenix.rootshell.be>
Resent-Message-ID: <200406130850.i5D8o4M2040054@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         67900
>Category:       ports
>Synopsis:       New port: sysutils/jail  Builds a chrooted environment
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sun Jun 13 08:50:03 GMT 2004
>Closed-Date:
>Last-Modified:
>Originator:     bugghy
>Release:        FreeBSD 5.2.1-RELEASE-p8 i386
>Organization:
>Environment:
System: FreeBSD illusion.com 5.2.1-RELEASE-p8 FreeBSD 5.2.1-RELEASE-p8 #39: Tue Jun 1 19:55:48 GMT 2004 root@illusion.com:/usr/obj/usr/src/sys/BUGNERIC i386
>Description:
	I've made a port for: http://sourceforge.net/projects/jail/

	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.
>How-To-Repeat:
>Fix:
# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#       jail
#       jail/files
#       jail/files/patch-Makefile
#       jail/files/patch-functions
#       jail/files/patch-install.sh
#       jail/Makefile
#       jail/pkg-descr
#       jail/pkg-plist
#       jail/distinfo
#       jail/pkg-message
#
echo c - jail
mkdir -p jail > /dev/null 2>&1
echo c - jail/files
mkdir -p jail/files > /dev/null 2>&1
echo x - jail/files/patch-Makefile
sed 's/^X//' >jail/files/patch-Makefile << 'END-of-jail/files/patch-Makefile'
X--- Makefile.orig      Mon Oct 29 17:40:48 2001
X+++ Makefile   Sat Jun 12 18:01:52 2004
X@@ -19,8 +19,8 @@
X #
X ##############################################################################
X 
X-ARCH=__LINUX__
X-#ARCH=__FREEBSD__
X+#ARCH=__LINUX__
X+ARCH=__FREEBSD__
X #ARCH=__IRIX__
X #ARCH=__SOLARIS__
X 
X@@ -28,7 +28,7 @@
X INSTALL_DIR = /usr/local
X PERL = /usr/bin/perl
X ROOTUSER = root
X-ROOTGROUP = root
X+ROOTGROUP = wheel
X 
X # ----------------------------------------------------------------------
X #
END-of-jail/files/patch-Makefile
echo x - jail/files/patch-functions
sed 's/^X//' >jail/files/patch-functions << 'END-of-jail/files/patch-functions'
X//                     A little bug patched in jail 1.9 (it didn't set the shell correctly in /etc/shells)
X//                                                     v1.0a
X//                                                   by Bugghy (bugghy@rootshell.be)
X
X*** ../lib/arch/generic/functions      Fri Oct 26 12:36:09 2001
X--- ../lib/arch/generic/functions      Sat Jun 14 13:41:22 2003
X***************
X*** 823,829 ****
X    close(F);
X  
X    for $k (@elem) {
X!     if ($k =~ /^$INSTALL_DIR\/jail/) {
X        $found = 1;
X        last;
X      }
X--- 823,829 ----
X    close(F);
X  
X    for $k (@elem) {
X!     if ($k =~ /^$INSTALL_DIR\/bin/jail/) {
X        $found = 1;
X        last;
X      }
X***************
X*** 831,837 ****
X  
X    if (!$found || !-e $SHELLS_FILE) {
X      open(F,">>".$SHELLS_FILE);
X!     print F "$INSTALL_DIR/jail\n";
X      close(F);
X    } 
X  }
X--- 831,837 ----
X  
X    if (!$found || !-e $SHELLS_FILE) {
X      open(F,">>".$SHELLS_FILE);
X!     print F "$INSTALL_DIR/bin/jail\n";
X      close(F);
X    } 
X  }
END-of-jail/files/patch-functions
echo x - jail/files/patch-install.sh
sed 's/^X//' >jail/files/patch-install.sh << 'END-of-jail/files/patch-install.sh'
X--- ../install.sh.old  Sat Jun 12 18:29:13 2004
X+++ ../install.sh      Sat Jun 12 18:29:47 2004
X@@ -70,9 +70,9 @@
X parse_tag /tmp/jail.conf.tmp __DEBUG__      $3
X parse_tag /tmp/jail.conf.tmp __INSTALLDIR__ $4
X 
X-mv /tmp/jail.conf.tmp /tmp/jail.conf
X-install_file /tmp/jail.conf $4/etc $5 $6 $7
X-rm /tmp/jail.conf
X+mv /tmp/jail.conf.tmp /tmp/jail.conf.sample
X+install_file /tmp/jail.conf.sample $4/etc $5 $6 $7
X+rm /tmp/jail.conf.sample
X 
X }
X 
END-of-jail/files/patch-install.sh
echo x - jail/Makefile
sed 's/^X//' >jail/Makefile << 'END-of-jail/Makefile'
X# New ports collection makefile for:   jail
X# Date created:        10 Jun 2004
X# Whom:                bugghy <bugghy@SAFe-mail.net>
X#
X# $FreeBSD$
X#
X
XPORTNAME=                      jail
XPORTVERSION=                   1.9
XCATEGORIES=                    sysutils security
XMASTER_SITES=                  http://switch.dl.sourceforge.net/sourceforge/jail/
XDISTNAME=              ${PORTNAME}_${PORTVERSION}
XWRKSRC=                        ${WRKDIR}/jail_1-9_stable/src
X
XMAINTAINER=                    bugghy@SAFe-mail.net
XCOMMENT=                       Builds a chrooted environment
X
XNO_INSTALL_MANPAGES=   yes
X
Xpost-install:
X.if !defined(NOPORTDOCS)
X       ${MKDIR} ${DOCSDIR}
X       ${INSTALL_MAN} ${WRKSRC}/../doc/CHANGELOG ${DOCSDIR}
X       ${INSTALL_MAN} ${WRKSRC}/../doc/INSTALL ${DOCSDIR}
X       ${INSTALL_MAN} ${WRKSRC}/../doc/README ${DOCSDIR}
X       ${INSTALL_MAN} ${WRKSRC}/../doc/SECURITY ${DOCSDIR}
X       ${INSTALL_MAN} ${WRKSRC}/../doc/VERSION ${DOCSDIR}
X       ${INSTALL_MAN} ${WRKSRC}/../doc/download ${DOCSDIR}
X       ${INSTALL_MAN} ${WRKSRC}/../doc/features ${DOCSDIR}
X       ${INSTALL_MAN} ${WRKSRC}/../doc/intro ${DOCSDIR}
X       @${CAT} ${PKGMESSAGE}
X.endif
X
X.include <bsd.port.mk>
END-of-jail/Makefile
echo x - jail/pkg-descr
sed 's/^X//' >jail/pkg-descr << 'END-of-jail/pkg-descr'
XJail Chroot Project is an attempt of write a tool that builds a chrooted 
Xenvironment. The main goal of Jail is to be as simple as possible, and 
Xhighly portable. The most difficult step when building a chrooted environment 
Xis to set up the right libraries.
X
X WWW: http://sourceforge.net/projects/jail/
X
X- bugghy
Xbugghy@SAFe-mail.net
END-of-jail/pkg-descr
echo x - jail/pkg-plist
sed 's/^X//' >jail/pkg-plist << 'END-of-jail/pkg-plist'
Xbin/jail
Xbin/mkjailenv
Xbin/addjailsw
Xbin/addjailuser
Xetc/jail.conf.sample
Xlib/libjail.pm
Xlib/arch/generic/definitions
Xlib/arch/generic/functions
Xlib/arch/linux/definitions
Xlib/arch/linux/functions
Xlib/arch/freebsd/definitions
Xlib/arch/freebsd/functions
Xlib/arch/irix/definitions
Xlib/arch/irix/functions
Xlib/arch/solaris/definitions
Xlib/arch/solaris/functions
X%%PORTDOCS%%%%DOCSDIR%%/CHANGELOG
X%%PORTDOCS%%%%DOCSDIR%%/INSTALL
X%%PORTDOCS%%%%DOCSDIR%%/README
X%%PORTDOCS%%%%DOCSDIR%%/SECURITY 
X%%PORTDOCS%%%%DOCSDIR%%/VERSION
X%%PORTDOCS%%%%DOCSDIR%%/download
X%%PORTDOCS%%%%DOCSDIR%%/features
X%%PORTDOCS%%%%DOCSDIR%%/intro
X%%PORTDOCS%%@dirrm %%DOCSDIR%%
END-of-jail/pkg-plist
echo x - jail/distinfo
sed 's/^X//' >jail/distinfo << 'END-of-jail/distinfo'
XMD5 (jail_1.9.tar.gz) = d9c4ae58e658e8b13809399c69726154
XSIZE (jail_1.9.tar.gz) = 32994
END-of-jail/distinfo
echo x - jail/pkg-message
sed 's/^X//' >jail/pkg-message << 'END-of-jail/pkg-message'
X
X###################################################################
X# Installed additional documentation in: ${PREFIX}/share/doc/jail #
X# Copy ${PREFIX}/etc/jail.conf.sample to ${PREFIX}/etc/jail.conf  #
X###################################################################
X
END-of-jail/pkg-message
exit


>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.LNX.4.44.0406131039520.22274-100000>