7 |
|
|
8 |
%define name rkhunter |
%define name rkhunter |
9 |
%define ver 1.3.0 |
%define ver 1.3.0 |
10 |
%define rel 1 |
%define rel 5 |
11 |
%define epoch 0 |
%define epoch 0 |
12 |
|
|
13 |
# Don't change this define or also: |
# Don't change this define or also: |
29 |
Group: Applications/System |
Group: Applications/System |
30 |
Source0: %{name}-%{version}.tar.gz |
Source0: %{name}-%{version}.tar.gz |
31 |
Patch0: rkhunter-installer.patch |
Patch0: rkhunter-installer.patch |
32 |
Patch1: rkhunter-sme7.patch |
Patch1: rkhunter-nolib.patch |
33 |
BuildArch: noarch |
BuildArch: noarch |
34 |
Requires: filesystem, bash, grep, findutils, net-tools, coreutils, e2fsprogs, modutils, procps, binutils, wget, perl |
Requires: filesystem, bash, grep, findutils, net-tools, coreutils, e2fsprogs, modutils, procps, binutils, wget, perl |
35 |
Provides: %{name} |
Provides: %{name} |
62 |
%install |
%install |
63 |
sh ./installer.sh --layout RPM --install |
sh ./installer.sh --layout RPM --install |
64 |
|
|
65 |
|
sed -i 's_#ALLOWPROCLISTEN=/sbin/dhclient_ALLOWPROCLISTEN=/sbin/dhclient_' ${RPM_BUILD_ROOT}%{_sysconfdir}/%{name}.conf |
66 |
|
sed -i 's_#ALLOWPROCLISTEN=/usr/sbin/pppoe_ALLOWPROCLISTEN=/sbin/pppoe_' ${RPM_BUILD_ROOT}%{_sysconfdir}/%{name}.conf |
67 |
|
sed -i 's_#ALLOWHIDDENFILE=/usr/share/man/man1/..1.gz_ALLOWHIDDENFILE=/usr/share/man/man1/..1.gz_' ${RPM_BUILD_ROOT}%{_sysconfdir}/%{name}.conf |
68 |
|
sed -i '/#ALLOWPROCLISTEN=\/usr\/bin\/dhcpcd/iALLOWPROCLISTEN=\/usr\/sbin\/dhcpd' ${RPM_BUILD_ROOT}%{_sysconfdir}/%{name}.conf |
69 |
|
sed -i '/#ALLOWPROCDELFILE=\/usr\/sbin\/mysqld/aALLOWPROCDELFILE=\/usr\/sbin\/httpd' ${RPM_BUILD_ROOT}%{_sysconfdir}/%{name}.conf |
70 |
|
sed -i '/#ALLOWPROCLISTEN=\/usr\/local\/bin\/wpa_supplicant/aALLOWPROCLISTEN=\/usr\/sbin\/asterisk' ${RPM_BUILD_ROOT}%{_sysconfdir}/%{name}.conf |
71 |
|
|
72 |
# Make a cron.daily file to mail us the reports |
# Make a cron.daily file to mail us the reports |
73 |
%{__mkdir} -p "${RPM_BUILD_ROOT}/%{_sysconfdir}/cron.daily" |
%{__mkdir} -p "${RPM_BUILD_ROOT}/%{_sysconfdir}/cron.daily" |
74 |
%{__cat} > "${RPM_BUILD_ROOT}/%{_sysconfdir}/cron.daily/01-rkhunter" <<EOF |
%{__cat} > "${RPM_BUILD_ROOT}/%{_sysconfdir}/cron.daily/01-rkhunter" <<EOF |
75 |
#!/bin/sh |
#!/bin/sh |
76 |
( %{_bindir}/rkhunter --cronjob --update --rwo && echo "" ) | /bin/mail -s "Rkhunter daily run on `uname -n`" root |
%{_bindir}/rkhunter --cronjob --update --disable apps,suspscan,system_commands --rwo |
77 |
exit 0 |
exit 0 |
78 |
EOF |
EOF |
79 |
%{__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 |
82 |
%post |
%post |
83 |
# Only do this on an initial install |
# Only do this on an initial install |
84 |
if [ $1 -eq 1 ]; then |
if [ $1 -eq 1 ]; then |
85 |
%{__cp} -p /etc/passwd /var/lib/rkhunter/tmp >/dev/null 2>&1 || : |
%{__cp} -p /etc/passwd /var/rkhunter/tmp >/dev/null 2>&1 || : |
86 |
%{__cp} -p /etc/group /var/lib/rkhunter/tmp >/dev/null 2>&1 || : |
%{__cp} -p /etc/group /var/rkhunter/tmp >/dev/null 2>&1 || : |
87 |
fi |
fi |
88 |
|
|
89 |
|
|
91 |
# Only do this when removing the RPM |
# Only do this when removing the RPM |
92 |
if [ $1 -eq 0 ]; then |
if [ $1 -eq 0 ]; then |
93 |
%{__rm} -f /var/log/rkhunter.log /var/log/rkhunter.log.old >/dev/null 2>&1 |
%{__rm} -f /var/log/rkhunter.log /var/log/rkhunter.log.old >/dev/null 2>&1 |
94 |
%{__rm} -rf /var/lib/rkhunter/* >/dev/null 2>&1 |
%{__rm} -rf /var/rkhunter/* >/dev/null 2>&1 |
95 |
fi |
fi |
96 |
|
|
97 |
|
|
116 |
%attr(644,root,root) %doc %{_prefix}/share/man/man8/%{name}.8.gz |
%attr(644,root,root) %doc %{_prefix}/share/man/man8/%{name}.8.gz |
117 |
%attr(755,root,root) %dir %{docdir} |
%attr(755,root,root) %dir %{docdir} |
118 |
%attr(644,root,root) %doc %{docdir}/* |
%attr(644,root,root) %doc %{docdir}/* |
119 |
%attr(750,root,root) %dir %{_var}/lib/%{name} |
%attr(750,root,root) %dir %{_var}/%{name} |
120 |
%attr(750,root,root) %dir %{_var}/lib/%{name}/db |
%attr(750,root,root) %dir %{_var}/%{name}/db |
121 |
%attr(640,root,root) %{_var}/lib/%{name}/db/*.dat |
%attr(640,root,root) %{_var}/%{name}/db/*.dat |
122 |
%attr(750,root,root) %dir %{_var}/lib/%{name}/db/i18n |
%attr(750,root,root) %dir %{_var}/%{name}/db/i18n |
123 |
%attr(640,root,root) %{_var}/lib/%{name}/db/i18n/* |
%attr(640,root,root) %{_var}/%{name}/db/i18n/* |
124 |
%attr(750,root,root) %dir %{_var}/lib/%{name}/tmp |
%attr(750,root,root) %dir %{_var}/%{name}/tmp |
125 |
%{_sysconfdir}/cron.daily/01-rkhunter |
%{_sysconfdir}/cron.daily/01-rkhunter |
126 |
|
|
127 |
|
|
128 |
%changelog |
%changelog |
129 |
|
* Tue Jan 29 2008 Shad L. Lords <slords@mail.com> 1.3.0-5 |
130 |
|
- Correct pppoe binary location. |
131 |
|
- Add asterisk binary to allow deleted files. [SME: 3795] |
132 |
|
|
133 |
|
* Mon Jan 7 2008 Shad L. Lords <slords@mail.com> 1.3.0-4 |
134 |
|
- Disable scan for suspicious files until fixed [SME: 3713] |
135 |
|
|
136 |
|
* Mon Dec 17 2007 Shad L. Lords <slords@mail.com> 1.3.0-3 |
137 |
|
- Change /var/lib to /var to be consistent with previous versions |
138 |
|
|
139 |
|
* Mon Dec 17 2007 Shad L. Lords <slords@mail.com> 1.3.0-2 |
140 |
|
- Add a few more services for sme tests |
141 |
|
|
142 |
* Mon Dec 17 2007 Shad L. Lords <slords@mail.com> 1.3.0-1 |
* Mon Dec 17 2007 Shad L. Lords <slords@mail.com> 1.3.0-1 |
|
- Add sigs for 7.2, 7.3 and 8.0 |
|
143 |
- Fix installer to not install in local |
- Fix installer to not install in local |
144 |
|
- Set parameters for sme specific tests |
145 |
|
|
146 |
* Sun Feb 11 2007 unSpawn - pre-1.3.0 |
* Sun Feb 11 2007 unSpawn - pre-1.3.0 |
147 |
- Sync spec with fixes, installer and CVS |
- Sync spec with fixes, installer and CVS |