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

systemd.unit.create: Add Environment and EnvironmentFile options (HMS-3814) #567

Merged
merged 5 commits into from
Apr 11, 2024

Conversation

achilleas-k
Copy link
Member

osbuild: new Environment options for systemd.unit.create

See osbuild/osbuild#1684

Signed-off-by: Achilleas Koutsou achilleas@koutsou.net


osbuild: new Environment options for systemd.unit

The Environment option in osbuild is now either a string or an array of
key-value pairs. Let's just implement the array of key-value pairs
here. It supports multiple instances and we don't need to make things
complicated here by supporting both.

This change modifies all RHEL EC2 and Azure images, but there is no
functional change.

See osbuild/osbuild#1684

Signed-off-by: Achilleas Koutsou achilleas@koutsou.net


osbuild: validate env var name in systemd.unit.create

Signed-off-by: Achilleas Koutsou achilleas@koutsou.net


osbuild: validate env var name in systemd.unit

Signed-off-by: Achilleas Koutsou achilleas@koutsou.net


bcl
bcl previously approved these changes Apr 9, 2024
Copy link
Contributor

@bcl bcl left a comment

Choose a reason for hiding this comment

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

I don't really like adding new panic() calls, but I suppose it's unavoidable. Looks ok otherwise.

@achilleas-k
Copy link
Member Author

I don't really like adding new panic() calls, but I suppose it's unavoidable. Looks ok otherwise.

I agree, panic calls should be for things that are plainly "illegal" programming-wise, especially now that this is a library. I'd like to do a full sweep of all the panics at some point but for now I'm keeping it consistent.

ondrejbudai
ondrejbudai previously approved these changes Apr 10, 2024
Copy link
Member

@ondrejbudai ondrejbudai left a comment

Choose a reason for hiding this comment

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

Thanks!

@ondrejbudai
Copy link
Member

...aaaand it has conflicts. :(

See osbuild/osbuild#1684

Signed-off-by: Achilleas Koutsou <achilleas@koutsou.net>
The Environment option in osbuild is now either a string or an array of
key-value pairs.  Let's just implement the array of key-value pairs
here.  It supports multiple instances and we don't need to make things
complicated here by supporting both.

This change modifies all RHEL EC2 and Azure images, but there is no
functional change.

See osbuild/osbuild#1684

Signed-off-by: Achilleas Koutsou <achilleas@koutsou.net>
Signed-off-by: Achilleas Koutsou <achilleas@koutsou.net>
Signed-off-by: Achilleas Koutsou <achilleas@koutsou.net>
@achilleas-k
Copy link
Member Author

achilleas-k commented Apr 10, 2024

The previous osbuild commit I used didn't have a CI build (even though it was the main HEAD at the time). Updated to the commit ID to one that I verified has RPM repos.

Signed-off-by: Achilleas Koutsou <achilleas@koutsou.net>
Copy link
Contributor

@bcl bcl left a comment

Choose a reason for hiding this comment

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

Good!

@bcl bcl added this pull request to the merge queue Apr 11, 2024
Merged via the queue into osbuild:main with commit 071c961 Apr 11, 2024
14 of 16 checks passed
@achilleas-k achilleas-k deleted the systemd/environment branch April 11, 2024 01:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants