Skip to content

Conversation

@hebasto
Copy link
Member

@hebasto hebasto commented Mar 12, 2020

This PR:

The idea is clear described by some developers:

This whole concept of explicitly listing each and every file manually (or with a fragile wildcard) is an obvious sisyphean task. I'd say all we need to do is run git archive and be done with it forever, see #16734, #6753, #11530 ...

I agree, I've never been a fan of it. I don't think we have any files in the git repository we don't want to ship in the source tarball.


The suggested changes have a downside which is pointed by luke-jr:

... but the distfile needs to include autogen-generated files.

This means that a user is not able to run ./configure && make right away. One must run ./autogen.sh at first.

Here are opinions about mandatory use of ./autogen.sh:

It's probably ok to require autogen. I think historically configure scripts were supposed to work on obscure unix systems that would just have a generic shell + make tool + c compiler, and not necessarily need gnu packages like m4 which are needed for autogen.

I also think it's fine to require autogen. What is one dependency more, if you're building from source.


Also this PR provides Windows users with ZIP archives of the sources. Additionally the commit ID is stored in these ZIP files as a file comment:


Note for reviewers: please verify is git archive output deterministic?

hebasto added 2 commits March 12, 2020 11:34
Making SOURCEDIST deterministic is needless since a git archive is used
as the source tarball.
@fanquake fanquake added this to the 0.20.0 milestone Mar 12, 2020
@hebasto hebasto force-pushed the 20200312-git-archive branch 3 times, most recently from 131ad5a to f05f8a4 Compare March 12, 2020 12:14
@laanwj
Copy link
Member

laanwj commented Mar 12, 2020

Thank you for picking this up.

It's nice that this mostly removes lines, it's a cleanup too.
Adding a .zip source archive for Windows users is nice, probably, though I'm not sure if we can accomodate this in the website easily.

@hebasto hebasto changed the title [WIP] build: Use git archive as source tarball build: Use git archive as source tarball Mar 12, 2020
@hebasto hebasto marked this pull request as ready for review March 12, 2020 14:36
mkdir -p temp
pushd temp
tar -xf ../$SOURCEDIST
find bitcoin-* | sort | tar --mtime="$REFERENCE_DATETIME" --no-recursion --mode='u+rw,go+r-w,a+X' --owner=0 --group=0 -c -T - | gzip -9n > ../$SOURCEDIST
Copy link
Member

@laanwj laanwj Mar 12, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So this is not needed for the git archive output?
That's nice!

Oh, you mention this in the OP. I cannot find anything about this in the documentation, but looking at the output of git archive:

  • Files are sorted in alphabetic order
  • Files are owned by root/root
  • Permissions seem to be consistent:
-rw-rw-r--  for normal files
drwxrwxr-x  for directories
-rwxrwxr-x  for executable scripts
  • The timestamp seems to be the same for all the files, but I don't know where it comes from. Oh it's the "CommitDate" of the last commit!
-rw-rw-r-- root/root      4705 2020-03-11 16:45 .appveyor.yml
$ git show --pretty=fuller HEAD
commit 24a727e23e4143bcc4e5dfac536bae8d8261d32a (HEAD -> master)
Merge: 3b21a7863411b4b0391313e765f23b2664d4540a faae5a9a356d821f0cbdea32030b0ce356351a1d
Author:     Wladimir J. van der Laan <[email protected]>
AuthorDate: Wed Mar 11 16:32:59 2020 +0100
Commit:     Wladimir J. van der Laan <[email protected]>
CommitDate: Wed Mar 11 16:45:47 2020 +0100

