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

WIP: Add Kali to modern distributions #12472

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Gamb1ts
Copy link

@Gamb1ts Gamb1ts commented Jan 17, 2025

No description provided.

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Thank you for your contribution to WSL.
The following fatal errors have been found in this pull request:

  • kali/None: Found no default distribution

The following suggestions have been found in this pull request:

  • kali/kali-linux: Found discouraged system unit: /usr/lib/systemd/system/local-fs.target.wants/tmp.mount
  • kali/kali-linux: Found discouraged system unit: /usr/lib/systemd/system/sysinit.target.wants/systemd-tmpfiles-setup-dev-early.service
  • kali/kali-linux: Found discouraged system unit: /usr/lib/systemd/system/sysinit.target.wants/systemd-tmpfiles-setup-dev.service
  • kali/kali-linux: Found discouraged system unit: /usr/lib/systemd/system/sysinit.target.wants/systemd-tmpfiles-setup.service
  • kali/kali-linux: Found discouraged system unit: /etc/systemd/system/network-online.target.wants/networking.service
  • kali/kali-linux: Found discouraged system unit: /usr/lib/systemd/system/local-fs.target.wants/tmp.mount
  • kali/kali-linux: Found discouraged system unit: /usr/lib/systemd/system/sysinit.target.wants/systemd-tmpfiles-setup.service
  • kali/kali-linux: Found discouraged system unit: /usr/lib/systemd/system/sysinit.target.wants/systemd-tmpfiles-setup-dev.service
  • kali/kali-linux: Found discouraged system unit: /usr/lib/systemd/system/sysinit.target.wants/systemd-tmpfiles-setup-dev-early.service
  • kali/kali-linux: Found discouraged system unit: /etc/systemd/system/network-online.target.wants/networking.service

@Gamb1ts
Copy link
Author

Gamb1ts commented Jan 17, 2025

@Gamb1ts please read the following Contributor License Agreement(CLA). If you agree with the CLA, please reply with the following information.

@microsoft-github-policy-service agree [company="{your company}"]

Options:

  • (default - no company specified) I have sole ownership of intellectual property rights to my Submissions and I am not making Submissions in the course of work for my employer.
@microsoft-github-policy-service agree
  • (when company given) I am making Submissions in the course of work for my employer (or my employer has intellectual property rights in my Submissions by contract or applicable law). I have permission from my employer to make Submissions and enter into this Agreement on behalf of my employer. By signing below, the defined term “You” includes me and my employer.
@microsoft-github-policy-service agree company="Microsoft"

Contributor License Agreement

@microsoft-github-policy-service agree company="OffSec"

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Thank you for your contribution to WSL.
No fatal errors have been found.
The following suggestions have been found in this pull request:

  • kali/kali-linux: Found discouraged system unit: /usr/lib/systemd/system/local-fs.target.wants/tmp.mount
  • kali/kali-linux: Found discouraged system unit: /usr/lib/systemd/system/sysinit.target.wants/systemd-tmpfiles-setup-dev-early.service
  • kali/kali-linux: Found discouraged system unit: /usr/lib/systemd/system/sysinit.target.wants/systemd-tmpfiles-setup-dev.service
  • kali/kali-linux: Found discouraged system unit: /usr/lib/systemd/system/sysinit.target.wants/systemd-tmpfiles-setup.service
  • kali/kali-linux: Found discouraged system unit: /etc/systemd/system/network-online.target.wants/networking.service
  • kali/kali-linux: Found discouraged system unit: /usr/lib/systemd/system/local-fs.target.wants/tmp.mount
  • kali/kali-linux: Found discouraged system unit: /usr/lib/systemd/system/sysinit.target.wants/systemd-tmpfiles-setup.service
  • kali/kali-linux: Found discouraged system unit: /usr/lib/systemd/system/sysinit.target.wants/systemd-tmpfiles-setup-dev.service
  • kali/kali-linux: Found discouraged system unit: /usr/lib/systemd/system/sysinit.target.wants/systemd-tmpfiles-setup-dev-early.service
  • kali/kali-linux: Found discouraged system unit: /etc/systemd/system/network-online.target.wants/networking.service

@OneBlue
Copy link
Collaborator

OneBlue commented Jan 17, 2025

Thank you @Gamb1ts !

Feel free to ignore the bot's warnings on the masked systemd units, I need to go fix that !

The tar & manifest look great ! One small suggestion that I have would to use systemctl is-system-running in /usr/lib/wsl/wsl-oobe so we could get remove the sleep 25 and make the distribution start a bit faster.

Something like this should do the trick:

timeout 25 bash -c 'while ! systemctl is-system-running | grep -E "running|degraded" ; do sleep 1; done'  || echo "warning: timed out waiting for systemd to start"

@benhillis
Copy link
Member

What's the goal of sleeping to wait for systemd in the oobe script? If you want to make sure that no user processes are launched before systemd is up, that should already be guaranteed as part of WSL. Is that not the behavior you are seeing?

@Gamb1ts Gamb1ts changed the title Add Kali to modern distributions WIP: Add Kali to modern distributions Jan 17, 2025
@Gamb1ts
Copy link
Author

Gamb1ts commented Jan 17, 2025

Early in my testing I found that the system setup was too quick which led to issues using certain commands. However, this was prior to masking the recommended systemd units. I will re-visit this and see if in its current state the wait is necessary.

Unfortunately I will have to mark this as WIP until next week, we will need to change where we host the image. Next week I will supply the new URL and checksums.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants