Merge bitcoin/bitcoin#32735: [28.x] More backports

2437d93989 doc: update 28.x release notes (fanquake)
a6aca67214 build: patch cmake min version on freetype (josibake)
9082498589 contrib: Sign all Windows binaries too (Ava Chow)

Pull request description:

  This backports
  * 3656b828dc - Which was missed in #32563, see https://github.com/bitcoin/bitcoin/pull/32563#issuecomment-2960237938.
  * #32693

ACKs for top commit:
  willcl-ark:
    ACK 2437d93989

Tree-SHA512: 3fcc04f22355372fd34581c068c3a02c2b19543f4a2a9058953b6f60debb36a597d74405decbe8451291431aa5bab2060f4545b9f6c1e3b0a8cc3e8aca17fdc5
This commit is contained in:
merge-script
2025-06-17 13:11:33 +01:00
5 changed files with 39 additions and 9 deletions

View File

@@ -8,9 +8,9 @@ if [ -z "$OSSLSIGNCODE" ]; then
OSSLSIGNCODE=osslsigncode
fi
if [ -z "$1" ]; then
echo "usage: $0 <osslcodesign args>"
echo "example: $0 -key codesign.key"
if [ "$#" -ne 1 ]; then
echo "usage: $0 <path to key>"
echo "example: $0 codesign.key"
exit 1
fi
@@ -22,12 +22,22 @@ OUTSUBDIR="${OUTDIR}/win"
TIMESERVER=http://timestamp.comodoca.com
CERTFILE="win-codesign.cert"
stty -echo
printf "Enter the passphrase for %s: " "$1"
read cs_key_pass
printf "\n"
stty echo
mkdir -p "${OUTSUBDIR}"
# shellcheck disable=SC2046
basename -a $(ls -1 "${SRCDIR}"/*-unsigned.exe) | while read UNSIGNED; do
echo Signing "${UNSIGNED}"
"${OSSLSIGNCODE}" sign -certs "${CERTFILE}" -t "${TIMESERVER}" -h sha256 -in "${SRCDIR}/${UNSIGNED}" -out "${WORKDIR}/${UNSIGNED}" "$@"
"${OSSLSIGNCODE}" extract-signature -pem -in "${WORKDIR}/${UNSIGNED}" -out "${OUTSUBDIR}/${UNSIGNED}.pem" && rm "${WORKDIR}/${UNSIGNED}"
find ${SRCDIR} -wholename "*.exe" -type f -exec realpath --relative-to=. {} \; | while read -r bin
do
echo Signing "${bin}"
bin_base="$(realpath --relative-to=${SRCDIR} "${bin}")"
mkdir -p "$(dirname ${WORKDIR}/"${bin_base}")"
"${OSSLSIGNCODE}" sign -certs "${CERTFILE}" -t "${TIMESERVER}" -h sha256 -in "${bin}" -out "${WORKDIR}/${bin_base}" -key "$1" -pass "${cs_key_pass}"
mkdir -p "$(dirname ${OUTSUBDIR}/"${bin_base}")"
"${OSSLSIGNCODE}" extract-signature -pem -in "${WORKDIR}/${bin_base}" -out "${OUTSUBDIR}/${bin_base}.pem" && rm "${WORKDIR}/${bin_base}"
done
rm -f "${OUT}"

View File

@@ -4,6 +4,7 @@ $(package)_download_path=https://download.savannah.gnu.org/releases/$(package)
$(package)_file_name=$(package)-$($(package)_version).tar.xz
$(package)_sha256_hash=8bee39bd3968c4804b70614a0a3ad597299ad0e824bc8aad5ce8aaf48067bde7
$(package)_build_subdir=build
$(package)_patches += cmake_minimum.patch
define $(package)_set_vars
$(package)_config_opts := -DCMAKE_BUILD_TYPE=None -DBUILD_SHARED_LIBS=TRUE
@@ -12,6 +13,10 @@ define $(package)_set_vars
$(package)_config_opts += -DCMAKE_DISABLE_FIND_PACKAGE_BrotliDec=TRUE
endef
define $(package)_preprocess_cmds
patch -p1 < $($(package)_patch_dir)/cmake_minimum.patch
endef
define $(package)_config_cmds
$($(package)_cmake) -S .. -B .
endef

View File

@@ -0,0 +1,13 @@
build: set minimum required CMake to 3.12
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -97,7 +97,7 @@
# FreeType explicitly marks the API to be exported and relies on the compiler
# to hide all other symbols. CMake supports a C_VISBILITY_PRESET property
# starting with 2.8.12.
-cmake_minimum_required(VERSION 2.8.12)
+cmake_minimum_required(VERSION 3.12)
if (NOT CMAKE_VERSION VERSION_LESS 3.3)
# Allow symbol visibility settings also on static libraries. CMake < 3.3

View File

@@ -45,6 +45,7 @@ Notable changes
- #32070 build: use make < 3.82 syntax for define directive
- #32439 guix: accomodate migration to codeberg
- #32568 depends: use "mkdir -p" when installing xproto
- #32693 depends: fix cmake compatibility error for freetype
### Test
@@ -72,6 +73,7 @@ Credits
- Brandon Odiwuor
- fanquake
- Hennadii Stepanov
- josibake
- kehiy
- MarcoFalke
- Sjors Provoost

View File

@@ -174,7 +174,7 @@ In the `guix-build-${VERSION}/output/x86_64-apple-darwin` and `guix-build-${VERS
In the `guix-build-${VERSION}/output/x86_64-w64-mingw32` directory:
tar xf bitcoin-${VERSION}-win64-codesigning.tar.gz
./detached-sig-create.sh -key /path/to/codesign.key
./detached-sig-create.sh /path/to/codesign.key
Enter the passphrase for the key when prompted
signature-win.tar.gz will be created