-
Notifications
You must be signed in to change notification settings - Fork 519
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
Allow overriding the "pretty" name of the OS inside the image #1330
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.
🍰
Some arguments have internal spaces, like the list of packages in --build-arg PACKAGES=a b c. This was handled using a "|" marker that was later replaced by spaces. For other uses of --build-arg, like PRETTY_NAME, we don't want to arbitrarily restrict the characters that can be used, in case someone wants "|" in their OS name. This change stores arguments directly in vectors, rather than strings that we split on space, so that we can pass through arbitrary characters.
^ This push rebases on develop. |
The following push (which GitHub doesn't show distinctly) adds the above commit, which reorganizes the buildsys file to use argument vecs instead of strings, so that we can handle arbitrary characters. This is intended to address @samuelkarp's concern. |
Issue number:
Fixes #1314 - thanks @diranged!
Description of changes:
Similar to #1312, this passes another field through for user customization - this time the "pretty name" that shows up in os-release, which in turn is used by k8s and other tools.
The second commit reorganizes buildsys's builder module to use argument vectors instead of strings, so we can handle arbitrary characters, rather than using "|" as a marker (and subsequently making it unavailable to names).
Testing done:
Specifying a pretty name works:
Default is still OK:
Retested with the second (refactor) commit and found that buildsys still produced the artifacts in the same way, and the resulting AMIs were still happy and healthy. Here's one with a weird name:
Terms of contribution:
By submitting this pull request, I agree that this contribution is dual-licensed under the terms of both the Apache License, version 2.0, and the MIT license.