Skip to content

Commit a99eb96

Browse files
authored
Merge pull request #71 from flatcar/dongsu/readme-20250710
README: add more development introduction
2 parents a0183da + 03ea9ff commit a99eb96

File tree

1 file changed

+19
-4
lines changed

1 file changed

+19
-4
lines changed

README.md

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,30 @@ This project, however, is different from the original update engine in the follo
2626

2727
* It aims to be as minimal as possible. Since `update_engine` has a long history of multiple forks of a [ChromiumOS project](https://chromium.googlesource.com/aosp/platform/system/update_engine/), its code base is inherently heavy and complicated. To address that, it is made by rewriting only essential parts like parsing Omaha protocol from scratch, and use pure Rust RSA libraries instead of relying on openssl.
2828
* Written in Rust, a huge advantage for security, especially memory safety, in contrast to the previous `update_engine`, which is written mainly in C++ and bash.
29-
* In addition to traditional OS update payloads, it supports systemd-sysext OEM, which recently started to be included in the Alpha channel of Flatcar Container Linux.
29+
* In addition to traditional OS update payloads, it supports systemd-sysext OEM, which recently started to be included in Flatcar Container Linux.
3030

3131
## Getting started
3232

33-
Build.
33+
Build binaries.
3434

3535
```
36-
cargo build
36+
cargo build --workspace
3737
```
3838

39-
Run binaries under `target/debug` or examples under `examples`.
39+
Then you are able to run binaries under `target/debug`.
4040

41+
Run unit tests.
42+
```
43+
cargo test --workspace
44+
```
45+
46+
Run a command-line tool `download_sysext`, for example:
47+
48+
```
49+
PROD_KEY=$HOME/Dev/flatcar-scripts/sdk_container/src/third_party/coreos-overlay/coreos-base/coreos-au-key/files/official-v2.pub.pem
50+
OEM_FILE=https://update.release.flatcar-linux.net/amd64-usr/4372.0.0/oem-azure.gz
51+
RUST_LOG=debug
52+
target/debug/download_sysext -p $PROD_KEY -m oem-azure.gz -o /var/tmp/outdir/ -u $OEM_FILE
53+
```
54+
55+
That will download an OEM update payload from `$OEM_FILE`, parse its headers into metadata, data, and signature to verify against the data. The production payload key needs to be in place at `$PROD_KEY` and can be found [here](https://github.com/flatcar/scripts/blob/main/sdk_container/src/third_party/coreos-overlay/coreos-base/coreos-au-key/files/official-v2.pub.pem).

0 commit comments

Comments
 (0)