176629441SRuslan ErmilovNote: If you modify these files, please keep hier(7) updated! 20db47a7cSRuslan Ermilov 39998ec0eSRodney W. GrimesThese files are used to create empty file hierarchies for building the 49998ec0eSRodney W. Grimessystem into. Some notes about working with them are placed here to try 59998ec0eSRodney W. Grimesand keep them in good working order. 69998ec0eSRodney W. Grimes 79998ec0eSRodney W. Grimes a) The files use 4 space indentation, and other than in the header 89998ec0eSRodney W. Grimes comments, should not contain any tabs. An indentation of 4 is 99998ec0eSRodney W. Grimes preferable to the standard indentation of 8 because the indentation 109998ec0eSRodney W. Grimes of levels in these files can become quite deep causing the line to 119998ec0eSRodney W. Grimes overflow 80 characters. 129998ec0eSRodney W. Grimes 139998ec0eSRodney W. Grimes This also matches with the files generated when using the 149998ec0eSRodney W. Grimes mtree -c option, which was implemented that way for the same reason. 159998ec0eSRodney W. Grimes 169998ec0eSRodney W. Grimes b) Only directories should be listed here. 179998ec0eSRodney W. Grimes 185ed41602SDoug Barton c) The listing should be kept in filename sorted order. 199998ec0eSRodney W. Grimes 209998ec0eSRodney W. Grimes d) Sanity checking changes to these files can be done by following 21f10c8263SRodney W. Grimes this procedure (the sed -e is ugly, but fixing mtree -c to 229998ec0eSRodney W. Grimes not emit the trailing white space would be even uglier): 239998ec0eSRodney W. Grimes 249998ec0eSRodney W. Grimes mkdir /tmp/MTREE 259998ec0eSRodney W. Grimes mtree -deU -f BSD.X.dist -p /tmp/MTREE 26*0a41a668SJose Luis Duran mtree -bcdjn -F freebsd9 -k uname,gname,mode -p /tmp/MTREE | \ 2751a8a564SRuslan Ermilov sed -e 's/ *$//' >BSD.X.new 289998ec0eSRodney W. Grimes diff -u BSD.X.dist BSD.X.new 299998ec0eSRodney W. Grimes rm -r /tmp/MTREE 309998ec0eSRodney W. Grimes 319998ec0eSRodney W. Grimes Note that you will get some differences about /set lines, 329998ec0eSRodney W. Grimes and uname= gname= on certain directory areas, mainly man page 339998ec0eSRodney W. Grimes sections. This is caused by mtree not having a look ahead 349998ec0eSRodney W. Grimes mechanism for making better selections for these as it 359998ec0eSRodney W. Grimes traverses the hierarchy. 369998ec0eSRodney W. Grimes 37e17b9e4aSUlrich Spörlein The BSD.X.new file should NOT be committed, as it will be missing 38e17b9e4aSUlrich Spörlein the correct header, and important keywords like ``nochange''. 39e17b9e4aSUlrich Spörlein Simply use the diff for a sanity check to make sure things are in 40e17b9e4aSUlrich Spörlein the correct order and correctly indented. 419998ec0eSRodney W. Grimes 429998ec0eSRodney W. Grimes e) Further sanity checking of the system builds with DESTDIR=/someplace 439998ec0eSRodney W. Grimes are more complicated, but can often catch missing entries in these 449998ec0eSRodney W. Grimes files. I tend to run this more complete sanity check shortly after 459998ec0eSRodney W. Grimes the target date for a new release is announced. 469998ec0eSRodney W. Grimes 479998ec0eSRodney W. Grimes If you want details on it bug me about it via email to 489998ec0eSRodney W. Grimes rgrimes@FreeBSD.org. 49