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

Diff of /rpms/rkhunter/sme8/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 20:49:39 2007 UTC Revision 1.2 by slords, Mon Dec 17 16:36:36 2007 UTC
# Line 1  Line 1 
1    # No debuginfo:
2    %define debug_package %{nil}
3    
4    # If you want to debug, uncomment the next line and remove
5    # the duplicate percent sign (due to macro expansion)
6    #%%dump
7    
8    %define name rkhunter
9    %define ver 1.3.0
10    %define rel 1
11    %define epoch 0
12    
13    # Don't change this define or also:
14    # 1. installer.sh --layout custom /temporary/dir/usr --striproot /temporary/dir --install
15    # 2. rewrite the files section below.
16    %define _prefix /usr
17    
18  # 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
19  # a correct but undesirable perl dependency, which rkhunter does not require  # a correct but undesirable perl dependency, which rkhunter does not require
20  # in order to function properly.  # in order to function properly.
21  AutoReqProv: no  AutoReqProv: no
22    
23  Summary:        Rootkit scans for rootkits, backdoors and local exploits.  Name: %{name}
24  Name:           rkhunter  Summary: %{name} scans for rootkits, backdoors and local exploits
25  Version:        1.2.9  Version: %{ver}
26  Release:        3%{?dist}  Release: %{rel}%{dist}
27  Epoch:          0  Epoch: %{epoch}
28  License:        GPL  License: GPL
29  Group:          Applications/System  Group: Applications/System
30  URL:            http://rkhunter.sourceforge.net/  Source0: %{name}-%{version}.tar.gz
31  Source0:        %{name}-%{version}.tar.gz  Patch0: rkhunter-installer.patch
32  Patch0:         rkhunter-sme7.patch  Patch1: rkhunter-sme7.patch
33  BuildArch:      noarch  BuildArch: noarch
34  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
35  BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)  Provides: %{name}
36    URL: http://rkhunter.sourceforge.net/
37    BuildRoot: %{_tmppath}/%{name}-%{version}
38    
39  %description  %description
40  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%%
41  clean of nasty tools. This tool scans for rootkits, backdoors and local  clean of nasty tools. It scans for rootkits, backdoors and local
42  exploits by running tests like:  exploits by running tests like:
43          - MD5 hash compare          - File hash check
44          - Look for default files used by rootkits          - Look for default files used by rootkits
45          - Wrong file permissions for binaries          - Wrong file permissions for binaries
46          - 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 53  Rootkit Hunter is released as a GPL lice
53    
54    
55  %prep  %prep
56  %setup  %setup -q
57  %patch -p1  %patch0 -p1
58    %patch1 -p1
59    
60  %build  %build
 #%%configure ...  
 # We have nothing to configure... yet...  
61    
62  %install  %install
63  # Well... This could be a bit smaller if the install  sh ./installer.sh --layout RPM --install
 # script was able to handle DSTDIR for example...  
   
 # (cjo) remove old version of build root, if it exists  
 %{__rm} -rf ${RPM_BUILD_ROOT}  
   
 %{__mkdir} -p ${RPM_BUILD_ROOT}%{_bindir}  
 %{__mkdir} -p ${RPM_BUILD_ROOT}%{_sysconfdir}  
 %{__mkdir} -p ${RPM_BUILD_ROOT}%{_libdir}  
 %{__mkdir} -p ${RPM_BUILD_ROOT}%{_libdir}/rkhunter/scripts  
 %{__mkdir} -p ${RPM_BUILD_ROOT}%{_docdir}/rkhunter-%{version}  
 %{__mkdir} -p ${RPM_BUILD_ROOT}%{_mandir}/man8  
 %{__mkdir} -p ${RPM_BUILD_ROOT}%{_var}/rkhunter/{db,tmp}  
 %{__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  
   
 cat files/rkhunter.conf >> ${RPM_BUILD_ROOT}%{_sysconfdir}/rkhunter.conf  
 %{__chmod} 640 ${RPM_BUILD_ROOT}%{_sysconfdir}/rkhunter.conf  
64    
 # 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  
65    
66  # make a cron.daily file to mail us the reports  # Make a cron.daily file to mail us the reports
67  %{__mkdir} -p "${RPM_BUILD_ROOT}/%{_sysconfdir}/cron.daily"  %{__mkdir} -p "${RPM_BUILD_ROOT}/%{_sysconfdir}/cron.daily"
68  %{__cat} > "${RPM_BUILD_ROOT}/%{_sysconfdir}/cron.daily/01-rkhunter" <<EOF  %{__cat} > "${RPM_BUILD_ROOT}/%{_sysconfdir}/cron.daily/01-rkhunter" <<EOF
69  #!/bin/sh  #!/bin/sh
70  %{_bindir}/rkhunter --cronjob --skip-application-check --report-warnings-only --createlogfile /var/log/rkhunter.log  ( %{_bindir}/rkhunter --cronjob --update --rwo && echo "" ) | /bin/mail -s "Rkhunter daily run on `uname -n`" root
71    exit 0
72  EOF  EOF
73  %{__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
74    
 %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  
   
75    
76  %changelog  %post
77  * Sun Apr 29 2007 Shad L. Lords <slords@mail.com>  # Only do this on an initial install
78  - Clean up spec so package can be built by koji/plague  if [ $1 -eq 1 ]; then
79            %{__cp} -p /etc/passwd /var/lib/rkhunter/tmp >/dev/null 2>&1 || :
80            %{__cp} -p /etc/group /var/lib/rkhunter/tmp >/dev/null 2>&1 || :
81    fi
82    
 * Wed Mar 07 2007 Shad L. Lords <slords@mail.com> 1.2.9-3  
 - Add sigs for 7.1.2 and 7.1.3  
83    
84  * Sun Jan 28 2007 Shad L. Lords <slords@mail.com> 1.2.9-2  %preun
85  - Run updates as part of build process  # Only do this when removing the RPM
86    if [ $1 -eq 0 ]; then
87            %{__rm} -f /var/log/rkhunter.log /var/log/rkhunter.log.old >/dev/null 2>&1
88            %{__rm} -rf /var/lib/rkhunter/* >/dev/null 2>&1
89    fi
90    
 * Sun Jan 28 2007 Shad L. Lords <slords@mail.com> 1.2.9-1  
 - Update to latest 1.2.9  
91    
92  * Tue Dec 12 2006 Shad L. Lords <slords@mail.com> 1.2.8-4  %clean
93  - Add strings as a requirement. [SME: 2267]  if [ "$RPM_BUILD_ROOT" = "/" ]; then
94            echo Invalid Build root \'"$RPM_BUILD_ROOT"\'
95  * Tue Dec 12 2006 Shad L. Lords <slords@mail.com> 1.2.8-3          exit 1
96  - Added 7.1  else
97            rm -rf $RPM_BUILD_ROOT
98  * Thu Dec 07 2006 Shad L. Lords <slords@mail.com> 1.2.8-2  fi
 - Update to new release naming.  No functional changes.  
 - Make Packager generic  
   
 * Sun Nov 12 2006 Shad L. Lords <slords@lordsfam.net> 1.2.8-1sme01  
 - Updated to latest 1.2.8  
   
 * Wed Feb 22 2006 Gordon Rowell <gordonr@gormand.com.au> 1.2.7-1sme07  
 - Added 7.0pre[45] and 7.0prc3 [SME: 860  
   
 * Mon Feb 20 2006 Gordon Rowell <gordonr@gormand.com.au> 1.2.7-1sme06  
 - Added 7.0pre3 [SME: 845]  
   
 * Sat Feb 4 2006 Gordon Rowell <gordonr@gormand.com.au> 1.2.7-1sme05  
 - Added 7.0pre2 [SME: 653]  
   
 * Mon Jan 9 2006 Gordon Rowell <gordonr@gormand.com.au> 1.2.7-1sme04  
 - Remove explicit call to /bin/mail from rkhunter daily cron job. If  
   there's no output, we don't want any mail either [SME: 421]  
99    
 * Mon Jan 9 2006 Gordon Rowell <gordonr@gormand.com.au> 1.2.7-1sme03  
 - Fix up format of os.dat entries. rkhunter knows about  
   /etc/e-smith-release [SME: 384]  
100    
101  * Mon Jan 9 2006 Gordon Rowell <gordonr@gormand.com.au> 1.2.7-1sme02  %define docdir %{_prefix}/share/doc/%{name}-%{version}
102  - And add support for 7.0pre1 [SME: 384]  %files
103    %defattr(-,root,root)
104    %attr(640,root,root) %config(noreplace) %{_sysconfdir}/%{name}.conf
105    %attr(750,root,root) %{_prefix}/bin/%{name}
106    %attr(750,root,root) %dir %{_libdir}/%{name}
107    %attr(750,root,root) %dir %{_libdir}/%{name}/scripts
108    %attr(750,root,root) %{_libdir}/%{name}/scripts/*.pl
109    %attr(750,root,root) %{_libdir}/%{name}/scripts/*.sh
110    %attr(644,root,root) %doc %{_prefix}/share/man/man8/%{name}.8.gz
111    %attr(755,root,root) %dir %{docdir}
112    %attr(644,root,root) %doc %{docdir}/*
113    %attr(750,root,root) %dir %{_var}/lib/%{name}
114    %attr(750,root,root) %dir %{_var}/lib/%{name}/db
115    %attr(640,root,root) %{_var}/lib/%{name}/db/*.dat
116    %attr(750,root,root) %dir %{_var}/lib/%{name}/db/i18n
117    %attr(640,root,root) %{_var}/lib/%{name}/db/i18n/*
118    %attr(750,root,root) %dir %{_var}/lib/%{name}/tmp
119    %{_sysconfdir}/cron.daily/01-rkhunter
120    
 * Mon Jan 9 2006 Gordon Rowell <gordonr@gormand.com.au> 1.2.7-1sme01  
 - Add support for 7.0beta9, rc[12] and final [SME: 384]  
121    
122  * Wed Nov 09 2005 Charlie Brady <charlieb@e-smith.com> 1.2.7-1es2  %changelog
123  - Add support for CentOS 4.{1,2,3}  * Mon Dec 17 2007 Shad L. Lords <slords@mail.com> 1.3.0-1
124    - Add sigs for 7.2, 7.3 and 8.0
125    - Fix installer to not install in local
126    
127  * Fri Jul 15 2005 Charlie Brady - 1.2.7-1es  * Sun Feb 11 2007 unSpawn - pre-1.3.0
128  - Upgrade to 1.2.7  - Sync spec with fixes, installer and CVS
129    
130  * Sun Jun 05 2005 Charlie Brady - 1.2.6-2es  * Sun Nov 12 2006 unSpawn - 1.2.9
131  - Make cron job quieter  - Re-spec, new installer
 - Add SME6.1 and SME7 as recognised OSes.  
132    
133  * Tue May 10 2005 Charlie Brady - 1.2.6  * Fri Sep 29 2006 unSpawn - 1.2.9
134  - Update to 1.2.6  - Updated for release 1.2.9
135    
136  * Tue Aug 10 2004 Michael Boelen - 1.1.5  * Tue Aug 10 2004 Michael Boelen - 1.1.5
137  - Added update script  - Added update script
# Line 227  EOF Line 176  EOF
176  * Mon Mar 29 2004 Doncho N. Gunchev - 1.0.0-0  * Mon Mar 29 2004 Doncho N. Gunchev - 1.0.0-0
177  - initial .spec file  - initial .spec file
178    
179    


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