Create cert-mon logfile config

This commit defines the cert-mon logfile config.

In addition, the package directory is reorganized to have a files
subdirectory, and to drop the obsolete PKG-INFO file.

Change-Id: Iec2b39b3b080c823be7f00ee978baa223d05b041
Story: 2008251
Task: 41115
Signed-off-by: Don Penney <don.penney@windriver.com>
This commit is contained in:
Don Penney 2020-10-16 13:49:57 -04:00
parent 642d05e44f
commit 56981db804
8 changed files with 25 additions and 17 deletions

View File

@ -1,12 +0,0 @@
Metadata-Version: 1.1
Name: cert-mon
Version: 1.0
Summary: StarlingX Certificate Montior Package
Home-page:
Author: Windriver
Author-email: info@windriver.com
License: Apache-2.0
Description: StarlingX Certificate Monitor Package
Platform: UNKNOWN

View File

@ -1,4 +1,2 @@
SRC_DIR="." SRC_DIR="files"
COPY_LIST_TO_TAR="LICENSE"
EXCLUDE_LIST_FROM_TAR="centos opensuse"
TIS_PATCH_VER=PKG_GITREVCOUNT TIS_PATCH_VER=PKG_GITREVCOUNT

View File

@ -8,6 +8,7 @@ Packager: Wind River <info@windriver.com>
URL: unknown URL: unknown
Source0: %{name}-%{version}.tar.gz Source0: %{name}-%{version}.tar.gz
BuildArch: noarch
BuildRequires: systemd-devel BuildRequires: systemd-devel
%define ocf_resourced /usr/lib/ocf/resource.d %define ocf_resourced /usr/lib/ocf/resource.d
@ -27,8 +28,8 @@ StarlingX Certificate Monitor Package
%install %install
install -m 755 -p -D cert-mon %{buildroot}/usr/lib/ocf/resource.d/platform/cert-mon install -m 755 -p -D cert-mon %{buildroot}/usr/lib/ocf/resource.d/platform/cert-mon
install -m 644 -p -D cert-mon.service %{buildroot}%{_unitdir}/cert-mon.service install -m 644 -p -D cert-mon.service %{buildroot}%{_unitdir}/cert-mon.service
install -m 644 -p -D cert-mon.syslog %{buildroot}%{_sysconfdir}/syslog-ng/conf.d/cert-mon.conf
%post install -m 644 -p -D cert-mon.logrotate %{buildroot}%{_sysconfdir}/logrotate.d/cert-mon.conf
%clean %clean
@ -43,3 +44,7 @@ rm -rf $RPM_BUILD_ROOT
# systemctl service files # systemctl service files
%{_unitdir}/cert-mon.service %{_unitdir}/cert-mon.service
# logfile config files
%{_sysconfdir}/syslog-ng/conf.d/cert-mon.conf
%{_sysconfdir}/logrotate.d/cert-mon.conf

View File

@ -0,0 +1,14 @@
/var/log/cert-mon.log
{
nodateext
size 10M
start 1
rotate 20
missingok
notifempty
compress
sharedscripts
postrotate
systemctl reload syslog-ng > /dev/null 2>&1 || true
endscript
}

View File

@ -0,0 +1,3 @@
filter f_certmon { facility(local6) and program(cert-mon); };
destination d_certmon { file("/var/log/cert-mon.log"); };
log { source(s_src); filter(f_certmon); destination(d_certmon); };