Commit graph

444 commits

Author SHA1 Message Date
Tomas Tomecek
9d4c08ff2a packit: build SRPM in Copr
and be able to specify the precise list of deps needed to create the
SRPM

Details: https://packit.dev/posts/copr-srpms/

Signed-off-by: Tomas Tomecek <ttomecek@redhat.com>
2022-03-10 16:29:53 +01:00
Pino Toscano
e0a1fb8a2b Makefile: factorize AppStream filename in own variable
Makes it easier to read, and also to modify for modules outside the
cockpit-project org.
2022-03-10 10:07:26 +01:00
Martin Pitt
6c123f94ec po: Update German translations
This validates the i18n for the AppStream metadata introduced in commit
4377c4fe19.
2022-03-09 22:30:00 +01:00
Pino Toscano
4377c4fe19 po: merge translations for metainfo file
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.
2022-03-09 16:02:26 +01:00
Pino Toscano
b5969c1c9b po: extract messages also for metainfo files
Recent versions of gettext know how to extract messages also from XML
files such as AppStream metadata. Hence, extract their messages, and
append them together with the global message catalog.
2022-03-09 16:02:26 +01:00
Pino Toscano
19300113fc po: do not hardcode the domain name
Use $(PACKAGE_NAME) to represent the current project.
2022-03-09 08:45:40 +01:00
Pino Toscano
e10a8702a7 spec: drop the debug_package %define
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).
2022-03-09 07:15:49 +01:00
Cockpit Project
3d0f113680 package.json: Update @patternfly/patternfly, @patternfly/react-core
Closes #533
2022-02-24 08:32:18 +01:00
Martin Pitt
90ae15d812 test: Prepare VM image without networking
This ensures that we stay independent from any changes that go on in
online repositories, and our mock/pbuilders are sufficiently pre-cached.

Drop the explicit install of `cockpit-ws` -- all our bots images have it
pre-installed.
2022-02-22 14:26:15 +01:00
Matej Marusak
052eb5d57a Allow disabling eslint checks for development purposes
Sometimes developers want to quickly check if something work and there
is no need to style to eslint liking.
2022-02-21 14:13:12 +01:00
Martin Pitt
ea8b606243 cockpituous: Update example koji/bodhi configs
We use the "rawhide" branch, "main" is just an alias (and less
descriptive). Also bump the release to Fedora 36.
2022-02-15 12:05:45 +01:00
Katerina Koukiou
67640c7088 Install eslint-plugin-standard-jsx to align with what main cockpit repo does 2022-02-11 18:41:06 +01:00
Katerina Koukiou
fdba1dc96c Bump up eslint-config-standard-react and add fix for the new warnings
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.
2022-02-11 15:13:11 +01:00
Martin Pitt
e4732583a9 Use image-customize's new --fresh function
See 468ee1b39e

This avoids hardcoding the test image overlay paths.
2022-02-08 10:47:33 +01:00
Martin Pitt
07784820fd .gitignore: Ignore ./bots symlink as well
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.
2022-02-07 15:42:01 +01:00
Martin Pitt
b2662eeebd Use image-customize --build to build/install distribution packages
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.
2022-02-07 15:42:01 +01:00
Martin Pitt
799d8f5cc9 Move spec file into packaging/
This is cleaner once projects add debian and arch packaging.

Factorize the spec name/path in the Makefile.
2022-02-04 08:47:32 +01:00
Martin Pitt
0493621504 Makefile: Factorize rpm name 2022-02-04 08:47:32 +01:00
Martin Pitt
8eaa689491 Bump cockpit lib and test to 262
Create test/reference-image as required by testlib 261.
2022-02-04 08:47:32 +01:00
Martin Pitt
e0cb0f9a32 package.json: Bump mini-css-extract-plugin version
Update to the latest version. This reverts the hack in commit
96e9c669ad, the API was fixed in 2.5.1.
2022-02-04 08:47:32 +01:00
Martin Pitt
9fce37f215 fmf: Don't install weak firefox dependencies
firefox pulls in half a desktop, we don't need any of these for a
headless test. This reduces the number packages from 133 (459 MB) to 66
(365 MB).
2022-02-04 08:47:32 +01:00
Cockpit Project
e066d630c6 package.json: Update @patternfly/patternfly, @patternfly/react-core
Closes #523
2022-02-01 08:41:36 +01:00
Martin Pitt
96e9c669ad npm: Lock mini-css-extract-plugin at version 2.4.5
2.5 has an unintended API breakage:

  https://github.com/webpack-contrib/mini-css-extract-plugin/issues/896
