iptables-vl.spec 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405
  1. %bcond_with systemd
  2. Summary: Packet filtering tool
  3. Summary(ja): パケットフィルタリングツール
  4. Name: iptables
  5. Version: 1.8.10
  6. Release: 1%{?_dist_release}%{?with_systemd:.systemd}
  7. Group: admin-tools,network
  8. Vendor: Project Vine
  9. Distribution: Vine Linux
  10. Packager: daisuke
  11. # pf.os: ISC license
  12. # iptables-apply: Artistic Licence 2.0
  13. License: GPLv2 and Artistic Licence 2.0 and ISC
  14. URL: http://www.netfilter.org/
  15. Source0: http://www.netfilter.org/projects/iptables/files/%{name}-%{version}.tar.xz
  16. Source1: iptables.init
  17. Source2: iptables-config
  18. Source3: iptables.service
  19. Source4: sysconfig_iptables
  20. Source5: sysconfig_ip6tables
  21. BuildRoot: %{_tmppath}/%{name}-%{version}-root
  22. BuildRequires: bison flex perl
  23. BuildRequires: kernel-headers >= 2.4.0
  24. BuildRequires: libmnl-devel
  25. BuildRequires: libnetfilter_conntrack-devel
  26. BuildRequires: libnfnetlink-devel
  27. BuildRequires: libnftnl-devel
  28. BuildRequires: libpcap-devel
  29. Conflicts : kernel < 2.4.20
  30. %if %{with systemd}
  31. %{?systemd_requires}
  32. %else
  33. Requires(post): chkconfig
  34. Requires(preun): chkconfig
  35. %endif
  36. %global script_path %{_libexecdir}/iptables
  37. %description
  38. The iptables utility controls the network packet filtering code in the
  39. Linux kernel. If you need to set up firewalls and/or IP masquerading,
  40. you should install this package.
  41. %description -l ja
  42. iptables は Linux kernel のネットワークパケットフィルタを制御するための
  43. ユーティリティです。これを用いることで、ファイアウオールや IP マスカレー
  44. ディング, NAT などを設定することができます。
  45. %package devel
  46. Summary: Libraries, includes, etc. to develop iptables
  47. Summary(ja): iptables 開発用ライブラリ、ヘッダファイル
  48. Group: programming
  49. Requires: iptables = %{version}-%{release}
  50. %description devel
  51. Libraries, include files, etc you can use to develop iptables.
  52. %description devel -l ja
  53. iptables を用いた開発に使用するライブラリやヘッダファイルです。
  54. %package ipv6
  55. Summary: IPv6 Packet filtering tool
  56. Summary(ja): IPv6 用パケットフィルタリングツール
  57. Group: admin-tools,network
  58. Requires: %{name} = %{version}-%{release}
  59. Requires(post): chkconfig
  60. Requires(preun): chkconfig
  61. %description ipv6
  62. The iptables package contains IPv6 (the next version of the IP
  63. protocol) support for iptables. Iptables controls the Linux kernel
  64. network packet filtering code, allowing you to set up firewalls and IP
  65. masquerading.
  66. %description ipv6 -l ja
  67. iptables-ipv6 は iptables で IPv6 をサポートするためのパッケージです。
  68. これを用いることで、IPv6 環境におけるファイアウオールや IP マスカレー
  69. ディング, NAT などを設定することができます。
  70. %debug_package
  71. %prep
  72. %autosetup -p1
  73. %build
  74. ./autogen.sh
  75. CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing" \
  76. %configure \
  77. --enable-devel \
  78. --enable-bpf-compiler \
  79. --enable-libipq \
  80. --bindir=/bin \
  81. --sbindir=/sbin \
  82. --libexecdir=/%{_lib} \
  83. --with-xtlibdir=/%{_lib}/xtables \
  84. --with-kernel=/usr \
  85. --with-kbuild=/usr \
  86. --with-ksource=/usr
  87. # do not use rpath
  88. sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
  89. sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
  90. rm -f include/linux/types.h
  91. %make_build
  92. %install
  93. rm -rf %{buildroot}
  94. make install DESTDIR=%{buildroot}
  95. # remove la file(s)
  96. rm -f %{buildroot}/%{_libdir}/*.la
  97. install -d -m 755 %{buildroot}/etc/sysconfig
  98. install -c -m 755 %{SOURCE2} %{buildroot}/etc/sysconfig/iptables-config
  99. sed -e 's;iptables;ip6tables;g' -e 's;IPTABLES;IP6TABLES;g' < %{SOURCE2} > ip6tables-config
  100. install -c -m 755 ip6tables-config %{buildroot}/etc/sysconfig/ip6tables-config
  101. %if %{with systemd}
  102. # install systemd service files
  103. install -d -m 755 %{buildroot}/%{_unitdir}
  104. install -c -m 644 %{SOURCE3} %{buildroot}/%{_unitdir}
  105. sed -e 's;iptables;ip6tables;g' -e 's;IPv4;IPv6;g' -e 's;/usr/libexec/ip6tables;/usr/libexec/iptables;g' < %{SOURCE3} > ip6tables.service
  106. install -c -m 644 ip6tables.service %{buildroot}/%{_unitdir}
  107. # install init scripts and configuration files
  108. install -d -m 755 %{buildroot}%{script_path}
  109. install -c -m 755 %{SOURCE1} %{buildroot}%{script_path}/iptables.init
  110. sed -e 's;iptables;ip6tables;g' -e 's;IPTABLES;IP6TABLES;g' < %{SOURCE1} > ip6tables.init
  111. install -c -m 755 ip6tables.init %{buildroot}%{script_path}/ip6tables.init
  112. install -c -m 600 %{SOURCE4} %{buildroot}%{_sysconfdir}/sysconfig/iptables
  113. install -c -m 600 %{SOURCE5} %{buildroot}%{_sysconfdir}/sysconfig/ip6tables
  114. %else
  115. # install init scripts and configuration files
  116. install -d -m 755 %{buildroot}/etc/rc.d/init.d
  117. install -c -m 755 %{SOURCE1} %{buildroot}/etc/rc.d/init.d/iptables
  118. sed -e 's;iptables;ip6tables;g' -e 's;IPTABLES;IP6TABLES;g' < %{SOURCE1} > ip6tables.init
  119. install -c -m 755 ip6tables.init %{buildroot}/etc/rc.d/init.d/ip6tables
  120. %endif
  121. %clean
  122. rm -rf %{buildroot}
  123. %post
  124. %if %{with systemd}
  125. %systemd_post iptables.service
  126. %else
  127. /sbin/chkconfig --add iptables
  128. %endif
  129. %preun
  130. %if %{with systemd}
  131. %systemd_preun iptables.service
  132. %else
  133. if [ "$1" = 0 ]; then
  134. /sbin/chkconfig --del iptables
  135. fi
  136. %endif
  137. %if %{with systemd}
  138. %postun
  139. %systemd_postun iptables.service
  140. %endif
  141. %post ipv6
  142. %if %{with systemd}
  143. %systemd_post ip6tables.service
  144. %else
  145. /sbin/chkconfig --add ip6tables
  146. %endif
  147. %preun ipv6
  148. %if %{with systemd}
  149. %systemd_preun ip6tables.service
  150. %else
  151. if [ "$1" = 0 ]; then
  152. /sbin/chkconfig --del ip6tables
  153. fi
  154. %endif
  155. %if %{with systemd}
  156. %postun ipv6
  157. %systemd_postun ip6tables.service
  158. %endif
  159. %files
  160. %defattr(-,root,root)
  161. %license COPYING
  162. %doc INSTALL INCOMPATIBILITIES
  163. %if %{with systemd}
  164. %{_unitdir}/iptables.service
  165. %dir %{script_path}
  166. %{script_path}/iptables.init
  167. %config(noreplace) %attr(0600,root,root) /etc/sysconfig/iptables
  168. %else
  169. %attr(0755,root,root) /etc/rc.d/init.d/iptables
  170. %endif
  171. %config(noreplace) %attr(0600,root,root) /etc/sysconfig/iptables-config
  172. %config(noreplace) %attr(0600,root,root) /etc/ethertypes
  173. /sbin/arptables*
  174. /sbin/ebtables*
  175. /sbin/iptables*
  176. /sbin/nfbpf_compile
  177. /sbin/nfnl_osf
  178. /sbin/xtables-*
  179. %{_mandir}/man1/*
  180. %{_mandir}/man8/*
  181. %exclude %{_mandir}/man8/ip6tables*
  182. %dir /%{_lib}/xtables
  183. /%{_lib}/xtables/libarpt*
  184. /%{_lib}/xtables/libebt*
  185. /%{_lib}/xtables/libipt*
  186. /%{_lib}/xtables/libxt*
  187. %{_libdir}/libip*tc.so.*
  188. %{_libdir}/libxtables.so.*
  189. %{_libdir}/libipq.so.*
  190. %dir %{_datadir}/xtables
  191. %{_datadir}/xtables/pf.os
  192. %{_datadir}/xtables/iptables.xslt
  193. %files ipv6
  194. %defattr(-,root,root)
  195. %if %{with systemd}
  196. %{_unitdir}/ip6tables.service
  197. %dir %{script_path}
  198. %{script_path}/ip6tables.init
  199. %config(noreplace) %attr(0600,root,root) /etc/sysconfig/ip6tables
  200. %else
  201. %attr(0755,root,root) /etc/rc.d/init.d/ip6tables
  202. %endif
  203. %config(noreplace) %attr(0600,root,root) /etc/sysconfig/ip6tables-config
  204. /sbin/ip6tables*
  205. /bin/iptables-xml
  206. %{_mandir}/man8/ip6tables*
  207. /%{_lib}/xtables/libip6t*
  208. %files devel
  209. %defattr(-,root,root)
  210. %{_includedir}/*.h
  211. %dir %{_includedir}/libiptc
  212. %{_includedir}/libiptc/*.h
  213. %{_mandir}/man3/*
  214. %{_libdir}/lib*.so
  215. %{_libdir}/pkgconfig/*.pc
  216. %changelog
  217. * Fri Oct 20 2023 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.8.10-1
  218. - new upstream release.
  219. * Fri Mar 12 2021 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.8.7-1
  220. - new upstream release.
  221. - updated ip{,6}tables.service.
  222. - imported Patch1 from rawhide.
  223. * Sun Apr 05 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.8.4-2
  224. - added --wait option to ip{,6}tables.init.
  225. * Sun Apr 05 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.8.4-1
  226. - new upstream release.
  227. - added systemd stuff (disabled as default).
  228. * Mon Sep 02 2019 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.8.3-1
  229. - new upstream release.
  230. * Sat Feb 24 2018 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.6.2-1
  231. - new upstream release.
  232. * Tue Dec 10 2013 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.4.21
  233. - new upstream release.
  234. * Fri Oct 19 2012 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> 1.4.16.3
  235. - new upstream release 1.4.16.2
  236. - update source1 url
  237. * Thu Oct 18 2012 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> 1.4.16.2
  238. - new upstream release 1.4.16.2
  239. - fix ipv6 subpackage ja discription
  240. - drop old patch
  241. - add with-xtlibdir in configure section
  242. * Fri Apr 22 2011 Daisuke SUZUKI <daisuke@linux.or.jp> 1.4.10-1
  243. - update to 1.4.10
  244. * Thu Mar 04 2010 Daisuke SUZUKI <daisuke@linux.or.jp> 1.4.7-1
  245. - new upstream release
  246. * Wed Aug 12 2009 Daisuke SUZUKI <daisuke@linux.or.jp> 1.4.4-2
  247. - don't fail initscript if config file is not found.
  248. * Wed Jun 17 2009 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> 1.4.4-1
  249. - new upstream release
  250. * Mon Apr 13 2009 Daisuke SUZUKI <daisuke@linux.or.jp> 1.4.3.2-1
  251. - new upstream release
  252. * Mon Apr 13 2009 Daisuke SUZUKI <daisuke@linux.or.jp> 1.4.3.1-1
  253. - new upstream release
  254. - libiptc is now shared
  255. - drop patch1
  256. - update patch2
  257. - fix typo in spec file
  258. * Fri Apr 03 2009 Daisuke SUZUKI <daisuke@linux.or.jp> 1.4.2-2
  259. - rebuild to add sign..
  260. * Wed Apr 01 2009 Daisuke SUZUKI <daisuke@linux.or.jp> 1.4.2-1
  261. - new upstream release
  262. - spec in utf-8
  263. * Sat Jul 28 2007 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.3.6-0vl2
  264. - changed devel package Group to Development/Libraries
  265. * Sat Nov 04 2006 Daisuke SUZUKI <daisuke@linux.or.jp> 1.3.6-0vl1
  266. - new upstream release
  267. - remove libiptc.a from %%files
  268. - libiptc is not a public interface
  269. * Wed Sep 06 2006 Kazutaka HARADA <kazutaka@dc4.so-net.ne.jp> 1.3.5-0vl4
  270. - updates Summaries and Descriptions (<BTS:0101>)
  271. * Sun Aug 13 2006 Daisuke SUZUKI <daisuke@linux.or.jp> 1.3.5-0vl3
  272. - updates Summaries (<BTS:0101>)
  273. * Thu Jul 06 2006 MATSUBAYASHI Kohji <shaolin@vinelinux.org> 1.3.5-0vl2
  274. - add Patch10 (to include libipt_recent.so)
  275. * Tue Jun 13 2006 Daisuke SUZUKI <daisuke@linux.or.jp> 1.3.5-0vl1
  276. - new upstream release
  277. * Tue Jun 22 2004 Daisuke SUZUKI <daisuke@linux.or.jp> 1.2.11-0vl1
  278. - new upstream release
  279. * Thu Jun 17 2004 Daisuke SUZUKI <daisuke@linux.or.jp> 1.2.10-0vl1
  280. - new upstream release
  281. * Fri Nov 21 2003 Daisuke SUZUKI <daisuke@linux.or.jp> 1.2.9-0vl1
  282. - new upstream release
  283. * Thu Jul 24 2003 Takeru INOUE <takeru.inoue@gamma.ocn.ne.jp> 1.2.7a-0vl3
  284. - add ipv6 version
  285. * Sun Mar 23 2003 Takeru INOUE <takeru.inoue@gamma.ocn.ne.jp> 1.2.7a-0vl2
  286. - rebuild development version
  287. * Sun Sep 29 2002 Daisuke SUZUKI <daisuke@linux.or.jp> 1.2.7a-0vl1
  288. - new upstream release 1.2.7a
  289. * Mon Mar 25 2002 Seiya Nishizawa <seiya@kugi.kyoto-u.ac.jp> 1.2.6-0vl0
  290. - updated to 1.2.6
  291. * Thu Mar 07 2002 Toru Sagami <sagami@vinelinux.org> 1.2.5-0vl1
  292. - kernel24 -> kernel for Requires
  293. * Sat Mar 02 2002 Toru Sagami <sagami@vinelinux.org> 1.2.5-0vl0
  294. - updated to 1.2.5 and merged with RHL's spec
  295. - compatibilities: %%{_sbindir} -> /sbin, %%{_libdir} -> /lib
  296. * Mon Nov 19 2001 Daisuke SUZUKI <daisuke@linux.or.jp> 1.2.2-2vl1
  297. - build for Vine Linux based on conectiva iptables package.
  298. * Sun Jun 17 2001 Harald Welte <laforge@conectiva.com>
  299. + iptables-1.2.2-2cl
  300. - fixes iptables-save / -restore problems (Closes: #3673)
  301. - fixes REJECT save problem
  302. - fixes ipv6 compile problem
  303. - moved binaries to sbindir instead of bindir
  304. * Wed May 30 2001 Harald Welte <laforge@conectiva.com>
  305. + iptables-1.2.2-1cl
  306. - updated to 1.2.2 (Closes: #3376)
  307. * Wed May 30 2001 Wanderlei Antonio Cavassin <cavassin@conectiva.com>
  308. + iptables-1.2.1a-2cl
  309. - recompiled for kernel-2.4.4-2cl (Closes: #3354)
  310. - spec file changes provided by Vagner Farias <vfarias@conectiva.com>
  311. * Fri Apr 20 2001 Harald Welte <laforge@conectiva.com>
  312. + iptables-1.2.1a-1cl
  313. - updated to version 1.2.1a because of various bugfixes
  314. * Fri Mar 16 2001 Harald Welte <laforge@conectiva.com>
  315. + iptables-1.2.1-1cl
  316. - updated to version 1.2.1
  317. * Wed Jan 10 2001 Andreas Hasenack <andreas@conectiva.com>
  318. - updated to version 1.2
  319. - added requirement for kernel >= 2.4.0
  320. * Thu Dec 14 2000 Andreas Hasenack <andreas@conectiva.com>
  321. - first package for Conectiva Linux