Followup for #18331 “build: Use git archive as source tarball” #18547

issue dongcarl openend this issue on April 6, 2020
  1. dongcarl commented at 8:31 pm on April 6, 2020: member

    After the merge of #18331, there are now two ways to create source tarballs.

    1. make dist
    2. git archive

    It would seem that both methods are being used in our Gitian descriptor.

    First, we run make dist to create a bootstrapped tarball: https://github.com/bitcoin/bitcoin/blob/c5966a87d1fdd7a98f2baee5b2deddd541fdfb5a/contrib/gitian-descriptors/gitian-linux.yml#L143-L148

    Which is used by each host to build the binary tarballs in the for loop: https://github.com/bitcoin/bitcoin/blob/c5966a87d1fdd7a98f2baee5b2deddd541fdfb5a/contrib/gitian-descriptors/gitian-linux.yml#L154-L191

    Then, we use git archive to create the final source tarball: https://github.com/bitcoin/bitcoin/blob/c5966a87d1fdd7a98f2baee5b2deddd541fdfb5a/contrib/gitian-descriptors/gitian-linux.yml#L194

    It seems to me that perhaps it’d be good to reinstate the behaviour whereby our binary tarballs are built from the source tarball, just for robustness’s sake.

    A simple fix might be:

    1. switch the earlier make dist to git archive
    2. ./autogen.sh for each host
    3. Remove the last call to git archive

    Perhaps this can even allow us to specify the no-dist automake option and clean up dist related targets in Makefile.am.

  2. dongcarl added the label Bug on Apr 6, 2020
  3. dongcarl removed the label Bug on Apr 6, 2020
  4. dongcarl added the label Build system on Apr 6, 2020
  5. MarcoFalke commented at 8:37 pm on April 6, 2020: member

    I think make dist is used for out-of-tree builds, whereas git archive is used to export the repo for external use.

    It might be possible to move the git archive before the make dist, but I wonder if that is going to preserve the git tag of a version release of Bitcoin Core.

  6. dongcarl commented at 9:16 pm on April 6, 2020: member

    So if I’m reading #18349 (comment) correctly, we can’t ditch make dist?

    I feel somewhat defeated on this topic :disappointed:. It seems to me that the result of all this fiddling is:

    1. We have now introduced a second way of producing source tarballs without being able to replace the first. We have to maintain both ways. 2. We’ve changed the relationship between our source tarballs and binary tarballs in that the binary ones are no longer being built from the source ones.


    I believe hebasto has a fix, will wait on him.

  7. luke-jr commented at 4:31 am on April 23, 2020: member

    IMO something like:

    1. git archive
    2. autogen
    3. configure
    4. make distclean

    …should ensure the tarball gets all the files it ought to have

  8. fanquake closed this on Apr 28, 2020

  9. sidhujag referenced this in commit 3d6b60d09e on Apr 28, 2020
  10. UdjinM6 referenced this in commit 306cb1b47a on Oct 23, 2021
  11. UdjinM6 referenced this in commit ad65a4bed0 on Oct 23, 2021
  12. UdjinM6 referenced this in commit a0d3f37d3a on Dec 4, 2021
  13. DrahtBot locked this on Feb 15, 2022

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-10-04 19:12 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me