ipset-vl.spec 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221
  1. Name: ipset
  2. Version: 6.23
  3. Release: 1%{?_dist_release}
  4. Group: Applications/System
  5. Summary: Manage Linux IP sets
  6. License: GPLv2
  7. URL: http://ipset.netfilter.org/
  8. Source0: http://ipset.netfilter.org/%{name}-%{version}.tar.bz2
  9. Source1: %{name}.service
  10. Source2: %{name}.start-stop
  11. BuildRequires: libmnl-devel
  12. # An explicit requirement is needed here, to avoid cases where a user would
  13. # explicitly update only one of the two (e.g 'yum update ipset')
  14. Requires: %{name}-libs%{?_isa} = %{version}-%{release}
  15. %description
  16. IP sets are a framework inside the Linux 2.4.x and 2.6.x kernel, which can be
  17. administered by the ipset utility. Depending on the type, currently an IP set
  18. may store IP addresses, (TCP/UDP) port numbers or IP addresses with MAC
  19. addresses in a way, which ensures lightning speed when matching an entry
  20. against a set.
  21. If you want to:
  22. - store multiple IP addresses or port numbers and match against the collection
  23. by iptables at one swoop;
  24. - dynamically update iptables rules against IP addresses or ports without
  25. performance penalty;
  26. - express complex IP address and ports based rulesets with one single iptables
  27. rule and benefit from the speed of IP sets
  28. then ipset may be the proper tool for you.
  29. %package libs
  30. Summary: Shared library providing the IP sets functionality
  31. Group: System Environment/Libraries
  32. %description libs
  33. This package contains the libraries which provide the IP sets funcionality.
  34. %package devel
  35. Summary: Development files for %{name}
  36. Group: Development/Libraries
  37. Requires: %{name}-libs%{?_isa} == %{version}-%{release}
  38. Requires: kernel-devel
  39. %description devel
  40. This package contains the files required to develop software using the %{name}
  41. libraries.
  42. %if 0
  43. %package service
  44. Summary: %{name} service for %{name}s
  45. Requires: %{name} = %{version}-%{release}
  46. BuildRequires: systemd
  47. Requires: iptables-services
  48. Requires(post): systemd
  49. Requires(preun): systemd
  50. Requires(postun): systemd
  51. BuildArch: noarch
  52. %description service
  53. This package provides the service %{name} that is split
  54. out of the base package since it is not active by default.
  55. %endif
  56. %prep
  57. %setup -q
  58. %build
  59. %configure --enable-static=no --with-kmod=no
  60. # Just to make absolutely sure we are not building the bundled kernel module
  61. # I have to do it after the configure run unfortunately
  62. rm -fr kernel
  63. # Prevent libtool from defining rpath
  64. sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
  65. sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
  66. make %{?_smp_mflags}
  67. %install
  68. make install DESTDIR=%{buildroot}
  69. find %{buildroot} -name '*.la' -exec rm -f '{}' \;
  70. %if 0
  71. # install systemd unit file
  72. install -d -m 755 %{buildroot}/%{_unitdir}
  73. install -c -m 644 %{SOURCE1} %{buildroot}/%{_unitdir}
  74. %endif
  75. # install supporting script
  76. install -d -m 755 %{buildroot}%{_libexecdir}/%{name}
  77. install -c -m 755 %{SOURCE2} %{buildroot}%{_libexecdir}/%{name}
  78. # Create directory for configuration
  79. mkdir -p %{buildroot}%{_sysconfdir}/%{name}
  80. %preun
  81. if [[ $1 -eq 0 && -n $(lsmod | grep "^xt_set ") ]]; then
  82. rmmod xt_set 2>/dev/null
  83. [[ $? -ne 0 ]] && echo Current iptables configuration requires ipsets && exit 1
  84. fi
  85. %post libs -p /sbin/ldconfig
  86. %postun libs -p /sbin/ldconfig
  87. %if 0
  88. %post service
  89. %systemd_post %{name}.service
  90. %preun service
  91. if [[ $1 -eq 0 && -n $(lsmod | grep "^xt_set ") ]]; then
  92. rmmod xt_set 2>/dev/null
  93. [[ $? -ne 0 ]] && echo Current iptables configuration requires ipsets && exit 1
  94. fi
  95. %systemd_preun %{name}.service
  96. %postun service
  97. %systemd_postun_with_restart %{name}.service
  98. %endif
  99. %files
  100. %doc COPYING ChangeLog
  101. %doc %{_mandir}/man8/%{name}.8.gz
  102. %{_sbindir}/%{name}
  103. %files libs
  104. %doc COPYING
  105. %{_libdir}/lib%{name}.so.3*
  106. %files devel
  107. %{_includedir}/lib%{name}
  108. %{_libdir}/lib%{name}.so
  109. %{_libdir}/pkgconfig/lib%{name}.pc
  110. %if 0
  111. %files service
  112. %{_unitdir}/%{name}.service
  113. %dir %{_libexecdir}/%{name}
  114. %attr(0755,root,root) %{_libexecdir}/%{name}/%{name}.start-stop
  115. %dir %{_sysconfdir}/%{name}
  116. %endif
  117. %changelog
  118. * Sat Nov 1 2014 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 6.23-1
  119. - built for Vine Linux.
  120. - new upstream release.
  121. * Thu Sep 18 2014 Mathieu Bridon <bochecha@fedoraproject.org> - 6.22-1
  122. - New upstream release.
  123. * Sat Aug 16 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 6.21.1-4
  124. - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
  125. * Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 6.21.1-3
  126. - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
  127. * Tue Mar 11 2014 Mathieu Bridon <bochecha@fedoraproject.org> - 6.21.1-2
  128. - Remove runtime requirement on the kernel.
  129. https://lists.fedoraproject.org/pipermail/devel/2014-March/196565.html
  130. * Tue Oct 29 2013 Mathieu Bridon <bochecha@fedoraproject.org> - 6.20.1-1
  131. - New upstream release.
  132. * Tue Aug 27 2013 Quentin Armitage <quentin@armitage.org.uk> 6.19-2
  133. - Add service pkg - adds save and reload functionality on shutdown/startup
  134. - Add requires dependency of ipset on matching ipset-libs
  135. * Thu Aug 15 2013 Mathieu Bridon <bochecha@fedoraproject.org> - 6.19-1
  136. - New upstream release.
  137. * Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 6.16.1-3
  138. - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
  139. * Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 6.16.1-2
  140. - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
  141. * Wed Sep 26 2012 Mathieu Bridon <bochecha@fedoraproject.org> - 6.16.1-1
  142. - New upstream release.
  143. - Fix a requirement.
  144. * Wed Sep 26 2012 Mathieu Bridon <bochecha@fedoraproject.org> - 6.14-1
  145. - New upstream release.
  146. - Fix scriptlets, ldconfig is needed for the libs subpackage, not the main one.
  147. * Mon Jul 30 2012 Mathieu Bridon <bochecha@fedoraproject.org> - 6.13-1
  148. - New upstream release.
  149. - Split out the library in its own subpackage.
  150. * Thu Jul 19 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 6.11-2
  151. - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
  152. * Mon Feb 06 2012 Mathieu Bridon <bochecha@fedoraproject.org> - 6.11-1
  153. - New upstream release.
  154. - Removed our patch, it has been integrated upstream. As such, we also don't
  155. need to re-run autoreconf any more.
  156. * Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 6.9.1-3
  157. - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
  158. * Fri Sep 16 2011 Mathieu Bridon <bochecha@fedoraproject.org> - 6.9.1-2
  159. - Some fixes based on Pierre-Yves' review feedback.
  160. * Wed Sep 14 2011 Mathieu Bridon <bochecha@fedoraproject.org> - 6.9.1-1
  161. - Initial packaging.