Commit graph

608 commits

Author SHA1 Message Date
Pino Toscano
e3fba6c5c6 README: fix some links
- use https when possible (mostly for cockpit-project.org URLs)
- fix the references to the cockpit and tmt official repositories
- update one packit.dev URL
2022-04-01 16:56:22 +02:00
Pino Toscano
731bf26405 README: mention devel-install & devel-uninstall 2022-03-31 10:35:11 +02:00
Pino Toscano
fde873e0bd Makefile: add convenience 'devel-uninstall' target
Add a simple convenience target to "undo" what the devel-install did
(creating a symlink to ~/.local/share/cockpit), i.e. simply removing
that symlink.

Suggested by: Christopher Snyder
2022-03-31 10:35:11 +02:00
Pino Toscano
9357e55fc6 Makefile: add convenience 'print-vm' target
Add a simple convenience target that prints the filename of the test
image without creating it beforehand. This can be useful to know what is
the expected filename, so it is possible to provide an own test image
instead of the generated one.
2022-03-31 10:01:53 +02:00
Pino Toscano
29abcaab98 Makefile: set reproducible args for tar
When creating the tarballs for sources and node modules, apply some
hardening to the tar compression to remove some variances that may cause
the tarballs to not be reproducible; in particular:
- set fixed modes, and ownership
- set the mtime from the author's timestamp of the top-level commit
- sort the files by name
2022-03-25 09:25:06 +01:00
Pino Toscano
0e0d5bedc5 po: ignore js/jsx/html files under src/lib
Cockpit's PF/React/build library (pkg/lib from cockpit.git) is checked
out as src/lib, so exclude it from the search of js/jsx, and html
sources for the extraction of i18n messages.

This avoids the cockpit messages in case the message extraction is
performed in a source tree after build.
2022-03-23 19:20:19 +01:00
Pino Toscano
c2d704e130 Makefile: add convenience 'srpm' target
Add a simple 'srpm' target that builds the src.rpm file for the current
project.

Partially reverts commit b2662eeebd (at
least to bring the 'srpm' target back).
2022-03-22 14:11:27 +01:00
Pino Toscano
a46b26a8ff Makefile: depend on test/vm.install for the VM image target
Make sure to recreate the VM image in case the test/vm.install script
changes.
2022-03-18 09:10:55 +01:00
Martin Pitt
65bf109fad test: Add quirk for cockpit 265 shell menu translation regression
[1] regressed the translations of menu labels for external projects.
This will get fixed in the next version [2]. Adjust the tests to not
break with Cockpit version == 265.

[1] af5678b0be
[2] https://github.com/cockpit-project/cockpit/pull/17145
2022-03-17 11:43:39 +01:00
Martin Pitt
8862b2b497 test: Restrict language switching reload hack to affected browser/version
This was fixed in Cockpit 265, and has only ever affected Chromium, not
Firefox. Restrict the hack accordingly, to make sure this does not
regress again.
2022-03-17 11:43:39 +01:00
Martin Pitt
2f92610f28 Bump cockpit lib and test API to 265
Drop the obsolete expect_load().
2022-03-17 11:43:39 +01:00
Martin Pitt
e2d5995323 Quiesce mock
Drop the image-customize `--verbose` option. mock is incredibly blabbery
about its internals otherwise, and seeing the build log isn't
particularly interesting.
2022-03-17 11:43:39 +01:00
Pino Toscano
80b8949192 Makefile: allow setup of integration tests w/o running them
Add a convenience target in Makefile to perform all the setup targets
for integration tests without actually running them.
2022-03-17 10:21:57 +01:00
Cockpit Project
3dc7c804a0 package.json: Update @patternfly/patternfly, @patternfly/react-core
Closes #540
2022-03-12 10:48:12 +01:00
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