2022-01-17 12:19:58 +01:00
Jelle van der Waa
a9b9484166 webpack: Fail on eslint warnings
Ensures we don't merge code with eslint warnings.
2022-01-17 12:19:58 +01:00
Jelle van der Waa
9662fb2ffc Add ability to rsync artifacts to a remote machine
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.
2022-01-04 15:36:52 +01:00
Martin Pitt
ba3913caa0 fmf: Work around missing /etc/nsswitch.conf in Fedora Rawhide
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
2021-12-16 08:40:55 +01:00
Cockpit Project
2e17e9a79b package.json: Update @patternfly/patternfly, @patternfly/react-core
Closes #518
2021-12-15 08:48:43 +01:00
Martin Pitt
9e162423eb fmf: Go back to firefox distro version
By now the packaged firefox contains CDP. This makes the tests more
robust against CDP breakage in nightly.
2021-12-15 09:24:48 +02:00
Garrett LeSage
7be9253229 Fix spelling error found by codespell 2021-12-14 12:15:43 +01:00
Martin Pitt
7e2f3d2b5c webpack: Drop obsolete md4 hash hack
webpack 5.54 solved this properly, bump the dependency.
2021-12-14 10:24:56 +01:00
Martin Pitt
db6397050a webpack: Drop unused import
See https://github.com/cockpit-project/cockpit-podman/issues/855
2021-12-14 09:15:52 +01:00
Martin Pitt
aa8308c380 test: Drop obsolete language switcher cases
The oldest release which we support is 251 from RHEL/CentOS 8.5, so we
don't need the older cases any more. Also move to
MachineCase.system_before().
2021-11-29 11:20:59 +01:00
Martin Pitt
150e59c548 package.json: Update React to 17 2021-11-29 10:58:57 +01:00
Martin Pitt
11ff944f2c package.json: Update various development packages
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).
2021-11-29 10:58:57 +01:00
Martin Pitt
67c1c065e9 package.json: Drop core-js
starter-kit does not use it directly, and none of our derived projects
have it.
2021-11-29 10:58:57 +01:00
Martin Pitt
4820c2b740 test: Adjust language changing for Cockpit 258
That version rewrote the Shell in React, the ids/classes changed.
2021-11-29 09:40:38 +01:00
Martin Pitt
5966735547 po: Pick up also strings with specified context
Strings like `_("Context", "String to translate")` were not picked up.

Taken from ba95d680d2
2021-11-19 09:56:23 +01:00
Cockpit Project
833326148f package.json: Update @patternfly/patternfly, @patternfly/react-core
Closes #509
2021-11-19 06:58:40 +01:00
Martin Pitt
c04d951964 packit: Run tests on CentOS 9 stream 2021-11-16 15:20:32 +01:00
Cockpit Project
3536eafd5a package.json: Update core-js
Closes #506
2021-11-03 07:32:12 +01:00
Cockpit Project
a302255b3a package.json: Update @patternfly/patternfly, @patternfly/react-core
Closes #505
2021-10-30 17:25:43 +02:00
Cockpit Project
f8024eb1f0 package.json: Update core-js
Closes #504
2021-10-26 07:24:56 +02:00
Cockpit Project
0a02205869 package.json: Update @patternfly/patternfly, @patternfly/react-core
Closes #503
2021-10-15 06:28:56 +02:00
Cockpit Project
4e0dce1ca6 package.json: Update core-js
Closes #502
2021-10-13 06:58:12 +02:00
Martin Pitt
0abeda3528 webpack: Use default resolve path for npm 7 compatibility
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
2021-10-12 08:40:12 +02:00
Martin Pitt
8074af0fbd fmf: Only install git-core
We don't need all the bells and whistles of the full git package.
2021-10-07 12:38:03 +02:00
Martin Pitt
72c15c4b82 packit: Enable CentOS Stream 8 2021-10-07 12:38:03 +02:00
Martin Pitt
5d15bdac5c fmf: Dependency installation robustification
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.
2021-10-07 12:38:03 +02:00
Martin Pitt
0bc01714ee fmf: Run tests with firefox
Chromium has started to crash in current Fedora, and is not easily
available in RHEL.

Install bzip2 to unpack the nightly tarball.
2021-10-07 12:38:03 +02:00
Cockpit Project
11da2d284b package.json: Update core-js
Closes #499
2021-10-06 08:08:32 +02:00