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

Sbom tools #3

Merged
merged 5 commits into from
Apr 4, 2024
Merged

Conversation

SebastianSchildt
Copy link
Contributor

Refactoring, splitting the function of eclipse/kuksa.val#756 making it pip installable

@SebastianSchildt
Copy link
Contributor Author

@erikbosch there may be an error in pre-commit check?

Fixing sbom-tools/src/kuksa_sbom_utils/licensestore/ring.LICENSE.txt.gz
Fixing sbom-tools/src/kuksa_sbom_utils/licensestore/webpki.LICENSE.txt.gz

that is the "end of file" fixer, but is this is are compressed binary files, they should not be touched

@SebastianSchildt
Copy link
Contributor Author

Ok, it seems pre-commit uses a python package called identify to check what files it is dealing with. Interestingly the results are not consistent for all our compressed files

(testsb-n7i5oTkr) scs2rng@RNG-C-001JT licensestore % identify-cli OpenSSL.txt.gz     
["binary", "file", "gzip", "non-executable"]
(testsb-n7i5oTkr) scs2rng@RNG-C-001JT licensestore % identify-cli ring.LICENSE.txt.gz
["binary", "file", "gzip", "non-executable", "plain-text", "text"]

It seems a bug to tag something as "binary" and "text", but a anyways both are tagged (correctly) as gzip type as well I just excluded that

@SebastianSchildt SebastianSchildt marked this pull request as ready for review March 29, 2024 07:48
@SebastianSchildt
Copy link
Contributor Author

For completeness sake raised an issue upstream pre-commit/identify#450


```yaml
expressions:
"Apache-2.0 OR MIT": "Apache-2.0"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mikehaller - this could possibly be a solution for our "unlicense" discusssion the other day

sbom-tools/LICENSE Outdated Show resolved Hide resolved
sbom-tools/Readme.md Outdated Show resolved Hide resolved
@erikbosch
Copy link
Contributor

Some minor comments, but I like it.

I am thinking - shall we possibly have an "example" folder? I.e. an example input file, a README that describes exactly how to run it and the expected output result. Then we could later possibly add a check in CI that running the python script still works and still produce the same result

Signed-off-by: Sebastian Schildt <[email protected]>
Signed-off-by: Sebastian Schildt <[email protected]>
Signed-off-by: Sebastian Schildt <[email protected]>
Signed-off-by: Sebastian Schildt <[email protected]>
@SebastianSchildt
Copy link
Contributor Author

Fixed comments. I added an example folder, but at this time opted to not check in and "Output" folder, because no tests yet, and I am not sure, whether we might still change the exact format of the output in the future.

Copy link
Contributor

@erikbosch erikbosch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@SebastianSchildt SebastianSchildt merged commit be37de9 into eclipse-kuksa:main Apr 4, 2024
3 checks 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.

2 participants