nessus-core-vl.spec 8.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308
  1. Name: nessus-core
  2. Version: 2.2.11
  3. Release: 5%{?_dist_release}
  4. Summary: Network vulnerability scanner
  5. Summary(ja): ネットワーク脆弱性スキャナ
  6. Group: Applications/System
  7. License: GPLv2
  8. URL: http://www.nessus.org
  9. #http://www.nessus.org/download/index.php
  10. Source0: nessus-core-2.2.11.tar.gz
  11. Source1: nessusd.init
  12. Source2: nessusd.log
  13. Source3: nessus.desktop
  14. # force nessus into fedora dir structure
  15. # and use system gd
  16. # Thanks to Dawid Gajownik for providing these patches =)
  17. Patch0: nessus-core-Makefile.patch
  18. Patch1: nessus-core-2.2.4.config.h.in.patch
  19. Patch2: nessus-core-2.2.4.configure.in.patch
  20. Patch3: nessus-core-2.2.4.configure.patch
  21. Patch4: nessus-core-2.2.4.gd.patch
  22. Patch5: nessus-core-2.2.4.nessus-adduser.in.patch
  23. Patch6: nessus-core-2.2.4.nessus-mkcert.patch
  24. Patch7: nessus-core-2.2.4.nessus-rmuser.in.patch
  25. Patch8: nessus-core-2.2.4.nessus.tmpl.in.patch
  26. Patch9: nessus-core-2.2.4.pid.patch
  27. Patch10: nessus-core-2.2.11.pki.patch
  28. # fixes #399211 glibc open check
  29. Patch11: nessus-core-open.patch
  30. # Patch for Vine
  31. Patch100: nessus-core-2.2.11.pcap.patch
  32. BuildRoot: %{_tmppath}/%{name}-%{version}-root
  33. BuildRequires: nessus-libraries-devel
  34. BuildRequires: libnasl-devel
  35. BuildRequires: gtk2-devel
  36. BuildRequires: glib2-devel
  37. BuildRequires: libICE-devel
  38. BuildRequires: gd-devel
  39. BuildRequires: tcp_wrappers
  40. BuildRequires: desktop-file-utils
  41. %define pkidir %{_sysconfdir}/pki/nessus
  42. %description
  43. Nessus is the world's most popular vulnerability scanner used in over 75,000
  44. organizations world-wide. Many of the world's largest organizations are
  45. realizing significant cost savings by using Nessus to audit business-critical
  46. enterprise devices and applications.
  47. The "Nessus" Project was started by Renaud Deraison in 1998 to provide to the
  48. internet community a free, powerful, up-to-date and easy to use remote
  49. security scanner. Nessus is currently rated among the top products of its type
  50. throughout the security industry and is endorsed by professional information
  51. security organizations such as the SANS Institute.
  52. %package devel
  53. Summary: Header files for plugin development
  54. Summary(ja): Nessus プラグイン開発に必要なヘッダファイル
  55. Group: Development/Libraries
  56. %description devel
  57. %{summary}
  58. %package -n nessus-server
  59. Summary: nessusd is the server part of the nessus client-server model
  60. Summary(ja): nessusd - Nessus クライアントサーバモデルのサーバ
  61. Group: System Environment/Daemons
  62. Requires(post): /sbin/chkconfig
  63. Requires(preun): /sbin/chkconfig
  64. Requires(preun): /sbin/service
  65. Requires: nessus-core = %{version}-%{release}
  66. %description -n nessus-server
  67. %{summary}
  68. %package -n nessus-client
  69. Summary: Text client interface for nessusd
  70. Summary(ja): nessusd のテキスト版クライアント
  71. Group: Applications/Internet
  72. Requires: nessus-core = %{version}-%{release}
  73. %description -n nessus-client
  74. %{summary}
  75. %package -n nessus-gui
  76. Summary: GTK client interface for nessusd
  77. Summary(ja): Nessusd の GTK+ 版クライアント
  78. Group: Applications/Internet
  79. Requires: nessus-core = %{version}-%{release}
  80. %description -n nessus-gui
  81. %{summary}
  82. %prep
  83. %setup -q -n %{name}
  84. %patch0 -p1
  85. %patch1 -p1
  86. %patch2 -p1
  87. # You cannot compile against system gd, because nessus-text client
  88. # will require X.org X11
  89. %patch3 -p1
  90. %patch4 -p1
  91. %patch5 -p1
  92. %patch6 -p1
  93. %patch7 -p1
  94. %patch8 -p1
  95. %patch9 -p1
  96. %patch10 -p1
  97. %patch11 -p1
  98. %patch100 -p0
  99. %build
  100. # libdir is used by plugins
  101. # smpflags will break builds sometime...
  102. %configure \
  103. --libdir=%{_localstatedir}/lib \
  104. --disable-gtk \
  105. --enable-syslog \
  106. --enable-tcpwrappers \
  107. --without-x
  108. make -C nessus
  109. mv -f nessus/nessus nessus-text
  110. make distclean
  111. %configure \
  112. --libdir=%{_localstatedir}/lib \
  113. --enable-gtk \
  114. --enable-syslog \
  115. --enable-tcpwrappers \
  116. --with-x
  117. make
  118. %install
  119. rm -rf $RPM_BUILD_ROOT
  120. make install DESTDIR=$RPM_BUILD_ROOT
  121. install -p -m 0755 nessus-text $RPM_BUILD_ROOT/%{_bindir}
  122. install -D -p -m 755 %{SOURCE1} $RPM_BUILD_ROOT/%{_initrddir}/nessusd
  123. install -D -p -m 0644 %{SOURCE2} $RPM_BUILD_ROOT/%{_sysconfdir}/logrotate.d/nessusd
  124. install -D -p -m 644 nessus/xpm/nessus.xpm \
  125. $RPM_BUILD_ROOT/%{_datadir}/pixmaps/nessus.xpm
  126. desktop-file-install --vendor vine \
  127. --dir $RPM_BUILD_ROOT/%{_datadir}/applications\
  128. %{SOURCE3}
  129. # generate ghost .pem files
  130. mkdir -m 0755 -p $RPM_BUILD_ROOT/%{pkidir}/{private,}/CA
  131. chmod 700 $RPM_BUILD_ROOT/%{pkidir}/private/CA
  132. touch $RPM_BUILD_ROOT/%{pkidir}/private/CA/{cakey,serverkey}.pem
  133. chmod 600 $RPM_BUILD_ROOT/%{pkidir}/private/CA/{cakey,serverkey}.pem
  134. touch $RPM_BUILD_ROOT/%{pkidir}/CA/{cacert,servercert}.pem
  135. chmod 644 $RPM_BUILD_ROOT/%{pkidir}/CA/{cacert,servercert}.pem
  136. # install services file
  137. install -D -p -m 644 nessus-services $RPM_BUILD_ROOT/%{_localstatedir}/lib/nessus/nessus-services
  138. # plugin folder
  139. mkdir -m 0755 -p $RPM_BUILD_ROOT/%{_localstatedir}/lib/nessus/plugins
  140. # generate ghost config files
  141. touch $RPM_BUILD_ROOT/%{_sysconfdir}/nessus/nessusd.{conf,rules}
  142. chmod 600 $RPM_BUILD_ROOT/%{_sysconfdir}/nessus/nessusd.conf
  143. # fix multilib conflict for config.h (#342661)
  144. touch -r CHANGES $RPM_BUILD_ROOT%{_includedir}/nessus/config.h
  145. %clean
  146. rm -rf $RPM_BUILD_ROOT
  147. %post -n nessus-server
  148. # This adds the proper /etc/rc*.d links for the script
  149. if [ $1 = 1 ]; then
  150. /sbin/chkconfig --add nessusd
  151. fi
  152. %preun -n nessus-server
  153. if [ $1 = 0 ]; then
  154. /sbin/service nessusd stop >/dev/null 2>&1
  155. /sbin/chkconfig --del nessusd
  156. fi
  157. %postun -n nessus-server
  158. if [ "$1" -ge "1" ]; then
  159. /sbin/service nessusd condrestart >/dev/null 2>&1
  160. fi
  161. %files
  162. %defattr(-,root,root,-)
  163. %doc TODO CHANGES README_SSL doc/*txt doc/WARNING.* nessus/COPYING
  164. %{_bindir}/nessus-mkrand
  165. %{_bindir}/nessus-mkcert-client
  166. %{_mandir}/man1/nessus.1*
  167. %{_mandir}/man1/nessus-mkcert-client.1*
  168. %{_mandir}/man1/nessus-mkrand.1*
  169. %files devel
  170. %defattr(-,root,root,-)
  171. %doc doc/ntp/*
  172. %dir %{_includedir}/nessus
  173. %{_includedir}/nessus/*
  174. %exclude %{_includedir}/nessus/includes.h
  175. %files -n nessus-client
  176. %defattr(-,root,root,-)
  177. %{_bindir}/nessus-text
  178. %files -n nessus-gui
  179. %defattr(-,root,root,-)
  180. %{_bindir}/nessus
  181. %{_datadir}/pixmaps/nessus.xpm
  182. %{_datadir}/applications/*
  183. %files -n nessus-server
  184. %defattr(-,root,root,-)
  185. %{_bindir}/nessus-fetch
  186. %{_sbindir}/nessusd
  187. %{_sbindir}/nessus-mkcert
  188. %{_sbindir}/nessus-adduser
  189. %{_sbindir}/nessus-rmuser
  190. %{_sbindir}/nessus-check-signature
  191. %{_mandir}/man1/nessus-fetch.1*
  192. %{_mandir}/man8/*
  193. %{_initrddir}/nessusd
  194. %{_localstatedir}/lib/nessus/nessus-services
  195. %dir %{_localstatedir}/log/nessus
  196. %dir %{_localstatedir}/lib/nessus/
  197. %dir %{_localstatedir}/lib/nessus/plugins
  198. %dir %{_sysconfdir}/nessus
  199. %dir %{_sysconfdir}/pki/nessus
  200. %config(noreplace) %{_sysconfdir}/logrotate.d/nessusd
  201. %ghost %config(missingok,noreplace) %verify(not md5 size mtime) %{pkidir}/CA/*
  202. %ghost %config(missingok,noreplace) %verify(not md5 size mtime) %{pkidir}/private/CA/*
  203. %ghost %config(missingok,noreplace) %verify(not md5 size mtime) %{_sysconfdir}/nessus/*
  204. %changelog
  205. * Wed Nov 03 2010 Yoji TOYODA <bsyamato@sea.plala.or.jp> 2.2.11-5
  206. - rebuild with libpcap-1.1.1
  207. * Sat Apr 25 2009 Ryoichi INAGAKI <ryo1@bc.wakwak.com> - 2.2.11-4
  208. - updated nessus based on Fedora Development
  209. - added Patch100 for building on Vine
  210. * Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.2.11-3
  211. - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
  212. * Sat Jan 17 2009 Tomas Mraz <tmraz@redhat.com> - 2.2.11-2
  213. - rebuild with new openssl
  214. * Sun Nov 23 2008 Andreas Bierfert <andreas.bierfert[AT]lowlatency.de>
  215. - 2.2.11-1
  216. - fix #465113 FTBFS
  217. * Mon Feb 18 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 2.2.10-4
  218. - Autorebuild for GCC 4.3
  219. * Sat Dec 08 2007 Andreas Bierfert <andreas.bierfert[AT]lowlatency.de>
  220. - 2.2.10-3
  221. - fix build #399211 (patch from Oliver Falk)
  222. - fix multilib issues #342661
  223. - fix init scripts #246992
  224. * Thu Dec 06 2007 Release Engineering <rel-eng at fedoraproject dot org> - 2.2.10-2
  225. - Rebuild for deps
  226. * Wed Aug 22 2007 Andreas Bierfert <andreas.bierfert[AT]lowlatency.de>
  227. - 2.2.10-1
  228. - version upgrade
  229. - new license tag
  230. * Wed Apr 25 2007 Andreas Bierfert <andreas.bierfert[AT]lowlatency.de>
  231. 2.2.9-2
  232. - fix #233888
  233. * Tue Dec 19 2006 Andreas Bierfert <andreas.bierfert[AT]lowlatency.de>
  234. 2.2.9-1
  235. - version upgrade (#199399)
  236. * Sun Jun 18 2006 Andreas Bierfert <andreas.bierfert[AT]lowlatency.de>
  237. 2.2.8-1
  238. - version upgrade
  239. * Wed May 17 2006 Andreas Bierfert <andreas.bierfert[AT]lowlatency.de>
  240. 2.2.7-1
  241. - version upgrade
  242. * Mon Apr 03 2006 Andreas Bierfert <andreas.bierfert[AT]lowlatency.de>
  243. 2.2.6-3
  244. - fix description
  245. - create and own log dir
  246. - include copying
  247. * Sun Feb 26 2006 Andreas Bierfert <andreas.bierfert[AT]lowlatency.de>
  248. 2.2.6-2
  249. - fix buildroot
  250. - add source0 url
  251. * Fri Feb 24 2006 Andreas Bierfert <andreas.bierfert[AT]lowlatency.de>
  252. 2.2.6-1
  253. - initial version