[PATCH] D37099: Added optional validation of svn sources to Dockerfiles.

Ilya Biryukov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 25 01:59:29 PDT 2017


ilya-biryukov added a comment.

In https://reviews.llvm.org/D37099#852251, @mehdi_amini wrote:

> Would this be all obsolete with git repos?


I would think so.

> Also all the python code seems complicated to me for what is basically `find | grep -v '/\.git/' | grep -v '/\.svn/' | LC_ALL=C sort | tar -cf - -T - --no-recursion | sha1sum`, can you elaborate why this is needed?

That's roughly what I started with, but's it's more complicated if you want to compute separate checksums for projects inside single tree source checkout (i.e. `llvm`, `llvm/tool/clang`, `llvm/projects/lldb`, etc.).
The use-case is rather bizzare:

1. You continuously import and review commits from svn repo for a set a `llvm` projects (e.g., `llvm`, `clang`, `lldb`). You use single tree source checkout for that.
2. You want to build docker images for **a subset** of those projects (e.g.,  only for `llvm` and `clang`). However, you want to checkout source code from official svn repo, not your mirror.
3. You want to make sure the code you checkout matches the code you reviewed in step 1.

There is also a problem that some files inside LLVM repo use svn substitutions. The substitutions are mostly fine, but `$Date$` and `$LastChangedDate$` are locale-specific and we have to account for that.

I totally agree with you, though, the code is quite complicated. Wish it was simpler.


https://reviews.llvm.org/D37099





More information about the llvm-commits mailing list