!1 init package

From: @chenmaodong
Reviewed-by: @blue0613
Signed-off-by: @blue0613
This commit is contained in:
openeuler-ci-bot 2020-12-29 18:48:56 +08:00 committed by Gitee
commit 5454b9c64d
15 changed files with 434 additions and 127 deletions

View File

@ -0,0 +1,139 @@
From 0125754f2706de6d7218e0e78308389e9be9fb50 Mon Sep 17 00:00:00 2001
From: c00448856 <chenmaodong@huawei.com>
Date: Mon, 21 Dec 2020 20:18:13 +0800
Subject: [PATCH] systemd
---
.../package/installer/common/sgx-ra-service/Makefile | 6 +++---
.../installer/rpm/sgx-ra-service/sgx-ra-service.spec | 4 ++--
linux/installer/common/psw/install.sh | 8 ++++----
linux/installer/common/sgx-aesm-service/Makefile | 6 +++---
linux/installer/common/sgx-aesm-service/cleanup.sh | 2 +-
linux/installer/common/sgx-aesm-service/startup.sh | 2 +-
6 files changed, 14 insertions(+), 14 deletions(-)
diff --git a/external/dcap_source/SGXDataCenterAttestationPrimitives-DCAP_1.8/tools/SGXPlatformRegistration/package/installer/common/sgx-ra-service/Makefile b/external/dcap_source/SGXDataCenterAttestationPrimitives-DCAP_1.8/tools/SGXPlatformRegistration/package/installer/common/sgx-ra-service/Makefile
index 1f3efdb..81592b1 100644
--- a/external/dcap_source/SGXDataCenterAttestationPrimitives-DCAP_1.8/tools/SGXPlatformRegistration/package/installer/common/sgx-ra-service/Makefile
+++ b/external/dcap_source/SGXDataCenterAttestationPrimitives-DCAP_1.8/tools/SGXPlatformRegistration/package/installer/common/sgx-ra-service/Makefile
@@ -37,9 +37,9 @@ PACKAGES=$(notdir $(wildcard $(PACKAGE_ROOT_FOLDER)/*))
VAR_OPT_PATH=/var/opt/sgxra
USR_LIB_PATH=/usr/$(notdir $(shell gcc -print-multi-os-directory))/$(shell dpkg-architecture -qDEB_HOST_MULTIARCH 2> /dev/null)
-RAD_CONF_NAME=$(if $(wildcard /run/systemd/system/.*),mpa_registration_tool.service,$(if $(wildcard /etc/init/.*),mpa_registration_tool.conf,))
-RAD_CONF_DEL=$(if $(wildcard /run/systemd/system/.*),mpa_registration_tool.conf,$(if $(wildcard /etc/init/.*),mpa_registration_tool.service,))
-RAD_CONF_PATH=$(if $(wildcard /run/systemd/system/.*),$(if $(wildcard /lib/systemd/system/.*),/lib/systemd/system,/usr/lib/systemd/system),$(if $(wildcard /etc/init/.*),/etc/init/))
+RAD_CONF_NAME=$(if $(wildcard /run/systemd/users/.*),mpa_registration_tool.service,$(if $(wildcard /etc/init/.*),mpa_registration_tool.conf,))
+RAD_CONF_DEL=$(if $(wildcard /run/systemd/users/.*),mpa_registration_tool.conf,$(if $(wildcard /etc/init/.*),mpa_registration_tool.service,))
+RAD_CONF_PATH=$(if $(wildcard /run/systemd/users/.*),$(if $(wildcard /lib/systemd/system/.*),/lib/systemd/system,/usr/lib/systemd/system),$(if $(wildcard /etc/init/.*),/etc/init/))
ifeq ($(RAD_CONF_NAME),)
ifneq ($(shell awk -F/ '$$2 == "docker"' /proc/self/cgroup),)
diff --git a/external/dcap_source/SGXDataCenterAttestationPrimitives-DCAP_1.8/tools/SGXPlatformRegistration/package/installer/rpm/sgx-ra-service/sgx-ra-service.spec b/external/dcap_source/SGXDataCenterAttestationPrimitives-DCAP_1.8/tools/SGXPlatformRegistration/package/installer/rpm/sgx-ra-service/sgx-ra-service.spec
index 89c1d8d..5c10e80 100644
--- a/external/dcap_source/SGXDataCenterAttestationPrimitives-DCAP_1.8/tools/SGXPlatformRegistration/package/installer/rpm/sgx-ra-service/sgx-ra-service.spec
+++ b/external/dcap_source/SGXDataCenterAttestationPrimitives-DCAP_1.8/tools/SGXPlatformRegistration/package/installer/rpm/sgx-ra-service/sgx-ra-service.spec
@@ -72,7 +72,7 @@ MPA_DST_PATH=%{_instal_path}
# Install the MPA service
-if [ -d /run/systemd/system ]; then
+if [ -d /run/systemd/users ]; then
MPA_NAME=mpa_registration_tool.service
MPA_TEMP=$MPA_DST_PATH/$MPA_NAME
if [ -d /lib/systemd/system ]; then
@@ -122,7 +122,7 @@ systemctl start mpa_registration_tool.service
MPA_DST_PATH=%{_instal_path}
# Disable service
-if [ -d /run/systemd/system ]; then
+if [ -d /run/systemd/users ]; then
systemctl disable mpa_registration_tool.service
fi
diff --git a/linux/installer/common/psw/install.sh b/linux/installer/common/psw/install.sh
index 042f83c..1ab1e5b 100755
--- a/linux/installer/common/psw/install.sh
+++ b/linux/installer/common/psw/install.sh
@@ -56,7 +56,7 @@ chmod 0750 /var/opt/aesmd
mkdir -p /var/run/aesmd
chmod 0755 /var/run/aesmd
-if [ -d /run/systemd/system ]; then
+if [ -d /run/systemd/users ]; then
systemctl stop aesmd &> /dev/null || echo
AESMD_NAME=aesmd.service
AESMD_TEMP=$AESM_PATH/$AESMD_NAME
@@ -114,7 +114,7 @@ fi
cp -rf $PSW_DST_PATH/udev /etc
rm -rf $PSW_DST_PATH/udev
-if [ -d /run/systemd/system ]; then
+if [ -d /run/systemd/users ]; then
systemctl stop remount-dev-exec &> /dev/null || echo
REMOUNT_DEV_EXEC_NAME=remount-dev-exec.service
if [ -d /lib/systemd/system ]; then
@@ -168,7 +168,7 @@ fi
$PSW_DST_PATH/cleanup.sh
# Stop and disable remount-dev-exec service
-if [ -d /run/systemd/system ]; then
+if [ -d /run/systemd/users ]; then
systemctl stop remount-dev-exec
systemctl disable remount-dev-exec
fi
@@ -215,7 +215,7 @@ chmod +x $PSW_DST_PATH/startup.sh
$PSW_DST_PATH/startup.sh
# Enable and start remount-dev-exec service
-if [ -d /run/systemd/system ]; then
+if [ -d /run/systemd/users ]; then
systemctl enable remount-dev-exec
systemctl start remount-dev-exec
fi
diff --git a/linux/installer/common/sgx-aesm-service/Makefile b/linux/installer/common/sgx-aesm-service/Makefile
index 89c5b21..fd4c9b6 100644
--- a/linux/installer/common/sgx-aesm-service/Makefile
+++ b/linux/installer/common/sgx-aesm-service/Makefile
@@ -37,9 +37,9 @@ PACKAGES=$(notdir $(wildcard $(PACKAGE_ROOT_FOLDER)/*))
VAR_OPT_PATH=/var/opt/aesmd
USR_LIB_PATH=/usr/$(notdir $(shell gcc -print-multi-os-directory))/$(shell dpkg-architecture -qDEB_HOST_MULTIARCH 2> /dev/null)
-AESMD_CONF_NAME=$(if $(wildcard /run/systemd/system/.*),aesmd.service,$(if $(wildcard /etc/init/.*),aesmd.conf,))
-AESMD_CONF_DEL=$(if $(wildcard /run/systemd/system/.*),aesmd.conf,$(if $(wildcard /etc/init/.*),aesmd.service,))
-AESMD_CONF_PATH=$(if $(wildcard /run/systemd/system/.*),$(if $(wildcard /lib/systemd/system/.*),/lib/systemd/system,/usr/lib/systemd/system),$(if $(wildcard /etc/init/.*),/etc/init/))
+AESMD_CONF_NAME=$(if $(wildcard /run/systemd/users/.*),aesmd.service,$(if $(wildcard /etc/init/.*),aesmd.conf,))
+AESMD_CONF_DEL=$(if $(wildcard /run/systemd/users/.*),aesmd.conf,$(if $(wildcard /etc/init/.*),aesmd.service,))
+AESMD_CONF_PATH=$(if $(wildcard /run/systemd/users/.*),$(if $(wildcard /lib/systemd/system/.*),/lib/systemd/system,/usr/lib/systemd/system),$(if $(wildcard /etc/init/.*),/etc/init/))
ifeq ($(AESMD_CONF_NAME),)
ifneq ($(shell awk -F/ '$$2 == "docker"' /proc/self/cgroup),)
diff --git a/linux/installer/common/sgx-aesm-service/cleanup.sh b/linux/installer/common/sgx-aesm-service/cleanup.sh
index 30f5fbe..95c9f7a 100755
--- a/linux/installer/common/sgx-aesm-service/cleanup.sh
+++ b/linux/installer/common/sgx-aesm-service/cleanup.sh
@@ -39,7 +39,7 @@ if test $(id -u) -ne 0; then
fi
# Kill AESM service
-if [ -d /run/systemd/system ]; then
+if [ -d /run/systemd/users ]; then
systemctl daemon-reload
systemctl stop aesmd
systemctl disable aesmd 2> /dev/null
diff --git a/linux/installer/common/sgx-aesm-service/startup.sh b/linux/installer/common/sgx-aesm-service/startup.sh
index e73c435..9170d7c 100755
--- a/linux/installer/common/sgx-aesm-service/startup.sh
+++ b/linux/installer/common/sgx-aesm-service/startup.sh
@@ -44,7 +44,7 @@ id -u aesmd &> /dev/null || \
-d /var/opt/aesmd -s /sbin/nologin aesmd
# Start the AESMD service
-if [ -d /run/systemd/system ]; then
+if [ -d /run/systemd/users ]; then
systemctl enable aesmd
systemctl start aesmd
elif [ -d /etc/init/ ]; then
--
2.23.0

View File

@ -0,0 +1,203 @@
From ffbcce92d6fbd22b2ec6f89696c3866e7f686fb4 Mon Sep 17 00:00:00 2001
From: c00448856 <chenmaodong@huawei.com>
Date: Mon, 21 Dec 2020 07:43:39 +0800
Subject: [PATCH] fit for rpmbuild
---
Makefile | 4 +--
.../QuoteGeneration/download_prebuilt.sh | 36 +++++++++----------
.../rpm/libsgx-ae-qe3/libsgx-ae-qe3.spec | 1 -
.../rpm/libsgx-ae-qve/libsgx-ae-qve.spec | 1 -
.../QuoteVerification/prepare_sgxssl.sh | 35 +++++++++---------
.../rpm/sgx-aesm-service/libsgx-ae-epid.spec | 1 -
.../rpm/sgx-aesm-service/libsgx-ae-le.spec | 1 -
.../rpm/sgx-aesm-service/libsgx-ae-pce.spec | 1 -
8 files changed, 39 insertions(+), 41 deletions(-)
diff --git a/Makefile b/Makefile
index 8d803d6..57e8e72 100644
--- a/Makefile
+++ b/Makefile
@@ -50,11 +50,11 @@ 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
./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
@# download prebuilt binaries
- ./download_prebuilt.sh
+# ./download_prebuilt.sh
./external/dcap_source/QuoteGeneration/download_prebuilt.sh
psw:
diff --git a/external/dcap_source/SGXDataCenterAttestationPrimitives-DCAP_1.8/QuoteGeneration/download_prebuilt.sh b/external/dcap_source/SGXDataCenterAttestationPrimitives-DCAP_1.8/QuoteGeneration/download_prebuilt.sh
index d07649b..565ee52 100755
--- a/external/dcap_source/SGXDataCenterAttestationPrimitives-DCAP_1.8/QuoteGeneration/download_prebuilt.sh
+++ b/external/dcap_source/SGXDataCenterAttestationPrimitives-DCAP_1.8/QuoteGeneration/download_prebuilt.sh
@@ -38,30 +38,30 @@ server_url_path=https://download.01.org/intel-sgx/sgx-dcap/1.8/linux
server_ae_url=$server_url_path/$ae_file_name
server_checksum_url=$server_url_path/$checksum_file
-rm -rf $out_dir/$ae_file_name
-wget $server_ae_url -P $out_dir
-if [ $? -ne 0 ]; then
- echo "Fail to download file $server_ae_url"
- exit -1
-fi
+#rm -rf $out_dir/$ae_file_name
+mv $ae_file_name $out_dir
+#if [ $? -ne 0 ]; then
+# echo "Fail to download file $server_ae_url"
+# exit -1
+#fi
-rm -f $out_dir/$checksum_file
-wget $server_checksum_url -P $out_dir
-if [ $? -ne 0 ]; then
- echo "Fail to download file $server_checksum_url"
- exit -1
-fi
+#rm -f $out_dir/$checksum_file
+#wget $server_checksum_url -P $out_dir
+#if [ $? -ne 0 ]; then
+# echo "Fail to download file $server_checksum_url"
+# exit -1
+#fi
pushd $out_dir
-sha256sum -c $checksum_file
-if [ $? -ne 0 ]; then
- echo "Checksum verification failure"
- exit -1
-fi
+#sha256sum -c $checksum_file
+#if [ $? -ne 0 ]; then
+# echo "Checksum verification failure"
+# exit -1
+#fi
tar -zxf $ae_file_name
rm -f $ae_file_name
-rm -f $checksum_file
+#rm -f $checksum_file
popd
diff --git a/external/dcap_source/SGXDataCenterAttestationPrimitives-DCAP_1.8/QuoteGeneration/installer/linux/rpm/libsgx-ae-qe3/libsgx-ae-qe3.spec b/external/dcap_source/SGXDataCenterAttestationPrimitives-DCAP_1.8/QuoteGeneration/installer/linux/rpm/libsgx-ae-qe3/libsgx-ae-qe3.spec
index 7e24818..4955ff6 100644
--- a/external/dcap_source/SGXDataCenterAttestationPrimitives-DCAP_1.8/QuoteGeneration/installer/linux/rpm/libsgx-ae-qe3/libsgx-ae-qe3.spec
+++ b/external/dcap_source/SGXDataCenterAttestationPrimitives-DCAP_1.8/QuoteGeneration/installer/linux/rpm/libsgx-ae-qe3/libsgx-ae-qe3.spec
@@ -58,7 +58,6 @@ done
%files -f %{_specdir}/list-%{name}
-%debug_package
%changelog
* Mon Jul 29 2019 SGX Team
diff --git a/external/dcap_source/SGXDataCenterAttestationPrimitives-DCAP_1.8/QuoteGeneration/installer/linux/rpm/libsgx-ae-qve/libsgx-ae-qve.spec b/external/dcap_source/SGXDataCenterAttestationPrimitives-DCAP_1.8/QuoteGeneration/installer/linux/rpm/libsgx-ae-qve/libsgx-ae-qve.spec
index d4bb388..65aa3cb 100644
--- a/external/dcap_source/SGXDataCenterAttestationPrimitives-DCAP_1.8/QuoteGeneration/installer/linux/rpm/libsgx-ae-qve/libsgx-ae-qve.spec
+++ b/external/dcap_source/SGXDataCenterAttestationPrimitives-DCAP_1.8/QuoteGeneration/installer/linux/rpm/libsgx-ae-qve/libsgx-ae-qve.spec
@@ -58,7 +58,6 @@ done
%files -f %{_specdir}/list-%{name}
-%debug_package
%changelog
* Mon Jul 29 2019 SGX Team
diff --git a/external/dcap_source/SGXDataCenterAttestationPrimitives-DCAP_1.8/QuoteVerification/prepare_sgxssl.sh b/external/dcap_source/SGXDataCenterAttestationPrimitives-DCAP_1.8/QuoteVerification/prepare_sgxssl.sh
index 214633e..0dbab9b 100755
--- a/external/dcap_source/SGXDataCenterAttestationPrimitives-DCAP_1.8/QuoteVerification/prepare_sgxssl.sh
+++ b/external/dcap_source/SGXDataCenterAttestationPrimitives-DCAP_1.8/QuoteVerification/prepare_sgxssl.sh
@@ -46,14 +46,16 @@ sgxssl_chksum=5fb5328fdd55d643cc125dd43cbd0a1f7d74ead7948b52cf15d8533d47a0d266
openssl_chksum=ddb04774f1e32f0c49751e21b67216ac87852ceb056b75209af2443400636d46
rm -f check_sum_sgxssl.txt check_sum_openssl.txt
if [ ! -f $build_script ]; then
- wget $sgxssl_github_archive/$sgxssl_file_name.zip -P $sgxssl_dir/ || exit 1
- sha256sum $sgxssl_dir/$sgxssl_file_name.zip > $sgxssl_dir/check_sum_sgxssl.txt
- grep $sgxssl_chksum $sgxssl_dir/check_sum_sgxssl.txt
- if [ $? -ne 0 ]; then
- echo "File $sgxssl_dir/$sgxssl_file_name.zip checksum failure"
- rm -f $sgxssl_dir/$sgxssl_file_name.zip
- exit -1
- fi
+# wget $sgxssl_github_archive/$sgxssl_file_name.zip -P $sgxssl_dir/ || exit 1
+ mkdir -p $sgxssl_dir/
+ mv ./$sgxssl_file_name.zip $sgxssl_dir/ || exit 1
+# sha256sum $sgxssl_dir/$sgxssl_file_name.zip > $sgxssl_dir/check_sum_sgxssl.txt
+# grep $sgxssl_chksum $sgxssl_dir/check_sum_sgxssl.txt
+# if [ $? -ne 0 ]; then
+# echo "File $sgxssl_dir/$sgxssl_file_name.zip checksum failure"
+# rm -f $sgxssl_dir/$sgxssl_file_name.zip
+# exit -1
+# fi
unzip -qq $sgxssl_dir/$sgxssl_file_name.zip -d $sgxssl_dir/ || exit 1
mv $sgxssl_dir/intel-sgx-ssl-$sgxssl_file_name/* $sgxssl_dir/ || exit 1
rm $sgxssl_dir/$sgxssl_file_name.zip || exit 1
@@ -61,14 +63,15 @@ if [ ! -f $build_script ]; then
fi
if [ ! -f $openssl_out_dir/$openssl_ver_name.tar.gz ]; then
- wget $full_openssl_url_old -P $openssl_out_dir || wget $full_openssl_url -P $openssl_out_dir || exit 1
- sha256sum $openssl_out_dir/$openssl_ver_name.tar.gz > $sgxssl_dir/check_sum_openssl.txt
- grep $openssl_chksum $sgxssl_dir/check_sum_openssl.txt
- if [ $? -ne 0 ]; then
- echo "File $openssl_out_dir/$openssl_ver_name.tar.gz checksum failure"
- rm -f $openssl_out_dir/$openssl_ver_name.tar.gz
- exit -1
- fi
+# wget $full_openssl_url_old -P $openssl_out_dir || wget $full_openssl_url -P $openssl_out_dir || exit 1
+ mv ./$openssl_ver_name.tar.gz $openssl_out_dir || exit 1
+# sha256sum $openssl_out_dir/$openssl_ver_name.tar.gz > $sgxssl_dir/check_sum_openssl.txt
+# grep $openssl_chksum $sgxssl_dir/check_sum_openssl.txt
+# if [ $? -ne 0 ]; then
+# echo "File $openssl_out_dir/$openssl_ver_name.tar.gz checksum failure"
+# rm -f $openssl_out_dir/$openssl_ver_name.tar.gz
+# exit -1
+# fi
fi
diff --git a/linux/installer/rpm/sgx-aesm-service/libsgx-ae-epid.spec b/linux/installer/rpm/sgx-aesm-service/libsgx-ae-epid.spec
index e467f5c..a999311 100644
--- a/linux/installer/rpm/sgx-aesm-service/libsgx-ae-epid.spec
+++ b/linux/installer/rpm/sgx-aesm-service/libsgx-ae-epid.spec
@@ -66,7 +66,6 @@ rm -fr %{?buildroot}/%{name}
%files -f %{_specdir}/list-%{name}
-%debug_package
%changelog
* Mon Jul 29 2019 SGX Team
diff --git a/linux/installer/rpm/sgx-aesm-service/libsgx-ae-le.spec b/linux/installer/rpm/sgx-aesm-service/libsgx-ae-le.spec
index 6517977..4421b63 100644
--- a/linux/installer/rpm/sgx-aesm-service/libsgx-ae-le.spec
+++ b/linux/installer/rpm/sgx-aesm-service/libsgx-ae-le.spec
@@ -66,7 +66,6 @@ rm -fr %{?buildroot}/%{name}
%files -f %{_specdir}/list-%{name}
-%debug_package
%changelog
* Mon Jul 29 2019 SGX Team
diff --git a/linux/installer/rpm/sgx-aesm-service/libsgx-ae-pce.spec b/linux/installer/rpm/sgx-aesm-service/libsgx-ae-pce.spec
index a7ba0e4..9269552 100644
--- a/linux/installer/rpm/sgx-aesm-service/libsgx-ae-pce.spec
+++ b/linux/installer/rpm/sgx-aesm-service/libsgx-ae-pce.spec
@@ -65,7 +65,6 @@ rm -fr %{?buildroot}/%{name}
%files -f %{_specdir}/list-%{name}
-%debug_package
%changelog
* Mon Jul 29 2019 SGX Team
--
2.23.0

BIN
DCAP_1.8.tar.gz Normal file

Binary file not shown.

127
LICENSE
View File

@ -1,127 +0,0 @@
木兰宽松许可证, 第2版
木兰宽松许可证, 第2版
2020年1月 http://license.coscl.org.cn/MulanPSL2
您对“软件”的复制、使用、修改及分发受木兰宽松许可证第2版“本许可证”的如下条款的约束
0. 定义
“软件”是指由“贡献”构成的许可在“本许可证”下的程序和相关文档的集合。
“贡献”是指由任一“贡献者”许可在“本许可证”下的受版权法保护的作品。
“贡献者”是指将受版权法保护的作品许可在“本许可证”下的自然人或“法人实体”。
“法人实体”是指提交贡献的机构及其“关联实体”。
“关联实体”是指对“本许可证”下的行为方而言控制、受控制或与其共同受控制的机构此处的控制是指有受控方或共同受控方至少50%直接或间接的投票权、资金或其他有价证券。
1. 授予版权许可
每个“贡献者”根据“本许可证”授予您永久性的、全球性的、免费的、非独占的、不可撤销的版权许可,您可以复制、使用、修改、分发其“贡献”,不论修改与否。
2. 授予专利许可
每个“贡献者”根据“本许可证”授予您永久性的、全球性的、免费的、非独占的、不可撤销的(根据本条规定撤销除外)专利许可,供您制造、委托制造、使用、许诺销售、销售、进口其“贡献”或以其他方式转移其“贡献”。前述专利许可仅限于“贡献者”现在或将来拥有或控制的其“贡献”本身或其“贡献”与许可“贡献”时的“软件”结合而将必然会侵犯的专利权利要求,不包括对“贡献”的修改或包含“贡献”的其他结合。如果您或您的“关联实体”直接或间接地,就“软件”或其中的“贡献”对任何人发起专利侵权诉讼(包括反诉或交叉诉讼)或其他专利维权行动,指控其侵犯专利权,则“本许可证”授予您对“软件”的专利许可自您提起诉讼或发起维权行动之日终止。
3. 无商标许可
“本许可证”不提供对“贡献者”的商品名称、商标、服务标志或产品名称的商标许可但您为满足第4条规定的声明义务而必须使用除外。
4. 分发限制
您可以在任何媒介中将“软件”以源程序形式或可执行形式重新分发,不论修改与否,但您必须向接收者提供“本许可证”的副本,并保留“软件”中的版权、商标、专利及免责声明。
5. 免责声明与责任限制
“软件”及其中的“贡献”在提供时不带任何明示或默示的担保。在任何情况下,“贡献者”或版权所有者不对任何人因使用“软件”或其中的“贡献”而引发的任何直接或间接损失承担责任,不论因何种原因导致或者基于何种法律理论,即使其曾被建议有此种损失的可能性。
6. 语言
“本许可证”以中英文双语表述,中英文版本具有同等法律效力。如果中英文版本存在任何冲突不一致,以中文版为准。
条款结束
如何将木兰宽松许可证第2版应用到您的软件
如果您希望将木兰宽松许可证第2版应用到您的新软件为了方便接收者查阅建议您完成如下三步
1 请您补充如下声明中的空白,包括软件名、软件的首次发表年份以及您作为版权人的名字;
2 请您在软件包的一级目录下创建以“LICENSE”为名的文件将整个许可证文本放入该文件中
3 请将如下声明文本放入每个源文件的头部注释中。
Copyright (c) [Year] [name of copyright holder]
[Software Name] is licensed under Mulan PSL v2.
You can use this software according to the terms and conditions of the Mulan PSL v2.
You may obtain a copy of Mulan PSL v2 at:
http://license.coscl.org.cn/MulanPSL2
THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
See the Mulan PSL v2 for more details.
Mulan Permissive Software LicenseVersion 2
Mulan Permissive Software LicenseVersion 2 (Mulan PSL v2)
January 2020 http://license.coscl.org.cn/MulanPSL2
Your reproduction, use, modification and distribution of the Software shall be subject to Mulan PSL v2 (this License) with the following terms and conditions:
0. Definition
Software means the program and related documents which are licensed under this License and comprise all Contribution(s).
Contribution means the copyrightable work licensed by a particular Contributor under this License.
Contributor means the Individual or Legal Entity who licenses its copyrightable work under this License.
Legal Entity means the entity making a Contribution and all its Affiliates.
Affiliates means entities that control, are controlled by, or are under common control with the acting entity under this License, control means direct or indirect ownership of at least fifty percent (50%) of the voting power, capital or other securities of controlled or commonly controlled entity.
1. Grant of Copyright License
Subject to the terms and conditions of this License, each Contributor hereby grants to you a perpetual, worldwide, royalty-free, non-exclusive, irrevocable copyright license to reproduce, use, modify, or distribute its Contribution, with modification or not.
2. Grant of Patent License
Subject to the terms and conditions of this License, each Contributor hereby grants to you a perpetual, worldwide, royalty-free, non-exclusive, irrevocable (except for revocation under this Section) patent license to make, have made, use, offer for sale, sell, import or otherwise transfer its Contribution, where such patent license is only limited to the patent claims owned or controlled by such Contributor now or in future which will be necessarily infringed by its Contribution alone, or by combination of the Contribution with the Software to which the Contribution was contributed. The patent license shall not apply to any modification of the Contribution, and any other combination which includes the Contribution. If you or your Affiliates directly or indirectly institute patent litigation (including a cross claim or counterclaim in a litigation) or other patent enforcement activities against any individual or entity by alleging that the Software or any Contribution in it infringes patents, then any patent license granted to you under this License for the Software shall terminate as of the date such litigation or activity is filed or taken.
3. No Trademark License
No trademark license is granted to use the trade names, trademarks, service marks, or product names of Contributor, except as required to fulfill notice requirements in Section 4.
4. Distribution Restriction
You may distribute the Software in any medium with or without modification, whether in source or executable forms, provided that you provide recipients with a copy of this License and retain copyright, patent, trademark and disclaimer statements in the Software.
5. Disclaimer of Warranty and Limitation of Liability
THE SOFTWARE AND CONTRIBUTION IN IT ARE PROVIDED WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED. IN NO EVENT SHALL ANY CONTRIBUTOR OR COPYRIGHT HOLDER BE LIABLE TO YOU FOR ANY DAMAGES, INCLUDING, BUT NOT LIMITED TO ANY DIRECT, OR INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES ARISING FROM YOUR USE OR INABILITY TO USE THE SOFTWARE OR THE CONTRIBUTION IN IT, NO MATTER HOW ITS CAUSED OR BASED ON WHICH LEGAL THEORY, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
6. Language
THIS LICENSE IS WRITTEN IN BOTH CHINESE AND ENGLISH, AND THE CHINESE VERSION AND ENGLISH VERSION SHALL HAVE THE SAME LEGAL EFFECT. IN THE CASE OF DIVERGENCE BETWEEN THE CHINESE AND ENGLISH VERSIONS, THE CHINESE VERSION SHALL PREVAIL.
END OF THE TERMS AND CONDITIONS
How to Apply the Mulan Permissive Software LicenseVersion 2 (Mulan PSL v2) to Your Software
To apply the Mulan PSL v2 to your work, for easy identification by recipients, you are suggested to complete following three steps:
i Fill in the blanks in following statement, including insert your software name, the year of the first publication of your software, and your name identified as the copyright owner;
ii Create a file named “LICENSE” which contains the whole context of this License in the first directory of your software package;
iii Attach the statement to the appropriate annotated syntax at the beginning of each source file.
Copyright (c) [Year] [name of copyright holder]
[Software Name] is licensed under Mulan PSL v2.
You can use this software according to the terms and conditions of the Mulan PSL v2.
You may obtain a copy of Mulan PSL v2 at:
http://license.coscl.org.cn/MulanPSL2
THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
See the Mulan PSL v2 for more details.

BIN
RELEASE_801.zip Normal file

Binary file not shown.

BIN
ipp-crypto_2019_update5.zip Normal file

Binary file not shown.

BIN
lin_2.10_1.1.1g.zip Normal file

Binary file not shown.

92
linux-sgx.spec Normal file
View File

@ -0,0 +1,92 @@
Name: linux-sgx
Version: 2.11
Release: 1
Summary: Intel(R) Software Guard Extensions for Linux* OS
License: BSD License
URL: https://github.com/intel/linux-sgx
Source0: https://github.com/intel/linux-sgx/archive/sgx_%{version}.tar.gz
Source1: https://github.com/intel/SGXDataCenterAttestationPrimitives/archive/DCAP_1.8.tar.gz
Source2: https://github.com/llvm-mirror/openmp/archive/svn-tags/RELEASE_801.zip
Source3: https://github.com/oneapi-src/oneDNN/archive/v1.1.1.tar.gz
Source4: https://github.com/intel/ipp-crypto/archive/ipp-crypto_2019_update5.zip
Source5: https://download.01.org/intel-sgx/sgx-linux/2.11/optimized_libs_2.11.tar.gz
Source6: https://download.01.org/intel-sgx/sgx-linux/2.11/prebuilt_ae_2.11.tar.gz
Source7: https://github.com/intel/intel-sgx-ssl/archive/lin_2.10_1.1.1g.zip
Source8: https://www.openssl.org/source/old/1.1.1/openssl-1.1.1g.tar.gz
Source9: https://download.01.org/intel-sgx/sgx-dcap/1.8/linux/prebuilt_dcap_1.8.tar.gz
Patch0: 0001-fix-error-for-openeuler-building.patch
Patch1: 0001-fix-building-error-for-systemd.patch
BuildRequires: gcc protobuf-devel libtool ocaml-ocamlbuild openssl-devel cmake python3-unversioned-command curl-devel createrepo_c
Requires: glibc
%description
Intel(R) Software Guard Extensions (Intel(R) SGX) is an Intel technology for application
developers seeking to protect select code and data from disclosure or modification.
%define debug_package %{nil}
%package sdk
Summary: Development files for linux sgx
Requires: glibc tar make
%description sdk
%{summary}.
%package_help
%prep
%setup -q -b 0 -n linux-sgx-sgx_2.11
%setup -q -D -a 1 -n linux-sgx-sgx_2.11/external/dcap_source
%setup -q -D -a 2 -n linux-sgx-sgx_2.11/external/openmp/openmp_code
%setup -q -D -a 3 -n linux-sgx-sgx_2.11/external/dnnl/dnnl
%setup -q -D -a 4 -n linux-sgx-sgx_2.11/external/ippcp_internal/ipp-crypto/
%setup -q -D -a 5 -n linux-sgx-sgx_2.11
%setup -q -D -a 6 -n linux-sgx-sgx_2.11
%patch0 -p1
%patch1 -p1
%build
cp %{SOURCE7} %{SOURCE8} %{SOURCE9} ./
pushd external/dcap_source/
mv SGXDataCenterAttestationPrimitives-DCAP_1.8/* SGXDataCenterAttestationPrimitives-DCAP_1.8/.[^.]* .
rmdir SGXDataCenterAttestationPrimitives-DCAP_1.8
popd
pushd external/openmp/openmp_code
mv openmp-svn-tags-RELEASE_801/* .
rmdir openmp-svn-tags-RELEASE_801
popd
pushd external/dnnl/dnnl
mv oneDNN-1.1.1/* oneDNN-1.1.1/.[^.]* .
rmdir oneDNN-1.1.1
popd
pushd external/ippcp_internal/ipp-crypto
mv ipp-crypto-ipp-crypto_2019_update5/* ipp-crypto-ipp-crypto_2019_update5/.[^.]* .
rmdir ipp-crypto-ipp-crypto_2019_update5
popd
make preparation
make sdk_install_pkg_no_mitigation
linux/installer/bin/sgx_linux_x64_sdk_2.11.100.2.bin --prefix=./
source ./sgxsdk/environment
make rpm_local_repo
cp linux/installer/rpm/sgx_rpm_local_repo/*.rpm %_rpmdir/x86_64
%install
install -D ./linux/installer/bin/sgx_linux_x64_sdk_2.11.100.2.bin $RPM_BUILD_ROOT/opt/sgx_linux_x64_sdk_2.11.100.2.bin
%pre
%post sdk
/opt/sgx_linux_x64_sdk_2.11.100.2.bin -prefix=/opt/intel/
source /opt/intel/sgxsdk/environment
rm -rf /opt/sgx_linux_x64_sdk_2.11.100.2.bin
%files sdk
/opt/sgx_linux_x64_sdk_2.11.100.2.bin
%changelog
* Thu Dec 29 2020 chenmaodong <chenmaodong@huawei.com> - 2.11-1
- init

BIN
oneDNN-1.1.1.tar.gz Normal file

Binary file not shown.

BIN
openssl-1.1.1g.tar.gz Normal file

Binary file not shown.

BIN
optimized_libs_2.11.tar.gz Normal file

Binary file not shown.

BIN
prebuilt_ae_2.11.tar.gz Normal file

Binary file not shown.

BIN
prebuilt_dcap_1.8.tar.gz Normal file

Binary file not shown.

BIN
sgx_2.11.tar.gz Normal file

Binary file not shown.

BIN
v1.1.1.tar.gz Normal file

Binary file not shown.