Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/CISOfy/lynis.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormboelen <michael@cisofy.com>2014-10-02 17:15:19 +0400
committermboelen <michael@cisofy.com>2014-10-02 17:15:19 +0400
commit231582ac534f4608fbf3cd5056adcd65be547bb9 (patch)
treea4f59a6d192e27f9504f7f416ae7e8b645412272 /extras/lynis.spec
parent52fe3b68ba8ca369ac9fc121c5f8746fa3983304 (diff)
Added systemd service script and timer (as replacement for cronjob)
Diffstat (limited to 'extras/lynis.spec')
-rw-r--r--extras/lynis.spec135
1 files changed, 135 insertions, 0 deletions
diff --git a/extras/lynis.spec b/extras/lynis.spec
new file mode 100644
index 00000000..997a386f
--- /dev/null
+++ b/extras/lynis.spec
@@ -0,0 +1,135 @@
+#################################################################################
+#
+# Lynis spec file
+# -----------------
+#
+# Usage:
+# - Adjust version number (Version:)
+# - Check if you have the directories in your home directory (or adjust topdir)
+# - rpmbuild -ba lynis.spec
+#
+# If RPM building fails, check the required tools to build packages.
+#
+#################################################################################
+#
+# (c) 2014 Michael Boelen
+#
+# Website: http://cisofy.com/
+#
+#################################################################################
+
+# Build in home directory of the user
+%define _topdir %{getenv:HOME}/lynis-build/rpmbuild
+%define _includedir /usr/share/lynis/include
+%define _pluginsdir /usr/share/lynis/plugins
+%define _dbdir /usr/share/lynis/db
+%define _bindir /usr/bin
+
+Summary: Security and system auditing tool.
+Name: lynis
+Version: 1.6.2
+Release: 1
+License: GPL
+Group: Applications/System
+Source: lynis-%{version}.tar.gz
+BuildRoot: /tmp/lynis-root
+URL: http://cisofy.com/
+Vendor: CISOfy / Michael Boelen
+Packager: Michael Boelen <michael@rootkit.nl>
+BuildArch: noarch
+
+%description
+Lynis is a security tool to audit and harden Unix/Linux based systems. It scans a
+system and provides the user with suggestion and warnings regarding taken security
+measures. Examples include:
+ - Security enhancements
+ - Logging and auditing options
+ - Banner identification
+ - Software availability
+ - Missing security patches
+
+Lynis is released as a GPLv3 licensed project and free for everyone to use.
+
+See http://cisofy.com for a full description and documentation.
+
+%prep
+[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf "$RPM_BUILD_ROOT"
+mkdir $RPM_BUILD_ROOT
+
+# Make directory with our name, instead of with version
+%setup -n lynis
+#%setup
+
+#%patch
+
+%build
+
+%install
+# Install profile
+install -d ${RPM_BUILD_ROOT}/etc/lynis
+install default.prf ${RPM_BUILD_ROOT}/etc/lynis
+# Install binary
+install -d ${RPM_BUILD_ROOT}/%{_bindir}
+install lynis ${RPM_BUILD_ROOT}/%{_bindir}
+# Install man page
+install -d ${RPM_BUILD_ROOT}/%{_mandir}/man8
+install lynis.8 ${RPM_BUILD_ROOT}/%{_mandir}/man8
+# Install functions/includes
+install -d ${RPM_BUILD_ROOT}%{_includedir}
+install include/* ${RPM_BUILD_ROOT}%{_includedir}
+# Install plugins
+install -d ${RPM_BUILD_ROOT}%{_pluginsdir}
+install plugins/* ${RPM_BUILD_ROOT}%{_pluginsdir}
+# Install database files
+install -d ${RPM_BUILD_ROOT}%{_dbdir}
+install db/* ${RPM_BUILD_ROOT}%{_dbdir}
+
+
+# Patch default paths (not required for 1.1.2+)
+#sed -i -e 's#INCLUDEDIR="include"#INCLUDEDIR="%{_includedir}"#g' ${RPM_BUILD_ROOT}/usr/bin/lynis
+#sed -i -e 's#PROFILE="default.prf"#PROFILE="/etc/lynis/default.prf"#g' ${RPM_BUILD_ROOT}/usr/bin/lynis
+
+%clean
+[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf "$RPM_BUILD_ROOT"
+
+%files
+%defattr(644,root,root,755)
+# Binaries
+%attr(755, root, root) %{_bindir}/lynis
+# Man page and docs
+%doc CHANGELOG FAQ LICENSE README
+%doc %{_mandir}/man8/lynis.8.gz
+# Default profile
+/etc/lynis/default.prf
+# Databases, functions, plugins
+%{_dbdir}/*
+%{_includedir}/*
+%{_pluginsdir}/*
+#%attr(644, root, root) %{_dbdir}/*
+#%attr(644, root, root) %{_includedir}/*
+#%attr(644, root, root) %{_plugindir}
+#%attr(644, root, root) %{_plugindir}/*
+
+%changelog
+* Sun Sep 14 2014 Michael Boelen - 1.1.8-1
+- Changed permissions with regards of pentest option
+
+* Tue Dec 10 2013 Michael Boelen - 1.1.7-1
+- Adjusted website and referenced in documentation
+
+* Wed Dec 04 2013 Michael Boelen - 1.1.6-1
+- Adjusted version number, removed TODO file and adjusted permissions
+
+* Mon Jun 16 2008 Michael Boelen - 1.1.5-1
+- Fixed database dir variable and setup section
+
+* Sat May 31 2008 Michael Boelen - 1.1.4-1
+- Added _dbdir
+
+* Sun May 11 2008 Michael Boelen - 1.1.2-1
+- Added _pluginsdir, disabled patches
+
+* Sat Mar 08 2008 Michael Boelen - 1.0.8-1
+- initial .spec file
+
+# The End