From owner-freebsd-questions Tue Dec 10 2:13:11 2002 Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7186937B404 for ; Tue, 10 Dec 2002 02:13:09 -0800 (PST) Received: from mcesr.etat.lu (dynamic4.etat.lu [194.154.200.100]) by mx1.FreeBSD.org (Postfix) with ESMTP id B9EFA43EC2 for ; Tue, 10 Dec 2002 02:13:07 -0800 (PST) (envelope-from didier.wiroth@mcesr.etat.lu) Received: from [148.110.43.149] (HELO lucifer) by mcesr.etat.lu (CommuniGate Pro SMTP 3.5.9) with ESMTP-TLS id 689509 for freebsd-questions@FreeBSD.ORG; Tue, 10 Dec 2002 11:07:08 +0100 Reply-To: From: "Didier Wiroth" To: Subject: RE: Installing additional ports in a jail! Date: Tue, 10 Dec 2002 11:12:50 +0100 Organization: MCESR Message-ID: <000001c2a034$b208a610$952b6e94@lucifer> X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.4024 Importance: Normal In-Reply-To: <20021210091605.GB34702@ei.bzerk.org> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Sorry for posting that! Your method (method from Ruben de Groot) is quite good! It works really good with the ports collection and with the src code! I have just tried after having post the message! So to avoid future postings, here is are the methods for the ports collection and for the source code! A) For the ports collection 1) cd /usr/ports/ 2) make 3) mount_null /usr/ports /jails/jailX/usr/ports 4) chroot /jails/jailX 5) cd /usr/ports/ 6) make install 7) exit 8) umount_null /jails/jailX/usr/ports B) For the source code (for example for recompiling and updating a daemon). Here is how I did it for example for applying the jailed/chrooted openssh option to the sshd with a patch available here: http://garage.freebsd.pl/openssh.tgz 1) cd /usr/src/crypto/openssh 2) patch < /path/to/openssh.diff 3) cd /usr/src/secure/usr.sbin/sshd 4) patch < /path/to/Makefile.diff 5) mount_null /usr/src /jails/jailX/usr/src 6) chroot /jails/jailX 7) cd /usr/src/secure/usr.sbin/sshd 8) make && make install 9) exit 10) umount /jails/jailX/usr/src That's it! Again thanks, to anybody for the help To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message