Commit graph

24378 commits

Author SHA1 Message Date
tomasmatus
1d1b626f57 networkmanager: add PoC anaconda layout
Co-authored-by: Freya Gustavsson <freya@venefilyn.se>
2026-10-14 15:30:10 +02:00
tomasmatus
c362e6a0d7 networkmanager: refactor action buttons in wireless network table
Primary action button is now aligned to the right, use ActionsColumn
component for kebab menu.

Co-authored-by: Freya Gustavsson <freya@venefilyn.se>
2026-10-14 15:30:10 +02:00
tomasmatus
69006074ef networkmanager: add has_group and is_loopback helper functions
Co-authored-by: Freya Gustavsson <freya@venefilyn.se>
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
Jelle van der Waa
6913e9b593 packagekit: Replace software updates link with kpatch
The old article was removed and the RHEL docs only include a section
about enabling kpatch in the software updates page to link too.
2026-10-13 14:41:49 +02:00
Jelle van der Waa
0f3fb0e47f kdump: Update RHEL documentation link 2026-10-13 14:41:49 +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
Jelle van der Waa
9d1fdf9f06 packagekit: Use PackageManager.update_packages for Software Updates
Use the `update_packages` abstraction in the Software Updates page so
Cockpit can support dnf5daemon as well. This does not re-use
`get_running_updates` emits the same callbacks in `update_packages` now.
This to prevent us racing with `update_packages` to obtain the
transaction or as alternative having to expose PackageKit's internal
transaction DBus path.
The extra code duplication in the end isn't that much to consider the
alternatives.
2026-10-13 08:44:15 +02:00
Jelle van der Waa
0c7e51b702 packagekit: Implement PackageManager.get_running_update()
Move the initial watching of updates to a new method which can be
implemented by PackageKit or DNF5Daemon. The current implementation
still returns a transaction_path which is PackageKit specific but for
now this is temporary until the next commit moves update_packages over
to the PackageManager API.

