[rb-general] BUILD_PATH_PREFIX_MAP code examples and test cases

Ximin Luo infinity0 at debian.org
Tue Mar 14 20:34:00 CET 2017

Ximin Luo:
> Ian Jackson:
>> [..]
>> I am surprised at your choice of ordering of the key/value pairs.  I
>> would expect that most producers will have in their head a list like
>>    FOO_BUILDDIR=/path/to/foo
>>    BAR_BUILDDIR=/path/to/bar
>>    TMP_AREA=/path/to/our/tmp
>> Your ordering means that such a producer must make a map specifying
>>    /path/to/foo=FOO_BUILDDIR
>>    /path/to/bar=BAR_BUILDDIR
>>    /path/to/our/tmp=TMP_AREA
>> This seems unnaturla.
>> Or to put it another way: normally, the actual paths will vary, and
>> the replacement tokens will be fixed.  = normally has the more-fixed
>> thing on the left.
>> So I think you should swap the order of the pairs.
> Hi, sorry I missed this the first time around.
> This is a pretty good idea, which is slightly annoying for me because it's going to take a fair bit of effort to change all the writing and the code and the test cases. But I think I'll do it.
> It does make reproducible builds "look" more obviously like the primary purpose of this, which is of course a good thing. And perhaps it helps shift people's perspective away from "we are fiddling with debug paths" to "we are describing how to achieve reproducible builds".
> (The ordering is reversed currently because GCC has the debug-prefix-map option like that, and joining them up was "the obvious way" of doing it.)

I've made these changes. If anyone disagrees, please speak up soon because I'm almost ready to finalise and publish it.

I've filled in the introduction and motivation sections, and also tweaked the wording of the other parts a bit.

You can see it here: https://anonscm.debian.org/cgit/reproducible/build-path-prefix-map-spec.git/log/

Or with slightly nicer formatting here: https://github.com/infinity0/rb-prefix-map/blob/master/spec.in.rst

The final end result will look like docbook HTML output, similar to the SOURCE_DATE_EPOCH spec. You can see it by running `make`.


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

More information about the rb-general mailing list