[rb-general] Clarification on BUILD_PATH_PREFIX_MAP and drive letters

Ximin Luo infinity0 at debian.org
Wed Oct 18 19:07:00 CEST 2017


Ximin Luo:
> Dan Kegel:
>> On Fri, Jun 23, 2017 at 6:53 PM, Dan Kegel <dank at kegel.com> wrote:
>>> https://reproducible-builds.org/specs/build-path-prefix-map/ says
>>>   "The : character separates encoded list items from each other."
>>> This seems to have forgotten about Windows, which uses : for drive
>>> letters, and typically uses ; for such separators.
>>> Presumably on Windows, a Ruby implementation would use
>>> File::PATH_SEPARATOR for this character, and the spec needs a tweak.
>>
>> I should have written "would be sorely tempted to use File::PATH_SEPARATOR".
>> The spec is clear that colons get encoded, but it could still use a
>> clarification
>> for the slow reader showing how Windows paths are mapped.
>>
> 
> Hi, thanks for the note. I'll add this to my TODO list and ping the list again when I have some suitable wording. Or others can feel free to suggest wording in the meantime.
>

I think I'll leave this out for now. I can appreciate it might be easy to miss on a first glance but I don't think there's any feasible way an actual implementor would make this mistake, and keeping the spec shorter would be good.

 
>> Related question: the spec is silent about case insensitive filesystems.
>> How are they to be handled?  Worth mentioning in the spec even
>> if all you say is "undefined" for now...?
> 
> This is technically already covered because programs are free to choose their own interpretation of "derived from" in the section "Applying the decoded structure". In practice, you could:
> 
> 1. after decoding into a list-of-pairs, canonicalise all source paths in this list
> 2. when applying the mapping, first canonicalise the path to be mapped, then apply it on the canonicalised map from step (1).
> 
> I'm not sure whether to add this explicitly to the spec, it would make it longer. It might be good as a recommended example though.
> 

I've added roughly the above wording to the appendix, and linked into it from the "applying the decoded structure" section:

https://anonscm.debian.org/cgit/reproducible/build-path-prefix-map-spec.git/commit/?id=e5e39b51ad86ae994bd93f1a8bf38e9d51639882

X

-- 
GPG: ed25519/56034877E1F87C35
GPG: rsa4096/1318EFAC5FBBDBCE
https://github.com/infinity0/pubkeys.git


More information about the rb-general mailing list