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

Annotation of /rpms/rkhunter/sme8/rkhunter.spec

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


Revision 1.3 - (hide annotations) (download)
Mon Dec 17 21:04:58 2007 UTC (16 years, 10 months ago) by slords
Branch: MAIN
CVS Tags: rkhunter-1_3_0-1_el5_sme
Changes since 1.2: +5 -4 lines
updates

1 slords 1.2 # 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 slords 1.1 # 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
20     # in order to function properly.
21     AutoReqProv: no
22    
23 slords 1.2 Name: %{name}
24     Summary: %{name} scans for rootkits, backdoors and local exploits
25     Version: %{ver}
26     Release: %{rel}%{dist}
27     Epoch: %{epoch}
28     License: GPL
29     Group: Applications/System
30     Source0: %{name}-%{version}.tar.gz
31     Patch0: rkhunter-installer.patch
32     BuildArch: noarch
33     Requires: filesystem, bash, grep, findutils, net-tools, coreutils, e2fsprogs, modutils, procps, binutils, wget, perl
34     Provides: %{name}
35     URL: http://rkhunter.sourceforge.net/
36     BuildRoot: %{_tmppath}/%{name}-%{version}
37 slords 1.1
38     %description
39 slords 1.2 Rootkit Hunter is a scanning tool to ensure you are about 99.9%%
40     clean of nasty tools. It scans for rootkits, backdoors and local
41 slords 1.1 exploits by running tests like:
42 slords 1.2 - File hash check
43 slords 1.1 - Look for default files used by rootkits
44     - Wrong file permissions for binaries
45     - Look for suspected strings in LKM and KLD modules
46     - Look for hidden files
47     - Optional scan within plaintext and binary files
48     - Software version checks
49     - Application tests
50    
51     Rootkit Hunter is released as a GPL licensed project and free for everyone to use.
52    
53    
54     %prep
55 slords 1.2 %setup -q
56     %patch0 -p1
57 slords 1.1
58     %build
59    
60     %install
61 slords 1.2 sh ./installer.sh --layout RPM --install
62 slords 1.1
63 slords 1.3 sed -i 's_#ALLOWPROCLISTEN=/sbin/dhclient_ALLOWPROCLISTEN=/sbin/dhclient_' ${RPM_BUILD_ROOT}%{_sysconfdir}/%{name}.conf
64     sed -i 's_#ALLOWHIDDENFILE=/usr/share/man/man1/..1.gz_ALLOWHIDDENFILE=/usr/share/man/man1/..1.gz_' ${RPM_BUILD_ROOT}%{_sysconfdir}/%{name}.conf
65     sed -i '/#ALLOWPROCDELFILE=\/usr\/sbin\/mysqld/aALLOWPROCDELFILE=\/usr\/sbin\/httpd' ${RPM_BUILD_ROOT}%{_sysconfdir}/%{name}.conf
66 slords 1.1
67 slords 1.2 # Make a cron.daily file to mail us the reports
68 slords 1.1 %{__mkdir} -p "${RPM_BUILD_ROOT}/%{_sysconfdir}/cron.daily"
69     %{__cat} > "${RPM_BUILD_ROOT}/%{_sysconfdir}/cron.daily/01-rkhunter" <<EOF
70     #!/bin/sh
71 slords 1.3 %{_bindir}/rkhunter --cronjob --update --disable apps,system_commands --rwo
72 slords 1.2 exit 0
73 slords 1.1 EOF
74     %{__chmod} a+rwx,g-w,o-rwx ${RPM_BUILD_ROOT}%{_sysconfdir}/cron.daily/01-rkhunter
75    
76    
77 slords 1.2 %post
78     # Only do this on an initial install
79     if [ $1 -eq 1 ]; then
80     %{__cp} -p /etc/passwd /var/lib/rkhunter/tmp >/dev/null 2>&1 || :
81     %{__cp} -p /etc/group /var/lib/rkhunter/tmp >/dev/null 2>&1 || :
82     fi
83 slords 1.1
84    
85 slords 1.2 %preun
86     # Only do this when removing the RPM
87     if [ $1 -eq 0 ]; then
88     %{__rm} -f /var/log/rkhunter.log /var/log/rkhunter.log.old >/dev/null 2>&1
89     %{__rm} -rf /var/lib/rkhunter/* >/dev/null 2>&1
90     fi
91 slords 1.1
92    
93 slords 1.2 %clean
94     if [ "$RPM_BUILD_ROOT" = "/" ]; then
95     echo Invalid Build root \'"$RPM_BUILD_ROOT"\'
96     exit 1
97     else
98     rm -rf $RPM_BUILD_ROOT
99     fi
100 slords 1.1
101    
102 slords 1.2 %define docdir %{_prefix}/share/doc/%{name}-%{version}
103     %files
104     %defattr(-,root,root)
105     %attr(640,root,root) %config(noreplace) %{_sysconfdir}/%{name}.conf
106     %attr(750,root,root) %{_prefix}/bin/%{name}
107     %attr(750,root,root) %dir %{_libdir}/%{name}
108     %attr(750,root,root) %dir %{_libdir}/%{name}/scripts
109     %attr(750,root,root) %{_libdir}/%{name}/scripts/*.pl
110     %attr(750,root,root) %{_libdir}/%{name}/scripts/*.sh
111     %attr(644,root,root) %doc %{_prefix}/share/man/man8/%{name}.8.gz
112     %attr(755,root,root) %dir %{docdir}
113     %attr(644,root,root) %doc %{docdir}/*
114     %attr(750,root,root) %dir %{_var}/lib/%{name}
115     %attr(750,root,root) %dir %{_var}/lib/%{name}/db
116     %attr(640,root,root) %{_var}/lib/%{name}/db/*.dat
117     %attr(750,root,root) %dir %{_var}/lib/%{name}/db/i18n
118     %attr(640,root,root) %{_var}/lib/%{name}/db/i18n/*
119     %attr(750,root,root) %dir %{_var}/lib/%{name}/tmp
120     %{_sysconfdir}/cron.daily/01-rkhunter
121 slords 1.1
122    
123 slords 1.2 %changelog
124     * Mon Dec 17 2007 Shad L. Lords <slords@mail.com> 1.3.0-1
125     - Fix installer to not install in local
126 slords 1.3 - Set parameters for sme specific tests
127 slords 1.1
128 slords 1.2 * Sun Feb 11 2007 unSpawn - pre-1.3.0
129     - Sync spec with fixes, installer and CVS
130 slords 1.1
131 slords 1.2 * Sun Nov 12 2006 unSpawn - 1.2.9
132     - Re-spec, new installer
133 slords 1.1
134 slords 1.2 * Fri Sep 29 2006 unSpawn - 1.2.9
135     - Updated for release 1.2.9
136 slords 1.1
137     * Tue Aug 10 2004 Michael Boelen - 1.1.5
138     - Added update script
139     - Extended description
140    
141     * Sun Aug 08 2004 Greg Houlette - 1.1.5
142     - Changed the install procedure eliminating the specification of
143     destination filenames (only needed if you are renaming during install)
144     - Changed the permissions for documentation files (root only overkill)
145     - Added the installation of the rkhunter Man Page
146     - Added the installation of the programs_{bad, good}.dat database files
147     - Added the installation of the LICENSE documentation file
148     - Added the chmod for root only to the /var/rkhunter/db directory
149    
150     * Sun May 23 2004 Craig Orsinger (cjo) <cjorsinger@earthlink.net>
151     - version 1.1.0-1.cjo
152     - changed installation in accordance with new rootkit installation
153     procedure
154     - changed installation root to conform to LSB. Use standard macros.
155     - added recursive remove of old build root as prep for install phase
156    
157     * Wed Apr 28 2004 Doncho N. Gunchev - 1.0.9-0.mr700
158     - dropped Requires: perl - rkhunter works without it
159     - dropped the bash alignpatch (check the source or contact me)
160     - various file mode fixes (.../tmp/, *.db)
161     - optimized the %%files section - any new files in the
162     current dirs will be fine - just %%{__install} them.
163    
164     * Mon Apr 26 2004 Michael Boelen - 1.0.8-0
165     - Fixed missing md5blacklist.dat
166    
167     * Mon Apr 19 2004 Doncho N. Gunchev - 1.0.6-1.mr700
168     - added missing /usr/local/rkhunter/db/md5blacklist.dat
169     - patched to align results in --cronjob, I think rpm based
170     distros have symlink /bin/sh -> /bin/bash
171     - added --with/--without alignpatch for conditional builds
172     (in case previous patch breaks something)
173    
174     * Sat Apr 03 2004 Michael Boelen / Joe Klemmer - 1.0.6-0
175     - Update to 1.0.6
176    
177     * Mon Mar 29 2004 Doncho N. Gunchev - 1.0.0-0
178     - initial .spec file
179    
180 slords 1.2

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