RHEL 8 has node 10, which is too old for current
jest-worker/eslint/stylelint NPM modules.
The webpack rebuild during RPM build was introduced to satisfy Fedora
packaging policy, but it's not a requirement on RHEL 8. So just disable
it there.
All cockpit extensions should only require the bridge, at least as long
as they are independent from any other page (which is usually the case).
We still need cockpit-system for the tests (thus keep it in
test/browser/main.fmf), but it is perfectly reasonable to look at a
particular Cockpit page via the "remote hosts" panel, cockpit-desktop,
or Cockpit Client.
This forces the package build to happen on a koji builder which actually
supports node. It's pointless at runtime (as the code runs in a browser,
not through node), but in practice, `nodejs_arches` encompasses all
supported Fedora/RHEL architectures anyway.
https://docs.fedoraproject.org/en-US/packaging-guidelines/Node.js/#_exclusivearch
According to the Fedora guidelines, nodejs-devel is needed for using
nodejs modules:
https://docs.fedoraproject.org/en-US/packaging-guidelines/Node.js/#_buildrequires
Since this applies only on Fedora, and that nodejs-devel may not even
exist on other distros (e.g. CentOS 9 Stream), then limit the
nodejs-devel requirement only to Fedora, keep using nodejs
unconditionally everywhere.
It's useless there -- any style error that may happen there has already
slipped through the upstream release, and at RPM build time there is
nothing that can be done about it. It just wastes time.
This allows us to bump eslint to a newer version which is incompatible
with the older node.js on RHEL/CentOS 8.
When installing the module, instead of copying the metainfo file to the
destination, merge the available translations for it. Since this is done
at install time, add gettext as BuildRequires for the RPM packaging;
add libappstream-glib-devel as well only on RHEL/CentOS 8, since it
contains the metainfo.its for gettext in order to handle .metainfo.xml
files.
This requires a LINGUAS file with the list of translations currently
available: this is the way msgfmt picks the available languages to
merge. Generate it dynamically from the list of available .po files.
The generated RPM is noarch, so by definition has no binaries to extract
debug symbols from. Hence, drop the %define that makes RPM not error out
in case there are no debug symbols around (usually in archful binaries).