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 build warnings for "File listed twice" #332

Open
Fryguy opened this issue Nov 1, 2022 · 3 comments · May be fixed by #352
Open

RPM build warnings for "File listed twice" #332

Fryguy opened this issue Nov 1, 2022 · 3 comments · May be fixed by #352
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@Fryguy
Copy link
Member

Fryguy commented Nov 1, 2022

Not sure why this is happening, but opening a bug. Decided to not put this in #200 since that is more focused on the other WARNING entries.

warning: File listed twice: /var/www/miq/vmdb/certs
warning: File listed twice: /var/www/miq/vmdb/config
warning: File listed twice: /var/www/miq/vmdb/config/application.rb
warning: File listed twice: /var/www/miq/vmdb/config/boot.rb
warning: File listed twice: /var/www/miq/vmdb/config/brakeman.yml
warning: File listed twice: /var/www/miq/vmdb/config/cable.yml
warning: File listed twice: /var/www/miq/vmdb/config/cable.yml
warning: File listed twice: /var/www/miq/vmdb/config/database.pg.yml
warning: File listed twice: /var/www/miq/vmdb/config/environment.rb
warning: File listed twice: /var/www/miq/vmdb/config/environments
warning: File listed twice: /var/www/miq/vmdb/config/environments/development.rb
warning: File listed twice: /var/www/miq/vmdb/config/environments/i18n.rb
warning: File listed twice: /var/www/miq/vmdb/config/environments/patches
warning: File listed twice: /var/www/miq/vmdb/config/environments/patches/database_configuration.rb
warning: File listed twice: /var/www/miq/vmdb/config/environments/production.rb
warning: File listed twice: /var/www/miq/vmdb/config/ha_admin.yml
warning: File listed twice: /var/www/miq/vmdb/config/human_locale_names.yaml
warning: File listed twice: /var/www/miq/vmdb/config/initializers
warning: File listed twice: /var/www/miq/vmdb/config/initializers/active_metrics.rb
warning: File listed twice: /var/www/miq/vmdb/config/initializers/add_active_support_duration_to_eo_time.rb
warning: File listed twice: /var/www/miq/vmdb/config/initializers/as_to_time.rb
warning: File listed twice: /var/www/miq/vmdb/config/initializers/backtrace_silencers.rb
warning: File listed twice: /var/www/miq/vmdb/config/initializers/fast_gettext.rb
warning: File listed twice: /var/www/miq/vmdb/config/initializers/instantiation_listener.rb
warning: File listed twice: /var/www/miq/vmdb/config/initializers/marshal_autoloader.rb
warning: File listed twice: /var/www/miq/vmdb/config/initializers/mime_types.rb
warning: File listed twice: /var/www/miq/vmdb/config/initializers/nokogiri_as_xmlmini_backend.rb
warning: File listed twice: /var/www/miq/vmdb/config/initializers/postgres_required_versions.rb
warning: File listed twice: /var/www/miq/vmdb/config/initializers/rack_attack.rb
warning: File listed twice: /var/www/miq/vmdb/config/initializers/rack_ruby_prof.rb
warning: File listed twice: /var/www/miq/vmdb/config/initializers/secure_headers.rb
warning: File listed twice: /var/www/miq/vmdb/config/initializers/session_store.rb
warning: File listed twice: /var/www/miq/vmdb/config/initializers/wrap_parameters.rb
warning: File listed twice: /var/www/miq/vmdb/config/initializers/yaml_autoloader.rb
warning: File listed twice: /var/www/miq/vmdb/config/locale_task_config.yaml
warning: File listed twice: /var/www/miq/vmdb/config/messaging.artemis.yml
warning: File listed twice: /var/www/miq/vmdb/config/messaging.kafka.yml
warning: File listed twice: /var/www/miq/vmdb/config/miq_expression.yml
warning: File listed twice: /var/www/miq/vmdb/config/preinitializer.rb
warning: File listed twice: /var/www/miq/vmdb/config/puma.rb
warning: File listed twice: /var/www/miq/vmdb/config/replication_exclude_tables.yml
warning: File listed twice: /var/www/miq/vmdb/config/routes.rb
warning: File listed twice: /var/www/miq/vmdb/config/settings
warning: File listed twice: /var/www/miq/vmdb/config/settings.yml
warning: File listed twice: /var/www/miq/vmdb/config/settings/development.yml
warning: File listed twice: /var/www/miq/vmdb/config/settings/production.yml
warning: File listed twice: /var/www/miq/vmdb/config/settings/test.yml
warning: File listed twice: /var/www/miq/vmdb/data
warning: File listed twice: /var/www/miq/vmdb/data/git_repos
warning: File listed twice: /var/www/miq/vmdb/data/git_repos/locks
warning: File listed twice: /var/www/miq/vmdb/log
warning: File listed twice: /var/www/miq/vmdb/log/apache
warning: File listed twice: /var/www/miq/vmdb/tmp
warning: File listed twice: /var/www/miq/vmdb/tmp/cache
warning: File listed twice: /var/www/miq/vmdb/tmp/cache/sti_loader.yml
warning: File listed twice: /var/www/miq/vmdb/tmp/pids
warning: File listed twice: /var/www/miq/vmdb/tmp/sockets
@Fryguy Fryguy added the bug Something isn't working label Nov 1, 2022
@kbrock
Copy link
Member

kbrock commented Dec 13, 2022

ok, so this is coming from manageiq-core

%{app_root}
%attr(-,manageiq,manageiq) %{app_root}/certs
%attr(-,manageiq,manageiq) %{app_root}/config
%attr(-,manageiq,manageiq) %{app_root}/log
%attr(-,manageiq,manageiq) %{app_root}/tmp
%attr(-,manageiq,manageiq) %{app_root}/data

We define a general rule on the first line (so we don't miss any). These are all owned by root. We then explicitly list a few directories that are manageiq. Since the first line is recursive, these directories are defined twice. Hence the error.

working on a fix that does not need to list every file

kbrock added a commit to kbrock/manageiq-rpm_build that referenced this issue Dec 13, 2022
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.
@kbrock kbrock linked a pull request Dec 13, 2022 that will close this issue
@miq-bot miq-bot added the stale label Mar 20, 2023
@miq-bot
Copy link
Member

miq-bot commented Mar 20, 2023

This issue has been automatically marked as stale because it has not been updated for at least 3 months.

If you can still reproduce this issue on the current release or on master, please reply with all of the information you have about it in order to keep the issue open.

Thank you for all your contributions! More information about the ManageIQ triage process can be found in the triage process documentation.

@Fryguy Fryguy removed the stale label Mar 20, 2023
@miq-bot miq-bot added the stale label Jun 26, 2023
@miq-bot
Copy link
Member

miq-bot commented Jun 26, 2023

This issue has been automatically marked as stale because it has not been updated for at least 3 months.

If you can still reproduce this issue on the current release or on master, please reply with all of the information you have about it in order to keep the issue open.

Thank you for all your contributions! More information about the ManageIQ triage process can be found in the triage process documentation.

@Fryguy Fryguy added help wanted Extra attention is needed and removed stale labels Jun 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants