FUSE LoggedFS .spec
Posted 06-13-2010 at 06:50 AM by unSpawn
LoggedFS is a fuse-based filesystem which can log every operations that happens in it. See example output in the auditd missing syscalls? thread.
Code:
%define debug_packages %{nil} %define debug_package %{nil} %define name loggedfs %define ver 0.5 %define rel 1 %define _prefix /usr/local %define _sysconfdir /usr/local/etc %define _docdir /usr/local/share/doc %define _mandir /usr/local/share/man %define _bindir /usr/local/bin Name: %{name} Summary: %{name}, log operations happening in the filesystem. Version: %{ver} Release: %{rel} License: GPL Group: Utilities/System Source0: %{name}-%{ver}.tar.bz2 Prereq: libxml2 >= 2.6.26, fuse >= 2.7.4, rlog >= 1.3.7, pcre >= 6.6 BuildRequires: libxml2-devel >= 2.6.26, fuse-devel >= 2.7.4, rlog-devel >= 1.3.7, pcre-devel >= 6.6 Provides: %{name} URL: http://loggedfs.sourceforge.net/ BuildRoot: %{_tmppath}/%{name}-%{version} Prefix: /usr/local %description LoggedFS is a transparent fuse-filesystem which allows to log every operations that happens in the backend filesystem. Logs can be written to syslog, to a file, or to the standard output. LoggedFS comes with a XML configuration file in which you can choose exactly what you want to log and what you don’t want to log. You can add filters on users, operations (open, read, write, chown, chmod, etc.), filenames , and return code. Filename’s filters are regular expressions. %setup -q %build echo true > $RPM_BUILD_DIR/configure chmod 0750 $RPM_BUILD_DIR/configure #%configure make %install if [ "$RPM_BUILD_ROOT" = "%{_tmppath}/%{name}-%{version}" ]; then rm -rf $RPM_BUILD_ROOT install -d $RPM_BUILD_ROOT/%{_prefix} install -d $RPM_BUILD_ROOT/%{_sysconfdir} install -d $RPM_BUILD_ROOT/%{_docdir}/%{name}-%{ver} install -d $RPM_BUILD_ROOT/%{_mandir}/man1 install -d $RPM_BUILD_ROOT/%{_bindir} # Bad developer! Bad! install -m 0750 $RPM_BUILD_DIR/%{name} $RPM_BUILD_ROOT/%{_bindir}/%{name} install -m 0644 $RPM_BUILD_DIR/%{name}.1.gz $RPM_BUILD_ROOT/%{_mandir}/man1/%{name}.1.gz install -m 0640 $RPM_BUILD_DIR/%{name}.xml $RPM_BUILD_ROOT/%{_sysconfdir} install -m 0644 $RPM_BUILD_DIR/LICENSE $RPM_BUILD_ROOT/%{_docdir}/%{name}-%{ver}/LICENSE else echo "Invalid Build root "${RPM_BUILD_ROOT}"." exit 1 fi # Pre-%files stage inventory find $RPM_BUILD_ROOT -not -type d -printf "%%%attr(%%m,root,root) %%p\n" | sed -e "s|$RPM_BUILD_ROOT||g" > %{_tmppath}/%{name}_contents.txt %clean if [ "$RPM_BUILD_ROOT" = "%{_tmppath}/%{name}-%{version}" ]; then rm -rf $RPM_BUILD_ROOT else echo "Invalid Build root "${RPM_BUILD_ROOT}"." exit 1 fi %files -f %{_tmppath}/%{name}_contents.txt %doc LICENSE %changelog * Sun Jun 13 2010 %{packager} - %{ver}-%{rel} - Init package.