Skip to content

merge /bin and /sbin - #666

Merged
nzbr merged 2 commits into
mainfrom
merge-sbin
Aug 3, 2025
Merged

merge /bin and /sbin#666
nzbr merged 2 commits into
mainfrom
merge-sbin

Conversation

@nzbr

@nzbr nzbr commented Jun 9, 2025

Copy link
Copy Markdown
Member

This will allow us to make files available in /sbin using extraBin. usbip needs /sbin/modprobe to load vhci_hcd on demand

@nzbr
nzbr requested a review from Copilot June 9, 2025 18:38

This comment was marked as resolved.

@nzbr
nzbr force-pushed the merge-sbin branch 2 times, most recently from e08b812 to 1fdf6c0 Compare June 9, 2025 18:50
@nzbr
nzbr requested a review from K900 June 9, 2025 19:14
Comment thread modules/systemd/native/default.nix
@nzbr
nzbr force-pushed the main branch 12 times, most recently from 0fa96ff to d34d941 Compare July 11, 2025 02:04
@github-actions

Copy link
Copy Markdown
Contributor

Only merged pull requests can be backported.

@K900

K900 commented Jul 12, 2025

Copy link
Copy Markdown
Contributor

Now that WSL is open source, should we maybe fix it upstream instead? https://github.com/microsoft/WSL/blob/ae323a4e9b0c1082a1bf1e050df4f88affa9f931/src/linux/init/main.cpp#L87

@nzbr

nzbr commented Jul 12, 2025

Copy link
Copy Markdown
Member Author

I thought this was because usbipd-win hard-coded that path, but I just re-checked and that doesn't seem to be the case:
https://github.com/dorssel/usbipd-win/blob/b13e3f3799e368835913e0468ded52fe1fbb97d2/Usbipd/Wsl.cs#L356
But I'm still not sure if changing the path in WSL would actually fix this -- it's been a while since I debugged it

Still I think just merging the two directories would be a good idea. It saves us from creating activation scripts for everything we need to have in /sbin in the future, because we can just use the existing extraBin option

@K900

K900 commented Jul 12, 2025

Copy link
Copy Markdown
Contributor

I'd rather get rid of /sbin entirely.

@nzbr

nzbr commented Jul 13, 2025

Copy link
Copy Markdown
Member Author

Fair, but then we'd need another way of telling WSL where to look for the init binary. I don't see a good other way to do that. It might be possible through the config file, but not without breaking backwards compatibility for everyone who is still on an older WSL version. I'd be fine with that were it just for something like usbip or docker desktop support, but not with something that's an essential part of the boot code

@K900

K900 commented Jul 13, 2025

Copy link
Copy Markdown
Contributor

AFAIUI the open source WSL can install on any supported version no?

@SuperSandro2000

Copy link
Copy Markdown
Member

Now that WSL is open source, should we maybe fix it upstream instead? microsoft/WSL@ae323a4/src/linux/init/main.cpp#L87

We cannot just change that as other distros have the binary there and relying on PATH maybe opens the next can of worms https://packages.debian.org/search?searchon=contents&keywords=modprobe&mode=path&suite=stable&arch=any

@nzbr
nzbr merged commit 87aa106 into main Aug 3, 2025
83 of 89 checks passed
@nzbr
nzbr deleted the merge-sbin branch August 3, 2025 15:30
github-actions Bot pushed a commit that referenced this pull request Aug 3, 2025
(cherry picked from commit 87aa106)
@github-actions

github-actions Bot commented Aug 3, 2025

Copy link
Copy Markdown
Contributor

Successfully created backport PR for release-25.05:

nzbr added a commit that referenced this pull request Aug 3, 2025
(cherry picked from commit 87aa106)
@nzbr nzbr added the enhancement New feature or request label Aug 11, 2025
@github-actions

Copy link
Copy Markdown
Contributor

Backport failed for release-25.05, because it was unable to cherry-pick the commit(s).

Please cherry-pick the changes locally and resolve any conflicts.

git fetch origin release-25.05
git worktree add -d .worktree/backport-666-to-release-25.05 origin/release-25.05
cd .worktree/backport-666-to-release-25.05
git switch --create backport-666-to-release-25.05
git cherry-pick -x 87aa106e089b0b841cd6230a3856cc0bd63827eb

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants