From nobody@FreeBSD.org  Thu Oct 13 00:05:29 2005
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id C5B0116A41F
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 13 Oct 2005 00:05:29 +0000 (GMT)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [216.136.204.117])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 929BD43D48
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 13 Oct 2005 00:05:29 +0000 (GMT)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.13.1/8.13.1) with ESMTP id j9D05THw027381
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 13 Oct 2005 00:05:29 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.13.1/8.13.1/Submit) id j9D05Tnm027376;
	Thu, 13 Oct 2005 00:05:29 GMT
	(envelope-from nobody)
Message-Id: <200510130005.j9D05Tnm027376@www.freebsd.org>
Date: Thu, 13 Oct 2005 00:05:29 GMT
From: "Eli K. Breen" <bsd@unixforge.net>
To: freebsd-gnats-submit@FreeBSD.org
Subject: Jail building instructions don't work as described with default CSH shell
X-Send-Pr-Version: www-2.3

>Number:         87351
>Category:       docs
>Synopsis:       Jail building instructions don't work as described with default CSH shell
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    keramida
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          doc-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Oct 13 00:10:18 GMT 2005
>Closed-Date:    Fri May 26 10:19:15 GMT 2006
>Last-Modified:  Fri May 26 10:19:15 GMT 2006
>Originator:     Eli K. Breen
>Release:        FreeBSD 5.4-RELEASE
>Organization:
UNIX|Forge Heavy Industries
>Environment:
FreeBSD cannon.activestate.com 5.4-RELEASE FreeBSD 5.4-RELEASE #0: Tue Aug 16 13:02:01 PDT 2005     root@cannon.activestate.com:/usr/obj/usr/src/sys/LONGSHOT_II  i386
>Description:
Building jails does not work as perscribed in the man (8) jail docs. The default shell for root on a new and stock FreeBSD box is csh, the instruction include the line:
D=/path/to/your/jail
..which does not work under csh, this returns a Command Not Found error.
>How-To-Repeat:
switch to csh, try to build a jail using the supplied instructions from the jail(8) manpage.

..
user@box# csh
user@box# D=/path/to/your/jail
D=/path/to/your/jail: Command not found.
user@box#

>Fix:
jail manpage currently reads:

     D=/here/is/the/jail
     cd /usr/src
     mkdir -p $D
     make world DESTDIR=$D
     cd etc
     make distribution DESTDIR=$D
     mount_devfs devfs $D/dev
     cd $D
     ln -sf dev/null kernel

..and should read:
     set D=/here/is/the/jail
     cd /usr/src
     mkdir -p $D
     make world DESTDIR=$D
     cd etc
     make distribution DESTDIR=$D
     mount_devfs devfs $D/dev
     cd $D
     ln -sf dev/null kernel
.. or specify that the instructions do not work under csh.
>Release-Note:
>Audit-Trail:

From: Giorgos Keramidas <keramida@freebsd.org>
To: "Eli K. Breen" <bsd@unixforge.net>
Cc: freebsd-gnats-submit@freebsd.org
Subject: Re: docs/87351: Jail building instructions don't work as described with default CSH shell
Date: Sat, 22 Oct 2005 20:32:32 +0300

 On 2005-10-13 00:05, "Eli K. Breen" <bsd@unixforge.net> wrote:
 > Building jails does not work as perscribed in the man (8) jail
 > docs. The default shell for root on a new and stock FreeBSD box is
 > csh, the instruction include the line:
 >
 > D=/path/to/your/jail
 >
 > ..which does not work under csh, this returns a Command Not Found error.
 
 > switch to csh, try to build a jail using the supplied instructions
 > from the jail(8) manpage.
 
 > user@box# csh
 > user@box# D=/path/to/your/jail
 > D=/path/to/your/jail: Command not found.
 > user@box#
 
 > jail manpage currently reads:
 >
 >      D=/here/is/the/jail
 >      cd /usr/src
 >      mkdir -p $D
 >      make world DESTDIR=$D
 >      cd etc
 >      make distribution DESTDIR=$D
 >      mount_devfs devfs $D/dev
 >      cd $D
 >      ln -sf dev/null kernel
 >
 > ..and should read:
 >
 >      set D=/here/is/the/jail
 >      cd /usr/src
 >      mkdir -p $D
 >      make world DESTDIR=$D
 >      cd etc
 >      make distribution DESTDIR=$D
 >      mount_devfs devfs $D/dev
 >      cd $D
 >      ln -sf dev/null kernel
 >
 > .. or specify that the instructions do not work under csh.
 
 I'd certainly support adding a note that these commands work fine fror
 sh(1) and other Bourne shells.  Then we can probably add another set of
 commands for csh, if that seems nice to have.
 

From: Giorgos Keramidas <keramida@freebsd.org>
To: Tom Rhodes <trhodes@freebsd.org>
Cc: Brooks Davis <brooks@one-eyed-alien.net>, bug-followup@freebsd.org
Subject: Re: docs/87351: Jail building instructions don't work as described with default CSH shell
Date: Wed, 26 Oct 2005 15:05:54 +0300

 On 2005-10-25 19:17, Tom Rhodes <trhodes@FreeBSD.org> wrote:
 >On Mon, 24 Oct 2005 10:40:54 -0700
 >Brooks Davis <brooks@one-eyed-alien.net> wrote:
 >>On Sun, Oct 23, 2005 at 12:10:20AM +0000, Giorgos Keramidas wrote:
 >>>  I'd certainly support adding a note that these commands work fine fror
 >>>  sh(1) and other Bourne shells.  Then we can probably add another set of
 >>>  commands for csh, if that seems nice to have.
 >>
 >> Shell examples are traditionally in sh.  I'd really rather not see use
 >> bloat every instance of them with a csh example.  Users can always type
 >> "sh".
 >
 > I'm inclined to agree with Brooks.
 
 Alright then.  How about this change?
 
 % Index: jail.8
 % ===================================================================
 % RCS file: /home/ncvs/src/usr.sbin/jail/jail.8,v
 % retrieving revision 1.70
 % diff -u -r1.70 jail.8
 % --- jail.8      7 Aug 2005 20:53:29 -0000       1.70
 % +++ jail.8      26 Oct 2005 12:03:42 -0000
 % @@ -110,10 +110,11 @@
 %  man page for further details.
 %  .Sh EXAMPLES
 %  .Ss "Setting up a Jail Directory Tree"
 % -This example shows how to set up a jail directory tree
 % -containing an entire
 % +To set up a jail directory tree containing an entire
 %  .Fx
 % -distribution:
 % +distribution, the following
 % +.Xr sh 1
 % +command script can be used:
 %  .Bd -literal
 %  D=/here/is/the/jail
 %  cd /usr/src
 
 This way the reader knows that this is an sh(1) command script.
 
 One may argue that people who are setting up jails are already admins
 who should be able to understand if a script is meant to be run through
 sh(1), csh(1) or even both, but I'll never stop being a fan of a little
 more clarity :-)
 

From: "Simon L. Nielsen" <simon@FreeBSD.org>
To: Giorgos Keramidas <keramida@freebsd.org>
Cc: freebsd-gnats-submit@FreeBSD.org
Subject: Re: docs/87351: Jail building instructions don't work as described with default CSH shell
Date: Wed, 26 Oct 2005 14:22:30 +0200

 --GRPZ8SYKNexpdSJ7
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: inline
 Content-Transfer-Encoding: quoted-printable
 
 On 2005.10.26 12:10:24 +0000, Giorgos Keramidas wrote:
 
 >  Alright then.  How about this change?
 > =20
 >  % Index: jail.8
 >  % =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
 >  % RCS file: /home/ncvs/src/usr.sbin/jail/jail.8,v
 >  % retrieving revision 1.70
 >  % diff -u -r1.70 jail.8
 >  % --- jail.8      7 Aug 2005 20:53:29 -0000       1.70
 >  % +++ jail.8      26 Oct 2005 12:03:42 -0000
 >  % @@ -110,10 +110,11 @@
 >  %  man page for further details.
 >  %  .Sh EXAMPLES
 >  %  .Ss "Setting up a Jail Directory Tree"
 >  % -This example shows how to set up a jail directory tree
 >  % -containing an entire
 >  % +To set up a jail directory tree containing an entire
 >  %  .Fx
 >  % -distribution:
 >  % +distribution, the following
 >  % +.Xr sh 1
 >  % +command script can be used:
 >  %  .Bd -literal
 >  %  D=3D/here/is/the/jail
 >  %  cd /usr/src
 > =20
 >  This way the reader knows that this is an sh(1) command script.
 
 This looks like a good solution to me (and is similar to what I
 suggested for the WIP Jail section for the Handbook).
 
 >  One may argue that people who are setting up jails are already admins
 >  who should be able to understand if a script is meant to be run through
 >  sh(1), csh(1) or even both, but I'll never stop being a fan of a little
 >  more clarity :-)
 
 Well... :-).
 
 --=20
 Simon L. Nielsen
 
 --GRPZ8SYKNexpdSJ7
 Content-Type: application/pgp-signature
 Content-Disposition: inline
 
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.2 (FreeBSD)
 
 iD8DBQFDX3UGh9pcDSc1mlERAsMtAKDMKf+LIo+3zWZc/L+7vlYXE6inEgCfdv5l
 8px7AOhUYV4GXQ75mntgQhA=
 =K1R+
 -----END PGP SIGNATURE-----
 
 --GRPZ8SYKNexpdSJ7--
