ipset-vl.spec 7.0 KB

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