Commit Graph
66 Commits
Author SHA1 Message Date
JMR-dev de9d41494b fixing test coverage 2026-05-27 17:26:53 -05:00
JMR-dev 165f9dbe4f parallelized installs 2026-05-27 15:26:34 -05:00
Jason Ross 58bf0d4bbe Merge pull request #20 from JMR-dev/fix-README-update
updated readme
2026-05-26 15:29:26 -05:00
JMR-dev ad84585f72 updated readme 2026-05-26 15:28:01 -05:00
Jason Ross 95e905a8c5 Merge pull request #19 from JMR-dev/feat-add-repo-bootstrap-tool
added repo bootstrap tool
v0.1.1
2026-05-26 15:20:28 -05:00
JMR-devandCopilot 60fd4846af Fix pnpm PATH: use /bin subdir and single-quote bash -c
Two bugs in pnpmEnvPrefix:
1. pnpm setup configures global-bin-dir as $PNPM_HOME/bin, not
   $PNPM_HOME. We were only prepending $PNPM_HOME to PATH, so pnpm
   still complained 'configured global bin directory ... is not in
   PATH' and refused to install.
2. The bash -c command was wrapped in double quotes, which caused the
   OUTER sh to expand $PNPM_HOME, $PATH, $HOME before bash ever
   saw them. PNPM_HOME was empty in the outer shell, so the resulting
   PATH was ':$PATH'.

Fix: wrap bash -c argument in single quotes so the inner bash does
all variable expansion; prepend both $PNPM_HOME/bin and $PNPM_HOME
to PATH for safety.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-05-26 15:09:04 -05:00
JMR-devandCopilot de7f71fea6 Suppress intentional errLog output during tests
Tests that exercise error paths in errLog/warn were causing
GitHub Actions to annotate test output with 'Error: R] ...'
(GHA eats '[ERRO' from '[ERROR]' lines and surfaces the rest as
workflow errors), making real failures hard to distinguish from
expected behavior.

- issues.go: route logIssue output through issueLogWriter (io.Writer,
  defaults to os.Stdout). errorCount/issues/notices recording is
  unchanged so tests still assert via errorCount.
- testmain_test.go: TestMain sets issueLogWriter = io.Discard for
  the whole test binary.
- issues_test.go: TestIssuesLogging temporarily redirects
  issueLogWriter to a bytes.Buffer (replacing os.Pipe stdout
  capture).

go test -v ./... now contains zero stray '[ERROR]' lines; real
test failures remain visible and 'go test' still exits non-zero
on failure, failing the workflow.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-05-26 14:55:51 -05:00
JMR-devandCopilot aab9db9545 Show per-test output in unit test workflow
Add -v flag to 'go test' so each TestXxx line is printed in CI logs.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-05-26 14:47:47 -05:00
JMR-devandCopilot e14347fd31 Fix CI: pnpm PATH, Obsidian arch matcher, Arch pkg names, Fedora lazygit COPR
- post.go: export PNPM_HOME+PATH before pnpm add -g so global bins
  install correctly in the non-interactive shell. Applied to
  installNpmPackage and installPlaywright (incl. browser install).
- system.go: treat token-less Obsidian AppImage as x86_64 (upstream
  publishes "Obsidian-X.Y.Z.AppImage" with no arch suffix).
- pkgmgr.go: docker-ce-rootless-extras and vagrant are AUR-only on
  Arch → skipOverride; pipx → python-pipx on pacman.
- repos.go: new setupLazygitCoprRepo enables copr.fedorainfracloud.org/
  dejan/lazygit on Fedora; wired into repoGroups so lazygit installs.
- Tests: PNPM_HOME export (Linux+macOS), token-less Obsidian asset,
  pacman pkg overrides, COPR repo setup, updated repoGroups count.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-05-26 14:43:44 -05:00
JMR-dev 41a6f74ce1 add fixes to integration tests 2026-05-26 14:17:04 -05:00
JMR-dev abcb973208 add unit tests to ci 2026-05-26 13:53:09 -05:00
JMR-devandCopilot 76a44c0999 Add --gui flag to integration tests to exercise GUI package install
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-05-26 13:48:42 -05:00
JMR-devandCopilot 3e27e54318 Run full bootstrap in integration tests; fix pnpm setup shell detection
- Integration tests now run the full bootstrap (system + flatpak + custom +
  AI + VM packages) instead of '--only custom --no-vm --no-ai', so that
  custom-package prerequisites (zsh, gh, etc.) installed via SystemPackages
  are actually available.
- Fix 'pnpm setup' failing with ERR_PNPM_UNKNOWN_SHELL in CI containers
  by exporting SHELL=/bin/bash before invoking it.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-05-26 13:47:32 -05:00
JMR-dev ad2976842f Fix integration tests 2026-05-26 13:38:52 -05:00
JMR-devandCopilot c3ddcb336a Forward GITHUB_TOKEN into Linux Dagger containers for API auth
Add env: GITHUB_TOKEN to the Linux workflow step, then read it in
ci/main.go and inject it into each test container via WithSecretVariable
(for both GITHUB_TOKEN and GH_TOKEN). This prevents 403 rate-limit
errors on GitHub API calls (neovim/nvm releases) and authenticates
gh CLI for gh extension install inside the containers.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-05-26 13:37:48 -05:00
JMR-devandCopilot a2f36665a3 Pass GITHUB_TOKEN to macOS CI step to fix 403 rate-limit errors
Unauthenticated GitHub API calls share the runner IP (60 req/hour limit).
net.go already uses GITHUB_TOKEN as a Bearer token when present.
gh CLI also needs GH_TOKEN to authenticate for gh extension install.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-05-26 13:36:22 -05:00
JMR-devandCopilot 9093aedb66 Exit non-zero when any errors are logged during bootstrap run
Track error count in issues.go alongside the existing issues slice.
Add hasErrors() helper. In main.go, call osExit(1) after writeRunLog()
if any [ERROR] entries were recorded, so CI steps correctly fail when
errors occur (e.g. GitHub API 403 rate-limit hits in the macOS job).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-05-26 13:35:05 -05:00
JMR-dev 4d99bba06f added repo bootstrap tool 2026-05-26 13:21:31 -05:00
Jason Ross ee95457e7d Merge pull request #18 from JMR-dev/fix-add-unit-testing
added unit testing
2026-05-26 09:36:50 -05:00
JMR-dev 669565bb87 added unit testing 2026-05-26 09:36:05 -05:00
Jason Ross 39c23595ce Merge pull request #17 from JMR-dev/feat-add-AI-cli-packages
updates to add AI packages and an opt out of AI flag
2026-05-25 12:11:32 -05:00
JMR-dev 8f11c8d68b updates to add AI packages and an opt out of AI flag 2026-05-25 12:07:14 -05:00
Jason Ross d9e905ac20 Merge pull request #16 from JMR-dev/fix-gha-workflow
Workflow fix to git sha
v0.1.0
2026-05-23 17:58:43 -05:00
JMR-dev 14bf9f3e56 Workflow fix to git sha 2026-05-23 17:57:50 -05:00
Jason Ross f6fdb3f6ae Merge pull request #15 from JMR-dev/claude/github-workflow-permissions-token-pNozt
ci: pass GITHUB_TOKEN explicitly to checkout and release steps
2026-05-22 17:55:29 -05:00
Claude d7d87acb7e ci: pass GITHUB_TOKEN explicitly to checkout and release steps
Add explicit token inputs to the checkout and softprops/action-gh-release
steps so the GitHub token is wired through instead of relying on implicit
defaults. The workflow-level contents: write permission already scopes
the token correctly for tag/release creation.
2026-05-22 22:07:50 +00:00
Jason Ross 817a0ad8a4 Merge pull request #14 from JMR-dev/claude/port-tool-golang-ziaMN
port: rewrite bootstrap tool in Go
2026-05-22 17:00:30 -05:00
Claude 03a90fffe6 ci: add release workflow that builds binaries and publishes SHA256SUMS
Pushing a tag matching v* (or running the workflow manually with an
existing tag) cross-compiles the four supported targets via
`make build-all`, generates a SHA256SUMS file, and publishes a GitHub
release with all binaries attached.
2026-05-22 21:55:15 +00:00
Claude 658460fe4c port: rewrite bootstrap tool in Go
Replace the Python bootstrap script with a Go implementation that
cross-compiles to native binaries for Linux and macOS on x86_64 and
aarch64. The Go port preserves all sections of the original (system
packages, optional Flatpak GUI apps, custom downloads, and the macOS
firecracker VM bridge) and adds first-class pacman support so the tool
works on Arch-family distros alongside Debian, RHEL, and macOS.

A Makefile produces a host binary via `make build` and the full
four-target matrix under dist/ via `make build-all`.
2026-05-22 21:48:57 +00:00
Jason Ross c2ca21b444 Merge pull request #13 from JMR-dev/claude/pip-decimal-import-error-eVPBv
fix: detect and repair broken _decimal C extension before pip install
2026-05-22 14:21:35 -05:00
Claude 26bd80c97d fix: detect and repair broken _decimal C extension before pip install
When python3-full is not installed on Debian/Ubuntu (common with Python
3.13), the _decimal C extension fails to import, crashing any pip
invocation with RuntimeError.  Add _python3_decimal_ok() to probe for
this, and _fix_python3_decimal() to install python3-full (apt) or
python3-libs (dnf).  _install_pip() now calls these before attempting
any ensurepip/pip operations so the error is fixed automatically rather
than producing an unrecoverable crash.

https://claude.ai/code/session_01Lrg3UV7AJN9KRXyTTWGgZi
2026-05-22 19:20:51 +00:00
Jason Ross b3ad702da0 Merge pull request #12 from JMR-dev/claude/bootstrap-infinite-loop-arm64-VU64t
fix: cap pip detection subprocess with a 10s timeout
2026-05-22 14:14:53 -05:00
Claude 8a0e3ee9e4 fix: add timeouts to every subprocess invocation
`run()` and `shell()` now default to a 30-minute cap (generous enough for
heavy apt/brew installs and large downloads, bounded enough to catch a
true hang). Callers can override per-call.

All remaining direct subprocess.run sites have explicit timeouts sized to
the work they do: short caps for read-only probes (rpm, dpkg, brew list,
flatpak info, gh auth status, xcode-select -p, sysctl, VBoxManage), a
60-minute cap for the pyenv Python compile, a 15-minute cap for the
interactive `gh auth login` browser flow, and ConnectTimeout+30s for the
VM SSH helper. A small `_probe()` wrapper centralizes the probe pattern.

On timeout the bootstrap now warns and either fails the check gracefully
or returns rc=124, rather than blocking indefinitely.

https://claude.ai/code/session_01447pnRM4ogyxs5tVCUNDZW
2026-05-22 19:11:04 +00:00
Claude 4525cbc219 fix: cap pip detection subprocess with a 10s timeout
A hung `python3 -m pip --version` inside `_pip_installed()` could block
the bootstrap indefinitely, since `subprocess.run` was called without a
timeout. Treat a timeout (or a missing python3) as "pip not installed"
so the bootstrap proceeds to install it rather than hanging.

https://claude.ai/code/session_01447pnRM4ogyxs5tVCUNDZW
2026-05-22 19:05:28 +00:00
Jason Ross 1c011f4a7d Merge pull request #11 from JMR-dev/claude/script-idempotency-review-CBYwG
Make _clone_nvim_config idempotent
2026-05-22 13:58:29 -05:00
Claude a4b855b796 Rename existing nvim config to nvim-N instead of skipping
On re-runs, ~/.config/nvim is moved aside to ~/.config/nvim-1
(or nvim-2, nvim-3, ... — first free number) and a fresh clone is
created. End-of-run notices report the backup path so it's visible
after the rest of the bootstrap output scrolls by.
2026-05-22 18:55:44 +00:00
Claude cedaf4ce04 Make _clone_nvim_config idempotent
Previously rmtree'd ~/.config/nvim on every full bootstrap run, destroying
any user edits, plugin state, and undo history. Now skips when the
directory is already a clone of the expected repo, and refuses to touch
unfamiliar contents (different remote, or non-git directory).
2026-05-22 18:51:30 +00:00
Jason Ross 92a582efa7 Merge pull request #10 from JMR-dev/claude/neovim-detection-debian-arm64-FqnpH
Fix Neovim not found after install by symlinking /usr/local/bin/nvim
2026-05-22 13:47:09 -05:00
Claude 10963c848b Fix Neovim not found after install by symlinking /usr/local/bin/nvim
The PATH line written to /etc/profile.d/neovim.sh was only sourced by
login shells via /etc/profile. zsh — set as the default shell by this
script — uses /etc/zsh/zprofile which sources /etc/profile only for
login shells, and terminal emulators typically launch non-login
interactive shells. The result on Debian 13 ARM64 (and other distros):
nvim installed correctly to /opt/nvim-linux-arm64 but was not on PATH
in a normal terminal session.

Symlink the binary into /usr/local/bin/nvim instead — that directory
is always on the default PATH on Linux and macOS (Apple Silicon and
Intel) regardless of shell type. The Zig install already follows this
pattern. Also switch the install-detection probe to the symlink so it
verifies an actually-callable nvim, not just the extracted directory.

https://claude.ai/code/session_01VP9hCLH1c5F5iv468jSkqs
2026-05-22 18:27:10 +00:00
Jason Ross e5448b71ba Merge pull request #9 from JMR-dev/claude/pulumi-repo-setup-failure-KEncj
Fix Pulumi repo setup failure by installing from official tarball
2026-05-22 13:14:27 -05:00
Claude 6661aba3d6 Fix Pulumi repo setup failure by installing from official tarball
Pulumi does not publish apt or yum repositories — the URLs the setup
function referenced (api.pulumi.com/releases/sdk/{apt,rpm}-keyring.gpg
and {apt,yum}.releases.pulumi.com) return 404 / do not resolve, which
broke `bootstrap_environment.py` on every fresh Linux run.

Replace `setup_pulumi_repo` with a special-package installer that
downloads the official GitHub release tarball, verifies the SHA256
against the published checksums file, extracts to /opt/pulumi, and
exposes the binaries via PATH — the same pattern used for Neovim.
macOS continues to install Pulumi via brew.

https://claude.ai/code/session_018L1gFoc8L3CYqLE2wNjpy6
2026-05-22 18:13:43 +00:00
Jason Ross 16f058f83c Merge pull request #8 from JMR-dev/claude/debian-arm64-install-errors-ekxEt
Fix five Debian arm64 install failures
2026-05-22 13:05:53 -05:00
Claude da80fe81bc Fix five Debian arm64 install failures
- dotnet-sdk-10.0: add setup_dotnet_repo() to register the Microsoft apt
  feed (packages.microsoft.com) before attempting the install
- lua: map to lua5.4 in apt-get overrides (Debian has no unversioned lua pkg)
- pulumi: add setup_pulumi_repo() to register apt.releases.pulumi.com before
  attempting the install; add dnf/yum variant too
- qemu: map to qemu-system in apt-get overrides (Debian meta-package name)
- python3 -m ensurepip: Debian intentionally strips ensurepip from the system
  Python package; fall back to apt-get install python3-pip automatically

Also add libnsl2 → libnsl-dev mapping for Debian (bonus pyenv build fix).

https://claude.ai/code/session_017KuwqSq7nCp2iWiTeaNivn
2026-05-22 18:05:05 +00:00
Jason Ross 2e9cbb0cab Merge pull request #7 from JMR-dev/claude/headless-default-gui-flag-KCpH8
Default to headless install; add --gui flag; add lazygit and pulumi
2026-05-22 12:57:26 -05:00
Claude 18182aee58 Default to headless install; add --gui flag; add lazygit and pulumi
- Inverts the GUI opt-out model: GUI packages and Flatpak are now skipped
  by default (headless-friendly), and --gui opts in to installing them.
  Removes --no-gui entirely.
- Adds lazygit and pulumi to the default system package list.

https://claude.ai/code/session_01CsTAu2SNhE5ZAQm3RnVwp3
2026-05-22 17:56:27 +00:00
Jason Ross 5b184d81ff Merge pull request #6 from JMR-dev/claude/custom-packages-checksum-yf1cS
Fix custom package checksum verification for Mac and Linux arm64
2026-05-22 12:52:08 -05:00
Claude 8668c12f7d Fix custom package checksum verification for Mac and Linux arm64
Three root causes were causing failures on non-x86_64-Linux platforms:

1. Single SHA256 per package: the pinned fallback checksum in
   formatted_packages.py was a single value computed for linux-x86_64 only.
   Downloads on linux-aarch64, macos-x86_64, and macos-aarch64 produced
   different binaries with different digests, so verification always failed
   on those platforms when the fetch_latest resolver was unavailable.

   Fix: replace the single `sha256` field with a `sha256_map` dict keyed by
   "{os}-{arch}" (e.g. "linux-aarch64", "macos-arm64"). Added the correct
   pinned digests for all four supported platforms for both Go 1.26.3 and
   Firecracker 1.15.1, fetched from official sources.

2. Case-sensitive SHA256 comparison: _sha256_of() always returns lowercase
   hex, but checksums returned by external APIs could be uppercase.
   _verify() compared them without normalising case, causing false mismatches.

   Fix: new resolved_sha256 property always returns a lowercased digest;
   _resolve_latest() also lowercases the dynamically-fetched sha before
   storing it.

3. Firecracker not skipped on macOS: _resolve_latest_firecracker() returns
   None on macOS (firecracker is Linux-only), causing a fallback to the
   pinned linux binary URL with a linux-only checksum map entry. The download
   and verification would both fail misleadingly.

   Fix: explicit early-continue guard in install_custom_packages() when
   name == "firecracker" and IS_MACOS.
2026-05-22 17:49:58 +00:00
Jason Ross 539833344b Merge pull request #5 from JMR-dev/claude/add-python-build-deps-u1Gg5
Add missing Python build deps and fix apt-get name overrides
2026-05-18 16:44:49 -05:00
Claude 01bb797433 Add missing Python build deps and fix apt-get name overrides
Adds curl, ncurses-devel, xz (tool), libxml2-devel, and xmlsec1-devel to
SYSTEM_PACKAGES to cover the full pyenv/CPython build dependency set.

Also adds apt-get overrides for all Fedora-named Python build packages
(bzip2-devel → libbz2-dev, openssl-devel → libssl-dev, etc.) so they
resolve to the correct Debian/Ubuntu package names at install time.
Adds corresponding brew overrides for the new packages.

https://claude.ai/code/session_01P3CkL5oXzkTvayityg3uaH
2026-05-18 21:32:30 +00:00
Jason Ross caa010091f Merge pull request #4 from JMR-dev/claude/fix-package-install-errors-A2rBu
Handle OSError from subprocess when filesystem I/O fails
2026-05-18 12:28:39 -05:00