Accepting request 393492 from home:totol
I want to maintain prelude-lml and Prelude modules OBS-URL: https://build.opensuse.org/request/show/393492 OBS-URL: https://build.opensuse.org/package/show/server:monitoring/prelude-lml?expand=0&rev=1
This commit is contained in:
commit
669d5f4e70
23
.gitattributes
vendored
Normal file
23
.gitattributes
vendored
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
## Default LFS
|
||||||
|
*.7z filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.bsp filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.gem filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.gz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.jar filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.lz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.lzma filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.obscpio filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.oxt filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.pdf filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.png filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.rpm filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.tbz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.tbz2 filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.tgz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.ttf filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.txz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.whl filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.xz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.zip filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.zst filter=lfs diff=lfs merge=lfs -text
|
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
.osc
|
3
prelude-lml-3.0.0.tar.gz
Normal file
3
prelude-lml-3.0.0.tar.gz
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:53e3ccba2e3842e583739234366b6a5241dc6a8d18da501e6c9ff5e2b9792814
|
||||||
|
size 1391203
|
8
prelude-lml.changes
Normal file
8
prelude-lml.changes
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue May 3 21:57:53 UTC 2016 - thomas.andrejak@gmail.com
|
||||||
|
|
||||||
|
Initial import
|
||||||
|
|
||||||
|
Add systemd files because it is a daemon.
|
||||||
|
|
||||||
|
Also package SELinux files.
|
2
prelude-lml.run
Normal file
2
prelude-lml.run
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
# create a directory with permissions 0770 owned by user foo and group bar
|
||||||
|
d /run/prelude-lml 0750 root root
|
13
prelude-lml.service
Normal file
13
prelude-lml.service
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=Prelude-LML service
|
||||||
|
DefaultDependencies=no
|
||||||
|
After=remode_fs.target prelude-manager.service
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
ExecStart=/usr/bin/prelude-lml -d -P /run/prelude-lml/prelude-lml.pid
|
||||||
|
Type=forking
|
||||||
|
PIDFile=/run/prelude-lml/prelude-lml.pid
|
||||||
|
Restart=always
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
|
158
prelude-lml.spec
Normal file
158
prelude-lml.spec
Normal file
@ -0,0 +1,158 @@
|
|||||||
|
#
|
||||||
|
# spec file for package prelude-lml
|
||||||
|
#
|
||||||
|
# Copyright (c) 2016 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||||
|
#
|
||||||
|
# All modifications and additions to the file contributed by third parties
|
||||||
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
|
# upon. The license for this file, and modifications and additions to the
|
||||||
|
# file, is the same license as for the pristine package itself (unless the
|
||||||
|
# license for the pristine package is not an Open Source License, in which
|
||||||
|
# case the license is the MIT License). An "Open Source License" is a
|
||||||
|
# license that conforms to the Open Source Definition (Version 1.9)
|
||||||
|
# published by the Open Source Initiative.
|
||||||
|
|
||||||
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
||||||
|
#
|
||||||
|
|
||||||
|
%define POLICYCOREUTILSVER 2.0.78-1
|
||||||
|
%define SELINUXTARGETEDVER 3.7.19-279
|
||||||
|
|
||||||
|
Name: prelude-lml
|
||||||
|
Version: 3.0.0
|
||||||
|
Release: 0
|
||||||
|
Summary: The prelude log analyzer
|
||||||
|
License: GPL-2.0+
|
||||||
|
Group: System Environment/Daemon
|
||||||
|
Url: https://www.prelude-siem.org
|
||||||
|
Source0: https://www.prelude-siem.org/pkg/prelude/src/%{name}-%{version}.tar.gz
|
||||||
|
Source1: %{name}.service
|
||||||
|
Source2: %{name}.run
|
||||||
|
BuildRequires: gamin-devel
|
||||||
|
BuildRequires: pcre-devel
|
||||||
|
BuildRequires: libprelude-devel
|
||||||
|
BuildRequires: systemd
|
||||||
|
%{?systemd_requires}
|
||||||
|
|
||||||
|
%description
|
||||||
|
Prelude-LML is a log analyser that allows Prelude to collect and
|
||||||
|
analyze information from all kind of applications emitting logs or
|
||||||
|
syslog messages in order to detect suspicious activities and transform
|
||||||
|
them into Prelude-IDMEF alerts. Prelude-LML handles events generated
|
||||||
|
by a large set of applications
|
||||||
|
|
||||||
|
%package -n prelude-lml-devel
|
||||||
|
Summary: Header files and libraries for prelude-lml development
|
||||||
|
Group: Development/Libraries
|
||||||
|
Requires: libprelude-devel, prelude-lml = %{version}-%{release}
|
||||||
|
|
||||||
|
|
||||||
|
%description -n prelude-lml-devel
|
||||||
|
Libraries, include files, etc you can use to develop custom
|
||||||
|
Prelude LML plugins.
|
||||||
|
|
||||||
|
%package selinux
|
||||||
|
Summary: SELinux policy for prelude-lml
|
||||||
|
Provides: selinux-policy-base
|
||||||
|
Group: System Environment/Base
|
||||||
|
BuildRequires: checkpolicy
|
||||||
|
BuildRequires: policycoreutils >= %{POLICYCOREUTILSVER}
|
||||||
|
BuildRequires: bzip2
|
||||||
|
BuildRequires: selinux-policy-devel
|
||||||
|
BuildRequires: selinux-policy
|
||||||
|
Requires(pre): policycoreutils >= %{POLICYCOREUTILSVER}
|
||||||
|
Requires(pre): coreutils
|
||||||
|
Requires(pre): selinux-policy-targeted >= %{SELINUXTARGETEDVER}
|
||||||
|
Requires: selinux-policy-targeted >= %{SELINUXTARGETEDVER}
|
||||||
|
Requires: prelude-lml = %{version}-%{release}
|
||||||
|
Requires(post): policycoreutils >= %{POLICYCOREUTILSVER}
|
||||||
|
Requires(postun): policycoreutils >= %{POLICYCOREUTILSVER}
|
||||||
|
BuildArch: noarch
|
||||||
|
|
||||||
|
%description selinux
|
||||||
|
Prelude-LML is a log analyser that allows Prelude to collect and
|
||||||
|
analyze information from all kind of applications emitting logs or
|
||||||
|
syslog messages in order to detect suspicious activities and transform
|
||||||
|
them into Prelude-IDMEF alerts. Prelude-LML handles events generated
|
||||||
|
by a large set of applications
|
||||||
|
|
||||||
|
%prep
|
||||||
|
%setup -q
|
||||||
|
|
||||||
|
%build
|
||||||
|
%configure
|
||||||
|
make %{?_smp_mflags}
|
||||||
|
|
||||||
|
cd $RPM_BUILD_DIR/%{name}-%{version}/selinux/
|
||||||
|
make
|
||||||
|
|
||||||
|
%install
|
||||||
|
mkdir -p %{buildroot}/%{_sysconfdir}/%{name}/ruleset/
|
||||||
|
mkdir -p %{buildroot}/%{_sbindir}
|
||||||
|
mkdir -p %{buildroot}/%{_datadir}/selinux/targeted/
|
||||||
|
make install DESTDIR=%{buildroot} INSTALL="%{__install} -c -p"
|
||||||
|
install -m 644 $RPM_BUILD_DIR/%{name}-%{version}/selinux/%{name}.pp.bz2 \
|
||||||
|
%{buildroot}/%{_datadir}/selinux/targeted/
|
||||||
|
rm -f %{buildroot}/%{_libdir}/%{name}/debug.la
|
||||||
|
rm -f %{buildroot}/%{_libdir}/%{name}/pcre.la
|
||||||
|
install -d -m 0755 %{buildroot}/%{_tmpfilesdir}
|
||||||
|
install -m 0644 %{SOURCE2} %{buildroot}/%{_tmpfilesdir}/%{name}.conf
|
||||||
|
mkdir -p %{buildroot}/%{_localstatedir}/spool/prelude/%{name}/
|
||||||
|
ln -s /usr/sbin/service %{buildroot}%{_sbindir}/rc%{name}
|
||||||
|
rm -rf %{buildroot}/%{_localstatedir}/run/%{name}
|
||||||
|
install -D -m 444 %{SOURCE1} %{buildroot}%{_unitdir}/%{name}.service
|
||||||
|
|
||||||
|
%pre
|
||||||
|
%service_add_pre %{name}.service
|
||||||
|
|
||||||
|
%post
|
||||||
|
/sbin/ldconfig
|
||||||
|
/usr/bin/systemd-tmpfiles --create %{_tmpfilesdir}/%{name}.conf
|
||||||
|
%service_add_post %{name}.service
|
||||||
|
|
||||||
|
%post selinux
|
||||||
|
if [ $1 -eq 1 ]; then
|
||||||
|
/usr/sbin/semodule -s targeted -i %{_datadir}/selinux/targeted/%{name}.pp.bz2
|
||||||
|
/sbin/restorecon -R /dev/shm/ || :
|
||||||
|
else
|
||||||
|
/usr/sbin/semodule -n -s targeted -r prelude-lml 2>/dev/null || :
|
||||||
|
/usr/sbin/semodule -s targeted -i %{_datadir}/selinux/targeted/%{name}.pp.bz2
|
||||||
|
fi
|
||||||
|
|
||||||
|
%preun
|
||||||
|
%service_del_preun %{name}.service
|
||||||
|
|
||||||
|
%postun
|
||||||
|
/sbin/ldconfig
|
||||||
|
%service_del_postun %{name}.service
|
||||||
|
|
||||||
|
%postun selinux
|
||||||
|
semodule -n -s targeted -r prelude-lml 2>/dev/null || :
|
||||||
|
/sbin/restorecon -R /dev/shm/ || :
|
||||||
|
|
||||||
|
%files
|
||||||
|
%defattr(-,root,root,-)
|
||||||
|
%doc COPYING NEWS HACKING.README README
|
||||||
|
%attr(0770,-,-) %dir %{_sysconfdir}/%{name}/
|
||||||
|
%config(noreplace) %attr(0640,-,-) %{_sysconfdir}/%{name}/plugins.rules
|
||||||
|
%config(noreplace) %attr(0640,-,-) %{_sysconfdir}/%{name}/prelude-lml.conf
|
||||||
|
%attr(0770,-,-) %dir %{_sysconfdir}/%{name}/ruleset/
|
||||||
|
%{_bindir}/prelude-lml
|
||||||
|
%dir %{_libdir}/%{name}/
|
||||||
|
%{_libdir}/%{name}/debug.so
|
||||||
|
%{_libdir}/%{name}/pcre.so
|
||||||
|
%{_sbindir}/rc%{name}
|
||||||
|
%dir %{_tmpfilesdir}
|
||||||
|
%{_tmpfilesdir}/%{name}.conf
|
||||||
|
%attr(0750,-,-) %dir %{_localstatedir}/spool/prelude/%{name}
|
||||||
|
%{_unitdir}/%{name}.service
|
||||||
|
|
||||||
|
%files devel
|
||||||
|
%defattr(-,root,root,-)
|
||||||
|
%dir %{_includedir}/%{name}/
|
||||||
|
%{_includedir}/%{name}/prelude-lml.h
|
||||||
|
|
||||||
|
%files selinux
|
||||||
|
%{_datadir}/selinux/targeted/%{name}.pp.bz2
|
||||||
|
|
||||||
|
%changelog
|
Loading…
x
Reference in New Issue
Block a user