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

Use ${DESTDIR} for config #864

Merged
merged 1 commit into from
Oct 30, 2024
Merged

Use ${DESTDIR} for config #864

merged 1 commit into from
Oct 30, 2024

Conversation

Itxaka
Copy link
Contributor

@Itxaka Itxaka commented Oct 24, 2024

Prepends ${DESTDIR} for config dir creation and config file copying, so its in line with the other artifacts. Makes no sense to be able to install to dir X but config files being created in the system /etc/ dir

@ansasaki
Copy link
Contributor

Prepends ${DESTDIR} for config dir creation and config file copying, so its in line with the other artifacts. Makes no sense to be able to install to dir X but config files being created in the system /etc/ dir

Why do you believe it makes no sense to install them at /etc/?

It is basically the default location where the Keylime agent binary will search for the configuration file. Changing this location will simply make the configuration file to not be used. Similarly, changing the location where the systemd unit files is installed will make systemd to not use it and, therefore, not configure the service as expected.

@Itxaka
Copy link
Contributor Author

Itxaka commented Oct 28, 2024

Prepends ${DESTDIR} for config dir creation and config file copying, so its in line with the other artifacts. Makes no sense to be able to install to dir X but config files being created in the system /etc/ dir

Why do you believe it makes no sense to install them at /etc/?

It is basically the default location where the Keylime agent binary will search for the configuration file. Changing this location will simply make the configuration file to not be used. Similarly, changing the location where the systemd unit files is installed will make systemd to not use it and, therefore, not configure the service as expected.

I think it makes no sense to allow setting ${DESTDIR} but then not respect that, makes for a very weird choice :D

i.e. If im packaging this as a sysextension, I migth want everything to be installed at /tmp/keylime so then I can build a sysextension from the binaries and a confextension from the files under /etc

Maybe I just want to inspect the config files or where the files are supposed to go because Im building a keylime installer.

So Im not against setting it to /etc but if the user mentions a ${DESTDIR} and we use that as root for all the artifacts, it makes sense :D Plus the rest of the files also use ${DESTIR} as root for the locations of the files (binaries and systemd files)

@ansasaki
Copy link
Contributor

ansasaki commented Oct 29, 2024

@Itxaka OK, you convinced me :)

I think it makes sense to allow the user to install all the files to some custom location for inspection.

EDIT: I'll take the liberty of rebasing your PR to be able to merge it sooner.

Prepends ${DESTDIR} for config dir creation and config file copying, so its in line with the other artifacts. Makes no sense to be able to install to dir X but config files being created in the system /etc/ dir

Signed-off-by: Itxaka <[email protected]>
Copy link

codecov bot commented Oct 29, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 59.61%. Comparing base (2f7b3ad) to head (f035eac).
Report is 58 commits behind head on master.

Additional details and impacted files
Flag Coverage Δ
e2e-testsuite 59.61% <ø> (+2.02%) ⬆️
upstream-unit-tests 59.61% <ø> (+8.60%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

see 10 files with indirect coverage changes

@ansasaki ansasaki merged commit a3bfd5a into keylime:master Oct 30, 2024
12 checks passed
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