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