Subject: proposal - a new mtree file format
To: None <tech-userlevel@netbsd.org>
From: Simon Burge <simonb@wasabisystems.com>
List: tech-userlevel
Date: 03/06/2001 12:17:48
Hi,

I'd like to propose a non-hierarchical (ie, all pathnames are relative
to the current (or command-line specified) directory) "version 2" mtree
file format that has (what I perceive as) a couple of advantages over
the existing format:

 + Smaller
	 452     516   11132 NetBSD.DIST (new format)
	2299    2738   28032 NetBSD.dist (old format)
   A lot of the space taken up with the current format is just comments
   to keep some form of sanity as to where you are in the directory
   hierarchy, which leads to...

 + Easier to read, much harder to bugger up (especially when the above
   mentioned locator comments are wrong!).

 + Easier to build mtree specifications on the fly.  I have some
   back-of-the-mind ideas for making unprivileged "make release"s
   that this could assist with.

The format would be:

	/version 2
	/set type=dir uname=root gname=wheel mode=0755
	.
	./altroot
	./bin
	./dev
	./dev/fd
	./etc
	./etc/defaults
	./etc/kerberosIV
	./etc/kerberosV
	./etc/mail
	./etc/mtree
	./etc/namedb
	./etc/openssl
		  ...
	./tmp                   mode=01777
		  ...
	./usr/games/hide        uname=root gname=games mode=0750
		  ...
	./usr/pkg                       ignore optional
		  ...
	./var/at/jobs                   mode=0700
		  ...


The "/version 2" specifies that the file is in the new format.  A
"/version" line must be the first (non-comment) line for a version 2
file ("/version 1" is allowable but not very useful - it's not backwards
compatible in any way).  "/" is already used as the command lead-in
character for /set and /unset and is invalid as the start of a file
name.

Comments?

Simon.
--
Simon Burge                            <simonb@wasabisystems.com>
NetBSD CDs, Support and Service:    http://www.wasabisystems.com/