89luca89 / distrobox

Use any linux distribution inside your terminal. Enable both backward and forward compatibility with software and freedom to use whatever distribution you’re more comfortable with. Mirror available at: https://gitlab.com/89luca89/distrobox
https://distrobox.it/
GNU General Public License v3.0
9.96k stars 410 forks source link

[Error] duplicate mount destination on Fedora Silverblue #49

Closed alcir closed 2 years ago

alcir commented 2 years ago

https://github.com/89luca89/distrobox/blob/5289fa220a306ff5e95ebdbdf8e6b38c092e121a/distrobox-create#L218

I'm on Fedora Silverblue. Using distrobox-create, I get Error: /var/home/myuser: duplicate mount destination

I think because we have

    210                 --volume ${container_user_home}:${container_user_home}:rslave

and again

    220                         --volume /var/home/${container_user_name}:/var/home/${container_user_name}:rslave"

On my system, $container_user_home (that is $HOME) is /var/home/myuser. Not to say that on Fedora Silverblue /home is a symlink to var/home.

89luca89 commented 2 years ago

@alcir thanks

what is the value of $HOME?

I ask because this very fix was introduced because on #43 we found that $HOME on Fedora Kionite was still /home/username pointing to the symlink /var/home/username

Is your $HOME is /var/home/username instead of /home/username ?

89luca89 commented 2 years ago

@alcir I've created a new pull request with a fix, can you confirm it fixes the situation? This way we can support both cases:

alcir commented 2 years ago

Is your $HOME is /var/home/username instead of /home/username ?

It is /var/home/myuser

I'm pretty sure that also in a brand new installation it is /var/home/username. I don't know if Kinoite changes the $HOME variable, or it is simply a Silverblue version with a different DE. I will check.

89luca89 commented 2 years ago

Yea it seems just a variable problem, the directory layout is right Also probably that's why on my Silverblue test the #43 never happened :shrug:

alcir commented 2 years ago

@alcir I've created a new pull request with a fix, can you confirm it fixes the situation? This way we can support both cases:

Yes it works (for me).

89luca89 commented 2 years ago

Testing again on a brand new Silverblue 35 it works Setting $HOME to /home/username and testing again seems to work correcly

The fix will be included in release 1.2.5 :+1:

alcir commented 2 years ago

I don't know if Kinoite changes the $HOME variable, or it is simply a Silverblue version with a different DE. I will check.

Eh. On Kinoite, $HOME is the classic /home/username But if you create a new user, its home is /var/home/username

$ cat /etc/passwd
root:x:0:0:root:/root:/bin/bash
myuser:x:1000:1000:myuser:/home/myuser:/bin/bash
newuser:x:1001:1001:newuser:/var/home/newuser:/bin/bash
89luca89 commented 2 years ago

Ok we now handle this, maybe that's a good issue to open on Kinoite's git :smile:

alcir commented 2 years ago

maybe that's a good issue to open on Kinoite's git smile

For now I started a discussion here: https://discussion.fedoraproject.org/t/the-home-directory/35482

89luca89 commented 2 years ago

Cool will follow that

xrishox commented 2 years ago

i'm also having this issue on silverblue.

89luca89 commented 2 years ago

@xrishox are you on 1.2.4? The fix for this is coming shortly in 1.2.5