State-Changed-From-To: open->patched 
State-Changed-By: keramida 
State-Changed-When: Wed Oct 26 20:18:41 GMT 2005 
State-Changed-Why:  

I've just committed a note that points to sh(1) in CURRENT. 
The change will be MFC'ed in a few days.  If I get approval 
early enough it will even be in 6.0-RELEASE. 

Thanks for the problem report :) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=87351 
Responsible-Changed-From-To: freebsd-doc->keramida 
Responsible-Changed-By: keramida 
Responsible-Changed-When: Wed Oct 26 20:21:12 GMT 2005 
Responsible-Changed-Why:  
Grab this, as a reminder to MFC the committed change. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=87351 

From: Tom Rhodes <trhodes@FreeBSD.org>
To: Giorgos Keramidas <keramida@FreeBSD.org>
Cc: trhodes@FreeBSD.org, brooks@one-eyed-alien.net, bug-followup@FreeBSD.org
Subject: Re: docs/87351: Jail building instructions don't work as described
 with default CSH shell
Date: Thu, 27 Oct 2005 06:06:47 -0400

 On Wed, 26 Oct 2005 15:05:54 +0300
 Giorgos Keramidas <keramida@freebsd.org> wrote:
 
 > On 2005-10-25 19:17, Tom Rhodes <trhodes@FreeBSD.org> wrote:
 > >On Mon, 24 Oct 2005 10:40:54 -0700
 > >Brooks Davis <brooks@one-eyed-alien.net> wrote:
 > >>On Sun, Oct 23, 2005 at 12:10:20AM +0000, Giorgos Keramidas wrote:
 > >>>  I'd certainly support adding a note that these commands work fine fror
 > >>>  sh(1) and other Bourne shells.  Then we can probably add another set of
 > >>>  commands for csh, if that seems nice to have.
 > >>
 > >> Shell examples are traditionally in sh.  I'd really rather not see use
 > >> bloat every instance of them with a csh example.  Users can always type
 > >> "sh".
 > >
 > > I'm inclined to agree with Brooks.
 > 
 > Alright then.  How about this change?
 > 
 > % Index: jail.8
 > % ===================================================================
 > % RCS file: /home/ncvs/src/usr.sbin/jail/jail.8,v
 > % retrieving revision 1.70
 > % diff -u -r1.70 jail.8
 > % --- jail.8      7 Aug 2005 20:53:29 -0000       1.70
 > % +++ jail.8      26 Oct 2005 12:03:42 -0000
 > % @@ -110,10 +110,11 @@
 > %  man page for further details.
 > %  .Sh EXAMPLES
 > %  .Ss "Setting up a Jail Directory Tree"
 > % -This example shows how to set up a jail directory tree
 > % -containing an entire
 > % +To set up a jail directory tree containing an entire
 > %  .Fx
 > % -distribution:
 > % +distribution, the following
 > % +.Xr sh 1
 > % +command script can be used:
 > %  .Bd -literal
 > %  D=/here/is/the/jail
 > %  cd /usr/src
 > 
 > This way the reader knows that this is an sh(1) command script.
 > 
 > One may argue that people who are setting up jails are already admins
 > who should be able to understand if a script is meant to be run through
 > sh(1), csh(1) or even both, but I'll never stop being a fan of a little
 > more clarity :-)
 
 Exactly, though I think this is benign for exactly the
 reason you stated.  I'm going to take the medium path -
 not care either way.  So if Brooks doesn't have a problem
 then go.  Thanks!
 
 -- 
 Tom Rhodes
State-Changed-From-To: patched->closed 
State-Changed-By: matteo 
State-Changed-When: Fri May 26 10:18:47 UTC 2006 
State-Changed-Why:  
I merged the patch keramida@ committed 

http://www.freebsd.org/cgi/query-pr.cgi?pr=87351 
>Unformatted:
