Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include kmod kit in repos #1287

Merged
merged 3 commits into from
Jan 22, 2021
Merged

Include kmod kit in repos #1287

merged 3 commits into from
Jan 22, 2021

Conversation

tjkirch
Copy link
Contributor

@tjkirch tjkirch commented Jan 21, 2021

Issue number:

Fixes #1275.

Description of changes:

5b032daf Extract kmod kit archive naming to cargo-make variable
e08fdb2f Include kmod kit in repo targets
e157671f BUILDING: update to describe retrieval and use of kmod kit

This allows for easy, safe retrieval of the kmod kit for a given Bottlerocket release. Updating the repo target means we'll automatically upload kits in future releases, starting with v1.0.6.

Note: This is based on #1286 and #1285.

Testing done:

Making a repo now includes the kmod kit:

> cargo make repo
...
23:49:28 [INFO] Writing repo targets to: /home/tjk/work/bottlerocket/build/repos/default/bottlerocket-1.0.5-e08fdb2f/targets
23:49:29 [INFO] Writing repo metadata to: /home/tjk/work/bottlerocket/build/repos/default/bottlerocket-1.0.5-e08fdb2f/aws-k8s-1.17/x86_64
[cargo-make] INFO - Build Done in 6 seconds.

> exa --tree build/repos/default/bottlerocket-1.0.5-e08fdb2f/
build/repos/default/bottlerocket-1.0.5-e08fdb2f
├── aws-k8s-1.17
...
└── targets
...
   ├── d29cee5253a81c8debc701389c1670531c81b2ca6bf478e1900be2d106e4432c.aws-k8s-1.17-x86_64-kmod-kit-v1.0.5.tar.xz -> /home/tjk/work/bottlerocket/build/archives/aws-k8s-1.17-x86_64-kmod-kit-v1.0.5.tar.xz

> grep -A5 kit build/repos/default/bottlerocket-1.0.5-e08fdb2f/aws-k8s-1.17/x86_64/*targets.json
      "aws-k8s-1.17-x86_64-kmod-kit-v1.0.5.tar.xz": {
        "length": 63348696,
        "hashes": {
          "sha256": "d29cee5253a81c8debc701389c1670531c81b2ca6bf478e1900be2d106e4432c"
        }
      },

I synced the repo to an S3 bucket and was able to download it with tuftool:

> tuftool download . --target-name aws-k8s-1.17-x86_64-kmod-kit-v1.0.5.tar.xz --root ./roles/default.root.json --metadata-url "https://redacted/aws-k8s-1.17/x86_64/" --targets-url "https://redacted/targets/"
Downloading targets to "."
        -> aws-k8s-1.17-x86_64-kmod-kit-v1.0.5.tar.xz

Kit is as expected:

> tar tf aws-k8s-1.17-x86_64-kmod-kit-v1.0.5.tar.xz | head -n5
aws-k8s-1.17-x86_64-kmod-kit-v1.0.5/
aws-k8s-1.17-x86_64-kmod-kit-v1.0.5/kernel-devel/
aws-k8s-1.17-x86_64-kmod-kit-v1.0.5/kernel-devel/Documentation/
aws-k8s-1.17-x86_64-kmod-kit-v1.0.5/kernel-devel/Documentation/kbuild/
aws-k8s-1.17-x86_64-kmod-kit-v1.0.5/kernel-devel/Documentation/kbuild/Kconfig.select-break
...

Terms of contribution:

By submitting this pull request, I agree that this contribution is dual-licensed under the terms of both the Apache License, version 2.0, and the MIT license.

@tjkirch tjkirch requested a review from bcressey January 21, 2021 01:07
@tjkirch tjkirch mentioned this pull request Jan 21, 2021
@tjkirch tjkirch linked an issue Jan 21, 2021 that may be closed by this pull request
@tjkirch
Copy link
Contributor Author

tjkirch commented Jan 21, 2021

^ This push addresses (most of) @bcressey's concerns above.

@tjkirch
Copy link
Contributor Author

tjkirch commented Jan 21, 2021

^ Quick fix for @bcressey's remaining comment, based on an offline suggestion from him.

@tjkirch tjkirch changed the base branch from kmod-kit-cond-rebuild to develop January 22, 2021 05:41
@tjkirch tjkirch merged commit 2cf0129 into develop Jan 22, 2021
@tjkirch tjkirch deleted the kmod-kit-repo branch January 22, 2021 05:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

kmod kit availability
3 participants