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

rpm2img: remove core kit specifics, set kit vendor as Publisher #410

Merged

Conversation

ginglis13
Copy link
Contributor

@ginglis13 ginglis13 commented Nov 22, 2024

Issue number:

Related: #397

Description of changes:

Remove core kit specific logic from application inventory generation such that multiple source kits can be used.

Additionally, set Publisher to a kit's vendor for packages that come from kits.

Testing done:

Built a k8s-1.24 variant:

Application Inventory

https://gist.github.com/ginglis13/58828f4c62242a53cbf139b1f9a5a307

...
 {                                                                                                                                                                                              18:30:25 [207/7752]
      "Name": "bottlerocket-settings-plugins-aws-k8s",
      "Publisher": "Bottlerocket",
      "Version": "0.0",
      "Release": "1.1731974957.b2bc1ccf.br1",
      "Epoch": "0",
      "InstalledTime": "2024-11-22T18:29:09Z",
      "ApplicationType": "Unspecified",
      "Architecture": "x86_64",
      "Url": "https://github.com/bottlerocket-os/bottlerocket",
      "Summary": "Settings plugin for the aws-k8s variants"
    },
    {
      "Name": "shibaken",
      "Publisher": "bottlerocket-core-kit",
      "Version": "0.0",
      "Release": "1.1731694217.dc9aff2d.br1",
      "Epoch": "1",
      "InstalledTime": "2024-11-22T18:29:09Z",
      "ApplicationType": "Unspecified",
      "Architecture": "x86_64",
      "Url": "https://github.com/bottlerocket-os/bottlerocket",
      "Summary": "IMDS client and settings generator"
    },
...

What users will see in SSM inventory collection:
Screenshot 2024-11-25 at 5 08 57 PM

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.

twoliter/embedded/rpm2img Outdated Show resolved Hide resolved
@ginglis13 ginglis13 force-pushed the app-inv-core-kit-begone branch from 2226241 to a7604fb Compare December 2, 2024 16:53
@ginglis13 ginglis13 requested review from cbgbt and yeazelm December 2, 2024 16:54
twoliter/embedded/rpm2img Outdated Show resolved Hide resolved
@yeazelm yeazelm self-requested a review December 3, 2024 17:11
twoliter/embedded/rpm2img Outdated Show resolved Hide resolved
@ginglis13 ginglis13 force-pushed the app-inv-core-kit-begone branch from a7604fb to fe6d182 Compare December 3, 2024 18:20
@ginglis13
Copy link
Contributor Author

ginglis13 commented Dec 3, 2024

^ force push replaces deprecated --argfile jq flag with --slurpfile and its slight syntax difference; also, remove KIT_GIT_SHA unused/dead code.

@ginglis13 ginglis13 requested review from yeazelm and bcressey December 3, 2024 18:21
twoliter/embedded/rpm2img Outdated Show resolved Hide resolved
twoliter/embedded/rpm2img Outdated Show resolved Hide resolved
Remove core kit specific logic from application inventory generation
such that multiple source kits can be used. Additionally, set Publisher
to a kits vendor for packages that come from kits.

Replace --argfile with --slurpfile in jq usage as --argfile is
deprecated.

Signed-off-by: Gavin Inglis <giinglis@amazon.com>
@ginglis13 ginglis13 force-pushed the app-inv-core-kit-begone branch from fe6d182 to 194a108 Compare December 4, 2024 14:36
@ginglis13
Copy link
Contributor Author

^ force push addresses some style feedback

@ginglis13 ginglis13 merged commit 35282cc into bottlerocket-os:develop Dec 5, 2024
1 check passed
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.

4 participants