[PATCH 0/2] Some fixes for guix-install.sh

  • Done
  • quality assurance status badge
Details
2 participants
  • Ludovic Courtès
  • Tomas Volf
Owner
unassigned
Submitted by
Tomas Volf
Severity
normal
T
T
Tomas Volf wrote on 5 Apr 19:04 +0200
(address . guix-patches@gnu.org)(name . Tomas Volf)(address . ~@wolfsden.cz)
cover.1712336516.git.~@wolfsden.cz
This week I had to install Ubuntu 22.04 (corporate policy, do not judge me, I
needed Microsoft Intune :/ ). I (obviously) installed GNU Guix as one of the
first things I did. This tiny patch series is composed of fixed I had to do
to get properly working system.

Tomas Volf (2):
guix-install.sh: Add default value for XCURSOR_PATH.
guix-install.sh: Fix setting GUIX_LOCPATH.

etc/guix-install.sh | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)

--
2.41.0
T
T
Tomas Volf wrote on 5 Apr 19:09 +0200
[PATCH 2/2] guix-install.sh: Fix setting GUIX_LOCPATH.
(address . 70218@debbugs.gnu.org)(name . Tomas Volf)(address . ~@wolfsden.cz)
6b147273d133a1dbdcc2141be4fec18ffe1112fa.1712336516.git.~@wolfsden.cz
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
---
etc/guix-install.sh | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)

Toggle diff (24 lines)
diff --git a/etc/guix-install.sh b/etc/guix-install.sh
index 7876afa196..e7a8ca6476 100755
--- a/etc/guix-install.sh
+++ b/etc/guix-install.sh
@@ -549,13 +549,13 @@ export INFOPATH="$_GUIX_PROFILE/share/info:$INFOPATH"
# GUIX_PROFILE: User's default profile and home profile
GUIX_PROFILE="$HOME/.guix-profile"
[ -f "$GUIX_PROFILE/etc/profile" ] && . "$GUIX_PROFILE/etc/profile"
-[ -L "$GUIX_PROFILE" ] || \
-GUIX_LOCPATH="$GUIX_PROFILE/lib/locale:${GUIX_LOCPATH:+:}$GUIX_LOCPATH"
+[ -L "$GUIX_PROFILE" ] && \
+GUIX_LOCPATH="$GUIX_PROFILE/lib/locale${GUIX_LOCPATH:+:}$GUIX_LOCPATH"
GUIX_PROFILE="$HOME/.guix-home/profile"
[ -f "$GUIX_PROFILE/etc/profile" ] && . "$GUIX_PROFILE/etc/profile"
-[ -L "$GUIX_PROFILE" ] || \
-GUIX_LOCPATH="$GUIX_PROFILE/lib/locale:${GUIX_LOCPATH:+:}$GUIX_LOCPATH"
+[ -L "$GUIX_PROFILE" ] && \
+GUIX_LOCPATH="$GUIX_PROFILE/lib/locale${GUIX_LOCPATH:+:}$GUIX_LOCPATH"
export GUIX_LOCPATH
--
2.41.0
T
T
Tomas Volf wrote on 5 Apr 19:09 +0200
[PATCH 1/2] guix-install.sh: Add default value for XCURSOR_PATH.
(address . 70218@debbugs.gnu.org)(name . Tomas Volf)(address . ~@wolfsden.cz)
b1a631772ddc41ee4b1c681235a84fdc5eddb5ba.1712336516.git.~@wolfsden.cz
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
---
etc/guix-install.sh | 2 ++
1 file changed, 2 insertions(+)

Toggle diff (22 lines)
diff --git a/etc/guix-install.sh b/etc/guix-install.sh
index 982fb0a266..7876afa196 100755
--- a/etc/guix-install.sh
+++ b/etc/guix-install.sh
@@ -12,6 +12,7 @@
# Copyright © 2021, 2022, 2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>
# Copyright © 2022 Prafulla Giri <prafulla.giri@protonmail.com>
# Copyright © 2023 Andrew Tropin <andrew@trop.in>
+# Copyright © 2024 Tomas Volf <~@wolfsden.cz>
#
# This file is part of GNU Guix.
#
@@ -527,6 +528,7 @@ sys_create_init_profile()
cat <<"EOF" > /etc/profile.d/zzz-guix.sh
# Explicitly initialize XDG base directory variables to ease compatibility
# with Guix System: see <https://issues.guix.gnu.org/56050#3>.
+export XCURSOR_PATH="${XCURSOR_PATH:-/usr/local/share/icons:/usr/share/icons}"
export XDG_DATA_HOME="${XDG_DATA_HOME:-$HOME/.local/share}"
export XDG_CONFIG_HOME="${XDG_CONFIG_HOME:-$HOME/.config}"
export XDG_STATE_HOME="${XDG_STATE_HOME:-$HOME/.local/state}"
--
2.41.0
L
L
Ludovic Courtès wrote on 29 Apr 22:57 +0200
Re: [bug#70218] [PATCH 0/2] Some fixes for guix-install.sh
(name . Tomas Volf)(address . ~@wolfsden.cz)(address . 70218-done@debbugs.gnu.org)
871q6n28fw.fsf@gnu.org
Hi!

Tomas Volf <~@wolfsden.cz> skribis:

Toggle quote (5 lines)
> This week I had to install Ubuntu 22.04 (corporate policy, do not judge me, I
> needed Microsoft Intune :/ ). I (obviously) installed GNU Guix as one of the
> first things I did. This tiny patch series is composed of fixed I had to do
> to get properly working system.

Heheh, no judgment! :-)

Toggle quote (4 lines)
> Tomas Volf (2):
> guix-install.sh: Add default value for XCURSOR_PATH.
> guix-install.sh: Fix setting GUIX_LOCPATH.

Finally applied, thanks!

Ludo’.
Closed
?