Skip to content

Commit 6fde676

Browse files
committed
Merge #16669: build: use new fork of osslsigncode for windows gitian signing
feb5075 build: use osslsigncode 2.0 in gitian (fanquake) Pull request description: The original osslsigncode project, https://sourceforge.net/projects/osslsigncode, has been marked as abandonware: > This is now - and has been for a long while - abandonware. Feel free to create your own forks etc.". However, a fork has emerged, https://github.com/mtrojnar/osslsigncode, that has incorporated theuni's patches ([add the -pem option in extract-signature mode ](mtrojnar/osslsigncode@36715c1) & [add the attach-signature command](mtrojnar/osslsigncode@3be7eb1)) as well as updated the tool to work with OpenSSL 1.1 and other improvements. This commit switches the windows signer descriptor to use this new version of `osslsigncode`. I've tested using this new version of `osslsigncode` while doing a 0.18.1 gitian build, and it "seems" to work. However this needs a look over from Cory, to check if the tool is still compatible with his usage in the [`detached-sig-create.sh`](https://github.com/bitcoin/bitcoin/blob/master/contrib/windeploy/detached-sig-create.sh) script, as well as some review of the changes to `osslsigncode` itself. Hence WIP and chasing Concept ACKs / NACKs. ACKs for top commit: MarcoFalke: Concept ACK feb5075 given that this upstream is now used in Ubuntu and Debian laanwj: ACK feb5075 Tree-SHA512: c48de6dc32751d96dd04b920bfacca40af47a2883330ba0700371d56c580a7e45cedd8d8a913709d56be036762b63cb1825a98cff7aa77b6d7804fab11220850
2 parents ca1eeba + feb5075 commit 6fde676

File tree

3 files changed

+12
-17
lines changed

3 files changed

+12
-17
lines changed

contrib/gitian-build.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,8 @@ def build():
5151
os.chdir('gitian-builder')
5252
os.makedirs('inputs', exist_ok=True)
5353

54-
subprocess.check_call(['wget', '-N', '-P', 'inputs', 'https://downloads.sourceforge.net/project/osslsigncode/osslsigncode/osslsigncode-1.7.1.tar.gz'])
55-
subprocess.check_call(['wget', '-N', '-P', 'inputs', 'https://bitcoincore.org/cfields/osslsigncode-Backports-to-1.7.1.patch'])
56-
subprocess.check_call(["echo 'a8c4e9cafba922f89de0df1f2152e7be286aba73f78505169bc351a7938dd911 inputs/osslsigncode-Backports-to-1.7.1.patch' | sha256sum -c"], shell=True)
57-
subprocess.check_call(["echo 'f9a8cdb38b9c309326764ebc937cba1523a3a751a7ab05df3ecc99d18ae466c9 inputs/osslsigncode-1.7.1.tar.gz' | sha256sum -c"], shell=True)
54+
subprocess.check_call(['wget', '-O' 'osslsigncode-2.0.tar.gz' '-N', '-P', 'inputs', 'https://github.com/mtrojnar/osslsigncode/archive/2.0.tar.gz'])
55+
subprocess.check_call(["echo '5a60e0a4b3e0b4d655317b2f12a810211c50242138322b16e7e01c6fbb89d92f inputs/osslsigncode-2.0.tar.gz' | sha256sum -c"], shell=True)
5856
subprocess.check_call(['make', '-C', '../bitcoin/depends', 'download', 'SOURCES_PATH=' + os.getcwd() + '/cache/common'])
5957

6058
if args.linux:

contrib/gitian-descriptors/gitian-win-signer.yml

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,15 @@ suites:
66
architectures:
77
- "linux64"
88
packages:
9-
# Once osslsigncode supports openssl 1.1, we can change this back to libssl-dev
10-
- "libssl1.0-dev"
9+
- "libssl-dev"
1110
- "autoconf"
11+
- "libtool"
12+
- "pkg-config"
1213
remotes:
1314
- "url": "https://github.com/bitcoin-core/bitcoin-detached-sigs.git"
1415
"dir": "signature"
1516
files:
16-
- "osslsigncode-1.7.1.tar.gz"
17-
- "osslsigncode-Backports-to-1.7.1.patch"
17+
- "osslsigncode-2.0.tar.gz"
1818
- "bitcoin-win-unsigned.tar.gz"
1919
script: |
2020
set -e -o pipefail
@@ -23,16 +23,15 @@ script: |
2323
SIGDIR=${BUILD_DIR}/signature/win
2424
UNSIGNED_DIR=${BUILD_DIR}/unsigned
2525
26-
echo "f9a8cdb38b9c309326764ebc937cba1523a3a751a7ab05df3ecc99d18ae466c9 osslsigncode-1.7.1.tar.gz" | sha256sum -c
27-
echo "a8c4e9cafba922f89de0df1f2152e7be286aba73f78505169bc351a7938dd911 osslsigncode-Backports-to-1.7.1.patch" | sha256sum -c
26+
echo "5a60e0a4b3e0b4d655317b2f12a810211c50242138322b16e7e01c6fbb89d92f osslsigncode-2.0.tar.gz" | sha256sum -c
2827
2928
mkdir -p ${UNSIGNED_DIR}
3029
tar -C ${UNSIGNED_DIR} -xf bitcoin-win-unsigned.tar.gz
3130
32-
tar xf osslsigncode-1.7.1.tar.gz
33-
cd osslsigncode-1.7.1
34-
patch -p1 < ${BUILD_DIR}/osslsigncode-Backports-to-1.7.1.patch
31+
tar xf osslsigncode-2.0.tar.gz
32+
cd osslsigncode-2.0
3533
34+
./autogen.sh
3635
./configure --without-gsf --without-curl --disable-dependency-tracking
3736
make
3837
find ${UNSIGNED_DIR} -name "*-unsigned.exe" | while read i; do

doc/release-process.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -116,10 +116,8 @@ Ensure gitian-builder is up-to-date:
116116

117117
pushd ./gitian-builder
118118
mkdir -p inputs
119-
wget -P inputs https://bitcoincore.org/cfields/osslsigncode-Backports-to-1.7.1.patch
120-
echo 'a8c4e9cafba922f89de0df1f2152e7be286aba73f78505169bc351a7938dd911 inputs/osslsigncode-Backports-to-1.7.1.patch' | sha256sum -c
121-
wget -P inputs https://downloads.sourceforge.net/project/osslsigncode/osslsigncode/osslsigncode-1.7.1.tar.gz
122-
echo 'f9a8cdb38b9c309326764ebc937cba1523a3a751a7ab05df3ecc99d18ae466c9 inputs/osslsigncode-1.7.1.tar.gz' | sha256sum -c
119+
wget -O osslsigncode-2.0.tar.gz -P inputs https://github.com/mtrojnar/osslsigncode/archive/2.0.tar.gz
120+
echo '5a60e0a4b3e0b4d655317b2f12a810211c50242138322b16e7e01c6fbb89d92f inputs/osslsigncode-2.0.tar.gz' | sha256sum -c
123121
popd
124122

125123
Create the macOS SDK tarball, see the [macOS build instructions](build-osx.md#deterministic-macos-dmg-notes) for details, and copy it into the inputs directory.

0 commit comments

Comments
 (0)