Commit graph

8659 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
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
Marius Vollmer
dde36483b6 test: Account for unfixed race in UDisks2 in rhel-8-10 2026-11-02 10:56:55 +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
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
Marius Vollmer
650af726c0 test: The fedora-coreos image now has UDisks2 2026-10-30 09:50:51 +02: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
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
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
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
fd21ab5cf6 test: Ignore alien-tag issues on Ubuntu as well 2026-10-22 09:10:51 +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
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
Jelle van der Waa
06b332eede test: Obtain default password expiry from /etc/login.defs
shadow-utils 4.20 did not change the default expiry but Arch changed
/etc/login.defs.
2026-10-19 15:13:26 +02:00
Jelle van der Waa
978ba9055d storaged: Decode TPM2 slot information
Before this change Cockpit would show the TPM2 slot as "Unknown type",
now we at least show that this slot is configured to use a TPM module
and parse, make additional information available for the UI to later
show if the data is sealed to a Platform Configuration Register (PCR)
state.

Only support removing not editing a TPM2 slot as Cockpit does not
support creating a TPM2 slot.

The Testing Farm has no /dev/tpm available so testing is skipped there.

Resolves: https://redhat.atlassian.net/browse/RHEL-167807
2026-10-19 14:38:27 +02:00
tomasmatus
9b0da4e26b netlib: make NetworkCase.cleanupDevs less fragile
`nmcli dev del` allows passing multiple devices that should be deleted.
Reduce the amount of calls required.
This also handles v_eth better which are represented by two devices but
once either is deleted both are removed automatically.
2026-10-14 15:30:10 +02:00
tomasmatus
905b0c655b netlib: use nmcli to clean up after add_veth
For devices managed by NetworkManager `ip link del` may not be enough
and NM brings the device back. Since `add_veth` is used to create a
virtual device managed by NM use `nmcli` to delete it instead.
2026-10-14 15:30:10 +02:00
tomasmatus
792af2d170 networking anaconda layout: add basic test 2026-10-14 15:30:10 +02:00
tomasmatus
051de33f30 netlib: move wireless network setup to NetworkCase
Allow sharing with anaconda-mode tests
2026-10-14 15:30:10 +02:00
tomasmatus
58afa539cf testlib: move enterAnacondaMode to TestCase class
Allow sharing this helper function between storage and networking tests.
2026-10-14 15:30:10 +02:00
Viktor Szépe
5ff1ec08a0
Fix typos throughout codebase (#23813)
Several typos and common misspellings of words exists throughout Cockpit. This fixes the spellings.
2026-10-14 14:02:30 +02:00
Jelle van der Waa
55e444a819 packagelib: Avoid running into locking issues with apt
In our CI packagekit holds a lock on /var/lib/apt/lists/lock while we
try to run apt-get clean. Make sure PackageKit is stopped before we
invoke any apt commands.

Only on Debian/Ubuntu is the package manager cache shared with
PackageKit on all other OSes PackageKit uses a separate cache directory.
2026-10-13 19:23:50 +02:00
Jelle van der Waa
a177b46792 test: Drop PackageKit service override which was never applied
From our logs:

Warning: The unit file, source configuration file or drop-ins of packagekit.service changed on disk. Run 'systemctl daemon-reload' to reload units.
2026-10-13 19:23:50 +02:00
Jelle van der Waa
6540c52962 test: Wait for the Software updates page to load
In our CI this test sometimes flakes on fedora-44/devel, due to the
automatic updates button to still be disabled. To give our tests more
time to wait on PackageKit/dnf5 to finish, first assert the page loaded.
2026-10-13 19:23:50 +02:00
akawathe-rgb
58a8d759c6 systemd: Make chrony sources drop-in world-readable
chronyd runs as an unprivileged system user. With a tight umask,
Cockpit created /etc/chrony/sources.d and cockpit.sources as 750/640
root:root, so chronyd could not read NTP servers set in the UI.

Force 755/644 independently of the session umask, matching the
timesyncd fix. Cover it in testTimeServersChronyd with umask 077.

Resolves: RHEL-253609
Assisted-by: LLM
Co-authored-by: Freya Gustavsson <freya@venefilyn.se>
2026-10-13 11:28:36 +02:00
Freya Gustavsson
2f57692b9c storaged: Support UTF-8 encoding for mounts
While we have `atob` and `btoa` it doesn't support anything other than
Latin1, which causes issues for mountpoint names that exceed what Latin1
supports - such as Chinese.

Tests were updated with a new Chinese name, this caused a reordering of
the modal and subsequently had to be updated in the tests. The Chinese
mount name "数据资料" roughly translates to data and information
according to DeepL.

Fixes: https://github.com/cockpit-project/cockpit/issues/23783
Signed-off-by: Freya Gustavsson <freya@venefilyn.se>
2026-10-09 16:04:40 +02:00
Jelle van der Waa
6cab90c58b tmt: Drop kernel-modules-internal from ELN
RHEL does not have this package and it was accidentally available on
ELN. Solves Testing Farm failing with:

No match for argument: kernel-modules-internal
2026-10-09 08:12:49 +02:00
Freya Gustavsson
855eab6059 users: Fix locale sort for groups
Within account details there is a select dropdown to select groups for a
user. This was meant to be sorted by `isAdmin` field, followed by
alphabetical order. In reality the alphabetical sorting wasn't done
correctly and we got strange sorting. On top of that, the `isAdmin` sort
method didn't take into consideration sorting the groups with `isAdmin`
set to true.

Fixes: https://github.com/cockpit-project/cockpit/issues/22909
Signed-off-by: Freya Gustavsson <freya@venefilyn.se>
2026-10-08 14:50:44 +02:00
Jelle van der Waa
acde760e23 test: Use systemctl mask --now where possible
systemd supports stopping the unit before masking it, this gracefully
handles units which are not running or available on the system.
2026-10-07 19:03:48 +02:00
tomasmatus
55b3948dda pkg/lib: set overflow-y on .pf-v6-c-page__main-container
In pixel-test changes on new tasks container (2026-10-03) our hack to
hide scrollbars in pixeltests stopped working.
Setting `overflow-y: clip` both on `main` and on .pf-v6-c-page__main-container
makes this hack work again.
2026-10-07 08:42:35 +02:00
tomasmatus
dc3d089953 packagelib: cleanup repository config on fedora-45
On fedora-45 the dir with repository configs is in
/usr/share/dnf5/repos.d/, delete it.
2026-10-06 12:49:29 +02:00
tomasmatus
99db1d0d2c tests: add rhel-9-10 to v1 stratis pool list
Related: https://github.com/cockpit-project/bots/pull/9479
2026-10-05 16:31:16 +02:00
Marius Vollmer
f5c21f09a8 test: Update patterns for AVC messages in TestLogin.testSELinuxRestrictedUser
We haven't checked them for a long time, and they look different now,
at least on rhel-9-9.
2026-09-28 09:03:43 +02:00
Marius Vollmer
a52e8c89e3 test: Explicitly allow audit messages triggered in TestSelinux.testTroubleshootAlerts
This wasn't necessary earlier since machine.audit_messages() doesn't
seem to actually find any audit messages.

(For Fedora, see https://github.com/cockpit-project/bots/issues/9468.
Other images have similar problems, apparently.)

If we fix this, explicitly allowing the expected messages is
necessary.
2026-09-25 13:54:58 +03:00
Jelle van der Waa
28a6c637d1 test: Drop old TF comment
This was added before the split into scenarios and in RHEL these
packages are part of cockpit-system.
2026-09-25 08:47:46 +02:00
Jelle van der Waa
5cfc6b92da test: Skip V1 Stratis pool tests on ELN 2026-09-25 08:47:46 +02:00
Jelle van der Waa
f891d5308b test: skip teaming/btrfs tests on Fedora ELN
Commit fd35533544 was insufficient, it only fixed one
scenario where we have to exclude tests, while storage-{basic,extra} and
main are left unfixed as they still ran teaming/btrfs tests.
2026-09-25 08:47:46 +02:00
Jan Ščotka
2e208fcf64 test: drop ubuntu-stable workarounds
The ubuntu-stable image is being retired (cockpit-project/bots#9447,
cockpit-project/bots#9453), so its test-side workarounds are now dead
code:

 - has_sudo_rs no longer needs to exclude ubuntu-stable; every
   remaining ubuntu* image ships sudo-rs.
 - the lintian missing-debian-watch-file-standard suppression only
   needs debian-trixie now.

Assisted-by: claude
2026-09-24 17:06:48 +02:00
Marius Vollmer
d8dce305c1 shell: Use FileChooser for SSH keys 2026-09-18 14:31:37 +02:00
Marius Vollmer
1c7c71622d test: Add FileChooserHelpers 2026-09-18 14:31:37 +02:00
Marius Vollmer
10932a4755 test: Use synthetic events to click on #logout
There is something unknown going on that makes using a real mouse
click unreliable.  Maybe the menu is being animated and the click
misses the menu item while it is flying around, or maybe something
else. We don't want to test the menu here, we just want to log out.
2026-09-18 13:26:22 +02:00
Freya Gustavsson
556a0ba1e6 lib(dnf5daemon): Reset if pkgs are installed
Resets the transaction and returns if the problems found are only that
the packages are already installed. Since `check_missing_packages` just
checks and doesn't install it shouldn't fail if all packages that are
being checked are installed.

Fixes: https://github.com/cockpit-project/cockpit/issues/23717
Signed-off-by: Freya Gustavsson <freya@venefilyn.se>
2026-09-18 13:23:53 +02:00
Jelle van der Waa
5efa4af065 packagekit: Sanitize PackageKit urls
It is very unlikely that vendor/bug/cve urls can be tempered with, it
requires messing with a Bodhi update or repodata. But we already have a
function to validate urls so do our due diligence and also filter out
invalid urls from the package update information.
2026-09-18 08:46:27 +02:00
Jelle van der Waa
6e76c96272 packagekit: Sanitize markdown urls
Our Remarkable (markdown parser) link_open copied the package update
description urls directly into the DOM allowing cross site scripting via
for example mouse or click handlers. This issue is prevented by our
Content Security Policy but sanitizing is still an additional measure we
should apply.

Setting the href via `setAttribute` properly escapes extra options such
as `onmouseover`. Additionally this commit will filter out unwanted URL
schemes such as `javascript:` to prevent those from becoming another
exploit vector. Other code constructing anchor elements can also reuse
this helper to filter out unwanted URL schemes.

Resolves: COCKPIT-1899
Resolves: CVE-2026-91148
2026-09-18 08:46:27 +02:00
Vojtech Trefny
d78df9b9eb storaged: Disable Stratis Tang encryption in Anaconda mode
Anaconda and Blivet currently don't support using Clevis/Tang
encryption with Stratis so we shouldn't allow users creating
Stratis pools with Clevis encryption.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-09-15 15:32:18 +03:00