forked from bitcoin/bitcoin
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
build: gitian, linting and macOS-specific QoL improvements (part 1) #4255
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
Merged
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
ced4838
partial merge #17550: set minimum supported macOS to 10.12
kwvg def36ab
merge #15208: remove macOS launch-at-startup when compiled with > mac…
kwvg 0b13db2
merge #14954: Require python 3.5
kwvg 5b8e1b9
merge #15601: Switch to python3
kwvg 9f1fd3f
merge #17184: Filter out macOS process serial number
kwvg d5b895b
merge #17057: switch to upstream libdmg-hfsplus
kwvg 2508eaf
merge #17567: remove macOS start on login code
kwvg a8e8a3d
merge #15236: scripts and tools: Make --setup command independent
kwvg a358d2e
merge #16392: macOS toolchain update
kwvg File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1 @@ | ||
| 3.4.9 | ||
| 3.5.6 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -70,8 +70,8 @@ def build(): | |
|
|
||
| if args.macos: | ||
| print('\nCompiling ' + args.version + ' MacOS') | ||
| subprocess.check_call(['wget', '-N', '-P', 'inputs', 'https://bitcoincore.org/depends-sources/sdks/MacOSX10.11.sdk.tar.gz']) | ||
| subprocess.check_output(["echo 'bec9d089ebf2e2dd59b1a811a38ec78ebd5da18cbbcd6ab39d1e59f64ac5033f inputs/MacOSX10.11.sdk.tar.gz' | sha256sum -c"], shell=True) | ||
| subprocess.check_call(['wget', '-N', '-P', 'inputs', 'https://bitcoincore.org/depends-sources/sdks/MacOSX10.14.sdk.tar.gz']) | ||
| subprocess.check_output(["echo '328aff47e28c17093d59a72712a9b2e62cd8a8b87bbe03f91abb32960b413f0f inputs/MacOSX10.14.sdk.tar.gz' | sha256sum -c"], shell=True) | ||
| subprocess.check_call(['bin/gbuild', '-j', args.jobs, '-m', args.memory, '--commit', 'dash='+args.commit, '--url', 'dash='+args.url, '../dash/contrib/gitian-descriptors/gitian-osx.yml']) | ||
| subprocess.check_call(['bin/gsign', '-p', args.sign_prog, '--signer', args.signer, '--release', args.version+'-osx-unsigned', '--destination', '../gitian.sigs/', '../dash/contrib/gitian-descriptors/gitian-osx.yml']) | ||
| subprocess.check_call('mv build/out/dashcore-*-osx-unsigned.tar.gz inputs/dashcore-osx-unsigned.tar.gz', shell=True) | ||
|
|
@@ -135,7 +135,7 @@ def verify(): | |
| def main(): | ||
| global args, workdir | ||
|
|
||
| parser = argparse.ArgumentParser(usage='%(prog)s [options] signer version') | ||
| parser = argparse.ArgumentParser(description='Script for running full Gitian builds.') | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 15236 a force merge is not appropriate here. Please find what other backports may be needed. |
||
| parser.add_argument('-c', '--commit', action='store_true', dest='commit', help='Indicate that the version argument is for a commit or branch') | ||
| parser.add_argument('-p', '--pull', action='store_true', dest='pull', help='Indicate that the version argument is the number of a github repository pull request') | ||
| parser.add_argument('-u', '--url', dest='url', default='https://github.com/dashpay/dash', help='Specify the URL of the repository. Default is %(default)s') | ||
|
|
@@ -150,24 +150,14 @@ def main(): | |
| parser.add_argument('-S', '--setup', action='store_true', dest='setup', help='Set up the Gitian building environment. Only works on Debian-based systems (Ubuntu, Debian)') | ||
| parser.add_argument('-D', '--detach-sign', action='store_true', dest='detach_sign', help='Create the assert file for detached signing. Will not commit anything.') | ||
| parser.add_argument('-n', '--no-commit', action='store_false', dest='commit_files', help='Do not commit anything to git') | ||
| parser.add_argument('signer', help='GPG signer to sign each build assert file') | ||
| parser.add_argument('version', help='Version number, commit, or branch to build. If building a commit or branch, the -c option must be specified') | ||
| parser.add_argument('signer', nargs='?', help='GPG signer to sign each build assert file') | ||
| parser.add_argument('version', nargs='?', help='Version number, commit, or branch to build. If building a commit or branch, the -c option must be specified') | ||
|
|
||
| args = parser.parse_args() | ||
| workdir = os.getcwd() | ||
|
|
||
| args.linux = 'l' in args.os | ||
| args.windows = 'w' in args.os | ||
| args.macos = 'm' in args.os | ||
|
|
||
| args.is_bionic = b'bionic' in subprocess.check_output(['lsb_release', '-cs']) | ||
|
|
||
| if args.buildsign: | ||
| args.build = True | ||
| args.sign = True | ||
|
|
||
| args.sign_prog = 'true' if args.detach_sign else 'gpg --detach-sign' | ||
|
|
||
| args.lxc = (args.virtualization == 'lxc') | ||
| args.kvm = (args.virtualization == 'kvm') | ||
| args.docker = (args.virtualization == 'docker') | ||
|
|
@@ -193,13 +183,28 @@ def main(): | |
| print('Try '+script_name+' --help for more information') | ||
| exit(1) | ||
|
|
||
| # Signer and version shouldn't be empty | ||
| if args.signer == '': | ||
| print(script_name+': Missing signer.') | ||
| if args.setup: | ||
| setup() | ||
|
|
||
| if args.buildsign: | ||
| args.build = True | ||
| args.sign = True | ||
|
|
||
| if not args.build and not args.sign and not args.verify: | ||
| sys.exit(0) | ||
|
|
||
| args.linux = 'l' in args.os | ||
| args.windows = 'w' in args.os | ||
| args.macos = 'm' in args.os | ||
|
|
||
| args.sign_prog = 'true' if args.detach_sign else 'gpg --detach-sign' | ||
|
|
||
| if not args.signer: | ||
| print(script_name+': Missing signer') | ||
| print('Try '+script_name+' --help for more information') | ||
| exit(1) | ||
| if args.version == '': | ||
| print(script_name+': Missing version.') | ||
| if not args.version: | ||
| print(script_name+': Missing version') | ||
| print('Try '+script_name+' --help for more information') | ||
| exit(1) | ||
|
|
||
|
|
@@ -208,12 +213,6 @@ def main(): | |
| raise Exception('Cannot have both commit and pull') | ||
| args.commit = ('' if args.commit else 'v') + args.version | ||
|
|
||
| if args.setup: | ||
| setup() | ||
|
|
||
| if not args.build and not args.sign and not args.verify: | ||
| exit(0) | ||
|
|
||
| os.chdir('dash') | ||
| if args.pull: | ||
| subprocess.check_call(['git', 'fetch', args.url, 'refs/pull/'+args.version+'/merge']) | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -20,7 +20,6 @@ packages: | |
| - "nsis" | ||
| - "zip" | ||
| - "ca-certificates" | ||
| - "python" | ||
| - "python3" | ||
| - "rename" | ||
| - "ccache" | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.