From 01ae5b37a628c6cc2792f9bddeb7268155da3405 Mon Sep 17 00:00:00 2001 From: pasta Date: Wed, 15 Nov 2023 20:34:08 -0600 Subject: [PATCH 1/5] guix: make osx_debug --- contrib/guix/libexec/build.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/contrib/guix/libexec/build.sh b/contrib/guix/libexec/build.sh index 060cf79cf8bea..7d6ec6de88705 100644 --- a/contrib/guix/libexec/build.sh +++ b/contrib/guix/libexec/build.sh @@ -299,6 +299,9 @@ mkdir -p "$DISTSRC" *mingw*) make deploy ${V:+V=1} BITCOIN_WIN_INSTALLER="${OUTDIR}/${DISTNAME}-win64-setup-unsigned.exe" ;; + *darwin*) + make -C src/ osx_debug --jobs="$JOBS" + ;; esac # Setup the directory where our Dash Core build for HOST will be From b7acea6fb38c38570ba84b6511a19b151657fa81 Mon Sep 17 00:00:00 2001 From: pasta Date: Wed, 15 Nov 2023 21:04:14 -0600 Subject: [PATCH 2/5] guix: make osx_debug; split out debug archives --- contrib/guix/libexec/build.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/contrib/guix/libexec/build.sh b/contrib/guix/libexec/build.sh index 7d6ec6de88705..d7718daf5ed6c 100644 --- a/contrib/guix/libexec/build.sh +++ b/contrib/guix/libexec/build.sh @@ -406,11 +406,16 @@ mkdir -p "$DISTSRC" || ( rm -f "${OUTDIR}/${DISTNAME}-${HOST}-debug.tar.gz" && exit 1 ) ;; *darwin*) - find "${DISTNAME}" -print0 \ + find "${DISTNAME}" -not -name "*.dSYM" -print0 \ | sort --zero-terminated \ | tar --create --no-recursion --mode='u+rw,go+r-w,a+X' --null --files-from=- \ | gzip -9n > "${OUTDIR}/${DISTNAME}-${HOST}.tar.gz" \ || ( rm -f "${OUTDIR}/${DISTNAME}-${HOST}.tar.gz" && exit 1 ) + find "${DISTNAME}" -name "*.dSYM" -print0 \ + | sort --zero-terminated \ + | tar --create --no-recursion --mode='u+rw,go+r-w,a+X' --null --files-from=- \ + | gzip -9n > "${OUTDIR}/${DISTNAME}-${HOST}-debug.tar.gz" \ + || ( rm -f "${OUTDIR}/${DISTNAME}-${HOST}-debug.tar.gz" && exit 1 ) ;; esac ) # $DISTSRC/installed From 8811c66f24214afbb7b94ee9d8f03b8122424eb0 Mon Sep 17 00:00:00 2001 From: UdjinM6 Date: Thu, 16 Nov 2023 13:29:41 +0300 Subject: [PATCH 3/5] fixes --- contrib/guix/libexec/build.sh | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/contrib/guix/libexec/build.sh b/contrib/guix/libexec/build.sh index d7718daf5ed6c..059c038ecdcf3 100644 --- a/contrib/guix/libexec/build.sh +++ b/contrib/guix/libexec/build.sh @@ -285,6 +285,9 @@ mkdir -p "$DISTSRC" # Build Dash Core make --jobs="$JOBS" ${V:+V=1} + # Create dSYM-s for macos + make -C src osx_debug + # Check that symbol/security checks tools are sane. make test-security-check ${V:+V=1} # Perform basic security checks on a series of executables. @@ -299,9 +302,6 @@ mkdir -p "$DISTSRC" *mingw*) make deploy ${V:+V=1} BITCOIN_WIN_INSTALLER="${OUTDIR}/${DISTNAME}-win64-setup-unsigned.exe" ;; - *darwin*) - make -C src/ osx_debug --jobs="$JOBS" - ;; esac # Setup the directory where our Dash Core build for HOST will be @@ -357,7 +357,10 @@ mkdir -p "$DISTSRC" rm -rf "${DISTNAME}/lib/pkgconfig" case "$HOST" in - *darwin*) ;; + *darwin*) + # Copy dSYM-s + find ../src -name "*.dSYM" -exec cp -ra {} "${DISTNAME}/bin" \; + ;; *) # Split binaries and libraries from their debug symbols { @@ -406,12 +409,12 @@ mkdir -p "$DISTSRC" || ( rm -f "${OUTDIR}/${DISTNAME}-${HOST}-debug.tar.gz" && exit 1 ) ;; *darwin*) - find "${DISTNAME}" -not -name "*.dSYM" -print0 \ + find "${DISTNAME}" -not -path "*.dSYM*" -print0 \ | sort --zero-terminated \ | tar --create --no-recursion --mode='u+rw,go+r-w,a+X' --null --files-from=- \ | gzip -9n > "${OUTDIR}/${DISTNAME}-${HOST}.tar.gz" \ || ( rm -f "${OUTDIR}/${DISTNAME}-${HOST}.tar.gz" && exit 1 ) - find "${DISTNAME}" -name "*.dSYM" -print0 \ + find "${DISTNAME}" -path "*.dSYM*" -print0 \ | sort --zero-terminated \ | tar --create --no-recursion --mode='u+rw,go+r-w,a+X' --null --files-from=- \ | gzip -9n > "${OUTDIR}/${DISTNAME}-${HOST}-debug.tar.gz" \ From 73bc1b94ee94d663df43c981b876e201061dccd4 Mon Sep 17 00:00:00 2001 From: UdjinM6 Date: Thu, 16 Nov 2023 13:30:49 +0300 Subject: [PATCH 4/5] guix: do not strip macos binaries --- contrib/guix/libexec/build.sh | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/contrib/guix/libexec/build.sh b/contrib/guix/libexec/build.sh index 059c038ecdcf3..0b5e23643025d 100644 --- a/contrib/guix/libexec/build.sh +++ b/contrib/guix/libexec/build.sh @@ -310,14 +310,7 @@ mkdir -p "$DISTSRC" INSTALLPATH="${PWD}/installed/${DISTNAME}" mkdir -p "${INSTALLPATH}" # Install built Dash Core to $INSTALLPATH - case "$HOST" in - *darwin*) - make install-strip DESTDIR="${INSTALLPATH}" ${V:+V=1} - ;; - *) - make install DESTDIR="${INSTALLPATH}" ${V:+V=1} - ;; - esac + make install DESTDIR="${INSTALLPATH}" ${V:+V=1} case "$HOST" in *darwin*) From 17ab193504dae1d10f3486dd759b92d5f9acd5ae Mon Sep 17 00:00:00 2001 From: pasta Date: Thu, 16 Nov 2023 12:01:07 -0600 Subject: [PATCH 5/5] only call osx_debug for darwin --- contrib/guix/libexec/build.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/contrib/guix/libexec/build.sh b/contrib/guix/libexec/build.sh index 0b5e23643025d..6f43e715fd5ff 100644 --- a/contrib/guix/libexec/build.sh +++ b/contrib/guix/libexec/build.sh @@ -285,8 +285,12 @@ mkdir -p "$DISTSRC" # Build Dash Core make --jobs="$JOBS" ${V:+V=1} - # Create dSYM-s for macos - make -C src osx_debug + # Make macos-specific debug symbols + case "$HOST" in + *darwin*) + make -C src/ osx_debug + ;; + esac # Check that symbol/security checks tools are sane. make test-security-check ${V:+V=1}