Skip to content

Commit 3259976

Browse files
committed
Merge bitcoin/bitcoin#26335: Guix documentation improvements
10660c0 doc: move Guix uninstall instructions to INSTALL.md (Sjors Provoost) 68fab72 guix: OpenSSL test failure workaround (Sjors Provoost) d612dca guix: reminder to migrate guix-daemon-original customization (Sjors Provoost) 8aa460c guix: add guile-gnutls and guile-json to install list (Sjors Provoost) 9b9991e guix: recommend mounting a tmpfs on /tmp (Sjors Provoost) 6822834 guix: bump recommended hash for manual installation (Sjors Provoost) Pull request description: I'm manually installing Guix on a fresh Ubuntu machine. Will be pushing more documentation fixes to this PR as I run into things. 1. Bump minimum hash to match time-machine bump in #25099. It's not necessary for the root Guix version to match the time-machine version in our build, because `guix build` will automatically perform an upgrade for the user, but imo it's better to get any build issues (in Guix itself) over with while the user is going though `INSTALL.md`, rather than during their first Guix build (of Bitcoin Core). 2. Recommend mapping a tmpfs to /tmp upfront, rather than in the troubleshooting section 3. Add `guile-gnutls` and `guile-json` to the table of stuff to install (avoids having to find out in the `./configure` phase) 4. Improve systemd doc 5. Workaround OpenSSL v1.1.1l and v1.1.1n test failure (change machine time) 6. Move uninstallation instructions to INSTALL.md, drop unused footnote / links ACKs for top commit: jamesob: ACK bitcoin/bitcoin@10660c0 Tree-SHA512: ff1278b16f03ea9c63e23e97a852340ab824d5f6c64645cb70237dd828b9a439b4133b60cd2b89672573f6546e99419021d092e236f731908158a7aa6473b0ef
2 parents 93cae70 + 10660c0 commit 3259976

File tree

2 files changed

+62
-53
lines changed

2 files changed

+62
-53
lines changed

contrib/guix/INSTALL.md

Lines changed: 62 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,10 @@ For reference, the graphic below outlines Guix v1.3.0's dependency graph:
167167

168168
![bootstrap map](https://user-images.githubusercontent.com/6399679/125064185-a9a59880-e0b0-11eb-82c1-9b8e5dc9950d.png)
169169

170+
#### Consider /tmp on tmpfs
171+
172+
If you use an NVME (SSD) drive, you may encounter [cryptic build errors](#coreutils-fail-teststail-2inotify-dir-recreate). Mounting a [tmpfs at /tmp](https://ubuntu.com/blog/data-driven-analysis-tmp-on-tmpfs) should prevent this and may improve performance as a bonus.
173+
170174
#### Guile
171175

172176
##### Choosing a Guile version and sticking to it
@@ -334,6 +338,8 @@ packages in Debian at the time of writing.
334338
|-----------------------|---------------------|
335339
| guile-gcrypt | libgcrypt-dev |
336340
| guile-git | libgit2-dev |
341+
| guile-gnutls | (none) |
342+
| guile-json | (none) |
337343
| guile-lzlib | liblz-dev |
338344
| guile-ssh | libssh-dev |
339345
| guile-sqlite3 | libsqlite3-dev |
@@ -384,8 +390,9 @@ cd guix
384390
```
385391

386392
You will likely want to build the latest release, however, if the latest release
387-
when you're reading this is still 1.2.0 then you may want to use 95aca29 instead
388-
to avoid a problem in the GnuTLS test suite.
393+
when you're reading this is still 1.3.0 then you may want to use 998eda30 instead
394+
to avoid the issues described in [#25099](
395+
https://github.com/bitcoin/bitcoin/pull/25099).
389396

390397
```
391398
git branch -a -l 'origin/version-*' # check for the latest release
@@ -609,6 +616,8 @@ systemctl enable guix-daemon
609616
systemctl start guix-daemon
610617
```
611618
619+
Remember to set `--no-substitute` in `$libdir/systemd/system/guix-daemon.service` and other customizations if you used them for `guix-daemon-original.service`.
620+
612621
##### If you installed Guix via the Debian/Ubuntu distribution packages
613622
614623
You will need to create a `guix-daemon-latest` service which points to the new
@@ -717,6 +726,19 @@ $ bzcat /var/log/guix/drvs/../...-foo-3.6.12.drv.bz2 | less
717726
times, it may be `/tmp/...drv-1` or `/tmp/...drv-2`. Always consult the build
718727
failure output for the most accurate, up-to-date information.
719728
729+
### openssl-1.1.1l and openssl-1.1.1n
730+
731+
OpenSSL includes tests that will fail once some certificate has expired. A workaround
732+
is to change your system clock:
733+
734+
```sh
735+
sudo timedatectl set-ntp no
736+
sudo date --set "28 may 2022 15:00:00"
737+
sudo --login guix build --cores=1 /gnu/store/g9alz81w4q03ncm542487xd001s6akd4-openssl-1.1.1l.drv
738+
sudo --login guix build --cores=1 /gnu/store/mw6ax0gk33gh082anrdrxp2flrbskxv6-openssl-1.1.1n.drv
739+
sudo timedatectl set-ntp yes
740+
```
741+
720742
### python(-minimal): [Errno 84] Invalid or incomplete multibyte or wide character
721743
722744
This error occurs when your `$TMPDIR` (default: /tmp) exists on a filesystem
@@ -774,15 +796,15 @@ The inotify-dir-create test fails on "remote" filesystems such as overlayfs
774796
as non-remote.
775797
776798
A relatively easy workaround to this is to make sure that a somewhat traditional
777-
filesystem is mounted at `/tmp` (where `guix-daemon` performs its builds). For
799+
filesystem is mounted at `/tmp` (where `guix-daemon` performs its builds), see [/tmp on tmpfs](#consider-tmp-on-tmpfs). For
778800
Docker users, this might mean [using a volume][docker/volumes], [binding
779801
mounting][docker/bind-mnt] from host, or (for those with enough RAM and swap)
780802
[mounting a tmpfs][docker/tmpfs] using the `--tmpfs` flag.
781803
782804
Please see the following links for more details:
783805
784806
- An upstream coreutils bug has been filed: [debbugs#47940](https://debbugs.gnu.org/cgi/bugreport.cgi?bug=47940)
785-
- A Guix bug detailing the underlying problem has been filed: [guix-issues#47935](https://issues.guix.gnu.org/47935)
807+
- 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)
786808
- A commit to skip this test in Guix has been merged into the core-updates branch:
787809
[savannah/guix@6ba1058](https://git.savannah.gnu.org/cgit/guix.git/commit/?id=6ba1058df0c4ce5611c2367531ae5c3cdc729ab4)
788810
@@ -799,3 +821,39 @@ Please see the following links for more details:
799821
[docker/volumes]: https://docs.docker.com/storage/volumes/
800822
[docker/bind-mnt]: https://docs.docker.com/storage/bind-mounts/
801823
[docker/tmpfs]: https://docs.docker.com/storage/tmpfs/
824+
825+
# Purging/Uninstalling Guix
826+
827+
In the extraordinarily rare case where you messed up your Guix installation in
828+
an irreversible way, you may want to completely purge Guix from your system and
829+
start over.
830+
831+
1. Uninstall Guix itself according to the way you installed it (e.g. `sudo apt
832+
purge guix` for Ubuntu packaging, `sudo make uninstall` for a build from source).
833+
2. Remove all build users and groups
834+
835+
You may check for relevant users and groups using:
836+
837+
```
838+
getent passwd | grep guix
839+
getent group | grep guix
840+
```
841+
842+
Then, you may remove users and groups using:
843+
844+
```
845+
sudo userdel <user>
846+
sudo groupdel <group>
847+
```
848+
849+
3. Remove all possible Guix-related directories
850+
- `/var/guix/`
851+
- `/var/log/guix/`
852+
- `/gnu/`
853+
- `/etc/guix/`
854+
- `/home/*/.config/guix/`
855+
- `/home/*/.cache/guix/`
856+
- `/home/*/.guix-profile/`
857+
- `/root/.config/guix/`
858+
- `/root/.cache/guix/`
859+
- `/root/.guix-profile/`

contrib/guix/README.md

Lines changed: 0 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -430,55 +430,6 @@ used.
430430
If you start `guix-daemon` using an init script, you can edit said script to
431431
supply this flag.
432432

433-
434-
# Purging/Uninstalling Guix
435-
436-
In the extraordinarily rare case where you messed up your Guix installation in
437-
an irreversible way, you may want to completely purge Guix from your system and
438-
start over.
439-
440-
1. Uninstall Guix itself according to the way you installed it (e.g. `sudo apt
441-
purge guix` for Ubuntu packaging, `sudo make uninstall` for a build from source).
442-
2. Remove all build users and groups
443-
444-
You may check for relevant users and groups using:
445-
446-
```
447-
getent passwd | grep guix
448-
getent group | grep guix
449-
```
450-
451-
Then, you may remove users and groups using:
452-
453-
```
454-
sudo userdel <user>
455-
sudo groupdel <group>
456-
```
457-
458-
3. Remove all possible Guix-related directories
459-
- `/var/guix/`
460-
- `/var/log/guix/`
461-
- `/gnu/`
462-
- `/etc/guix/`
463-
- `/home/*/.config/guix/`
464-
- `/home/*/.cache/guix/`
465-
- `/home/*/.guix-profile/`
466-
- `/root/.config/guix/`
467-
- `/root/.cache/guix/`
468-
- `/root/.guix-profile/`
469-
470433
[b17e]: https://bootstrappable.org/
471434
[r12e/source-date-epoch]: https://reproducible-builds.org/docs/source-date-epoch/
472-
473-
[guix/install.sh]: https://git.savannah.gnu.org/cgit/guix.git/plain/etc/guix-install.sh
474-
[guix/bin-install]: https://www.gnu.org/software/guix/manual/en/html_node/Binary-Installation.html
475-
[guix/env-setup]: https://www.gnu.org/software/guix/manual/en/html_node/Build-Environment-Setup.html
476-
[guix/substitutes]: https://www.gnu.org/software/guix/manual/en/html_node/Substitutes.html
477-
[guix/substitute-server-auth]: https://www.gnu.org/software/guix/manual/en/html_node/Substitute-Server-Authorization.html
478-
[guix/time-machine]: https://guix.gnu.org/manual/en/html_node/Invoking-guix-time_002dmachine.html
479-
480-
[debian/guix-bullseye]: https://packages.debian.org/bullseye/guix
481-
[ubuntu/guix-hirsute]: https://packages.ubuntu.com/hirsute/guix
482-
[fanquake/guix-docker]: https://github.com/fanquake/core-review/tree/master/guix
483-
484435
[env-vars-list]: #recognized-environment-variables

0 commit comments

Comments
 (0)