!36 [sync] PR-32: Add postun operation

From: @openeuler-sync-bot 
Reviewed-by: @wang--ge 
Signed-off-by: @wang--ge
This commit is contained in:
openeuler-ci-bot 2023-03-31 06:49:36 +00:00 committed by Gitee
commit 58f390e17e
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -1,9 +1,9 @@
Name: gcc_secure
Summary: Enforcing secure compile options for abuild
License: NA
License: GPL-2.0-only
Group: System/Management
Version: 1.0
Release: 0.11
Release: 0.12
BuildRoot: %{_tmppath}/%{name}-%{version}
BuildRequires: util-linux coreutils
@ -148,7 +148,21 @@ fi
%preun
%postun
rm -rf /opt/gcc-specs-fs-cc1
rm -rf /opt/gcc-specs-pie-cc1
rm -rf /opt/gcc-specs-pie-ld
if [ -f /usr/bin/gcc_old ];then
rm -rf /usr/bin/gcc
mv /usr/bin/gcc_old /usr/bin/gcc
fi
if [ -f /usr/bin/g++_old ];then
rm -rf /usr/bin/g++
mv /usr/bin/g++_old /usr/bin/g++
fi
if [ -f /usr/bin/c++_old ];then
rm -rf /usr/bin/c++
mv /usr/bin/c++_old /usr/bin/c++
fi
%files
%defattr(-,root,root)
@ -159,6 +173,12 @@ rm -rf %{_tmppath}/%{name}-%{version}
rm -rf $RPM_BUILD_DIR/%{name}-%{version}
%changelog
* Fri Nov 25 2022 Ge Wang<wnagge20@h-partners.com> - 1.0-0.12
- Type:enhancement
- ID:NA
- SUG:NA
- DESC: add postun operation
* Thu Apr 28 2022 zhangchenfeng<zhangchenfeng1@huawei.com> - 1.0-0.11
- Type:enhancement
- ID:NA