-
Notifications
You must be signed in to change notification settings - Fork 25
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
list all vmdb directories in the gem #352
base: master
Are you sure you want to change the base?
Conversation
Overview ======== Fixes ManageIQ#332 The goal is to remove a warning: ``` warning: File listed twice: /var/www/miq/vmdb/certs (a few hundred files do this) ``` Before ====== ``` %defattr(-,root,root,-) %{app_root} %attr(-,manageiq,manageiq) %{app_root}/certs ``` We stated that we included all files recursively under app_root (/var/www/miq/vmdb). Then we stated a few directories (with different privileges) under app_root. So we ended up with duplicates. Why? ==== Most app_root subdirectories are owned by root, which is the default, so using the app_root line works. There are a few config directories that need to be editable and owned by the end user. That is why they are listed with the `%attr()` syntax. After ===== We explicitly listed each folder in the rails root. I would have liked to keep on using the app_root rule so any additional files would be auto added. This is tricky because we tend to not debug the directory listing of the `rpm` So there is a good chance that we will add a directory to app_root (vmdb / manageiq-core root) and will think it is all set but will fail on the appliance.
@@ -55,12 +55,38 @@ done | |||
|
|||
%files core | |||
%defattr(-,root,root,-) | |||
%{app_root} | |||
%{app_root}/AUTHORS |
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.
Do we also need to add a %dir %{app_root}
for the directory itself?
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.
so %dir
says to add a directory only and not the files underneath it.
I was pretty sure that adding the file app_root/AUTHORS
(in addition to the next 10
lines) would add app_root
with the default attributes.
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.
Based on what I'm reading we probably need %dir for app_root, since we want the rpm to own that dir.
I'm concerned keeping this up to date will be a pain - I wonder if we can leverage %exclude to make it work? Something like the following?
|
a. I'm very concerned about keeping this up to date I'll try one more time with the AlternativesOur big issue is that we are trying to put down a directory with both code and user data there.
|
yea, just tried the exclude example again. it is so clean but it does not work
|
This pull request has been automatically marked as stale because it has not been updated for at least 3 months. If these changes are still valid, please remove the Thank you for all your contributions! More information about the ManageIQ triage process can be found in the triage process documentation. |
This pull request has been automatically closed because it has not been updated for at least 3 months. Feel free to reopen this pull request if these changes are still valid. Thank you for all your contributions! More information about the ManageIQ triage process can be found in the triage process documentation. |
think our current suggestion is to extract user content into its own gem and have all of those files owned by |
Checked commit kbrock@80b19f9 with ruby 2.6.10, rubocop 1.28.2, haml-lint 0.35.0, and yamllint |
This pull request has been automatically marked as stale because it has not been updated for at least 3 months. If these changes are still valid, please remove the Thank you for all your contributions! More information about the ManageIQ triage process can be found in the triage process documentation. |
This pull request has been automatically marked as stale because it has not been updated for at least 3 months. If these changes are still valid, please remove the |
3 similar comments
This pull request has been automatically marked as stale because it has not been updated for at least 3 months. If these changes are still valid, please remove the |
This pull request has been automatically marked as stale because it has not been updated for at least 3 months. If these changes are still valid, please remove the |
This pull request has been automatically marked as stale because it has not been updated for at least 3 months. If these changes are still valid, please remove the |
Overview
Fixes #332
The goal is to remove a warning:
Before
We stated that we included all files recursively under app_root (/var/www/miq/vmdb).
Then we stated a few directories (with different privileges) under app_root.
So we ended up with duplicates.
Why?
Most app_root subdirectories are owned by root, which is the default, so using the app_root line works.
There are a few config directories that need to be editable and owned by the end user. That is why they are listed with the
%attr()
syntax.After
We explicitly listed each folder in the rails root.
I would have liked to keep on using the app_root rule so any additional files would be auto added.
This is tricky because we tend to not debug the directory listing of the
rpm
So there is a good chance that we will add a directory to app_root (vmdb / manageiq-core root) and will think it is all set but will fail on the appliance.