!65 The postun script should distinguish uninstall and upgrade scenarios
From: @BornThisWay Reviewed-by: @houmingyong Signed-off-by: @houmingyong
This commit is contained in:
commit
fe7117c65e
@ -1,6 +1,6 @@
|
|||||||
Name: linux-sgx
|
Name: linux-sgx
|
||||||
Version: 2.11.100
|
Version: 2.11.100
|
||||||
Release: 11
|
Release: 12
|
||||||
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
|
||||||
@ -811,26 +811,28 @@ 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
|
||||||
# Generate the script to setup environment variables
|
if [ "$1" = "0" ]; then
|
||||||
MPA_DST_PATH=/opt/intel/sgx-ra-service
|
# Generate the script to setup environment variables
|
||||||
|
MPA_DST_PATH=/opt/intel/sgx-ra-service
|
||||||
|
|
||||||
# Disable service
|
# Disable service
|
||||||
if [ -d /run/systemd/users ]; then
|
if [ -d /run/systemd/users ]; then
|
||||||
systemctl disable mpa_registration_tool.service
|
systemctl disable mpa_registration_tool.service
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Removing MPA configuration file
|
||||||
|
rm -f /etc/init/mpa_registration_tool.conf
|
||||||
|
rm -f /lib/systemd/system/mpa_registration_tool.service
|
||||||
|
rm -f /usr/lib/systemd/system/mpa_registration_tool.service
|
||||||
|
rm -f /etc/systemd/system/mpa_registration_tool.service
|
||||||
|
|
||||||
|
# Removing MPA folder
|
||||||
|
rm -rf $MPA_DST_PATH
|
||||||
|
|
||||||
|
#Removing log file
|
||||||
|
rm -f /var/log/mpa_registration.log
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Removing MPA configuration file
|
|
||||||
rm -f /etc/init/mpa_registration_tool.conf
|
|
||||||
rm -f /lib/systemd/system/mpa_registration_tool.service
|
|
||||||
rm -f /usr/lib/systemd/system/mpa_registration_tool.service
|
|
||||||
rm -f /etc/systemd/system/mpa_registration_tool.service
|
|
||||||
|
|
||||||
# Removing MPA folder
|
|
||||||
rm -rf $MPA_DST_PATH
|
|
||||||
|
|
||||||
#Removing log file
|
|
||||||
rm -f /var/log/mpa_registration.log
|
|
||||||
|
|
||||||
echo -e "Uninstallation succeed!"
|
echo -e "Uninstallation succeed!"
|
||||||
|
|
||||||
%postun -n sgx-pck-id-retrieval-tool
|
%postun -n sgx-pck-id-retrieval-tool
|
||||||
@ -845,17 +847,19 @@ echo -e "Uninstallation succeed!"
|
|||||||
if [ -x /opt/intel/sgx-aesm-service/cleanup.sh ]; then /opt/intel/sgx-aesm-service/cleanup.sh; fi
|
if [ -x /opt/intel/sgx-aesm-service/cleanup.sh ]; then /opt/intel/sgx-aesm-service/cleanup.sh; fi
|
||||||
|
|
||||||
%postun -n sgx-dcap-pccs
|
%postun -n sgx-dcap-pccs
|
||||||
if which pm2 > /dev/null; then
|
if [ "$1" = "0" ]; then
|
||||||
pm2 stop pccs || true
|
if which pm2 > /dev/null; then
|
||||||
pm2 delete pccs || true
|
pm2 stop pccs || true
|
||||||
pm2cfg=`/bin/su -c "pm2 unstartup | grep 'sudo'" - $(logname)` || true
|
pm2 delete pccs || true
|
||||||
eval $pm2cfg || true
|
pm2cfg=`/bin/su -c "pm2 unstartup | grep 'sudo'" - $(logname)` || true
|
||||||
fi
|
eval $pm2cfg || true
|
||||||
|
fi
|
||||||
|
|
||||||
if [ -d /opt/intel/sgx-dcap-pccs ]; then
|
if [ -d /opt/intel/sgx-dcap-pccs ]; then
|
||||||
pushd /opt/intel/sgx-dcap-pccs &> /dev/null
|
pushd /opt/intel/sgx-dcap-pccs &> /dev/null
|
||||||
rm -rf node_modules || true
|
rm -rf node_modules || true
|
||||||
popd &> /dev/null
|
popd &> /dev/null
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
@ -934,6 +938,9 @@ fi
|
|||||||
%files -n sgx-ra-service -f %{TOOLS_INSTALLER_RPM_DIR}/sgx-ra-service/build/list-sgx-ra-service
|
%files -n sgx-ra-service -f %{TOOLS_INSTALLER_RPM_DIR}/sgx-ra-service/build/list-sgx-ra-service
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Sat Sep 24 2022 wangyu <wangyu283@huawei.com> - 2.11.100-12
|
||||||
|
- The postun script should distinguish uninstall and upgrade scenarios
|
||||||
|
|
||||||
* Sat Sep 03 2022 fangxiuning <fangxiuning@huawei.com> - 2.11.100-11
|
* Sat Sep 03 2022 fangxiuning <fangxiuning@huawei.com> - 2.11.100-11
|
||||||
- Fix CVE-2022-2068 CVE-2022-0778 CVE-2022-1292 CVE-2022-2097
|
- Fix CVE-2022-2068 CVE-2022-0778 CVE-2022-1292 CVE-2022-2097
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user