Commit graph

610 commits

Author SHA1 Message Date
Cockpit Project
a22972abba package.json: Update @patternfly/patternfly, @patternfly/react-core
Closes #599
2022-07-25 06:18:40 +02:00
Martin Pitt
73f24087ab package.json: Move stylelint to devDependencies 2022-07-21 08:32:23 +02:00
Martin Pitt
433975df39 Bump Cockpit API to 273 2022-07-21 08:31:27 +02:00
Martin Pitt
652b06d900 test: Check that window title is translated
This is actually kind of surprising: We never call cockpit.translate()
anywhere.
2022-07-21 08:31:27 +02:00
Martin Pitt
109fa37309 test: Drop obsolete fallbacks for cockpit < 266
CentOS 8 Stream has version 270, that's the oldest version that we
support.
2022-07-21 08:31:27 +02:00
Jelle van der Waa
ee366ca531 Add CSS linting through stylelint
Include CSS linting by default for our CSS/SCSS files, originally
introduced in cockpit. The stylelint configuration is copied from
760a4628282e02fbcef3.
2022-07-19 20:32:21 +02:00
Cockpit Project
0e2591ee93 package.json: Update @patternfly/patternfly, @patternfly/react-core
Closes #594
2022-07-18 06:46:01 +02:00
Jelle van der Waa
6b659f1e74
packit.yml: drop deprecated metadata key
The packit docs no longer mention the metadata key as required.
https://packit.dev/docs/configuration/#supported-jobs
2022-07-15 14:29:07 +02:00
Cockpit Project
26ec9f6994 package.json: Update @patternfly/patternfly, @patternfly/react-core
Closes #592
2022-07-11 06:38:54 +02:00
Cockpit Project
eebc1cb170 package.json: Update @patternfly/patternfly, @patternfly/react-core
Closes #591
2022-07-04 15:34:54 +02:00
Martin Pitt
0772f2c615 Makefile: Stop disting git-utils.sh twice
It is already contained in COCKPIT_REPO_FILES.

Also fix a typo.
2022-06-30 09:49:07 +02:00
Martin Pitt
9c7a341fe7 Makefile: Some noise cleanup
- Generalize NODE_MODULES_TEST comment to apply for both direct
   `npm install` and git checkouts.
 - Drop obsolete touch commands from dist tarfile build.
 - Consistently use NODE_MODULES_TEST constant.
 - Better sorting of .PHONY, and add missing prepare-check.

This reduces the diff to cockpit-podman.
2022-06-30 09:49:07 +02:00
Martin Pitt
ebe52bcdb7 build: use translation tools from pkg/lib
Use the html2po and manifest2po tools that we already check out from
cockpit repo pkg/lib.

These tools switched to a new argument parser library (`argparse`) in
cockpit-project/cockpit#16271, so add it to our package.json and drop
`stdio`.

Drop our old copies.

I checked the result of building `po/starter-kit.pot` before and after
the change, and aside from the timestamp, it's identical.

Cherry-picked from cockpit-podman commit bf53f801b17ba6.
2022-06-30 09:49:07 +02:00
Martin Pitt
e38a1c3906 Bump Cockpit API to include Python 3.11 compatibility fix
This will fix tests on Rawhide.
2022-06-30 09:49:07 +02:00
Martin Pitt
89fe84ead1 Makefile: Drop update-po rule
This is not called from anywhere, and does not match the contemporary
workflow where PO files are pulled from weblate.
2022-06-30 09:49:07 +02:00
Martin Pitt
06dd572784 Makefile: simplify cockpit repo checkout code
Replace the two rules for test/common and pkg/lib with a single rule
based on `git-archive`, avoiding the use of racy `FETCH_HEAD` and
side-effecting `git-checkout`.  This lets us drop the `flock` call, and
introduces some logic to avoid the fetch in case we already have it.

We'll hardcode shas from here on out: it's more secure (ie:
tamperproof), and more performant (since we don't have to check the ref
if we already have the object), in addition to being easier to work with
in terms of the required git commands.

Use pkg/lib/cockpit.js as a stamp file.

This rule will make it easier to expand to more files in the future.

One drawback is that when we want to update files from the cockpit/
repository, we'll now need to do it in lock-step: using new API from
testlib will force us to adjust to PatternFly changes, for example.

Cherry-picked from cockpit-podman commit cfc05e730d6f5d.
2022-06-30 09:49:07 +02:00
Martin Pitt
b3a9565668 build: don't move pkg/lib/ to src/lib/
Keep pkg/lib in the same location as it is in the cockpit repository,
and adjust the include path accordingly.

This makes the production of the .pot file somewhat more deterministic:
previously, it would either include or not include the strings from
pkg/lib depending on if it had been checked out or not.  Now it never
includes them.

Cherry-picked from cockpit-podman commit a70630be2139a.
2022-06-30 09:49:07 +02:00
Cockpit Project
adc3643052 package.json: Update @patternfly/patternfly, @patternfly/react-core
Closes #587
2022-06-27 11:45:03 +02:00
Martin Pitt
d41744c085 packaging: Disable webpack rebuild in RHEL/CentOS 8
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.
2022-06-27 10:50:08 +02:00
Cockpit Project
358232f1fb package.json: Update @patternfly/patternfly, @patternfly/react-core
Closes #586
2022-06-20 07:28:13 +02:00
Martin Pitt
3a278b6d27 cirrus: Run tests with Firefox
The GKE container only has the default 64 MiB /dev/shm, which is not
enough for Chromium. It cannot be remounted from inside the container,
and chromium's `--disable-dev-shm-usage` option does not actually work,
so run the tests with Firefox instead.
2022-06-13 08:43:30 +02:00
Cockpit Project
c09e9ce49d package.json: Update @patternfly/react-core
Closes #584
2022-06-13 08:11:39 +02:00
Martin Pitt
c069d7b223 packaging: Drop unnecessary cockpit-system dependency
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.
2022-06-07 21:11:21 +02:00
Martin Pitt
f5faff051b Move release from cockpituous to action-release and packit
This gets rid of our "release" environment with high-profile secrets,
and the cockpituous/release infra.

The upstream release uses our shared
https://github.com/cockpit-project/action-release/ action.
2022-06-07 17:09:25 +02:00
Martin Pitt
607fbae9d2 packit: Fix indentation
Use standard indentation for lists underneath a dictionary key. Leave
some space between the larger top-level keys.
2022-06-07 17:09:25 +02:00
Martin Pitt
51292fbc25 packit: Drop obsolete sandcastle hack
Since commit 9d4c08ff2a, SRPM builds happen in COPR, so we can drop the
sandcastle hack.

Also drop the duplicated `post-upstream-clone` key.
2022-06-07 17:09:25 +02:00
Martin Pitt
03a6cc94a3 Pick up cockpit test API fix for Firefox 101
See https://github.com/cockpit-project/cockpit/pull/17429 . This fixes
tests with Firefox version 101.
2022-06-06 20:53:36 +02:00
Cockpit Project
52ebda2575 package.json: Update @patternfly/patternfly, @patternfly/react-core
Closes #580
2022-06-06 08:22:58 +02:00
Cockpit Project
5cbfb7bf11 package.json: Update @patternfly/react-core
Closes #578
2022-05-23 07:04:20 +02:00
Cockpit Project
c185d34cee package.json: Update @patternfly/patternfly, @patternfly/react-core
Closes #576
2022-05-16 07:45:42 +02:00
Pino Toscano
a6508f5d99 spec: move AppStream validation to %check
https://docs.fedoraproject.org/en-US/packaging-guidelines/AppData/
suggests that can be in either; it is slightly more logical in %check.

Reported by Neal Gompa, thanks!
2022-05-12 16:43:56 +02:00
Pino Toscano
e3f668b584 spec: use %autosetup
Replace the two %setup calls with %autosetup; the second call was even
redoing the first.

Reported by Neal Gompa, thanks!
2022-05-12 16:43:56 +02:00
Martin Pitt
f86c02c60e spec: Add an empty %check section
Add a comment where and how the package is being tested, to show that
it's not simply a forgotten section.
2022-05-10 09:51:50 +02:00
Martin Pitt
bee838088d spec: Clean up pre-existing dist/ in %prep
By convention.

See https://bugzilla.redhat.com/show_bug.cgi?id=1969450
2022-05-10 09:51:50 +02:00
Martin Pitt
0c954dbf49 spec: Set ExclusiveArch:
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
2022-05-10 09:51:50 +02:00
Pino Toscano
b47bb4714a spec: use nodejs-devel on Fedora
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.
2022-05-10 09:51:50 +02:00
Cockpit Project
0763174e15 package.json: Update @patternfly/patternfly, @patternfly/react-core
Closes #572
2022-05-09 07:24:09 +02:00
Martin Pitt
c639ffc276 Move example COPR release to packit
This replaces the cockpituous job.
2022-05-03 10:30:13 +02:00
Cockpit Project
bdd376e9e0 package.json: Update @patternfly/patternfly, @patternfly/react-core
Closes #569
2022-05-02 12:15:37 +02:00
Pino Toscano
0ece83483d Makefile: avoid spurious echo
Disable the printing of the echo commands that write the filename of the
VM image for tests in the 'vm' and 'print-vm' targets.

This makes it possible to use their outputs, especially the 'print-vm'
target.
2022-04-27 06:55:58 +02:00
Cockpit Project
c990f74d73 package.json: Update @patternfly/patternfly, @patternfly/react-core
Closes #567
2022-04-25 06:22:08 +02:00
Martin Pitt
3aff8acad1 webpack: Always regenerate and clean up dist/
By default, webpack does not clean up dist/, so when you e.g. touch the
code and rebuild with `NODE_ENV=devel`, the old compressed assets from
a previous `production` build were left in place, and cockpit could
serve the old wrong ones. Enable the `clean` output option to fix this [1].

Also force the rewrite of all files with `compareBeforeEmit: false`, so
that the time stamps actually get updated on a webpack run. This fixes
`make` rules and unnecessary rebuilds when nothing changed.

Fixes #563

[1] https://webpack.js.org/configuration/output/#outputclean
2022-04-21 15:26:00 +02:00
Martin Pitt
a937b82cd2 test: Bump Cockpit test API to 267, use --track-naughties option
run-tests recently got a new `--track-naughties` option [1] to explicitly
enable updating known issues on GitHub. Enable it for CI runs, and leave
it disabled for local runs and PackIt, as in these cases we don't want
to try and talk to GitHub.

[1] 7ef88e80ce
2022-04-19 13:14:21 +02:00
Cockpit Project
5cf73c315a package.json: Update @patternfly/patternfly, @patternfly/react-core
Closes #560
2022-04-19 06:31:13 +02:00
Matej Marusak
e91487b558 workflows: Split npm-update to PF and non PF tasks
Run PF update every Monday and anything else try to update on Tue, Thu and Sat.
2022-04-13 10:39:32 +02:00
Cockpit Project
b1fb98b436 package.json: Update @patternfly/react-core
Closes #557
2022-04-13 06:23:17 +02:00
Cockpit Project
ff9ec35cb3 package.json: Update @patternfly/patternfly, @patternfly/react-core
Closes #556
2022-04-12 07:55:44 +02:00
Katerina Koukiou
fe1a9a387f package.json: bump eslint to ^8.0.0 and all eslint-x dependencies
So as to satisfy the new eslint peer dependency.

In addition drop eslint-config-standard-react as it does not release
anymore, and eslint 8.x is not compatible with the available last
release.
https://github.com/standard/eslint-config-standard-react/pull/69

Replace it with https://github.com/facebook/create-react-app#readme
which is actively maintained.

Lastly drop the deprecated
https://github.com/standard/eslint-plugin-standard
2022-04-11 07:56:29 +02:00
Martin Pitt
e069cbbfbd spec: Don't run eslint
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.
2022-04-11 07:56:29 +02:00
Cockpit Project
7a0968bd8c package.json: Update @patternfly/patternfly, @patternfly/react-core
Closes #553
2022-04-11 06:24:31 +02:00