Skip to content
This repository has been archived by the owner on Oct 26, 2023. It is now read-only.

Use new location of manifests #344

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ A good way to look at releases and stabilisation through channels is to consider

## On versioning

For Flatcar versioning, the scripts repo is authoritative:
Versioning is controlled by the [`version.txt` file in the scripts repo](https://github.com/flatcar/scripts/blob/main/sdk_container/.repo/manifests/version.txt).
For Flatcar versioning, the scripts repo is authoritative:
Versioning is controlled by the [`version.txt` file in the scripts repo](https://github.com/flatcar/scripts/blob/main/manifests/version.txt).
`version.txt` contains version strings for both the SDK version as well as the OS image version.

Core idea is that a simple
Expand Down
27 changes: 14 additions & 13 deletions docs/reference/developer-guides/sdk-modifying-flatcar.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,21 +41,22 @@ $ ./run_sdk_container -t
</td></tr></table>

Flatcar Container Linux uses a containerised SDK; pre-built container images are available via [ghcr.io][ghcr-sdk].
The SDK itself is containerised, but it requires version information and package build instructions to build an OS image.
The SDK itself is containerised, but it requires version information and package build instructions to build an OS image.
Version information and build instructions for all packages (`ebuilds`) are contained in the scripts repository:

```
scripts
+--sdk_container
+---------src
| +--third_party
| +------coreos-overlay
| +------portage-stable
`---------.repo
+----manifests
+-------- version.txt
| +---------src
| +--third_party
| +------coreos-overlay
| +------portage-stable
+--manifests
+-------- version.txt
```

Note that if using older version/checkout of the scripts repository, the version.txt file may still be in old location, `sdk_container/.repo/manifests/version.txt`.

There are 2 ways to use the SDK container:
1. Standalone: Run the container and clone the scripts repo inside the container.
This is great for one-shot SDK usage; it's not optimal for sustained OS development since versioning is unclear and changes might get lost.
Expand Down Expand Up @@ -115,7 +116,7 @@ Lastly, to verify the version in use, consult the version file.
This file is updated on each release and reflects the SDK and OS versions corresponding to the the current commit.

```shell
$ cat sdk_container/.repo/manifests/version.txt
$ cat manifests/version.txt
FLATCAR_VERSION=3066.1.0
FLATCAR_VERSION_ID=3066.1.0
FLATCAR_BUILD_ID=""
Expand All @@ -124,9 +125,9 @@ FLATCAR_SDK_VERSION=3066.1.0

The example above is from the release / maintenance branch of the 3066 major release at the time of writing (3066 was in the Beta channel at that time).

**NOTE** that the version file at `sdk_container/.repo/manifests/version.txt` will be updated by `run_sdk_container` to include the git shortlog hash.
**NOTE** that the version file at `manifests/version.txt` will be updated by `run_sdk_container` to include the git shortlog hash.
This file is under revision control because it pins the latest official OS release and SDK version of the branch you're working on.
**If you like to switch branches later, make sure to run `git checkout sdk_container/.repo/manifests/version.txt` to revert the change made by `run_sdk_container`.**
**If you like to switch branches later, make sure to run `git checkout manifests/version.txt` to revert the change made by `run_sdk_container`.**

### Start the SDK

Expand All @@ -135,7 +136,7 @@ This will download the container image of the respective version if not present

```shell
$ ./run_sdk_container -t
sdk@flatcar-sdk-all-3066_0_0_os-beta-3066_1_0-gcf4ff44a ~/trunk/src/scripts $ cat sdk_container/.repo/manifests/version.txt
sdk@flatcar-sdk-all-3066_0_0_os-beta-3066_1_0-gcf4ff44a ~/trunk/src/scripts $ cat manifests/version.txt
```

The `-t` flag is used to tell docker to allocate a TTY. It should be omitted when calling `run_sdk_container` from a script.
Expand All @@ -146,7 +147,7 @@ By default, the name of the container contains SDK and OS image version.
If there are changes on top of the latest release (either your own, or upstream changes slated for the next patch release), the version file will have been updated:

```shell
sdk@flatcar-sdk-all-3066_0_0_os-beta-3066_1_0-gcf4ff44a ~/trunk/src/scripts $ cat sdk_container/.repo/manifests/version.txt
sdk@flatcar-sdk-all-3066_0_0_os-beta-3066_1_0-gcf4ff44a ~/trunk/src/scripts $ cat manifests/version.txt
FLATCAR_VERSION=3066.1.0+5-gcf4ff44a
FLATCAR_VERSION_ID=3066.0.1
FLATCAR_BUILD_ID="5-gcf4ff44a"
Expand Down