Bug #23361
plugin RPMs do not build when they contain webpack assets
Description
** Invoke plugin:assets:precompile (first_time) ** Invoke environment (first_time) ** Execute environment /opt/theforeman/tfm/root/usr/share/gems/gems/logging-1.8.2/lib/logging/logger.rb:295: warning: constant ::Fixnum is deprecated API controllers newer than Apipie cache! Run apipie:cache rake task to regenerate cache. INFO app : Current user: foreman_admin (administrator) INFO app : Current user: foreman_admin (administrator) INFO app : Current user: foreman_admin (administrator) rake aborted! Errno::EACCES: Permission denied @ rb_sysopen - /builddir/build/BUILD/rubygem-katello-3.7.0/usr/share/foreman/public/webpack/manifest.json /builddir/build/BUILD/rubygem-katello-3.7.0/usr/share/foreman/config/initializers/assets.rb:109:in `initialize' /builddir/build/BUILD/rubygem-katello-3.7.0/usr/share/foreman/config/initializers/assets.rb:109:in `open' /builddir/build/BUILD/rubygem-katello-3.7.0/usr/share/foreman/config/initializers/assets.rb:109:in `block (2 levels) in <top (required)>' …
Associated revisions
History
#1
Updated by Evgeni Golov over 4 years ago
It tries to write the the foreman webpack/manifest.json
and that's not allowed in this scenario.
#2
Updated by Evgeni Golov over 4 years ago
- Subject changed from tfm-rubygem-katello RPM does not build to plugin RPMs do not build when they contain webpack assets
- Project changed from Packaging to Foreman
#3
Updated by The Foreman Bot over 4 years ago
- Assignee set to Ewoud Kohl van Wijngaarden
- Status changed from New to Ready For Testing
- Pull request https://github.com/theforeman/foreman/pull/5478 added
#4
Updated by Ondřej Pražák over 4 years ago
- Legacy Backlogs Release (now unused) set to 330
#5
Updated by Anonymous over 4 years ago
- % Done changed from 0 to 100
- Status changed from Ready For Testing to Closed
Applied in changeset 9392da0a365ca4ed2dbc83a96281d2557a8541bd.
Fixes #23361 - Handle webpack manifests from plugins
In a production setup Foreman can't write to the manifest.json location.
Here we copy the pattern from the above sprockets initialization and
change the webpack-rails setting to read it. Because webpack-rails
only supports initializing the manifest by reading a file, we monkey
patch it to allow us setting it explicitly.