forked from NixOS/nixpkgs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Diff: <intel/linux-sgx@sgx_2.24...sgx_2.25> Changelog: <https://github.com/intel/linux-sgx/releases/tag/sgx_2.25> This diff decouples the `sgx-psw` and `sgx-sdk` builds. We only need some headers and a single tool (`sgx_edger8r`) from the base sdk in order to build `sgx-psw`. The biggest benefit here is that I can quickly iterate on `sgx-psw`, which takes just 3 min to build, vs. waiting 1+ hour to build both `sgx-sdk` and `sgx-psw`. `sgx-sdk` is also broken in an inscrutable way with 2.25 and I don't really have the patience to waste more time on it. Now I can update the only useful artifact (the `aesmd` service from `sgx-psw`) without wasting time on the sdk.
- Loading branch information
Showing
3 changed files
with
169 additions
and
29 deletions.
There are no files selected for viewing
26 changes: 26 additions & 0 deletions
26
pkgs/os-specific/linux/sgx/psw/cppmicroservices-no-mtime.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
diff --git a/external/CppMicroServices/framework/src/bundle/BundleResourceContainer.cpp b/external/CppMicroServices/framework/src/bundle/BundleResourceContainer.cpp | ||
index aee499e9..13fa89d4 100644 | ||
--- a/external/CppMicroServices/framework/src/bundle/BundleResourceContainer.cpp | ||
+++ b/external/CppMicroServices/framework/src/bundle/BundleResourceContainer.cpp | ||
@@ -105,7 +105,7 @@ bool BundleResourceContainer::GetStat(int index, | ||
const_cast<mz_zip_archive*>(&m_ZipArchive), index) | ||
? true | ||
: false; | ||
- stat.modifiedTime = zipStat.m_time; | ||
+ stat.modifiedTime = 0; | ||
stat.crc32 = zipStat.m_crc32; | ||
// This will limit the size info from uint64 to uint32 on 32-bit | ||
// architectures. We don't care because we assume resources > 2GB | ||
diff --git a/external/CppMicroServices/third_party/miniz.c b/external/CppMicroServices/third_party/miniz.c | ||
index 6b0ebd7a..fa2aebca 100644 | ||
--- a/external/CppMicroServices/third_party/miniz.c | ||
+++ b/external/CppMicroServices/third_party/miniz.c | ||
@@ -170,7 +170,7 @@ | ||
// If MINIZ_NO_TIME is specified then the ZIP archive functions will not be able to get the current time, or | ||
// get/set file times, and the C run-time funcs that get/set times won't be called. | ||
// The current downside is the times written to your archives will be from 1979. | ||
-//#define MINIZ_NO_TIME | ||
+#define MINIZ_NO_TIME | ||
|
||
// Define MINIZ_NO_ARCHIVE_APIS to disable all ZIP archive API's. | ||
//#define MINIZ_NO_ARCHIVE_APIS |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
diff --git a/Makefile b/Makefile | ||
index 19bc05a..6b1acd4 100644 | ||
--- a/Makefile | ||
+++ b/Makefile | ||
@@ -50,13 +50,13 @@ tips: | ||
preparation: | ||
# As SDK build needs to clone and patch openmp, we cannot support the mode that download the source from github as zip. | ||
# Only enable the download from git | ||
- git submodule update --init --recursive | ||
+ # git submodule update --init --recursive | ||
cd external/dcap_source/external/jwt-cpp && git apply ../0001-Add-a-macro-to-disable-time-support-in-jwt-for-SGX.patch >/dev/null 2>&1 || \ | ||
git apply ../0001-Add-a-macro-to-disable-time-support-in-jwt-for-SGX.patch -R --check | ||
- ./external/dcap_source/QuoteVerification/prepare_sgxssl.sh nobuild | ||
+ # ./external/dcap_source/QuoteVerification/prepare_sgxssl.sh nobuild | ||
cd external/openmp/openmp_code && git apply ../0001-Enable-OpenMP-in-SGX.patch >/dev/null 2>&1 || git apply ../0001-Enable-OpenMP-in-SGX.patch --check -R | ||
cd external/protobuf/protobuf_code && git apply ../sgx_protobuf.patch >/dev/null 2>&1 || git apply ../sgx_protobuf.patch --check -R | ||
- cd external/protobuf/protobuf_code && git submodule update --init --recursive && cd third_party/abseil-cpp && git apply ../../../sgx_abseil.patch>/dev/null 2>&1 || git apply ../../../sgx_abseil.patch --check -R | ||
+ cd external/protobuf/protobuf_code && cd third_party/abseil-cpp && git apply ../../../sgx_abseil.patch>/dev/null 2>&1 || git apply ../../../sgx_abseil.patch --check -R | ||
./external/sgx-emm/create_symlink.sh | ||
cd external/mbedtls/mbedtls_code && git apply ../sgx_mbedtls.patch >/dev/null 2>&1 || git apply ../sgx_mbedtls.patch --check -R | ||
cd external/cbor && cp -r libcbor sgx_libcbor | ||
@@ -64,8 +64,8 @@ preparation: | ||
cd external/cbor/sgx_libcbor && git apply ../sgx_cbor.patch >/dev/null 2>&1 || git apply ../sgx_cbor.patch --check -R | ||
cd external/ippcp_internal/ipp-crypto && git apply ../0001-IPP-crypto-for-SGX.patch > /dev/null 2>&1 || git apply ../0001-IPP-crypto-for-SGX.patch --check -R | ||
cd external/ippcp_internal/ipp-crypto && mkdir -p build | ||
- ./download_prebuilt.sh | ||
- ./external/dcap_source/QuoteGeneration/download_prebuilt.sh | ||
+ # ./download_prebuilt.sh | ||
+ # ./external/dcap_source/QuoteGeneration/download_prebuilt.sh | ||
|
||
psw: | ||
$(MAKE) -C psw/ USE_OPT_LIBS=$(USE_OPT_LIBS) |