Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

depends: Various config.site.in improvements and linting #20359

Merged
merged 3 commits into from
Nov 19, 2020

Conversation

dongcarl
Copy link
Contributor

@dongcarl dongcarl commented Nov 9, 2020

This changeset:

  1. Allows the CONFIG_SITE env var to be a relative path rather than requiring an absolute one
  2. Enables linting of the config.site.in file with shellcheck in our linting scripts
  3. Sets the PYTHONPATH var sensibly in config.site.in

Please see commit messages for more details

Previously, if ./configure was invoked with:

```
$ env CONFIG_SITE=depends/x86_64-pc-linux-gnu/share/config.site ./configure
```

Where $CONFIG_SITE was a relative path, ./configure would fail with the
following misleading output:

```
checking for boostlib >= 1.58.0 (105800)... yes
checking whether the Boost::System library is available... yes
configure: error: Could not find a version of the Boost::System library!
```

Fully resolving depends_prefix in config.site.in fixes this. To make
sure that there are no other side effects I ran a diff on the
config.status generated by:

1. The scripts prior to this change with CONFIG_SITE set to a full path:
       env CONFIG_SITE=$PWD/depends/x86_64-pc-linux-gnu/share/config.site ./configure
2. The scripts after this change with CONFIG_SITE set to a relative path:
       env CONFIG_SITE=depends/x86_64-pc-linux-gnu/share/config.site ./configure

And it looks good!

Diff: https://paste.sr.ht/~dongcarl/95b469fbc555c128046e85723d87a9082a754f6b
Files like config.site.in are not referenced by any other script in our
tree, so we need to mark it manually with a "shellcheck shell="
directive and make sure that shellcheck is run on them.
Previously, when running ./configure:

1. With CONFIG_SITE pointed to our depends config.site.in, and
2. PYTHONPATH was not set either in the environment or by the user

The configure would output something like:

PYTHONPATH='depends/x86_64-pc-linux-gnu/share/../native/lib/python3/dist-packages:'

When we really mean:

PYTHONPATH='depends/x86_64-pc-linux-gnu/share/../native/lib/python3/dist-packages'

...without the colon

This change makes sure that:

1. There's no trailing colon, and
2. We use the $PATH_SEPARATOR variable instead of a colon
@practicalswift
Copy link
Contributor

Concept ACK

Nice to see those files being modernized and tidied up.

Even nicer having a guarantee they will stay that way thanks to linting!

@DrahtBot
Copy link
Contributor

Guix builds

File commit fa8dd34
(master)
commit ce1159e
(master and this pull)
*-aarch64-linux-gnu-debug.tar.gz 2920f7c69e16e9ae... 4e6c8007ce69bd6e...
*-aarch64-linux-gnu.tar.gz 8c8704570b205375... a3083f46121cb363...
*-arm-linux-gnueabihf-debug.tar.gz 521e898a64241d9b... d2aa73e18d63e89e...
*-arm-linux-gnueabihf.tar.gz f5f7a27aa5725d6b... 71efceb131312089...
*-riscv64-linux-gnu-debug.tar.gz 38f7aee1c530fefc... a6303a68aab45ac8...
*-riscv64-linux-gnu.tar.gz b050eaa1071c49f2... 67ef22fb4f10aa4c...
*-win-unsigned.tar.gz 679ee639127c799a... bd512271fc446b2a...
*-win64-debug.zip 47655d356ac6f38b... ae1f614158c1ad4c...
*-win64-setup-unsigned.exe 94edc6469f18b678... ebaa58b62bd2f76b...
*-win64.zip 5530cd812d72aeb7... fee505ace5295f44...
*-x86_64-linux-gnu-debug.tar.gz f562f5e9c94ed019... 14f1442a5a4f8238...
*-x86_64-linux-gnu.tar.gz f818e1ec923d60dd... 078b2782e024d9df...
*.tar.gz 03fa1e65c66cd166... e8402205a2a9ce7b...
guix_build.log df9b6e0870743e5d... a88ff8e7a1ec1711...
guix_build.log.diff dd9939f262dcaeb4...

@DrahtBot
Copy link
Contributor

Gitian builds

File commit 9bd1316
(master)
commit 8df9062
(master and this pull)
*-aarch64-linux-gnu-debug.tar.gz 3db97c8d57eafd40... 2780a653ee279a69...
*-aarch64-linux-gnu.tar.gz 7177e87fa21510c4... 3732e91e93aa4713...
*-arm-linux-gnueabihf-debug.tar.gz de949360e89ca7e2... d92cd225173d226c...
*-arm-linux-gnueabihf.tar.gz db92b060ef5f368d... a7e663ae7737eec0...
*-osx-unsigned.dmg b9873d776a740dfa... 068a78fb2c32c52b...
*-osx64.tar.gz 76843fd4454474d0... 0c566b881161fb77...
*-riscv64-linux-gnu-debug.tar.gz 7800e259dfae5375... 0cf3ad0c6ca0c6ee...
*-riscv64-linux-gnu.tar.gz fa1e5a6e6038d9b9... 60938676e6223fd5...
*-win64-debug.zip 134801c89b67e956... 2265656c2151c8ef...
*-win64-setup-unsigned.exe b4ddfe0ad9081707... 4cdc725104a2e9ec...
*-win64.zip 163278774d745486... 4bd217231aa41d4d...
*-x86_64-linux-gnu-debug.tar.gz 888b6f88584393a1... 5f605aa229d23675...
*-x86_64-linux-gnu.tar.gz 8779618b53513b4e... 32696dbf318524f6...
*.tar.gz 0069354516661e24... 7fcf8f6a1434d689...
bitcoin-core-linux-0.21-res.yml 003deb12731f3ac3... 214f95c76785fd51...
bitcoin-core-osx-0.21-res.yml d3c14565c88c1b9f... 9dc0673b22ef5ef6...
bitcoin-core-win-0.21-res.yml 3e726a36d3e22fe4... 12aeebe54632c154...
linux-build.log 3c1b0e7b94595c46... 2fd74dc5c08a1429...
osx-build.log e9caa22e1dc57761... 9520901d88e67934...
win-build.log 3ff1cd4fa1e23bb3... 992490849cb30e2e...
bitcoin-core-linux-0.21-res.yml.diff 6a5f6d924e0c9408...
bitcoin-core-osx-0.21-res.yml.diff 115f2c334e1c9649...
bitcoin-core-win-0.21-res.yml.diff 873ed6337b29d608...
linux-build.log.diff 073f5613103ee309...
osx-build.log.diff 7c618f4331f53c7e...
win-build.log.diff 03c02ab55b5cfabf...

@DrahtBot
Copy link
Contributor

The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

Conflicts

Reviewers, this pull request conflicts with the following ones:

If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

@laanwj
Copy link
Member

laanwj commented Nov 19, 2020

ACK 46756a6

These are obvious improvements to the shell script.

@laanwj laanwj merged commit 888c22e into bitcoin:master Nov 19, 2020
sidhujag pushed a commit to syscoin/syscoin that referenced this pull request Nov 19, 2020
kwvg added a commit to kwvg/dash that referenced this pull request Jul 15, 2021
kwvg added a commit to kwvg/dash that referenced this pull request Jul 15, 2021
kwvg added a commit to kwvg/dash that referenced this pull request Jul 20, 2021
kwvg added a commit to kwvg/dash that referenced this pull request Jul 20, 2021
kwvg added a commit to kwvg/dash that referenced this pull request Jul 20, 2021
kwvg added a commit to kwvg/dash that referenced this pull request Jul 20, 2021
kwvg added a commit to kwvg/dash that referenced this pull request Aug 1, 2021
kwvg added a commit to kwvg/dash that referenced this pull request Aug 24, 2021
…linting

- PYTHONPATH change breaks package detection for some reason
kwvg added a commit to kwvg/dash that referenced this pull request Aug 24, 2021
…linting

- PYTHONPATH change breaks package detection for some reason
kwvg added a commit to kwvg/dash that referenced this pull request Aug 24, 2021
…linting

- PYTHONPATH change breaks package detection for some reason
kwvg added a commit to kwvg/dash that referenced this pull request Aug 25, 2021
kwvg added a commit to kwvg/dash that referenced this pull request Aug 25, 2021
kwvg added a commit to kwvg/dash that referenced this pull request Aug 26, 2021
kwvg added a commit to kwvg/dash that referenced this pull request Aug 26, 2021
kwvg added a commit to kwvg/dash that referenced this pull request Aug 26, 2021
kwvg added a commit to kwvg/dash that referenced this pull request Aug 27, 2021
kwvg added a commit to kwvg/dash that referenced this pull request Aug 30, 2021
kwvg added a commit to kwvg/dash that referenced this pull request Sep 1, 2021
kwvg added a commit to kwvg/dash that referenced this pull request Sep 1, 2021
kwvg added a commit to kwvg/dash that referenced this pull request Sep 1, 2021
kwvg added a commit to kwvg/dash that referenced this pull request Sep 1, 2021
kwvg added a commit to kwvg/dash that referenced this pull request Sep 2, 2021
kwvg added a commit to kwvg/dash that referenced this pull request Sep 3, 2021
kwvg added a commit to kwvg/dash that referenced this pull request Sep 3, 2021
kwvg added a commit to kwvg/dash that referenced this pull request Sep 3, 2021
@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.

None yet

5 participants