Compare commits
14 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a1f25cd826 | ||
|
|
24a07604ad | ||
|
|
66f8bdafa3 | ||
|
|
6bc10c96dd | ||
|
|
f594589c2e | ||
|
|
6e05768072 | ||
|
|
9de16f2589 | ||
|
|
e72773c50e | ||
|
|
24b67e2486 | ||
|
|
ade88f16d8 | ||
|
|
f4b88eb5d4 | ||
|
|
ba55b4ccd1 | ||
|
|
ea3d802d48 | ||
|
|
10567b20e6 |
9 changed files with 183 additions and 21 deletions
12
.gitignore
vendored
Normal file
12
.gitignore
vendored
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
/sec-2.7.8.tar.gz
|
||||
/sec-2.7.9.tar.gz
|
||||
/sec-2.7.10.tar.gz
|
||||
/sec-2.7.11.tar.gz
|
||||
/sec-2.7.12.tar.gz
|
||||
/sec-2.8.0.tar.gz
|
||||
/sec-2.8.1.tar.gz
|
||||
/sec-2.8.2.tar.gz
|
||||
/sec-2.8.3.tar.gz
|
||||
/sec-2.9.0.tar.gz
|
||||
/sec-2.9.1.tar.gz
|
||||
/sec-2.9.2.tar.gz
|
||||
21
Makefile
21
Makefile
|
|
@ -1,21 +0,0 @@
|
|||
# Makefile for source rpm: sec
|
||||
# $Id$
|
||||
NAME := sec
|
||||
SPECFILE = $(firstword $(wildcard *.spec))
|
||||
|
||||
define find-makefile-common
|
||||
for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done
|
||||
endef
|
||||
|
||||
MAKEFILE_COMMON := $(shell $(find-makefile-common))
|
||||
|
||||
ifeq ($(MAKEFILE_COMMON),)
|
||||
# attept a checkout
|
||||
define checkout-makefile-common
|
||||
test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2
|
||||
endef
|
||||
|
||||
MAKEFILE_COMMON := $(shell $(checkout-makefile-common))
|
||||
endif
|
||||
|
||||
include $(MAKEFILE_COMMON)
|
||||
10
conf.README
Normal file
10
conf.README
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
This is the SEC configuration directory. Because SEC usage varies so widely
|
||||
from user to user, this package is configured by default to not run.
|
||||
|
||||
The commented-out default settings in /etc/sysconfig/sec will load any file in
|
||||
this directory with a .sec suffix. Please look through the example files
|
||||
included in /usr/share/doc/sec-<version>/examples/ and install the ones you
|
||||
want here (taking into account that the examples are generic and some of them
|
||||
may need to be tweaked to work with your setup). You should also read the SEC
|
||||
man page so you have at least a basic understanding of the SEC configuration
|
||||
commands.
|
||||
8
sec.logrotate
Normal file
8
sec.logrotate
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
/var/log/sec {
|
||||
missingok
|
||||
notifempty
|
||||
sharedscripts
|
||||
postrotate
|
||||
[ ! -f /run/sec.pid ] || kill -USR2 `cat /run/sec.pid`
|
||||
endscript
|
||||
}
|
||||
12
sec.service
Normal file
12
sec.service
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
[Unit]
|
||||
Description=Simple Event Correlator script to filter log file entries
|
||||
After=syslog.target
|
||||
|
||||
[Service]
|
||||
Type=forking
|
||||
PIDFile=/run/sec.pid
|
||||
ExecStart=/usr/bin/sec --detach --pid=/run/sec.pid $OPTIONS
|
||||
EnvironmentFile=/etc/sysconfig/sec
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
109
sec.spec
Normal file
109
sec.spec
Normal file
|
|
@ -0,0 +1,109 @@
|
|||
Name: sec
|
||||
Version: 2.9.2
|
||||
Release: 1%{?dist}
|
||||
Summary: Simple Event Correlator script to filter log file entries
|
||||
License: GPLv2+
|
||||
URL: https://simple-evcorr.github.io/
|
||||
Source0: https://github.com/simple-evcorr/sec/releases/download/%{version}/sec-%{version}.tar.gz
|
||||
Source1: sec.service
|
||||
Source2: sec@.service
|
||||
Source3: sec.logrotate
|
||||
Source4: sec.sysconfig
|
||||
Source5: conf.README
|
||||
BuildArch: noarch
|
||||
|
||||
BuildRequires: perl-generators
|
||||
BuildRequires: systemd
|
||||
|
||||
Requires: logrotate
|
||||
|
||||
Requires(post): systemd
|
||||
Requires(preun): systemd
|
||||
Requires(postun): systemd
|
||||
|
||||
%description
|
||||
SEC is a simple event correlation tool that reads lines from files, named
|
||||
pipes, or standard input, and matches the lines with regular expressions,
|
||||
Perl subroutines, and other patterns for recognizing input events.
|
||||
Events are then correlated according to the rules in configuration files,
|
||||
producing output events by executing user-specified shell commands, by
|
||||
writing messages to pipes or files, etc.
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
|
||||
%build
|
||||
|
||||
%install
|
||||
# Install SEC and its associated files
|
||||
install -D -m 0755 -p sec %{buildroot}%{_bindir}/sec
|
||||
install -D -m 0644 -p sec.man %{buildroot}%{_mandir}/man1/sec.1
|
||||
install -D -m 0644 -p %{SOURCE1} %{buildroot}%{_unitdir}/sec.service
|
||||
install -D -m 0644 -p %{SOURCE2} %{buildroot}%{_unitdir}/sec@.service
|
||||
install -D -m 0644 -p %{SOURCE3} %{buildroot}%{_sysconfdir}/logrotate.d/sec
|
||||
install -D -m 0644 -p %{SOURCE4} %{buildroot}%{_sysconfdir}/sysconfig/sec
|
||||
install -D -m 0644 -p %{SOURCE5} %{buildroot}%{_sysconfdir}/%{name}/README
|
||||
|
||||
# Remove executable bits because these files get packed as docs
|
||||
chmod 0644 contrib/convert.pl contrib/swatch2sec.pl
|
||||
|
||||
%post
|
||||
%systemd_post sec.service
|
||||
|
||||
%preun
|
||||
%systemd_preun sec.service
|
||||
|
||||
%postun
|
||||
%systemd_postun_with_restart sec.service
|
||||
|
||||
%files
|
||||
%doc ChangeLog COPYING README contrib/convert.pl contrib/itostream.c contrib/swatch2sec.pl
|
||||
%config(noreplace) %{_sysconfdir}/%{name}
|
||||
%config(noreplace) %{_sysconfdir}/logrotate.d/sec
|
||||
%config(noreplace) %{_sysconfdir}/sysconfig/sec
|
||||
%{_bindir}/sec
|
||||
%{_mandir}/man1/sec.1*
|
||||
%{_unitdir}/sec.service
|
||||
%{_unitdir}/sec@.service
|
||||
|
||||
%changelog
|
||||
* Mon Jun 05 2023 Stefan Schulze Frielinghaus <stefansf@fedoraproject.org> - 2.9.2-1
|
||||
- New upstream release
|
||||
|
||||
* Thu May 05 2022 Stefan Schulze Frielinghaus <stefansf@fedoraproject.org> - 2.9.1-1
|
||||
- New upstream release
|
||||
|
||||
* Thu May 13 2021 Stefan Schulze Frielinghaus <stefansf@fedoraproject.org> - 2.9.0-1
|
||||
- New upstream release
|
||||
|
||||
* Sat May 2 2020 Stefan Schulze Frielinghaus <stefansf@fedoraproject.org> - 2.8.3-1
|
||||
- New upstream release
|
||||
|
||||
* Mon Jun 3 2019 Stefan Schulze Frielinghaus <stefansf@fedoraproject.org> - 2.8.2-1
|
||||
- New upstream release
|
||||
- Clean up spec file
|
||||
- Added an environment file /etc/sysconfig/sec in order to specify command line options
|
||||
|
||||
* Wed Oct 3 2018 Stefan Schulze Frielinghaus <stefansf@fedoraproject.org> - 2.8.1-0
|
||||
- New upstream release
|
||||
|
||||
* Sun Sep 02 2018 Stefan Schulze Frielinghaus <stefansf@fedoraproject.org> - 2.8.0-0
|
||||
- New upstream release
|
||||
|
||||
* Wed Dec 13 2017 Stefan Schulze Frielinghaus <stefansf@fedoraproject.org> - 2.7.12-0
|
||||
- New upstream release
|
||||
|
||||
* Sun Feb 5 2017 Stefan Schulze Frielinghaus <stefansf@fedoraproject.org> - 2.7.11-0
|
||||
- New upstream release
|
||||
|
||||
* Fri Jun 24 2016 Stefan Schulze Frielinghaus <stefansf@fedoraproject.org> - 2.7.10-0
|
||||
- New upstream release
|
||||
|
||||
* Sat Apr 2 2016 Stefan Schulze Frielinghaus <stefansf@fedoraproject.org> - 2.7.9-0
|
||||
- New upstream release
|
||||
|
||||
* Sun Dec 6 2015 Stefan Schulze Frielinghaus <stefansf@fedoraproject.org> - 2.7.8-0
|
||||
- New upstream release
|
||||
|
||||
* Thu Oct 15 2015 Stefan Schulze Frielinghaus <stefansf@fedoraproject.org> - 2.7.7-0
|
||||
- First build
|
||||
19
sec.sysconfig
Normal file
19
sec.sysconfig
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
# Command line options for SEC
|
||||
|
||||
OPTIONS="--conf=/etc/sec/*.sec --input=/var/log/messages --log=/var/log/sec --intevents"
|
||||
|
||||
# This is an example config if multiple instances of SEC should be started.
|
||||
# These settings should be used together with the systemd service file
|
||||
# sec@.service
|
||||
# which allows to run multiple sec instances.
|
||||
#
|
||||
#
|
||||
# Below you find an example configuration of two instances named FOO and BAR.
|
||||
# The instances can be started via the commands
|
||||
# systemctl start sec@FOO and systemctl start sec@BAR
|
||||
# For further configuration options, consult the systemd file:
|
||||
# /lib/systemd/system/sec@.service
|
||||
|
||||
#OPTIONS_FOO="--conf=/etc/sec/FOO/*.sec --input=/var/log/secure --log=/var/log/sec-FOO --intevents"
|
||||
|
||||
#OPTIONS_BAR="--conf=/etc/sec/BAR/*.sec --input=/var/log/maillog --log=/var/log/sec-BAR --intevents"
|
||||
12
sec@.service
Normal file
12
sec@.service
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
[Unit]
|
||||
Description=Simple Event Correlator (instance %I)
|
||||
After=syslog.target
|
||||
|
||||
[Service]
|
||||
Type=forking
|
||||
PIDFile=/run/sec-%I.pid
|
||||
ExecStart=/usr/bin/sec --detach --pid=/run/sec-%I.pid $OPTIONS_%I
|
||||
EnvironmentFile=/etc/sysconfig/sec
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
1
sources
1
sources
|
|
@ -0,0 +1 @@
|
|||
SHA512 (sec-2.9.2.tar.gz) = 441c543f9abcfff46c5cd86c9be8fd5c57fef988519f2c9f431b715717e0500ce1b89365e16c0d3b6e76369cf5ee5f6d5318b32e4374c614ec0083833021f17c
|
||||
Loading…
Add table
Add a link
Reference in a new issue