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

RPM package missing config file #994

Open
sabedevops opened this issue Oct 2, 2024 · 2 comments
Open

RPM package missing config file #994

sabedevops opened this issue Oct 2, 2024 · 2 comments
Assignees

Comments

@sabedevops
Copy link
Contributor

The commit ff12270 added logic to unlink the ziti-edge-tunnel.service unit file in the post.sh script here.

This causes the RPM database to list this file as missing since it is marked with %config in the generated RPM Spec file.

sudo rpm -V ziti-edge-tunnel
.M....G..    /opt/openziti/etc/identities
missing   c /opt/openziti/share/ziti-edge-tunnel.service
.M...UG..    /var/lib/ziti

Perhaps adding it to the CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION might work if desired.

@qrkourier
Copy link
Member

blocked by #965

@qrkourier
Copy link
Member

Recap: the post-install scripts introspect the OS to discover the correct location to place the systemd service unit for ZET. This can't be done as reliably at build time, so it's necessary to install the service unit in the package to a predictable location, then move it to the correct location for the specific distribution and vintage. This causes the package manager to complain that a file it was asked to manage is missing.

We could stop moving it, and only copy it. This is the way it was done at first, and we started removing the unit file because its presence caused confusion. Specifically, users found the unit file and assumed they could modify and load and were confused that their changes were not in effect.

We could mitigate that risk of confusion by adding a note in the unit file like:

Do not modify this main unit file. Run systemctl cat ziti-edge-tunnel.service to see the unit's file location(s) and the configuration provided by each. You can customize the unit by adding or overriding directives with a drop-in: /etc/systemd/system/ziti-edge-tunnel.service.d/override.conf.

This would eliminate the problem we're now facing with installed files that are missing because they were deleted by the post-install script, and would be more helpful than simply removing the main unit file from its installed location because we would also be answering "How do I customize the unit?"

@qrkourier qrkourier self-assigned this Nov 22, 2024
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

No branches or pull requests

2 participants