[Reproducible-builds] Minimising work needed for this build-path issue

Ximin Luo infinity0 at debian.org
Mon Oct 24 23:58:00 UTC 2016


Daniel Kahn Gillmor:
> On Mon 2016-10-24 16:18:00 -0400, Ximin Luo wrote:
>> Almost, with two minor corrections:
>>
>> I picked SOURCE_ROOT_DIR; SOURCE_ROOT has 6395 pages of results in
>> sources.debian.net and I didn't want to check that none of these are
>> environment variables.
> 
> fair enough.
> 
>> SOURCE_ROOT_PREFIX would only be prepended if SOURCE_ROOT_DIR is set
>> and was stripped. It's not prepended to all paths; and setting it by
>> itself without SOURCE_ROOT_DIR wouldn't do anything (since nothing
>> gets stripped in that case).
> 
> What if SOURCE_ROOT_DIR is not an actual prefix of the current file.
> like if SOURCE_ROOT_DIR=/no/such/path and the package is built in
> /home/user/src/foo ?
> 

Then the paths won't get changed, and SOURCE_ROOT_PREFIX won't get applied. What's the point of applying it? It wouldn't be reproducible anyway.

>> I would also say "absolute path" instead of "source-related path"
>> since the latter could be misinterpreted to exclude intermediate build
>> files.
> 
> I used the term "source-related" to try to refer to the build tree.  I
> wouldn't want to give the impression that *any* absolute path that makes
> it into the output artifacts will be stripped or prefixed.  For example,
> /usr/bin/gpg embeds absolute paths like /usr/share/gnupg and /dev/tty,
> but these are not "source-related".
> 

Well, none of those would be stripped anyways, since they're not underneath SOURCE_ROOT_DIR. I didn't think it was worth explicitly considering the case where someone builds stuff from inside /usr/share etc. But if you think it's worth clarifying, we could expand this to "absolute build- or source-related path".

> We need to find a clear, concise way to explain the proposal that won't
> confuse people.
> 

We know this - so what do you concretely want to change? I wasn't asking for wording advice at this stage; I was trying to come to agreement on the exact form the proposal should take.

The behaviour is already settled:

if path.startswith(R):
  newprefix = P or "."
  path = newprefix + path[len(R):]

I can spend some time "explaining this concisely" but that's not what I was asking the list to talk about. What I'm asking is suggestions on how we should get R and P into the actual program. This will help me finish the GCC patch, then afterwards we can decide on precise wording for a spec for other projects to follow.

X

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



More information about the Reproducible-builds mailing list