Skip to content

Commit b295395

Browse files
committed
Merge bitcoin/bitcoin#21239: guix: Add codesignature attachment support for osx+win
ee88320 guix: repro: Sort find output in libtool for gcc-8 (Carl Dong) ee0a67c codesigning: Use SHA256 as digest for osslsigncode (Windows) (Carl Dong) 38eb91e guix: Add codesigning functionality (Carl Dong) bac2690 guix: Package codesigning tools (Carl Dong) 0a2176d guix: Reindent existing manifest.scm (Carl Dong) c090a3e Makefile.am: use APP_DIST_DIR instead of hard-coding dist (Carl Dong) Pull request description: This is the last PR before we reach feature-parity with the Gitian process! Note: I tried using the `Makefile` inside the distsrc to make the dmg instead of manually listing out the commands, but `make` seems to want to re-make a lot of other files which broke the dmg. The workflow looks something like this: 1. `env [ FOO=bar... ] ./contrib/guix/guix-build` (add additional env vars as necessary) 2. Codesigners only: 1. Copy `guix-build-<short-id>/output/x86_64-apple-darwin18/bitcoin-<short-id>-osx-unsigned.tar.gz` and `guix-build-<short-id>/output/x86_64-w64-mingw32/bitcoin-<short-id>-win-unsigned.tar.gz` to signing computer 2. Codesign with `./detached-sig-create.sh` inside the tarball 3. Upload contents of `signature-{osx,win}.tar.gz` to https://github.com/bitcoin-core/bitcoin-detached-sigs (as a new tag) 3. Checkout new tag for `bitcoin-core/bitcoin-detached-sigs` with the detached signatures 4. `env [ FOO=bar... ] DETACHED_SIGS_REPO=<path/to/bitcoin-detached-sigs> ./contrib/guix/guix-codesign` (modify env vars as necessary) 5. Make sure `guix.sigs` is cloned and updated 6. `env GUIX_SIGS_REPO=<path/to/guix.sigs> SIGNER=0x96AB007F1A7ED999=dongcarl ./contrib/guix/guix-attest` (modify env vars as necessary) 7. Commit your new signatures and SHA256SUMS in `guix.sigs` 8. Optionally, after there are multiple signatures in `guix.sigs`: `env GUIX_SIGS_REPO=<path/to/guix.sigs> ./contrib/guix/guix-verify` ACKs for top commit: laanwj: Tested ACK ee88320 achow101: ACK ee88320 Tree-SHA512: e812a07a5f19f900600c70cb9c717769ef544a6c0c12760b5558b76b6b37df863257f3dbf38b0757e6e06e334470267e94c9f2bdbc27409d6837b1a0bfc6acbc
2 parents 2968417 + ee88320 commit b295395

File tree

8 files changed

+1292
-52
lines changed

8 files changed

+1292
-52
lines changed

Makefile.am

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ $(APP_DIST_DIR)/Applications:
149149
$(APP_DIST_EXTRAS): $(APP_DIST_DIR)/$(OSX_APP)/Contents/MacOS/Bitcoin-Qt
150150

151151
$(OSX_TEMP_ISO): $(APP_DIST_EXTRAS)
152-
$(XORRISOFS) -D -l -V "$(OSX_VOLNAME)" -no-pad -r -dir-mode 0755 -o $@ dist -- $(if $(SOURCE_DATE_EPOCH),-volume_date all_file_dates =$(SOURCE_DATE_EPOCH))
152+
$(XORRISOFS) -D -l -V "$(OSX_VOLNAME)" -no-pad -r -dir-mode 0755 -o $@ $(APP_DIST_DIR) -- $(if $(SOURCE_DATE_EPOCH),-volume_date all_file_dates =$(SOURCE_DATE_EPOCH))
153153

154154
$(OSX_DMG): $(OSX_TEMP_ISO)
155155
$(DMG) dmg "$<" "$@"

contrib/guix/guix-build

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -267,20 +267,20 @@ for host in $HOSTS; do
267267
make -C "${PWD}/depends" -j"$JOBS" download-"$(host_to_commonname "$host")" ${V:+V=1} ${SOURCES_PATH:+SOURCES_PATH="$SOURCES_PATH"}
268268
done
269269

270-
# Usage: outdir_for_host HOST
270+
# Usage: outdir_for_host HOST SUFFIX
271271
#
272272
# HOST: The current platform triple we're building for
273273
#
274274
outdir_for_host() {
275-
echo "${OUTDIR_BASE}/${1}"
275+
echo "${OUTDIR_BASE}/${1}${2:+-${2}}"
276276
}
277277

278-
# Usage: profiledir_for_host HOST COMMAND
278+
# Usage: profiledir_for_host HOST SUFFIX
279279
#
280280
# HOST: The current platform triple we're building for
281281
#
282282
profiledir_for_host() {
283-
echo "${PROFILES_BASE}/${2}-${1}"
283+
echo "${PROFILES_BASE}/${1}${2:+-${2}}"
284284
}
285285

286286

@@ -412,7 +412,7 @@ EOF
412412
--keep-failed \
413413
--fallback \
414414
--link-profile \
415-
--root="$(profiledir_for_host "${HOST}" build)" \
415+
--root="$(profiledir_for_host "${HOST}")" \
416416
${SUBSTITUTE_URLS:+--substitute-urls="$SUBSTITUTE_URLS"} \
417417
${ADDITIONAL_GUIX_COMMON_FLAGS} ${ADDITIONAL_GUIX_ENVIRONMENT_FLAGS} \
418418
-- env HOST="$host" \

0 commit comments

Comments
 (0)