Skip to content

Commit 90b3e48

Browse files
committed
release: Release with separate SHA256SUMS and sig files
This allows us to remove the rfc4880 EOL hacks and release with a SHA256SUMS.asc file that's a combination of all signer signatures.
1 parent b620b2d commit 90b3e48

File tree

2 files changed

+6
-33
lines changed

2 files changed

+6
-33
lines changed

contrib/guix/guix-attest

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -159,20 +159,6 @@ Hint: You may wish to remove the existing attestations and their signatures by
159159
EOF
160160
}
161161

162-
# Given a document with unix line endings (just <LF>) in stdin, make all lines
163-
# end in <CR><LF> and make sure there's no trailing <LF> at the end of the file.
164-
#
165-
# This is necessary as cleartext signatures are calculated on text after their
166-
# line endings are canonicalized.
167-
#
168-
# For more information:
169-
# 1. https://security.stackexchange.com/a/104261
170-
# 2. https://datatracker.ietf.org/doc/html/rfc4880#section-7.1
171-
#
172-
rfc4880_normalize_document() {
173-
sed 's/$/\r/' | head -c -2
174-
}
175-
176162
echo "Attesting to build outputs for version: '${VERSION}'"
177163
echo ""
178164

@@ -188,7 +174,6 @@ mkdir -p "$outsigdir"
188174
cat "${noncodesigned_fragments[@]}" \
189175
| sort -u \
190176
| sort -k2 \
191-
| rfc4880_normalize_document \
192177
> "$temp_noncodesigned"
193178
if [ -e noncodesigned.SHA256SUMS ]; then
194179
# The SHA256SUMS already exists, make sure it's exactly what we
@@ -216,7 +201,6 @@ mkdir -p "$outsigdir"
216201
cat "${sha256sum_fragments[@]}" \
217202
| sort -u \
218203
| sort -k2 \
219-
| rfc4880_normalize_document \
220204
> "$temp_all"
221205
if [ -e all.SHA256SUMS ]; then
222206
# The SHA256SUMS already exists, make sure it's exactly what we

doc/release-process.md

Lines changed: 6 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -199,26 +199,13 @@ popd
199199

200200
### After 3 or more people have guix-built and their results match:
201201

202-
Combine `all.SHA256SUMS` and `all.SHA256SUMS.asc` into a clear-signed
203-
`SHA256SUMS.asc` message:
204-
205-
```sh
206-
echo -e "-----BEGIN PGP SIGNED MESSAGE-----\nHash: SHA256\n\n$(cat all.SHA256SUMS)\n$(cat filename.txt.asc)" > SHA256SUMS.asc
207-
```
208-
209-
Here's an equivalent, more readable command if you're confident that you won't
210-
mess up whitespaces when copy-pasting:
202+
Combine the `all.SHA256SUMS.asc` file from all signers into `SHA256SUMS.asc`:
211203

212204
```bash
213-
cat << EOF > SHA256SUMS.asc
214-
-----BEGIN PGP SIGNED MESSAGE-----
215-
Hash: SHA256
216-
217-
$(cat all.SHA256SUMS)
218-
$(cat all.SHA256SUMS.asc)
219-
EOF
205+
cat "$VERSION"/*/all.SHA256SUMS.asc > SHA256SUMS.asc
220206
```
221207

208+
222209
- Upload to the bitcoincore.org server (`/var/www/bin/bitcoin-core-${VERSION}`):
223210
1. The contents of `./bitcoin/guix-build-${VERSION}/output`, except for
224211
`*-debug*` files.
@@ -230,7 +217,9 @@ EOF
230217
as save storage space *do not upload these to the bitcoincore.org server,
231218
nor put them in the torrent*.
232219

233-
2. The combined clear-signed message you just created `SHA256SUMS.asc`
220+
2. The `SHA256SUMS` file
221+
222+
3. The `SHA256SUMS.asc` combined signature file you just created
234223

235224
- Create a torrent of the `/var/www/bin/bitcoin-core-${VERSION}` directory such
236225
that at the top level there is only one file: the `bitcoin-core-${VERSION}`

0 commit comments

Comments
 (0)