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

Info file parameter support #1896

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

Info file parameter support #1896

wants to merge 16 commits into from

Conversation

jreidinger
Copy link
Contributor

@jreidinger jreidinger commented Jan 14, 2025

Problem

The linuxrc provides quite useful option to specify remote "info" file that contain additional parameters. It helps when kernel command line is restricted by amount of characters or if writing to it is annoying and it is better to point to that info file.

Solution

Implement support for agama.info. Also implement filtering of agama specific kernel options and write it to /etc/agama/kernel.cmdline.conf so yast2-bootloader can use it for proposal.

Note: agama.info does not support all linuxrc info features like it quire correct name agama.info= without any additional dots, dashes or different letter case. It also currently support only single info parameter and it cannot be recursive, so additional info parameters are not expanded. And last but not least it supports only url that is supported by curl.

Testing

  • tested manually with own iso and passing live.password= param.

TODO:

  • merged after Beta1
  • add changelog before merge to avoid too much conflicts
  • document new option in agama github page

@jreidinger jreidinger changed the title create also file with kernel only files for bootloader proposal Info file parameter support Jan 20, 2025
@coveralls
Copy link

coveralls commented Jan 20, 2025

Pull Request Test Coverage Report for Build 12870853407

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 70.961%

Totals Coverage Status
Change from base Build 12810406017: 0.0%
Covered Lines: 17174
Relevant Lines: 24202

💛 - Coveralls

INFO_CONTENT="${2:-/etc/agama.d/cmdline.info.conf}"

expand_info_arg() {
INFO_URL=$(sed -n 's/\(.*[[:space:]]\|^\)agama\.info=\([^[:space:]]\+\).*/\2/p' "$TARGET")
Copy link
Contributor

Choose a reason for hiding this comment

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

This picks up only one info file. Linuxrc supports multiple info arguments. Then it downloads and merges all info files.

This might be pretty useful. You can have a generic info file and an optional debugging one which additionally enables some debug features. This avoids duplicating the common parts between the info files. Just use the common one and if needed easily add the debugging one.

Copy link
Contributor

Choose a reason for hiding this comment

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

And linuxrc supports nested info files, you can use info= in info file as well... 😉

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I know about both of those linuxrc features and it is possible to implement it, I just do not see much usage for it. What I see so far from bug reports is that there is just single info file param that contain required parameters. In the end there is not so much parameters you need to use and usually it is more like debug.info and if needed some production.info file.
I plan to document this limitation to old linuxrc behavior and if there is interest in extending it, we can always do it.

Copy link
Contributor

Choose a reason for hiding this comment

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

It also allow different locations not sure if the same supported by curl... so something to document too.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yeap, also true

Co-authored-by: Knut Alejandro Anderssen González <[email protected]>
@jreidinger jreidinger marked this pull request as ready for review January 21, 2025 10:42
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.

4 participants