So yes, that looks deterministic to me (assuming the timezone doesn't have a part in it, but tar stores UNIX timestamps so probably not).

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • The timestamp seems to be the same for all the files, but I don't know where it comes from. Oh it's the "CommitDate" of the last commit!

Yes. From git archive docs:

git archive behaves differently when given a tree ID versus when given a commit ID or tag ID. In the first case the current time is used as the modification time of each file in the archive. In the latter case the commit time as recorded in the referenced commit object is used instead.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems this is the same for the mtime in the global header.

@laanwj
Copy link
Member

laanwj commented Mar 12, 2020

Also this PR provides Windows users with ZIP archives of the sources. Additionally the commit ID is stored in these ZIP files as a file comment:

It looks like the generated .tar archive also has a comment embedded with the commit ID. I do not know any way (besides hexdump) of getting this information.

00000200  35 32 20 63 6f 6d 6d 65  6e 74 3d 32 34 61 37 32  |52 comment=24a72|
00000210  37 65 32 33 65 34 31 34  33 62 63 63 34 65 35 64  |7e23e4143bcc4e5d|
00000220  66 61 63 35 33 36 62 61  65 38 64 38 32 36 31 64  |fac536bae8d8261d|
00000230  33 32 61 0a 00 00 00 00  00 00 00 00 00 00 00 00  |32a.............|
00000240  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|

Oh, this is also mentioned in the manpage:

Additionally the commit ID is stored in a global extended pax header if the tar format is used; it can be extracted using git get-tar-commit-id. In ZIP files it is stored as a file comment.

git get-tar-commit-id < test.tar
24a727e23e4143bcc4e5dfac536bae8d8261d32a

@hebasto
Copy link
Member Author

hebasto commented Mar 12, 2020

It looks like the generated .tar archive also has a comment embedded with the commit ID. I do not know any way (besides hexdump) of getting this information.

Yes. From git archive docs:

Additionally the commit ID is stored in a global extended pax header if the tar format is used; it can be extracted using git get-tar-commit-id.

EDIT: Sorry, slow typing...

@maflcko
Copy link
Member

maflcko commented Mar 14, 2020

ACK 86d9fae 🤞

Show signature and timestamp

Signature:

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

ACK 86d9fae2943ad0d65ced2737f205db33f0bdc324 🤞
-----BEGIN PGP SIGNATURE-----

iQGzBAEBCgAdFiEE+rVPoUahrI9sLGYTzit1aX5ppUgFAlwqrYAACgkQzit1aX5p
pUgJ3Av+JDgUre1dSaM2RmQQMxS3Qs1MeW1A2byPrGwosk53SkUWU/Pbxls2Bnl4
W2yF7J5HV8C95/864vUi9b1GRpE5Q3H/khgD1jqXUTXZW1VfQ8OtDImh9K8kNqf0
JvtucQyMoyiZXN1Enh+ck4/BRhEOD1aSGHQHW0lPpSDTZfh2oEhHA5dpzSYpOv+K
/pJxHHNNVGBaGaVuwVbyhAAievXySr9uS86w/q0e0NVnS4k2Jpac/e80hNVP6YK0
U4FgWCmoAl9Zxoc73YkBSPZpoajrN8vqbH7/DUIFR8tzBTIiAl3/yQI6gK97JH/r
v1HJ9gDgqa5euZncu536jsHwOhh6KWIC7D1XBbEVKL1k1Tr3gioI6F6Su1A/2OTR
75RQGFb99MxRONLI+Kf4iy34hG//8EE/R6yRMRNp28Lxx4nUp+i0ZhgxSwOrsiz7
Qlt14ejMnYC728yED74nsqNgVPqZbp5n5yn3M3G9Ip5/Xchc542UwuOuwLyluNgl
ZqFZrTHX
=63lK
-----END PGP SIGNATURE-----

Timestamp of file with hash 70fc07cf6b63dd0d692f649fe3b0e90da30ba9c76c335ff9c9c3897f09d7551b -

@hebasto hebasto force-pushed the 20200312-git-archive branch from f05f8a4 to 86d9fae Compare March 14, 2020 16:54
@hebasto
Copy link
Member Author

hebasto commented Mar 14, 2020

Updated f05f8a4 -> 86d9fae (pr18331.01 -> pr18331.02, compare):

  • dropped "build: Suggest source as zip archive for Windows" commit

@DrahtBot
Copy link
Contributor

Gitian builds

File commit 7f8176a
(master)
commit 6391f76132f23ee87e90a496270ee21333ffc928
(master and this pull)
bitcoin-0.19.99-aarch64-linux-gnu-debug.tar.gz 4c336065e794b9e1...
bitcoin-0.19.99-aarch64-linux-gnu.tar.gz bbf9ad146865c1e6...
bitcoin-0.19.99-arm-linux-gnueabihf-debug.tar.gz 1383fcfcbb2db8f4...
bitcoin-0.19.99-arm-linux-gnueabihf.tar.gz 6ce0cccb1785c346...
bitcoin-0.19.99-osx-unsigned.dmg 2a808ed2d1574120... b88fa3caccdb546c...
bitcoin-0.19.99-osx64.tar.gz 6bd11e0fe31a8380... 7ddbd5b0c53b4e94...
bitcoin-0.19.99-riscv64-linux-gnu-debug.tar.gz 7ce346c1502553c5...
bitcoin-0.19.99-riscv64-linux-gnu.tar.gz 1afacc60029cc676...
bitcoin-0.19.99-win64-debug.zip 52e7784561b63b13... 69e9cbe82f0afbc2...
bitcoin-0.19.99-win64-setup-unsigned.exe ea46b617c4e5e1db... a3789647f95c0bf1...
bitcoin-0.19.99-win64.zip d321828fb88693ea... 60b39d946c3c2e64...
bitcoin-0.19.99-x86_64-linux-gnu-debug.tar.gz 911222a3da31873e...
bitcoin-0.19.99-x86_64-linux-gnu.tar.gz f86f8f63b76f2988...
bitcoin-0.19.99.tar.gz b44bb765db3d7361... f4705976b2e1f607...
bitcoin-core-linux-0.20-res.yml 7de5bda558602555...
bitcoin-core-osx-0.20-res.yml 40e50bfc96a0d76c... 014344aeee881717...
bitcoin-core-win-0.20-res.yml 7d76bbad6182235c... 42369c283707f147...
linux-build.log b6798173d2724836... 1fef95497c0caaf9...
osx-build.log ef5c29eaa0e5787b... 1ff1d8f5edea1c3b...
win-build.log caf14e04ba8efa7c... 926fc96737bf6363...
bitcoin-core-osx-0.20-res.yml.diff 17014bfc1b175e31...
bitcoin-core-win-0.20-res.yml.diff a4e13111f03578b3...
linux-build.log.diff a02e18a16d31038b...
osx-build.log.diff cb78ed91e77fc215...
win-build.log.diff 0f93154e9dce4282...

@hebasto hebasto force-pushed the 20200312-git-archive branch from 86d9fae to c3c8d3c Compare March 15, 2020 10:52
@hebasto
Copy link
Member Author

hebasto commented Mar 15, 2020

Updated 86d9fae -> c3c8d3c (pr18331.02 -> pr18331.03, compare):

  • reworked docs processing

Some EXTRA_DIST content is needless since a git archive is used as the
source tarball.
@hebasto hebasto force-pushed the 20200312-git-archive branch from c3c8d3c to e4d3667 Compare March 15, 2020 16:35
@hebasto
Copy link
Member Author

hebasto commented Mar 15, 2020

Updated c3c8d3c -> e4d3667 (pr18331.03 -> pr18331.04, diff; diff 18331.02..pr18331.04):

  • fixed windows installer (was broken on the previous push)

@ryanofsky
Copy link
Contributor

Requiring autogen essentially defeats the point of using autotools

This seems like a real concern. Does this PR now require running autogen when it wasn't required before? If so, it seems like it should have release notes and documentation updates.

@maflcko
Copy link
Member

maflcko commented Mar 26, 2020

painful move for downstream maintainers and packagers, who will now have to adjust their build dependencies.

For a major version bump they'd need to adjust the build dependencies anyway (e.g. remove openssl and boost chrono, ...). I don't really see how adding autotools is going to be painful. Though, if it really is that painful, we could run it in the gitian vm and append the resulting configure script to the archive.

it should have release notes and documentation updates.

We don't really have any documentation about our release tarball, so there is nothing to update I think. I am happy to leave a note in the release notes.

@ryanofsky
Copy link
Contributor

We don't really have any documentation about our release tarball, so there is nothing to update I think. I am happy to leave a note in the release notes.

I probably should familiarize myself with documentation more. I wrote my comment above assuming this PR required a new install step that was optional before, so installation instructions would be updated.

I don't think we should hesitate to write release notes for user visible changes. PR descriptions are often unhelpful because they focus on implementation details, while release notes force you to summarzie what the actual effect of a change is (it's still unclear here what files this PR removes from the tarball).

@theuni
Copy link
Member

theuni commented Mar 26, 2020

For a major version bump they'd need to adjust the build dependencies anyway (e.g. remove openssl and boost chrono, ...). I don't really see how adding autotools is going to be painful.

I'm not complaining about forcing downstreams to update. I'm complaining about the contents of that update. They're going to have to add a pile of new build-time dependencies (autotools dev packages), which may or may not pose further complications.

@hebasto
Copy link
Member Author

hebasto commented Mar 26, 2020

Release notes added in #18439.

@maflcko
Copy link
Member

maflcko commented Mar 26, 2020

@ryanofsky Our only instruction of building are here: https://github.com/bitcoin/bitcoin/blob/master/doc/build-unix.md#to-build . The first step for them is ./autogen.sh (so nothing changed for them). There is also a source code download link on https://bitcoincore.org/en/download/ . This is what is going to change after this pull request. None of our own packaging scripts should change as an effect of that. They either use the static binaries or the git archive already https://github.com/bitcoin-core/packaging/blob/2c1d6a4cc67411beb3e035d126b56bef3cf7e1f1/debian/rules#L30

I can't comment on how hard it will be for other third party package maintainers to run autogen, but at least the debian one has a full copy of the git repo: https://sources.debian.org/src/bitcoin/0.18.1%7Edfsg-1/ . So I am not sure if there is anyone who depends on this targz and depends on this targz having the configure script included. My opinion is to wait for complaints before changing things again...

