Potential bug in guix home

  • Open
  • quality assurance status badge
Details
6 participants
  • Efraim Flashner
  • Oleg Pykhalov
  • Pascal Lorenz
  • jgart
  • Maxime Devos
  • Xinglu Chen
Owner
unassigned
Submitted by
Pascal Lorenz
Severity
normal
P
P
Pascal Lorenz wrote on 1 Oct 2021 11:14
(address . bug-guix@gnu.org)
1E5FE5C0-C8D4-448E-9D13-CDA39FEF79A7@trilingual.eu
Hi!
I assumed user privileges should be enough for guix home, but guix home reconfigure home.scm returns this result:

/gnu/store/…-home
guix home: error: mkdir: permission denied


This happens in a fresh and up to date VirtualBox VM with the only changes being a few installed packages (emacs, vim & tmux) and the guix home configuration.

Please tell me if I forgot any relevant piece of information.


Best regards,

Pascal
Attachment: file
X
X
Xinglu Chen wrote on 1 Oct 2021 19:11
87ee94llf4.fsf@yoctocell.xyz
On Fri, Oct 01 2021, Pascal Lorenz wrote:

Toggle quote (15 lines)
> Hi!
>
> I assumed user privileges should be enough for guix home, but guix
> home reconfigure home.scm returns this result:
>
> /gnu/store/…-home
> guix home: error: mkdir: permission denied
>
>
> This happens in a fresh and up to date VirtualBox VM with the only
> changes being a few installed packages (emacs, vim & tmux) and the
> guix home configuration.
>
> Please tell me if I forgot any relevant piece of information.

It’s hard to know why this happens without some more information.

Could you share a bracktrace if there was one, and what’s the contents
of the ‘home.scm’ file?

Does the issue happen if you run ‘guix home build home.scm’?
-----BEGIN PGP SIGNATURE-----

iQJJBAEBCAAzFiEEAVhh4yyK5+SEykIzrPUJmaL7XHkFAmFXQVAVHHB1YmxpY0B5
b2N0b2NlbGwueHl6AAoJEKz1CZmi+1x5PswQAJTjbBXRXyDZroB90Iwb4sr9WNSw
AVUPWKkDtuNCy9Z8PKAT8jsNfSI8hHb6JbimyyQBSCWGBgvbbuznoJfYVRLrO4z9
t2sfjerAZew+mYr45BFTtUvfbaavn6ubhWF46Wq1kF+b5tAGSyOn5Vhtp/LJHJaI
htx1yC3OudLSd1iGI8dK5i3BXTFPRI0xAB56zCoLLy8XT3y0jm91YwLT5HvmT6EB
bybg/WnaG8GKI+EUedK3m61Q0lir0Q2BGye5S+9T+P0jzTMhgIfStZq23f3Qlffn
V3yEXFZZ5E2T+JnO3VjXKXu1QjODzPifBzTEK/YT02fBWsOg7dhylGf0aQK0zxO3
gQ1lmYtHfjr34Obq1VFB3Hv+XGVjjgCS3wKwrETyGqUdxxMj8kQMFKH9J8SP44Hb
g6XPtLqlpbfyX7tn8pT/O2DQMb8katvnM8mn1UggKeYDva6FJydJw/f7CEZYBfD7
wyjMXzPAF7Wo06NjplLhKUr3P+oUZIO9N0dgeg/KYF+bvMUg/djUaH8As7Kzvy58
Bb95kvVGaBXtybLWcmGxOO/+poGkXA/1fipITPGD8UpiLZC5hk9HnREAGGlXVcsU
/WfIHuO3kdMSDoyKr1wqOm3ZWcBv3GJ2CzB3DZ5ZSEHMhxYMMT3q+wEx08gmUxxr
sopN1LOYoqYzh0yy
=o5jq
-----END PGP SIGNATURE-----

O
O
Oleg Pykhalov wrote on 1 Oct 2021 21:04
(name . Xinglu Chen)(address . public@yoctocell.xyz)
875yugr2gt.fsf@gmail.com
Hi,

Xinglu Chen <public@yoctocell.xyz> writes:

Toggle quote (18 lines)
> On Fri, Oct 01 2021, Pascal Lorenz wrote:
>
>> Hi!
>>
>> I assumed user privileges should be enough for guix home, but guix
>> home reconfigure home.scm returns this result:
>>
>> /gnu/store/…-home
>> guix home: error: mkdir: permission denied
>>
>>
>> This happens in a fresh and up to date VirtualBox VM with the only
>> changes being a few installed packages (emacs, vim & tmux) and the
>> guix home configuration.
>>
>
> Does the issue happen if you run ‘guix home build home.scm’?

I guess I reproduced this. No, guix home build has no errors.

reconfigure requires /run/user directory which doesn't produced by
%base-services, but %desktop-services with [1] probably does.

[1] (service-extension file-system-service-type (const %elogind-file-systems))
-----BEGIN PGP SIGNATURE-----

iQJIBAEBCgAyFiEEcjhxI46s62NFSFhXFn+OpQAa+pwFAmFXW8IUHGdvLndpZ3Vz
dEBnbWFpbC5jb20ACgkQFn+OpQAa+pyymxAAh/KHNJeHF2DDGlJiTRmoSZnBUTE2
wS7W/frsoQGC7tMUHc8DVzjqv+rKi/LWLMt/687oUczzPMdbiJxv7Yfez1fd1goP
VGQ2PZ40pd/RsOPlSZBwioBx2Iv1F4qaGR3a3Tkb6F1PdXZmNcaPN8prW0/al051
85edYB2Kskq7p2HUW9gu+9RCR0rpB5ny7QElGiY9/WKo3/jlYLvRK9ei0AHy9uQt
QVYc3+Kj7cM87V8E5F2x/64V2icx5j2gqyZghOIGEe55SRgX9+xC4ouJQlVJfllt
iMi1DVs7xmVGZeZAVlHaDkXHjNGt9sfEm6G0ahxJlFHFQkn0fkUroT6TNdLzsHEQ
0QgTzIXS8Apxy8/omGGn1bgP05W3OLWF7hCNhXey/K12ujZwqUPvzWdoVf6Gl+kH
bPdJNGTv6x5BeQIhy4Lu3kk4a8WjIF6AwgDHsQ1Z5cgjeTNP+Ui+zV60NpHLj763
O7NygbYnZdgO3RO+awDikAa16cSOgSFPTeKViu55yvp4JfT7gyMKywPPuD5IVg1r
ceukOwDcdM8ijsqnQpW1ThMWmcoPR76IkuZ3GGJezBrbXUi1TJQmXeMDdxhLRE41
qxnLtg3bHRVKmR+Qi9hYfzqF/rYHZ9MWk+IlSZYDI6tjwIraORTV37+d0CcvjN3S
MkZoeafTN9FmPRs=
=LRV4
-----END PGP SIGNATURE-----

J
J
jgart wrote on 2 Oct 2021 09:01
I can confirm this bug too
(address . 50941@debbugs.gnu.org)
20211002030152.GB28027@gac.attlocal.net
I was going to report this today but Pascal beat me to it.

I get the same error when running `guix home reconfigure file.scm`.

`guix home build file.scm` builds fine without errors.

Here's the config that I tested that with:

