Commit graph

150 commits

Author SHA1 Message Date
Cockpit Project
36fc246711 Makefile: Update Cockpit lib to 4693a536e3262d3254d848daed251ef3
Closes #676
2023-07-20 06:58:40 +02:00
Cockpit Project
ee9ab10aeb Makefile: Update Cockpit lib to 1336ce350d88d385870ba56405136df7
Closes #673
2023-07-13 06:34:29 +02:00
Cockpit Project
88625acc33 Makefile: Update Cockpit lib to 6e0e545679bad03beb29c5526e2f4fe5
Closes #671
2023-07-06 05:34:45 +02:00
Cockpit Project
27ad7ce5a7 Makefile: Update Cockpit lib to 3d2d07cb751b141b6bd6ee9a3d423081
Closes #669
2023-06-29 05:52:07 +02:00
Cockpit Project
ddd7763d62 Makefile: Update Cockpit lib to 393f9888a5727cbb06bcb70175e82064
Closes #667
2023-06-22 07:03:38 +02:00
Cockpit Project
11fc725902 Makefile: Update Cockpit lib to 536834c40ad3e2390a52fb87583f0730
Closes #665
2023-06-15 08:24:04 +02:00
Cockpit Project
1eb8b05dfa Makefile: Update Cockpit lib to efcf647c8580388d907af512c6c4727c
Closes #663
2023-06-08 10:00:15 +02:00
Cockpit Project
c1910ea39c Makefile: Update Cockpit lib to 06aba4d08e6017abed05a3cc3e3bbb49276bc0d1
Closes #660
2023-06-01 10:22:48 +02:00
Allison Karlitskaya
2215aa3bf8 Makefile: bump our test/common dependency
... and make use of the new pywrap feature from our test.

Use the same eslint and stylelint plugin configuration as the cockpit
main repo.

Co-authored-by: Katerina Koukiou <kkoukiou@redhat.com>
2023-05-26 17:34:51 +02:00
Cockpit Project
4c405168a8 Makefile: Update Cockpit lib to 3ca979d542a4d6cf865f2132e0bdf1b0
Closes #656
2023-05-25 06:33:17 +02:00
Cockpit Project
092cefab3b package.json: Update @patternfly/patternfly, @patternfly/react-core, @patternfly/react-icons, @patternfly/react-styles
Bump Cockpit commit to pick up the necessary adjustments for latest PF,
and adjust test for the new "-v5" namespace prefix.

Closes #654
2023-05-22 09:58:44 +02:00
Cockpit Project
26e4c3e5dd Makefile: Update Cockpit lib to 355c0aa59e3991243e10a61183e62ea1
Closes #653
2023-05-18 22:07:20 +02:00
Cockpit Project
fbc0a542f7 Makefile: Update Cockpit lib to 68980cd34568a52bc0e2000d79ff0dd8
Closes #651
2023-05-17 05:59:35 +02:00
Cockpit Project
b3e97c711c Makefile: Update Cockpit lib to da5abbb4245b0455cc8b610efe01e684
Closes #649
2023-05-11 06:42:00 +02:00
Cockpit Project
b2bdaac5b2 Makefile: Update Cockpit lib to 947f1753867e3924b9617aaace936225
Update to PF5 and the new cockpit lib API.

Closes #646
2023-05-04 15:24:01 +02:00
Martin Pitt
6ab10901a4 Makefile: Fix watch dependencies
Unbreak `make watch` from a clean tree by ensuring that node_modules/
and pkg/lib exist.
2023-05-04 15:24:01 +02:00
Cockpit Project
4bc3de6d5d Makefile: Update Cockpit lib to 269bf89276c679a03befc8a04244addd
Closes #645
2023-04-27 05:02:43 +02:00
Subho
1c30b49d3d
Move from webpack to esbuild bundler 2023-04-12 10:23:20 +02:00
Martin Pitt
8817969d16 packaging: Declare bundled NPM dependencies in spec file
See https://bugzilla.redhat.com/show_bug.cgi?id=2180520

Turn the pattern make rule into an explicit one, as pattern rules don't
support dependencies. We only need it for our single spec file anyway.
2023-04-05 10:17:28 +02:00
Martin Pitt
75b3170765 Bump Cockpit API to 288.1 + esbuild plugin updates
Preparation for moving to esbuild.
2023-03-28 10:25:54 +02:00
Allison Karlitskaya
e32368e56a build: use pip wheel to get cockpit wheel
Now that we have pip in the tasks container, this is a lot easier, and
it will allow us to drop the make-wheel script from the cockpit project.
2023-03-20 11:08:02 +01:00
Martin Pitt
5fa7ae7f9c Run npm install with --ignore-scripts
https://github.com/cockpit-project/bots/blob/main/npm does that as well.
We don't expect/depend on scripts, and this closes at least one major
attack vector of `npm install` against developer machines.
2023-03-14 09:47:29 +01:00
Martin Pitt
cd6b2afc15 Generalize bundler language/variable names
These changes are not specific to webpack, but apply to other bundlers
as well.
2023-02-20 10:01:02 +01:00
Martin Pitt
4990d6a103 build: Move to a webpack module
Cockpit recently changed to an ESM build system [1]. Bump
COCKPIT_REPO_COMMIT to that and follow suit.

This does not work with old node.js 10 any more which is still the
default in RHEL 8. Install the newer version 16 instead.

[1] https://github.com/cockpit-project/cockpit/pull/18366
2023-02-20 10:01:02 +01:00
Jelle van der Waa
1f4e0fac24 Makefile: bump REPO_COMMIT to include RSYNC_DEVEL support 2023-02-14 15:37:39 +01:00
shawly
681366e990 Add dark-theme-support
Fixes #610
2023-02-13 07:45:49 +01:00
Allison Karlitskaya
03d02f398a build: add support for /pybridge scenario
Build the Python bridge from the cockpit project and install it into the
VM so we can run tests against it.
2023-02-01 17:40:48 +01:00
Martin Pitt
57d7c73d6e Install into /usr/local/ by default
/usr is package manager territory, and not even writable on OSTree based
systems such as Fedora CoreOS or RHEL Edge. This has been common and
good practice in autotools for decades.

You can still override this with `make install PREFIX=...`. Use that in
the RPM spec file.
2022-09-14 09:53:10 +02:00
Martin Pitt
433975df39 Bump Cockpit API to 273 2022-07-21 08:31:27 +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
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
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
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
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
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
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
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