* bug#74949: guix describe crash if HOME is unset OR /etc/passwd is missing
@ 2024-12-18 17:25 Simon Josefsson via Bug reports for GNU Guix
0 siblings, 0 replies; only message in thread
From: Simon Josefsson via Bug reports for GNU Guix @ 2024-12-18 17:25 UTC (permalink / raw)
To: 74949
[-- Attachment #1: Type: text/plain, Size: 3099 bytes --]
Hi
I get the backtrace below. Setting either HOME to something, or adding
an entry to /etc/passwd for the running user, silences this.
I don't think it should fail like this, should it?
Is a reasonable behaviour to assume HOME means "/" when unset?
How to handle missing /etc/passwd entries probably depends on what the
code wants to use it for.
/Simon
jas@kaka:~/src/guix-container$ podman run --entrypoint /bin/sh -it registry.gitlab.com/debdistutils/guix/container:latest
sh-5.1# guix describe
Backtrace:
In ice-9/boot-9.scm:
222:29 19 (map1 _)
222:29 18 (map1 _)
222:29 17 (map1 _)
222:29 16 (map1 _)
222:29 15 (map1 _)
222:29 14 (map1 _)
222:29 13 (map1 _)
222:29 12 (map1 (((guix packages)) ((guix profiles)) ((guix #)) ?))
222:17 11 (map1 (((guix profiles)) ((guix derivations)) ((# #)) ?))
3327:17 10 (resolve-interface (guix profiles) #:select _ #:hide _ # ?)
In ice-9/threads.scm:
390:8 9 (_ _)
In ice-9/boot-9.scm:
3253:13 8 (_)
In ice-9/threads.scm:
390:8 7 (_ _)
In ice-9/boot-9.scm:
3544:20 6 (_)
2836:4 5 (save-module-excursion #<procedure 7fe582a23b10 at ice-?>)
3564:26 4 (_)
In unknown file:
3 (primitive-load-path "guix/profiles" #<procedure 7fe582?>)
In guix/profiles.scm:
2388:23 2 (_)
In guix/utils.scm:
1071:48 1 (xdg-directory _ "/.config" #:ensure? _)
In unknown file:
0 (getpw 0)
ERROR: In procedure getpw:
In procedure getpw: entry not found
sh-5.1# export HOME=/
sh-5.1# guix describe
guix 790c9ff
repository URL: https://git.savannah.gnu.org/git/guix.git
branch: master
commit: 790c9ffe596e3deabf175e030adee5fb706aa981
sh-5.1# exit
jas@kaka:~/src/guix-container$ podman run --entrypoint /bin/sh -it registry.gitlab.com/debdistutils/guix/container:latest
sh-5.1# guix describe
Backtrace:
In ice-9/boot-9.scm:
222:29 19 (map1 _)
222:29 18 (map1 _)
222:29 17 (map1 _)
222:29 16 (map1 _)
222:29 15 (map1 _)
222:29 14 (map1 _)
222:29 13 (map1 _)
222:29 12 (map1 (((guix packages)) ((guix profiles)) ((guix #)) ?))
222:17 11 (map1 (((guix profiles)) ((guix derivations)) ((# #)) ?))
3327:17 10 (resolve-interface (guix profiles) #:select _ #:hide _ # ?)
In ice-9/threads.scm:
390:8 9 (_ _)
In ice-9/boot-9.scm:
3253:13 8 (_)
In ice-9/threads.scm:
390:8 7 (_ _)
In ice-9/boot-9.scm:
3544:20 6 (_)
2836:4 5 (save-module-excursion #<procedure 7fac35694b10 at ice-?>)
3564:26 4 (_)
In unknown file:
3 (primitive-load-path "guix/profiles" #<procedure 7fac35?>)
In guix/profiles.scm:
2388:23 2 (_)
In guix/utils.scm:
1071:48 1 (xdg-directory _ "/.config" #:ensure? _)
In unknown file:
0 (getpw 0)
ERROR: In procedure getpw:
In procedure getpw: entry not found
sh-5.1# echo 'root:x:0:0:root:/root:/bin/bash' > /etc/passwd
sh-5.1# guix describe
guix 790c9ff
repository URL: https://git.savannah.gnu.org/git/guix.git
branch: master
commit: 790c9ffe596e3deabf175e030adee5fb706aa981
sh-5.1#
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 255 bytes --]
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2024-12-18 17:26 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-18 17:25 bug#74949: guix describe crash if HOME is unset OR /etc/passwd is missing Simon Josefsson via Bug reports for GNU Guix
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).