Commit graph

24378 commits

Author SHA1 Message Date
Jelle van der Waa
e2c433478c test: Fix wait_attr type
Some checks failed
Cockpit manifests / validate-manifests (push) Has been cancelled
Cockpit manifests / validate-schemas (push) Has been cancelled
Differential ShellCheck / shellcheck (push) Has been cancelled
CodeQL / Analyze (push) Has been cancelled
ph_has_attr uses `getAttribute()` which returns a string containing the
attribute value or null.
2026-11-03 17:37:17 +01:00
Jelle van der Waa
db420e6eae eslintrc: Enable eqeqeq
Resolves: COCKPIT-1910
2026-11-03 17:37:17 +01:00
Jelle van der Waa
ad4176e4ca treewide: Enable strict equality everywhere
Making test-functions strict required some test adjustments where we
incorrectly expected an number while we receive in fact a string. As
getAttribute() returns either a string or null.
2026-11-03 17:37:17 +01:00
Allison Karlitskaya
78d5d35b38 esbuild-test-html-plugin: drop %builddir% expand
Some checks are pending
CodeQL / Analyze (push) Waiting to run
Differential ShellCheck / shellcheck (push) Waiting to run
Cockpit manifests / validate-manifests (push) Waiting to run
Cockpit manifests / validate-schemas (push) Waiting to run
This got removed from the template with e51cf81cd2 ("unit tests: Don't
load cockpit.js in the qunit HTML template") but we've been deadcode
expanding it ever since.  Drop it.
2026-11-03 10:46:22 +01:00
Allison Karlitskaya
bcbd5d0c01 cockpit-po-plugin: add a 'podir' option
This plugin assumes that the 'po' directory is located at `$SRCDIR/po`
or `./po` if `$SRCDIR` is unset.  That conflicts with our desire to be
able to run `build.js` from other directories and is also a little bit
"evil" in terms of hardcoding information about project layout.

Add an optional `podir` option to the plugin which should be set to the
`po/` path.  Set it from `build.js` for Cockpit itself.  For other users
of the plugin, we preserve the fallback of using `$SRCDIR/po` or `./po`
so that we don't break them on the next cockpitlib upgrade.  The
expectation is that everyone will migrate to providing the `podir`
option, however.
2026-11-03 10:46:22 +01:00
Allison Karlitskaya
5f3c0e9b8b files.js: make pure to fix font logic
Since 15469bb469 ("tools: Teach webpack-make.js to get node_modules by
itself") we want to support people invoking `./build.js` without having
run `tools/node-modules checkout`.  This commit added an invocation of
`tools/node-modules` to make sure that everything is checked out and up
to date.

Unfortunately, `file.js` gets imported before that happens, and since
7cab667c1b ("pkg: Change to variable font") this module import isn't
pure: it tries to read the font information from the `node_modules`
directory at import time, before we've run the update. That means that
we can either:

 - fail completely, if the `node_modules` aren't checked out yet

 - (maybe worse): read stale information if they're checked out, but to
   the incorrect version (and get updated in between the read and the
   build)

Move the top-level computation added in that commit to `getFiles()`
which gets called — once — at runtime, after we've done the update.  We
need to rename a local to avoid a shadow.  Move related constants, some
comments, and a few other "computationy" things (like path computations)
which are no longer needed at the toplevel into the function as well.

`all_subdirs` is left at the toplevel because it's entirely based on
internal data and it's an export (and used from build.js).

This module is now side-effect-free on import and the automatic
`node_modules` checkout functionality is working properly again.
2026-11-03 10:46:22 +01:00
Allison Karlitskaya
7a887d89b2 pkg/Makefile.am: remove 'cd $(srcdir)'
It's now possible to run build.js from any directory.  Demonstrate that
by removing the `cd` that we've been depending on to make it work.  Use
the new `-o` option to direct the output to the srcdir instead.  That
means that this commit changes absolutely nothing, but it's still
important: it demonstrates that the out-of-srcdir invocation works (and
tests that it will continue to work).

In the future we hope to remove 'dist/' from the tarballs, which means
that it will be a purely built artifact, changing the logic of which
directory it belongs in.  At that point we can simply drop the '-o'
option and let it land in the default location, the `builddir`.
2026-11-03 10:46:22 +01:00
Allison Karlitskaya
aebeeaaa58 build.js: add a -o option for output basedir
Add a -o option (default to `.`) for where to send the output.  It will
still be split into `dist/` and `qunit/` subdirectories, but relative to
the given path instead of assuming it goes in the cwd.

Make sure we send `metafile.json` and `runtime-npm-modules.txt` to the
output directory as well.
2026-11-03 10:46:22 +01:00
Allison Karlitskaya
027ec4d836 build.js: determine srcdir via import.meta.dirname
Between `build.js` and `file.js` we determine the location of `pkg` (and
various tools that we need to invoke) in one of two ways, neither of
them particularly good:

 - they're assumed to be relative to '.', which only works if ./build.js
   is invoked from the automake srcdir.  That happens to be the case
   when pkg/Makefile.am does the invocation (it does a 'cd' first) but
   it breaks if you try to run build.js manually from a different
   directory.

 - redundantly, if `$SRCDIR` is set, this will be used in some (but not
   all) places

Let's standardize on looking at `import.meta.dirname`.  This is how node
resolves imports, so it's pretty much guaranteed to be correct (or else
the script itself wouldn't be running in the first place).  This is
an absolute pathname derived from argv[1] as passed to node (ie:
build.js itself).

For the qunit plugin, `import.meta.dirname` is the path of the plugin
itself, which makes it perfect for finding the `.template.html.in` file
located immediately adjacent to itself, saving some path gymnastics.

During our computation to create `runtime-npm-modules.txt` we need to be
careful: pathnames are based on `import.meta.dirname` now and are
therefore always absolute: we need to adjust our logic for finding paths
starting with `node_modules` to consider the relative pathname.
2026-11-03 10:46:22 +01:00
Allison Karlitskaya
af3ec756f5 pkg/lib, build.js: DRY on 'dist/'
Stop hardcoding 'dist/' all over the place.  We already do it once in
the esbuild configuration blob, and that's enough.  The other places
(and particularly the plugins) should be reading it from there.

For the qunit plugin, remove a hardcoded instance of 'qunit/'.
2026-11-03 10:46:22 +01:00
Allison Karlitskaya
11b0b90ff1 esbuild-compress-plugin: fix a shadow
`path` is the `node:path` module, so avoid shadowing it with a local.
2026-11-03 10:46:22 +01:00
dependabot[bot]
19402ce11f Bump gettext-parser from 9.1.1 to 10.0.0
Some checks are pending
CodeQL / Analyze (push) Waiting to run
Differential ShellCheck / shellcheck (push) Waiting to run
Cockpit manifests / validate-manifests (push) Waiting to run
Cockpit manifests / validate-schemas (push) Waiting to run
Bumps [gettext-parser](https://github.com/smhg/gettext-parser) from 9.1.1 to 10.0.0.
- [Release notes](https://github.com/smhg/gettext-parser/releases)
- [Changelog](https://github.com/smhg/gettext-parser/blob/main/CHANGELOG.md)
- [Commits](https://github.com/smhg/gettext-parser/compare/v9.1.1...v10.0.0)

---
updated-dependencies:
- dependency-name: gettext-parser
  dependency-version: 10.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-11-02 13:58:47 +01:00
Marius Vollmer
dde36483b6 test: Account for unfixed race in UDisks2 in rhel-8-10 2026-11-02 10:56:55 +02:00
Marius Vollmer
f00c23a2b0 filechooser: Add "allowDirectories" option 2026-10-30 16:32:32 +02:00
Katerina Koukiou
7ccdc449f8 test: allow dangling anaconda WebUI branding symlinks in testBranding
The anaconda WebUI branding symlinks point to files from fedora-logos.
Fedora < 46 does not ship those files, so the symlinks are
expected to dangle there.
2026-10-30 15:28:41 +01:00
Katerina Koukiou
cf4380476b branding: add WebUI branding fallback for default/generic-logos
Symlink anaconda-branding.css and webui-header-logo.png from
generic-logos' webui.css, so the Anaconda WebUI gets branding
even without fedora-logos installed.

See https://codeberg.org/fedora-offbrand/generic-logos/pulls/1
2026-10-30 15:28:41 +01:00
Katerina Koukiou
18a88ca5c0 branding/fedora: import anaconda branding fedora-logos
Remove the anaconda brand color pallete and PatternFly token mapping.
This is now provided by the distribution's logos package via the
imported anaconda-branding.css. [1]

Also remove the .anaconda .logo rule from branding.css. It is now
defined in the imported anaconda-branding.css from fedora-logos.
Add a webui-header-logo.png symlink pointing to the logo provided
by the distribution's logos package at
/usr/share/anaconda/pixmaps/webui-header-logo.png, so cockpit-ws
can serve it.

For fedora branding, create two unconditional symlinks:
anaconda-branding.css pointing to webui.css (new name) and
anaconda-branding-compat.css pointing to fedora-webui.css
(old name). Both are imported in branding.css; the browser
silently ignores the @import that 404s (dangling symlink).

[1] https://forge.fedoraproject.org/design/packages/pulls/2
2026-10-30 15:28:41 +01:00
dependabot[bot]
961da90ca3 Bump the patternfly group across 1 directory with 6 updates
Bumps the patternfly group with 6 updates in the / directory:

| Package | From | To |
| --- | --- | --- |
| [@patternfly/patternfly](https://github.com/patternfly/patternfly) | `6.6.1` | `6.7.0` |
| [@patternfly/react-core](https://github.com/patternfly/patternfly-react) | `6.6.2` | `6.7.0` |
| [@patternfly/react-icons](https://github.com/patternfly/patternfly-react) | `6.6.1` | `6.7.0` |
| @patternfly/react-styles | `6.6.1` | `6.7.0` |
| [@patternfly/react-table](https://github.com/patternfly/patternfly-react) | `6.6.2` | `6.7.0` |
| [@patternfly/react-tokens](https://github.com/patternfly/patternfly-react) | `6.6.1` | `6.7.0` |

Updates `@patternfly/patternfly` from 6.6.1 to 6.7.0
- [Release notes](https://github.com/patternfly/patternfly/releases)
- [Changelog](https://github.com/patternfly/patternfly/blob/main/release.config.js)
- [Commits](https://github.com/patternfly/patternfly/compare/patch-v6.6.1...v6.7.0)

Updates `@patternfly/react-core` from 6.6.2 to 6.7.0
- [Release notes](https://github.com/patternfly/patternfly-react/releases)
- [Commits](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-core@6.6.2...@patternfly/react-core@6.7.0)

Updates `@patternfly/react-icons` from 6.6.1 to 6.7.0
- [Release notes](https://github.com/patternfly/patternfly-react/releases)
- [Commits](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-icons@6.6.1...@patternfly/react-icons@6.7.0)

Updates `@patternfly/react-styles` from 6.6.1 to 6.7.0

Updates `@patternfly/react-table` from 6.6.2 to 6.7.0
- [Release notes](https://github.com/patternfly/patternfly-react/releases)
- [Commits](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-table@6.6.2...@patternfly/react-table@6.7.0)

Updates `@patternfly/react-tokens` from 6.6.1 to 6.7.0
- [Release notes](https://github.com/patternfly/patternfly-react/releases)
- [Commits](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-tokens@6.6.1...@patternfly/react-tokens@6.7.0)

---
updated-dependencies:
- dependency-name: "@patternfly/patternfly"
  dependency-version: 6.7.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: patternfly
- dependency-name: "@patternfly/react-core"
  dependency-version: 6.7.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: patternfly
- dependency-name: "@patternfly/react-icons"
  dependency-version: 6.7.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: patternfly
- dependency-name: "@patternfly/react-styles"
  dependency-version: 6.7.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: patternfly
- dependency-name: "@patternfly/react-table"
  dependency-version: 6.7.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: patternfly
- dependency-name: "@patternfly/react-tokens"
  dependency-version: 6.7.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: patternfly
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-10-30 14:21:43 +01:00
Cockpit Project
184e0a07dd cockpit-ci: Update container to 2026-10-24
Closes: #23868
2026-10-30 14:21:06 +01:00
Jelle van der Waa
8443126a7b storaged: Enable strict equality everywhere
Required a small adjustment in the `block.IdVersion` comparison as it
compared against a number while `IdVersion` is a string.
2026-10-30 11:28:15 +01:00
Marius Vollmer
650af726c0 test: The fedora-coreos image now has UDisks2 2026-10-30 09:50:51 +02:00
Jelle van der Waa
2034c57b76 static: Apply strict equality everywhere 2026-10-29 15:17:14 +01:00
Jelle van der Waa
5ea7b33c00 selinux: Apply strict equality everywhere 2026-10-29 13:44:46 +01:00
Jelle van der Waa
12dc5d5578 packagekit: Apply strict equality everywhere 2026-10-29 11:57:58 +01:00
GitHub Workflow
72bf52e14d po: Update from Fedora Weblate
Closes: #23870
2026-10-29 09:51:37 +01:00
Jelle van der Waa
124d811c45 test: Use dd for generating reads
On Debian testing dropping caches causes ext4 journal writes when
running grep on /usr. This caused CI to flake and made it unable to land
any changes to pkg/metrics.
Switching to dd and reading directly from the block device circumvents
these issues.

On Ubuntu uutils does not properly support iflag=direct, so we keep
using GNU dd:

dd if=/dev/vda of=/dev/null bs=4096 count=1 iflag=direct
dd: IO error: Invalid input
2026-10-28 18:29:16 +01:00
Jelle van der Waa
3fbe9ee7e1 test: Fix packagekit preload on metrics
The page would have been preloaded regardless as we write to
/etc/cockpit/ after logging in.
2026-10-28 18:29:16 +01:00
Jelle van der Waa
2b07e23fb0 metrics: Apply strict equality everywhere 2026-10-28 18:29:16 +01:00
Miika Alikirri
4c9541e0f8 pkg/packagekit: Allow updating individual packages
Ability to select individual updates, making updating more flexible.

The selection of individual updates is implemented by using a context
provider and a simple reducer to make UI updates more snappy. A more
naive approach that requires re-rendering the whole state every time
update is (un)selected will freeze up the UI for multiple seconds if
there are hundreds of updates. And for tens of seconds if there are
thousands of updates.
2026-10-27 18:24:05 +01:00
Miika Alikirri
8d9bd7e3dd pkg/packagekit: Refactor restart warning to a component 2026-10-27 18:24:05 +01:00
Jelle van der Waa
0318caa14b lib: Apply strict equality everywhere 2026-10-27 12:18:28 +01:00
dependabot[bot]
96ee490c35 Bump argparse from 3.0.2 to 3.0.3
Bumps [argparse](https://github.com/nodeca/argparse) from 3.0.2 to 3.0.3.
- [Changelog](https://github.com/nodeca/argparse/blob/master/CHANGELOG.md)
- [Commits](https://github.com/nodeca/argparse/compare/3.0.2...3.0.3)

---
updated-dependencies:
- dependency-name: argparse
  dependency-version: 3.0.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-10-25 15:20:16 +01:00
Jelle van der Waa
d51c13eef2 test: Fedora 45 supports VDO logical volumes now 2026-10-23 17:27:20 +02:00
Jelle van der Waa
e15c0f198c test: Skip luks2 tests on Fedora 45
These tests OOM now on Fedora 45 due to increased memory requirements of
cryptsetup. Skip for now and debug them later.
2026-10-23 17:27:20 +02:00
Jelle van der Waa
2c5be3b16b test: Keep testBtrfs on Luks on LUKS 1
On Fedora 45 cryptsetup now tries to consume 1 GB of memory we don't
have. To keep testing this for the Anaconda scenario keep it on LUKS 1.
2026-10-23 17:27:20 +02:00
Jelle van der Waa
3725bfc448 cockpit: Allow beibooting to Fedora 45 2026-10-23 17:27:20 +02:00
tomasmatus
0ce62641ec tests: --mindays is not available on fedora-45
Add it to the list of images with new shadowutils.
2026-10-23 17:27:20 +02:00
tomasmatus
95dfc9f0d7 tests: use --nosignature when installing cockpit-ws
fedora-45 enforces strict signature checking, explicitly override it.
See https://fedoraproject.org/wiki/Changes/Enforcing_signature_checking_by_default
2026-10-23 17:27:20 +02:00
Jelle van der Waa
5bda751590 base1: Apply strict equality everywhere 2026-10-23 14:45:11 +02:00
Jelle van der Waa
f22866ea30 networkmanager: Apply strict equality everywhere 2026-10-23 10:14:23 +02:00
tomasmatus
84ecef72b4 cockpit.d.ts: type cockpit.hint 2026-10-22 11:01:18 +02:00
tomasmatus
f20c7445bb cockpit.d.ts: add types for base64_{encode | decode} functions 2026-10-22 11:01:18 +02:00
tomasmatus
4313a8bbce networking: rename utils.js to .ts, type simple util functions
Adds types to simple functions, ignores the few that use NM connections
or NMsettings
2026-10-22 11:01:18 +02:00
Jelle van der Waa
fd21ab5cf6 test: Ignore alien-tag issues on Ubuntu as well 2026-10-22 09:10:51 +02:00
GitHub Workflow
35a30182a2 po: Update from Fedora Weblate
Closes: #23851
2026-10-21 13:30:26 +02:00
Jelle van der Waa
95f63aabe6 systemd: Apply strict equality everywhere
Fixes on issue where we relied on type coercion in `hw-detect.js`.
2026-10-21 11:31:24 +02:00
Jelle van der Waa
94e5358e0f test: Debian now has shadow-utils 4.20 as well. 2026-10-21 10:10:16 +02:00
Jelle van der Waa
7acfbe6d92 debian: Add lintian override for woff-font-in-wrong-dir
In Debian Testing this was renamed or newly added, basically the same
lintian rule as font-outside-font-dir.
2026-10-21 10:10:16 +02:00
Peter Buchan Jr
d3488cc1a3 shell: Don't style the System button label as a nav toggle on mobile
In the mobile layout the "System" label sits 4px lower than the
"Help" and "Session" labels and its box overflows the navbar.

The nav toggle rule also matched `#nav-system-item > .pf-v6-c-button__text`,
so the label span got its own `display: grid`, `grid-template-rows: 28px 1fr`
and `block-size: 100%`. It renders inside a 28px row of its own, which
pushes the text down. The button itself already matches
`button.ct-nav-toggle`, and the nested rules in that block target
menu-toggle/select children that the label span never has.

Dropping the selector puts the label at the same height as the other
navbar labels. Follow-up to #23083.

Signed-off-by: Peter Buchan Jr <pbuchan@redhat.com>
Assisted-by: Claude Opus 5.5
2026-10-21 09:52:42 +02:00
Jelle van der Waa
4bc7d15220 test: Drop VM boot storm workaround
On our new test infrastructure, we have enough CPU/Memory overhead to
spin up without running into issues.

This sleep was very problematic as it made skipping destructive tests
take 15 seconds in total. On an Arch test run 5 skipped tests takes up 1
minute of idle waiting time.
2026-10-20 15:10:33 +02:00