Commit Graph

130 Commits

Author SHA1 Message Date
fanquake
8ea45e626e
build: use macOS 14 SDK (Xcode 15.0) 2023-12-05 09:55:01 +00:00
Sebastian Falbesoner
d516cf83ed test: use built-in collection types for type hints (Python 3.9 / PEP 585)
Since Python 3.9, type hinting has become a little less awkward, as for
collection types one doesn't need to import the corresponding
capitalized types (`Dict`, `List`, `Set`, `Tuple`, ...) anymore, but can
use the built-in types directly. [1] [2]
This commit applies the replacement for all Python scripts (i.e. in the
contrib and test folders) for the basic types:
    - typing.Dict  -> dict
    - typing.List  -> list
    - typing.Set   -> set
    - typing.Tuple -> tuple

[1] https://docs.python.org/3.9/whatsnew/3.9.html#type-hinting-generics-in-standard-collections
[2] https://peps.python.org/pep-0585/#implementation for a list of type
2023-10-25 01:10:21 +02:00
fanquake
b5790c35f7
build: remove dmg dependencies 2023-09-15 13:47:50 +01:00
fanquake
33ae0bd1e4
macdeploy: remove DMG generation from deploy script 2023-09-15 13:47:50 +01:00
fanquake
c38561d6b1
build: add -zip option to macdeployqtplus
This zips the app bundle in /dist.
2023-09-15 13:47:49 +01:00
MarcoFalke
fa8fe5b696
scripted-diff: Use new python 3.7 keywords
-BEGIN VERIFY SCRIPT-
 sed -i 's/universal_newlines/text/g' $(git grep -l universal_newlines)
-END VERIFY SCRIPT-
2023-01-18 13:00:34 +01:00
Hennadii Stepanov
306ccd4927
scripted-diff: Bump copyright headers
-BEGIN VERIFY SCRIPT-
./contrib/devtools/copyright_header.py update ./
-END VERIFY SCRIPT-

Commits of previous years:
- 2021: f47dda2c58
- 2020: fa0074e2d8
- 2019: aaaaad6ac9
2022-12-24 23:49:50 +00:00
Jeremy Rand
e410144fc4
doc: Fix typo in macdeploy
The text of the link used an underscore, while the URL used a space.
The latter is correct; the former yields zero results on Apple's
website.
2022-06-28 03:37:18 +00:00
fanquake
1ad5d5088d
Merge bitcoin/bitcoin#24866: build: No longer need to hack the PATH variable in config.site
efa3a807a6 build: No longer need to hack the `PATH` variable in `config.site` (Hennadii Stepanov)
f3af4f7a18 build: Let the depends build system define a path to `dsymutil` tool (Hennadii Stepanov)
b0a8ddabe5 build: Pass missed darwin-specific tools via `config.site` (Hennadii Stepanov)
f87594da14 build: No need to provide defaults for darwin-specific tools (Hennadii Stepanov)
80cd99322f scripted-diff: Rename INSTALLNAMETOOL -> INSTALL_NAME_TOOL (Hennadii Stepanov)
a4fd440741 build: Pass missed `strip` tool via `config.site` (Hennadii Stepanov)

Pull request description:

  This PR adds lacking definitions of absolute paths to some tools in the depends build system.

  This improvement makes possible to keep the `PATH` variable untouched during configuration.

  Also see https://github.com/bitcoin/bitcoin/pull/24566#discussion_r851125442.

  #### Guix builds on `x86_64`:
  ```
  $ find guix-build-$(git rev-parse --short=12 HEAD)/output/ -type f -print0 | env LC_ALL=C sort -z | xargs -r0 sha256sum
  93fa58bf2a1f5c15c5a547c014036ac79761e5c9622bd5099408ce570b39f02f  guix-build-efa3a807a677/output/aarch64-linux-gnu/SHA256SUMS.part
  ef5f53348404ba973dceaf088a4d47dfd0f1fa3d3bf75bdd723b043431de005d  guix-build-efa3a807a677/output/aarch64-linux-gnu/bitcoin-efa3a807a677-aarch64-linux-gnu-debug.tar.gz
  6688b2295d564b32ea676c0540c43cdc5211322eddc87e0967b764284e847368  guix-build-efa3a807a677/output/aarch64-linux-gnu/bitcoin-efa3a807a677-aarch64-linux-gnu.tar.gz
  4abb3428be477aa7360611689fd28950f30dbbac6a95c454095367d8df11ad72  guix-build-efa3a807a677/output/arm-linux-gnueabihf/SHA256SUMS.part
  8dd33389170e83812821d5dd68741db96af1376035ba40af0215a7ae95dcf7fc  guix-build-efa3a807a677/output/arm-linux-gnueabihf/bitcoin-efa3a807a677-arm-linux-gnueabihf-debug.tar.gz
  544e97eb88b2a44c8ceb9660399eb5d49d75e07ff59fc03a701a595bacea0491  guix-build-efa3a807a677/output/arm-linux-gnueabihf/bitcoin-efa3a807a677-arm-linux-gnueabihf.tar.gz
  219faf1131bdcffffd5979eafd2beabc4a300081f8b1df184852b7183dfbc0e8  guix-build-efa3a807a677/output/arm64-apple-darwin/SHA256SUMS.part
  602a417bfa7971fb26d0fe9921d2348fd0d01a5bcf0af93f8a9d50112076e0eb  guix-build-efa3a807a677/output/arm64-apple-darwin/bitcoin-efa3a807a677-arm64-apple-darwin-unsigned.dmg
  0dcb197420844da8da3f528a1d986628f7b63adb1e83353d63e8a84da59abc42  guix-build-efa3a807a677/output/arm64-apple-darwin/bitcoin-efa3a807a677-arm64-apple-darwin-unsigned.tar.gz
  10efdd33418234a8288c27a614f50e9ff45efbd681fa1c0e173142b6d267cdb8  guix-build-efa3a807a677/output/arm64-apple-darwin/bitcoin-efa3a807a677-arm64-apple-darwin.tar.gz
  e5ef02adeb9bcb4675972b0dc233a904006b0940d721049eeb94b14cda34872e  guix-build-efa3a807a677/output/dist-archive/bitcoin-efa3a807a677.tar.gz
  a75d2a49b7a8ab1c849e1badff5049a417519f0154b65335a8717d01b8b6ed62  guix-build-efa3a807a677/output/powerpc64-linux-gnu/SHA256SUMS.part
  aef63d196487dd0bc597fd53633ac889149f1a126c651ea55f3bec11a092c460  guix-build-efa3a807a677/output/powerpc64-linux-gnu/bitcoin-efa3a807a677-powerpc64-linux-gnu-debug.tar.gz
  ddc7913eed26270be271a8712bf351d562d57c746810ea3b7b4101aea8cb6d89  guix-build-efa3a807a677/output/powerpc64-linux-gnu/bitcoin-efa3a807a677-powerpc64-linux-gnu.tar.gz
  83bbf4b1af07a2cf7d6014de7c885f0998dd38afacdb5242f5f56505ee704f17  guix-build-efa3a807a677/output/powerpc64le-linux-gnu/SHA256SUMS.part
  c9d5d95de98ed987b63a78d4f6e082cb36d5ec3ba71d130601e03d3ebfbd208d  guix-build-efa3a807a677/output/powerpc64le-linux-gnu/bitcoin-efa3a807a677-powerpc64le-linux-gnu-debug.tar.gz
  88ed6ec82dd4c1c656fe80b4c49f91a4c15c2ab798dbbe16a3d57393f17d6f3a  guix-build-efa3a807a677/output/powerpc64le-linux-gnu/bitcoin-efa3a807a677-powerpc64le-linux-gnu.tar.gz
  7b8e7b3b1e68a2ea0e37c058b284da11e9721ef4d1bc2761ed003b2061358d5f  guix-build-efa3a807a677/output/riscv64-linux-gnu/SHA256SUMS.part
  a5de4bedf2b4bc5ab25db21b942076897cabe8a40ce9b0637488af6b4d90693a  guix-build-efa3a807a677/output/riscv64-linux-gnu/bitcoin-efa3a807a677-riscv64-linux-gnu-debug.tar.gz
  53023994202887778a001ce00daf7cdc135b9e6c3be034f31645ab4ba5f078c6  guix-build-efa3a807a677/output/riscv64-linux-gnu/bitcoin-efa3a807a677-riscv64-linux-gnu.tar.gz
  c6664a61b81dfa080c466d2252a6db70165acbea6cfad51ada16970e9c08bb6f  guix-build-efa3a807a677/output/x86_64-apple-darwin/SHA256SUMS.part
  a528569ae4bf5e19401311649086a2d8e3fa5251b44550e623722968dfb111ea  guix-build-efa3a807a677/output/x86_64-apple-darwin/bitcoin-efa3a807a677-x86_64-apple-darwin-unsigned.dmg
  9b0384cce7605b546ed581074955f2b9c33cf0817453842036e6224b423b814b  guix-build-efa3a807a677/output/x86_64-apple-darwin/bitcoin-efa3a807a677-x86_64-apple-darwin-unsigned.tar.gz
  ebdbd2f3a6406233f27ee48be0ab014991fedba3c0831f79f4a4873f7abf3d7a  guix-build-efa3a807a677/output/x86_64-apple-darwin/bitcoin-efa3a807a677-x86_64-apple-darwin.tar.gz
  05a8f71fe67f7193e71ea8bbe6f8df2e651b8ac7da3075ba25aacdd3515f7757  guix-build-efa3a807a677/output/x86_64-linux-gnu/SHA256SUMS.part
  30a17a1e3d795ea390cd1e0f3ef74c989b5768ae7415740fcca46befe4cb7206  guix-build-efa3a807a677/output/x86_64-linux-gnu/bitcoin-efa3a807a677-x86_64-linux-gnu-debug.tar.gz
  66db846f3fd739089afa5c339659dbf5efb50572f2d29f8288bf24be9e8f1dd0  guix-build-efa3a807a677/output/x86_64-linux-gnu/bitcoin-efa3a807a677-x86_64-linux-gnu.tar.gz
  bd3c44890823badcf6d296fa674de14275684be7593f4ab21c0316873ddd8652  guix-build-efa3a807a677/output/x86_64-w64-mingw32/SHA256SUMS.part
  6ce3ee21212ff2a95e085073a48194476ade2d5ff94cc1c8ec58a8ae7db8f1fa  guix-build-efa3a807a677/output/x86_64-w64-mingw32/bitcoin-efa3a807a677-win64-debug.zip
  5e697c05537cfb2ce2ed95fef25e261e2cfa83a31fd548a98118580c4bbff2e4  guix-build-efa3a807a677/output/x86_64-w64-mingw32/bitcoin-efa3a807a677-win64-setup-unsigned.exe
  4cc2bcff98845c792c0ed12a2ea407b25fb85b2d4250d88dca94ed68f42e714d  guix-build-efa3a807a677/output/x86_64-w64-mingw32/bitcoin-efa3a807a677-win64-unsigned.tar.gz
  9d5d72271dc6b820e63b30c5c3f9015309777793100b4e2b6ab0c8ea0f7b4aed  guix-build-efa3a807a677/output/x86_64-w64-mingw32/bitcoin-efa3a807a677-win64.zip
  ```

