From 5ff1ec08a0eca955f8c0f1a92fd82afd76388f09 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Viktor=20Sz=C3=A9pe?= Date: Wed, 14 Oct 2026 14:02:30 +0200 Subject: [PATCH] Fix typos throughout codebase (#23813) Several typos and common misspellings of words exists throughout Cockpit. This fixes the spellings. --- .github/ISSUE_TEMPLATE/bug_report.yml | 2 +- pkg/base1/test-file.ts | 4 ++-- pkg/base1/test-metrics.js | 2 +- pkg/lib/_internal/packagekit.ts | 6 +++--- pkg/networkmanager/firewall-client.js | 2 +- pkg/networkmanager/firewall.jsx | 2 +- pkg/shell/machines/machines.d.ts | 2 +- pkg/shell/state.tsx | 2 +- pkg/storaged/btrfs/filesystem.jsx | 2 +- pkg/users/account-details.js | 4 ++-- selinux/cockpit.if | 4 ++-- src/pam-ssh-add/pam-ssh-add.c | 4 ++-- src/pam-ssh-add/pam-ssh-add.h | 2 +- src/pam-ssh-add/test-ssh-add.c | 12 ++++++------ src/testlib/cockpittest.c | 10 +++++----- src/testlib/cockpittest.h | 2 +- src/ws/test-pipe.c | 2 +- src/ws/test-transport.c | 2 +- src/ws/test-webresponse.c | 12 ++++++------ test/common/testlib.py | 2 +- test/verify/check-networkmanager-wireguard | 2 +- test/verify/check-shell-multi-machine-key | 2 +- test/verify/check-storage-anaconda | 2 +- test/verify/check-storage-stratis | 4 ++-- test/verify/check-system-services | 2 +- 25 files changed, 46 insertions(+), 46 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index 227db56b34..cbfbae504a 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -123,7 +123,7 @@ body: description: | (Multiple choices available.) Browser information helps with debugging, especially if things look odd or if pages are blank. - If your browser isn't in the list, select other and mention in the explaination text entry above. + If your browser isn't in the list, select other and mention in the explanation text entry above. multiple: true options: - Firefox diff --git a/pkg/base1/test-file.ts b/pkg/base1/test-file.ts index 7ae4f943bf..e119bd5d67 100644 --- a/pkg/base1/test-file.ts +++ b/pkg/base1/test-file.ts @@ -10,7 +10,7 @@ QUnit.test("simple read", async assert => { assert.equal(await file.read(), "1234\n", "correct result"); }); -QUnit.test("read non-existant", async assert => { +QUnit.test("read non-existent", async assert => { assert.equal(await cockpit.file(dir + "/blah").read(), null, "correct result"); }); @@ -387,7 +387,7 @@ QUnit.test("watching without reading pre-created", async assert => { const file = cockpit.file(dir + "/fsinfo"); await file.replace("1234"); const watch = file.watch((content, tag) => { - assert.equal(content, null, "non-existant because read is false"); + assert.equal(content, null, "non-existent because read is false"); assert.notEqual(tag, null, "non empty tag"); cockpit.assert(tag !== null, "tag is null"); assert.equal(tag.startsWith("1:"), true, "tag always starts with 1:"); diff --git a/pkg/base1/test-metrics.js b/pkg/base1/test-metrics.js index 2973f4b22a..2a721097a0 100644 --- a/pkg/base1/test-metrics.js +++ b/pkg/base1/test-metrics.js @@ -183,7 +183,7 @@ QUnit.test("metrics object validation", assert => { source: "internal", interval: 1000, metrics: [ - { name: "nonexistant", derive: "rate" }, + { name: "nonexistent", derive: "rate" }, ] }); diff --git a/pkg/lib/_internal/packagekit.ts b/pkg/lib/_internal/packagekit.ts index c491839bfd..75461ec0af 100644 --- a/pkg/lib/_internal/packagekit.ts +++ b/pkg/lib/_internal/packagekit.ts @@ -146,7 +146,7 @@ export class PackageKitManager implements PackageManager { let last_info = 0; let last_name = ""; - function report_progess() { + function report_progress() { if (progress_cb && last_progress !== null) progress_cb({ waiting: last_progress.waiting, @@ -162,13 +162,13 @@ export class PackageKitManager implements PackageManager { await PK.cancellableTransaction("InstallPackages", [0, data.missing_ids], (p: ProgressData) => { last_progress = p; - report_progess(); + report_progress(); }, { Package: (info: number, id: string) => { last_info = info; last_name = id.split(";")[0]; - report_progess(); + report_progress(); } }); } diff --git a/pkg/networkmanager/firewall-client.js b/pkg/networkmanager/firewall-client.js index 875c4e2f70..007b30e645 100644 --- a/pkg/networkmanager/firewall-client.js +++ b/pkg/networkmanager/firewall-client.js @@ -544,7 +544,7 @@ firewall.activateZone = (zone, interfaces, sources) => { /* * A zone is considered deactivated when it has no interfaces or sources. */ -firewall.deactiveateZone = (zone) => { +firewall.deactivateZone = (zone) => { const zoneObject = firewall.zones[zone]; let promises = zoneObject.interfaces.map(i => firewalld_dbus.call('/org/fedoraproject/FirewallD1', 'org.fedoraproject.FirewallD1.zone', diff --git a/pkg/networkmanager/firewall.jsx b/pkg/networkmanager/firewall.jsx index 088c9b09d7..1d50ee613d 100644 --- a/pkg/networkmanager/firewall.jsx +++ b/pkg/networkmanager/firewall.jsx @@ -986,7 +986,7 @@ export class Firewall extends React.Component { target={zone} onCancel={Dialogs.close} onDelete={ () => { - firewall.deactiveateZone(zone); + firewall.deactivateZone(zone); Dialogs.close(); }} /> ); diff --git a/pkg/shell/machines/machines.d.ts b/pkg/shell/machines/machines.d.ts index 3e0a4441df..9c0daeb12a 100644 --- a/pkg/shell/machines/machines.d.ts +++ b/pkg/shell/machines/machines.d.ts @@ -34,7 +34,7 @@ interface MachinesEvents extends EventMap { export interface Machines extends EventSource { ready: boolean; - lookup: (conection_string: string) => Machine; + lookup: (connection_string: string) => Machine; list: Machine[]; change: (key: string, props: Partial) => void; } diff --git a/pkg/shell/state.tsx b/pkg/shell/state.tsx index 54b5a5508b..4fc5c86da6 100644 --- a/pkg/shell/state.tsx +++ b/pkg/shell/state.tsx @@ -207,7 +207,7 @@ export class ShellState extends EventEmitter { #ensure_frame(machine: Machine, path: string, hash: string | null, title: string): ShellFrame | null { /* Never create new frames for machines that are not connected yet. That would open a channel to them (for - loading the URL), which woould trigger the bridge to + loading the URL), which would trigger the bridge to attempt a log in. We want all logins to happen in a single place (in hosts.jsx) so that we can get the options right, and show a warning dialog. diff --git a/pkg/storaged/btrfs/filesystem.jsx b/pkg/storaged/btrfs/filesystem.jsx index f9c31866c8..44c2be7aaa 100644 --- a/pkg/storaged/btrfs/filesystem.jsx +++ b/pkg/storaged/btrfs/filesystem.jsx @@ -22,7 +22,7 @@ const _ = cockpit.gettext; /** * For single btrfs volumes we show the data as a filesystem card with the - * subvolumes directly undernearth. This differentiates from multi device + * subvolumes directly underneath. This differentiates from multi device * volumes, there they are shown under a different card. */ export function make_btrfs_filesystem_card(next, backing_block, content_block) { diff --git a/pkg/users/account-details.js b/pkg/users/account-details.js index ed0f87f2dd..32aec17abc 100644 --- a/pkg/users/account-details.js +++ b/pkg/users/account-details.js @@ -124,7 +124,7 @@ export function AccountDetails({ account, groups, isLoading, current_user, shell const [editedRealName, setEditedRealName] = useState(null); const [realNameError, setRealNameError] = useState(""); - const [comittingRealName, setCommittingRealName] = useState(false); + const [committingRealName, setCommittingRealName] = useState(false); const [disableLockedEdit, setDisableLockedEdit] = useState(false); useEffect(() => { @@ -262,7 +262,7 @@ export function AccountDetails({ account, groups, isLoading, current_user, shell { superuser.allowed ? <> { if (event.key == "Enter") { diff --git a/selinux/cockpit.if b/selinux/cockpit.if index 0fb6445e24..2d7e872ac6 100644 --- a/selinux/cockpit.if +++ b/selinux/cockpit.if @@ -2,7 +2,7 @@ ######################################## ## -## Execute TEMPLATE in the cockpit domin. +## Execute TEMPLATE in the cockpit domain. ## ## ## @@ -21,7 +21,7 @@ interface(`cockpit_ws_domtrans',` ######################################## ## -## Execute TEMPLATE in the cockpit domin. +## Execute TEMPLATE in the cockpit domain. ## ## ## diff --git a/src/pam-ssh-add/pam-ssh-add.c b/src/pam-ssh-add/pam-ssh-add.c index 1d1a6cde08..47c7bd71cb 100644 --- a/src/pam-ssh-add/pam-ssh-add.c +++ b/src/pam-ssh-add/pam-ssh-add.c @@ -613,7 +613,7 @@ done: int pam_ssh_add_start_agent (pam_handle_t *pamh, struct passwd *pwd, - const char *xdg_runtime_overide, + const char *xdg_runtime_override, char **out_auth_sock_var, char **out_agent_pid_var) { @@ -642,7 +642,7 @@ pam_ssh_add_start_agent (pam_handle_t *pamh, assert (pwd); xdg_runtime = get_optional_env ("XDG_RUNTIME_DIR", - xdg_runtime_overide); + xdg_runtime_override); if (!build_environment (env, "PATH", PATH, "LC_ALL", "C", diff --git a/src/pam-ssh-add/pam-ssh-add.h b/src/pam-ssh-add/pam-ssh-add.h index f02e9ac847..e619c1c0cd 100644 --- a/src/pam-ssh-add/pam-ssh-add.h +++ b/src/pam-ssh-add/pam-ssh-add.h @@ -22,7 +22,7 @@ extern pam_ssh_add_logger pam_ssh_add_log_handler; int pam_ssh_add_start_agent (pam_handle_t *pamh, struct passwd *pwd, - const char *xdg_runtime_overide, + const char *xdg_runtime_override, char **out_auth_sock_var, char **out_agent_pid_var); diff --git a/src/pam-ssh-add/test-ssh-add.c b/src/pam-ssh-add/test-ssh-add.c index f4de753373..ed22d3c9d4 100644 --- a/src/pam-ssh-add/test-ssh-add.c +++ b/src/pam-ssh-add/test-ssh-add.c @@ -218,7 +218,7 @@ test_environment (Fixture *fix, } static void -test_environment_env_overides (Fixture *fix, +test_environment_env_overrides (Fixture *fix, gconstpointer user_data) { setenv ("PATH", "bad", 1); @@ -232,7 +232,7 @@ test_environment_env_overides (Fixture *fix, } static void -test_environment_overides (Fixture *fix, +test_environment_overrides (Fixture *fix, gconstpointer user_data) { setenv ("XDG_RUNTIME_DIR", "bad", 1); @@ -399,10 +399,10 @@ main (int argc, g_test_add ("/pam-ssh-add/environment", Fixture, &environment_fixture, setup, test_environment, teardown); - g_test_add ("/pam-ssh-add/environment-env-overides", Fixture, &environment_fixture, - setup, test_environment_env_overides, teardown); - g_test_add ("/pam-ssh-add/environment-overides", Fixture, &environment_fixture, - setup, test_environment_overides, teardown); + g_test_add ("/pam-ssh-add/environment-env-overrides", Fixture, &environment_fixture, + setup, test_environment_env_overrides, teardown); + g_test_add ("/pam-ssh-add/environment-overrides", Fixture, &environment_fixture, + setup, test_environment_overrides, teardown); g_test_add ("/pam-ssh-add/good-agent-vars", Fixture, &good_agent_fixture, setup, test_good_agent_vars, teardown); g_test_add ("/pam-ssh-add/bad-agent-vars", Fixture, &bad_agent_fixture, diff --git a/src/testlib/cockpittest.c b/src/testlib/cockpittest.c index 5e8620aa85..648bc0a669 100644 --- a/src/testlib/cockpittest.c +++ b/src/testlib/cockpittest.c @@ -40,7 +40,7 @@ typedef struct { const gchar *file; int line; const gchar *func; - gboolean skipable; + gboolean skippable; gboolean optional; } ExpectedMessage; @@ -128,7 +128,7 @@ expected_message_handler (const gchar *log_domain, g_test_log_set_fatal_handler (expected_fatal_handler, NULL); } - /* Loop until we find a non-skipable message or have a match */ + /* Loop until we find a non-skippable message or have a match */ for (l = expected_messages; l != NULL; l = l->next) { expected = l->data; @@ -141,7 +141,7 @@ expected_message_handler (const gchar *log_domain, skip = TRUE; break; } - else if (!expected->skipable) + else if (!expected->skippable) { break; } @@ -223,7 +223,7 @@ _cockpit_expect_logged_msg (const char *domain, const gchar *func, GLogLevelFlags log_level, const gchar *pattern, - gboolean skipable, + gboolean skippable, gboolean optional) { ExpectedMessage *expected; @@ -242,7 +242,7 @@ _cockpit_expect_logged_msg (const char *domain, expected->file = file; expected->line = line; expected->func = func; - expected->skipable = optional ? TRUE : skipable; + expected->skippable = optional ? TRUE : skippable; expected->optional = optional; G_LOCK (expected); diff --git a/src/testlib/cockpittest.h b/src/testlib/cockpittest.h index 71d1c6f1f2..b47973c7c9 100644 --- a/src/testlib/cockpittest.h +++ b/src/testlib/cockpittest.h @@ -23,7 +23,7 @@ void _cockpit_expect_logged_msg (const char *domain, const char *func, GLogLevelFlags log_level, const gchar *pattern, - gboolean skipable, + gboolean skippable, gboolean optional); #define cockpit_expect_log(domain, level, pattern) \ diff --git a/src/ws/test-pipe.c b/src/ws/test-pipe.c index fb3fa48c1e..dc9770a3ea 100644 --- a/src/ws/test-pipe.c +++ b/src/ws/test-pipe.c @@ -267,7 +267,7 @@ test_echo_large (TestCase *tc, g_byte_array_set_size (echo_pipe->received, 0); - /* Double check that didn't csrew things up */ + /* Double check that didn't screw things up */ sent = g_bytes_new_static ("yello", 5); cockpit_pipe_write (tc->pipe, sent); while (echo_pipe->received->len < g_bytes_get_size (sent)) diff --git a/src/ws/test-transport.c b/src/ws/test-transport.c index 1a6b18c7f6..b97e1177ff 100644 --- a/src/ws/test-transport.c +++ b/src/ws/test-transport.c @@ -286,7 +286,7 @@ test_echo_large (TestCase *tc, g_bytes_unref (received); received = NULL; - /* Double check that didn't csrew things up */ + /* Double check that didn't screw things up */ sent = g_bytes_new_static ("yello", 5); cockpit_transport_send (tc->transport, "546", sent); WAIT_UNTIL (received != NULL); diff --git a/src/ws/test-webresponse.c b/src/ws/test-webresponse.c index f2203e81ab..8b594bdc8e 100644 --- a/src/ws/test-webresponse.c +++ b/src/ws/test-webresponse.c @@ -293,7 +293,7 @@ test_file_slash_denied (TestCase *tc, } static void -test_file_breakout_non_existant (TestCase *tc, +test_file_breakout_non_existent (TestCase *tc, gconstpointer user_data) { gchar *root = realpath ( SRCDIR "/src", NULL); @@ -999,7 +999,7 @@ test_web_filter_passthrough (TestCase *tc, } static void -on_response_done_not_resuable (CockpitWebResponse *response, +on_response_done_not_reusable (CockpitWebResponse *response, gboolean reusable, gpointer user_data) { @@ -1014,7 +1014,7 @@ test_abort (TestCase *tc, GBytes *content; cockpit_web_response_headers (tc->response, 200, "OK", 11, NULL); - g_signal_connect (tc->response, "done", G_CALLBACK (on_response_done_not_resuable), NULL); + g_signal_connect (tc->response, "done", G_CALLBACK (on_response_done_not_reusable), NULL); while (g_main_context_iteration (NULL, FALSE)); @@ -1044,7 +1044,7 @@ test_connection_close (TestCase *tc, g_assert (data == &fixture_connection_close); - g_signal_connect (tc->response, "done", G_CALLBACK (on_response_done_not_resuable), NULL); + g_signal_connect (tc->response, "done", G_CALLBACK (on_response_done_not_reusable), NULL); content = g_bytes_new_static ("the content", 11); cockpit_web_response_content (tc->response, NULL, content, NULL); @@ -1417,8 +1417,8 @@ main (int argc, setup, test_file_encoding_denied, teardown); g_test_add ("/web-response/file/file-slash-denied", TestCase, NULL, setup, test_file_slash_denied, teardown); - g_test_add ("/web-response/file/breakout-non-existant", TestCase, NULL, - setup, test_file_breakout_non_existant, teardown); + g_test_add ("/web-response/file/breakout-non-existent", TestCase, NULL, + setup, test_file_breakout_non_existent, teardown); g_test_add ("/web-reponse/file/template", TestCase, &template_fixture, setup, test_template, teardown); g_test_add ("/web-response/content-type/html", TestCase, &content_type_fixture_html, diff --git a/test/common/testlib.py b/test/common/testlib.py index 4111241a56..d2626292f8 100644 --- a/test/common/testlib.py +++ b/test/common/testlib.py @@ -1787,7 +1787,7 @@ class MachineCase(unittest.TestCase): if self.is_nondestructive(): pass elif os.getenv("DESTRUCTIVE") and not self.is_nondestructive(): - print("Run destructive test, be careful, may lead to upredictable state of machine") + print("Run destructive test, be careful, may lead to unpredictable state of machine") else: raise unittest.SkipTest("Skip destructive test by default") if os.getenv("BROWSER"): diff --git a/test/verify/check-networkmanager-wireguard b/test/verify/check-networkmanager-wireguard index 5228b68d7e..25da73d610 100755 --- a/test/verify/check-networkmanager-wireguard +++ b/test/verify/check-networkmanager-wireguard @@ -155,7 +155,7 @@ class TestWireGuard(packagelib.PackageCase, netlib.NetworkCase): m1.execute(f"until wg show wg0 | grep -q 'allowed ips.*{m2_ip4}/32'; do sleep 1; done") m1.execute(f"until ip route | grep -q '10.0.0.0/24 dev wg0 proto kernel scope link src {m1_ip4} metric 50'; do sleep 1; done") - # endpoint and port is not necessary for a peer if that peer estalishes the connectio first (i.e. the client) + # endpoint and port is not necessary for a peer if that peer establishes the connection first (i.e. the client) b2.click("button:contains('Add peer')") b2.set_input_text("#network-wireguard-settings-publickey-peer-0", m1_pubkey) b2.set_input_text("#network-wireguard-settings-allowedips-peer-0", f"{m1_ip4}/32") diff --git a/test/verify/check-shell-multi-machine-key b/test/verify/check-shell-multi-machine-key index b979d39647..c1f8ca08f0 100755 --- a/test/verify/check-shell-multi-machine-key +++ b/test/verify/check-shell-multi-machine-key @@ -260,7 +260,7 @@ Host 10.111.113.2 # Upload id_rsa and change its password to something else so # that it is not automatically loaded into the agent. id_rsa - # should be tried autoamtically without needing to configure + # should be tried automatically without needing to configure # it explicitly in ~/.ssh/config. m1.execute("mkdir -p /home/admin/.ssh") diff --git a/test/verify/check-storage-anaconda b/test/verify/check-storage-anaconda index 50c18b5c5e..0961a3512a 100755 --- a/test/verify/check-storage-anaconda +++ b/test/verify/check-storage-anaconda @@ -163,7 +163,7 @@ class TestStorageAnaconda(storagelib.StorageCase): b.wait_not_present(self.card_row("Storage", location="/var")) @testlib.skipImage("No Stratis", "debian-*", "ubuntu-*", "arch") - @testlib.skipImage("commit 817c957899a4 removed Statis 2 support", "rhel-8-*") + @testlib.skipImage("commit 817c957899a4 removed Stratis 2 support", "rhel-8-*") @testlib.skipImage("Stratis v1 pools are unsupported", "rhel-9-*") def testStratis(self): m = self.machine diff --git a/test/verify/check-storage-stratis b/test/verify/check-storage-stratis index d5b23d4834..3b2f528d59 100755 --- a/test/verify/check-storage-stratis +++ b/test/verify/check-storage-stratis @@ -49,7 +49,7 @@ def create_legacy_pool(machine, disks, name="pool0", keydesc=None, tang=None): @testlib.skipImage("No Stratis", "debian-*", "ubuntu-*", "arch") @testlib.skipImage("stratis not installed", "*-bootc") -@testlib.skipImage("commit 817c957899a4 removed Statis 2 support", "rhel-8-*") +@testlib.skipImage("commit 817c957899a4 removed Stratis 2 support", "rhel-8-*") @testlib.nondestructive class TestStorageStratis(storagelib.StorageCase): def setUp(self): @@ -573,7 +573,7 @@ systemctl restart stratisd @testlib.skipImage("No Stratis", "debian-*", "ubuntu-*", "arch") @testlib.skipImage("stratis not installed", "*-bootc") -@testlib.skipImage("commit 817c957899a4 removed Statis 2 support", "rhel-8-*") +@testlib.skipImage("commit 817c957899a4 removed Stratis 2 support", "rhel-8-*") class TestStorageStratisReboot(storagelib.StorageCase): def setUp(self): super().setUp() diff --git a/test/verify/check-system-services b/test/verify/check-system-services index 626373b820..06cf548596 100755 --- a/test/verify/check-system-services +++ b/test/verify/check-system-services @@ -439,7 +439,7 @@ WantedBy=default.target # so we instead just wrap the whole subnav (ugly but functional). # https://github.com/patternfly/patternfly-react/issues/11751 - # Now scroll the header all the way to the left to get a conistent pixel test result + # Now scroll the header all the way to the left to get a consistent pixel test result # nav_scroll_btn = ".services-header button[aria-label='Scroll back']" # while b.call_js_func("ph_attr", nav_scroll_btn, "disabled") is None: # b.click(nav_scroll_btn)