Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unify Lima user home inside guest for all platforms #3378

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

arixmkii
Copy link
Contributor

Fixes #3364

I spent some time trying to understand if this code really makes sense. My conclusion is that it is probably the remains from the times, where the idea of mounting HOST home into GUEST home was explored. Since then there was a decision to have GUEST home separately, because it can be used for Lima GA needs. I could not think of any reason why GUEST home should be different from home directories on other platforms. This change remove all of the Windows specifics for GUEST home directory (keeping all other platform specific parts).

I tested this with integration tests using WSL2 and QEMU https://github.com/arixmkii/qcw/actions/runs/14022917109/job/39274813343

@arixmkii arixmkii force-pushed the unify-lima-user-home branch from 3185091 to b30505b Compare March 24, 2025 17:30
@arixmkii
Copy link
Contributor Author

arixmkii commented Mar 24, 2025

Ok, I see one problem with it now

local username "DOMAINNAME\\Arthu" is not a valid Linux username

So, it would always be /home/lima.linux as host dir, but if this is really a problem, then probably it is better to add OS specific processing to Username trying to extract Username w/o domain instead trying to replicate the Windows Home dir path into Linux path

Create a task for investigation of this.

Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR unifies the guest home directory across all platforms by removing Windows-specific handling for the guest home directory.

  • Removed Windows-specific logic for transforming the guest home directory in pkg/osutil/user.go.
  • Updated the test in pkg/limayaml/defaults_test.go to always set the home directory using a unified, Linux-style format.

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
pkg/osutil/user.go Removed Windows-specific home transformation to support a unified guest home path.
pkg/limayaml/defaults_test.go Adjusted test to unconditionally apply the unified home directory format.

@arixmkii arixmkii mentioned this pull request Mar 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Windows] Test coverage missing for part of User home dir setup login on Windows
2 participants