diff --git a/.gitignore b/.gitignore index 5e5c5f7..5fde9ef 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Unlicense + dtrfs.tar build tmp diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..efb9808 --- /dev/null +++ b/LICENSE @@ -0,0 +1,24 @@ +This is free and unencumbered software released into the public domain. + +Anyone is free to copy, modify, publish, use, compile, sell, or +distribute this software, either in source code form or as a compiled +binary, for any purpose, commercial or non-commercial, and by any +means. + +In jurisdictions that recognize copyright laws, the author or authors +of this software dedicate any and all copyright interest in the +software to the public domain. We make this dedication for the benefit +of the public at large and to the detriment of our heirs and +successors. We intend this dedication to be an overt act of +relinquishment in perpetuity of all present and future rights to this +software under copyright law. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR +OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. + +For more information, please refer to diff --git a/README.md b/README.md index 8975e5e..64c50f0 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,7 @@ + + ## OS template You will need a working OS template to work with this project. diff --git a/dtrfs_api/Cargo.lock b/dtrfs_api/Cargo.lock index 77c70ff..8e246c0 100644 --- a/dtrfs_api/Cargo.lock +++ b/dtrfs_api/Cargo.lock @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Unlicense + # This file is automatically @generated by Cargo. # It is not intended for manual editing. version = 4 diff --git a/dtrfs_api/Cargo.toml b/dtrfs_api/Cargo.toml index 493439b..1a37400 100644 --- a/dtrfs_api/Cargo.toml +++ b/dtrfs_api/Cargo.toml @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Unlicense + [package] name = "dtrfs_api" version = "0.1.0" diff --git a/dtrfs_api/rustfmt.toml b/dtrfs_api/rustfmt.toml index 01959db..0b2e293 100644 --- a/dtrfs_api/rustfmt.toml +++ b/dtrfs_api/rustfmt.toml @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Unlicense + reorder_impl_items = true use_small_heuristics = "Max" merge_imports = true diff --git a/dtrfs_api/src/main.rs b/dtrfs_api/src/main.rs index 9506b77..1a33704 100644 --- a/dtrfs_api/src/main.rs +++ b/dtrfs_api/src/main.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Unlicense + mod os; mod snp; diff --git a/dtrfs_api/src/os.rs b/dtrfs_api/src/os.rs index 9c196cd..0fbb50b 100644 --- a/dtrfs_api/src/os.rs +++ b/dtrfs_api/src/os.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Unlicense + use crate::snp::get_derived_key; use anyhow::{anyhow, Result}; use base64::prelude::{Engine, BASE64_URL_SAFE}; diff --git a/dtrfs_api/src/snp.rs b/dtrfs_api/src/snp.rs index e3d57ba..d9d7c78 100644 --- a/dtrfs_api/src/snp.rs +++ b/dtrfs_api/src/snp.rs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Unlicense + use anyhow::{Context, Result}; use sev::firmware::guest::{AttestationReport, DerivedKey, Firmware, GuestFieldSelect}; use base64::prelude::{Engine, BASE64_URL_SAFE}; diff --git a/scripts/create.sh b/scripts/create.sh index a094e85..5230196 100755 --- a/scripts/create.sh +++ b/scripts/create.sh @@ -1,4 +1,7 @@ #!/bin/bash + +# SPDX-License-Identifier: Unlicense + cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" source creator_exports.sh source creator_functions.sh diff --git a/scripts/creator_exports.sh b/scripts/creator_exports.sh index 7b29b89..7fa0a89 100755 --- a/scripts/creator_exports.sh +++ b/scripts/creator_exports.sh @@ -1,4 +1,7 @@ #!/bin/bash + +# SPDX-License-Identifier: Unlicense + script_dir=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) # root of the initrd, that will be used to create the cpio archive diff --git a/scripts/creator_functions.sh b/scripts/creator_functions.sh index 1bcbd26..e6b32ca 100644 --- a/scripts/creator_functions.sh +++ b/scripts/creator_functions.sh @@ -1,5 +1,7 @@ #!/bin/bash +# SPDX-License-Identifier: Unlicense + echo_cyan() { echo -e "\033[0;36m$1\033[0m" } diff --git a/scripts/init.sh b/scripts/init.sh index 31d7c6e..49b5cbe 100755 --- a/scripts/init.sh +++ b/scripts/init.sh @@ -1,4 +1,7 @@ #!/bin/bash + +# SPDX-License-Identifier: Unlicense + source /usr/lib/dtrfs/init_functions.sh install_url="/tmp/detee_install_url" diff --git a/scripts/init_functions.sh b/scripts/init_functions.sh index 81baec1..9c7b609 100644 --- a/scripts/init_functions.sh +++ b/scripts/init_functions.sh @@ -1,5 +1,7 @@ #!/bin/bash +# SPDX-License-Identifier: Unlicense + load_modules() { cat /load_modules.sh | bash } diff --git a/scripts/install_os.sh b/scripts/install_os.sh index d53e52a..a3ea273 100755 --- a/scripts/install_os.sh +++ b/scripts/install_os.sh @@ -1,5 +1,7 @@ #!/bin/bash +# SPDX-License-Identifier: Unlicense + # This script is called by dtrfs_api to install an OS. [[ -z "$INSTALL_URL" ]] && { diff --git a/scripts/remote_create.sh b/scripts/remote_create.sh index 37dae76..d8427a8 100755 --- a/scripts/remote_create.sh +++ b/scripts/remote_create.sh @@ -1,4 +1,7 @@ #!/bin/bash + +# SPDX-License-Identifier: Unlicense + cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" dir="/tmp/dtrfs" diff --git a/scripts/upload_to_registry.sh b/scripts/upload_to_registry.sh index 20814e3..2c38ac6 100755 --- a/scripts/upload_to_registry.sh +++ b/scripts/upload_to_registry.sh @@ -1,5 +1,7 @@ #!/bin/bash +# SPDX-License-Identifier: Unlicense + kernel_path="/boot/vmlinuz-linux" dtrfs_path="$1"