-
Notifications
You must be signed in to change notification settings - Fork 8
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
Wsl systemd #150
Wsl systemd #150
Changes from 6 commits
9f7a339
93c7b7f
5b5a303
045840f
0265af0
8859f97
ba68b44
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
## Testing WSL Changes | ||
|
||
This document serve as reminder how is the optimal way to test changes done for WSL firstboot as working with | ||
windows server can be linux unfriendly and we would like to test without any mocking to get the best results. | ||
|
||
### Creating Testing APPX | ||
|
||
The easiest way for me is to use OBS. Find the target release for WSL image like `SUSE:SLE-15-SP6:Update:WSL` | ||
and branch there `kiwi-images-wsl` that is responsible for creation of appx. In your branch create package | ||
yast2-firstboot ( as it is usually inherited from target and does not live in WSL subproject ) and copy there | ||
modified sources with rake tarball. It is also mandatory to link or branch package `wsl-appx` as it ensures | ||
that certificate used for appx matches with the one used in kiwi. | ||
Another important think is to ensure that certificate for home repo is valid and not outdated. To check it use | ||
`osc signkey --sslcert home:...` and if it is invalid use `osc signkey --sslcert --create home:jreidinger`. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I will use similar like in previous command that |
||
|
||
### Installing Modified APPX | ||
|
||
Just follow instructions on https://en.opensuse.org/WSL/Manual_Installation | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. NP: on or at? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yeah, I plan to use "on page" and ends in the middle. |
||
If there are any issue appx installer gets quite useless error, so use help at https://en.opensuse.org/WSL/Debugging_Hints | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. NP: I would change the sentence: appx installer reports quite useless error when there is any issue, so ... |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,9 @@ | ||
------------------------------------------------------------------- | ||
Thu Dec 14 20:38:43 UTC 2023 - Josef Reidinger <jreidinger@suse.com> | ||
|
||
- Allow selection WSL systemd pattern (jsc#PED-5644, jsc#PED-5099) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. NP: Allow selecting WSL ... |
||
- 4.6.3 | ||
|
||
------------------------------------------------------------------- | ||
Fri Sep 01 19:57:03 UTC 2023 - Josef Reidinger <jreidinger@suse.com> | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -39,18 +39,26 @@ class WSLProductSelection < ::UI::InstallationDialog | |
# @return [Boolean] | ||
attr_reader :wsl_gui_pattern | ||
|
||
# Whether the WSL systemd pattern was selected | ||
# | ||
# @return [Boolean] | ||
attr_reader :wsl_systemd_pattern | ||
|
||
# Constructor | ||
# | ||
# @param products [Array<Hash>] All possible products | ||
# @param default_product [Hash] Product selected by default | ||
# @param wsl_gui_pattern [Boolean] Whether WSL GUI pattern is selected by default | ||
def initialize(products, default_product: nil, wsl_gui_pattern: false) | ||
# @param wsl_systemd_pattern [Boolean] Whether WSL systemd pattern is selected by default | ||
def initialize(products, default_product: nil, wsl_gui_pattern: false, | ||
wsl_systemd_pattern: false) | ||
textdomain "firstboot" | ||
|
||
super() | ||
@products = products | ||
@product = default_product || products.first | ||
@wsl_gui_pattern = wsl_gui_pattern | ||
@wsl_systemd_pattern = wsl_systemd_pattern | ||
end | ||
|
||
def next_handler | ||
|
@@ -65,6 +73,8 @@ def dialog_title | |
_("Product Selection") | ||
end | ||
|
||
# disable rubocop metrics as yast ui is constructed with methods | ||
# rubocop:disable Metrics/AbcSize | ||
def dialog_content | ||
items = products.map { |p| item_for(p) } | ||
|
||
|
@@ -81,24 +91,40 @@ def dialog_content | |
), | ||
VSpacing(2), | ||
# TRANSLATORS: | ||
Label(_("The WSL GUI pattern provides some needed packages for\n" \ | ||
"a better experience with graphical applications in WSL.")), | ||
Left(Label(_("The WSL GUI pattern provides some needed packages for\n" \ | ||
"a better experience with graphical applications in WSL."))), | ||
VSpacing(1), | ||
# TRANSLATORS: check box label | ||
Left(CheckBox(Id(:wsl_gui_pattern), | ||
_("Install WSL GUI pattern (requires registration)"), | ||
wsl_gui_pattern)) | ||
wsl_gui_pattern)), | ||
VSpacing(2), | ||
# TRANSLATORS: | ||
Left(Label(_("The WSL systemd pattern provides wsl.conf adjustment\n" \ | ||
"and init symlink for systemd enablement in WSL."))), | ||
VSpacing(1), | ||
# TRANSLATORS: check box label | ||
Left(CheckBox(Id(:wsl_systemd_pattern), | ||
_("Install WSL systemd pattern (requires registration)"), | ||
wsl_systemd_pattern)) | ||
) | ||
) | ||
end | ||
# rubocop:enable Metrics/AbcSize | ||
|
||
def help_text | ||
# TRANSLATORS: help text (1/2) | ||
# TRANSLATORS: help text (1/3) | ||
_("<p>Select the product to use with Windows Subsystem for Linux (WSL). " \ | ||
"Some products might require registration.</p>") + | ||
# TRANSLATORS: help text (2/2) | ||
_("<p>To use graphical programs in WSL you need to install the WSL GUI pattern. " \ | ||
"In that case the system needs to be registered as well.</p>") | ||
# TRANSLATORS: help text (2/3) | ||
_("<p>For smoother experience with graphical programs in WSL " \ | ||
"the WSL GUI pattern provides recommended config, tools and libraries. " \ | ||
"In that case the system needs to be registered as well.</p>") + | ||
# TRANSLATORS: help text (3/3) | ||
_("<p>For enablement of systemd in WSL the WSL systemd pattern provides wsl.conf " \ | ||
"and /sbin/init adjustments. " \ | ||
"In that case the system needs to be registered as well. " \ | ||
"Also be aware that systemd enablement is in effect only after relaunch.</p>") | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I would reword the last sentence a bit: "Reboot is required for enabling systemd". There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. problem is that in wsl it is not reboot. That is why I use relaunch...so I would use your sentence with Relaunch |
||
end | ||
|
||
private | ||
|
@@ -146,6 +172,7 @@ def product_label(product) | |
|
||
def save | ||
@wsl_gui_pattern = Yast::UI.QueryWidget(Id(:wsl_gui_pattern), :Value) | ||
@wsl_systemd_pattern = Yast::UI.QueryWidget(Id(:wsl_systemd_pattern), :Value) | ||
|
||
selected_id = Yast::UI.QueryWidget(Id(:product_selector), :Value) | ||
@product = products.find { |p| item_id(p) == selected_id } | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would about "for me" in this documents. Instead, I would directly say "The easiest way is to use OBS".