[rb-general] Clarification on BUILD_PATH_PREFIX_MAP and drive letters

Ximin Luo infinity0 at debian.org
Sat Jun 24 12:08:00 CEST 2017

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.

> 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.


GPG: ed25519/56034877E1F87C35
GPG: rsa4096/1318EFAC5FBBDBCE

More information about the rb-general mailing list