10 Commits

Author SHA1 Message Date
Michael Stapelberg
1921f918ee cleanup: inline programName now that the old packer is gone 2025-12-06 20:23:57 +01:00
Michael Stapelberg
2c805ed001 refactor cobra command initialization to avoid stale state
Before this commit, we held onto *cobra.Command objects,
but that is not actually supported: after the first Execute(),
commands like updateCmd are stuck on the first-ever provided ctx.

Instead, turn command initialization into functions.

I only noticed this when trying to do two 'gok update'
from within the same test, where the fake build timestamp
is injected via the context (the timestamp was always the same).
2025-11-29 10:47:48 +01:00
Michael Stapelberg
9a9519186b integration: add 'gok update' test
Some checks failed
gokrazy CI / CI (macos-latest) (push) Has been cancelled
gokrazy CI / CI (ubuntu-latest) (push) Has been cancelled
gokrazy CI / CI (windows-latest) (push) Has been cancelled
2025-10-03 19:12:17 +02:00
Michael Stapelberg
105d190cbc internal/packer: introduce Pack.Env (with a logger) and log to it
related to https://github.com/gokrazy/tools/issues/91
2025-05-29 15:26:31 +02:00
Michael Stapelberg
5f4d95c2d4 gok: apply Environment from config.json
For gok vm run, this means an explicit -arch=amd64 or -arch=arm64
might become necessary. In general, I recommend configuring
GOOS and GOARCH in config.json explicitly:

    {
        "Hostname": "repro",
        "Environment": [
            "GOOS=linux",
            "GOARCH=amd64"
        ],
    […]

related to https://github.com/gokrazy/gokrazy/issues/191
2025-01-26 22:43:19 +01:00
Michael Stapelberg
ca8464f58d overwrite: add --trace_file flag for performance analysis
related to https://github.com/gokrazy/gokrazy/issues/287
2025-01-13 21:56:14 +01:00
Damiano Donati
1c3069c7e6 fix sbom generation inconsistency, take 2 (#66) 2023-10-25 08:39:46 +02:00
Damiano Donati
7e4c5df8fb gok overwrite: add gaf as output format
gaf is the new gokrazy archive format output type.
It is immagined for storage and upgrade.
A single, uncompressed zip archive files that contains:
- the MBR image (mbr.img)
- the boot image (boot.img)
- the root image (root.img)
- the SBOM of the gokrazy build (sbom.json)

It is lighter in size than a "full" disk image (it doesn't have the
partition filling bits).
It contains all the necessary bits to upgrade a gokrazy instance (all it
takes is the 3 imgs).
It can be directly accessed for a single file extraction (non compressed
zip property).
It can be easily unarchived by gokrazy appliances (cheap unzipping).
It is easy to verify what the build contains (SBOM alongside to be read).
2023-02-05 13:51:32 +01:00
Damiano Donati
239461d80e packer: use Pack as receiver for Main and logic 2023-02-05 13:51:32 +01:00
Michael Stapelberg
ce2433aa1a gok: move code to internal/gok 2023-01-29 19:30:23 +01:00