]>
Commit | Line | Data |
---|---|---|
7f9fd563 | 1 | Summary: Simple packet filter generator |
32175b03 | 2 | Summary(pl.UTF-8): Prosty generator filtrów pakietów |
ef4ce574 JB |
3 | Name: filtergen |
4 | Version: 0.11 | |
a618bc0b | 5 | Release: 2 |
7f9fd563 | 6 | License: GPL |
e245dd89 | 7 | Group: Networking/Utilities |
7f9fd563 | 8 | Source0: http://hairy.beasts.org/filter/%{name}-%{version}.tar.gz |
ef4ce574 JB |
9 | # Source0-md5: de33c1dce928fe240b036498e56e545f |
10 | Source1: filter.conf | |
11 | Source2: filter.sysconfig | |
12 | Source3: filter.init | |
7f9fd563 | 13 | URL: http://hairy.beasts.org/filter/ |
14 | BuildRequires: flex | |
53e4f21e | 15 | BuildRequires: rpmbuild(macros) >= 1.268 |
6ba06abe | 16 | Requires(post,preun): /sbin/chkconfig |
04b79ebe | 17 | Requires: rc-scripts |
7f9fd563 | 18 | Provides: firewall |
ef4ce574 | 19 | Obsoletes: filter |
7f9fd563 | 20 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
21 | ||
22 | %description | |
23 | This tool is for generating packet filtering rules from a fairly high- | |
e245dd89 | 24 | level description language. It doesn't support all of the whizz-bang |
7f9fd563 | 25 | features of the latest and greatest packet filters, but supports a |
26 | decent subset which is sufficient for typical workstation. | |
27 | ||
e245dd89 | 28 | It currently supports only Linux iptables and ipchains. Cisco IOS has |
29 | been begun, but is incomplete. Darren Reed's ipfilter may be supported | |
30 | at some stage. It doesn't generate optimal rulesets, and has a few | |
7f9fd563 | 31 | limitations which need to be removed, but is still a useful tool. |
32 | ||
33 | Please read HONESTY file! | |
34 | ||
80696ddb JR |
35 | %description -l pl.UTF-8 |
36 | To jest narzędzie do generowania reguł filtrowania pakietów z | |
37 | względnie wysokopoziomowego języka opisu. Nie obsługuje wszystkich | |
38 | zaawansowanych możliwości najnowszych filtrów pakietów, ale wspiera | |
39 | przyzwoity podzbiór, wystarczający dla typowych stacji roboczych. | |
11434dde | 40 | |
80696ddb JR |
41 | Aktualnie obsługuje tylko linuksowe iptables i ipchains. Obsługa Cisco |
42 | IOS jest zaczęta, ale nie kompletna. ipfilter Darrena Reeda jest | |
43 | obsługiwany częściowo. Nie generuje optymalnych regułek i ma parę | |
44 | ograniczeń, które powinny być usunięte, ale mimo to jest użytecznym | |
45 | narzędziem. | |
11434dde JB |
46 | |
47 | Przeczytaj plik HONESTY! | |
48 | ||
7f9fd563 | 49 | %prep |
11434dde | 50 | %setup -q |
7f9fd563 | 51 | |
52 | %build | |
243f19af JB |
53 | %{__make} \ |
54 | CC="%{__cc}" \ | |
ef4ce574 | 55 | CFLAGS="%{rpmcflags} -Wall -Werror -Wno-unused" |
7f9fd563 | 56 | |
57 | %install | |
58 | rm -rf $RPM_BUILD_ROOT | |
ef4ce574 JB |
59 | install -d $RPM_BUILD_ROOT{%{_sbindir},%{_sysconfdir}/filter} \ |
60 | $RPM_BUILD_ROOT/etc/{sysconfig,rc.d/init.d} \ | |
3fbde289 | 61 | $RPM_BUILD_ROOT%{_mandir}/man{5,7,8} |
e245dd89 | 62 | |
11434dde | 63 | install filtergen $RPM_BUILD_ROOT%{_sbindir} |
3fbde289 | 64 | install filter_syntax.5 $RPM_BUILD_ROOT%{_mandir}/man5 |
65 | install filter_backends.7 $RPM_BUILD_ROOT%{_mandir}/man7 | |
66 | install filtergen.8 $RPM_BUILD_ROOT%{_mandir}/man8 | |
ef4ce574 | 67 | install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/filter/simple.conf |
97d944e7 | 68 | install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/%{name} |
69 | install %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name} | |
ef4ce574 | 70 | touch $RPM_BUILD_ROOT%{_sysconfdir}/filter/generated_rules |
7f9fd563 | 71 | |
7f9fd563 | 72 | %clean |
73 | rm -rf $RPM_BUILD_ROOT | |
74 | ||
ca8da575 | 75 | %post |
ef4ce574 | 76 | /sbin/chkconfig --add filtergen |
53e4f21e | 77 | %service filtergen restart "filtergen" |
ca8da575 | 78 | |
79 | %preun | |
80 | if [ "$1" = "0" ]; then | |
53e4f21e | 81 | %service filtergen stop |
ef4ce574 | 82 | /sbin/chkconfig --del filtergen |
ca8da575 | 83 | fi |
84 | ||
7f9fd563 | 85 | %files |
86 | %defattr(644,root,root,755) | |
011a428a | 87 | %doc README HONESTY HISTORY TODO tests |
c75c70a4 | 88 | %attr(755,root,root) %{_sbindir}/filtergen |
ef4ce574 | 89 | %dir %{_sysconfdir}/filter |
04b79ebe | 90 | %attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/filter/simple.conf |
ef4ce574 | 91 | %attr(600,root,root) %{_sysconfdir}/filter/generated_rules |
04b79ebe | 92 | %attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/%{name} |
97d944e7 | 93 | %attr(754,root,root) /etc/rc.d/init.d/%{name} |
3fbde289 | 94 | %{_mandir}/man5/* |
95 | %{_mandir}/man7/* | |
96 | %{_mandir}/man8/* |