diff --git a/set-logrotate.patch b/set-logrotate.patch index 0b38c13267cc4b198726c97b0c5bd2dccf894c99..654c3a2461fbd3d77b48ba15a7d9110f927e70df 100644 --- a/set-logrotate.patch +++ b/set-logrotate.patch @@ -39,7 +39,7 @@ index 0000000..64d02f9 + +TMPF=`mktemp /tmp/logrotate-sysSentry.XXXXXXXXX` + -+/usr/sbin/logrotate /etc/logrotate-sysSentry.conf -v --log=$TMPF -s /var/lib/logrotate-syssentry/logrotate.status ++/usr/sbin/logrotate /etc/sysSentry/logrotate-sysSentry.conf -v --log=$TMPF -s /var/lib/logrotate-syssentry/logrotate.status +EXITVALUE=$? +if [ $EXITVALUE != 0 ]; then + /bin/logger -t logrotate "ALERT exited abnormally with [$EXITVALUE], for details, see /var/log/sysSentry/logrotate.log" diff --git a/sysSentry.spec b/sysSentry.spec index 8ee6eee3392df9032ff46e9d421b5fbe98e63a12..6e867f64e9c4a49e07ab4d4e112d86f5f989189f 100644 --- a/sysSentry.spec +++ b/sysSentry.spec @@ -4,7 +4,7 @@ Summary: System Inspection Framework Name: sysSentry Version: 1.0.2 -Release: 73 +Release: 74 License: Mulan PSL v2 Group: System Environment/Daemons Source0: https://gitee.com/openeuler/sysSentry/releases/download/v%{version}/%{name}-%{version}.tar.gz @@ -221,7 +221,7 @@ install config/plugins/ai_block_io.ini %{buildroot}/etc/sysSentry/plugins/ai_blo # logrotate mkdir -p %{buildroot}%{_localstatedir}/lib/logrotate-syssentry mkdir -p %{buildroot}%{_sysconfdir}/cron.hourly -install -m 0600 config/logrotate-sysSentry.conf %{buildroot}%{_sysconfdir}/logrotate-sysSentry.conf +install -m 0600 config/logrotate-sysSentry.conf %{buildroot}%{_sysconfdir}/sysSentry/logrotate-sysSentry.conf install -m 0500 src/sh/logrotate-sysSentry.cron %{buildroot}%{_sysconfdir}/cron.hourly/logrotate-sysSentry pushd src/python @@ -283,7 +283,7 @@ rm -rf %{buildroot} # logrotate %dir %{_localstatedir}/lib/logrotate-syssentry -%attr(0600,root,root) %config(noreplace) %{_sysconfdir}/logrotate-sysSentry.conf +%attr(0600,root,root) %config(noreplace) %{_sysconfdir}/sysSentry/logrotate-sysSentry.conf %attr(0500,root,root) %{_sysconfdir}/cron.hourly/logrotate-sysSentry # cpu inspection module @@ -344,6 +344,12 @@ rm -rf %{buildroot} %attr(0550,root,root) %{python3_sitelib}/sentryCollector/__pycache__/collect_plugin* %changelog +* Wed Jan 22 2025 shixuantong - 1.0.2-74 +- Type:bugfix +- CVE:NA +- SUG:NA +- DESC:move logrotate-sysSentry.conf from /etc/ to /etc/sysSentry/ + * Sat Dec 28 2024 shixuantong - 1.0.2-73 - Type:bugfix - CVE:NA