My fork of https://github.com/kaitai-io/kaitai_struct_samples used to be here where in side branches my not yet merged additions to the repo were living. I had to move from GitHub because of its forceful promotion of FIDO specifications by creating issues for users not using them (one has to use either 2FA or a FIDO2 authenticator, such as Windows Hello). It is likely that GitHub won't allow me to use my account since 2023-10-13. Now my fork lives there https://github.com/KOLANICH-datasets/kaitai_struct_samples (if I had to migrate from Codeberg, look for the further references in that repo). It is likely I cannot properly contribute to Kaitai Struct project anymore, since it seems to be unwilling to leave GitHub.
A library of sample files for testing file format specifications from the Kaitai Struct: format library.
Before adding a new file, it's necessary to find out who owns the copyright and under what license the file was released. If the file is hosted in a repository on GitHub and you know the hash of a commit in which the file was added, this shell command may help you with finding the author, who is usually also the copyright holder (needs curl and jq):
Shell command for extracting the commit author
auth_token=[login]:[token] # get [token] from <https://github.com/settings/tokens> (public access)
repo=ElyesH/coreboot
commit_hash=e0af9fcb2d526ffd654d0bb573dd5333d0d76269
curl \
-s \
-u "$auth_token" \
-H "Accept: application/vnd.github.v3+json" \
"https://api.github.com/repos/$repo/commits/$commit_hash" \
| jq '{html_url, message: .commit.message | .[0:index("\n\n")], author: .commit.author, spdx: {copyright: (.commit.author.name + " <" + .commit.author.email + ">"), year: (if .commit.author.date | index("-") == 4 then .commit.author.date | .[0:4] else null end)}}'
Example command output
{
"html_url": "https://github.com/ElyesH/coreboot/commit/e0af9fcb2d526ffd654d0bb573dd5333d0d76269",
"message": "tests: Add lib/edid-test test case",
"author": {
"name": "Jakub Czapiga",
"email": "jacz@semihalf.com",
"date": "2020-10-09T14:02:46Z"
},
"spdx": {
"copyright": "Jakub Czapiga <jacz@semihalf.com>",
"year": "2020"
}
}
When you know the copyright owner, find the license of the file. Then follow the REUSE tutorial to find out how to add the information in the repo.
You can install REUSE helper tool, which helps with making that the repo compliant with the REUSE recommendations. The most useful command is reuse addheader
:
reuse addheader --year 2016 --copyright="Jane Doe <jane@example.com>" --license="CC0-1.0" category/format/sample.bin
Others can be found in the tutorial in collapsible boxes marked as "Tool instructions for this step".
This repository uses REUSE to keep track of copyright and licensing information, so check the comment headers of individual files, or a file with the same name with the .license
extension added (for binary files).