[PATCH] website: README: Fix build and serve commands

  • Done
  • quality assurance status badge
Details
3 participants
  • Leo Famulari
  • Luis Felipe
  • Mathieu Othacehe
Owner
unassigned
Submitted by
Luis Felipe
Severity
normal
L
L
Luis Felipe wrote on 6 Apr 2021 19:52
(name . Luis Felipe via Guix-patches)(address . guix-patches@gnu.org)
LL3c9sVaMk_UGYOIfdKlIqHVqxEEYrPaCROMIbyj0M99adj7H15JW6rAj66tLc5pauNiiGvqOnG1cT3Oc3WIRSUMvrMbuBiMC5L7oXsBCAQ=@protonmail.com
Hi,

The instructions to build and run the website locally fail because they refer to a "locale" directory, which does not exist (at least in my Guix System). It should be "locales" instead.

Best,


---
Luis Felipe López Acevedo
From ce3807b79aa7eb20c53c8679ba39f6238c041098 Mon Sep 17 00:00:00 2001
From: Luis Felipe <luis.felipe.la@protonmail.com>
Date: Tue, 6 Apr 2021 12:36:30 -0500
Subject: [PATCH] website: README: Fix build and serve commands.

Both commands failed because they referred to a directory that does not
exist: $HOME/.guix-profile/lib/locale instead of
$HOME/.guix-profile/lib/locales (plural).

* website/README (Running the website): Fix path to locales.
---
website/README | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

Toggle diff (26 lines)
diff --git a/website/README b/website/README
index 69e666c..7f386f6 100644
--- a/website/README
+++ b/website/README
@@ -33,7 +33,7 @@ commands:
** Build locally
#+begin_example
GUIX_WEB_SITE_LOCAL=yes guix environment -C -m manifest.scm \
- -E GUIX_LOCPATH -E LANG --share=$HOME/.guix-profile/lib/locale \
+ -E GUIX_LOCPATH -E LANG --share=$HOME/.guix-profile/lib/locales \
-E GUIX_WEB_SITE_LOCAL --share=/tmp \
-- haunt build
#+end_example
@@ -41,7 +41,7 @@ commands:
** Serve locally
#+begin_example
guix environment -CN -m manifest.scm \
- -E GUIX_LOCPATH -E LANG --share=$HOME/.guix-profile/lib/locale \
+ -E GUIX_LOCPATH -E LANG --share=$HOME/.guix-profile/lib/locales \
--share=/tmp \
-- haunt serve -w
#+end_example

base-commit: 906436c869b01c57fac9418fb32d3ddd0c6b196f
--
2.31.0
L
L
Leo Famulari wrote on 6 Apr 2021 20:14
(name . Luis Felipe via Guix-patches via)(address . guix-patches@gnu.org)(address . 47623@debbugs.gnu.org)
YGyk+icy7vOo28aZ@jasmine.lan
On Tue, Apr 06, 2021 at 05:52:48PM +0000, Luis Felipe via Guix-patches via wrote:
Toggle quote (4 lines)
> Hi,
>
> The instructions to build and run the website locally fail because they refer to a "locale" directory, which does not exist (at least in my Guix System). It should be "locales" instead.

On my system, the directory is named 'locale', not 'locales'.

I'm not sure what's going on...
M
M
Mathieu Othacehe wrote on 6 Apr 2021 20:26
(name . Leo Famulari)(address . leo@famulari.name)(address . 47623@debbugs.gnu.org)
871rbnw9q1.fsf@gnu.org
Hello,

Toggle quote (4 lines)
> On my system, the directory is named 'locale', not 'locales'.
>
> I'm not sure what's going on...

No sign of a 'locales' directory here. The GUIX_LOCPATH variable is
/run/current-system/locale on my system. It only contains the locales
defined in %default-locale-definitions.

Running something like:

Toggle snippet (7 lines)
GUIX_LOCPATH=$HOME/.guix-profile/lib/locale \
GUIX_WEB_SITE_LOCAL=yes guix environment -C -m manifest.scm \
-E GUIX_LOCPATH -E LANG --share=$HOME/.guix-profile/lib/locale \
-E GUIX_WEB_SITE_LOCAL --share=/tmp \
-- haunt build

works for me.

Mathieu
L
L
Luis Felipe wrote on 13 May 2021 22:43
[PATCH] website: README: Fix build and serve commands
7ht7uZZje5DlG6cHCnWYAnUD7U4E1aZr4kqLP2RCV3PjQBH80Kz2CjXU0OL_KcRc24B4l33RmbhHhK-Cp6svG_JyaMqjl6pn8QRVEKHG5x8=@protonmail.com
Toggle quote (2 lines)
> No sign of a 'locales' directory here. The GUIX_LOCPATH variable is/run/current-system/locale on my system. It only contains the localesdefined in %default-locale-definitions.

In my case (using Guix System),

$ echo $GUIX_LOCPATH
/run/current-system/profile/lib/locale:/run/current-system/locale

Both of which exist. And there is also

$ ls ~/.guix-profile/lib/locales
am.pak es-419.pak hu.pak nb.pak sw.pak
am.pak.info es-419.pak.info hu.pak.info nb.pak.info sw.pak.info
ar.pak es.pak id.pak nl.pak ta.pak
ar.pak.info es.pak.info id.pak.info nl.pak.info ta.pak.info
bg.pak et.pak it.pak pl.pak te.pak
bg.pak.info et.pak.info it.pak.info pl.pak.info te.pak.info
bn.pak fa.pak ja.pak pt-BR.pak th.pak
bn.pak.info fa.pak.info ja.pak.info pt-BR.pak.info th.pak.info
ca.pak fil.pak kn.pak pt-PT.pak tr.pak
ca.pak.info fil.pak.info kn.pak.info pt-PT.pak.info tr.pak.info
cs.pak fi.pak ko.pak ro.pak uk.pak
cs.pak.info fi.pak.info ko.pak.info ro.pak.info uk.pak.info
da.pak fr.pak lt.pak ru.pak vi.pak
da.pak.info fr.pak.info lt.pak.info ru.pak.info vi.pak.info
de.pak gu.pak lv.pak sk.pak zh-CN.pak
de.pak.info gu.pak.info lv.pak.info sk.pak.info zh-CN.pak.info
el.pak he.pak ml.pak sl.pak zh-TW.pak
el.pak.info he.pak.info ml.pak.info sl.pak.info zh-TW.pak.info
en-GB.pak hi.pak mr.pak sr.pak
en-GB.pak.info hi.pak.info mr.pak.info sr.pak.info
en-US.pak hr.pak ms.pak sv.pak
en-US.pak.info hr.pak.info ms.pak.info sv.pak.inf

The "~/.guix-profile/lib/locale" directory does not exist (why can that be?! I don't know...).

So for me, the build command always fails like this:

$ LANG=C GUIX_WEB_SITE_LOCAL=yes guix environment -C -m manifest.scm -E GUIX_LOCPATH -E LANG --share=$HOME/.guix-profile/lib/locale -E GUIX_WEB_SITE_LOCAL --share=/tmp -- haunt build
guix environment: error: statfs: /home/yo/.guix-profile/lib/locale: No such file or directory

Building it with the command you provided, it fails for the same reason.

Building it changing "$HOME/.guix-profile/lib/locale" to "$HOME/.guix-profile/lib/locales", it builds, but I see what seems to be character enconding issues in the output (some characters are replaced by a question mark). For instance:

copy 'static/base/img/Guix-package.png' ? 'static/base/img/Guix-package.png'

Then, running the serve command fails:

$ guix environment -CN -m manifest.scm -E GUIX_LOCPATH -E LANG --share=$HOME/.guix-profile/lib/locales --share=/tmp -- haunt serve -w
guile: warning: failed to install locale
Backtrace:
2 (primitive-load "/gnu/store/yzaxlqmiraznba4yf2cyqpyla9q?")
In haunt/ui.scm:
131:2 1 (haunt-main _ "serve" "-w")
In unknown file:
0 (setlocale 6 "")

ERROR: In procedure setlocale:
In procedure setlocale: Invalid argument

(I use "$HOME/.guix-profile/lib/locales" there too, otherwise it fails saying "$HOME/.guix-profile/lib/locale" does not exist)

I don't get it... The only thing I recall doing related to locales is installing both "glibc-locales" and "gcc-toolchain" system-wide; the former to get all locales supported by glibc, and the latter to get the "locale" command.
L
L
Luis Felipe wrote on 21 May 2021 16:02
(name . 47623-done@debbugs.gnu.org)(address . 47623-done@debbugs.gnu.org)
EsbBQOUqFAv4_RPk7Fjb6vATqACKq0EljF09yd0qeop_naodqCb-kVbDdyLod5m0YTL2Cr7RkvTdJ7VLBEZnDUq-n61WzZwBJ_cuKmVsh58=@protonmail.com
I'm closing this, since it is not a problem in the commands, but an issue on my side which I reported to guix-devel to try to get some help (https://lists.gnu.org/archive/html/guix-devel/2021-05/msg00354.html).


---
Luis Felipe López Acevedo
Closed
?
Your comment

This issue is archived.

To comment on this conversation send an email to 47623@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 47623
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch