Skip to content

refactor(bash): unify all installers on a shared boilerplate and Verb-Noun style#86

Merged
Stensel8 merged 6 commits into
mainfrom
claude/scripts-repo-review-3tm4zs
Jun 16, 2026
Merged

refactor(bash): unify all installers on a shared boilerplate and Verb-Noun style#86
Stensel8 merged 6 commits into
mainfrom
claude/scripts-repo-review-3tm4zs

Conversation

@Stensel8

Copy link
Copy Markdown
Owner

All bash scripts now share one byte-identical boilerplate block (logging,
root check, package-manager detection, command runner) with PowerShell-style
Verb-Noun function names, verified by .github/scripts/check-boilerplate.sh.

Consistency:

  • Standardize on '#!/usr/bin/env bash' and 'set -euo pipefail' everywhere
    (terraform previously ran without pipefail, masking pipe failures)
  • Replace the three divergent logging implementations with Write-Log
  • Rename snake_case functions to Verb-Noun across all scripts

Compatibility (target: apt + dnf + pacman everywhere):

  • docker: add Arch support (community packages)
  • kubernetes: add Arch support via checksum-verified kubectl binary
  • ansible: add Arch support (python/python-pip)
  • terraform: add Arch support, drop legacy yum branch
  • openssh: add Arch support, drop legacy yum branches

Bug fixes:

  • kubernetes: pkgs.k8s.io repos are per minor version; deriving the repo URL
    from the full patch version (v1.36.2) produced a dead URL after Renovate
    patch bumps. Use the minor channel (v1.36) instead.
  • openssh: detect the ssh/sshd service name after package install instead of
    before; prefer the ACTIVE firewall instead of firewalld-if-installed;
    remove undefined $ssh_version reference in verify; avoid ((i++)) exiting
    under 'set -e' when the counter is zero
  • docker: initialize CODENAME so the dnf/pacman paths survive 'set -u';
    fallback to get.docker.com now warns and can be disabled (DOCKER_FALLBACK=0)
  • nginx: install rustup via a checksum-verified rustup-init download instead
    of 'curl | sh' (twice); drop the no-op self syntax check; replace the
    'exec > >(tee ...)' redirect with explicit logging

https://claude.ai/code/session_01CwcGoChWejL9QXdwkYHFzQ

claude added 6 commits June 12, 2026 19:13
…-Noun style

All bash scripts now share one byte-identical boilerplate block (logging,
root check, package-manager detection, command runner) with PowerShell-style
Verb-Noun function names, verified by .github/scripts/check-boilerplate.sh.

Consistency:
- Standardize on '#!/usr/bin/env bash' and 'set -euo pipefail' everywhere
  (terraform previously ran without pipefail, masking pipe failures)
- Replace the three divergent logging implementations with Write-Log
- Rename snake_case functions to Verb-Noun across all scripts

Compatibility (target: apt + dnf + pacman everywhere):
- docker: add Arch support (community packages)
- kubernetes: add Arch support via checksum-verified kubectl binary
- ansible: add Arch support (python/python-pip)
- terraform: add Arch support, drop legacy yum branch
- openssh: add Arch support, drop legacy yum branches

Bug fixes:
- kubernetes: pkgs.k8s.io repos are per minor version; deriving the repo URL
  from the full patch version (v1.36.2) produced a dead URL after Renovate
  patch bumps. Use the minor channel (v1.36) instead.
- openssh: detect the ssh/sshd service name after package install instead of
  before; prefer the ACTIVE firewall instead of firewalld-if-installed;
  remove undefined $ssh_version reference in verify; avoid ((i++)) exiting
  under 'set -e' when the counter is zero
- docker: initialize CODENAME so the dnf/pacman paths survive 'set -u';
  fallback to get.docker.com now warns and can be disabled (DOCKER_FALLBACK=0)
- nginx: install rustup via a checksum-verified rustup-init download instead
  of 'curl | sh' (twice); drop the no-op self syntax check; replace the
  'exec > >(tee ...)' redirect with explicit logging

https://claude.ai/code/session_01CwcGoChWejL9QXdwkYHFzQ
- Rename 'Install HPIA.ps1' -> Install-HPImageAssistant.ps1,
  'Install Dell-Command_Update.ps1' -> Install-DellCommandUpdate.ps1 and
  configure-Windows-VM.ps1 -> Optimize-WindowsVM.ps1 (Verb-Noun, no spaces)
- Add comment-based help, Set-StrictMode and ErrorActionPreference=Stop to
  all Windows scripts, matching nginx_installer.ps1 and TLS-checker.ps1
- Check winget exit codes in the HP/Dell wrappers
- Optimize-WindowsVM: skip services that do not exist on a given edition
  instead of aborting; translate the remaining Dutch comment
- Get-InstalledSoftware: English output column names (Naam -> DisplayName etc.)

Install-VagrantVMware.ps1 keeps its filename and the VAGRANT_VERSION line
format because Renovate's custom manager matches both.

https://claude.ai/code/session_01CwcGoChWejL9QXdwkYHFzQ
- Enable the git-submodules manager: the TLS-tools/testssl.sh submodule was
  the only dependency in the repo that Renovate never updated
- Drop the dockerfile/docker-compose managers and their package rule; the
  repo contains no Dockerfiles
- Translate the remaining Dutch descriptions to English

Validated with renovate-config-validator.

https://claude.ai/code/session_01CwcGoChWejL9QXdwkYHFzQ
- validate-scripts.yml: fail when a script's boilerplate block drifts from
  .github/scripts/boilerplate.sh
- README: add the Linux distro support matrix (apt/dnf/pacman), document the
  Verb-Noun and shared-boilerplate conventions, update renamed Windows files
- CONTRIBUTING: replace the stale Dependabot/check-dependencies instructions
  (neither exists) with the actual Renovate + checksum-workflow setup, and
  document the new script conventions

https://claude.ai/code/session_01CwcGoChWejL9QXdwkYHFzQ
Fedora 41+ ships dnf5, where 'config-manager --add-repo' no longer exists;
use the dnf5 'addrepo --from-repofile' syntax with a dnf4 fallback for RHEL.
Also pick HashiCorp's dedicated Fedora repo on Fedora instead of the RHEL
one. Verified in a fedora:latest container.

https://claude.ai/code/session_01CwcGoChWejL9QXdwkYHFzQ
The shared helper functions stay in every script, but without the separate
.github/scripts/boilerplate.sh reference copy, the check-boilerplate.sh CI
gate and the BEGIN/END markers. The helpers are now just a regular
'Common Helper Functions' section in each script.

https://claude.ai/code/session_01CwcGoChWejL9QXdwkYHFzQ
@Stensel8 Stensel8 merged commit faa93fb into main Jun 16, 2026
5 checks passed
@Stensel8 Stensel8 deleted the claude/scripts-repo-review-3tm4zs branch June 16, 2026 09:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants