repositories / dotfiles

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)

+59 / −26 text lines

Diff layout

AGENTS.md

Modified

+5 / −1 text lines

55Check `git status --short` before edits.
66Prefer repo paths (`pi/agent/...`) over `$HOME` paths.
77Use `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.
1010Do not delete noisy research/cache/untracked files unless explicitly asked.
8585java bootstripper.java init-crypto
8686```
88## Global Mise config
90- User config source: `mise-config/` links to `~/.config/mise`.
8892## Global Pi config
9094- Settings: `pi/agent/settings.json`

NB-00718.symlinks

Modified

+1 / −1 text lines

7070glow/glow.yml
7171~/AppData/Local/glow/Config/glow.yml
73mise
73mise-config
7474~/.config/mise
7676ssh

desktop.symlinks

Modified

+1 / −1 text lines

5858glow
5959~/.config/glow
61mise
61mise-config
6262~/.config/mise
6464systemd/user/work.slice

mise-config/config.toml

Added
new file mode 100644

+7 / −0 text lines

1[tools]
2"cargo:kdl-lsp" = "latest"
3"github:dev-cycles/contextive" = "latest"
4"npm:gh-actions-language-server" = "latest"
5
6[settings]
7experimental = true

mise.toml

Modified

+5 / −0 text lines

1919description = "Run Podman integration test"
2020run = "java ./scripts/dotfiles_integration_test.java"
22[tasks.test-inside]
23description = "Run Podman container checks"
24hide = true
25run = "java ./scripts/dotfiles_integration_test.java --inside"
2227[tasks.link]
2328description = "Link dorkfiles into HOME"
2429run = [

mise/config.toml

Deleted
deleted file mode 100644

+0 / −7 text lines

1[tools]
2"cargo:kdl-lsp" = "latest"
3"github:dev-cycles/contextive" = "latest"
4"npm:gh-actions-language-server" = "latest"
5
6[settings]
7experimental = true

scripts/dotfiles_integration_test.java

Modified

+38 / −14 text lines

2323 "-v", root + ":/src:ro", "-v", key + ":/dotfiles-aes.key:ro",
2424 "registry.fedoraproject.org/fedora:latest", "sleep", "infinity");
2525 ok("container-started");
26 step("install container packages");
27 // Fresh Fedora has neither Git nor Java. Host mise is intentionally not mounted.
28 run(null, "podman", "exec", container, "dnf", "-qy", "--setopt=install_weak_deps=False", "install", "git-core", "java-latest-openjdk");
29 ok("container-packages-installed");
26 step("install git");
27 run(null, "podman", "exec", container, "dnf", "-qy", "--setopt=install_weak_deps=False", "install", "git-core");
28 ok("git-installed");
29 step("install mise");
30 installMise(container);
31 ok("mise-installed");
3032 run(null, "podman", "exec", container, "git", "config", "--global", "--add", "safe.directory", "/src");
3133 run(null, "podman", "exec", container, "mkdir", "-p", "/root/work");
3234 step("clone repo");
3335 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");
35 step("run checks");
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");
39 ok("mise-trusted");
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 {
3845 runAllowFail(null, "podman", "rm", "-f", container);
3946 }
4047 }
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);
56 };
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());
61 }
4263 static void inside() throws Exception {
4364 root = Path.of(".").toAbsolutePath().normalize();
4465 System.out.println("rootless=" + rootless());
4566 ok("deps");
4667 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"));
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");
5173 if (!Files.readString(root.resolve(".git/hooks/pre-commit")).contains("exec java bootstripper.java pre-commit")) fail("hook-content");
5274 ok("install-hooks");
6284 if (Files.readString(root.resolve("nushell/secrets.nu")).startsWith("DFAES1")) fail("worktree-still-encrypted");
6385 ok("worktree-decrypted");
65 run(root, "java", "bootstripper.java", "pre-commit");
66 ok("pre-commit");
87 run(root, "mise", "run", "check");
88 ok("check-task");
89 run(root, ".git/hooks/pre-commit");
90 ok("pre-commit-hook");
6892 freshCryptoSmoke();
6993 System.out.println("RESULT:ok");
86110 System.out.println("manifest=" + manifest.getFileName());
87111 deleteTree(home);
88112 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");
115 ok("link:" + host);
116 run(root, env, "mise", "run", "check");
93117 ok("check:" + host);
94118 forEachMapping(manifest, (source, target) -> {
95119 var path = targetPath(home, target);
96120 if (!Files.isSymbolicLink(path)) throw new RuntimeException("FAIL:link:" + host + ":" + target);
97121 });
98122 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);
101125 }

wsl.symlinks

Modified

+1 / −1 text lines

6161glow
6262~/.config/glow
64mise
64mise-config
6565~/.config/mise
6767claude/settings.json

x230.symlinks

Modified

+1 / −1 text lines

3131glow
3232~/.config/glow
34mise
34mise-config
3535~/.config/mise
3737yazi