Skip to content

mirage: fix updateScript#2174

Open
jian-lin wants to merge 1 commit into
ngi-nix:mainfrom
linj-fork:pr/dnsvizor-package-set-updateScript
Open

mirage: fix updateScript#2174
jian-lin wants to merge 1 commit into
ngi-nix:mainfrom
linj-fork:pr/dnsvizor-package-set-updateScript

Conversation

@jian-lin
Copy link
Copy Markdown
Contributor

@jian-lin jian-lin commented Feb 13, 2026

MirageOS unikernels are a package set of many targets, which share the
same src. To avoid race condition, instead of attaching the same
updateScript to each target and running the same updateScript multiple
times, we create a dummy package called update in the package set
and only attach the updateScript to it. This way, the updateScript is
only run once.

The result of the updateScript is two independent update commits:

  1. pname: old-version -> new-version
  2. pname: update deps

The 1st commit only exists if src is updated. The 2nd commit only
exists if ocaml dependencies are updated. The existence of one does
not affect the existence of the other.

Some detailed changes:

  • fix meta.position of configured unikernel
  • support updating src and related flake inputs
  • update src, related flake inputs and deps of all targets in lockstep
  • add a no-op updateScript to each target to prevent
    .github/workflows/update-packages.yaml from running a default
    updateScript

In addition, we provide a script for each target to generate/update
its own deps:

$ nix run -f . dnsvizor.hvt.depsUpdateScriptForThisTarget

This PR needs:

@jian-lin jian-lin mentioned this pull request Feb 13, 2026
4 tasks
@jian-lin jian-lin force-pushed the pr/dnsvizor-package-set-updateScript branch from 60cfb78 to 120b8da Compare February 13, 2026 04:57
@jian-lin jian-lin force-pushed the pr/dnsvizor-package-set-updateScript branch 5 times, most recently from 76b130f to 6833bb4 Compare February 16, 2026 14:50
@jian-lin jian-lin force-pushed the pr/dnsvizor-package-set-updateScript branch 2 times, most recently from 19bcdbf to 5df33e4 Compare February 23, 2026 17:12
MirageOS unikernels are a package set of many targets, which share the
same `src`.  To avoid race condition, instead of attaching the same
updateScript to each target and running the same updateScript multiple
times, we create a dummy package called `update` in the package set
and only attach the updateScript to it.  This way, the updateScript is
only run once.

The result of the updateScript is two independent update commits:
1. pname: old-version -> new-version
2. pname: update deps

The 1st commit only exists if `src` is updated.  The 2nd commit only
exists if ocaml dependencies are updated.  The existence of one does
not affect the existence of the other.

Some detailed changes:
- fix meta.position of `configure`d unikernel
- support updating src and related flake inputs
- update src, related flake inputs and deps of all targets in lockstep
- add a no-op updateScript to each target to prevent
  .github/workflows/update-packages.yaml from running a default
  updateScript

In addition, we provide a script for each target to generate/update
its own deps:

```shellSession
$ nix run -f . dnsvizor.hvt.depsUpdateScriptForThisTarget
```
@jian-lin jian-lin force-pushed the pr/dnsvizor-package-set-updateScript branch from 5df33e4 to b890587 Compare February 26, 2026 09:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

1 participant