Rpm build of foreman_openscap

I try to build an rpm package for version 4.3.1 of foreman_openscap with the spec file from github foreman packaging. During the build I get this error:

node --max_old_space_size=2048 /root/rpmbuild/BUILD/foreman_openscap-4.3.1/usr/share/foreman/node_modules/webpack/bin/webpack.js --config /root/rpmbuild/BUILD/foreman_openscap-4.3.1/usr/share/foreman/config/webpack.config.js --bail --env.pluginName=foreman_openscap
ModuleNotFoundError: Module not found: Error: Can't resolve '@patternfly/patternfly/patternfly-addons.scss' in '/root/rpmbuild/BUILDROOT/rubygem-foreman_openscap-4.3.1-1.fm2_5.el8.x86_64/usr/share/gems/gems/foreman_openscap-4.3.1/webpack/routes/OvalPolicies/OvalPoliciesShow'
at factoryCallback (/usr/lib/node_modules/webpack/lib/Compilation.js:282:40)
at factory (/usr/lib/node_modules/webpack/lib/NormalModuleFactory.js:237:20)
at resolver (/usr/lib/node_modules/webpack/lib/NormalModuleFactory.js:60:20)
at asyncLib.parallel (/usr/lib/node_modules/webpack/lib/NormalModuleFactory.js:127:20)
at /usr/lib/node_modules/webpack/node_modules/async/dist/async.js:3888:9
at /usr/lib/node_modules/webpack/node_modules/async/dist/async.js:473:16
at iteratorCallback (/usr/lib/node_modules/webpack/node_modules/async/dist/async.js:1062:13)
at /usr/lib/node_modules/webpack/node_modules/async/dist/async.js:969:16
at /usr/lib/node_modules/webpack/node_modules/async/dist/async.js:3885:13
at resolvers.normal.resolve (/usr/lib/node_modules/webpack/lib/NormalModuleFactory.js:119:22)
at onError (/usr/lib/node_modules/webpack/node_modules/enhanced-resolve/lib/Resolver.js:65:10)
at loggingCallbackWrapper (/usr/lib/node_modules/webpack/node_modules/enhanced-resolve/lib/createInnerCallback.js:31:19)
at runAfter (/usr/lib/node_modules/webpack/node_modules/enhanced-resolve/lib/Resolver.js:158:4)
at innerCallback (/usr/lib/node_modules/webpack/node_modules/enhanced-resolve/lib/Resolver.js:146:3)
at loggingCallbackWrapper (/usr/lib/node_modules/webpack/node_modules/enhanced-resolve/lib/createInnerCallback.js:31:19)
at next (/usr/lib/node_modules/webpack/node_modules/tapable/lib/Tapable.js:252:11)
at /usr/lib/node_modules/webpack/node_modules/enhanced-resolve/lib/UnsafeCachePlugin.js:40:4
at loggingCallbackWrapper (/usr/lib/node_modules/webpack/node_modules/enhanced-resolve/lib/createInnerCallback.js:31:19)
at runAfter (/usr/lib/node_modules/webpack/node_modules/enhanced-resolve/lib/Resolver.js:158:4)
at innerCallback (/usr/lib/node_modules/webpack/node_modules/enhanced-resolve/lib/Resolver.js:146:3)
at loggingCallbackWrapper (/usr/lib/node_modules/webpack/node_modules/enhanced-resolve/lib/createInnerCallback.js:31:19)
at next (/usr/lib/node_modules/webpack/node_modules/tapable/lib/Tapable.js:252:11)
at innerCallback (/usr/lib/node_modules/webpack/node_modules/enhanced-resolve/lib/Resolver.js:144:11)
at loggingCallbackWrapper (/usr/lib/node_modules/webpack/node_modules/enhanced-resolve/lib/createInnerCallback.js:31:19)
at next (/usr/lib/node_modules/webpack/node_modules/tapable/lib/Tapable.js:249:35)
at resolver.doResolve.createInnerCallback (/usr/lib/node_modules/webpack/node_modules/enhanced-resolve/lib/DescriptionFilePlugin.js:44:6)
at loggingCallbackWrapper (/usr/lib/node_modules/webpack/node_modules/enhanced-resolve/lib/createInnerCallback.js:31:19)
at afterInnerCallback (/usr/lib/node_modules/webpack/node_modules/enhanced-resolve/lib/Resolver.js:166:11)
at loggingCallbackWrapper (/usr/lib/node_modules/webpack/node_modules/enhanced-resolve/lib/createInnerCallback.js:31:19)
at next (/usr/lib/node_modules/webpack/node_modules/tapable/lib/Tapable.js:249:35)
resolve '@patternfly/patternfly/patternfly-addons.scss' in '/root/rpmbuild/BUILDROOT/rubygem-foreman_openscap-4.3.1-1.fm2_5.el8.x86_64/usr/share/gems/gems/foreman_openscap-4.3.1/webpack/routes/OvalPolicies/OvalPoliciesShow'
Parsed request is a module
using description file: /root/rpmbuild/BUILDROOT/rubygem-foreman_openscap-4.3.1-1.fm2_5.el8.x86_64/usr/share/gems/gems/foreman_openscap-4.3.1/package.json (relative path: ./webpack/routes/OvalPolicies/OvalPoliciesShow)
Field 'browser' doesn't contain a valid alias configuration
after using description file: /root/rpmbuild/BUILDROOT/rubygem-foreman_openscap-4.3.1-1.fm2_5.el8.x86_64/usr/share/gems/gems/foreman_openscap-4.3.1/package.json (relative path: ./webpack/routes/OvalPolicies/OvalPoliciesShow)
resolve as module
looking for modules in /root/rpmbuild/BUILD/foreman_openscap-4.3.1/usr/share/foreman/webpack
using description file: /root/rpmbuild/BUILD/foreman_openscap-4.3.1/package.json (relative path: ./usr/share/foreman/webpack)
Field 'browser' doesn't contain a valid alias configuration
after using description file: /root/rpmbuild/BUILD/foreman_openscap-4.3.1/package.json (relative path: ./usr/share/foreman/webpack)
using description file: /root/rpmbuild/BUILD/foreman_openscap-4.3.1/package.json (relative path: ./usr/share/foreman/webpack/@patternfly/patternfly/patternfly-addons.scss)
no extension
Field 'browser' doesn't contain a valid alias configuration
/root/rpmbuild/BUILD/foreman_openscap-4.3.1/usr/share/foreman/webpack/@patternfly/patternfly/patternfly-addons.scss doesn't exist
.js
Field 'browser' doesn't contain a valid alias configuration
/root/rpmbuild/BUILD/foreman_openscap-4.3.1/usr/share/foreman/webpack/@patternfly/patternfly/patternfly-addons.scss.js doesn't exist
.json
Field 'browser' doesn't contain a valid alias configuration
/root/rpmbuild/BUILD/foreman_openscap-4.3.1/usr/share/foreman/webpack/@patternfly/patternfly/patternfly-addons.scss.json doesn't exist
as directory
/root/rpmbuild/BUILD/foreman_openscap-4.3.1/usr/share/foreman/webpack/@patternfly/patternfly/patternfly-addons.scss doesn't exist
looking for modules in /root/rpmbuild/BUILD/foreman_openscap-4.3.1/usr/share/foreman/node_modules
using description file: /root/rpmbuild/BUILD/foreman_openscap-4.3.1/package.json (relative path: ./usr/share/foreman/node_modules)
Field 'browser' doesn't contain a valid alias configuration
after using description file: /root/rpmbuild/BUILD/foreman_openscap-4.3.1/package.json (relative path: ./usr/share/foreman/node_modules)
using description file: /root/rpmbuild/BUILD/foreman_openscap-4.3.1/package.json (relative path: ./usr/share/foreman/node_modules/@patternfly/patternfly/patternfly-addons.scss)
no extension
Field 'browser' doesn't contain a valid alias configuration
resolved symlink to /usr/lib/node_modules/@patternfly/patternfly/patternfly-addons.scss
No description file found
after resolved symlink to /usr/lib/node_modules/@patternfly/patternfly/patternfly-addons.scss
no extension
Field 'browser' doesn't contain a valid alias configuration
/usr/lib/node_modules/@patternfly/patternfly/patternfly-addons.scss doesn't exist
.js
Field 'browser' doesn't contain a valid alias configuration
/usr/lib/node_modules/@patternfly/patternfly/patternfly-addons.scss.js doesn't exist
.json
Field 'browser' doesn't contain a valid alias configuration
/usr/lib/node_modules/@patternfly/patternfly/patternfly-addons.scss.json doesn't exist
as directory
/usr/lib/node_modules/@patternfly/patternfly/patternfly-addons.scss doesn't exist
/root/rpmbuild/BUILD/foreman_openscap-4.3.1/usr/share/foreman/node_modules/@patternfly/patternfly/patternfly-addons.scss doesn't exist
.js
Field 'browser' doesn't contain a valid alias configuration
resolved symlink to /usr/lib/node_modules/@patternfly/patternfly/patternfly-addons.scss.js
No description file found
after resolved symlink to /usr/lib/node_modules/@patternfly/patternfly/patternfly-addons.scss.js
no extension
Field 'browser' doesn't contain a valid alias configuration
/usr/lib/node_modules/@patternfly/patternfly/patternfly-addons.scss.js doesn't exist
.js
Field 'browser' doesn't contain a valid alias configuration
/usr/lib/node_modules/@patternfly/patternfly/patternfly-addons.scss.js.js doesn't exist
.json
Field 'browser' doesn't contain a valid alias configuration
/usr/lib/node_modules/@patternfly/patternfly/patternfly-addons.scss.js.json doesn't exist
as directory
/usr/lib/node_modules/@patternfly/patternfly/patternfly-addons.scss.js doesn't exist
/root/rpmbuild/BUILD/foreman_openscap-4.3.1/usr/share/foreman/node_modules/@patternfly/patternfly/patternfly-addons.scss.js doesn't exist
.json
Field 'browser' doesn't contain a valid alias configuration
resolved symlink to /usr/lib/node_modules/@patternfly/patternfly/patternfly-addons.scss.json
No description file found
after resolved symlink to /usr/lib/node_modules/@patternfly/patternfly/patternfly-addons.scss.json
no extension
Field 'browser' doesn't contain a valid alias configuration
/usr/lib/node_modules/@patternfly/patternfly/patternfly-addons.scss.json doesn't exist
.js
Field 'browser' doesn't contain a valid alias configuration
/usr/lib/node_modules/@patternfly/patternfly/patternfly-addons.scss.json.js doesn't exist
.json
Field 'browser' doesn't contain a valid alias configuration
/usr/lib/node_modules/@patternfly/patternfly/patternfly-addons.scss.json.json doesn't exist
as directory
/usr/lib/node_modules/@patternfly/patternfly/patternfly-addons.scss.json doesn't exist
/root/rpmbuild/BUILD/foreman_openscap-4.3.1/usr/share/foreman/node_modules/@patternfly/patternfly/patternfly-addons.scss.json doesn't exist
as directory
/root/rpmbuild/BUILD/foreman_openscap-4.3.1/usr/share/foreman/node_modules/@patternfly/patternfly/patternfly-addons.scss doesn't exist
/root/rpmbuild/BUILDROOT/rubygem-foreman_openscap-4.3.1-1.fm2_5.el8.x86_64/usr/share/gems/gems/foreman_openscap-4.3.1/webpack/routes/OvalPolicies/OvalPoliciesShow/node_modules/ doesn't exist or is not a directory
/root/rpmbuild/BUILDROOT/rubygem-foreman_openscap-4.3.1-1.fm2_5.el8.x86_64/usr/share/gems/gems/foreman_openscap-4.3.1/webpack/routes/OvalPolicies/node_modules/ doesn't exist or is not a directory
/root/rpmbuild/BUILDROOT/rubygem-foreman_openscap-4.3.1-1.fm2_5.el8.x86_64/usr/share/gems/gems/foreman_openscap-4.3.1/webpack/routes/node_modules/ doesn't exist or is not a directory
/root/rpmbuild/BUILDROOT/rubygem-foreman_openscap-4.3.1-1.fm2_5.el8.x86_64/usr/share/gems/gems/foreman_openscap-4.3.1/webpack/node_modules/ doesn't exist or is not a directory
/root/rpmbuild/BUILDROOT/rubygem-foreman_openscap-4.3.1-1.fm2_5.el8.x86_64/usr/share/gems/gems/foreman_openscap-4.3.1/node_modules/ doesn't exist or is not a directory
/root/rpmbuild/BUILDROOT/rubygem-foreman_openscap-4.3.1-1.fm2_5.el8.x86_64/usr/share/gems/gems/node_modules/ doesn't exist or is not a directory
/root/rpmbuild/BUILDROOT/rubygem-foreman_openscap-4.3.1-1.fm2_5.el8.x86_64/usr/share/gems/node_modules/ doesn't exist or is not a directory
/root/rpmbuild/BUILDROOT/rubygem-foreman_openscap-4.3.1-1.fm2_5.el8.x86_64/usr/share/node_modules/ doesn't exist or is not a directory
/root/rpmbuild/BUILDROOT/rubygem-foreman_openscap-4.3.1-1.fm2_5.el8.x86_64/usr/node_modules/ doesn't exist or is not a directory
/root/rpmbuild/BUILDROOT/rubygem-foreman_openscap-4.3.1-1.fm2_5.el8.x86_64/node_modules/ doesn't exist or is not a directory
/root/rpmbuild/BUILDROOT/node_modules/ doesn't exist or is not a directory
/root/rpmbuild/node_modules/ doesn't exist or is not a directory
/root/node_modules/ doesn't exist or is not a directory
/node_modules/ doesn't exist or is not a directory
rake aborted!
Command failed with status (1): [node --max_old_space_size=2048 /root/rpmbu...]
/usr/share/gems/gems/rake-13.0.1/lib/rake/file_utils.rb:67:in `block in create_shell_runner'
/usr/share/gems/gems/rake-13.0.1/lib/rake/file_utils.rb:57:in `sh'
/root/rpmbuild/BUILD/foreman_openscap-4.3.1/usr/share/foreman/lib/tasks/plugin_assets.rake:56:in `compile'
/root/rpmbuild/BUILD/foreman_openscap-4.3.1/usr/share/foreman/lib/tasks/plugin_assets.rake:66:in `block in <top (required)>'
/usr/share/gems/gems/rake-13.0.1/lib/rake/task.rb:279:in `block in execute'
/usr/share/gems/gems/rake-13.0.1/lib/rake/task.rb:279:in `each'
/usr/share/gems/gems/rake-13.0.1/lib/rake/task.rb:279:in `execute'
/usr/share/gems/gems/rake-13.0.1/lib/rake/task.rb:219:in `block in invoke_with_call_chain'
/usr/share/gems/gems/rake-13.0.1/lib/rake/task.rb:199:in `synchronize'
/usr/share/gems/gems/rake-13.0.1/lib/rake/task.rb:199:in `invoke_with_call_chain'
/usr/share/gems/gems/rake-13.0.1/lib/rake/task.rb:188:in `invoke'
/usr/share/gems/gems/rake-13.0.1/lib/rake/application.rb:160:in `invoke_task'
/usr/share/gems/gems/rake-13.0.1/lib/rake/application.rb:116:in `block (2 levels) in top_level'
/usr/share/gems/gems/rake-13.0.1/lib/rake/application.rb:116:in `each'
/usr/share/gems/gems/rake-13.0.1/lib/rake/application.rb:116:in `block in top_level'
/usr/share/gems/gems/rake-13.0.1/lib/rake/application.rb:125:in `run_with_threads'
/usr/share/gems/gems/rake-13.0.1/lib/rake/application.rb:110:in `top_level'
/usr/share/gems/gems/rake-13.0.1/lib/rake/application.rb:83:in `block in run'
/usr/share/gems/gems/rake-13.0.1/lib/rake/application.rb:186:in `standard_exception_handling'
/usr/share/gems/gems/rake-13.0.1/lib/rake/application.rb:80:in `run'
/usr/share/gems/gems/rake-13.0.1/exe/rake:27:in `<top (required)>'
/usr/bin/rake:23:in `load'
/usr/bin/rake:23:in `<main>'
Tasks: TOP => plugin:assets:precompile
error: Bad exit status from /var/tmp/rpm-tmp.AWEyHU (%install)


RPM build errors:
Bad exit status from /var/tmp/rpm-tmp.AWEyHU (%install)

How can I solved the missing dependency ?
Kind regards
Martin

Looks like the PR for it is also failing because dependencies are missing:

@Ondrej_Prazak is working on it.