mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-04-29 14:59:39 -04:00
build: remove dmg dependencies
This commit is contained in:
parent
33ae0bd1e4
commit
b5790c35f7
10 changed files with 15 additions and 58 deletions
|
@ -11,7 +11,7 @@ export SDK_URL=${SDK_URL:-https://bitcoincore.org/depends-sources/sdks}
|
||||||
export CONTAINER_NAME=ci_macos_cross
|
export CONTAINER_NAME=ci_macos_cross
|
||||||
export CI_IMAGE_NAME_TAG="docker.io/ubuntu:22.04"
|
export CI_IMAGE_NAME_TAG="docker.io/ubuntu:22.04"
|
||||||
export HOST=x86_64-apple-darwin
|
export HOST=x86_64-apple-darwin
|
||||||
export PACKAGES="cmake libz-dev python3-setuptools xorriso zip"
|
export PACKAGES="cmake libz-dev python3-setuptools zip"
|
||||||
export XCODE_VERSION=12.2
|
export XCODE_VERSION=12.2
|
||||||
export XCODE_BUILD_ID=12B45b
|
export XCODE_BUILD_ID=12B45b
|
||||||
export RUN_UNIT_TESTS=false
|
export RUN_UNIT_TESTS=false
|
||||||
|
|
|
@ -799,7 +799,6 @@ case $host in
|
||||||
AC_PATH_TOOL([DSYMUTIL], [dsymutil], [dsymutil])
|
AC_PATH_TOOL([DSYMUTIL], [dsymutil], [dsymutil])
|
||||||
AC_PATH_TOOL([INSTALL_NAME_TOOL], [install_name_tool], [install_name_tool])
|
AC_PATH_TOOL([INSTALL_NAME_TOOL], [install_name_tool], [install_name_tool])
|
||||||
AC_PATH_TOOL([OTOOL], [otool], [otool])
|
AC_PATH_TOOL([OTOOL], [otool], [otool])
|
||||||
AC_PATH_PROGS([XORRISOFS], [xorrisofs], [xorrisofs])
|
|
||||||
AC_PATH_PROG([ZIP], [zip], [zip])
|
AC_PATH_PROG([ZIP], [zip], [zip])
|
||||||
|
|
||||||
dnl libtool will try to strip the static lib, which is a problem for
|
dnl libtool will try to strip the static lib, which is a problem for
|
||||||
|
|
|
@ -3,7 +3,6 @@
|
||||||
((gnu packages bash) #:select (bash-minimal))
|
((gnu packages bash) #:select (bash-minimal))
|
||||||
(gnu packages bison)
|
(gnu packages bison)
|
||||||
((gnu packages certs) #:select (nss-certs))
|
((gnu packages certs) #:select (nss-certs))
|
||||||
((gnu packages cdrom) #:select (xorriso))
|
|
||||||
((gnu packages cmake) #:select (cmake-minimal))
|
((gnu packages cmake) #:select (cmake-minimal))
|
||||||
(gnu packages commencement)
|
(gnu packages commencement)
|
||||||
(gnu packages compression)
|
(gnu packages compression)
|
||||||
|
@ -606,5 +605,5 @@ inspecting signatures in Mach-O binaries.")
|
||||||
((string-contains target "-linux-")
|
((string-contains target "-linux-")
|
||||||
(list (make-bitcoin-cross-toolchain target)))
|
(list (make-bitcoin-cross-toolchain target)))
|
||||||
((string-contains target "darwin")
|
((string-contains target "darwin")
|
||||||
(list clang-toolchain-15 binutils cmake-minimal xorriso python-signapple zip))
|
(list clang-toolchain-15 binutils cmake-minimal python-signapple zip))
|
||||||
(else '())))))
|
(else '())))))
|
||||||
|
|
|
@ -6,7 +6,7 @@ The `macdeployqtplus` script should not be run manually. Instead, after building
|
||||||
make deploy
|
make deploy
|
||||||
```
|
```
|
||||||
|
|
||||||
When complete, it will have produced `Bitcoin-Core.dmg`.
|
When complete, it will have produced `Bitcoin-Core.zip`.
|
||||||
|
|
||||||
## SDK Extraction
|
## SDK Extraction
|
||||||
|
|
||||||
|
@ -60,10 +60,10 @@ previous stage) as the first argument.
|
||||||
|
|
||||||
The `sha256sum` of the generated TAR.GZ archive should be `df75d30ecafc429e905134333aeae56ac65fac67cb4182622398fd717df77619`.
|
The `sha256sum` of the generated TAR.GZ archive should be `df75d30ecafc429e905134333aeae56ac65fac67cb4182622398fd717df77619`.
|
||||||
|
|
||||||
## Deterministic macOS DMG Notes
|
## Deterministic macOS App Notes
|
||||||
|
|
||||||
Working macOS DMGs are created in Linux by combining a recent `clang`, the Apple
|
macOS Applications are created in Linux by combining a recent `clang` and the Apple
|
||||||
`binutils` (`ld`, `ar`, etc) and DMG authoring tools.
|
`binutils` (`ld`, `ar`, etc).
|
||||||
|
|
||||||
Apple uses `clang` extensively for development and has upstreamed the necessary
|
Apple uses `clang` extensively for development and has upstreamed the necessary
|
||||||
functionality so that a vanilla clang can take advantage. It supports the use of `-F`,
|
functionality so that a vanilla clang can take advantage. It supports the use of `-F`,
|
||||||
|
@ -93,20 +93,15 @@ created using these tools. The build process has been designed to avoid includin
|
||||||
SDK's files in Guix's outputs. All interim tarballs are fully deterministic and may be freely
|
SDK's files in Guix's outputs. All interim tarballs are fully deterministic and may be freely
|
||||||
redistributed.
|
redistributed.
|
||||||
|
|
||||||
[`xorrisofs`](https://www.gnu.org/software/xorriso/) is used to create the DMG.
|
|
||||||
|
|
||||||
A background image is added to DMG files by inserting a `.DS_Store` during creation.
|
|
||||||
|
|
||||||
As of OS X 10.9 Mavericks, using an Apple-blessed key to sign binaries is a requirement in
|
As of OS X 10.9 Mavericks, using an Apple-blessed key to sign binaries is a requirement in
|
||||||
order to satisfy the new Gatekeeper requirements. Because this private key cannot be
|
order to satisfy the new Gatekeeper requirements. Because this private key cannot be
|
||||||
shared, we'll have to be a bit creative in order for the build process to remain somewhat
|
shared, we'll have to be a bit creative in order for the build process to remain somewhat
|
||||||
deterministic. Here's how it works:
|
deterministic. Here's how it works:
|
||||||
|
|
||||||
- Builders use Guix to create an unsigned release. This outputs an unsigned DMG which
|
- Builders use Guix to create an unsigned release. This outputs an unsigned ZIP which
|
||||||
users may choose to bless and run. It also outputs an unsigned app structure in the form
|
users may choose to bless and run. It also outputs an unsigned app structure in the form
|
||||||
of a tarball, which also contains all of the tools that have been previously (deterministically)
|
of a tarball.
|
||||||
built in order to create a final DMG.
|
|
||||||
- The Apple keyholder uses this unsigned app to create a detached signature, using the
|
- The Apple keyholder uses this unsigned app to create a detached signature, using the
|
||||||
script that is also included there. Detached signatures are available from this [repository](https://github.com/bitcoin-core/bitcoin-detached-sigs).
|
script that is also included there. Detached signatures are available from this [repository](https://github.com/bitcoin-core/bitcoin-detached-sigs).
|
||||||
- Builders feed the unsigned app + detached signature back into Guix. It uses the
|
- Builders feed the unsigned app + detached signature back into Guix. It uses the
|
||||||
pre-built tools to recombine the pieces into a deterministic DMG.
|
pre-built tools to recombine the pieces into a deterministic ZIP.
|
||||||
|
|
|
@ -48,7 +48,7 @@ The paths are automatically configured and no other options are needed unless ta
|
||||||
|
|
||||||
#### For macOS cross compilation
|
#### For macOS cross compilation
|
||||||
|
|
||||||
sudo apt-get install curl bsdmainutils cmake libz-dev python3-setuptools xorriso zip
|
sudo apt-get install curl bsdmainutils cmake libz-dev python3-setuptools zip
|
||||||
|
|
||||||
Note: You must obtain the macOS SDK before proceeding with a cross-compile.
|
Note: You must obtain the macOS SDK before proceeding with a cross-compile.
|
||||||
Under the depends directory, create a subdirectory named `SDKs`.
|
Under the depends directory, create a subdirectory named `SDKs`.
|
||||||
|
|
|
@ -1,15 +0,0 @@
|
||||||
package=native_ds_store
|
|
||||||
$(package)_version=1.3.0
|
|
||||||
$(package)_download_path=https://github.com/dmgbuild/ds_store/archive/
|
|
||||||
$(package)_file_name=v$($(package)_version).tar.gz
|
|
||||||
$(package)_sha256_hash=76b3280cd4e19e5179defa23fb594a9dd32643b0c80d774bd3108361d94fb46d
|
|
||||||
$(package)_install_libdir=$(build_prefix)/lib/python3/dist-packages
|
|
||||||
|
|
||||||
define $(package)_build_cmds
|
|
||||||
python3 setup.py build
|
|
||||||
endef
|
|
||||||
|
|
||||||
define $(package)_stage_cmds
|
|
||||||
mkdir -p $($(package)_install_libdir) && \
|
|
||||||
python3 setup.py install --root=$($(package)_staging_dir) --prefix=$(build_prefix) --install-lib=$($(package)_install_libdir)
|
|
||||||
endef
|
|
|
@ -1,15 +0,0 @@
|
||||||
package=native_mac_alias
|
|
||||||
$(package)_version=2.2.0
|
|
||||||
$(package)_download_path=https://github.com/dmgbuild/mac_alias/archive/
|
|
||||||
$(package)_file_name=v$($(package)_version).tar.gz
|
|
||||||
$(package)_sha256_hash=421e6d7586d1f155c7db3e7da01ca0dacc9649a509a253ad7077b70174426499
|
|
||||||
$(package)_install_libdir=$(build_prefix)/lib/python3/dist-packages
|
|
||||||
|
|
||||||
define $(package)_build_cmds
|
|
||||||
python3 setup.py build
|
|
||||||
endef
|
|
||||||
|
|
||||||
define $(package)_stage_cmds
|
|
||||||
mkdir -p $($(package)_install_libdir) && \
|
|
||||||
python3 setup.py install --root=$($(package)_staging_dir) --prefix=$(build_prefix) --install-lib=$($(package)_install_libdir)
|
|
||||||
endef
|
|
|
@ -27,7 +27,7 @@ multiprocess_native_packages = native_libmultiprocess native_capnp
|
||||||
|
|
||||||
usdt_linux_packages=systemtap
|
usdt_linux_packages=systemtap
|
||||||
|
|
||||||
darwin_native_packages = native_ds_store native_mac_alias
|
darwin_native_packages =
|
||||||
|
|
||||||
ifneq ($(build_os),darwin)
|
ifneq ($(build_os),darwin)
|
||||||
darwin_native_packages += native_cctools native_libtapi
|
darwin_native_packages += native_cctools native_libtapi
|
||||||
|
|
|
@ -163,14 +163,8 @@ brew install python
|
||||||
|
|
||||||
#### Deploy Dependencies
|
#### Deploy Dependencies
|
||||||
|
|
||||||
You can deploy a `.dmg` containing the Bitcoin Core application using `make deploy`.
|
You can deploy a `.zip` containing the Bitcoin Core application using `make deploy`.
|
||||||
This command depends on a couple of python packages, so it is required that you have `python` installed.
|
It is required that you have `python` installed.
|
||||||
|
|
||||||
Ensuring that `python` is installed, you can install the deploy dependencies by running the following commands in your terminal:
|
|
||||||
|
|
||||||
``` bash
|
|
||||||
pip3 install ds_store mac_alias
|
|
||||||
```
|
|
||||||
|
|
||||||
## Building Bitcoin Core
|
## Building Bitcoin Core
|
||||||
|
|
||||||
|
@ -230,7 +224,7 @@ make check # Run tests if Python 3 is available
|
||||||
|
|
||||||
### 3. Deploy (optional)
|
### 3. Deploy (optional)
|
||||||
|
|
||||||
You can also create a `.dmg` containing the `.app` bundle by running the following command:
|
You can also create a `.zip` containing the `.app` bundle by running the following command:
|
||||||
|
|
||||||
``` bash
|
``` bash
|
||||||
make deploy
|
make deploy
|
||||||
|
|
|
@ -123,7 +123,7 @@ git -C ./guix.sigs pull
|
||||||
### Create the macOS SDK tarball (first time, or when SDK version changes)
|
### Create the macOS SDK tarball (first time, or when SDK version changes)
|
||||||
|
|
||||||
Create the macOS SDK tarball, see the [macdeploy
|
Create the macOS SDK tarball, see the [macdeploy
|
||||||
instructions](/contrib/macdeploy/README.md#deterministic-macos-dmg-notes) for
|
instructions](/contrib/macdeploy/README.md#deterministic-macos-app-notes) for
|
||||||
details.
|
details.
|
||||||
|
|
||||||
### Build and attest to build outputs
|
### Build and attest to build outputs
|
||||||
|
|
Loading…
Add table
Reference in a new issue