-
Notifications
You must be signed in to change notification settings - Fork 348
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
Implement EULA spoke based on initial-setup #4687
Conversation
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.
Thanks! This looks good.
A couple of thoughts, in no particular order:
- Please add license to the code files, and don't forget to set correct year :)
- Probably needs team discussion if this should be a community feature or not. Personally I think that's fine as-is, there is very little code and it's usable primarily for RHEL anyway.
- It's debatable if the spoke should be also disabled by the default config or not. Ultimately that's a minor point, though.
- Note to self - the agreed/disagreed state needs to be stored in modularized backend, eventually.
| __all__ = ["EULASpoke"] | ||
|
|
||
|
|
||
| class EULASpoke(FirstbootOnlySpokeMixIn, NormalSpoke): |
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.
FirstbootOnlySpokeMixIn practically says it runs only in initial setup. Is that really the right parent to use? I'd expect only NormalSpoke here...
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 expected this spoke to be reusable by initial-setup and remove it from there after merging here in Anaconda. But I have not tested it properly with initial-setup yet.
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.
Initial setup has not been touched for a long time, is not enough of a priority to get actual dev time, and we're asking around to see if we can just drop it completely. So I'd expect it to just keep its own eula spoke and this be in anaconda only.
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, that might make more sense - not that much code is needed for EULA display, so it might make sense to just duplicate it in Anaconda, rather than to keep the screen reusable, with that special mixin and the necessary Initial Setup changes.
| @classmethod | ||
| def should_run(cls, environment, data): | ||
| if eula.eula_available(): | ||
| # don't run if we are in initial-setup in reconfig mode and the EULA has already been accepted | ||
| if FirstbootOnlySpokeMixIn.should_run(environment, data) and data and data.firstboot.firstboot == FIRSTBOOT_RECONFIG and data.eula.agreed: | ||
| log.debug("not running license spoke: reconfig mode & license already accepted") | ||
| return False | ||
| return True | ||
| return False |
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.
This needs changing a bit. All anaconda spokes work such that they are always visible, and kickstart changes only if they are completed or not.
- Since the spoke is not reused by initial setup, I think you can leave out the
FIRSTBOOT_RECONFIGpart. @M4rtinK - is that correct please? - The spoke visibility in
should_runshould depend only on eula presence. - The
data.eula.agreedbit should set up the checkbox, I think ininitialize.
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 data.eula.agreed bit should set up the checkbox, I think in initialize
Do you mean running GUI/TUI with a kickstart with eula --agreed? What is the use case for this, who and why will do that? Is it possible without hackery?
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.
Yes, it's actually very easy. If you don't make anaconda stop on incomplete kickstart, you can use a "partial kickstart" that does not satisfy all needed inputs, and the UIs will be pre-filled when it stops on the hub. It's a thing that is not really nice to support, but invaluable for testing. I run 99% of my anaconda debugging with this, so that I don't have to set it all every time I retry my changes :P Some spins also use this, except hidden in the "default kickstart", together with hiding spokes in config, to set up things that users can't change. It's a bit of a dark art, really.
The rest of the UI works this way, so it would be best to make it consistent.
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.
Since the spoke is not reused by initial setup, I think you can leave out the FIRSTBOOT_RECONFIG part. @M4rtinK - is that correct please?
Yes, I think it really makes more sense to just add the ability to Anaconda to show the EULA without also trying to reuse that screen from Initial Setup. This nicely shows the benefits of that - we can drop the Initial setup specific mixin (which still refers to the old "Firstboot" tool, to be even more confusing) as well as the Initial Setup specific reconfig functionality.
As for when the EULA spoke should show up - I think we should just check if an EULA is in the expected place & show it if there is something. That's how it works for Initial Setup & should work for the installer as well.
|
From team discussion today:
|
|
Note to self: The eula command would be in Payloads module, spoke under Software category. Right now, this is low priority compared to modularization for webui in f39 (hopefully). |
|
Sorry for very long delay :( Me and we in ROSA like the initial-setup utility. We began using it recently and like it. It has a nice architecture and nice integration with Anaconda. Its modularity (ability to add spokes) makes it be a great thing, better than e.g. GNOME's initial setup. Its UI is probably not the nicest, but it's OK, it looks good enough, and custom CSS can be written in theory. We are now making it possible to use initial-setup as the first time configuration wizard for OEM installations: a user buys a computer with Linux preinstalled and configures it via initial-setup (user, root password, EULA, custom spokes may be added). We are going to use the EULA spoke in both Anaconda and initial-setup, that is why I would like to avoid removing possibility to reuse it by initial-setup. but of course I can make it as you suggest here in Anaconda upstream and patch it in the downstream, but it is not he best way... |
Copied code from initial-setup and adapted it for Anaconda. It makes sense to show EULA before installation, not just text that it is in some file after the installation. TODO: It would be great to automatically choose license in the current language. Currently it is worked around in ROSA by creating a drop-in config: https://abf.io/import/anaconda/blob/6dc5b78efd/anaconda.sh#lc-77 Closes: rhinstaller#4686 Signed-off-by: Mikhail Novosyolov <m.novosyolov@rosalinux.ru>
cf4a883
to
e6f62b5
Compare
|
I've implemented reading "eula --agreed" from kickstart in GUI. It was implemented in TUI. I can also remove integration with initial-setup, but I would better leave it here in Anaconda and remove EULA code from initial-setup. |
|
Could you please give comments, should I make further changes? |
|
Sorry, we were focused on the WebUI moonshot, which is sort of undecided until beta (freeze?), I believe. I'll take a look again once there's time to do so. |
|
Ok, thanks) |
|
This PR is stale because it has been open 60 days with no activity. |
|
@VladimirSlavik ping |
|
Hi @mikhailnov, thank you for your contribution! After thorough discussion in our team meeting, it has been determined that presenting this feature as an add-on would be more in line with our current objectives. While the anaconda team acknowledges the importance of this work, it is our preference to encourage the development of this as an add-on. The responsibility for maintaining and supporting this feature as an add-on would primarily rest with the contributor, with the anaconda team available for guidance as needed.
Given these factors, we suggest reconsidering this as an add-on. Would you be open to taking this approach? The team is committed to actively supporting you during the migration process. Apologies for the delayed response, and we appreciate your understanding. |
Copied code from initial-setup and adapted it for Anaconda.
It makes sense to show EULA before installation, not just text that it is in some file after the installation.
TODO: It would be great to automatically choose license in the current language. Currently it is worked around in ROSA by creating a drop-in config: https://abf.io/import/anaconda/blob/6dc5b78efd/anaconda.sh#lc-77
Closes: #4686
It looks like this:
Here is Russian translation of new strings (they were not inside po and pot files in initial-setup):
In some places translation is not exact because otherwise words will be too long.
ISO image (LiveCD + installer) with Anaconda with EULA spoke: https://file-store.rosalinux.ru/download/2aaf53506bc7c689fa81ab1de078619afa6db568 (ROSA_2021.1_XFCE_x86_64_8.iso)