Skip to content

Commit 13a44ef

Browse files
Merge #6895: ci: merge bitcoin#24585, bitcoin#25549, bitcoin#26834, bitcoin#26773, bitcoin#30989, bitcoin#32498, bitcoin#32439, bitcoin#32678, bitcoin#33073, update channels, substitution servers, fix guix-check
18d9966 ci: make `guix-check` print out the set of hashes compared against (Kittywhiskers Van Gogh) 90f2581 ci: add mirrors to Bordeaux substitution server (Kittywhiskers Van Gogh) 0ae477b ci: add `berlin.guix.gnu.org` to substitute URLs list (Kittywhiskers Van Gogh) 4891135 ci: ensure that Codeberg is used as the `guix` channel (Kittywhiskers Van Gogh) 24b390d merge bitcoin#33073: warn SOURCE_DATE_EPOCH set in guix-codesign (Kittywhiskers Van Gogh) f976956 merge bitcoin#32678: warn and abort when SOURCE_DATE_EPOCH is set (Kittywhiskers Van Gogh) 2e0b209 merge bitcoin#32439: accomodate migration to codeberg (Kittywhiskers Van Gogh) a2d0e4a merge bitcoin#32498: remove Carls substitute server from Guix docs (Kittywhiskers Van Gogh) 2e0e44a merge bitcoin#30989: Drop no longer needed PATH modification (Kittywhiskers Van Gogh) 2d2f220 merge bitcoin#26773: FreeBSD build doc updates to reflect removal of install_db4.sh (Kittywhiskers Van Gogh) 12e04f5 merge bitcoin#26834: remove install_db4.sh (Kittywhiskers Van Gogh) f3f2fd3 doc: update disclaimer in `build-netbsd.md` (Kittywhiskers Van Gogh) 2ca9984 merge bitcoin#24585: mention that BDB is for the legacy wallet in build-osx.md (Kittywhiskers Van Gogh) 080d4b2 docs: remove extra Berkeley DB fragment in `build-osx.md` (Kittywhiskers Van Gogh) Pull request description: ## Motivation Annoyances from trying to build rc1 and rc2 using our Guix container ([source](https://github.com/dashpay/dash/blob/f170aed19ec399ea68ddf003a39e22be7c5d6e8e/contrib/containers/guix/Dockerfile)). ## Additional Information * Guix has migrated their service provider to Codeberg and have published a timeline for sunsetting the existing `git.savannah.gnu.org` channel ([blog](https://guix.gnu.org/en/blog/2025/migrating-to-codeberg/)). This requires updating our scripts and on the upstream side this was achieved with [bitcoin#32439](bitcoin#32439) but requires additional changes on our end as well. * As we rely on Ubuntu's distribution of Guix and staleness is a known problem (Debian no longer ships Guix with `trixie` and have flagged the `guix` package as subject to removal, [source](https://lwn.net/Articles/1035491/)), we need to set Codeberg as the channel source ourselves. * `install_db4.sh` was dropped via [bitcoin#26834](bitcoin#26834) as [bitcoin#26833](bitcoin#26833) was backported (see [dash#6735](#6735)) and the script points to the old `git.savannah.gnu.org` for sources. * Due to our run-in with nondeterminism in rc1, this pull request also includes backports to deal with some other potential sources of nondeterminism. As we're updating sources, a documentation update removing a no longer available substitution source has also been backported. * Both official Guix substitution servers are located in Europe (i.e. France and Germany), which makes the time and bandwidth intensive fetch that is inherent with a container with no persistence painfully slow for those located quite away from Europe, so, alongside addition of the German substitution server (`berlin.guix.gnu.org`), mirrors have been added to cover North America (US East) and Asia-Pacific (Singapore). * The mirrors have been sourced from LibrePlanet ([source](https://libreplanet.org/wiki/Group:Guix/Mirrors)) and per their documentation, substitutes from mirrors are signed by the builder they are mirroring, not the mirror itself and as this PR only authorises Guix's official mirrors (see below), tampering risk should be mitigated. https://github.com/dashpay/dash/blob/1ca2db9402bcf7e7352f4ee722882893d94ed856/contrib/containers/guix/Dockerfile#L55-L57 * Another annoyance, `guix-check` so far used an ad-hoc method of generating checksums that cannot be (trivially) diffed against the attested checksums provided at [`dashpay/guix.sigs`](https://github.com/dashpay/guix.sigs), by leveraging `guix-attest`'s ability to generate checksums even without a signer, we can produce the exact output an attestor would without needing to be one ([source](https://github.com/dashpay/dash/blob/f170aed19ec399ea68ddf003a39e22be7c5d6e8e/contrib/guix/guix-attest#L101-L104)). ## Breaking Changes None. ## Checklist - [x] I have performed a self-review of my own code - [x] I have commented my code, particularly in hard-to-understand areas - [x] I have added or updated relevant unit/integration/functional/e2e tests **(note: N/A)** - [x] I have made corresponding changes to the documentation - [x] I have assigned this pull request to a milestone _(for repository code-owners and collaborators only)_ ACKs for top commit: UdjinM6: ACK 18d9966 Tree-SHA512: 9964b957aacd85b7e193c3019656ea70b8987031bb6ed6189c5933b24f47346fff01a4e37ac23314f802a2084e96a91443e309d5b7b83c79940a5d3202134be2
2 parents 3e6e8f5 + 18d9966 commit 13a44ef

File tree

19 files changed

+135
-343
lines changed

19 files changed

+135
-343
lines changed

Makefile.am

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ OSX_PLIST=$(top_builddir)/share/qt/Info.plist #not installed
4141

4242
DIST_CONTRIB = \
4343
$(top_srcdir)/contrib/debian/copyright \
44-
$(top_srcdir)/contrib/install_db4.sh \
4544
$(top_srcdir)/test/sanitizer_suppressions/lsan \
4645
$(top_srcdir)/test/sanitizer_suppressions/tsan \
4746
$(top_srcdir)/test/sanitizer_suppressions/ubsan \

contrib/containers/guix/Dockerfile

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,9 @@ RUN guix_file_name=guix-binary-${guix_version}.$(uname -m)-linux.tar.xz
5252

5353
RUN touch /etc/nsswitch.conf
5454

55-
RUN guix archive --authorize < /usr/local/guix/current/share/guix/ci.guix.gnu.org.pub && \
56-
guix archive --authorize < /usr/local/guix/current/share/guix/bordeaux.guix.gnu.org.pub
55+
RUN guix archive --authorize < /usr/local/guix/current/share/guix/berlin.guix.gnu.org.pub && \
56+
guix archive --authorize < /usr/local/guix/current/share/guix/bordeaux.guix.gnu.org.pub && \
57+
guix archive --authorize < /usr/local/guix/current/share/guix/ci.guix.gnu.org.pub
5758

5859
# Build Environment Setup
5960
# https://guix.gnu.org/manual/en/html_node/Build-Environment-Setup.html
@@ -73,6 +74,9 @@ RUN groupmod -g ${GROUP_ID} ubuntu; \
7374
echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
7475

7576
# Copy required files to container
77+
COPY --chown=${USER_ID}:${GROUP_ID} \
78+
--chmod=u=rwX,go=rX \
79+
--from=docker_root ./channels.scm /home/ubuntu/.config/guix/channels.scm
7680
COPY --from=docker_root ./motd.txt /etc/motd
7781
COPY --from=docker_root ./scripts/entrypoint /usr/local/bin/entrypoint
7882
COPY --from=docker_root ./scripts/guix-check /usr/local/bin/guix-check
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
(list (channel
2+
(name 'guix)
3+
(url "https://codeberg.org/guix/guix")
4+
(branch "master")
5+
(commit
6+
"56344729cd07c76d5133047f2866237bbb08dced")
7+
(introduction
8+
(make-channel-introduction
9+
"9edb3f66fd807b096b48283debdcddccfea34bad"
10+
(openpgp-fingerprint
11+
"2A39 3FFF 68F4 EF7A 3D29 12AF 6F51 20A0 22FB B2D5")))))

contrib/containers/guix/scripts/entrypoint

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,21 @@ set -eo pipefail
55
# Read instructions
66
cat /etc/motd
77

8+
SERVERS=(
9+
# Official substitution servers
10+
https://berlin.guix.gnu.org
11+
https://bordeaux.guix.gnu.org
12+
https://ci.guix.gnu.org
13+
14+
# Mirrors of Bordeaux substitution server
15+
https://bordeaux-singapore-mirror.cbaines.net
16+
https://bordeaux-us-east-mirror.cbaines.net
17+
https://hydra-guix-129.guix.gnu.org
18+
)
19+
820
# Start the Guix daemon
9-
sudo env PATH=${PATH} guix-daemon \
10-
--build-users-group='guixbuild' \
11-
--substitute-urls='https://bordeaux.guix.gnu.org https://ci.guix.gnu.org' < /dev/null 2>&1 |
21+
sudo env PATH=${PATH} \
22+
guix-daemon --build-users-group='guixbuild' --substitute-urls="$(IFS=' '; echo "${SERVERS[*]}")" < /dev/null 2>&1 |
1223
sudo tee /var/log/guix.log > /dev/null &
1324

1425
# Hand over control

contrib/containers/guix/scripts/guix-check

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,9 @@ cd "$WORKSPACE_PATH"
1313

1414
source "contrib/guix/libexec/prelude.bash"
1515

16-
printf "\nBinaries:\n\n"
17-
( \
18-
SRC_PATH_PREFIX="${VERSION_BASE}/distsrc-" && \
19-
sha256sum ${SRC_PATH_PREFIX}*/src/dash{d,-cli,-tx,-wallet}{,.exe} && \
20-
sha256sum ${SRC_PATH_PREFIX}*/src/qt/dash-qt{,.exe} && \
21-
sha256sum ${SRC_PATH_PREFIX}*/src/test/test_dash{,.exe} \
22-
) | sort -k 2
23-
24-
printf "\nArchives:\n\n"
25-
find "${OUTDIR_BASE}" -type f | grep -v SHA256 | xargs sha256sum | sort -k 2
16+
GUIX_SIGS_REPO="$(mktemp -d)"
17+
trap 'rm -rf -- "$GUIX_SIGS_REPO"' EXIT
18+
SIGNER=dummy
19+
env GUIX_SIGS_REPO="${GUIX_SIGS_REPO}" NO_SIGN=1 SIGNER=${SIGNER} ./contrib/guix/guix-attest
20+
SHASUM_LOC="${GUIX_SIGS_REPO}/${VERSION}/${SIGNER}"
21+
cat "${SHASUM_LOC}/all.sha256sums" 2>/dev/null || cat "${SHASUM_LOC}/noncodesigned.SHA256SUMS"

contrib/guix/INSTALL.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,7 @@ Source: https://logs.guix.gnu.org/guix/2020-11-12.log#232527
319319
Start by cloning Guix:
320320

321321
```
322-
git clone https://git.savannah.gnu.org/git/guix.git
322+
git clone https://codeberg.org/guix/guix.git
323323
cd guix
324324
```
325325

@@ -607,7 +607,7 @@ checklist.
607607
```
608608
Generation 38 Feb 22 2021 16:39:31 (current)
609609
guix f350df4
610-
repository URL: https://git.savannah.gnu.org/git/guix.git
610+
repository URL: https://codeberg.org/guix/guix.git
611611
branch: version-1.2.0
612612
commit: f350df405fbcd5b9e27e6b6aa500da7f101f41e7
613613
```
@@ -760,8 +760,8 @@ Please see the following links for more details:
760760
761761
- An upstream coreutils bug has been filed: [debbugs#47940](https://debbugs.gnu.org/cgi/bugreport.cgi?bug=47940)
762762
- A Guix bug detailing the underlying problem has been filed: [guix-issues#47935](https://issues.guix.gnu.org/47935), [guix-issues#49985](https://issues.guix.gnu.org/49985#5)
763-
- A commit to skip this test in Guix has been merged into the core-updates branch:
764-
[savannah/guix@6ba1058](https://git.savannah.gnu.org/cgit/guix.git/commit/?id=6ba1058df0c4ce5611c2367531ae5c3cdc729ab4)
763+
- A commit to skip this test is included since Guix 1.4.0:
764+
[codeberg/guix@6ba1058](https://codeberg.org/guix/guix/commit/6ba1058df0c4ce5611c2367531ae5c3cdc729ab4)
765765
766766
767767
[install-script]: #options-1-and-2-using-the-official-shell-installer-script-or-binary-tarball

contrib/guix/README.md

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -364,12 +364,6 @@ Where `<PREFIX>` is likely:
364364
- `/usr/local` if you installed Guix from source and didn't supply any
365365
prefix-modifying flags to Guix's `./configure`
366366

367-
For dongcarl's substitute server at https://guix.carldong.io, run as root:
368-
369-
```sh
370-
wget -qO- 'https://guix.carldong.io/signing-key.pub' | guix archive --authorize
371-
```
372-
373367
#### Removing authorized keys
374368

375369
To remove previously authorized keys, simply edit `/etc/guix/acl` and remove the
@@ -381,28 +375,28 @@ Once its key is authorized, the official Guix build farm at
381375
https://ci.guix.gnu.org is automatically used unless the `--no-substitutes` flag
382376
is supplied. This default list of substitute servers is overridable both on a
383377
`guix-daemon` level and when you invoke `guix` commands. See examples below for
384-
the various ways of adding dongcarl's substitute server after having [authorized
385-
his signing key](#step-1-authorize-the-signing-keys).
378+
the various ways of adding a substitute server after having [authorized
379+
its signing key](#step-1-authorize-the-signing-keys).
386380

387381
Change the **default list** of substitute servers by starting `guix-daemon` with
388382
the `--substitute-urls` option (you will likely need to edit your init script):
389383

390384
```sh
391-
guix-daemon <cmd> --substitute-urls='https://guix.carldong.io https://ci.guix.gnu.org'
385+
guix-daemon <cmd> --substitute-urls='https://bordeaux.guix.gnu.org https://ci.guix.gnu.org'
392386
```
393387

394388
Override the default list of substitute servers by passing the
395389
`--substitute-urls` option for invocations of `guix` commands:
396390

397391
```sh
398-
guix <cmd> --substitute-urls='https://guix.carldong.io https://ci.guix.gnu.org'
392+
guix <cmd> --substitute-urls='https://bordeaux.guix.gnu.org https://ci.guix.gnu.org'
399393
```
400394

401395
For scripts under `./contrib/guix`, set the `SUBSTITUTE_URLS` environment
402396
variable:
403397

404398
```sh
405-
export SUBSTITUTE_URLS='https://guix.carldong.io https://ci.guix.gnu.org'
399+
export SUBSTITUTE_URLS='https://bordeaux.guix.gnu.org https://ci.guix.gnu.org'
406400
```
407401

408402
## Option 2: Disabling substitutes on an ad-hoc basis

contrib/guix/guix-build

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,12 @@ fi
6969

7070
mkdir -p "$VERSION_BASE"
7171

72+
################
73+
# SOURCE_DATE_EPOCH should not unintentionally be set
74+
################
75+
76+
check_source_date_epoch
77+
7278
################
7379
# Build directories should not exist
7480
################

contrib/guix/guix-codesign

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,12 @@ EOF
6767
exit 1
6868
fi
6969

70+
################
71+
# SOURCE_DATE_EPOCH should not unintentionally be set
72+
################
73+
74+
check_source_date_epoch
75+
7076
################
7177
# The codesignature git worktree should not be dirty
7278
################

contrib/guix/libexec/build.sh

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -238,8 +238,6 @@ case "$HOST" in
238238
*mingw*) HOST_LDFLAGS="-Wl,--no-insert-timestamp" ;;
239239
esac
240240

241-
# Make $HOST-specific native binaries from depends available in $PATH
242-
export PATH="${BASEPREFIX}/${HOST}/native/bin:${PATH}"
243241
mkdir -p "$DISTSRC"
244242
(
245243
cd "$DISTSRC"

0 commit comments

Comments
 (0)