@ryanofsky
Copy link
Contributor

I'm not complaining about forcing downstreams to update. I'm complaining about the contents of that update. They're going to have to add a pile of new build-time dependencies (autotools dev packages), which may or may not pose further complications.

Are there particular operating systems / distros you're concerned about here? I haven't had the most autotools experience in the world, but I haven't personally run into cases where earlier autoreconf steps fail, it's always the later config / make stages that seem more fragile.

Or maybe there are systems where autotools and m4 are flat out broken or unavailable?

@theuni
Copy link
Member

theuni commented Mar 26, 2020

I'm not aware of any. Practically, this will likely simply mean that maintainers add deps to a list and move on.

But at a higher level, we can offer a pre-processed source tarball which eases the burden on the builder (as well as adding improving determinism by pegging build tools at tag time) or we could not.

After this change, our source tarball is simply a shortcut to a git clone and checkout. Maybe that's ok, but it just doesn't seem worth the hassle of finding out to me.

But sure, now that it's in, we can just wait and see if it causes any real-world issues at release time.

@maflcko
Copy link
Member

maflcko commented Mar 26, 2020

We couldn't keep up listing all needed files (or even establish guidelines about what files are needed) reliably, so this was the primary reason to change the source tarball. If the missing configure script is a burden or causes issues otherwise, what about appending it to the git archive after running autogen in the gitian vm?

This seems to solve both concerns?

@theuni
Copy link
Member

theuni commented Mar 26, 2020

We couldn't keep up listing all needed files (or even establish guidelines about what files are needed) reliably, so this was the primary reason to change the source tarball. If the missing configure script is a burden or causes issues otherwise, what about appending it to the git archive after running autogen in the gitian vm?

This seems to solve both concerns?

This is exactly what gitian did before this change. It's more than just 'configure' though, 'make dist' appends all bootstrapped files to the source tarball.

It sounds like you would just want an additional step of adding missing git files to that tarball.

Edit: I think we're saying the same thing now, we just have different ideas of how to accomplish it.

sidhujag pushed a commit to syscoin/syscoin that referenced this pull request Mar 28, 2020
e4d3667 build: Drop needless EXTRA_DIST content (Hennadii Stepanov)
6c4da59 build: Drop SOURCEDIST reordering (Hennadii Stepanov)
5e6b8b3 build: Use git archive as source tarball (Hennadii Stepanov)

Pull request description:

  This PR:
  - is an alternative to bitcoin#17104
  - closes bitcoin#16734
  - closes bitcoin#6753

  The idea is clear described by some developers:
  - [MarcoFalke](bitcoin#17097 (comment)):
  > This whole concept of explicitly listing each and every file manually (or with a fragile wildcard) is an obvious sisyphean task. I'd say all we need to do is run git archive and be done with it forever, see bitcoin#16734, bitcoin#6753, bitcoin#11530 ...

  - [laanwj](bitcoin#17097 (comment)):
  > I agree, I've never been a fan of it. I don't think we have any files in the git repository we don't want to ship in the source tarball.

  ---

  The suggested changes have a downside which is pointed by [**luke-jr**](bitcoin#17104 (comment)):
  > ... but the distfile needs to include autogen-generated files.

  This means that a user is not able to run `./configure && make` right away. One must run `./autogen.sh` at first.

  Here are opinions about mandatory use of `./autogen.sh`:
  - [ryanofsky](bitcoin#16734 (comment)):
  > It's probably ok to require autogen. I think historically configure scripts were supposed to work on obscure unix systems that would just have a generic shell + make tool + c compiler, and not necessarily need gnu packages like m4 which are needed for autogen.

  - [laanwj](bitcoin#16734 (comment)):
  > I also think it's fine to require autogen. What is one dependency more, if you're building from source.

  ---

  ~Also this PR provides Windows users with ZIP archives of the sources. Additionally the commit ID is stored in these ZIP files as a file comment:~

  ---

  Note for reviewers: please verify is `git archive` output deterministic?

ACKs for top commit:
  MarcoFalke:
    re-ACK e4d3667, only change is adding two dots in a the path 🛳
  laanwj:
    ACK e4d3667

Tree-SHA512: d1153d3ca4a580696019b92be3555ab004d197d9a2146aacff9d3150eb7093b7d40eebd6eea12d861d93ff62d62b68706e04e64dbe5ea796ff6757486e462193
fanquake added a commit that referenced this pull request Apr 28, 2020
2aa48ed refactor: Drop unused ${WRAP_DIR}/${HOST} directory (Hennadii Stepanov)
1362be0 build: Drop make dist in gitian builds (Hennadii Stepanov)

Pull request description:

  After the merge of #18331, the packaged source tarball is created by `git archive`, but the binaries are built from another one which is made by `make dist`.

  With this PR the only source tarball, created by `git archive`, is used both for binaries building and for packaging to users.

  Close #16588.
  Close #18547.

  As a good side-effect, #18349 becomes redundant.

  **Change in behavior**

  The following variables https://github.com/bitcoin/bitcoin/blob/1b151e3ffce7c1a2ee46bf280cc1d96775d1f91e/configure.ac#L2-L6

  are no longer used for naming of directories and tarballs.

  Instead of them the gitian descriptors use a git tag (if available) or a commit hash.

  ---

  Also a small refactor commit picked from #18404.

ACKs for top commit:
  dongcarl:
    ACK 2aa48ed
  MarcoFalke:
    ACK 2aa48ed
  fanquake:
    ACK 2aa48ed - I've had a quick look over this, and don't want to block merging if this actually gets as closer to finally having this all sorted out. Obviously we've still got #18741, and after speaking to Carl this morning, there will likely be even more changes after that (not Guix specific).

Tree-SHA512: d3b16f87e48d1790a3264940c28acd5d881bfd10f3ce94fb0c8a6af76d8039289d01e0cd4972adac49ae24362857251f6c1e5e09e3e9fbf636c10708b4015a7c
sidhujag pushed a commit to syscoin/syscoin that referenced this pull request Apr 28, 2020
2aa48ed refactor: Drop unused ${WRAP_DIR}/${HOST} directory (Hennadii Stepanov)
1362be0 build: Drop make dist in gitian builds (Hennadii Stepanov)

Pull request description:

  After the merge of bitcoin#18331, the packaged source tarball is created by `git archive`, but the binaries are built from another one which is made by `make dist`.

  With this PR the only source tarball, created by `git archive`, is used both for binaries building and for packaging to users.

  Close bitcoin#16588.
  Close bitcoin#18547.

  As a good side-effect, bitcoin#18349 becomes redundant.

  **Change in behavior**

  The following variables https://github.com/bitcoin/bitcoin/blob/1b151e3ffce7c1a2ee46bf280cc1d96775d1f91e/configure.ac#L2-L6

  are no longer used for naming of directories and tarballs.

  Instead of them the gitian descriptors use a git tag (if available) or a commit hash.

  ---

  Also a small refactor commit picked from bitcoin#18404.

ACKs for top commit:
  dongcarl:
    ACK 2aa48ed
  MarcoFalke:
    ACK 2aa48ed
  fanquake:
    ACK 2aa48ed - I've had a quick look over this, and don't want to block merging if this actually gets as closer to finally having this all sorted out. Obviously we've still got bitcoin#18741, and after speaking to Carl this morning, there will likely be even more changes after that (not Guix specific).

Tree-SHA512: d3b16f87e48d1790a3264940c28acd5d881bfd10f3ce94fb0c8a6af76d8039289d01e0cd4972adac49ae24362857251f6c1e5e09e3e9fbf636c10708b4015a7c
fanquake added a commit to bitcoin-core/gui that referenced this pull request Mar 2, 2021
f1f63ac doc: Remove outdated comment (Hennadii Stepanov)

Pull request description:

  The removed commit has been wrong [since v0.20.0](bitcoin/bitcoin#18331).

ACKs for top commit:
  fanquake:
    ACK - f1f63ac

Tree-SHA512: ef6191fef389fa0ee5e6cf224e4990a1804aeefd1c3e9d9a4870cf46e1833fbb8701c379b6ce4e13caa02ae2f4f86778fa2c1e994c89392c08fcf01701482d7a
UdjinM6 pushed a commit to UdjinM6/dash that referenced this pull request Oct 23, 2021
e4d3667 build: Drop needless EXTRA_DIST content (Hennadii Stepanov)
6c4da59 build: Drop SOURCEDIST reordering (Hennadii Stepanov)
5e6b8b3 build: Use git archive as source tarball (Hennadii Stepanov)

Pull request description:

  This PR:
  - is an alternative to bitcoin#17104
  - closes bitcoin#16734
  - closes dashpay#6753

  The idea is clear described by some developers:
  - [MarcoFalke](bitcoin#17097 (comment)):
  > This whole concept of explicitly listing each and every file manually (or with a fragile wildcard) is an obvious sisyphean task. I'd say all we need to do is run git archive and be done with it forever, see bitcoin#16734, dashpay#6753, bitcoin#11530 ...

  - [laanwj](bitcoin#17097 (comment)):
  > I agree, I've never been a fan of it. I don't think we have any files in the git repository we don't want to ship in the source tarball.

  ---

  The suggested changes have a downside which is pointed by [**luke-jr**](bitcoin#17104 (comment)):
  > ... but the distfile needs to include autogen-generated files.

  This means that a user is not able to run `./configure && make` right away. One must run `./autogen.sh` at first.

  Here are opinions about mandatory use of `./autogen.sh`:
  - [ryanofsky](bitcoin#16734 (comment)):
  > It's probably ok to require autogen. I think historically configure scripts were supposed to work on obscure unix systems that would just have a generic shell + make tool + c compiler, and not necessarily need gnu packages like m4 which are needed for autogen.

  - [laanwj](bitcoin#16734 (comment)):
  > I also think it's fine to require autogen. What is one dependency more, if you're building from source.

  ---

  ~Also this PR provides Windows users with ZIP archives of the sources. Additionally the commit ID is stored in these ZIP files as a file comment:~

  ---

  Note for reviewers: please verify is `git archive` output deterministic?

ACKs for top commit:
  MarcoFalke:
    re-ACK e4d3667, only change is adding two dots in a the path 🛳
  laanwj:
    ACK e4d3667

Tree-SHA512: d1153d3ca4a580696019b92be3555ab004d197d9a2146aacff9d3150eb7093b7d40eebd6eea12d861d93ff62d62b68706e04e64dbe5ea796ff6757486e462193
UdjinM6 pushed a commit to UdjinM6/dash that referenced this pull request Oct 23, 2021
2aa48ed refactor: Drop unused ${WRAP_DIR}/${HOST} directory (Hennadii Stepanov)
1362be0 build: Drop make dist in gitian builds (Hennadii Stepanov)

Pull request description:

  After the merge of bitcoin#18331, the packaged source tarball is created by `git archive`, but the binaries are built from another one which is made by `make dist`.

  With this PR the only source tarball, created by `git archive`, is used both for binaries building and for packaging to users.

  Close bitcoin#16588.
  Close bitcoin#18547.

  As a good side-effect, bitcoin#18349 becomes redundant.

  **Change in behavior**

  The following variables https://github.com/bitcoin/bitcoin/blob/1b151e3ffce7c1a2ee46bf280cc1d96775d1f91e/configure.ac#L2-L6

  are no longer used for naming of directories and tarballs.

  Instead of them the gitian descriptors use a git tag (if available) or a commit hash.

  ---

  Also a small refactor commit picked from bitcoin#18404.

ACKs for top commit:
  dongcarl:
    ACK 2aa48ed
  MarcoFalke:
    ACK 2aa48ed
  fanquake:
    ACK 2aa48ed - I've had a quick look over this, and don't want to block merging if this actually gets as closer to finally having this all sorted out. Obviously we've still got bitcoin#18741, and after speaking to Carl this morning, there will likely be even more changes after that (not Guix specific).

Tree-SHA512: d3b16f87e48d1790a3264940c28acd5d881bfd10f3ce94fb0c8a6af76d8039289d01e0cd4972adac49ae24362857251f6c1e5e09e3e9fbf636c10708b4015a7c
UdjinM6 pushed a commit to UdjinM6/dash that referenced this pull request Dec 4, 2021
e4d3667 build: Drop needless EXTRA_DIST content (Hennadii Stepanov)
6c4da59 build: Drop SOURCEDIST reordering (Hennadii Stepanov)
5e6b8b3 build: Use git archive as source tarball (Hennadii Stepanov)

Pull request description:

  This PR:
  - is an alternative to bitcoin#17104
  - closes bitcoin#16734
  - closes dashpay#6753

  The idea is clear described by some developers:
  - [MarcoFalke](bitcoin#17097 (comment)):
  > This whole concept of explicitly listing each and every file manually (or with a fragile wildcard) is an obvious sisyphean task. I'd say all we need to do is run git archive and be done with it forever, see bitcoin#16734, dashpay#6753, bitcoin#11530 ...

  - [laanwj](bitcoin#17097 (comment)):
  > I agree, I've never been a fan of it. I don't think we have any files in the git repository we don't want to ship in the source tarball.

  ---

  The suggested changes have a downside which is pointed by [**luke-jr**](bitcoin#17104 (comment)):
  > ... but the distfile needs to include autogen-generated files.

  This means that a user is not able to run `./configure && make` right away. One must run `./autogen.sh` at first.

  Here are opinions about mandatory use of `./autogen.sh`:
  - [ryanofsky](bitcoin#16734 (comment)):
  > It's probably ok to require autogen. I think historically configure scripts were supposed to work on obscure unix systems that would just have a generic shell + make tool + c compiler, and not necessarily need gnu packages like m4 which are needed for autogen.

  - [laanwj](bitcoin#16734 (comment)):
  > I also think it's fine to require autogen. What is one dependency more, if you're building from source.

  ---

  ~Also this PR provides Windows users with ZIP archives of the sources. Additionally the commit ID is stored in these ZIP files as a file comment:~

  ---

  Note for reviewers: please verify is `git archive` output deterministic?

ACKs for top commit:
  MarcoFalke:
    re-ACK e4d3667, only change is adding two dots in a the path 🛳
  laanwj:
    ACK e4d3667

Tree-SHA512: d1153d3ca4a580696019b92be3555ab004d197d9a2146aacff9d3150eb7093b7d40eebd6eea12d861d93ff62d62b68706e04e64dbe5ea796ff6757486e462193
UdjinM6 pushed a commit to UdjinM6/dash that referenced this pull request Dec 4, 2021
2aa48ed refactor: Drop unused ${WRAP_DIR}/${HOST} directory (Hennadii Stepanov)
1362be0 build: Drop make dist in gitian builds (Hennadii Stepanov)

Pull request description:

  After the merge of bitcoin#18331, the packaged source tarball is created by `git archive`, but the binaries are built from another one which is made by `make dist`.

  With this PR the only source tarball, created by `git archive`, is used both for binaries building and for packaging to users.

  Close bitcoin#16588.
  Close bitcoin#18547.

  As a good side-effect, bitcoin#18349 becomes redundant.

  **Change in behavior**

  The following variables https://github.com/bitcoin/bitcoin/blob/1b151e3ffce7c1a2ee46bf280cc1d96775d1f91e/configure.ac#L2-L6

  are no longer used for naming of directories and tarballs.

  Instead of them the gitian descriptors use a git tag (if available) or a commit hash.

  ---

  Also a small refactor commit picked from bitcoin#18404.

ACKs for top commit:
  dongcarl:
    ACK 2aa48ed
  MarcoFalke:
    ACK 2aa48ed
  fanquake:
    ACK 2aa48ed - I've had a quick look over this, and don't want to block merging if this actually gets as closer to finally having this all sorted out. Obviously we've still got bitcoin#18741, and after speaking to Carl this morning, there will likely be even more changes after that (not Guix specific).

Tree-SHA512: d3b16f87e48d1790a3264940c28acd5d881bfd10f3ce94fb0c8a6af76d8039289d01e0cd4972adac49ae24362857251f6c1e5e09e3e9fbf636c10708b4015a7c
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Feb 15, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Generate release tarball with git archive Release tarball missing many files from git source

7 participants