[rb-general] rb-prefix-map spec: don't be as democratic to consumers

Ximin Luo infinity0 at debian.org
Tue Mar 14 18:58:00 CET 2017

Ximin Luo:
> Daniel Shahaf:
>> [..]
>> Or alternatively, Ximin if you could explain what part of my message
>> wasn't clear, I'd be happy to clarify it.
>> [..]
> Basically, I don't see how the current spec (with the semi-open mapping algorithm) breaks any of the use-cases you described:
>> I was thinking of a different use-case.  One use-case, the "two libxz's"
>> example, is that of an upstream project that wants to allow multiple
>> downstreams to build it reproducibly, regardless of which compiler those
>> downstreams use.  Each individual downstream would use either gcc or
>> clang, but the upstream project needs to support both.
> Can you describe this in more detail?

To describe my thoughts in more detail:

We have to support algorithm (1) because I don't think I have enough clout to convince GCC to change their algorithm to (2).

(1) is the only one that will cause "problems". Suppose we are compiling "gcc" and a project called "g" at the same time for some reason, and we have this map:


(1) would map /path/to/gcc/file.c to g-1cc/file.c.

(2) would work "intuitively"

So to avoid the corner cases of (1), producers may sort the mapping beforehand. There are no such caveats if consumers do (2). So, I don't like (1) and I like (2).

OTOH you are arguing that "we should stick with one of them", which due to my first point about GCC, means in practise "we should stick with (1)". This is based on some argument that an upstream program wants different downstream projects to each build reproducibly. But I can't follow this.

Can you construct a concrete map (and surrounding situation) where consumers doing (1) can build reproducibly but consumers doing (2) cannot build reproducibly?

In other words, find values for:

- some fixed target directories tlist = [t0 .. tn]
- source directoies alist = [A0 .. An]
- path Ap a child of Ai for some i
- source directoies blist = [B0 .. Bn]
- path Bp a child of Bi for some i

such that:

algorithm (1) applying (zip alist tlist) to path Ap
algorithm (1) applying (zip blist tlist) to path Bp


algorithm (2) applying (zip alist tlist) to path Ap
does not equal
algorithm (2) applying (zip blist tlist) to path Bp


(as in the above parens but with "equals" and "does not equal" swapped around)

My intuition is that no such values exist. I don't particularly want to spend time doing a proof of this but I can if you insist.


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

More information about the rb-general mailing list