diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 19494d2..095ad1e 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -35,7 +35,7 @@ repos: language: script pass_filenames: true files: \.md$ - description: Lint markdown files + description: Lint Markdown files - id: python-lint name: python-lint @@ -43,14 +43,14 @@ repos: language: script pass_filenames: true files: \.py$ - description: Lint python files + description: Lint Python files - id: salt-lint name: salt-lint entry: scripts/salt-lint.sh language: script pass_filenames: true - files: \.(sls|top)$ + files: (^minion.d/.*.conf|\.(sls|top))$ description: Lint Salt files - id: yaml-lint diff --git a/docs/BOOTSTRAP.md b/docs/BOOTSTRAP.md index aaf007a..4187e03 100644 --- a/docs/BOOTSTRAP.md +++ b/docs/BOOTSTRAP.md @@ -16,7 +16,7 @@ Qusal bootstrap strategy. With so many packages, you may be wondering, how to bootstrap a new system? Well, the answer depends on your goal. -Bellow you will find a list sorted by task, which have projects that can help +Below you will find a list sorted by task, which have projects that can help you accomplish your mission. The order of which the formulas are applied can matter in some circumstances, in those cases, it is noted in this page. diff --git a/docs/CONTRIBUTE.md b/docs/CONTRIBUTE.md index 1ddb3e3..e0ac067 100644 --- a/docs/CONTRIBUTE.md +++ b/docs/CONTRIBUTE.md @@ -48,35 +48,21 @@ interface will be rejected. For an automatic setup, use the [dev formula](../salt/dev), else, install the packages below depending on the task: -General: - -* git - For writing: * editorconfig -* editorconfig plugin for your editor +* vim-editorconfig or the plugin for your editor * vim, [vim-jinja](https://github.com/ben-grande/vim-jinja), [vim-salt](https://github.com/ben-grande/vim-salt) (recommended) -For linting: +For committing and linting: -* pre-commit -* gitlint -* pylint -* reuse -* ruby-mdl (markdownlint) -* salt-lint -* shellcheck +* [dependencies/debian.txt](../dependencies/debian.txt) +* [dependencies/pip.txt](../dependencies/pip.txt) For building RPMs: -* sed (GNU sed) -* dnf -* dnf-plugins-core (dnf builddep) -* rpm -* rpmlint -* rpmautospec (only available in Fedora) +* [dependencies/rpm.txt](../dependencies/rpm.txt) ## Issues diff --git a/docs/SALT.md b/docs/SALT.md index a4e9c6e..7044b18 100644 --- a/docs/SALT.md +++ b/docs/SALT.md @@ -8,7 +8,7 @@ Qusal SaltStack development guide. * [Resources](#resources) * [Minion Configuration](#minion-configuration) * [Jinja](#jinja) -* [Targetting Minions](#targetting-minions) +* [Targeting Minions](#targeting-minions) * [Idempotence](#idempotence) * [Examples](#examples) * [Troubleshooting](#troubleshooting) @@ -68,17 +68,17 @@ We use [Jinja includes and imports](../salt/debian-minimal/template.jinja) and configuration, thus avoiding code duplication, allowing us to apply a state always the same way between files in the same or different projects. -## Targetting Minions +## Targeting Minions You can target minions in two ways, with a [top file](https://docs.saltproject.io/en/latest/ref/states/top.html) or specifying the states on the command-line. We use [top files](../salt/sys-git/init.top) to be able to execute a state in -multiple qubes in a single call, with the powers of advanced minion -targetting, we can [match properties of a qube](../salt/debian/install.top) to +multiple qubes in a single call, with the powers of advanced minion targeting, +we can [match properties of a qube](../salt/debian/install.top) to apply the state depending on its name, its type and many other settings, by -specifying the minion minion IDs in a list, globbing per name, PCRE matching -a minion ID and many other match types. +specifying the minion minion IDs in a list, globbing per name, PCRE matching a +minion ID and many other match types. ## Idempotence @@ -126,9 +126,9 @@ templates, do Jinja imports and run Jinja macros. name: keys {# Enforce qube settings #} force: True -{# Only run this state if the requirements are executed succesfully #} +{# Only run this state if the requirements are executed successfully #} require: - {# Ensure succesfull 'qvm.clone' run to create 'tpl-keys-clone' + {# Ensure successful 'qvm.clone' run to create 'tpl-keys-clone' This module was executed in the 'clone_template' macro #} - qvm: tpl-keys-clone {# If qube does not exist, create it with the specified settings #} diff --git a/docs/TROUBLESHOOT.md b/docs/TROUBLESHOOT.md index 78da77b..fdad10e 100644 --- a/docs/TROUBLESHOOT.md +++ b/docs/TROUBLESHOOT.md @@ -67,6 +67,7 @@ page for a variety of problems you may encounter. A nice summary of the states can be seen with the `--show-output` argument: ```sh +// cSpell:disable sudo qubesctl --show-output state.apply pkg.uptodate ``` diff --git a/salt/dev/install.sls b/salt/dev/install.sls index 238af2b..d757adb 100644 --- a/salt/dev/install.sls +++ b/salt/dev/install.sls @@ -46,6 +46,7 @@ include: - pylint - yamllint - ruby-mdl + - codespell ## Fedora doesn't have: ruby-mdl (markdownlint, mdl) ## Debian doesn't have: salt-lint diff --git a/salt/dotfiles b/salt/dotfiles index 56191da..f94876f 160000 --- a/salt/dotfiles +++ b/salt/dotfiles @@ -1 +1 @@ -Subproject commit 56191dab6da297a48d3df41b65c1f0ae15e37ae1 +Subproject commit f94876f0f019560d16944c61751f310319495a79 diff --git a/salt/electrum/README.md b/salt/electrum/README.md index 534975b..a636d89 100644 --- a/salt/electrum/README.md +++ b/salt/electrum/README.md @@ -161,7 +161,7 @@ while with the offline one, you sign them. Sharing data between the qubes can be done with `qvm-copy` and the process of combining a watching-only and a cold wallet is explained in the [Electrum wiki](https://electrum.readthedocs.io/en/latest/coldstorage.html). -Apart from the fact that most people loose Bitcoin by loosing their private +Apart from the fact that most people loose Bitcoin by losing their private keys, being phished, using modified or outdated Bitcoin Node versions, the difficult part of securing your private key on a separate domain compared to the domain that can broadcast the transaction, is the trust you must assign to diff --git a/salt/sys-cacher/files/client/bin/apt-cacher-ng-repo b/salt/sys-cacher/files/client/bin/apt-cacher-ng-repo index 614a72b..4792a13 100755 --- a/salt/sys-cacher/files/client/bin/apt-cacher-ng-repo +++ b/salt/sys-cacher/files/client/bin/apt-cacher-ng-repo @@ -46,7 +46,7 @@ set_proxy_marker(){ proxy_tmp_file="$(mktemp)" cat >"${proxy_tmp_file}" < for static data that doesn't change silently on the server. # - for volatile data that may change like every hour. Files # that match both PFilePattern and VfilePattern will be treated as volatile. -# - Static data with file names that match VFilePattern may be overriden being +# - Static data with file names that match VFilePattern may be overridden being # treated as volatile by making it match the special static data pattern, # . # - or the "special volatile data" pattern is for the @@ -281,7 +281,7 @@ VFilePatternEx: .*fedora.*updateinfo.*xml.zck$|^/\?release=[0-9]+&arch=.*|.*/RPM # ############################################################################### -# A bitmask type value declaring the loging verbosity and behavior of the error +# A bitmask type value declaring the logging verbosity and behavior of the error # log writing. Non-zero value triggers at least faster log file flushing. # # Some higher bits only working with a special debug build of apt-cacher-ng, @@ -334,7 +334,7 @@ VFilePatternEx: .*fedora.*updateinfo.*xml.zck$|^/\?release=[0-9]+&arch=.*|.*/RPM # Fast fallback timeout, in seconds. This is the time to wait before # alternative target addresses for a client connection are tried, which can be -# usefull for quick fallback to IPv4 in case of whacky IPv6 configuration. +# useful for quick fallback to IPv4 in case of whacky IPv6 configuration. # # FastTimeout = 4 @@ -398,7 +398,7 @@ LocalDirs: acng-doc /usr/share/doc/apt-cacher-ng # PrecacheFor: debrep/dists/unstable/*/source/Sources* debrep/dists/unstable/*/binary-amd64/Packages* # Arbitrary set of data to append to request headers sent over the wire. Should -# be a well formated HTTP headers part including newlines (DOS style) which +# be a well formatted HTTP headers part including newlines (DOS style) which # can be entered as escape sequences (\r\n). # # RequestAppendix: X-Tracking-Choice: do-not-track\r\n @@ -479,7 +479,7 @@ VfileUseRangeOps: 0 # Allow data pass-through mode for certain hosts when requested by the client # using a CONNECT request. This is particularly useful to allow access to SSL # sites (https proxying). The string is a regular expression which should cover -# the server name with port and must be correctly formated and terminated. +# the server name with port and must be correctly formatted and terminated. # Examples: # PassThroughPattern: private-ppa\.launchpad\.net:443$ # PassThroughPattern: .* # this would allow CONNECT to everything @@ -542,11 +542,11 @@ PassThroughPattern: ^codecs\.fedoraproject\.org:443$ # # OptProxyCheckCommand: ... # -# Check intervall, in seconds. +# Check interval, in seconds. # # OptProxyCheckInterval: 99 # -# Conection timeout in seconds, default: negative, means disabled. +# Connection timeout in seconds, default: negative, means disabled. # # OptProxyTimeout: -1 @@ -583,7 +583,7 @@ PassThroughPattern: ^codecs\.fedoraproject\.org:443$ # Only set this value for debugging purposes. It disables SSL security checks # like strict host verification. 0 means no, any other value can have -# differrent meaning in the future. +# different meaning in the future. # # NoSSLChecks: 0 diff --git a/salt/sys-ssh-agent/README.md b/salt/sys-ssh-agent/README.md index 8acd9f9..1f5e3d3 100644 --- a/salt/sys-ssh-agent/README.md +++ b/salt/sys-ssh-agent/README.md @@ -33,7 +33,7 @@ number of key pairs, which are used by different qubes. A centralized SSH server is very useful not only for keeping your private keys safe, but also for keeping your workflow organized. You can delete qubes that -are SSH clients without loosing access to your remote server, because the +are SSH clients without losing access to your remote server, because the authentication keys are on the sys-ssh-agent server, your client qube should only hold the SSH configuration, which can be reconstructed. diff --git a/salt/sys-ssh-agent/files/server/bin/qvm-ssh-agent b/salt/sys-ssh-agent/files/server/bin/qvm-ssh-agent index ed2ae5e..86749e8 100755 --- a/salt/sys-ssh-agent/files/server/bin/qvm-ssh-agent +++ b/salt/sys-ssh-agent/files/server/bin/qvm-ssh-agent @@ -12,11 +12,11 @@ usage(){ echo "Usage: ${0##*/} [ls|add] ls: list agent(s) add: add keys to agent(s) - reload: reload/readd keys from agent(s) + reload: reload/re-add keys from agent(s) Example: ${0##*/} ls work # list the work agent keys ${0##*/} add work # add keys to the work agent - ${0##*/} reload work # reload/readd keys from the work agent" + ${0##*/} reload work # reload/re-add keys from the work agent" exit 1 } diff --git a/scripts/salt-fix.sh b/scripts/salt-fix.sh index 8be920f..11e9ad1 100755 --- a/scripts/salt-fix.sh +++ b/scripts/salt-fix.sh @@ -3,7 +3,7 @@ ## SPDX-FileCopyrightText: 2013 - 2018 Will Thames will@thames.id.au ## SPDX-FileCopyrightText: 2018 Ansible by Red Hat ## SPDX-FileCopyrightText: 2020 - 2023 Warpnet B.V. -## SPDX-FileCopyrightText: 2023 Benjamin Grande M. S. +## SPDX-FileCopyrightText: 2023 - 2024 Benjamin Grande M. S. ## ## SPDX-License-Identifier: AGPL-3.0-or-later diff --git a/scripts/salt-lint.sh b/scripts/salt-lint.sh index fa6e74b..7c749b4 100755 --- a/scripts/salt-lint.sh +++ b/scripts/salt-lint.sh @@ -1,6 +1,6 @@ #!/bin/sh -## SPDX-FileCopyrightText: 2023 Benjamin Grande M. S. +## SPDX-FileCopyrightText: 2023 - 2024 Benjamin Grande M. S. ## ## SPDX-License-Identifier: AGPL-3.0-or-later @@ -12,7 +12,7 @@ cd "$(git rev-parse --show-toplevel)" || exit 1 ./scripts/requires-program.sh salt-lint find_tool="$(./scripts/best-program.sh fd fdfind find)" -possible_conf="${PWD}/.salt-lint" +possible_conf="${PWD}/.salt-lint.yaml" conf="" test -f "${possible_conf}" && conf="-c ${possible_conf}" diff --git a/scripts/spec-gen.sh b/scripts/spec-gen.sh index fec958f..24fdafc 100755 --- a/scripts/spec-gen.sh +++ b/scripts/spec-gen.sh @@ -1,6 +1,6 @@ #!/bin/sh -## SPDX-FileCopyrightText: 2023 Benjamin Grande M. S. +## SPDX-FileCopyrightText: 2023 - 2024 Benjamin Grande M. S. ## ## SPDX-License-Identifier: AGPL-3.0-or-later diff --git a/scripts/spec-get.sh b/scripts/spec-get.sh index 1026b5b..26a40ef 100755 --- a/scripts/spec-get.sh +++ b/scripts/spec-get.sh @@ -1,6 +1,6 @@ #!/bin/sh -## SPDX-FileCopyrightText: 2023 Benjamin Grande M. S. +## SPDX-FileCopyrightText: 2023 - 2024 Benjamin Grande M. S. ## ## SPDX-License-Identifier: AGPL-3.0-or-later diff --git a/scripts/toc-gen.sh b/scripts/toc-gen.sh index 137f7e7..5d5c986 100755 --- a/scripts/toc-gen.sh +++ b/scripts/toc-gen.sh @@ -1,6 +1,6 @@ #!/bin/sh -## SPDX-FileCopyrightText: 2023 Benjamin Grande M. S. +## SPDX-FileCopyrightText: 2023 - 2024 Benjamin Grande M. S. ## ## SPDX-License-Identifier: AGPL-3.0-or-later