```
(use-modules (gnu home)
(gnu packages)
;(guixrus packages guix-easy)
(gnu packages bash)
(gnu packages mail)
(gnu packages messaging)
(gnu packages password-utils)
(gnu packages guile)
(guixrus packages bower)
(gnu packages guile-xyz)
(gnu packages wget)
(gnu packages version-control)
(guixrus packages bower)
(gnu packages emacs))

;;(define* (pkgs #:rest lst)
;; (map specification->package+output lst))

(define-macro (define-tools group-name . group-package-names)
"custom helper for defining groups of packages"
`(define ,group-name
(map (compose list specification->package+output)
',group-package-names)))

(define-tools jgart-profile "emacs-minimal" "offlineimap3"
"guile-pipe" "bower" "guile-colorized" "guile-readline" "tig"
"git" "gajim" "gajim-omemo" "keepassxc" "wgetpaste")

(define jgart-packages
(home-environment
(packages (list tig wgetpaste))))

jgart-packages
```


3B1D 7F19 E36B B60C 0F5B 2CA9 A52A A2B4 77B6 DD35
J
J
jgart wrote on 2 Oct 2021 09:04
(address . 50941@debbugs.gnu.org)
20211002030413.GB28437@gac.attlocal.net
I'm forgot to mention that I tested this on void linux.

all best,

jgart
J
J
jgart wrote on 2 Oct 2021 09:07
(address . 50941@debbugs.gnu.org)
20211002030747.GB29282@gac.attlocal.net
Sorry for the unused code in the example.
X
X
Xinglu Chen wrote on 2 Oct 2021 10:14
Re: bug#50941: Potential bug in guix home
(name . Oleg Pykhalov)(address . go.wigust@gmail.com)
87y27bonbj.fsf@yoctocell.xyz
merge 50941 50945
thanks

On Fri, Oct 01 2021, Oleg Pykhalov wrote:

Toggle quote (27 lines)
> Hi,
>
> Xinglu Chen <public@yoctocell.xyz> writes:
>
>> On Fri, Oct 01 2021, Pascal Lorenz wrote:
>>
>>> Hi!
>>>
>>> I assumed user privileges should be enough for guix home, but guix
>>> home reconfigure home.scm returns this result:
>>>
>>> /gnu/store/…-home
>>> guix home: error: mkdir: permission denied
>>>
>>>
>>> This happens in a fresh and up to date VirtualBox VM with the only
>>> changes being a few installed packages (emacs, vim & tmux) and the
>>> guix home configuration.
>>>
>>
>> Does the issue happen if you run ‘guix home build home.scm’?
>
> I guess I reproduced this. No, guix home build has no errors.
>
> reconfigure requires /run/user directory which doesn't produced by
> %base-services, but %desktop-services with [1] probably does.

Ah, then this would be the same problem as bug#50945.
-----BEGIN PGP SIGNATURE-----

iQJJBAEBCAAzFiEEAVhh4yyK5+SEykIzrPUJmaL7XHkFAmFYFPAVHHB1YmxpY0B5
b2N0b2NlbGwueHl6AAoJEKz1CZmi+1x5IPwP/i3qC88lGX8sf3atU+fziNtvt5oc
AJeC8KYISTRt+DxhcgiCj3JZS3MK7ns9k8+/EBZT7Fm9LF0EWf4yGVNcPn5d92Cg
dl5CfhT2Myv1H2J+7iconJDjiT/6xDuHq8Gx6m91IWgzrlSa+7vHy+gey+VPKz8Y
/mAxxPMNPjvDCCfBnSkRZzImV2iCU8ztrE1TFSz4ws1wZV1qu/tpZl09vWXo4+Ck
nwNuwFjyOr1mGYM3drqm0XTxeD/4AgHxhZ7P21pqQfw2nCG/QM9m/2zG7iYtiDk9
3eXqt3RrULpAyeg7jjxH5Ov8sRTaEpmx6P7YVwE3S8g7H/yhL5ZXsz6uQ8y45zCm
oM1nHqX2AO+zdm7zLQlpHljXDDdA/NbQKII/AJ7IY3fJ+iHcMBQsxx2FzxBB3GhE
xxkcjhf/q1NrmI1HNxlgyh36t9jzPsU2e1hvLsYWN4kjzLr2sVOdfD0kbaGz6RzK
E7+Qm4HyOk3vRDiCOzco/ZtpiPQsQejE21t6RpON9lusZ08nXrUcIaWcDBXfvSo4
mbu0a5sEMYlgq4sfH1SFrCUtI26yM2INU0xa8u/Fdhu9uxZd58CH2Z1Fugh8kTTT
/ZcHiN4Fom9vcDMBaxaxGv+bXRUtgcPc394IYQMIra0rWjDid8wJ3fXtOzY2+6wC
V+sPNUm7D0JyZjzm
=L133
-----END PGP SIGNATURE-----

E
E
Efraim Flashner wrote on 3 Oct 2021 14:45
Re: bug#50941: I can confirm this bug too
(name . jgart)(address . jgart@dismail.de)(address . 50941@debbugs.gnu.org)
YVml7rWUHbTcujHv@3900XT
On Sat, Oct 02, 2021 at 03:01:52AM -0400, jgart via Bug reports for GNU Guix wrote:
Toggle quote (6 lines)
> I was going to report this today but Pascal beat me to it.
>
> I get the same error when running `guix home reconfigure file.scm`.
>
> `guix home build file.scm` builds fine without errors.

Can you try setting XDG_RUNTIME_DIR to someplace that you have writable
and then running reconfigure again? I have to warn you though I don't
have a good answer for what to do if it works this time and doesn't work
if you log out and log back in again.

Toggle quote (44 lines)
> Here's the config that I tested that with:
>
> ```
> (use-modules (gnu home)
> (gnu packages)
> ;(guixrus packages guix-easy)
> (gnu packages bash)
> (gnu packages mail)
> (gnu packages messaging)
> (gnu packages password-utils)
> (gnu packages guile)
> (guixrus packages bower)
> (gnu packages guile-xyz)
> (gnu packages wget)
> (gnu packages version-control)
> (guixrus packages bower)
> (gnu packages emacs))
>
> ;;(define* (pkgs #:rest lst)
> ;; (map specification->package+output lst))
>
> (define-macro (define-tools group-name . group-package-names)
> "custom helper for defining groups of packages"
> `(define ,group-name
> (map (compose list specification->package+output)
> ',group-package-names)))
>
> (define-tools jgart-profile "emacs-minimal" "offlineimap3"
> "guile-pipe" "bower" "guile-colorized" "guile-readline" "tig"
> "git" "gajim" "gajim-omemo" "keepassxc" "wgetpaste")
>
> (define jgart-packages
> (home-environment
> (packages (list tig wgetpaste))))
>
> jgart-packages
> ```
>
>
> 3B1D 7F19 E36B B60C 0F5B 2CA9 A52A A2B4 77B6 DD35
>
>
>

--
Efraim Flashner <efraim@flashner.co.il> ????? ?????
GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
-----BEGIN PGP SIGNATURE-----

iQIzBAABCgAdFiEEoov0DD5VE3JmLRT3Qarn3Mo9g1EFAmFZpe4ACgkQQarn3Mo9
g1FcGA/9Hz/UZ1evhbcua4xrWNv9hCBSfc3fG4jpczChkk0NdhMC+/pfKODFQ5Vy
K5vvGFiUJnnsW9ZLRM1/DQxA2Q1yLFWvnzW/VT3MiJyrmEGbjiQR7Z3NvdrWbLao
QpiJ5HpjSQFtLgJmX1MlWW9diGl1bIh9PdtawYiLjoQDlyvH5I+UG9USxf8AUJEN
Zi0yseQGp2T3KlmkK8GnTm+VpTIdIPbwJtQ5whQo6WnZkExrcYiGeOct3UMuPUNd
UglARB55aHJZkIgxIXDZZm7SYXXdnaZIX9CQY8Q00C0Q/IuyXl7R5ncwZKGFnScO
MOaK8J4rJpnR1yg3MSGNRafZjBeKYiOxQihy44qbc98wCl7YCDLv0lT9yUFwBGm4
J9pLvBU3S6YlXJRLA0sEmb7bZyWa9z02MkXmKG/Ni3q2aZBhazONJWkrKd2RYRkp
P2+oaJrM5XFN150tu6V4WzAj24k19zyQZZ5qWwVBDLVcPb4BKkNTv+7yihH4Adaz
qJ/HsJnxNYBvOAKTZaf4s9Ttzc8auyvtylzZM+9I6SCSnJnPrwvKfwEnTvHCdjET
UWMlIiDf+bzLaC6aY1ZY+0QSKUNjn9NLdLQGmhracN3RyPaXswGitwty2EyEZKIA
F7S53C3fhIB5frFk5VmZXBHmeLbqObE4f7Zu2XXyvKDW4yf6vLo=
=BtrH
-----END PGP SIGNATURE-----


P
P
Pascal Lorenz wrote on 3 Oct 2021 21:01
Re: bug#50941: XDG_RUNTIME_DIR
(address . 50941@debbugs.gnu.org)
3E30975B-2B36-416B-9DCF-399B5B34745C@trilingual.eu
Toggle quote (3 lines)
> Can you try setting XDG_RUNTIME_DIR to someplace that you have writable and then running reconfigure again? I have to warn you though I don't have a good answer for what to do if it works this time and doesn't work if you log out and log back in again.


That did not change a thing for me:

$ mkdir ~/tmp
$ XDG_RUNTIME_DIR=~/tmp/
$ guix home reconfigure ~/home.scm
/gnu/store/dhd3pgpzjzynfyd42kgldh18j40q8zda-home
guix home: error: mkdir: Permission denied

I don't know if that matters, but XDG_RUNTIME_DIR was not set at all before (only XDG_CONFIG_DIRS and XDG_DATA_DIRS.)
M
M
Maxime Devos wrote on 5 Oct 2021 08:23
25ee53b9effc9fbeea83e463002be097e0217bee.camel@telenet.be
Pascal Lorenz schreef op zo 03-10-2021 om 21:01 [+0200]:
Toggle quote (8 lines)
> > Can you try setting XDG_RUNTIME_DIR to someplace that you have writable and then running reconfigure again? I have to warn you though I don't have a good answer for what to do if it works this time and doesn't work if you log out and log back in again.
>
> That did not change a thing for me:
>
> $ mkdir ~/tmp
> $ XDG_RUNTIME_DIR=~/tmp/
> $ guix home reconfigure ~/home.scm

XDG_RUNTIME_DIR might need to be exported as an environment variable:
$ export XDG_RUNTIME_DIR=$HOME/tmp

Greetings,
Maxime.
-----BEGIN PGP SIGNATURE-----

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYVvvTBccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7h+aAQDVwOiMSzXknZQZR/YiLRtm7KJo
/fyL+PRWvqqsJKpS0gD/a9BR1eV3IibEQAb7az1KF/yL0KE9MzsKEO3wC9FWIQk=
=NNBB
-----END PGP SIGNATURE-----


J
J
jgart wrote on 6 Oct 2021 23:31
Re: bug#50941: I can confirm this bug too
(name . Efraim Flashner)(address . efraim@flashner.co.il)(address . 50941@debbugs.gnu.org)
20211006173148.GB22843@gac.attlocal.net
On Sun, 03 Oct 2021 15:45:34 +0300 Efraim Flashner <efraim@flashner.co.il> wrote:
Toggle quote (12 lines)
> On Sat, Oct 02, 2021 at 03:01:52AM -0400, jgart via Bug reports for GNU Guix wrote:
> > I was going to report this today but Pascal beat me to it.
> >
> > I get the same error when running `guix home reconfigure file.scm`.
> >
> > `guix home build file.scm` builds fine without errors.
>
> Can you try setting XDG_RUNTIME_DIR to someplace that you have writable
> and then running reconfigure again? I have to warn you though I don't
> have a good answer for what to do if it works this time and doesn't work
> if you log out and log back in again.

That fixed it for me.

Specifically `export XDG_RUNTIME_DIR=$HOME/tmp` like Maxime mentioned.

I think this should be documented for guix home users on a foreign distro so they
don't get frustrated with this detail of getting set up.

WDYT?

Or is there another way that this configuration should be managed on a foreign distro?

all best,

jgart
?