Although the installer script will not find any officially released
binary-tar-packages for riscv64 on the guix ftp mirrors until now
we should at least support the installation of custom packed
binary bundles for this platform.
Changes to be committed:
modified: etc/guix-install.sh
Change-Id: I84c82388c7771d793b108b99e03d040bad9f1154
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
This reverts commit a7db92d9b3, this time with
the more careful command, to avoid a world rebuild:
grep -rl --exclude-dir=build --exclude-dir=patches --exclude=ld-wrapper.in \
--exclude=sitecustomize.py --exclude=guix-emacs.el maxim.cournoyer@gmail.com |
xargs sed -i 's/maxim.cournoyer@gmail.com/maxim@guixotic.coop/g'
Change-Id: I0871f5cf9ace79e34e78e24154d0da6ea95a3a91
The change was automated via:
git grep -l maxim.cournoyer@gmail.com |
xargs sed -i 's/maxim.cournoyer@gmail.com/maxim@guixotic.coop/g'
* .mailmap: New entry.
Change-Id: Iaa88b1e51c94159c49138fb43910badb990eb169
* etc/guix-install.sh (create_account): New function.
(sys_create_build_user): Use it. When ‘guix-daemon.service’ contains
“User=guix-daemon” only create the ‘guix-daemon’ user and group.
(sys_delete_build_user): Delete the ‘guix-daemon’ user and group.
(can_install_unprivileged_daemon): New function.
(sys_create_store): When installing the unprivileged daemon, change
ownership of /gnu and /var/guix, and create /var/log/guix.
(sys_authorize_build_farms): When the ‘guix-daemon’ account exists,
change ownership of /etc/guix.
Change-Id: I73e573f1cc5c0cb3794aaaa6b576616b66e0c5e9
See <https://lists.gnu.org/archive/html/bug-guix/2024-06/msg00145.html>.
Thanks to Nyi Nyi Zaw for the patch.
* etc/guix-install.sh (add_init_sys_require): Adjust value of INIT_SYS so that
it matches the potential extra required arguments array name.
Reported-by: Nyi Nyi Zaw
Reported-by: Diana Belle <garbados@gmail.com>
Change-Id: Ic41de6fba7ef37dff479728aebefaa8cb148315e
Previously, the check came after guix_get_bin. There’s no need to fetch
the rather large release archive if there’s an existing installation, so
check first. Refactor the check into a function similar to other
preflight checks.
* etc/guix-install.sh: Check for existing installation before
downloading.
Change-Id: I5506fb1cacdc88bd6355e8dfa1f690acf7886c1f
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
Add helpers to avoid repeated manual concatenation.
_err and _msg "$ERR are used interchangeably with their only difference
being output stream; convert all errors to use _err.
* etc/guix-install.sh: Add msg helpers and consolidate errors to stderr.
Change-Id: I06e97ccc50d108ed9e279ae80c6b2386d7b8c36b
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
Guix and Guix-provided software also have man pages. If the user
doesn’t install man-db via Guix, they should still be able to read
Guix-provided man pages.
* etc/guix-install.sh (sys_create_init_profile): Add to MANPATH.
Change-Id: Ibceb354012d23d24deeb39b1ec02790873396a6b
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
Make both profiles use GUIX_PROFILE and reorder some code so each
profile is handled in one contiguous block. The user’s profile now
takes precedence over the ‘guix pull’ profile on INFOPATH. If the user
already has an info reader in their Guix profile, don’t add a duplicate
entry to INFOPATH. If the user doesn’t have an imperative
~/.guix-profile (i.e. they manage software with Guix Home and ‘guix
shell’), don’t add an unnecessary entry to INFOPATH. Clean up after
ourselves by unsetting the temporary GUIX_PROFILE variable, which only
needs to be set when sourcing.
* etc/guix-install.sh (sys_create_init_profile): Improve Guix profile
sourcing.
Change-Id: Ibceb354012d23d24deeb39b1ec02790873396a6b
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
Guix Home handles its own profile initialization in ~/.profile and
documents shell setup accordingly. It does more than what is done here,
including running an on-first-login script to start a user Shepherd
instance. In general, changes and improvements to Guix Home
initialization are unlikely to propagate to the foreign distro install
script, since many Guix contributors only use Guix via Guix System and
Guix Home does not depend on system-level initialization anyway.
Avoid partially initializing Guix Home in /etc/profile.d to keep search
path variables free of redundant entries. Instead, leave a comment
directing users to the relevant manual section.
* etc/guix-install.sh (sys_create_init_profile): Remove system-level
Guix Home initialization.
Change-Id: Ib78aa0382268a789298d4980ee394d99a602a5ca
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
Since symlinks to shell completion files are installed, it is useful to remove
them during the uninstallation, especially when they point to files that are
removed by 'guix-install.sh --uninstall'.
* etc/guix-install.sh (sys_delete_shell_completion): Create.
(sys_create_shell_completion): hardcode files being installed.
(sys_customize_bashrc): call sys_delete_shell_completion.
Change-Id: I70008bb55e7e1604f0c485c798460e160af7c9e5
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
Removing users, groups or Systemd units fails if they are already absent,
causing the uninstall script to exit. The goal here is to make the uninstall
always run entirely, whatever parts are already done.
* etc/guix-install.sh (sys_delete_build_user): Test if users and groups exist
before deleting them.
(sys_delete_guix_daemon): Test if /etc/systemd/system/guix-daemon.service file
exists before removing the matching Systemd unit.
Change-Id: Ibffb1f1b39de675542fb8057af21ecaea1b53d4c
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
The `ROOT_HOME` variable is natively absent from some systems, however the form
`~root`, which is used by the install functions in this same file, works.
* etc/guix-install.sh (sys_delete_store, sys_delete_guix_daemon)
(sys_delete_user_profiles): Replace `ROOT_HOME` with `~root`.
Change-Id: Ia867e271ac4c5557d9708235fee028bccce68342
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
The file /etc/systemd/system/gnu-store.mount has permissions 664, since the
`install_unit()` function installed it so. So the test prior to removing the
matching Systemd unit should not be wether this file is executable, otherwise
it will always fail. The relevant test is on the file existence.
* etc/guix-install.sh (sys_delete_guix_daemon): Test if gnu-store.mount file
exists rather than if it is executable.
Change-Id: Ic7cc186618b0b92fccf49a3b27805756a9126b89
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
This improves the installer's ability to detect that all requirements are
present regardless of init system. It also avoids performing the requirement
check twice (printing excessively to the console) and provides a framework for
adding new init system specific requirements if it's needed in the future.
* etc/guix-install.sh (add_init_sys_require): Create.
(SYSV_INIT_REQUIRE): Create.
(main_install): Reorder installer steps so all requirements are checked in one
pass.
Change-Id: Ic541c1b90499d504642b7ab4ae595501b1a37b0d
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
On my virtual private servers running Alpine, the install script failed to
identify the init system. The virtual server is LXC based, and OpenRC
identifies itself like this:
# openrc --version
openrc (OpenRC [LXC]) 0.52.1
The regular expression failed to match it. After relaxing the check (by
removing the trailing `)' requirement) the installation went fine and I got
functional Guix installation.
* etc/guix-install.sh (chk_init_sys): Drop trailing \) from the regular
expression.
Change-Id: I5f951226341e631fb34cc6c26cfbb87656dab77a
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
Adding ~/.guix-profile/share/info to the INFOPATH env var so that when a user
does `guix install [package]` that package's info pages can be found.
* etc/guix-install.sh (sys_create_init_profile): Add
$GUIX_PROFILE/share/info to INFOPATH in ‘/etc/profile.d/zzz-guix.sh’.
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
Change-Id: I8958261c388ddee5659f0f1ce1c0c9813dc0f052
After installing Guix home on my new foreign system, the locale did not
work and GDM did not even let me to log in. After some digging around using
tty3 and tty4, I realized the GUIX_LOCPATH is not being set properly.
I had nothing installed in the ~/.guix-profile (the symlink did not even
exist) and I had glibc-locales installed in ~/.guix-home, yet GUIX_LOCPATH
contained "$HOME/.guix-profile/lib/locale:".
I believe when the code was modified from the original "home or profile" to
the current "home and profile" the || was used by accident instead of &&.
I also remove the trailing :, since it is taken care of by the ${...:+:}.
* etc/guix-install.sh (sys_create_init_profile):
Change-Id: I8a3287fe809af58aee2edc924154eecf91fa1eb8
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
This improves compatibility with (at least) Gnome based systems. On my new
Ubuntu 22.04 install the mouse cursor was broken (after I installed Guix)
until I set this.
* etc/guix-install.sh (sys_create_init_profile): Set default value for
XCURSOR_PATH.
Change-Id: I489f0307d99e4d8d82671f291c78b90c7b6dae4a
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
The aim here is to improve the user experience. There's anecdotal evidence
that the network performance for bordeaux is better compared to ci at least
for some users, and I don't know of any issues with rate limiting or access
restriction for bordeaux compared to ci. It also has IPv6 support.
Additionally, bordeaux generally had more substitutes than ci, particularly
for aarch64-linux and armhf-linux. This change will offer a very slight
speedup for those substitutes that only bordeaux has.
Bordeaux has been a default substitute server for nearly 3 years now and I
think this change is overdue. I'm also hopeful that we'll be able to build on
the testing regarding mirrors for bordeaux, and that'll allow potentially
improving the hosting setup (through providing more redundancy) and further
improving substitute fetching for users who currently have issues with
substitute access.
* config-daemon.ac: Switch substitute urls order.
* doc/guix.texi: Ditto.
* etc/guix-install.sh: Ditto.
* gnu/installer/newt/network.scm (wait-service-online): Ditto.
* guix/store.scm (%default-substitute-urls): Ditto.
Change-Id: I4f6d93ae1fc8b03d80b47b18b5749a51f1fde17b
Signed-off-by: Christopher Baines <mail@cbaines.net>
Don't clobber /dev/null permissions if units are masked.
* etc/guix-install.sh (sys_enable_guix_daemon): Factor out unit
installation. Unconditionally remove any old units. Install and enable
gnu-store.mount after guix-daemon.service.
Before this change, the "Overwriting existing installation!" would be
displayed erroneously.
* etc/guix-install.sh (sys_create_store): Fix overwrite conditional.
The need for this use case appeared when attempting to install Guix on a truly
minimal image made with Buildroot, which lacked enough GNU components that I
had to extract a guix pack to /gnu before attempting installation, which would
then refuse to proceed because of the existing /gnu.
* etc/guix-install.sh: Document environment variables.
(sys_create_store) [GUIX_ALLOW_OVERWRITE]: Skip pre-existing installation
checks and output a warning. Extract the tarball directly to /.
Fixes <https://issues.guix.gnu.org/58858>.
* etc/guix-install.sh (main): Use 6 'X' characters in the template, as this is
the minimum required by Busybox's mktemp (which matches glibc's mktemp
behavior).
Reported-by: conses <contact@conses.eu>
This started out as a bug-fix for a GUI login loop that was resulting from XDG_DATA_DIRS
not including any of the host distro's directories. The solution was to export the vari-
able (with fail-safe defaults) before source-ing GUIX_PROFILE/etc/profile. It turns out
changes have already been made to ensure that XDG_DATA_DIRS, etc. are always exported
before anything guix-specific. So, this export is no longer necessary.
For reference, the aforementioned bug was found on a Debian 11 machine and it's guix.sh
init profile for guix version 1.2.
* etc/guix-install.sh (sys_create_init_profile): Remove unnecessary
XDG_DATA_DIRS export.
Signed-off-by: 宋文武 <iyzsong@member.fsf.org>
* etc/guix-install.sh: Rename /etc/profile.d/guix.sh to zzz-guix.sh.
This script refers to environment variables set by the host distribution.
They may be set in other scripts in /etc/profile.d, which must therefore
be run first.
Example: in Ubuntu 20.04, XDG_DATA_DIRS is set in
/etc/profile.d/xdg_dirs_desktop_session.sh
Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>
Avoid printing
Press return to continue...[1666352494.051]: Starting installation…
[1666352648.869]: …
when the return itself wasn't echoed on the console.
* etc/guix-install.sh (welcome): Add a carriage return to the prompt,
so that the next line of output may overwrite it.
This doesn't affect the installation (yet), but reserves the right to
default to safe values other than ‘y’ in future.
* etc/guix-install.sh (welcome): Warn if the ‘return’ wasn't.