From f053164cf77d929e8116c3dd0c21820482807ff5 Mon Sep 17 00:00:00 2001 From: Bastien CHANOT Date: Mon, 5 Oct 2026 17:32:33 +0200 Subject: [PATCH] chore(memory): BDR-015/016 macOS + zshrc backup, LRN-014 BSD traps, BLK-007 master URL, journal --- .claude/memory/blockers.md | 4 ++++ .claude/memory/decisions.md | 15 +++++++++++++++ .claude/memory/journal.md | 6 ++++++ .claude/memory/learnings.md | 7 +++++++ 4 files changed, 32 insertions(+) diff --git a/.claude/memory/blockers.md b/.claude/memory/blockers.md index 66c6d8f..f06f326 100644 --- a/.claude/memory/blockers.md +++ b/.claude/memory/blockers.md @@ -43,3 +43,7 @@ ensure_rdp_credentials (prompt, TTY-guarded, idempotent). Supersedes BLK-003 (xr identified (guard-bash hook vs auto-mode classifier). Workaround: read unit files under /usr/lib/systemd + /etc/systemd directly, `ls`/`du` on literal paths, no `find -exec`, no `sudo`. Cost ≈ 5 retries. Candidate fix: allowlist `systemctl {cat,show,is-enabled,is-active,status}` wherever the denial comes from. + +## BLK-007 — remote-install.sh + README one-liner point at branch `master` — OPEN +2026-10-05. `BRANCH="${BRANCH:-master}"` + README raw URLs `/branch/master/`, but repo = main/develop (gitflow) → +curl|bash one-liner 404 / clone fails. Fix: default `main`, update URLs. Not fixed (out of macOS scope). diff --git a/.claude/memory/decisions.md b/.claude/memory/decisions.md index b70681b..914bf9a 100644 --- a/.claude/memory/decisions.md +++ b/.claude/memory/decisions.md @@ -116,3 +116,18 @@ offer, not systematic). Not included by design: PasswordAuthentication no / Allo `ubuntu-drivers install` (distro-recommended, 595-open today). Alternatives rejected: pin nvidia-driver-595-open (ages, hardware-bound), LAMP behind confirm() offer (user: base list), GNOME left implicit (RDP fails silently). Status: merged to develop. Live rerun of install.sh = user. + +## BDR-015 — macOS: Homebrew replaces apt, Docker via colima, login shell bash 5 OR zsh (user choice) +2026-10-05. install.sh Darwin branch: ensure_homebrew (official script if missing) → brew update/upgrade → apt list +mapped to formulae. Docker = colima + docker/compose/buildx CLI (`cliPluginsExtraDirs` written only if +~/.docker/config.json absent). colima/code-server/mariadb = `brew services` (skip if started). Shell asked first +(`MACOS_SHELL` presets, no TTY → bash): bash → brew bash 5 in /etc/shells + chsh (macOS bash 3.2 too old: no +EPOCHREALTIME, HISTSIZE=-1); zsh → oh-my-zsh unattended + zsh/zshrc-osx + bchanot.zsh-theme (bash prompt port), chsh +/bin/zsh. End: print_macos_gaps lists Linux-only items skipped. Alts rejected: Docker Desktop (GUI, licence), no +Docker; staying on zsh w/o config. Status: merged develop 7d5dabd. + +## BDR-016 — ~/.zshrc backed up to ~/.zshrc.backup-, not ~/Oldconfig +2026-10-05. ~/Oldconfig is `rm -rf` at every run → 2nd run destroys 1st-run backup of user's real zshrc (nvm, bun +lines). deploy_zsh_config: if ~/.zshrc differs from repo copy (cmp -s) → timestamped mv in $HOME; identical → no +backup (rerun no dup). Machine-specific lines → ~/.zshrc.local (sourced). Same flaw still on .bashrc/.vim (open, +not fixed). Status: done. diff --git a/.claude/memory/journal.md b/.claude/memory/journal.md index 7bab278..3743b3b 100644 --- a/.claude/memory/journal.md +++ b/.claude/memory/journal.md @@ -78,3 +78,9 @@ User approved 3 choices (GNOME in, ubuntu-drivers, LAMP unconditional). shellche exit 1 read as leak). Fixed in claude-config bugfix/gitleaks-protect-fallback (347073a, unmerged): probe `gitleaks git --help`, fallback `protect --staged`; T16c symlink-farm PATH. make test 0. Hooks refreshed here (9e49b9d). - Note: `gh` in install.sh list but not installed on this box (script not rerun since added). + +## 2026-10-05 — macOS support + zsh/bash choice +Local main 15 commits behind develop → worked off develop. install.sh Darwin branch (Homebrew, colima, brew services, +gaps report), bashrc-osx = bashrc-linux + macOS deltas, dt portable, zsh option (oh-my-zsh + bchanot theme). Tested: +shellcheck, bash 3.2/5 + zsh -n, bashrc/zshrc/theme live in shells, dt with real dtach session, stub harness both +choices. Full install.sh not run on this Mac. BDR-015/016, LRN-014, BLK-007. Merged develop 7d5dabd, not pushed. diff --git a/.claude/memory/learnings.md b/.claude/memory/learnings.md index 70d5ca5..fb247ee 100644 --- a/.claude/memory/learnings.md +++ b/.claude/memory/learnings.md @@ -101,3 +101,10 @@ subcommand born in version N must probe `tool sub --help` and fall back (`protec "binary absent" via shorter PATH (`/usr/bin:/bin`) breaks once the binary lives in /usr/bin: symlink farm of /usr/bin minus the binary instead. Apply: any tool install.sh pulls from apt while ~/.claude scripts assume the upstream release. Fix: claude-config bugfix/gitleaks-protect-fallback. + +## LRN-014 — macOS (BSD/bash 3.2) traps for Linux shell scripts +2026-10-05. `cp -u` absent on BSD cp → `cp -Rp`. BSD `date` no `%N` → bash 5 `$EPOCHREALTIME` (strip `[.,]`, fr +locale = comma); no `date -d` → `date -j -f '%a %b %e %T %Y'` with `LC_ALL=C ps -o lstart=`. No /proc → cwd via +`lsof -a -p PID -d cwd -Fn`. bash 3.2 `${x/#$HOME/\~}` keeps backslash → use var `tilde='~'`. BSD sed no `\?` in BRE +→ `sed -E`. Terminal.app = LOGIN shells → read ~/.bash_profile only → must source ~/.bashrc. `ls --color` → `ls -G`. +zsh: `status` is read-only special var, don't name locals that. Verify installer fns via stub harness (LRN-011).