## $id: ip-sentinel.spec.in,v 1.3 2003/05/26 21:53:02 ensc Exp $ --*- rpm-spec -*-- # Copyright (C) 2004,2005 Enrico Scholz # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; version 2 of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ## This package understands the following switches: ## --without dietlibc ... disable usage of dietlibc ## --without fedora ... disable fedora specific parts ## --with minit ... disable creation of 'minit' subpackage ## --define username\ name ... set the name of the user running the daemon ## Fedora Extras specific customization below... %bcond_without fedora %bcond_without dietlibc %bcond_with minit ## %{!?username:%global username ip-sentinel} %global service ip-sentinel %global homedir %_var/lib/ip-sentinel %global minitdir %_sysconfdir/minit %global minitsvcdir %minitdir/services/%name %{!?release_func:%global release_func() %1%{?dist}} Summary: Tool to prevent unauthorized usage of IP addresses Name: ip-sentinel Version: 0.12 Release: %release_func 9 License: GPL Group: System Environment/Daemons URL: http://www.nongnu.org/ip-sentinel/ Source0: http://savannah.nongnu.org/download/ip-sentinel/%name-%version.tar.bz2 Source1: http://savannah.nongnu.org/download/ip-sentinel/%name-%version.tar.bz2.sig Patch0: ip-sentinel-0.12-pidfile.patch BuildRoot: %_tmppath/%name-%version-%release-buildroot Requires: init(ip-sentinel) Provides: user(%username) Provides: group(%username) BuildRequires: which BuildRequires: fedora-usermgmt-devel %{?FE_USERADD_REQ} %{?with_dietlibc:BuildRequires: dietlibc} # dietlibc is not available for PPC anymore # https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=182118 # https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=182123 ExcludeArch: ppc %package sysv Summary: SysV initscripts for ip-sentinel Group: System Environment/Base Provides: init(ip-sentinel) Requires(preun): %name = %version-%release Requires(postun): %name = %version-%release Requires(preun): initscripts Requires(postun): initscripts Requires(post): /sbin/chkconfig Requires(preun): /sbin/chkconfig %package minit Summary: minit initscripts for ip-sentinel Group: System Environment/Base Provides: init(ip-sentinel) Requires: %name = %version-%release Requires(pre): minit-setup Requires(postun): minit-setup %description IP Sentinel is a tool that tries to prevent unauthorized usage of IP addresses within an ethernet broadcast domain by answering ARP requests. After receiving faked replies, requesting parties store the MAC in their ARP tables and will send future packets to this invalid MAC, rendering the IP unreachable. %description sysv IP Sentinel is a tool that tries to prevent unauthorized usage of IP addresses. This package provides the scripts which can be used to start ip-sentinel with a SysV initconcept. %description minit IP Sentinel is a tool that tries to prevent unauthorized usage of IP addresses. This package provides the scripts which can be used to start ip-sentinel with the minit initconcept. %prep %setup -q %patch0 -p0 -b .pidfile %build %configure --enable-release \ --with-initrddir=%_initrddir \ --with-username=%username \ %{!?with_dietlibc:--disable}%{?with_dietlibc:--enable}-dietlibc %__make %{?_smp_mflags} all %install rm -rf $RPM_BUILD_ROOT %__make DESTDIR=$RPM_BUILD_ROOT install install-contrib %__install -m750 -d $RPM_BUILD_ROOT%homedir %{!?with_minit:rm -rf $RPM_BUILD_ROOT%minitsvcdir} %check %__make check %clean rm -rf $RPM_BUILD_ROOT %pre %__fe_groupadd 1 -r %username &>/dev/null || : %__fe_useradd 1 -r -s /sbin/nologin -M -d %homedir \ -c 'IP sentinel user' -g %username %username &>/dev/null || : %postun %__fe_userdel %username &>/dev/null || : %__fe_groupdel %username &>/dev/null || : %post sysv /sbin/chkconfig --add %service %preun sysv if test "$1" = "0"; then %_initrddir/%service stop >/dev/null /sbin/chkconfig --del %service fi %postun sysv test "$1" = 0 || %_initrddir/%service condrestart &>/dev/null %files %defattr(-,root,root,-) %doc AUTHORS COPYING ChangeLog NEWS README THANKS %_mandir/*/* %_sbindir/* %attr(-,root,%username) %homedir %files sysv %defattr(-,root,root,-) %config %_initrddir/* %config(noreplace) %_sysconfdir/sysconfig/* %if 0%{?with_minit:1} %files minit %defattr(-,root,root,-) %dir %minitsvcdir %minitsvcdir/run %minitsvcdir/respawn %config(noreplace) %minitsvcdir/params %endif %changelog * Thu Oct 05 2006 Christian Iseli 0.12-9 - rebuilt for unwind info generation, broken in gcc-4.1.1-21 * Mon Sep 18 2006 Enrico Scholz - 0.12-8 - rebuilt * Sun Jul 9 2006 Enrico Scholz - 0.12-7 - rebuilt with dietlibc-0.30 - use new fedora-usermgmt code - use %%bcond_* macros * Mon Feb 20 2006 Enrico Scholz - 0.12-6 - exclude PPC arch because dietlibc is not available there anymore * Fri Jul 8 2005 Enrico Scholz - 0.12-5 - fixed named of pidfile (reported by Razvan Sandu) * Wed Jun 8 2005 Enrico Scholz - 0.12-4 - rebuilt * Wed Jun 8 2005 Enrico Scholz - 0.12-3 - added 'BuildRequires: which' - do not use dietlibc on non-i386 archs running FC3 * Thu May 19 2005 Enrico Scholz - 0.12-2 - use %%dist instead of %%disttag * Wed Mar 30 2005 Enrico Scholz - 0.12-1 - updated to 0.12 * Thu Aug 19 2004 Enrico Scholz - 0:0.10.2-0 - added support for 'fedora-usermgmt' (enabled with '--with fedora' switch) * Thu Jun 17 2004 Enrico Scholz - 0:0.10.1-0 - conditionalized building of -minit subpackage * Wed Jun 16 2004 Enrico Scholz - 0:0.9.2-0 - updated minit filelist - moved /etc/sysconfig/* files into -sysv subpackage; they are not used for 'minit' anymore * Sat Mar 20 2004 Enrico Scholz - 0:0.9-0 - workaround https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=118773 * Thu Dec 4 2003 Enrico Scholz - 0:0.8-0 - use 'install-contrib' * Tue Sep 9 2003 Enrico Scholz 0:0.7-1 - removed more unneeded curlies * Tue Aug 5 2003 Enrico Scholz 0:0.6-1 - version 0.6 - added minit support - removed unneeded curlies * Thu Jul 17 2003 Enrico Scholz 0:0.5-2 - removed %%doc attribute from %%mandir-entries * Thu Jul 10 2003 Enrico Scholz 0:0.5-1 - moved 'make check' into the %%check section * Sat May 24 2003 Enrico Scholz 0:0.4-1 - removed dependencies on /sbin/service - removed packager tag - create and remove group explicitely * Wed May 21 2003 Enrico Scholz 0:0.3-1 - applied fedora.us naming scheme - cleanups * Fri Nov 15 2002 Enrico Scholz 0.1-1 - initial build