From owner-freebsd-ports@FreeBSD.ORG Sun Feb 8 04:40:10 2004 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9BF3716A4CF; Sun, 8 Feb 2004 04:40:10 -0800 (PST) Received: from smtp.des.no (flood.des.no [217.116.83.31]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6CA0C43D1D; Sun, 8 Feb 2004 04:40:10 -0800 (PST) (envelope-from des@des.no) Received: by smtp.des.no (Pony Express, from userid 666) id 41F245311; Sun, 8 Feb 2004 13:40:09 +0100 (CET) Received: from dwp.des.no (des.no [80.203.228.37]) by smtp.des.no (Pony Express) with ESMTP id 7F30D530D; Sun, 8 Feb 2004 13:39:59 +0100 (CET) Received: by dwp.des.no (Postfix, from userid 2602) id 1782B33C6F; Sun, 8 Feb 2004 13:39:59 +0100 (CET) To: "Dan Langille" References: <4024F2B3.16448.B4BF9D9@localhost> From: des@des.no (Dag-Erling =?iso-8859-1?q?Sm=F8rgrav?=) Date: Sun, 08 Feb 2004 13:39:59 +0100 In-Reply-To: <4024F2B3.16448.B4BF9D9@localhost> (Dan Langille's message of "Sat, 07 Feb 2004 14:14:11 -0500") Message-ID: User-Agent: Gnus/5.090024 (Oort Gnus v0.24) Emacs/21.3 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on flood.des.no X-Spam-Level: X-Spam-Status: No, hits=0.0 required=5.0 tests=AWL autolearn=no version=2.63 cc: ports@freebsd.org cc: anders@freebsd.org cc: marcel@FreeBSD.org Subject: Re: Jail for emulators/linux_base X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Feb 2004 12:40:10 -0000 "Dan Langille" writes: > In emulators/linux_base/Makefile, I see this: > > .if !defined(BATCH) && !exists(${LINUXBASE}/dev/null) > @${ECHO_MSG} "" > @${ECHO_MSG} "You need to create the null device in your=20 > jailed Linux environment. Run this" > @${ECHO_MSG} "outside the jail, then press enter:" > @${ECHO_MSG} "" > @${ECHO_MSG} "mkdir -m 0755 -p /dev" > @${ECHO_MSG} "rm -f ${LINUXBASE}/dev/null" > @${ECHO_MSG} "mknod ${LINUXBASE}/dev/null c 2=20 > 2" > @${ECHO_MSG} "chmod 666 ${LINUXBASE}/dev/null" > @${ECHO_MSG} "" > @${SH} -c "read line" > .endif > > Would it not be better to use ${LINUXBASE} instead of dir>? As it stands, the user (namely me) has no idea where root dir> should be. The entire check is bogus. Outside a jail, you already have /dev/null and therefore don't need to do anything. Inside a jail, all you need to do is 'cd /dev && sh MAKEDEV std' (on 4.x) or 'mount_devfs dev /dev' (on 5.x), and FreeBSD processes need this just as much as Linux processes. In either case, you will never have ${LINUXBASE}/dev/null, just /dev/null. And finally, it would be trivial and far more user- friendly for the Makefile to do the required mknod'ing itself rather than require user intervention. DES --=20 Dag-Erling Sm=F8rgrav - des@des.no