The postun script should distinguish uninstall and upgrade scenarios

Signed-off-by: modric <wangyu283@huawei.com>
(cherry picked from commit 8e16710b96a0e168a5711fa5a785bdbfe4b72353)
This commit is contained in:
modric 2022-09-24 06:45:56 +00:00 committed by openeuler-sync-bot
parent 0ba6e4b9b3
commit 60aa047104

View File

@ -1,6 +1,6 @@
Name: linux-sgx Name: linux-sgx
Version: 2.15.1 Version: 2.15.1
Release: 7 Release: 8
Summary: Intel(R) Software Guard Extensions for Linux* OS Summary: Intel(R) Software Guard Extensions for Linux* OS
ExclusiveArch: x86_64 ExclusiveArch: x86_64
License: BSD-3-Clause License: BSD-3-Clause
@ -887,6 +887,7 @@ echo -e "Installation succeed!"
systemctl start mpa_registration_tool.service systemctl start mpa_registration_tool.service
%postun -n sgx-ra-service %postun -n sgx-ra-service
if [ "$1" = "0" ]; then
# Generate the script to setup environment variables # Generate the script to setup environment variables
MPA_DST_PATH=/opt/intel/sgx-ra-service MPA_DST_PATH=/opt/intel/sgx-ra-service
@ -906,6 +907,7 @@ rm -rf $MPA_DST_PATH
#Removing log file #Removing log file
rm -f /var/log/mpa_registration.log rm -f /var/log/mpa_registration.log
fi
echo -e "Uninstallation succeed!" echo -e "Uninstallation succeed!"
@ -1030,6 +1032,9 @@ fi
%files -n libsgx-headers -f %{LINUX_INSTALLER_RPM_DIR}/libsgx-headers/build/list-libsgx-headers %files -n libsgx-headers -f %{LINUX_INSTALLER_RPM_DIR}/libsgx-headers/build/list-libsgx-headers
%changelog %changelog
* Sat Sep 24 2022 wangyu <wangyu283@huawei.com> - 2.15.1-8
- The postun script should distinguish uninstall and upgrade scenarios
* Tue Sep 20 2022 wangyu <wangyu283@huawei.com> - 2.15.1-7 * Tue Sep 20 2022 wangyu <wangyu283@huawei.com> - 2.15.1-7
- add strip compilation option for pck-id-retrieval-tool - add strip compilation option for pck-id-retrieval-tool