mtree "language" enhancements

Poul-Henning Kamp phk at phk.freebsd.dk
Sun Nov 29 18:16:11 UTC 2015


--------
In message <CANCZdfrDtfkwKxMV3o9tcQNzBQDKZdTx1JErkTKtC7UZORT5aA at mail.gmail.com>
, Warner Losh writes:

>As part of making NanoBSD buildable by non-root, I've found a need to have
>a richer mtree language than we currently have.

>I'd like a new type called 'action' (so type=action in the records). This
>type is defined loosely to manipulate and earlier entry (or maybe entries,
>still unsure) in the file.

I suggest you define this so that all records have an action, and that
the default action is "create"

>2. "move" which relocates a previous entry. An additional targetpath
>keyword specifies the ultimate destination for this entry.
>3. "copy" which duplicates a previous entry. It too takes targetpath.

Is targetpath absolute or relative ?

Can it reach out of the mtree root ?

>4. "meta" which changes the meta data of the previous entry. All keywords
>on this are merged with the previous entry.

System-III called this "chmog" if I recall correctly :-)

>The one other thing that my merging tool does is to remove all size
>keywords.

That sounds wrong to me.  Shouldn't you just emit "meta" records updating
the size as appropriate ?

What about digest fields ?

-- 
Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
phk at FreeBSD.ORG         | TCP/IP since RFC 956
FreeBSD committer       | BSD since 4.3-tahoe    
Never attribute to malice what can adequately be explained by incompetence.


More information about the freebsd-arch mailing list