xref: /dragonfly/etc/mtree/README (revision ed5d5720)
1$FreeBSD: src/etc/mtree/README,v 1.4.2.2 2002/08/08 09:50:20 ru Exp $
2$DragonFly: src/etc/mtree/README,v 1.2 2003/06/17 04:24:48 dillon Exp $
3
4Note: If you modify these files, please keep hier(7) updated!
5
6These files are used to create empty file hierarchies for building the
7system into.  Some notes about working with them are placed here to try
8and keep them in good working order.
9
10    a)  The files use 4 space indentation, and other than in the header
11        comments, should not contain any tabs.  An indentation of 4 is
12        preferable to the standard indentation of 8 because the indentation
13        of levels in these files can become quite deep causing the line to
14        overflow 80 characters.
15
16        This also matches with the files generated when using the
17        mtree -c option, which was implemented that way for the same reason.
18
19    b)  Only directories should be listed here.
20
21    c)  The listing should be kept in filename sorted order.
22
23    d)  Sanity checking changes to these files can be done by following
24        this procedure (the sed -e is ugly, but fixing mtree -c to
25        not emit the trailing white space would be even uglier):
26
27            mkdir /tmp/MTREE
28            mtree -deU -f BSD.X.dist -p /tmp/MTREE
29            mtree -cdin -k uname,gname,mode -p /tmp/MTREE | \
30		sed -e 's/ *$//' | tail +5 >BSD.X.new
31            diff -u BSD.X.dist BSD.X.new
32            rm -r /tmp/MTREE
33
34        Note that you will get some differences about /set lines,
35        and uname= gname= on certain directory areas, mainly man page
36        sections.  This is caused by mtree not having a look ahead
37        mechanism for making better selections for these as it
38        traverses the hierarchy.
39
40        The BSD.X.new file should NOT be commited, will be missing the
41        correct header, and important keywords like ``nochange''.  Simply
42        use the diff for a sanity check to make sure things are in the
43        correct order and correctly indented.
44
45    e)  Further sanity checking of the system builds with DESTDIR=/someplace
46        are more complicated, but can often catch missing entries in these
47        files.  I tend to run this more complete sanity check shortly after
48        the target date for a new release is announced.
49
50        If you want details on it bug me about it via email to
51        rgrimes@FreeBSD.org.
52