ACKs for top commit:
  laanwj:
    Tested ACK efa3a807a6. I get the same build output as in OP:
  vincenzopalazzo:
    Re ACK efa3a807a6

Tree-SHA512: 6d35c11fc307221d61ad250bbdcdc09dbc49adbe43f7a94acb56190ae9f005d23fc22941ea59e3eb62811f8974e39d3617e0c47071232d4b1b0bc2e2e2782e88
2022-05-05 09:36:26 +01:00
Pavol Rusnak
51d06df874
contrib: macdeploy: fix permissions typo in gen-sdk script 2022-04-22 22:09:44 +02:00
Hennadii Stepanov
80cd99322f
scripted-diff: Rename INSTALLNAMETOOL -> INSTALL_NAME_TOOL
This change makes naming of `install_name_tool` consistent across
the whole build system.

-BEGIN VERIFY SCRIPT-
sed --in-place --expression='s/INSTALLNAMETOOL/INSTALL_NAME_TOOL/g' $(git grep --files-with-matches 'INSTALLNAMETOOL')
-END VERIFY SCRIPT-
2022-04-21 10:08:45 +02:00
fanquake
bfbce6cbfe
Merge bitcoin/bitcoin#24031: build: don't compress macOS DMG
1dd8cbfbc6 build: don't compress macOS DMG (fanquake)

Pull request description:

  Skip compressing the macOS DMG, and drop related build steps and dependencies. Uncompressed the DMG increases from ~16mb to ~30mb, which compared to other software a user may download, (Firefox 125mb, VLC 52mb, Open Office 176mb), is still relatively small. When contrasted against the 100's of GB of blockchain data a node will download, an additional 15mb to get the release binary, isn't much additional overhead. Note that if / when we build with LTO enabled for releases, this size will shrink back down significantly again.

  `native_libdmg-hfsplus` is not maintained, and I doubt the DMG creation feature will ever be fixed. If at some point `xorrisofs` supports compressing dmgs, we could enable that.

  Guix Build on x86_64:
  ```bash
  25b7c8bb7bc8ea014d43cebb844a842d2ac8d5a343039a820d24b649c9e6bc8a  guix-build-1dd8cbfbc631/output/arm64-apple-darwin/SHA256SUMS.part
  16beb5c52c9bf51b5ce9ef5a0d17c0038238a833383586a1b14acbca78533e4b  guix-build-1dd8cbfbc631/output/arm64-apple-darwin/bitcoin-1dd8cbfbc631-arm64-apple-darwin-unsigned.dmg
  d8f89a61a7448d6334dbb3639386a7b6340542393933f35421a9e6dfc724e455  guix-build-1dd8cbfbc631/output/arm64-apple-darwin/bitcoin-1dd8cbfbc631-arm64-apple-darwin-unsigned.tar.gz
  11617dc261ef602433f5bb29956a40a9085dbc783f519f75fbe06e80970148d0  guix-build-1dd8cbfbc631/output/arm64-apple-darwin/bitcoin-1dd8cbfbc631-arm64-apple-darwin.tar.gz
  aa8550d4a394d3161d14ec5e6012ed07354135afb022e905a1946785b4665664  guix-build-1dd8cbfbc631/output/dist-archive/bitcoin-1dd8cbfbc631.tar.gz
  2b837f2f971a9738d0b7b8497f7ded740ef5e67c8baa7f30ca33e6b7d826eec8  guix-build-1dd8cbfbc631/output/x86_64-apple-darwin/SHA256SUMS.part
  db972b2c06dbde5525a3f9e6ceb9c20a8120bc9a6f15e1d852a4bfac09d88569  guix-build-1dd8cbfbc631/output/x86_64-apple-darwin/bitcoin-1dd8cbfbc631-x86_64-apple-darwin-unsigned.dmg
  50fe990c3f9923ee92195125faf6517396e7c1b017a8f4f7d52e991ebce52f0c  guix-build-1dd8cbfbc631/output/x86_64-apple-darwin/bitcoin-1dd8cbfbc631-x86_64-apple-darwin-unsigned.tar.gz
  1d9022b0ae46ead41046c40f82291ce363760660a3cd6e6ef6a5b1128b90faef  guix-build-1dd8cbfbc631/output/x86_64-apple-darwin/bitcoin-1dd8cbfbc631-x86_64-apple-darwin.tar.gz
  ```

  Guix Build on arm64:
  ```bash
  ```

ACKs for top commit:
  Sjors:
    re-tACK 1dd8cbfbc6 on Intel macOS
  laanwj:
    Build system changes code review ACK 1dd8cbfbc6, I don't know anything about MacOS application formats and their internals so do not have an opinion on the contents of this change.
  jarolrod:
    ACK 1dd8cbfbc6

Tree-SHA512: 04c5bf78f26a9877777093ec4c50c457107bef59d720839ea5e7d7e4f7961dfee9f86b40cf791524a9e60e9e77403a797e9fcdae3849b60b759f9f66cc31b6ab
2022-04-21 08:54:13 +01:00
laanwj
6f55ab57cb
Merge bitcoin/bitcoin#24534: contrib: macdeploy: make gen-sdk deterministic
ba30a5407e contrib: macdeploy: monkey-patch gen-sdk to be deterministic (Pavol Rusnak)
1868a17e5a contrib: macdeploy: make gen-sdk deterministic (Pavol Rusnak)

Pull request description:

  This PR attempts to make `contrib/macdeploy/gen-sdk` deterministic

  Can anyone with the `Xcode_12.2.xip` confirm that `gen-sdk` produces the same hash? => `e7ca56bc8804d16624fad68be2e71647747d6629cacaaa3de5fbfa7f444e9eae `

ACKs for top commit:
  laanwj:
    Tested ACK ba30a5407e
  jarolrod:
    Tested ACK ba30a5407e

Tree-SHA512: 1638ceaf28e87ef0d21a1a71ef02989f75942b60a12f07236ac709bde96f08f39f816767e35a0fe68c26bf5978e63e74f5385be9d4b8f80a2e89b30f163f4526
2022-04-21 09:38:09 +02:00
fanquake
1dd8cbfbc6
build: don't compress macOS DMG 2022-04-11 10:34:30 +01:00
fanquake
3d41521569
build: perform /Applications symlink generation in macdeployqtplus
By generating the symlink earlier in the macdeploy process, we can unify the
logic in the deploy script.
2022-04-05 14:49:32 +01:00
fanquake
dac6936719
build: perform all .tiff copying in macdeployqtplus
By copying the .tiff earlier in the macdeploy process, we can unify the logic in
the deploy script.
2022-04-05 14:49:23 +01:00
fanquake
979271a5d9
macdeploy: remove unused detached-sig-apply
Signature application is now done with signapple.
2022-03-17 12:38:36 +00:00
Pavol Rusnak
ba30a5407e
contrib: macdeploy: monkey-patch gen-sdk to be deterministic
on different Python versions (there was a change in TAR handling
between Python 3.8 and Python 3.9)
2022-03-12 12:35:56 +01:00
Pavol Rusnak
1868a17e5a
contrib: macdeploy: make gen-sdk deterministic 2022-03-12 12:35:56 +01:00
Andrew Chow
0189df1d31 build, mac: Include arch in codesignature tarball 2022-03-09 10:38:24 -05:00
Hennadii Stepanov
1513727e2b
build, qt: (Re-)sign package
Starting with macOS 11 on Apple silicon, executables must be signed
before they are allowed to run.
2022-02-17 14:10:17 +02:00
Hennadii Stepanov
c26a0a5af7
build, qt: Align frameworks with macOS codesign tool requirements
Currently the codesign tool fails to sign copied frameworks.
2022-02-17 14:10:11 +02:00
jarolrod
ddcac22f09 doc: cleanup doc on need of Developer Account to obtain macOS SDK
The explicit statement that an Apple Developer Account is required in
order to obtain the SDK is buried within the "Deterministic macOS DMG
Notes" section. It should be the first thing mentioned under the "SDK
Extraction" section. The reason to do this is to set expectations of
what is required before starting any steps or clicking on links.

This fixes the issue by doing just that; moving this information to the
"SDK Extraction" section. Now that the information is moved, this also
deletes unnecessary SDK related notes from the "Deterministic macOS DMG
Notes" section. It is not necessary to explain under what sub-directory
'most' of the important files are inside of the 'Xcode.app'.
2022-02-10 23:50:16 -05:00
fanquake
446e73cc0b
build: use macOS 11 SDK (Xcode 12.2)
This should be sufficient to support building for Apple ARM when
cross-compiling.
2022-01-26 17:28:16 +08:00
fanquake
e09773d20a
build: use a static .tiff for macOS .dmg over generating
Co-authored-by: Pavol Rusnak <pavol@rusnak.io>
2022-01-02 15:38:19 +08:00
Hennadii Stepanov
f47dda2c58
scripted-diff: Bump copyright headers
-BEGIN VERIFY SCRIPT-
./contrib/devtools/copyright_header.py update ./
-END VERIFY SCRIPT-

Commits of previous years:
* 2020: fa0074e2d8
* 2019: aaaaad6ac9
2021-12-30 19:36:57 +02:00
João Barbosa
655d52a0cd contrib: Specify wb mode when creating mac sdk
Fix the warning:
```
./contrib/macdeploy/gen-sdk:84: FutureWarning: GzipFile was opened for writing, but this will change in future Python releases.  Specify the mode argument for opening it for writing.
```
2021-11-25 21:38:34 +00:00
Hennadii Stepanov
9a1ad7bc0d
test: Enable SC2086 shellcheck rule 2021-11-13 16:54:56 +02:00
fanquake
ab9c34237a
release: remove gitian 2021-08-31 09:37:23 +08:00
Antoine Poinsot
f8f772dc49
macdeploy: alternative info to download the macOS SDK
The previous link wasn't accessible for me, this adds some instructions
given to me by Hebasto on #bitcoin-core-builds as well as a shasum for
the archive to quickly check the downloaded one is the right one before
processing with the entire Guix build.

This also corrects a link to an older version of the SDK currently in
use.

Signed-off-by: Antoine Poinsot <darosior@protonmail.com>
2021-07-29 10:59:14 +02:00
fanquake
0a5723beea
macdeploy: cleanup .temp.dmg if present 2021-06-09 12:33:39 +08:00
fanquake
ecffe8689d
macdeploy: remove qt4 related code 2021-06-09 12:33:38 +08:00
fanquake
639f064253
macdeploy: select the plugins we need, rather than excluding those we don't 2021-06-09 12:33:33 +08:00
fanquake
3d26b6b9e9
macdeploy: fix framework printing when passing -verbose 2021-06-09 12:16:47 +08:00
fanquake
dca6c90329
macdeploy: remove unused plistlib import
Unused since #20422, see: https://github.com/bitcoin/bitcoin/pull/20422#discussion_r534207899
2021-06-09 12:16:47 +08:00
fanquake
c29cba44b3
build: Xcode 12.1, macOS SDK 10.15.6 2021-05-01 13:39:45 +08:00
fanquake
cf971c9ea0
build: use -isysroot over --sysroot on macOS 2021-04-29 17:40:45 +08:00
Andrew Chow
f55eed2514 gitian: use signapple to create the MacOS code signature 2021-01-07 15:33:19 -05:00
Andrew Chow
95b06d2185 gitian: use signapple to apply the MacOS code signature 2021-01-07 15:33:19 -05:00
Hennadii Stepanov
1fbb8b6fa3
script: Remove outdated extract-osx-sdk.sh 2020-12-21 15:03:08 +02:00
fanquake
0df9819126 build: Replace genisoimage with xorriso
xorriso and its mkisofs/genisoimage emulation alter-ego xorrisofs are
more maintained, and has the right toggles for us to achieve output
determinism without using blunt tools like faketime.

In this commit, we use xorrisofs from the build environment rather than
building it ourselves using depends. This is not necessary and can be
changed in the future.

From https://wiki.debian.org/genisoimage?action=recall&rev=11 :

> The classical command line interface for production of ISO 9660
> filesystem images is the option set established by program mkisofs.
> For reasons of licensing and other problems with its author, Debian
> ships a fork of mkisofs, called genisoimage, which was split off in
> 2006 and then developed independently.
>
> Meanwhile, genisoimage gets no new features and not even bug fixes. It
> is first choice only if its options -udf or -hfs are needed.
>
> Replacement in most uses cases, especially for bootable ISO 9660
> filesystems, archiving, and backup, is xorrisofs which starts the -as
> mkisofs emulation mode of program xorriso.
2020-12-16 12:29:14 -05:00
fanquake
5d2cbdf772
macdeploy: use Python 3.6 2020-11-30 14:54:20 +08:00
fanquake
a42aa94c54
macdeploy: remove runHDIUtil in favor of directly calling subprocess.run 2020-11-30 14:54:20 +08:00
fanquake
adaa26202b
macdeploy: remove existing Bitcoin-Core.dmg if present 2020-11-30 14:54:20 +08:00
fanquake
ccb0325b1b
macdeploy: move qt_conf to where it's used 2020-11-30 14:54:20 +08:00
fanquake
6390a04862
macdeploy: consolidate .DS_Store generation
Rather than two lots of logic doing roughly the same thing, dependent on if
you're compiling on Linux or macOS, combine the .DS store generation into
macdeployqtplus.

This also removes the -fancy and -volname options.
2020-11-30 14:54:19 +08:00
fanquake
32347cd56a
macdeploy: assume plistlib is available
We already require Python 3.5 or later
2020-11-30 14:54:19 +08:00
fanquake
0ab4018c12
macdeploy: have a single level of logging output
4 different levels of verbosity is overkill for a fairly simple script, which
was always being run at 2 in any case.
2020-11-30 14:54:19 +08:00
fanquake
827d382aa7
macdeploy: remove add-resources argument 2020-11-30 14:54:19 +08:00
fanquake
464b34d4c3
macdeploy: remove codesigning argument 2020-11-30 14:54:19 +08:00