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

Refs #18539 - Introduce foreman_plugin_files in foreman.macros #11190

Draft
wants to merge 1 commit into
base: rpm/develop
Choose a base branch
from

Conversation

ekohl
Copy link
Member

@ekohl ekohl commented Aug 30, 2024

This allows plugins to use %files -f foreman_plugin_files and automatically get the correct files section, based on the foreman_bundlerd_file and foreman_precompile_plugin macros (and their options).

@evgeni
Copy link
Member

evgeni commented Aug 30, 2024

But this also means we need to adjust every single plugin spec, while just adjusting the existing macros does not require it?

@ekohl
Copy link
Member Author

ekohl commented Aug 30, 2024

True, but the idea I have is to and up with less logic in gem2rpm/foreman_plugin.spec.erb anyway. Combined with #8414 I'd like to get rid of a lot of templating.

Perhaps it's better to separate that out, but I wanted to see. Friday always has time for a bit of experimentation, right?

This allows plugins to use %files -f foreman_plugin_files and
automatically get the correct files section, based on the
foreman_bundlerd_file and foreman_precompile_plugin macros (and their
options).
@ekohl ekohl force-pushed the rpm/develop-18539-introduce-plugin-files-in-macro branch from 5198019 to 133fd0e Compare August 30, 2024 10:24
Copy link
Member Author

@ekohl ekohl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've become convinced this is getting too complex and we should really take it as a bigger step.

@@ -678,6 +678,7 @@ cat > %{buildroot}%{_sysconfdir}/rpm/macros.%{name}-plugin << EOF
# -n<plugin_name> Overrides default of gem_name
%%%{name}_bundlerd_file(n:) \\
mkdir -p %%{buildroot}%%{%{name}_bundlerd_dir} \\
echo %%{%{name}_bundlerd_dir}/%%{-n*}%%{!?-n:%%{gem_name}} >> %%%{name}_plugin_files \\
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note to self: this and other cases need to be

Suggested change
echo %%{%{name}_bundlerd_dir}/%%{-n*}%%{!?-n:%%{gem_name}} >> %%%{name}_plugin_files \\
echo %%{%{name}_bundlerd_dir}/%%{-n*}%%{!?-n:%%{gem_name}} >> %{name}_plugin_files \\

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants