!40 添加安全配置加固工具

From: @jinlun123123 
Reviewed-by: @HuaxinLuGitee 
Signed-off-by: @HuaxinLuGitee
This commit is contained in:
openeuler-ci-bot 2024-11-25 15:05:05 +00:00 committed by Gitee
commit f6a529361b
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 25 additions and 1 deletions

BIN
secpaver-secconf-1.0.0.zip Normal file

Binary file not shown.

View File

@ -2,12 +2,13 @@
Name: secpaver
Summary: Security policy development tool
Version: 1.0.2
Release: 11
Release: 12
License: MulanPSL-2.0
URL: https://gitee.com/openeuler/secpaver
Source: https://gitee.com/openeuler/secpaver/repository/archive/%{name}-%{version}.tar.gz
#source1 version sys@v0.0.0-20220908164124-27713097b956
Source1: sys.tar.gz
Source2: secpaver-secconf-1.0.0.zip
Patch0001: dont-do-daemon-reload-in-make-install.patch
Patch0002: set-default-log-path.patch
@ -27,6 +28,13 @@ Requires: %{name}-plugin = %{version}-%{release}
%description
Security policy development tool
%package secconf
Summary: Security feature configuration hardening tool
License: MuLan PSL v2
%description secconf
Security feature configuration hardening tool
%package selinux
Summary: SELinux plugin for secPaver
License: MuLan PSL v2
@ -44,14 +52,21 @@ SELinux plugin for secPaver.
rm -rf vendor/golang.org/x/sys
tar -xf %{SOURCE1} -C vendor/golang.org/x/
%endif
unzip %{SOURCE2}
%build
%make_build everything
cd ./secpaver-secconf-1.0.0
make
%install
%make_install DESTDIR="%{buildroot}"
cd ./secpaver-secconf-1.0.0
%make_install DESTDIR="%{buildroot}"
%check
cd ./secpaver-secconf-1.0.0
make test
%files
%defattr(0600,root,root,0700)
@ -76,6 +91,12 @@ tar -xf %{SOURCE1} -C vendor/golang.org/x/
%{_datadir}/secpaver/scripts/selinux/config
%attr(0700,root,root) %{_datadir}/secpaver/scripts/selinux/*.sh
%files secconf
%defattr(0600,root,root,0700)
%attr(0500,root,root) %{_bindir}/sec_conf
%dir %{_datadir}/secpaver/scripts/sec_conf
%{_datadir}/secpaver/scripts/sec_conf/*
%post
%systemd_post pavd.service
@ -86,6 +107,9 @@ tar -xf %{SOURCE1} -C vendor/golang.org/x/
%systemd_postun_with_restart pavd.service
%changelog
* Mon Nov 25 2024 jinlun <jinlun@huawei.com> - 1.0.2-12
- add sec_conf feature
* Sun Jun 09 2024 yueyuankun <yueyuankun@kylinos.cn> - 1.0.2-11
- Fix build on loongarch64