ulogd-vl.spec 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367
  1. %bcond_with systemd
  2. %bcond_with doc
  3. Summary: Userspace logging daemon for netfilter
  4. Name: ulogd
  5. Version: 2.0.7
  6. Release: 2%{?_dist_release}%{?with_systemd:.systemd}
  7. Group: System Environment/Daemons
  8. Vendor: Project Vine
  9. Distribution: Vine Linux
  10. License: GPLv2+
  11. URL: https://netfilter.org/projects/ulogd/
  12. Source0: https://netfilter.org/projects/ulogd/files/%{name}-%{version}.tar.bz2
  13. Source1: %{name}.init
  14. Source2: %{name}.logrotate
  15. Source3: %{name}.service
  16. BuildRequires: libnetfilter_conntrack-devel >= 0.0.95
  17. BuildRequires: libnetfilter_log-devel >= 1.0.0
  18. BuildRequires: libnfnetlink-devel >= 0.0.39
  19. BuildRequires: libnetfilter_acct-devel >= 1.0.1
  20. BuildRequires: libmnl-devel
  21. %if %{with doc}
  22. BuildRequires: linuxdoc-tools
  23. BuildRequires: texlive-collection-fontsrecommended
  24. %endif
  25. %if %{with systemd}
  26. %{?systemd_requires}
  27. %else
  28. Requires(post): /sbin/service
  29. Requires(post): /sbin/chkconfig
  30. Requires(preun): /sbin/chkconfig
  31. Requires(preun): /sbin/service
  32. Requires(postun): /sbin/service
  33. %endif
  34. %description
  35. %{name} is a logging daemon that reads event messages coming from the Netfilter
  36. connection tracking and the Netfilter packet logging subsystem. You have to
  37. enable support for connection tracking event delivery; ctnetlink and the NFLOG
  38. target in your Linux kernel 2.6.x or load their respective modules. The
  39. deprecated ULOG target (which has been superseded by NFLOG) is also supported.
  40. %package libdbi
  41. Summary: Libdbi framework output plugin for %{name}
  42. Group: System Environment/Daemons
  43. BuildRequires: libdbi-devel
  44. Requires: %{name} = %{version}
  45. %description libdbi
  46. %{name}-libdbi is a libdbi output plugin for %{name}. It enables logging of
  47. firewall information through a libdbi interface.
  48. %package mysql
  49. Summary: MySQL output plugin for %{name}
  50. Group: System Environment/Daemons
  51. BuildRequires: libmariadb-devel
  52. Requires: %{name} = %{version}
  53. %description mysql
  54. %{name}-mysql is a MySQL output plugin for %{name}. It enables logging of
  55. firewall information into a MySQL database.
  56. %package pgsql
  57. Summary: PostgreSQL output plugin for %{name}
  58. Group: System Environment/Daemons
  59. BuildRequires: libpq-devel
  60. Requires: %{name} = %{version}
  61. %description pgsql
  62. %{name}-pgsql is a PostgreSQL output plugin for %{name}. It enables logging of
  63. firewall information into a PostgreSQL database.
  64. %package pcap
  65. Summary: PCAP output plugin for %{name}
  66. Group: System Environment/Daemons
  67. BuildRequires: libpcap-devel
  68. Requires: %{name} = %{version}
  69. %description pcap
  70. %{name}-pcap is a output plugin for %{name} that saves packet logs as PCAP
  71. file. PCAP is a standard format that can be later analyzed by a lot of tools
  72. such as tcpdump and wireshark.
  73. %package sqlite
  74. Summary: SQLITE output plugin for %{name}
  75. Group: System Environment/Daemons
  76. BuildRequires: sqlite3-devel
  77. Requires: %{name} = %{version}
  78. %description sqlite
  79. %{name}-sqlite is a SQLITE output plugin for %{name}. It enables logging of
  80. firewall information into an SQLITE database.
  81. %prep
  82. %setup -q
  83. %{__sed} -i -e 's|/var/log/|%{_localstatedir}/log/%{name}/|g' %{name}.conf.in
  84. %build
  85. %configure \
  86. --disable-static \
  87. --enable-shared \
  88. --with-dbi-lib=%{_libdir} \
  89. --with-pcap-lib=%{_libdir} \
  90. --with-sqlite3-lib=%{_libdir}
  91. %{__make} %{?_smp_mflags}
  92. %if %{with doc}
  93. %{__make} %{?_smp_mflags} -C doc
  94. %endif
  95. %install
  96. %{__rm} -rf %{buildroot}
  97. %{__make} DESTDIR=%{buildroot} install
  98. %{__mkdir_p} -m 0755 %{buildroot}%{_localstatedir}/log/%{name}/
  99. %{__mkdir_p} -m 0755 %{buildroot}%{_sysconfdir}/
  100. %{__install} -m 0644 %{name}.conf %{buildroot}%{_sysconfdir}/
  101. %{__mkdir_p} -m 0755 %{buildroot}%{_sysconfdir}/logrotate.d/
  102. %{__install} -m 0644 %{SOURCE2} %{buildroot}%{_sysconfdir}/logrotate.d/%{name}
  103. %if %{with systemd}
  104. %{__mkdir_p} -m 0755 %{buildroot}%{_unitdir}/
  105. %{__install} -m 0644 %{SOURCE3} %{buildroot}%{_unitdir}/%{name}.service
  106. %else
  107. %{__mkdir_p} -m 0755 %{buildroot}%{_initrddir}/
  108. %{__install} -m 0755 %{SOURCE1} %{buildroot}%{_initrddir}/%{name}
  109. %endif
  110. %post
  111. %if %{with systemd}
  112. %systemd_post %{name}.service
  113. %else
  114. /sbin/chkconfig --add %{name}
  115. /sbin/service %{name} condrestart >/dev/null 2>&1 || :
  116. %endif
  117. %preun
  118. %if %{with systemd}
  119. %systemd_preun %{name}.service
  120. %else
  121. # if we are uninstalling...
  122. if [ "$1" = 0 -o -x /bin/systemctl ]; then
  123. /sbin/service %{name} stop > /dev/null 2>&1 ||:
  124. /sbin/chkconfig --del %{name}
  125. fi
  126. %endif
  127. %postun
  128. %if %{with systemd}
  129. %systemd_postun_with_restart %{name}.service
  130. %else
  131. # if we are upgrading...
  132. if [ "$1" -ge "1" ]; then
  133. /sbin/service %{name} condrestart >/dev/null 2>&1 || :
  134. fi
  135. %endif
  136. %check
  137. %{__make} %{?_smp_mflags} check
  138. %clean
  139. %{__rm} -rf %{buildroot}
  140. %files
  141. %defattr(0755,root,root,0755)
  142. %{_sbindir}/%{name}
  143. %if %{with systemd}
  144. %{_unitdir}/%{name}.service
  145. %else
  146. %{_initrddir}/%{name}
  147. %endif
  148. %{_libdir}/%{name}
  149. %defattr(0644,root,root,0755)
  150. %license COPYING
  151. %doc AUTHORS README
  152. %if %{with doc}
  153. %doc doc/%{name}.txt doc/%{name}.ps doc/%{name}.html
  154. %endif
  155. %doc %{_mandir}/man?/*
  156. %config(noreplace) %{_sysconfdir}/%{name}.conf
  157. %config(noreplace) %{_sysconfdir}/logrotate.d/%{name}
  158. %dir %{_localstatedir}/log/%{name}
  159. %exclude %{_libdir}/%{name}/*.la
  160. %exclude %{_libdir}/%{name}/%{name}_output_DBI.so
  161. %exclude %{_libdir}/%{name}/%{name}_output_MYSQL.so
  162. %exclude %{_libdir}/%{name}/%{name}_output_PGSQL.so
  163. %exclude %{_libdir}/%{name}/%{name}_output_PCAP.so
  164. %exclude %{_libdir}/%{name}/%{name}_output_SQLITE3.so
  165. %files libdbi
  166. %defattr(0755,root,root,0755)
  167. %{_libdir}/%{name}/%{name}_output_DBI.so
  168. %defattr(0644,root,root,0755)
  169. %license COPYING
  170. %files mysql
  171. %defattr(0755,root,root,0755)
  172. %{_libdir}/%{name}/%{name}_output_MYSQL.so
  173. %defattr(0644,root,root,0755)
  174. %license COPYING
  175. %files pgsql
  176. %defattr(0755,root,root,0755)
  177. %{_libdir}/%{name}/%{name}_output_PGSQL.so
  178. %defattr(0644,root,root,0755)
  179. %license COPYING
  180. %files pcap
  181. %defattr(0755,root,root,0755)
  182. %{_libdir}/%{name}/%{name}_output_PCAP.so
  183. %defattr(0644,root,root,0755)
  184. %license COPYING
  185. %files sqlite
  186. %defattr(0755,root,root,0755)
  187. %{_libdir}/%{name}/%{name}_output_SQLITE3.so
  188. %defattr(0644,root,root,0755)
  189. %license COPYING
  190. %changelog
  191. * Sat Apr 18 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 2.0.7-2
  192. - added systemd support (disabled as default).
  193. * Sun Aug 25 2019 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 2.0.7-1
  194. - new upstream release.
  195. - added Source2: dropped in upstream.
  196. - disabled to build documents: raised tooooo many errors.
  197. * Sun Feb 25 2018 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 2.0.5-1
  198. - new upstream release.
  199. * Sun Jan 25 2015 Yoji TOYODA <bsyamato@sea.plala.or.jp> 2.0.4-3
  200. - rebuild with libdbi-0.9.0
  201. * Mon Jul 14 2014 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 2.0.4-2
  202. - fixed configuration for logrotate.
  203. * Sun Jun 29 2014 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 2.0.4-1
  204. - new upstream release.
  205. - initial build for Vine Linux.
  206. * Tue Sep 24 2013 Martin Preisler <mpreisle@redhat.com> 2.0.2-2
  207. - added accidentaly removed dist suffix in release
  208. - fixed up bogus dates in changelog
  209. * Mon Sep 09 2013 Martin Preisler <mpreisle@redhat.com> 2.0.2-1
  210. - update version
  211. * Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.0-5.beta4
  212. - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
  213. * Fri Feb 15 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.0-4.beta4
  214. - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
  215. * Sun Jul 22 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.0-3.beta4
  216. - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
  217. * Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.0-2.beta4
  218. - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
  219. * Wed Nov 23 2011 Stephen Beahm <stephenbeahm@comcast.net> - 2.0.0-1.beta4
  220. - update version.
  221. - spec review.
  222. - (rebased on top of the remaining 1.24 changes, original date was Nov 16 2010)
  223. * Wed Mar 23 2011 Dan Horák <dan@danny.cz> - 1.24-15
  224. - rebuilt for mysql 5.5.10 (soname bump in libmysqlclient)
  225. * Mon Feb 07 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.24-14
  226. - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
  227. * Fri Aug 21 2009 Tomas Mraz <tmraz@redhat.com> - 1.24-13
  228. - rebuilt with new openssl
  229. * Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.24-12
  230. - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
  231. * Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.24-11
  232. - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
  233. * Sat Jan 24 2009 Aurelien Bompard <abompard@fedoraproject.org> 1.24-10
  234. - rebuild for mysql
  235. * Mon Feb 18 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 1.24-9
  236. - Autorebuild for GCC 4.3
  237. * Wed Jan 9 2008 Leopold Aichinger <linuxtrainer@gmx.at> 1.24-8
  238. - Support for libpcap added
  239. * Thu Dec 06 2007 Release Engineering <rel-eng at fedoraproject dot org> - 1.24-7
  240. - Rebuild for deps
  241. * Tue Aug 14 2007 Aurelien Bompard <abompard@fedoraproject.org> 1.24-5
  242. - Fix the deprecated way of getting the DSO initializers run, causing
  243. builds to fails with rpm-build > 4.4.2.1-3 (new find-debuginfo.sh script)
  244. * Sat Jul 14 2007 Aurelien Bompard <abompard@fedoraproject.org> 1.24-4
  245. - add patch to fix bug 247345
  246. - update URL
  247. - fix initscript (bug 247083)
  248. - unmark init script as %%config (Fedora policy)
  249. * Sat Dec 09 2006 Aurelien Bompard <abompard@fedoraproject.org> 1.24-3
  250. - rebuild
  251. * Thu Aug 31 2006 Aurelien Bompard <abompard@fedoraproject.org> 1.24-2
  252. - rebuild
  253. * Wed Feb 22 2006 Aurelien Bompard <gauret[AT]free.fr> 1.24-1
  254. - version 1.24
  255. - drop patch3 (applied upstream)
  256. - drop patch4 (upstream uses mysql-config to detect libdir now)
  257. - drop patch5 (applied upstream)
  258. * Tue Feb 21 2006 Aurelien Bompard <gauret[AT]free.fr> 1.23-3
  259. - rebuild for FC5
  260. * Sun Jul 24 2005 Aurelien Bompard <gauret[AT]free.fr> 1.23-2
  261. - compress rotated logs
  262. - start after mysql in the init process
  263. - use dist tag
  264. * Tue Apr 19 2005 Aurelien Bompard <gauret[AT]free.fr> 1.23-1.fc4
  265. - version 1.23
  266. - change release tag for FC4
  267. - add patch for GCC4 (upstream bug #323)
  268. * Thu Apr 07 2005 Michael Schwendt <mschwendt[AT]users.sf.net>
  269. - rebuilt
  270. * Wed Mar 09 2005 Aurelien Bompard <gauret[AT]free.fr> 1.22-1
  271. - version 1.22
  272. - add gpg signature to sources
  273. * Sun Feb 20 2005 Aurelien Bompard <gauret[AT]free.fr> 1.21-1
  274. - version 1.21
  275. * Fri Dec 17 2004 Michael Schwendt <mschwendt[AT]users.sf.net> 1.02-8
  276. - revise x86_64 patch to remove more hardcoded /lib badness
  277. * Fri Dec 17 2004 Michael Schwendt <mschwendt[AT]users.sf.net> 1.02-7
  278. - x86_64, patch configure to look for mysql/pgsql below %%_libdir.
  279. - delete undefined %%epoch in mysql/pgsql sub package dep.
  280. * Sun Oct 31 2004 Aurelien Bompard <gauret[AT]free.fr> 1.02-6
  281. - apply Michael Schwendt's suggestions in bug 1598
  282. * Wed Oct 20 2004 Aurelien Bompard <gauret[AT]free.fr> 0:1.02-0.fdr.5
  283. - enable MySQL and PostgreSQL in subpackages
  284. - add man page from Debian
  285. * Wed Oct 06 2004 Aurelien Bompard <gauret[AT]free.fr> 0:1.02-0.fdr.4
  286. - apply QA suggestions (bug 1598)
  287. * Sat Jul 10 2004 Aurelien Bompard <gauret[AT]free.fr> 0:1.02-0.fdr.3
  288. - disable parallel builds
  289. - add chkconfig to Requires(pre,post)
  290. - set the right mode for /etc/logrotate.d/ulogd
  291. - rotate weekly
  292. * Sun May 16 2004 Aurelien Bompard <gauret[AT]free.fr> 0:1.02-0.fdr.2
  293. - Add Epoch: 0