diff --git a/security-tool.spec b/security-tool.spec index ca31514e7c593362b5abec75f660cae6de4a3fc3..e4b7c21a7d5ede194b18a22885700e2624583626 100644 --- a/security-tool.spec +++ b/security-tool.spec @@ -2,13 +2,9 @@ Summary: openEuler Security Tool Name : security-tool Version: 2.0 Release: 1.48 -Source0: %{name}-%{version}.tar.bz2 -Source1: security -Source2: security.conf -Source3: security-tool.sh -Source4: openEuler-security.service -Source5: usr-security.conf +Source0: https://gitee.com/openeuler/security-tool/repository/archive/v2.0.tar.gz License: Mulan PSL v2 +URL: https://gitee.com/openeuler/security-tool BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) Requires: bash setup pam util-linux binutils sudo crontabs cronie Requires: shadow initscripts ca-certificates openssh rsyslog dbus-daemon @@ -23,7 +19,7 @@ openEuler Security Tool %global debug_package %{nil} %prep -%setup -q +%autosetup -n security-tool -p1 %build @@ -32,18 +28,18 @@ openEuler Security Tool %install rm -rf $RPM_BUILD_ROOT install -d -m0700 $RPM_BUILD_ROOT%{_sysconfdir}/openEuler_security -install -m0600 %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/openEuler_security/security -install -m0400 %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/openEuler_security/security.conf -install -m0600 %{SOURCE5} $RPM_BUILD_ROOT%{_sysconfdir}/openEuler_security/usr-security.conf +install -m0600 security $RPM_BUILD_ROOT%{_sysconfdir}/openEuler_security/security +install -m0400 security.conf $RPM_BUILD_ROOT%{_sysconfdir}/openEuler_security/security.conf +install -m0600 usr-security.conf $RPM_BUILD_ROOT%{_sysconfdir}/openEuler_security/usr-security.conf install -d -m0755 $RPM_BUILD_ROOT/%{_unitdir} -install -m0644 %{SOURCE4} $RPM_BUILD_ROOT/%{_unitdir}/openEuler-security.service +install -m0644 openEuler-security.service $RPM_BUILD_ROOT/%{_unitdir}/openEuler-security.service install -d -m0755 $RPM_BUILD_ROOT/%{_sbindir} -install -m0500 %{SOURCE3} $RPM_BUILD_ROOT/%{_sbindir}/security-tool.sh -install -m0644 csh.precmd $RPM_BUILD_ROOT%{_sysconfdir}/csh.precmd +install -m0500 security-tool.sh $RPM_BUILD_ROOT/%{_sbindir}/security-tool.sh +install -m0644 security-tool-%{version}/csh.precmd $RPM_BUILD_ROOT%{_sysconfdir}/csh.precmd install -d -m0755 $RPM_BUILD_ROOT/%{_sysconfdir}/profile.d install -d -m0755 $RPM_BUILD_ROOT/%{_sysconfdir}/pam.d -install -m0644 password-auth-crond $RPM_BUILD_ROOT%{_sysconfdir}/pam.d/password-auth-crond -install -m0644 su-local $RPM_BUILD_ROOT%{_sysconfdir}/pam.d/su-local +install -m0644 security-tool-%{version}/password-auth-crond $RPM_BUILD_ROOT%{_sysconfdir}/pam.d/password-auth-crond +install -m0644 security-tool-%{version}/su-local $RPM_BUILD_ROOT%{_sysconfdir}/pam.d/su-local %clean rm -rf $RPM_BUILD_ROOT