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

Failing tests due to string quoting changes in systemd unit files #310

Closed
achilleas-k opened this issue Apr 16, 2024 · 0 comments · Fixed by #311
Closed

Failing tests due to string quoting changes in systemd unit files #310

achilleas-k opened this issue Apr 16, 2024 · 0 comments · Fixed by #311

Comments

@achilleas-k
Copy link
Member

achilleas-k commented Apr 16, 2024

In osbuild/images#567 we made a non-functional change to the way we write systemd unit files. The Environment option in the osbuild stage now supports multiple entries. At the same time, we made it so that key=value assignments are quoted, which makes it easier to work with values with spaces.
From the systemd-exec man page:

ENVIRONMENT
       Environment=
           Sets environment variables for executed processes. Each line is unquoted using the rules described in "Quoting" section in
           systemd.syntax(7) and becomes a list of variable assignments. If you need to assign a value containing spaces or the equals sign to a
           variable, put quotes around the whole assignment.
...

           Example:

               Environment="VAR1=word1 word2" VAR2=word3 "VAR3=$word 5 6"

I think this change made CIV start failing to validate because it expects the unquoted strings in some of the cloud systemd units like here:

'expect_config': 'Environment=NM_CLOUD_SETUP_AZURE=yes'

The line now is Environment="NM_CLOUD_SETUP_AZURE=yes" instead of Environment=NM_CLOUD_SETUP_AZURE=yes.

croissanne added a commit to croissanne/cloud-image-val that referenced this issue Apr 16, 2024
Newer versions of osbuild & images quote environment variables in
systemd unit files.

Fixes osbuild#310
croissanne added a commit to croissanne/cloud-image-val that referenced this issue Apr 16, 2024
Newer versions of osbuild & images quote environment variables in
systemd unit files.

Fixes osbuild#310
croissanne added a commit to croissanne/cloud-image-val that referenced this issue Apr 16, 2024
Newer versions of osbuild & images quote environment variables in
systemd unit files.

Fixes osbuild#310
croissanne added a commit to croissanne/cloud-image-val that referenced this issue Apr 16, 2024
Newer versions of osbuild & images quote environment variables in
systemd unit files.

Fixes osbuild#310
croissanne added a commit that referenced this issue Apr 16, 2024
Newer versions of osbuild & images quote environment variables in
systemd unit files.

Fixes #310
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 a pull request may close this issue.

1 participant