dotfiles
bugabingas dorkfiles
owned by bugabinga
test: exercise mise bootstrap in podman
3cc8ac4c2d6c2d1565158e85ad13a7504adc4ba6
Oliver Jan Krylow <oliver@bugabinga.net> ·
unsigned
Browse filesCompare with HEAD
Changed files (9)
+5 / −1 text lines
55Check `git status --short` before edits.Check `git status --short` before edits. 66Prefer repo paths (`pi/agent/...`) over `$HOME` paths.Prefer repo paths (`pi/agent/...`) over `$HOME` paths. 77Use `mise` tasks; host bootstrap assumes Git + mise, then mise supplies Java/Nushell.Use `mise` tasks; host bootstrap assumes Git + mise, then mise supplies Java/Nushell. 8-`mise run test` also needs host Podman; its Fedora container installs Git/Java intentionally. 8+`mise run test` also needs host Podman; its Fedora container installs Git/mise, then mise supplies Java. 99Never print decrypted secrets.Never print decrypted secrets. 1010Do not delete noisy research/cache/untracked files unless explicitly asked.Do not delete noisy research/cache/untracked files unless explicitly asked. 8585java bootstripper.java init-cryptojava bootstripper.java init-crypto 90+- User config source: `mise-config/` links to `~/.config/mise`. 8892## Global Pi config## Global Pi config 9094- Settings: `pi/agent/settings.json`- Settings: `pi/agent/settings.json` NB-00718.symlinks
Modified+1 / −1 text lines
7070glow/glow.yml
glow/glow.yml
7171~/AppData/Local/glow/Config/glow.yml
~/AppData/Local/glow/Config/glow.yml
7474~/.config/mise
~/.config/mise
+1 / −1 text lines
5959~/.config/glow~/.config/glow 6262~/.config/mise~/.config/mise 6464systemd/user/work.slicesystemd/user/work.slice mise-config/config.toml
Addednew file mode 100644+7 / −0 text lines
2+"cargo:kdl-lsp" = "latest" 3+"github:dev-cycles/contextive" = "latest" 4+"npm:gh-actions-language-server" = "latest" +5 / −0 text lines
1919description = "Run Podman integration test"description = "Run Podman integration test" 2020run = "java ./scripts/dotfiles_integration_test.java"run = "java ./scripts/dotfiles_integration_test.java" 23+description = "Run Podman container checks" 25+run = "java ./scripts/dotfiles_integration_test.java --inside" 2227[tasks.link][tasks.link] 2328description = "Link dorkfiles into HOME"description = "Link dorkfiles into HOME" deleted file mode 100644+0 / −7 text lines
2-"cargo:kdl-lsp" = "latest" 3-"github:dev-cycles/contextive" = "latest" 4-"npm:gh-actions-language-server" = "latest" scripts/dotfiles_integration_test.java
Modified+38 / −14 text lines
2323 "-v", root + ":/src:ro", "-v", key + ":/dotfiles-aes.key:ro", "-v", root + ":/src:ro", "-v", key + ":/dotfiles-aes.key:ro", 2424 "registry.fedoraproject.org/fedora:latest", "sleep", "infinity"); "registry.fedoraproject.org/fedora:latest", "sleep", "infinity"); 2525 ok("container-started"); ok("container-started"); 26- step("install container packages"); 28- run(null, "podman", "exec", container, "dnf", "-qy", "--setopt=install_weak_deps=False", "install", "git-core", "java-latest-openjdk"); 29- ok("container-packages-installed"); 27+ run(null, "podman", "exec", container, "dnf", "-qy", "--setopt=install_weak_deps=False", "install", "git-core"); 29+ step("install mise"); 30+ installMise(container); 31+ ok("mise-installed"); 3032 run(null, "podman", "exec", container, "git", "config", "--global", "--add", "safe.directory", "/src"); run(null, "podman", "exec", container, "git", "config", "--global", "--add", "safe.directory", "/src"); 3133 run(null, "podman", "exec", container, "mkdir", "-p", "/root/work"); run(null, "podman", "exec", container, "mkdir", "-p", "/root/work"); 3234 step("clone repo"); step("clone repo"); 3335 run(null, "podman", "exec", container, "git", "clone", "--quiet", "--no-local", "/src", "/root/work/dotfiles"); run(null, "podman", "exec", container, "git", "clone", "--quiet", "--no-local", "/src", "/root/work/dotfiles"); 3436 run(null, "podman", "exec", container, "install", "-m", "600", "/dotfiles-aes.key", "/root/work/dotfiles/.git/dotfiles-aes.key"); run(null, "podman", "exec", container, "install", "-m", "600", "/dotfiles-aes.key", "/root/work/dotfiles/.git/dotfiles-aes.key"); 36- runInherit(null, "podman", "exec", "-w", "/root/work/dotfiles", container, "java", "/src/scripts/dotfiles_integration_test.java", "--inside"); 37+ step("trust mise config"); 38+ run(null, "podman", "exec", "-w", "/root/work/dotfiles", container, "mise", "trust", "--yes"); 40+ step("install mise tools"); 41+ runInherit(null, "podman", "exec", "-w", "/root/work/dotfiles", container, "mise", "install"); 42+ step("run mise test-inside"); 43+ runInherit(null, "podman", "exec", "-w", "/root/work/dotfiles", container, "mise", "run", "test-inside"); 3744 } finally { } finally { 3845 runAllowFail(null, "podman", "rm", "-f", container); runAllowFail(null, "podman", "rm", "-f", container); 49+ static void installMise(String container) throws Exception { 50+ var version = run(null, "mise", "--version").trim().split("\\s+")[0]; 51+ var arch = run(null, "podman", "exec", container, "uname", "-m").trim(); 52+ var platform = switch (arch) { 53+ case "x86_64", "amd64" -> "x64"; 54+ case "aarch64", "arm64" -> "arm64"; 55+ default -> throw new IllegalStateException("unsupported container arch: " + arch); 57+ var url = "https://github.com/jdx/mise/releases/download/v" + version + "/mise-v" + version + "-linux-" + platform; 58+ run(null, "podman", "exec", container, "curl", "-fsSL", "-o", "/usr/local/bin/mise", url); 59+ run(null, "podman", "exec", container, "chmod", "755", "/usr/local/bin/mise"); 60+ System.out.println(run(null, "podman", "exec", container, "mise", "--version").trim()); 4263 static void inside() throws Exception { static void inside() throws Exception { 4364 root = Path.of(".").toAbsolutePath().normalize(); root = Path.of(".").toAbsolutePath().normalize(); 4465 System.out.println("rootless=" + rootless()); System.out.println("rootless=" + rootless()); 4566 ok("deps"); ok("deps"); 4667 System.out.println(run(root, "git", "--version").trim()); System.out.println(run(root, "git", "--version").trim()); 68+ System.out.println(run(root, "mise", "--version").trim()); 4769 System.out.println(run(root, "java", "-version").lines().findFirst().orElse("java")); System.out.println(run(root, "java", "-version").lines().findFirst().orElse("java")); 49- run(root, "java", "bootstripper.java", "install-hooks"); 71+ run(root, "mise", "run", "hook"); 5072 if (!Files.isExecutable(root.resolve(".git/hooks/pre-commit"))) fail("hook-executable"); if (!Files.isExecutable(root.resolve(".git/hooks/pre-commit"))) fail("hook-executable"); 5173 if (!Files.readString(root.resolve(".git/hooks/pre-commit")).contains("exec java bootstripper.java pre-commit")) fail("hook-content"); if (!Files.readString(root.resolve(".git/hooks/pre-commit")).contains("exec java bootstripper.java pre-commit")) fail("hook-content"); 5274 ok("install-hooks"); ok("install-hooks"); 6284 if (Files.readString(root.resolve("nushell/secrets.nu")).startsWith("DFAES1")) fail("worktree-still-encrypted"); if (Files.readString(root.resolve("nushell/secrets.nu")).startsWith("DFAES1")) fail("worktree-still-encrypted"); 6385 ok("worktree-decrypted"); ok("worktree-decrypted"); 65- run(root, "java", "bootstripper.java", "pre-commit"); 87+ run(root, "mise", "run", "check"); 89+ run(root, ".git/hooks/pre-commit"); 90+ ok("pre-commit-hook"); 6892 freshCryptoSmoke(); freshCryptoSmoke(); 6993 System.out.println("RESULT:ok"); System.out.println("RESULT:ok"); 86110 System.out.println("manifest=" + manifest.getFileName()); System.out.println("manifest=" + manifest.getFileName()); 87111 deleteTree(home); deleteTree(home); 88112 Files.createDirectories(home); Files.createDirectories(home); 89- var env = Map.of("HOSTNAME", host); 90- run(root, env, "java", "-Duser.home=" + home, "bootstripper.java", "bootstrap"); 91- ok("bootstrap:" + host); 92- run(root, env, "java", "-Duser.home=" + home, "bootstripper.java", "check"); 113+ var env = Map.of("HOSTNAME", host, "JAVA_TOOL_OPTIONS", "-Duser.home=" + home); 114+ run(root, env, "mise", "run", "link"); 116+ run(root, env, "mise", "run", "check"); 93117 ok("check:" + host); ok("check:" + host); 94118 forEachMapping(manifest, (source, target) -> { forEachMapping(manifest, (source, target) -> { 95119 var path = targetPath(home, target); var path = targetPath(home, target); 96120 if (!Files.isSymbolicLink(path)) throw new RuntimeException("FAIL:link:" + host + ":" + target); if (!Files.isSymbolicLink(path)) throw new RuntimeException("FAIL:link:" + host + ":" + target); 98122 ok("links:" + host); ok("links:" + host); 99- run(root, env, "java", "-Duser.home=" + home, "bootstripper.java", "clean"); 123+ run(root, env, "mise", "run", "clean"); 100124 ok("clean:" + host); ok("clean:" + host); +1 / −1 text lines
6262~/.config/glow~/.config/glow 6565~/.config/mise~/.config/mise 6767claude/settings.jsonclaude/settings.json +1 / −1 text lines
3232~/.config/glow~/.config/glow 3535~/.config/mise~/.config/mise