-
Notifications
You must be signed in to change notification settings - Fork 362
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
Add the locale1-x11-sync script to the anaconda-live subpackage #6149
base: main
Are you sure you want to change the base?
Add the locale1-x11-sync script to the anaconda-live subpackage #6149
Conversation
Looks good to me so far. |
259675c
to
70768b5
Compare
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.
The systemd unit wants a bit of polishing but other than that it looks good to me :).
I tested it and when the unit is moved it should work nicely. I'm happy to test it again when the PR is ready if needed.
anaconda.spec.in
Outdated
@@ -443,9 +449,11 @@ rm -rf \ | |||
# do not provide the live subpackage on RHEL | |||
|
|||
%files live | |||
%{_unitdir}/locale1-x11-sync.service |
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.
The service file needs to be installed as user service file.
https://docs.fedoraproject.org/en-US/packaging-guidelines/Systemd/#packaging_filesystem
We need to store it in /usr/lib/systemd/user
instead of the current path. The current path broke the script as it depends on user session variables. In other words use _userunitdir
rpm macro instead.
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.
OK, converted to a user unit. :)
@@ -0,0 +1,7 @@ | |||
[Unit] | |||
Description=Sync localed configuration with running X11 system |
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.
Missing Documentation
which is recommended by Packaging guidelines. So I'm thinking if we want to add Documentation
field with link to the script installed locally.
https://docs.fedoraproject.org/en-US/packaging-guidelines/Systemd/#unit_files_basic_format_unit_doc
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.
Or just point to https://github.com/rhinstaller/localed-x11-sync ?
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.
It's not the same code but why not.
@@ -0,0 +1,7 @@ | |||
[Unit] | |||
Description=Sync localed configuration with running X11 system | |||
|
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.
Missing [install]
section
https://docs.fedoraproject.org/en-US/packaging-guidelines/Systemd/#unit_files_basic_format_install
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.
Yeah, lets add that, pointing to the graphical target in our case.
[Service] | ||
Type=exec | ||
ExecStart=/usr/libexec/locale1-x11-sync | ||
Restart=on-failure |
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.
Add a missing newline please.
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.
Like an extra one at the end ? OK.
70768b5
to
a063a69
Compare
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.
Looks great to me. Thanks a lot for your help.
Hi @AdamWill, this change will enable Anaconda to control keyboards on X11 systems. The original plan was to have it as separate package It works with one bug similar to what Gnome Kiosk have right now, so it doesn't propagate keyboard change back to Anaconda (keyboard switching with keyboard shortcut). I'll try to get the fix to F42. Do you agree in getting this to X11 based Live spins? If yes, I'll ping the maintainers and create a PRs on livesys-scripts and kiwi/fedora-kickstarts. |
Hmm, I don't see a reason of this failure: Why we have untracked file on ELN but it works on Rawhide... Could it be because anaconda-live is not on ELN? |
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.
One more required change.
@@ -381,6 +386,7 @@ rm -rf \ | |||
%{buildroot}/%{_sysconfdir}/xdg/autostart/liveinst-setup.desktop \ | |||
%{buildroot}/%{_bindir}/liveinst \ | |||
%{buildroot}/%{_libexecdir}/liveinst-setup.sh \ | |||
%{buildroot}/%{_libexecdir}/locale1-x11-sync \ |
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 see, you need to add also service file here or we will break ELN builds.
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.
Oh right, there is a special section for this - not very intuitive. :P Anyway, should be added now. :)
did this used to "work"? didn't we used to defer to the host desktop environment for this kind of thing on live spins? that is: is this a new feature, or an attempt to 'fix' something that was broken by wayland? |
This script installed to the libexec folder and the systemd unit triggering it are needed for controlling X11 system keyboard layouts using the systemd-localed DBus API. Without the script and the systemd unit keyboard switching will not work on X11 Fedora Live spins. Both might end up in a separate package eventually but for now it should be enough to ship them as part of the anaconda-live package.
a063a69
to
a8c0035
Compare
It used to work but maintainers of the spin should be the one handling the migration. As requested here However, as I see that most of the X11 based spin maintainers are not much active, we are actively doing the work for them this way. So it is expected to be broken after Wayland switch. |
/kickstart-test --testtype smoke |
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.
Looks great to me. So if we get ACK from @AdamWill I think we can get this to F42.
sure, give it a shot. |
This script, installed to the libexec folder, is needed for controlling X11 system keyboard layouts using the systemd-localed DBus API.
Without this script keyboard switching will not work on X11 Fedora Live spins.
The script might end up in a separate package eventually but for now it should be enough to ship it as part of the anaconda-live package.