af61458371
this implementation uses the TrivialServer that is already provided by the go-omaha library. it is a very simple wrapper, simply asking for the file, version, and listening address on the command line. it can only handle one package at a time, naming the payload from the server "update.gz", which is the standard filename for the update payload. the additional metadata required for package creation is generated based on the provided file. when the server is setup, update_engine can be pointed at it by setting the SERVER variable in /etc/coreos/update.conf |
||
---|---|---|
cmd/serve-package | ||
fixtures | ||
omaha | ||
vendor/github.com | ||
.gitignore | ||
.travis.yml | ||
code-of-conduct.md | ||
CONTRIBUTING.md | ||
DCO | ||
glide.lock | ||
glide.yaml | ||
LICENSE | ||
Makefile | ||
NOTICE | ||
README.md |
Go Omaha
Implementation of the omaha update protocol in Go.
Status
This code is targeted for use with CoreOS's CoreUpdate product and the Container Linux update_engine. As a result this is not a complete implementation of the protocol and inherits a number of quirks from update_engine. These differences include:
-
No offline activity tracking. The protocol's ping mechanism allows for tracking application usage, reporting the number of days since the last ping and how many of those days saw active usage. CoreUpdate does not use this, instead assuming update clients are always online and checking in once every ~45-50 minutes. Clients not actively updating should send only a ping, indicating CoreUpdate's "Instance-Hold" state. Clients requesting an update should send a ping, update check, and an UpdateComplete:SuccessReboot event indicating CoreUpdate's "Complete" state.
-
Various protocol extensions/abuses. update_engine, likely due to earlier limitations of the protocol and Google's server implementation, uses a number of non-standard fields. For example, packing a lot of extra attributes such as the package's SHA-256 hash into a "postinstall" action. As much as possible the code includes comments about these extensions.
-
Many data fields not used by CoreUpdate are omitted.