1 |
# $Id: rkhunter.spec,v 1.13 2009/04/02 18:01:20 slords Exp $ |
2 |
|
3 |
Name: rkhunter |
4 |
Version: 1.3.4 |
5 |
Release: 7%{?dist} |
6 |
Summary: A host-based tool to scan for rootkits, backdoors and local exploits |
7 |
|
8 |
Group: Applications/System |
9 |
License: GPLv2+ |
10 |
URL: http://rkhunter.sourceforge.net/ |
11 |
Source0: http://downloads.sourceforge.net/rkhunter/rkhunter-%{version}.tar.gz |
12 |
Source1: http://downloads.sourceforge.net/rkhunter/rkhunter-%{version}.tar.gz.sha1.txt |
13 |
Source2: 01-rkhunter |
14 |
Source3: rkhunter.sysconfig |
15 |
Patch0: rkhunter-1.3.4-smeconfig.patch |
16 |
BuildArch: noarch |
17 |
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) |
18 |
|
19 |
Requires: coreutils, binutils, modutils, findutils, grep, mktemp |
20 |
Requires: e2fsprogs, procps, lsof, prelink, iproute, net-tools, wget |
21 |
Requires: perl, perl(strict), perl(IO::Socket), mailx, logrotate |
22 |
|
23 |
%description |
24 |
Rootkit Hunter (RKH) is an easy-to-use tool which checks |
25 |
computers running UNIX (clones) for the presence of rootkits |
26 |
and other unwanted tools. |
27 |
|
28 |
%prep |
29 |
|
30 |
%setup -q |
31 |
|
32 |
%patch0 -p1 |
33 |
|
34 |
%{__cat} <<'EOF' >%{name}.logrotate |
35 |
%{_localstatedir}/log/%{name}/%{name}.log { |
36 |
weekly |
37 |
notifempty |
38 |
create 640 root root |
39 |
} |
40 |
EOF |
41 |
|
42 |
%build |
43 |
# Nothing to be built |
44 |
|
45 |
%install |
46 |
%{__rm} -rf $RPM_BUILD_ROOT |
47 |
|
48 |
%{__mkdir} -m755 -p ${RPM_BUILD_ROOT}%{_bindir} |
49 |
%{__mkdir} -m755 -p ${RPM_BUILD_ROOT}%{_sysconfdir}/{cron.daily,sysconfig,logrotate.d} |
50 |
%{__mkdir} -m755 -p ${RPM_BUILD_ROOT}%{_datadir}/%{name}/scripts |
51 |
%{__mkdir} -m755 -p ${RPM_BUILD_ROOT}%{_docdir}/%{name}-%{version} |
52 |
%{__mkdir} -m755 -p ${RPM_BUILD_ROOT}%{_mandir}/man8 |
53 |
%{__mkdir} -m755 -p ${RPM_BUILD_ROOT}%{_var}/lib/%{name}/db |
54 |
%{__mkdir} -m755 -p ${RPM_BUILD_ROOT}%{_var}/run/%{name} |
55 |
%{__mkdir} -m755 -p ${RPM_BUILD_ROOT}%{_var}/log/%{name} |
56 |
%{__mkdir} -m755 -p ${RPM_BUILD_ROOT}%{_var}/lib/%{name}/db/i18n |
57 |
|
58 |
%{__install} -m755 -p files/%{name} ${RPM_BUILD_ROOT}%{_bindir}/ |
59 |
|
60 |
%{__install} -m644 -p files/backdoorports.dat ${RPM_BUILD_ROOT}%{_var}/lib/%{name}/db/ |
61 |
%{__install} -m644 -p files/defaulthashes.dat ${RPM_BUILD_ROOT}%{_var}/lib/%{name}/db/ |
62 |
%{__install} -m644 -p files/md5blacklist.dat ${RPM_BUILD_ROOT}%{_var}/lib/%{name}/db/ |
63 |
%{__install} -m644 -p files/mirrors.dat ${RPM_BUILD_ROOT}%{_var}/lib/%{name}/db/ |
64 |
%{__install} -m644 -p files/os.dat ${RPM_BUILD_ROOT}%{_var}/lib/%{name}/db/ |
65 |
%{__install} -m644 -p files/programs_bad.dat ${RPM_BUILD_ROOT}%{_var}/lib/%{name}/db/ |
66 |
%{__install} -m644 -p files/programs_good.dat ${RPM_BUILD_ROOT}%{_var}/lib/%{name}/db/ |
67 |
%{__install} -m644 -p files/i18n/cn ${RPM_BUILD_ROOT}%{_var}/lib/%{name}/db/i18n/ |
68 |
%{__install} -m644 -p files/i18n/en ${RPM_BUILD_ROOT}%{_var}/lib/%{name}/db/i18n/ |
69 |
|
70 |
%{__install} -m644 -p files/CHANGELOG ${RPM_BUILD_ROOT}%{_docdir}/%{name}-%{version}/ |
71 |
%{__install} -m644 -p files/LICENSE ${RPM_BUILD_ROOT}%{_docdir}/%{name}-%{version}/ |
72 |
%{__install} -m644 -p files/README ${RPM_BUILD_ROOT}%{_docdir}/%{name}-%{version}/ |
73 |
%{__install} -m644 -p files/WISHLIST ${RPM_BUILD_ROOT}%{_docdir}/%{name}-%{version}/ |
74 |
%{__install} -m755 -p files/check_modules.pl ${RPM_BUILD_ROOT}%{_datadir}/%{name}/scripts/ |
75 |
%{__install} -m755 -p files/check_port.pl ${RPM_BUILD_ROOT}%{_datadir}/%{name}/scripts/ |
76 |
%{__install} -m755 -p files/check_update.sh ${RPM_BUILD_ROOT}%{_datadir}/%{name}/scripts/ |
77 |
%{__install} -m644 -p files/*.8 ${RPM_BUILD_ROOT}%{_mandir}/man8/ |
78 |
# Don't ship these unless we want to Require the perl modules |
79 |
#%{__install} -m750 -p files/filehashmd5.pl ${RPM_BUILD_ROOT}%{_prefix}/lib/%{name}/scripts/ |
80 |
#%{__install} -m750 -p files/filehashsha1.pl ${RPM_BUILD_ROOT}%{_prefix}/lib/%{name}/scripts/ |
81 |
%{__install} -m755 -p files/showfiles.pl ${RPM_BUILD_ROOT}%{_datadir}/%{name}/scripts/ |
82 |
%{__install} -m755 -p %{SOURCE2} ${RPM_BUILD_ROOT}%{_sysconfdir}/cron.daily/%{name} |
83 |
%{__install} -m644 -p %{name}.logrotate ${RPM_BUILD_ROOT}%{_sysconfdir}/logrotate.d/%{name} |
84 |
%{__install} -m640 -p files/%{name}.conf ${RPM_BUILD_ROOT}%{_sysconfdir}/ |
85 |
%{__install} -m640 -p %{SOURCE3} ${RPM_BUILD_ROOT}%{_sysconfdir}/sysconfig/%{name} |
86 |
|
87 |
%clean |
88 |
%{__rm} -rf $RPM_BUILD_ROOT |
89 |
|
90 |
%post |
91 |
# Only do this on an initial install |
92 |
if [ $1 -eq 1 ]; then |
93 |
%{__cp} -p /etc/passwd /var/lib/rkhunter/ >/dev/null 2>&1 || : |
94 |
%{__cp} -p /etc/group /var/lib/rkhunter/ >/dev/null 2>&1 || : |
95 |
fi |
96 |
|
97 |
%files |
98 |
%defattr(-,root,root,-) |
99 |
%doc %{_docdir}/%{name}-%{version}/* |
100 |
%{_bindir}/%{name} |
101 |
%dir %{_datadir}/%{name} |
102 |
%{_datadir}/%{name}/scripts |
103 |
%{_sysconfdir}/cron.daily/%{name} |
104 |
%config(noreplace) %{_sysconfdir}/logrotate.d/%{name} |
105 |
%dir %{_var}/lib/%{name} |
106 |
%{_var}/lib/%{name}/db |
107 |
%{_var}/lib/%{name}/db/i18n |
108 |
%dir %{_var}/run/%{name} |
109 |
%dir %{_var}/log/%{name} |
110 |
%config(noreplace) %{_sysconfdir}/%{name}.conf |
111 |
%config(noreplace) %{_sysconfdir}/sysconfig/%{name} |
112 |
%dir %{_docdir}/%{name}-%{version} |
113 |
%{_mandir}/man8/* |
114 |
|
115 |
%changelog |
116 |
* Tue Apr 7 2009 Jonathan Martens <smeserver-contribs@snetram.nl> 1.3.4-7 |
117 |
- Remove quotes in DISABLE_TESTS setting [SME: 5149] |
118 |
|
119 |
* Thu Apr 2 2009 Shad L. Lords <slords@mail.com> |
120 |
1.3.4-6 |
121 |
- Update to epel version of rkhunter |
122 |
- Set parameters for sme specific tests |
123 |
|
124 |
* Sun Mar 08 2009 Kevin Fenzi <kevin@tummy.com> - 1.3.4-5 |
125 |
- Fix typo in patch file |
126 |
|
127 |
* Wed Mar 04 2009 Kevin Fenzi <kevin@tummy.com> - 1.3.4-4 |
128 |
- Rework spec file |
129 |
- Add check for the new hmac ssh files |
130 |
|
131 |
* Thu Feb 26 2009 Kevin Fenzi <kevin@tummy.com> - 1.3.4-3 |
132 |
- Update cron job to include hostname (thanks Manuel Wolfshant) |
133 |
|
134 |
* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.3.4-2 |
135 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild |
136 |
|
137 |
* Fri Jan 02 2009 Kevin Fenzi <kevin@tummy.com> - 1.3.4-1 |
138 |
- Update to 1.3.4 |
139 |
- Use libdir as tmp dir - bug #456340 |
140 |
|
141 |
* Sat Dec 13 2008 Kevin Fenzi <kevin@tummy.com> - 1.3.2-6 |
142 |
- Fix cron job sending as attachment - bug #472679 |
143 |
- Fix cron job trying to send with colors - bug #475916 |
144 |
|
145 |
* Wed Sep 03 2008 Kevin Fenzi <kevin@tummy.com> - 1.3.2-5 |
146 |
- Patch debug tmp file issue - bug #460628 |
147 |
|
148 |
* Mon Jun 16 2008 Kevin Fenzi <kevin@tummy.com> - 1.3.2-4 |
149 |
- Fix cron script to only mail on warn/error - bug #450703 |
150 |
- Fix conditional to account for fc10 rsyslog |
151 |
|
152 |
* Mon Apr 28 2008 Kevin Fenzi <kevin@tummy.com> - 1.3.2-3 |
153 |
- Change cron to run after prelink - bug #438622 |
154 |
|
155 |
* Wed Mar 26 2008 Kevin Fenzi <kevin@tummy.com> - 1.3.2-2 |
156 |
- Move things to more standard locations for selinux - bug #438184 |
157 |
- Add exception for pulseaudio file - bug #438622 |
158 |
|
159 |
* Thu Feb 28 2008 Kevin Fenzi <kevin@tummy.com> - 1.3.2-1 |
160 |
- Update to 1.3.2 |
161 |
- Fix cron script |
162 |
|
163 |
* Thu Feb 28 2008 Kevin Fenzi <kevin@tummy.com> - 1.3.0-2 |
164 |
- Use /etc/redhat-release for EPEL and /etc/fedora release for Fedora. |
165 |
- Add conditionals to support EPEL |
166 |
- Fix man page warning. |
167 |
|
168 |
* Sun Feb 03 2008 Kevin Fenzi <kevin@tummy.com> - 1.3.0-1 |
169 |
- Revive package, clean up spec |
170 |
- Update to 1.3.0 |
171 |
|
172 |
* Sat Mar 18 2006 Greg Houlette <tamaster@pobox.com> - 1.2.8-3 |
173 |
- Made an RPM transparent change to move the sha1 canary check |
174 |
file out of CVS and into the external lookaside cache (whose |
175 |
filename changes with every new package release anyway...) |
176 |
|
177 |
* Fri Mar 17 2006 Greg Houlette <tamaster@pobox.com> - 1.2.8-2 |
178 |
- Fixed architectural dependency during package creation eliminating |
179 |
use of _libdir configure macro (x86_64 /usr/lib64 mis-targeting) |
180 |
|
181 |
* Tue Mar 7 2006 Greg Houlette <tamaster@pobox.com> - 1.2.8-1 |
182 |
- New package version release |
183 |
- reworked the .spec file to support optional dist tag |
184 |
- Updated the application check default patchfile (chunk failure) |
185 |
- Changed to SHA1 for optional message digest (canary check) |
186 |
- Added a couple of suggested skip entries to rkhunter.conf |
187 |
|
188 |
* Mon Jun 11 2005 Greg Houlette <tamaster@pobox.com> - 1.2.7-1 |
189 |
- Added signature auto-updating to CRON scan (new script) |
190 |
- Removed BOOTSCAN pending rewrite to full SysV Init scan in background |
191 |
- Added the --append-log command line option |
192 |
- Added Date Stamping to output |
193 |
- Fixed bug in /etc/group missing report |
194 |
- New package version release |
195 |
|
196 |
* Sun Jan 2 2005 Greg Houlette <tamaster@tekarmory.com> - 0:1.1.9-1 |
197 |
- New package version release |
198 |
- Added the --run-application-check command line option |
199 |
to listing in command help |
200 |
- Replaced 'Here' Doc editing of rkhunter.conf file |
201 |
with in-place Perl edit |
202 |
- tweaked rpmbuild -bb Autoclean |
203 |
|
204 |
* Fri Oct 15 2004 Greg Houlette - 0:1.1.8-0.fdr.1 (revisited) |
205 |
- Removed redundant buildrequires /bin/sh, coreutils and perl |
206 |
- Revise postun scriptlet |
207 |
- Added /usr/share/doc/rkhunter-1.1.8/ to files list |
208 |
|
209 |
* Mon Oct 11 2004 Greg Houlette - 0:1.1.8-0.fdr.1 |
210 |
- Changed Release Tag to 0.fdr.1 (testing) for QA |
211 |
- Removed wget from dependencies |
212 |
- Hid (temporarily) the --skip-application-check command |
213 |
line option from being listed in help |
214 |
- Fixed the spec files list, again! |
215 |
|
216 |
* Fri Oct 8 2004 Greg Houlette - 0:1.1.8-0.fdr.0.2.beta2 |
217 |
- Unified and disabled the md5 canary check in prep |
218 |
(check is now optional) removing the sha1 cross-check |
219 |
- Fixed the spec files list, adding the /var/rkhunter |
220 |
directory and the /usr/bin/rkhunter executable |
221 |
- Fixed missing dependencies (rkh uses runtime checks) |
222 |
- Disabled "auto-clean" for rpmbuild -bb |
223 |
- Changed Application version scan default to |
224 |
disabled awaiting backport fix in upstream sources |
225 |
- Fixed shared_man_search.patch, configuration files |
226 |
verify and added postun(install) cleanup |
227 |
|
228 |
* Fri Oct 1 2004 Greg Houlette - 0:1.1.8-0.fdr.0.1.beta1 |
229 |
- More cosmetic patchwork |
230 |
- Changed Release Tag to beta1 (pre-release) for QA submit |
231 |
|
232 |
* Tue Sep 28 2004 Greg Houlette - 0:1.1.8-0.fdr.1 |
233 |
- Removed hidden_search.patch (1.1.7) after it was |
234 |
merged into upstream source by Michael Boelen |
235 |
- Removed .spec file from md5 and sha1 file checks |
236 |
(it must be modifiable by Fedora QA release build) |
237 |
- Added BOOTSCAN description file to documentation |
238 |
- Restructured dynamic file creation ('Here' Docs) |
239 |
moving them to the "prep" stage so that *_ALL_* |
240 |
files are available prior to the "build" stage |
241 |
(for inspection purposes) |
242 |
- Added a /etc/sysconfig/rkhunter parameters file |
243 |
|
244 |
* Sun Aug 29 2004 Greg Houlette - 0:1.1.7-0.fdr.1 |
245 |
- Cosmetic patchwork |
246 |
|
247 |
* Sat Aug 21 2004 Greg Houlette - 0:1.1.6-0.fdr.1 |
248 |
- Moderate reworking of .spec file for packaging standards |
249 |
- Added md5 and sha1 file checks to prep procedure for source .rpm |
250 |
- Included an optional rc.local replacement for scan on boot (with full logging) |
251 |
|
252 |
* Tue Aug 10 2004 Michael Boelen - 1.1.5 |
253 |
- Added update script |
254 |
- Extended description |
255 |
|
256 |
* Sun Aug 08 2004 Greg Houlette - 1.1.5 |
257 |
- Changed the install procedure eliminating the specification of |
258 |
destination filenames (only needed if you are renaming during install) |
259 |
- Changed the permissions for documentation files (root only overkill) |
260 |
- Added the installation of the rkhunter Man Page |
261 |
- Added the installation of the programs_{bad, good}.dat database files |
262 |
- Added the installation of the LICENSE documentation file |
263 |
- Added the chmod for root only to the /var/rkhunter/db directory |
264 |
|
265 |
* Sun May 23 2004 Craig Orsinger (cjo) <cjorsinger@earthlink.net> |
266 |
- version 1.1.0-1.cjo |
267 |
- changed installation in accordance with new rootkit installation |
268 |
procedure |
269 |
- changed installation root to conform to LSB. Use standard macros. |
270 |
- added recursive remove of old build root as prep for install phase |
271 |
|
272 |
* Wed Apr 28 2004 Doncho N. Gunchev - 1.0.9-0.mr700 |
273 |
- dropped Requires: perl - rkhunter works without it |
274 |
- dropped the bash alignpatch (check the source or contact me) |
275 |
- various file mode fixes (.../tmp/, *.db) |
276 |
- optimized the %%files section - any new files in the |
277 |
current dirs will be fine - just %%{__install} them. |
278 |
|
279 |
* Mon Apr 26 2004 Michael Boelen - 1.0.8-0 |
280 |
- Fixed missing md5blacklist.dat |
281 |
|
282 |
* Mon Apr 19 2004 Doncho N. Gunchev - 1.0.6-1.mr700 |
283 |
- added missing /usr/local/rkhunter/db/md5blacklist.dat |
284 |
- patched to align results in --cronjob, I think rpm based |
285 |
distros have symlink /bin/sh -> /bin/bash |
286 |
- added --with/--without alignpatch for conditional builds |
287 |
(in case previous patch breaks something) |
288 |
|
289 |
* Sat Apr 03 2004 Michael Boelen / Joe Klemmer - 1.0.6-0 |
290 |
- Update to 1.0.6 |
291 |
|
292 |
* Mon Mar 29 2004 Doncho N. Gunchev - 1.0.0-0 |
293 |
- initial .spec file |