This started giving errors like:
22:10 error 'Alert' is defined but never used no-unused-vars
Use eslint-plugin-react to improve the JSX usage, not just to silence this error.
On developer systems, bots is commonly a symlink to a shared checkout,
accept non-directories as well. Also, only ignore it at the top level of
the project directory.
This centralizes/factorizes the rpm package builds, and builds
RPM packages in the VM instead of on the host, which is cleaner. It also
paves the way for supporting Debian and arch builds.
Drop the `make srpm` rule, as it's not very useful. Keep the `make rpm`
rule, as sometimes developers do this manually. This might be replaced
later on with another image-customize feature which copies the built rpm
out of the VM.
Use the CockpitRsyncWebpack plugin to optionally rsync build code to a
remote machine, the destination is determined by looking at the
package.json's name field.
Upgrading glibc in Rawhide now (semi-intentionally) removes
/etc/nsswitch.conf, but does not enforce installing a new enough
pam/authselect to ensure that it gets re-added. This breaks resolving
"localhost".
Reported as https://bugzilla.redhat.com/show_bug.cgi?id=2033020
These work without any source changes.
Don't update copy-webpack-plugin to the latest 10 major release, but
keep it at 9. 10 breaks compatibility with node.js 10, but that is still
the default in CentOS 8 stream (and we can't select the newer modules in
the spec or packit.yml).
npm 7 changed how it resolves dependencies, and starter-kit fails to
build with lots of unresolved peer dependencies of PatternFly.
With an absolute path, `resolve.modules` will only look in that
directory; the default is a relative path "node_modules" that just
works [1]. Use that default, as we don't use `$SRCDIR` in this project
anyway.
[1] https://webpack.js.org/configuration/resolve/#resolvemodules
Sync some improvements from cockpit-machines:
* Unbreak running `tmt` in local trees with an already existing ./bots
symlink.
* Don't install all NPM packages, only chrome-remote-interface and sizzle.
* Disable detection of affected tests, taking too long for real
projects.
`var` has broken/unexpected scoping in JavaScript, and can lead to
subtle errors. It's preferable and safer to use `const` whenever
possible, and `let` where necessary.
There are no usages of `var` in starter-kit right now, so just enable
the rule to ensure that it stays that way.
CentOS/RHEL 9 switched to OpenSSL 3, which does not support the `md4`
hash any more. webpack 5 hardcodes that in no less than 21 places, so
monkey-patch `crypto.createHash()` to substitute sha256 for md4.
Hack to work around https://github.com/webpack/webpack/issues/13572
The node_modules cache tarball will be published as release artifact, to
make sure that any release can be rebuilt in a reproducible way.
Cockpituous' release-source will call this if available:
https://github.com/cockpit-project/cockpituous/pull/438