99 lines
3.2 KiB
RPMSpec
99 lines
3.2 KiB
RPMSpec
Name: linux-sgx-driver
|
|
Version: 2.14
|
|
Release: 2
|
|
Summary: Intel SGX Linux* Driver
|
|
ExclusiveArch: x86_64
|
|
License: BSD-3-Clause and GPL-2.0 License
|
|
URL: https://github.com/intel/linux-sgx-driver
|
|
Source0: https://github.com/intel/linux-sgx-driver/archive/sgx_driver_%{version}.tar.gz
|
|
|
|
BuildRequires: gcc kernel-devel make module-init-tools glibc uname-build-checks elfutils-devel
|
|
Patch0: 0001-Modify-the-vm_flags-variable-through-interfaces.patch
|
|
|
|
%define kern_devel_ver %(uname -r)
|
|
Requires: kernel=%{kern_devel_ver}
|
|
|
|
%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.
|
|
|
|
The Linux SGX software stack is comprised of the Intel(R) SGX driver, the Intel(R) SGX
|
|
SDK, and the Intel(R) SGX Platform Software. The Intel(R) SGX SDK and Intel(R) SGX PSW
|
|
are hosted in the linux-sgx project.
|
|
|
|
The linux-sgx-driver project hosts the out-of-tree driver for the Linux Intel(R) SGX
|
|
software stack, which will be used until the driver upstreaming process is complete.
|
|
|
|
|
|
%prep
|
|
%autosetup -n %{name}-sgx_driver_2.14 -p1
|
|
|
|
%build
|
|
make
|
|
|
|
%install
|
|
mkdir -p $RPM_BUILD_ROOT/lib/modules/%{kern_devel_ver}/kernel/drivers/intel/sgx/
|
|
mkdir -p $RPM_BUILD_ROOT/opt/intel/sgxdriver
|
|
install isgx.ko $RPM_BUILD_ROOT/lib/modules/%{kern_devel_ver}/kernel/drivers/intel/sgx/
|
|
install License.txt $RPM_BUILD_ROOT/opt/intel/sgxdriver
|
|
install README.md $RPM_BUILD_ROOT/opt/intel/sgxdriver
|
|
|
|
%files
|
|
/lib/modules/%{kern_devel_ver}/kernel/drivers/intel/sgx/*
|
|
%attr(644, root, root) /opt/intel/sgxdriver/*
|
|
|
|
%pre
|
|
|
|
%post
|
|
/sbin/ldconfig
|
|
cat /etc/modules | grep -Fxq isgx || echo isgx >> /etc/modules
|
|
/sbin/depmod %{kern_devel_ver}
|
|
/sbin/modprobe isgx
|
|
if [ $? -ne 0 ]
|
|
then
|
|
echo "warning: kernel has been updated, please reboot system with the latest version of kernel to enable sgx!"
|
|
fi
|
|
|
|
%postun
|
|
/sbin/ldconfig
|
|
sed -i '/^isgx$/d' /etc/modules
|
|
/sbin/depmod %{kern_devel_ver}
|
|
|
|
|
|
%changelog
|
|
* Mon Jul 24 2023 zhoushuiqing <zhoushuiqing2@huawei.com> - 2.14-2
|
|
- fix the compile error of vm_flags
|
|
|
|
* Mon Jan 30 2023 wangyunjia <yunjia.wang@huawei.com> - 2.14-1
|
|
- Update version to 2.14
|
|
|
|
* Fri Dec 30 2022 xuxinyu <xuxinyu@xfusion.com> - 2.11-9
|
|
- Update supported OSes by referring to releases
|
|
|
|
* Thu Dec 29 2022 xuxinyu <xuxinyu@xfusion.com> - 2.11-8
|
|
- Clean more files
|
|
|
|
* Mon Jun 13 2022 wangyu <wangyu283@huawei.com> - 2.11-7
|
|
- kernel 5.10 backport kernel 5.11 sgx driver patch, disables sgx feature flag for non-FLC platforms
|
|
- use cpuid instead of boot_cpu_has to check cpu features
|
|
|
|
* Wed Sep 8 2021 wangcheng <wangcheng156@huawei.com> - 2.11.6
|
|
- add elfutils-devel as BuildRequire to solve building error
|
|
|
|
* Mon Jul 19 2021 chenmaodong <chenmaodong@huawei.com> - 2.11.5
|
|
- set the requiers of kernel version with linux-sgx-driver building environment kernel
|
|
|
|
* Thu Jul 1 2021 zhangguangzhi <zhangguangzhi3@huawei.com> - 2.11.4
|
|
- add buildrequires uname-build-checks
|
|
|
|
* Mon Dec 28 2020 chenmaodong <chenmaodong@huawei.com> - 2.11.3
|
|
- Fix compilation on 5.8 kernel
|
|
|
|
* Wed Oct 21 2020 chenmaodong <chenmaodong@huawei.com> - 2.11.2
|
|
- specify x86_64 as the building architecure
|
|
|
|
* Sat Oct 10 2020 chenmaodong <chenmaodong@huawei.com> - 2.11.1
|
|
- init
|
|
|
|
|