Re: [Tails-dev] source path's "/" prefix [Was: next big feat…

Delete this message

Reply to this message
Autor: anonym
Data:  
Dla: The Tails public development discussion list
Temat: Re: [Tails-dev] source path's "/" prefix [Was: next big features: status update]
03/19/2012 02:57 PM, intrigeri:
> hi,
>
> anonym wrote (19 Mar 2012 09:50:56 GMT) :
>> For home-rw compatibility it must be possible to specify the media
>> root, e.g. "/" with the absolute paths, and "." relative paths, with
>> the latter being illegal according to my above requirement to
>> disallow dots. Our options are:
> [...]
>> 2. We allow both absolute and relative paths, so "/" via absolute
>>    path syntax is the only way to specify the media root.
>>    Allowing both seems superfluous to me given that the absolute
>>    syntax can do everything.

>
> Allowing to type less weird characters seems superfluous given than
> typing more works? Am I the only one who remains unconvinced?


The leading / is only weird in the (what I expect to be) non-standard
case used by experts, i.e. when you specify both source and destination
(and possibly options too). I expect the standard case to be specifying
just a source (well actually it's more like a destination, see below),
e.g. stuff like `echo /home >> live.persist` to get a persistent home,
not `echo $whatever /home >> live.persist`. Hence it's given that
absolute source paths *must* be allowed, ok?

It follows that it's a question of *adding* support for relative source
paths, and if we do so we'll lose a nice property: source paths and
destination paths will have different restrictions. Also, no
functionality is added, just another way of expressing things that only
makes sense in the non-standard case. That's what I mean with "superfluous".

But the real issue is that SOURCE is an optional column instead of an
option in the options column. So why not make the live.persist syntax
into something much simpler, namely:

    DIR [OPTS]


where DIR is like DEST before. The SOURCE dir that live-boot sets is
automatically unique, so being able to specify it isn't something many
users should care about (in fact, they should be discouraged to do it).
And as I said over IRC, I think t-p-s should utilize the single-column
syntax no matter if you like this new syntax or not.

This syntax (modulo [OPTS]) was actually my first proposal in the RFC,
but to add backwards-compatibility for home-rw, specifying the source is
necessary. But that could be done with an option `source=$PATH` instead
of an (optional) SOURCE column, which makes more sense in itself. Also,
specifying the source isn't something that should be forced upon anyone
just because s/he wants to set an option like in our current syntax. And
since we have options, why not put all options in there? If we do this I
promise to make $PATH relative (w.r.t. the persistent media root) and
accept a "." (e.g. the media root) as the only situation where you're
allowed to use the special dot dirs. Oh, and it cannot contain comas
either... what a loss.

Is this ok? I assume this will be fairly easy to adapt to on your side,
and for the record, it'd be easy to do in live-boot as well, so I could
have it fixed tonight, or tomorrow at the latest.

(BTW, while I do care about Tails not having to do crazy shit to cope
with live-boot I'm playing the Devil's advocate here in order to prevent
live-boot from degenerating into a nonsensical mess on behalf of our
requirements. I hope you're not too frustrated with this. :))

Cheers!