From 5917e15d9abc01061d1a75e9a1e55a2a9a1b6096 Mon Sep 17 00:00:00 2001 From: wangdi Date: Wed, 16 Mar 2022 20:30:18 +0800 Subject: [PATCH] fix warning of failing to delete files when uninstall (cherry picked from commit 564f318027aa5b19dbea2f648f9325b19775fd45) --- ovirt-cockpit-sso.spec | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/ovirt-cockpit-sso.spec b/ovirt-cockpit-sso.spec index 3430b6b..86bae56 100644 --- a/ovirt-cockpit-sso.spec +++ b/ovirt-cockpit-sso.spec @@ -1,6 +1,6 @@ Name: ovirt-cockpit-sso Version: 0.1.4 -Release: 1 +Release: 2 Summary: Provides SSO from oVirt Administration Portal to Cockpit License: ASL 2.0 URL: https://github.com/oVirt/%{name} @@ -74,8 +74,12 @@ esac case "$1" in 0) ## package is being removed - rm %{app_root_dir}/config/cockpit/ws-certs.d || true - rm %{app_root_dir}/ca.pem || true + if [[ -e %{app_root_dir}/config/cockpit/ws-certs.d ]]; then + rm %{app_root_dir}/config/cockpit/ws-certs.d || true + fi + if [[ -e %{app_root_dir}/ca.pem ]]; then + rm %{app_root_dir}/ca.pem || true + fi ## TODO: this is not working but would be better approach: ## /bin/firewall-cmd --permanent --zone=public --delete-service=ovirt-cockpit-sso @@ -105,5 +109,8 @@ systemctl daemon-reload %config %verify(not md5 size mtime) %{app_root_dir}/config/cockpit/cockpit.conf %changelog +* Wed Mar 16 2022 wangdi - 0.1.4-2 +- fix warning of failing to delete files when uninstall + * Tue Jul 06 2021 weishaokun - 0.1.4 - update package