From dd70bf7eab0a5a4b32bd85d7176696000ebd5fdf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Mart=C3=ADn?= Date: Thu, 28 Nov 2024 16:09:27 +0100 Subject: [PATCH] chore: remove unused patches and scripts MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Martín --- make-vendored-tarfile.sh | 34 ---------------- ...-git-fork-for-aws-nitro-enclaves-cos.patch | 40 ------------------- .../0002-fix-aws-nitro-enclaves-cose.patch | 25 ------------ 3 files changed, 99 deletions(-) delete mode 100755 make-vendored-tarfile.sh delete mode 100644 patches/0001-Revert-chore-use-git-fork-for-aws-nitro-enclaves-cos.patch delete mode 100644 patches/0002-fix-aws-nitro-enclaves-cose.patch diff --git a/make-vendored-tarfile.sh b/make-vendored-tarfile.sh deleted file mode 100755 index 434b693f9..000000000 --- a/make-vendored-tarfile.sh +++ /dev/null @@ -1,34 +0,0 @@ -#! /bin/bash - -set -x -VER=${1:-$(git rev-parse HEAD)} -shift -PLATFORMS=$* - -[ -n "$PLATFORMS" ] || PLATFORMS=$(echo {x86_64,aarch64,powerpc64le,s390x}-unknown-linux-gnu) - -for PLATFORM in $PLATFORMS; do - ARGS+="--platform ${PLATFORM} " -done - -# https://issues.redhat.com/browse/RHEL-65521 -ARGS+="--exclude-crate-path idna#tests" - -# Clean vendor dir or the filterer will refuse to do the job -rm -rf vendor - -# We need v0.5.7 because of RHEL rust version -cargo install --quiet cargo-vendor-filterer@0.5.7 - -# Use the official crate version -git apply patches/0001-Revert-chore-use-git-fork-for-aws-nitro-enclaves-cos.patch -# Filter the vendor files for the given platforms -cargo vendor-filterer ${ARGS} -# Reapply the crate patch so cargo build keeps working -git apply -R patches/0001-Revert-chore-use-git-fork-for-aws-nitro-enclaves-cos.patch - -# Patch the official crate so the build works. -git apply patches/0002-fix-aws-nitro-enclaves-cose.patch -tar cJf "fido-device-onboard-rs-${VER}-vendor-patched.tar.xz" vendor/ -# Remove previous patch and leave the official crate as it was. -git apply -R patches/0002-fix-aws-nitro-enclaves-cose.patch diff --git a/patches/0001-Revert-chore-use-git-fork-for-aws-nitro-enclaves-cos.patch b/patches/0001-Revert-chore-use-git-fork-for-aws-nitro-enclaves-cos.patch deleted file mode 100644 index 5b2ea36ca..000000000 --- a/patches/0001-Revert-chore-use-git-fork-for-aws-nitro-enclaves-cos.patch +++ /dev/null @@ -1,40 +0,0 @@ -From f1b53d4bdac4ab889eb084111f395d418945ed07 Mon Sep 17 00:00:00 2001 -From: Antonio Murdaca -Date: Mon, 25 Nov 2024 12:30:52 +0100 -Subject: [PATCH] Revert "chore: use git fork for aws-nitro-enclaves-cose" - -This reverts commit 1ea09e88baee3c47cdc76902f0034d553207d515. ---- - data-formats/Cargo.toml | 2 +- - http-wrapper/Cargo.toml | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -diff --git a/data-formats/Cargo.toml b/data-formats/Cargo.toml -index 83979e1..c8ae80f 100644 ---- a/data-formats/Cargo.toml -+++ b/data-formats/Cargo.toml -@@ -17,7 +17,7 @@ serde_cbor = "0.11" - serde_repr = "0.1.6" - serde_tuple = "0.5" - thiserror = "1" --aws-nitro-enclaves-cose = { git = "https://github.com/nullr0ute/aws-nitro-enclaves-cose/", rev = "e3938e60d9051690569d1e4fcbe1c0c99d2fafa8" } -+aws-nitro-enclaves-cose = "0.4.0" - uuid = "1.3" - num-traits = "0.2" - num-derive = "0.3" -diff --git a/http-wrapper/Cargo.toml b/http-wrapper/Cargo.toml -index 0decb0c..70fcf41 100644 ---- a/http-wrapper/Cargo.toml -+++ b/http-wrapper/Cargo.toml -@@ -20,7 +20,7 @@ openssl = "0.10.66" - - fdo-data-formats = { path = "../data-formats", version = "0.5.1" } - fdo-store = { path = "../store", version = "0.5.1" } --aws-nitro-enclaves-cose = { git = "https://github.com/nullr0ute/aws-nitro-enclaves-cose/", rev = "e3938e60d9051690569d1e4fcbe1c0c99d2fafa8" } -+aws-nitro-enclaves-cose = "0.4.0" - - # Server-side - uuid = { version = "1.3", features = ["v4"], optional = true } --- -2.47.0 - diff --git a/patches/0002-fix-aws-nitro-enclaves-cose.patch b/patches/0002-fix-aws-nitro-enclaves-cose.patch deleted file mode 100644 index 6fa09e4f6..000000000 --- a/patches/0002-fix-aws-nitro-enclaves-cose.patch +++ /dev/null @@ -1,25 +0,0 @@ -Backport of https://github.com/awslabs/aws-nitro-enclaves-cose/pull/66 - -diff --git a/vendor/aws-nitro-enclaves-cose/.cargo-checksum.json b/vendor/aws-nitro-enclaves-cose/.cargo-checksum.json -index dd788a8..1035b7b 100644 ---- a/vendor/aws-nitro-enclaves-cose/.cargo-checksum.json -+++ b/vendor/aws-nitro-enclaves-cose/.cargo-checksum.json -@@ -1 +1 @@ --{"files":{"CHANGELOG.md":"182c816f6cdcf13b370be9e712a0e7cf5b7c6b6612dc81c3b3d477abfca58e86","CODE_OF_CONDUCT.md":"34b6c98d5c23127ae6769e95e483e5bf6d3704ae1f0d3ae4e69d15f4ede118b6","CONTRIBUTING.md":"b050a75d5f6d2236ed40ad91dc53c4a4b30da184f9298f6f18507beae5fd7cb7","Cargo.toml":"d3ba98a34c9dcbff42da7e04d123b1687840738851e0630035e1f6e620a6fd98","LICENSE":"09e8a9bcec8067104652c168685ab0931e7868f9c8284b66f5ae6edae5f1130b","NOTICE":"d4290ed64c2edd0fce1d84e3f9dfb2881240fe534def76b8cd29ed6af683e287","README.md":"b16c142f4056384bb274fa7c9d0c2d73faf573cc2123a0bf4825970f88a67fc4","src/crypto/mod.rs":"a509e065cd0c3ed4c05484af9a7c45397ebf2a8b3f0d22578410f22484ffc33c","src/crypto/openssl_pkey.rs":"e9344a26ba101925a8e1c82960ff3d20a3df603be43132671bb15846ee96e829","src/crypto/tpm.rs":"2f8ec59523020319a4f63ca1e4bf3a4ae20c3acf8ca8ffd38e53ccd99611af3f","src/encrypt.rs":"ba89d5f221f0e4379d6f67dd946a00b183639b00bcf6918a4d3c441c4328894d","src/error.rs":"48fd4b84f9b4a7f5fc7ac52c2ce792d258c257908609270bf7751938082e19b7","src/header_map.rs":"88b3d7575ea4fd8eaaf4497a9d3c27ff43ec4da0213994aecf1ec9b5b89553c0","src/lib.rs":"8dbe7fe8206cfc76f46324c25418b37d0daf1ce23fc8b3219e1d89043c8e00de","src/sign.rs":"5a45658fa820ac9b5285c0987b66a58eb4f5b4373ab1aa07a73240848de098b2"},"package":"4e2fe3e862758ef5bb5d89868141ab28781d96347522b60eb6abeaf7f9acd4bc"} -\ No newline at end of file -+{"files":{},"package":"4e2fe3e862758ef5bb5d89868141ab28781d96347522b60eb6abeaf7f9acd4bc"} -diff --git a/vendor/aws-nitro-enclaves-cose/src/sign.rs b/vendor/aws-nitro-enclaves-cose/src/sign.rs -index 6426ac0..93f59ec 100644 ---- a/vendor/aws-nitro-enclaves-cose/src/sign.rs -+++ b/vendor/aws-nitro-enclaves-cose/src/sign.rs -@@ -135,8 +135,10 @@ pub struct SigStructure( - #[serde(skip_serializing_if = "Option::is_none")] - Option, - /// external_aad : bstr, -+ #[serde(default)] - ByteBuf, - /// payload : bstr -+ #[serde(default)] - ByteBuf, - ); -