File dazuko.spec of Package dazuko

# spec file for package dazuko (Version 2.3.6)
# Copyright (c) 2009 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

# norootforbuild
# nodebuginfo


Name:           dazuko
License:        BSD 3-Clause; GPL v2 or later; LGPL v2.1 or later
Group:          System/Kernel
Version:        2.3.6
Release:        1.<RELEASE49>
%define dazuko_version 2.3.6-pre2
%define redirfs_version 0.3
Summary:        On-access Virus Scanning Kernel Interface
Source0:        dazuko-%{version}.bz2
Source1:        dazuko.sysconfig
Source2:        dazuko.init-script
Patch0:         dazuko_redirfs_2.6.27.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
ExclusiveArch:  %ix86 x86_64
#Obsoletes:    km_antivir km_dazuko
Requires:       dazuko-kmp
BuildRequires:  kernel-source kernel-syms module-init-tools
%suse_kernel_module_package kdump um

The dazuko package contains the boot script for loading/unloading the
dazuko on-access virus scanning kernel interface module provided by the
dazuko-KMP kernel module packages.

    John Ogness
    Martin Ritter

%package KMP
License:        BSD 3-Clause; GPL v2 or later
Summary:        On-access Virus Scanning Kernel Interface
Group:          System/Kernel

%description KMP
The dazuko-KMP package contains the dazuko on-access virus scanning
kernel interface module and the redirfs kernel interface module.

    John Ogness
    Martin Ritter

tar xvzf dazuko-%{dazuko_version}.tar.gz
mv dazuko-%{dazuko_version} dazuko
tar xvzf redirfs-%{redirfs_version}.tar.gz
mv redirfs-%{redirfs_version} redirfs
pushd dazuko
%patch -p1
set -- *
mkdir source
mv "$@" source/
mkdir obj

export EXTRA_CFLAGS='-DVERSION=\"%version\"'
for flavor in %flavors_to_build; do
	rm -rf obj/$flavor
	cp -r source obj/$flavor
	pushd obj/$flavor/dazuko
	case $flavor in
		*debug*) DEBUG_FLAGS="--enable-debug" ;;
	CONFIGURE_FLAGS="--enable-redirfs --redirfsdir=`pwd`/../redirfs"
	./configure \
		--kernelsrcdir=${KERNEL_SRC} \
		--kernelobjdir=${KERNEL_OBJ} \
	make -C ${KERNEL_OBJ} modules M=$PWD/obj/$flavor

rm -rf %buildroot
export INSTALL_MOD_DIR=updates
for flavor in %flavors_to_build; do
	make -C /usr/src/linux-obj/%_target_cpu/$flavor \
		modules_install M=$PWD/obj/$flavor
install -m755 -d $RPM_BUILD_ROOT/etc/init.d
install -m755 -d $RPM_BUILD_ROOT/var/adm/fillup-templates
install -m754    $RPM_SOURCE_DIR/dazuko.init-script \
install -m644    $RPM_SOURCE_DIR/dazuko.sysconfig \

%{fillup_and_insserv -i -n dazuko}

%if %suse_version > 820
%{stop_on_removal boot.dazuko}

#%if %suse_version > 820
#%{restart_on_update boot.dazuko}


* Wed Sep 10 2008
- Updated redirfs-0.3-pre4 to redirfs-0.3
- Replaced 2.6.27 dazuko patch with proposed dazuko_redirfs_2.6.27
  patch from
* Mon Aug 25 2008
- Patches to address 2.6.27 device and inode API changes
* Wed Aug 20 2008
- Patch to use linux/semaphore.h instead of asm/semaphore.h
* Thu Aug 14 2008
- Update to dazuko-2.3.6-pre2 and redirfs-0.3-pre4
* Wed Aug 13 2008
- Add stop directives to init script
* Tue Jul 29 2008
- Restructure to build both dazuko and redirfs from toplevel
  Kbuild file
* Thu Jul 24 2008
- Update to redirfs 0.3-pre3
* Mon Jul 21 2008
- Preliminary update to dazuko 2.3.6-pre1 and redirfs 0.3-pre2
  in order to build on 2.6.26.
* Wed Mar 12 2008
- hack to build on 2.6.25-rc5
* Tue Jan 15 2008
- Updated to dazuko cvs head 2008011501 using redirfs instead of
  the LSM kernel interface, because 2.6.24rc kernel versions do
  not support LSM kernel modules any more (bug #352003).
- The redirfs modules are shipped inside of dazuko kmp packages
  at the moment.
* Fri Oct 19 2007
- update to 2.3.4
  - remove error checking for device unregistration (Linux 2.6+syscall/RSBAC)
  - added "--procs-per-group" option for maximum allowed registered processes
  - use -fPIC when compiling DazukoIO library
  - check if a dazuko module already exists when running "make install"
  - update perl binding (fix for 64-bit systems)
  - add support for Linux 2.6.21 (SUSE) LSM API
  - added support for Linux 2.6.23-rc4 LSM API (patch #13828)
  - added "--sct-nocheck" option to disable syscall table checks
  - removed __d_path(), root, rootmnt dependencies for Linux 2.6 (LSM)
  - added support for Linux 2.6.23-rc3 LSM API (patch #13661)
  - minor code readability improvements (patch #13783)
* Wed Apr 04 2007
- Adopted for new LSM prototypes in kernel 2.6.21_rc5_git8_2.
  New patch file: dazuko-2.3.3.dif
- Added module-init-tools to build requires.
* Fri Mar 23 2007
- Updated to dazuko-2.3.3(.4) final, including 2.6.21 LSM patch.
  Obsolete patch file: dazuko-2.3.3-pre3_linux-2.6.21.dif
* Wed Mar 21 2007
- Updated to dazuko-2.3.3-pre3 including support for linux-2.6.20
  LSM obsoleting dazuko-2.3.2-linux-2.6.19plus.dif patch file
  as well as several other fixes and improvements, e.g.:
  * include new Lua binding
  * resolved namespace issue with "struct path"
  * add official support for suspend2 on Linux 2.6
  * cleanup thread handling for TAF on Linux 2.6
  * fix DazukoIO X/Y-bit compatibility for trusted processes
  * remove unnecessary global variables from DazukoIO
  * restructured DazukoIO protocol fallback code
- Adopted to LSM interface (getprocattr) for linux-2.6.21 LSM
  New patch file: dazuko-2.3.3-pre3_linux-2.6.21.dif
* Mon Jan 15 2007
- Merged changes from dazuko cvs to compile with Linux >= 2.6.19
  New patch file: dazuko-2.3.2-linux-2.6.19plus.dif
* Fri Dec 01 2006
- Updated to dazuko-2.3.2, providing following fixes [Bug #224985]:
  * name-cache leak for Linux 2.2, 2.4, and 2.6+syscall (patch #5552)
  * memory leak when removing trusted applications (patch #5552)
  * Linux 2.6 LSM stacking as a secondary module (obsoletes our
  dazuko-second_register.diff patch)
  * overly conservative snprintf() calls
* Thu Nov 16 2006
- Renamed package from hbedv-dazuko(-KMP) to dazuko(-KMP).
* Wed Nov 08 2006
- Improved LSB required-start tag in boot.dazuko init script.
* Mon Nov 06 2006
- Updated to dazuko-2.3.1 making our configure patch obsolete.
- Added dazuko-second_register.diff patch fixing init of the
  inode permission hook while registering as secondary LSM.
- Added boot.dazuko init script loading the dazuko module.
* Tue Aug 29 2006
- Updated to dazuko-2.3.1pre2 supporting sys_call hooking on
  linux26, required to work togeter with apparmor (unused).
* Mon Apr 10 2006
- added nodebuginfo tag to specfile
* Tue Feb 07 2006
- Added patch adding invoking of the inode permission lsm hook
  of a secondary module. See Bug #65751.
* Mon Jan 23 2006
- Initial package replacing km_dazuko.