muep / joonos-sysmgr

0 stars 0 forks source link

System upgrade feature #25

Closed muep closed 2 years ago

muep commented 2 years ago

This is easy to get wrong, but would be nice to have at least something minimally workable.

Maybe an initial upgrade message could be extended to include something like:

{
    "uri": "https://example.com/somefile.img",
    "sha256sum": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
    "nodes": [
        "optional",
        "list",
        "of",
        "target",
        "systems"
    ]
}

The sysmgr configuration could include an item such as:

{
    "upgrade": ["/path/to/tool", "fixed", "params", "%f"]
}

After the update file has been downloaded somewhere, sysmgr would calculate the checksum and if it matches, runs the upgrade command with the path to the upgrade file in place of the %f placeholder.

muep commented 2 years ago

It seems that at least kiik is designed so that it directly streams the update into place. This kind of hinders the original idea of passing in a file path.