-
Notifications
You must be signed in to change notification settings - Fork 148
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
ekohl
wants to merge
1
commit into
theforeman:rpm/develop
Choose a base branch
from
ekohl:rpm/develop-18539-introduce-plugin-files-in-macro
base: rpm/develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ | |
%global dynflow_sidekiq_service_name dynflow-sidekiq@ | ||
%global rake /usr/bin/rake | ||
|
||
%global release 1 | ||
%global release 2 | ||
%global prereleasesource develop | ||
%global prerelease %{?prereleasesource} | ||
|
||
|
@@ -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 \\ | ||
cat <<GEMFILE > %%{buildroot}%%{%{name}_bundlerd_dir}/%%{-n*}%%{!?-n:%%{gem_name}}.rb \\ | ||
gem '%%{-n*}%%{!?-n:%%{gem_name}}' \\ | ||
GEMFILE | ||
|
@@ -707,6 +708,7 @@ chown foreman:foreman %%{foreman_dir}/tmp/restart_required_changed_plugins || : | |
# -a Prebuild apipie cache | ||
# -s Precompile assets | ||
%%%{name}_precompile_plugin(r:n:as) \\ | ||
touch %%%{name}_plugin_files \\ | ||
mkdir -p ./%{_datadir} \\ | ||
cp -r %%{%{name}_dir} ./%{_datadir} || echo 0 \\ | ||
mkdir -p ./%{_localstatedir}/lib/%{name} \\ | ||
|
@@ -735,16 +737,23 @@ popd \\ | |
rm -rf ./usr \\ | ||
%%{?-a:mkdir -p %%{buildroot}%%{foreman_dir}/public/apipie-cache/plugin} \\ | ||
%%{?-a:ln -s %%{%{name}_apipie_cache_plugin} %%{buildroot}%%{%{name}_apipie_cache_foreman}} \\ | ||
%%{?-a:echo %%%%dir %%{buildroot}%%{%{name}_apipie_cache_plugin} >> %%%{name}_plugin_files} \\ | ||
%%{?-a:echo %%{buildroot}%%{%{name}_apipie_cache_foreman} >> %%%{name}_plugin_files} \\ | ||
%%{?-s:[ -e %%{buildroot}%%{%{name}_assets_plugin} ] && mkdir -p %%{buildroot}%%{foreman_dir}/public/assets} \\ | ||
%%{?-s:[ -e %%{buildroot}%%{%{name}_assets_plugin} ] && ln -s %%{%{name}_assets_plugin} %%{buildroot}%%{%{name}_assets_foreman}} \\ | ||
%%{?-s:[ -e %%{buildroot}%%{%{name}_assets_plugin} ] && echo %%%%dir %%{buildroot}%%{%{name}_assets_plugin} >> %%%{name}_plugin_files} \\ | ||
%%{?-s:[ -e %%{buildroot}%%{%{name}_assets_plugin} ] && echo %%{buildroot}%%{%{name}_assets_foreman} >> %%%{name}_plugin_files} \\ | ||
%%{?-s:[ -e %%{buildroot}%%{%{name}_webpack_plugin} ] && mkdir -p %%{buildroot}%%{foreman_dir}/public/webpack} \\ | ||
%%{?-s:[ -e %%{buildroot}%%{%{name}_webpack_plugin} ] && ln -s %%{%{name}_webpack_plugin} %%{buildroot}%%{%{name}_webpack_foreman}} \\ | ||
%%{?-s:[ -e %%{buildroot}%%{%{name}_webpack_plugin} ] && echo %%%%dir %%{buildroot}%%{%{name}_webpack_plugin} >> %%%{name}_plugin_files} \\ | ||
%%{?-s:[ -e %%{buildroot}%%{%{name}_webpack_plugin} ] && echo %%{buildroot}%%{%{name}_webpack_foreman} >> %%%{name}_plugin_files} \\ | ||
%%{?-s:rm -f %%{buildroot}%%{%{name}_webpack_plugin}/*.js.map} \\ | ||
%%{?-s:rm -f %%{buildroot}%%{gem_instdir}/public/webpack/foreman-vendor.*} \\ | ||
%%{?-s:rm -rf %%{buildroot}%%{gem_instdir}/public/webpack/fonts} \\ | ||
%%{?-s:rm -rf %%{buildroot}%%{gem_instdir}/public/webpack/images} | ||
EOF | ||
|
||
# TODO: exclude package.json & webpack above? | ||
|
||
%clean | ||
rm -rf %{buildroot} | ||
|
@@ -863,6 +872,9 @@ exit 0 | |
%systemd_postun %{name}.socket | ||
|
||
%changelog | ||
* Fri Aug 30 2024 Ewoud Kohl van Wijngaarden <[email protected]> - 3.13.0-0.2.develop | ||
- Introduce foreman_plugin_files file to plugins to include | ||
|
||
* Tue Aug 20 2024 Patrick Creech <[email protected]> - 3.13.0-0.1.develop | ||
- Bump version to 3.13-develop | ||
|
||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Note to self: this and other cases need to be