/[smeserver]/rpms/rkhunter/sme7/rkhunter.spec
ViewVC logotype

Diff of /rpms/rkhunter/sme7/rkhunter.spec

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

Revision 1.1 by slords, Tue Jun 12 17:18:18 2007 UTC Revision 1.12 by slords, Wed Apr 9 13:51:56 2008 UTC
# Line 1  Line 1 
1    # $Id$
2    
3    # No debuginfo:
4    %define debug_package %{nil}
5    
6    # If you want to debug, uncomment the next line and remove
7    # the duplicate percent sign (due to macro expansion)
8    #%%dump
9    
10    %define name rkhunter
11    %define ver 1.3.2
12    %define rel 2
13    %define epoch 0
14    
15    # Don't change this define or also:
16    # 1. installer.sh --layout custom /temporary/dir/usr --striproot /temporary/dir --install
17    # 2. rewrite the files section below.
18    %define _prefix /usr
19    
20  # We can't let RPM do the dependencies automatic because it'll then pick up  # We can't let RPM do the dependencies automatic because it'll then pick up
21  # a correct but undesirable perl dependency, which rkhunter does not require  # a correct but undesirable perl dependency, which rkhunter does not require
22  # in order to function properly.  # in order to function properly.
23  AutoReqProv: no  AutoReqProv: no
24    
25  Summary:        Rootkit scans for rootkits, backdoors and local exploits.  Name: %{name}
26  Name:           rkhunter  Summary: %{name} scans for rootkits, backdoors and local exploits
27  Version:        1.2.9  Version: %{ver}
28  Release:        3%{?dist}  Release: %{rel}%{dist}
29  Epoch:          0  Epoch: %{epoch}
30  License:        GPL  License: GPL
31  Group:          Applications/System  Group: Applications/System
32  URL:            http://rkhunter.sourceforge.net/  Source0: %{name}-%{version}.tar.gz
33  Source0:        %{name}-%{version}.tar.gz  Patch0: rkhunter-installer.patch
34  Patch0:         rkhunter-sme7.patch  Patch1: rkhunter-nolib.patch
35  BuildArch:      noarch  BuildArch: noarch
36  Requires:       /bin/sh, /bin/ps, /bin/ls, /bin/cat, /bin/egrep, /usr/bin/strings  Requires: filesystem, bash, grep, findutils, net-tools, coreutils, e2fsprogs, modutils, procps, binutils, wget, perl
37  BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)  Provides: %{name}
38    URL: http://rkhunter.sourceforge.net/
39    BuildRoot: %{_tmppath}/%{name}-%{version}
40    
41  %description  %description
42  Rootkit scanner is scanning tool to ensure you for about 99.9%% you're  Rootkit Hunter is a scanning tool to ensure you are about 99.9%%
43  clean of nasty tools. This tool scans for rootkits, backdoors and local  clean of nasty tools. It scans for rootkits, backdoors and local
44  exploits by running tests like:  exploits by running tests like:
45          - MD5 hash compare          - File hash check
46          - Look for default files used by rootkits          - Look for default files used by rootkits
47          - Wrong file permissions for binaries          - Wrong file permissions for binaries
48          - Look for suspected strings in LKM and KLD modules          - Look for suspected strings in LKM and KLD modules
# Line 34  Rootkit Hunter is released as a GPL lice Line 55  Rootkit Hunter is released as a GPL lice
55    
56    
57  %prep  %prep
58  %setup  %setup -q
59  %patch -p1  %patch0 -p1
60    %patch1 -p1
61    
62  %build  %build
 #%%configure ...  
 # We have nothing to configure... yet...  
63    
64  %install  %install
65  # Well... This could be a bit smaller if the install  MANPATH=""
66  # script was able to handle DSTDIR for example...  export MANPATH
67    
68  # (cjo) remove old version of build root, if it exists  sh ./installer.sh --layout RPM --install
 %{__rm} -rf ${RPM_BUILD_ROOT}  
69    
70  %{__mkdir} -p ${RPM_BUILD_ROOT}%{_bindir}  sed -i 's_#ALLOWPROCLISTEN=/sbin/dhclient_ALLOWPROCLISTEN=/sbin/dhclient_' ${RPM_BUILD_ROOT}%{_sysconfdir}/%{name}.conf
71  %{__mkdir} -p ${RPM_BUILD_ROOT}%{_sysconfdir}  sed -i 's_#ALLOWPROCLISTEN=/usr/sbin/pppoe_ALLOWPROCLISTEN=/sbin/pppoe_' ${RPM_BUILD_ROOT}%{_sysconfdir}/%{name}.conf
72  %{__mkdir} -p ${RPM_BUILD_ROOT}%{_libdir}  sed -i 's_#ALLOWHIDDENFILE=/usr/share/man/man1/..1.gz_ALLOWHIDDENFILE=/usr/share/man/man1/..1.gz_' ${RPM_BUILD_ROOT}%{_sysconfdir}/%{name}.conf
73  %{__mkdir} -p ${RPM_BUILD_ROOT}%{_libdir}/rkhunter/scripts  sed -i '/#ALLOWPROCLISTEN=\/usr\/bin\/dhcpcd/iALLOWPROCLISTEN=\/usr\/sbin\/dhcpd' ${RPM_BUILD_ROOT}%{_sysconfdir}/%{name}.conf
74  %{__mkdir} -p ${RPM_BUILD_ROOT}%{_docdir}/rkhunter-%{version}  sed -i '/#ALLOWPROCDELFILE=\/usr\/sbin\/mysqld/aALLOWPROCDELFILE=\/usr\/sbin\/httpd' ${RPM_BUILD_ROOT}%{_sysconfdir}/%{name}.conf
75  %{__mkdir} -p ${RPM_BUILD_ROOT}%{_mandir}/man8  sed -i '/ALLOWPROCDELFILE=\/usr\/sbin\/httpd/aALLOWPROCDELFILE=\/usr\/sbin\/asterisk' ${RPM_BUILD_ROOT}%{_sysconfdir}/%{name}.conf
76  %{__mkdir} -p ${RPM_BUILD_ROOT}%{_var}/rkhunter/{db,tmp}  sed -i '/ALLOWPROCDELFILE=\/usr\/sbin\/httpd/aALLOWPROCDELFILE=\/usr\/bin\/freshclam' ${RPM_BUILD_ROOT}%{_sysconfdir}/%{name}.conf
 %{__chmod} ug+rwx,o-rwx ${RPM_BUILD_ROOT}%{_var}/rkhunter/tmp  
   
 %{__install} -m750 -p files/rkhunter            ${RPM_BUILD_ROOT}%{_bindir}/  
   
 %{__install} -m640 -p files/backdoorports.dat   ${RPM_BUILD_ROOT}%{_var}/rkhunter/db/  
 %{__install} -m640 -p files/defaulthashes.dat   ${RPM_BUILD_ROOT}%{_var}/rkhunter/db/  
 %{__install} -m640 -p files/mirrors.dat         ${RPM_BUILD_ROOT}%{_var}/rkhunter/db/  
 %{__install} -m640 -p files/os.dat              ${RPM_BUILD_ROOT}%{_var}/rkhunter/db/  
 %{__install} -m640 -p files/md5blacklist.dat    ${RPM_BUILD_ROOT}%{_var}/rkhunter/db/  
 %{__install} -m640 -p files/programs_bad.dat    ${RPM_BUILD_ROOT}%{_var}/rkhunter/db/  
 %{__install} -m640 -p files/programs_good.dat   ${RPM_BUILD_ROOT}%{_var}/rkhunter/db/  
   
 %{__install} -m644 -p files/CHANGELOG           ${RPM_BUILD_ROOT}%{_docdir}/rkhunter-%{version}/  
 %{__install} -m644 -p files/LICENSE             ${RPM_BUILD_ROOT}%{_docdir}/rkhunter-%{version}/  
 %{__install} -m644 -p files/README              ${RPM_BUILD_ROOT}%{_docdir}/rkhunter-%{version}/  
 %{__install} -m644 -p files/WISHLIST            ${RPM_BUILD_ROOT}%{_docdir}/rkhunter-%{version}/  
 %{__install} -m644 -p files/development/*.8     ${RPM_BUILD_ROOT}%{_mandir}/man8/  
   
 %{__install} -m750 -p files/check_modules.pl    ${RPM_BUILD_ROOT}%{_libdir}/rkhunter/scripts/  
 %{__install} -m750 -p files/check_port.pl       ${RPM_BUILD_ROOT}%{_libdir}/rkhunter/scripts/  
 %{__install} -m750 -p files/filehashmd5.pl      ${RPM_BUILD_ROOT}%{_libdir}/rkhunter/scripts/  
 %{__install} -m750 -p files/filehashsha1.pl     ${RPM_BUILD_ROOT}%{_libdir}/rkhunter/scripts/  
 %{__install} -m750 -p files/showfiles.pl        ${RPM_BUILD_ROOT}%{_libdir}/rkhunter/scripts/  
 %{__install} -m750 -p files/check_update.sh     ${RPM_BUILD_ROOT}%{_libdir}/rkhunter/scripts/  
   
 # (cjo) Put installation root in configuration file, then copy the rest  
 #       of the file from the original.  
 cat >> ${RPM_BUILD_ROOT}%{_sysconfdir}/rkhunter.conf << EOF  
 ## Next three lines installed automatically by RPM. Do not change  
 ## unless you know what you're doing...  
 INSTALLDIR=%{_prefix}  
 DBDIR=%{_var}/rkhunter/db  
 TMPDIR=%{_var}/rkhunter/tmp  
   
 EOF  
77    
78  cat files/rkhunter.conf >> ${RPM_BUILD_ROOT}%{_sysconfdir}/rkhunter.conf  # Make a cron.daily file to mail us the reports
 %{__chmod} 640 ${RPM_BUILD_ROOT}%{_sysconfdir}/rkhunter.conf  
   
 # Only root should use rkhunter (at least for now)  
 %{__chmod} o-rwx -R ${RPM_BUILD_ROOT}%{_libdir}/rkhunter  
 %{__chmod} o-rwx -R ${RPM_BUILD_ROOT}%{_var}/rkhunter/db  
   
 # make a cron.daily file to mail us the reports  
79  %{__mkdir} -p "${RPM_BUILD_ROOT}/%{_sysconfdir}/cron.daily"  %{__mkdir} -p "${RPM_BUILD_ROOT}/%{_sysconfdir}/cron.daily"
80  %{__cat} > "${RPM_BUILD_ROOT}/%{_sysconfdir}/cron.daily/01-rkhunter" <<EOF  %{__cat} > "${RPM_BUILD_ROOT}/%{_sysconfdir}/cron.daily/01-rkhunter" <<EOF
81  #!/bin/sh  #!/bin/sh
82  %{_bindir}/rkhunter --cronjob --skip-application-check --report-warnings-only --createlogfile /var/log/rkhunter.log  %{_bindir}/rkhunter --cronjob --update --disable apps,suspscan,system_commands --rwo
83    exit 0
84  EOF  EOF
85  %{__chmod} a+rwx,g-w,o-rwx ${RPM_BUILD_ROOT}%{_sysconfdir}/cron.daily/01-rkhunter  %{__chmod} a+rwx,g-w,o-rwx ${RPM_BUILD_ROOT}%{_sysconfdir}/cron.daily/01-rkhunter
86    
 %clean  
 %{__rm} -rf "$RPM_BUILD_ROOT"  
   
 %files  
 %defattr(-,root,root,-)  
 %{_bindir}/rkhunter  
 %dir %{_libdir}/rkhunter  
 %doc %{_docdir}/rkhunter-%{version}  
 %{_mandir}/man8/*  
 %{_libdir}/rkhunter/scripts  
 %dir %{_var}/rkhunter/tmp  
 %{_var}/rkhunter/db  
 %config(noreplace) %verify(not mtime) %{_sysconfdir}/rkhunter.conf  
 %{_sysconfdir}/cron.daily/01-rkhunter  
87    
88    %post
89    # Only do this on an initial install
90    if [ $1 -eq 1 ]; then
91            %{__cp} -p /etc/passwd /var/rkhunter/tmp >/dev/null 2>&1 || :
92            %{__cp} -p /etc/group /var/rkhunter/tmp >/dev/null 2>&1 || :
93    fi
94    
 %changelog  
 * Sun Apr 29 2007 Shad L. Lords <slords@mail.com>  
 - Clean up spec so package can be built by koji/plague  
95    
96  * Wed Mar 07 2007 Shad L. Lords <slords@mail.com> 1.2.9-3  %preun
97  - Add sigs for 7.1.2 and 7.1.3  # Only do this when removing the RPM
98    if [ $1 -eq 0 ]; then
99            %{__rm} -f /var/log/rkhunter.log /var/log/rkhunter.log.old >/dev/null 2>&1
100            %{__rm} -rf /var/rkhunter/* >/dev/null 2>&1
101    fi
102    
 * Sun Jan 28 2007 Shad L. Lords <slords@mail.com> 1.2.9-2  
 - Run updates as part of build process  
103    
104  * Sun Jan 28 2007 Shad L. Lords <slords@mail.com> 1.2.9-1  %clean
105  - Update to latest 1.2.9  if [ "$RPM_BUILD_ROOT" = "/" ]; then
106            echo Invalid Build root \'"$RPM_BUILD_ROOT"\'
107  * Tue Dec 12 2006 Shad L. Lords <slords@mail.com> 1.2.8-4          exit 1
108  - Add strings as a requirement. [SME: 2267]  else
109            rm -rf $RPM_BUILD_ROOT
110    fi
111    
 * Tue Dec 12 2006 Shad L. Lords <slords@mail.com> 1.2.8-3  
 - Added 7.1  
112    
113  * Thu Dec 07 2006 Shad L. Lords <slords@mail.com> 1.2.8-2  %define docdir %{_prefix}/share/doc/%{name}-%{version}
114  - Update to new release naming.  No functional changes.  %files
115  - Make Packager generic  %defattr(-,root,root)
116    %attr(640,root,root) %config(noreplace) %{_sysconfdir}/%{name}.conf
117    %attr(750,root,root) %{_prefix}/bin/%{name}
118    %attr(750,root,root) %dir %{_libdir}/%{name}
119    %attr(750,root,root) %dir %{_libdir}/%{name}/scripts
120    %attr(750,root,root) %{_libdir}/%{name}/scripts/*.pl
121    %attr(750,root,root) %{_libdir}/%{name}/scripts/*.sh
122    %attr(644,root,root) %doc %{_prefix}/share/man/man8/%{name}.8.gz
123    %attr(755,root,root) %dir %{docdir}
124    %attr(644,root,root) %doc %{docdir}/*
125    %attr(750,root,root) %dir %{_var}/%{name}
126    %attr(750,root,root) %dir %{_var}/%{name}/db
127    %attr(640,root,root) %{_var}/%{name}/db/*.dat
128    %attr(750,root,root) %dir %{_var}/%{name}/db/i18n
129    %attr(640,root,root) %{_var}/%{name}/db/i18n/*
130    %attr(750,root,root) %dir %{_var}/%{name}/tmp
131    %{_sysconfdir}/cron.daily/01-rkhunter
132    
 * Sun Nov 12 2006 Shad L. Lords <slords@lordsfam.net> 1.2.8-1sme01  
 - Updated to latest 1.2.8  
133    
134  * Wed Feb 22 2006 Gordon Rowell <gordonr@gormand.com.au> 1.2.7-1sme07  %changelog
135  - Added 7.0pre[45] and 7.0prc3 [SME: 860  * Sun Mar 2 2008 Shad L. Lords <slords@mail.com> 1.3.2-2
136    - Allow freshclam to use deleted files. [SME: 3876]
137    
138  * Mon Feb 20 2006 Gordon Rowell <gordonr@gormand.com.au> 1.2.7-1sme06  * Fri Feb 29 2008 Shad L. Lords <slords@mail.com> 1.3.2-1
139  - Added 7.0pre3 [SME: 845]  - Update to rkhunter v1.3.2 [SME: 4000]
140    
141  * Sat Feb 4 2006 Gordon Rowell <gordonr@gormand.com.au> 1.2.7-1sme05  * Wed Jan 30 2008 Shad L. Lords <slords@mail.com> 1.3.0-6
142  - Added 7.0pre2 [SME: 653]  - Fix asterisk to allow deleted files. [SME: 3795]
143    
144  * Mon Jan 9 2006 Gordon Rowell <gordonr@gormand.com.au> 1.2.7-1sme04  * Tue Jan 29 2008 Shad L. Lords <slords@mail.com> 1.3.0-5
145  - Remove explicit call to /bin/mail from rkhunter daily cron job. If  - Correct pppoe binary location.
146    there's no output, we don't want any mail either [SME: 421]  - Add asterisk binary to allow deleted files. [SME: 3795]
147    
148  * Mon Jan 9 2006 Gordon Rowell <gordonr@gormand.com.au> 1.2.7-1sme03  * Mon Jan 7 2008 Shad L. Lords <slords@mail.com> 1.3.0-4
149  - Fix up format of os.dat entries. rkhunter knows about  - Disable scan for suspicious files until fixed [SME: 3713]
   /etc/e-smith-release [SME: 384]  
150    
151  * Mon Jan 9 2006 Gordon Rowell <gordonr@gormand.com.au> 1.2.7-1sme02  * Mon Dec 17 2007 Shad L. Lords <slords@mail.com> 1.3.0-3
152  - And add support for 7.0pre1 [SME: 384]  - Change /var/lib to /var to be consistent with previous versions
153    
154  * Mon Jan 9 2006 Gordon Rowell <gordonr@gormand.com.au> 1.2.7-1sme01  * Mon Dec 17 2007 Shad L. Lords <slords@mail.com> 1.3.0-2
155  - Add support for 7.0beta9, rc[12] and final [SME: 384]  - Add a few more services for sme tests
156    
157  * Wed Nov 09 2005 Charlie Brady <charlieb@e-smith.com> 1.2.7-1es2  * Mon Dec 17 2007 Shad L. Lords <slords@mail.com> 1.3.0-1
158  - Add support for CentOS 4.{1,2,3}  - Fix installer to not install in local
159    - Set parameters for sme specific tests
160    
161  * Fri Jul 15 2005 Charlie Brady - 1.2.7-1es  * Sun Feb 11 2007 unSpawn - pre-1.3.0
162  - Upgrade to 1.2.7  - Sync spec with fixes, installer and CVS
163    
164  * Sun Jun 05 2005 Charlie Brady - 1.2.6-2es  * Sun Nov 12 2006 unSpawn - 1.2.9
165  - Make cron job quieter  - Re-spec, new installer
 - Add SME6.1 and SME7 as recognised OSes.  
166    
167  * Tue May 10 2005 Charlie Brady - 1.2.6  * Fri Sep 29 2006 unSpawn - 1.2.9
168  - Update to 1.2.6  - Updated for release 1.2.9
169    
170  * Tue Aug 10 2004 Michael Boelen - 1.1.5  * Tue Aug 10 2004 Michael Boelen - 1.1.5
171  - Added update script  - Added update script
# Line 227  EOF Line 210  EOF
210  * Mon Mar 29 2004 Doncho N. Gunchev - 1.0.0-0  * Mon Mar 29 2004 Doncho N. Gunchev - 1.0.0-0
211  - initial .spec file  - initial .spec file
212    
213    


Legend:
Removed lines/characters  
Changed lines/characters
  Added lines/characters

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed