ulogd-vl.spec 11 KB

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