The DNF5Daemon implementation will have to wait until we have
update_packages() available.
2026-10-13 08:44:15 +02:00
Jelle van der Waa
8790d1a937 storaged: Rename packagekit to packagemanager
With the previous commit we use the PackageManager abstraction now, so
also rename the variable accordingly.
2026-10-12 10:40:49 +02:00
Jelle van der Waa
21487abcbc storaged: Port packagekit test to PackageManager
This allows it to work with dnf5daemon or PackageKit and allows us to
move pkg/lib/packagekit.js into pkg/lib/_internal/packagekit.ts.
2026-10-12 10:40:49 +02:00
dependabot[bot]
8a63420b10 bump stylelint from 17.15.0 to 17.16.0 in the stylelint group
Bumps the stylelint group with 1 update: [stylelint](https://github.com/stylelint/stylelint).

Updates `stylelint` from 17.15.0 to 17.16.0
- [Release notes](https://github.com/stylelint/stylelint/releases)
- [Changelog](https://github.com/stylelint/stylelint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/stylelint/stylelint/compare/17.15.0...17.16.0)

---
updated-dependencies:
- dependency-name: stylelint
  dependency-version: 17.16.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: stylelint
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-10-11 17:32:14 +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
618473f951 package.json: Switch to markdown-to-jsx
The PackageKit UpdateDetail signal provides markdown in the
`update_text` and uses remarkable to parse the markdown contents.

Remarkable however has not been updated since 6 years, additionally it
requires us to use `dangerouslySetInnerHTML` which can lead to XSS
issues.

The npm ecosystem has two other markdown alternatives `react-markdown`
and a `markdown-to-jsx`. The latter has zero dependencies while
`react-markdown` has eleven and requires additional plugins like
`rehype-external-links` to add a rel/target to external links.

https://www.freedesktop.org/software/PackageKit/gtk-doc/Transaction.html
https://github.com/jonschlinkert/remarkable/issues/438
2026-10-09 15:43:36 +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
Cockpit Project
c7038948d8 cockpit-ci: Update container to 2026-10-03
Closes: #23802
2026-10-07 08:42:35 +02:00
GitHub Workflow
260ff332f0 po: Update from Fedora Weblate
Closes: #23808
2026-10-07 08:09:53 +02:00
Allison Karlitskaya
18c130647b pkg/lib: fix trivial linter errors 2026-10-06 15:17:50 +02:00
Allison Karlitskaya
eeeda8786e cockpit-po-plugin: properly quote the language
Presuming that .po files are an untrusted input, the "Language" string
in the .po file header could easily be set to something like

  " + console.log("pwned") + "

which would escape the naive application of double quotes to either side
of it by the plugin when inserting it into the header of the .po.js
file.  Use JSON.stringify() to make sure we get the quoting right.
2026-10-06 14:43:43 +02:00
Allison Karlitskaya
9b38d4d213 cockpit-po-plugin: ensure Plural-Forms is valid
This might have been done in a separate file but cockpit-po-plugin is
currently standalone, so let's keep it that way.  This file is imported
into external projects.

Add a test case that runs once on module import: it's cheap (~1-2ms).

CVE-2026-92769
Fixes: https://redhat.atlassian.net/browse/RHEL-219811
2026-10-06 14:43:43 +02:00
GitHub Workflow
a3623d2eec po: Update from Fedora Weblate
Closes: #23797
2026-10-06 13:00:23 +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
GitHub Workflow
e90f947259 po: Update from Fedora Weblate
Closes: #23789
2026-10-02 12:01:10 +02:00
dependabot[bot]
fc18906f57 build(deps): bump the actions group with 2 updates
Bumps the actions group with 2 updates: [github/codeql-action](https://github.com/github/codeql-action) and [sourcemeta/jsonschema](https://github.com/sourcemeta/jsonschema).


Updates `github/codeql-action` from 4.37.9 to 4.38.2
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/v4.37.9...v4.38.2)

Updates `sourcemeta/jsonschema` from 16.9.0 to 17.0.0
- [Release notes](https://github.com/sourcemeta/jsonschema/releases)
- [Commits](https://github.com/sourcemeta/jsonschema/compare/v16.9.0...v17.0.0)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-version: 4.38.2
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: actions
- dependency-name: sourcemeta/jsonschema
  dependency-version: 17.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: actions
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-10-02 12:00:48 +02:00
Cockpit Project
566c1ca3ce cockpit-ci: Update container to 2026-09-26
Closes: #23784
2026-09-30 13:06:03 +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
Freya Gustavsson
b9ed76508c flatpak: Update to Gnome v51
Flatpak runner shows a warning that v51 is now available to use and
should be migrated to.

Fixes: https://github.com/flathub/org.cockpit_project.CockpitClient/issues/98
Signed-off-by: Freya Gustavsson <freya@venefilyn.se>
2026-09-25 15:49:22 +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
3e1ae27a48 packit: Test on Fedora ELN 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
dependabot[bot]
853699ab96 Bump argparse from 3.0.1 to 3.0.2
Bumps [argparse](https://github.com/nodeca/argparse) from 3.0.1 to 3.0.2.
- [Changelog](https://github.com/nodeca/argparse/blob/master/CHANGELOG.md)
- [Commits](https://github.com/nodeca/argparse/commits)

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

Signed-off-by: dependabot[bot] <support@github.com>
2026-09-22 16:12:04 +02:00
tomasmatus
ac6d0f36c8 cockpit-tls: don't warn on EACCES when connecting to ws socket
systemd can racily set up the instance socket. There is a window
during which connecting to the socket fails with EACCES.
Like ENOENT and ECONNREFUSED, this is transient and resolved
by retrying, so don't warn about it.
2026-09-22 13:18:21 +02:00
GitHub Workflow
0f8fc00f3b po: Update from Fedora Weblate
Closes: #23768
2026-09-21 16:05:49 +02:00
Marius Vollmer
e12c37897d tls: Limit concurrent connections
Resolves: COCKPIT-1905, RHEL-263070, RHEL-263066
2026-09-21 15:28:29 +03:00
Freya Gustavsson
709aac3638 po: Use xgettext over msgcat for POT-files
`msgcat` gives a warning nowadays stating that it is more for PO-files
and shouldn't be used for merging POT-files. Instead it recommends that
we use `xgettext` for that as `msgcat` could produce output that isn't
intended.

As a caveat to using `xgettext` for concatenating POT-files it also
throws errors when the set charset for the source POT-files differ from
each other. Some of the POT-files, namely `po/cockpit.js.pot` and
`po/cockpit.appstream.pot`, don't get charset configured correctly and
instead shows `charset=CHARSET` by default.

While this now includes `sed` replace for the charsets as a way to
force-configure it as UTF-8, efforts were made to solve the issue
using supported means. With the research I did I found that there are
`--from-code=UTF-8` which we already utilize and should tell `xgettext`
about the charset. If it detects anything that isn't UTF-8 it will
ignore the `--from-code` value AFAICT and therefore won't set the
charset. There has been attempts to find other solutions but non were found.

See-also: https://www.gnu.org/software/gettext/manual/html_node/msgcat-Invocation.html#Invoking-the-msgcat-Program
See-also: https://www.gnu.org/software/gettext/manual/html_node/Combining-POTs.html
Introduced-in: df13e4104f
Fixes: https://github.com/cockpit-project/cockpit/issues/23757
Signed-off-by: Freya Gustavsson <freya@venefilyn.se>
2026-09-21 14:22:11 +02:00
Freya Gustavsson
b1c58b672f po: Sort manifest2po files
This prevents updates to source strings in pot file that only changes
the order in which the strings appear when a string is used in multiple
files.

Fixes: https://github.com/cockpit-project/cockpit/issues/23754
Signed-off-by: Freya Gustavsson <freya@venefilyn.se>
2026-09-21 14:03:07 +02:00
Marius Vollmer
d8dce305c1 shell: Use FileChooser for SSH keys 2026-09-18 14:31:37 +02:00
Marius Vollmer
eeac2a3459 lib: More robust responsive behavior of the FileChooser
We should not try to control the "display" style of PatternFly
elements. They might have their own CSS rules for it with unknown
specificity.

Specifically, a DropdownItem has "display: flex" from PatternFly with
the same specificity as our "display: none" from the
".file-chooser-hide-on-wide" class.  Which one is in effect seems to
be decided by the roll of a dice.
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