bugfix: weak-modules cannot create soft link in cvm
This commit is contained in:
parent
0839267489
commit
f20b0906a2
@ -5,7 +5,7 @@
|
||||
Name : virtCCA_driver
|
||||
Summary : virtCCA driver is some drivers for TEE specific function.
|
||||
Version : 0.1.3
|
||||
Release : 5
|
||||
Release : 6
|
||||
ExclusiveArch: aarch64
|
||||
License : GPLV2
|
||||
Group : System/Kernel
|
||||
@ -44,32 +44,42 @@ rm -rf %{buildroot}
|
||||
|
||||
%post
|
||||
if [[ "$1" = "1" || "$1" = "2" ]] ; then
|
||||
echo "installing %{kmod_1_name}.ko"
|
||||
if [ -e /sbin/weak-modules ] ; then
|
||||
echo "/lib/modules/%{kernel}/extra/%{kmod_1_name}.ko" | /sbin/weak-modules --add-module --no-initramfs
|
||||
echo "installing virtCCA driver"
|
||||
install_dir="/lib/modules/%{kernel}/extra"
|
||||
link_dir="/lib/modules/$(uname -r)/extra"
|
||||
if [ "$install_dir" != "$link_dir" ] ; then
|
||||
ln -sf "$install_dir/%{kmod_1_name}.ko" "$link_dir/%{kmod_1_name}.ko"
|
||||
ln -sf "$install_dir/%{kmod_2_name}.ko" "$link_dir/%{kmod_2_name}.ko"
|
||||
fi
|
||||
echo "installed %{kmod_1_name}.ko"
|
||||
echo "installed virtCCA driver"
|
||||
fi
|
||||
|
||||
%postun
|
||||
if [[ "$1" = "0" ]] ; then
|
||||
echo "removing %{kmod_1_name}.ko"
|
||||
if [ -e /sbin/weak-modules ] ; then
|
||||
echo "/lib/modules/%{kernel}/extra/%{kmod_1_name}.ko" | /sbin/weak-modules --remove-module --no-initramfs
|
||||
echo "removing virtCCA driver"
|
||||
link_dir="/lib/modules/$(uname -r)/extra"
|
||||
install_dir="/lib/modules/%{kernel}/extra"
|
||||
if [ "$install_dir" != "$link_dir" ] ; then
|
||||
rm -rf "$link_dir/%{kmod_1_name}.ko"
|
||||
rm -rf "$link_dir/%{kmod_2_name}.ko"
|
||||
fi
|
||||
echo "removed %{kmod_1_name}.ko"
|
||||
echo "removed virtCCA driver"
|
||||
fi
|
||||
|
||||
%changelog
|
||||
* Mon Sep 9 2024 chenzheng<chenzheng71@huawei.com> - 0.1.3-6
|
||||
- Type:bugfix
|
||||
- DESC:weak-modules cannot create soft link in cvm
|
||||
|
||||
* Mon Jul 15 2024 tujipei<tujipei@huawei.com> - 0.1.3-5
|
||||
- Type:bugfix
|
||||
- DESC:Use weak-modules to decouple kernel modules from kernel versions
|
||||
|
||||
* Mon June 3 2024 tujipei<tujipei@huawei.com> - 0.1.3-4
|
||||
* Mon Jun 3 2024 tujipei<tujipei@huawei.com> - 0.1.3-4
|
||||
- Type:bugfix
|
||||
- DESC:Clean the scanned security problem for the sealing key code
|
||||
|
||||
* Mon June 3 2024 tujipei<tujipei@huawei.com> - 0.1.2-3
|
||||
* Mon Jun 3 2024 tujipei<tujipei@huawei.com> - 0.1.2-3
|
||||
- Type:bugfix
|
||||
- DESC:Fit class_create for different kernel version
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user