ClangBuiltLinux / continuous-integration

Continuous integration of latest Linux kernel with daily build of Clang & LLVM tools
https://travis-ci.com/ClangBuiltLinux/continuous-integration
Apache License 2.0
44 stars 18 forks source link

buildroot: Make it easier to rebuild all of the images after an upgrade/change #190

Closed nathanchance closed 5 years ago

nathanchance commented 5 years ago

Commit messages should be fairly self explanatory, let me know if there are any questions/concerns!

msfjarvis commented 5 years ago

I was trying to run this for the buildroot upgrade PR earlier and never quite figured out how, this is a welcome change :hugs:. Trying it out right now, will submit review once done.

msfjarvis commented 5 years ago

@nathanchance I can't figure out why my build fails, anything obvious I may have missed? https://del.dog/raw/qiqopafori

nickdesaulniers commented 5 years ago

make[1]: Leaving directory '/home/msfjarvis/git-repos/continuous-integration/buildroot/src/output/build/host-gcc-initial-8.3.0/build' output/images/rootfs.cpio could not be found! Did the build error?

msfjarvis commented 5 years ago

make[1]: Leaving directory '/home/msfjarvis/git-repos/continuous-integration/buildroot/src/output/build/host-gcc-initial-8.3.0/build' output/images/rootfs.cpio could not be found! Did the build error?

Yeah Nathan helped me find the problem over Telegram, for some reason my C++ compiler was there but configure refused to use it.

nathanchance commented 5 years ago

Thanks! @nickdesaulniers did you have any comments?

nickdesaulniers commented 5 years ago

This will save bandwidth across image upgrades/rebuilds.

How's that? Seems like a compressed tarball would be smaller than all of git history?

nathanchance commented 5 years ago

This will save bandwidth across image upgrades/rebuilds.

How's that? Seems like a compressed tarball would be smaller than all of git history?

I guess I was comparing it to redownloading the tarball over and over in the current scheme. I suppose what I could do is just not remove the downloaded tarball source every rebuild and use the print-version make target to check if we need to update the source. At the same time, shallow clone + new tags is a little bit easier yet should achieve the same thing.

nickdesaulniers commented 5 years ago

I guess I was comparing it to redownloading the tarball over and over in the current scheme.

Ah, I see. In that case, I think it's simpler to wrap the fetch in a check if the file does not already exist, then fetch it. Might be nice to check the checksum of it either way if buildroot provided them.

if file_does_not_exist or checksum does not match:
  rm -f file
  curl file
nathanchance commented 5 years ago

Alright, I think I have addressed all comments :)

nathanchance commented 5 years ago

Thanks for the review all!