* [PATCH] Makefile for man pages of xtables extensions
@ 2007-09-03 12:48 Laszlo Attila Toth
2007-09-05 13:45 ` Patrick McHardy
0 siblings, 1 reply; 4+ messages in thread
From: Laszlo Attila Toth @ 2007-09-03 12:48 UTC (permalink / raw)
To: netfilter-devel
[-- Attachment #1: Type: text/plain, Size: 537 bytes --]
Hello,
I made this patch to include all available matches and targets to
iptables.8 and ip6tables.8 man pages. The source file is lixt_*.c but
the man page is libipt_*.man or libip6t.man as expected.
If there are additional matches and targets (extra, as in POM), the
variable named "extra" is used which was unescaped.
But I found that in the generated man pages of the svn version of
modules the title is
... (not supported, see Patch-O-Matic)
for instance helper, length, limit etc. Is it intended?
Regards,
Laszlo Attila Toth
[-- Attachment #2: iptables-make.diff --]
[-- Type: text/x-patch, Size: 2918 bytes --]
--- iptables.orig/extensions/Makefile 2007-08-07 10:03:05.000000000 +0200
+++ iptables/extensions/Makefile 2007-09-03 14:28:44.000000000 +0200
@@ -29,6 +29,11 @@
PF6_EXT_MAN_ALL_MATCHES:=$(foreach T,$(PF6_EXT_ALL_SLIB),$(shell test -f extensions/libip6t_$(T).man && grep -q register_match6 extensions/libip6t_$(T).c && echo $(T)))
PF6_EXT_MAN_ALL_TARGETS:=$(foreach T,$(PF6_EXT_ALL_SLIB),$(shell test -f extensions/libip6t_$(T).man && grep -q register_target6 extensions/libip6t_$(T).c && echo $(T)))
+PF_EXT_MAN_ALL_MATCHES+=$(foreach T,$(PFX_EXT_ALL_SLIB),$(shell test -f extensions/libipt_$(T).man && grep -q register_match extensions/libxt_$(T).c && echo $(T)))
+PF_EXT_MAN_ALL_TARGETS+=$(foreach T,$(PFX_EXT_ALL_SLIB),$(shell test -f extensions/libipt_$(T).man && grep -q register_target extensions/libxt_$(T).c && echo $(T)))
+PF6_EXT_MAN_ALL_MATCHES+=$(foreach T,$(PFX_EXT_ALL_SLIB),$(shell test -f extensions/libip6t_$(T).man && grep -q register_match6 extensions/libxt_$(T).c && echo $(T)))
+PF6_EXT_MAN_ALL_TARGETS+=$(foreach T,$(PFX_EXT_ALL_SLIB),$(shell test -f extensions/libip6t_$(T).man && grep -q register_target6 extensions/libxt_$(T).c && echo $(T)))
+
PF_EXT_MAN_MATCHES:=$(filter $(PF_EXT_ALL_SLIB), $(PF_EXT_MAN_ALL_MATCHES))
PF_EXT_MAN_TARGETS:=$(filter $(PF_EXT_ALL_SLIB), $(PF_EXT_MAN_ALL_TARGETS))
PF_EXT_MAN_EXTRA_MATCHES:=$(filter-out $(PF_EXT_MAN_MATCHES), $(PF_EXT_MAN_ALL_MATCHES))
@@ -141,7 +146,7 @@
cat extensions/libipt_$$ext.man ;\
done >extensions/libipt_targets.man
@if [ -n "$(PF_EXT_MAN_EXTRA_TARGETS)" ]; then \
- extra=$(PF_EXT_MAN_EXTRA_TARGETS) ;\
+ extra="$(PF_EXT_MAN_EXTRA_TARGETS)" ;\
for ext in $${extra:-""}; do \
echo ".SS $$ext (not supported, see Patch-O-Matic)" ;\
cat extensions/libipt_$$ext.man ;\
@@ -155,7 +160,7 @@
cat extensions/libipt_$$ext.man ;\
done >extensions/libipt_matches.man
@if [ -n "$(PF_EXT_MAN_EXTRA_MATCHES)" ]; then \
- extra=$(PF_EXT_MAN_EXTRA_MATCHES) ;\
+ extra="$(PF_EXT_MAN_EXTRA_MATCHES)" ;\
for ext in $${extra:-""}; do \
echo ".SS $$ext (not supported, see Patch-O-Matic)" ;\
cat extensions/libipt_$$ext.man ;\
@@ -169,7 +174,7 @@
cat extensions/libip6t_$$ext.man ;\
done >extensions/libip6t_targets.man
@if [ -n "$(PF6_EXT_MAN_EXTRA_TARGETS)" ]; then \
- extra=$(PF6_EXT_MAN_EXTRA_TARGETS) ;\
+ extra="$(PF6_EXT_MAN_EXTRA_TARGETS)" ;\
for ext in $${extra:-""}; do \
echo ".SS $$ext (not supported, see Patch-O-Matic)" ;\
cat extensions/libip6t_$$ext.man ;\
@@ -183,7 +188,7 @@
cat extensions/libip6t_$$ext.man ;\
done >extensions/libip6t_matches.man
@if [ -n "$(PF6_EXT_MAN_EXTRA_MATCHES)" ]; then \
- extra=$(PF6_EXT_MAN_EXTRA_MATCHES) ;\
+ extra="$(PF6_EXT_MAN_EXTRA_MATCHES)" ;\
for ext in $${extra:-""}; do \
echo ".SS $$ext (not supported, see Patch-O-Matic)" ;\
cat extensions/libip6t_$$ext.man ;\
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH] Makefile for man pages of xtables extensions 2007-09-03 12:48 [PATCH] Makefile for man pages of xtables extensions Laszlo Attila Toth @ 2007-09-05 13:45 ` Patrick McHardy 2007-09-05 15:58 ` [PATCH] Makefile for man pages of xtables extensions + connrate Laszlo Attila Toth 0 siblings, 1 reply; 4+ messages in thread From: Patrick McHardy @ 2007-09-05 13:45 UTC (permalink / raw) To: panther; +Cc: netfilter-devel Laszlo Attila Toth wrote: > Hello, > > I made this patch to include all available matches and targets to > iptables.8 and ip6tables.8 man pages. The source file is lixt_*.c but > the man page is libipt_*.man or libip6t.man as expected. Thanks for taking care of this. Mid term we should probably also move to a single source file for the xtables manpages, they *should* be identical anyways. > But I found that in the generated man pages of the svn version of > modules the title is > ... (not supported, see Patch-O-Matic) > for instance helper, length, limit etc. Is it intended? No, matches and targets available in the kernel should not be marked as not supported. Care to send another patch to fix this? > --- iptables.orig/extensions/Makefile 2007-08-07 10:03:05.000000000 +0200 > +++ iptables/extensions/Makefile 2007-09-03 14:28:44.000000000 +0200 > @@ -29,6 +29,11 @@ > PF6_EXT_MAN_ALL_MATCHES:=$(foreach T,$(PF6_EXT_ALL_SLIB),$(shell test -f extensions/libip6t_$(T).man && grep -q register_match6 extensions/libip6t_$(T).c && echo $(T))) > PF6_EXT_MAN_ALL_TARGETS:=$(foreach T,$(PF6_EXT_ALL_SLIB),$(shell test -f extensions/libip6t_$(T).man && grep -q register_target6 extensions/libip6t_$(T).c && echo $(T))) > > +PF_EXT_MAN_ALL_MATCHES+=$(foreach T,$(PFX_EXT_ALL_SLIB),$(shell test -f extensions/libipt_$(T).man && grep -q register_match extensions/libxt_$(T).c && echo $(T))) > +PF_EXT_MAN_ALL_TARGETS+=$(foreach T,$(PFX_EXT_ALL_SLIB),$(shell test -f extensions/libipt_$(T).man && grep -q register_target extensions/libxt_$(T).c && echo $(T))) > +PF6_EXT_MAN_ALL_MATCHES+=$(foreach T,$(PFX_EXT_ALL_SLIB),$(shell test -f extensions/libip6t_$(T).man && grep -q register_match6 extensions/libxt_$(T).c && echo $(T))) > +PF6_EXT_MAN_ALL_TARGETS+=$(foreach T,$(PFX_EXT_ALL_SLIB),$(shell test -f extensions/libip6t_$(T).man && grep -q register_target6 extensions/libxt_$(T).c && echo $(T))) This doesn't work for IPv6 extensions. We use xtables_register_match for both IPv4 and IPv6. I've changed this in your patch and applied it. Thanks again. ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] Makefile for man pages of xtables extensions + connrate 2007-09-05 13:45 ` Patrick McHardy @ 2007-09-05 15:58 ` Laszlo Attila Toth 2007-09-06 9:56 ` Patrick McHardy 0 siblings, 1 reply; 4+ messages in thread From: Laszlo Attila Toth @ 2007-09-05 15:58 UTC (permalink / raw) To: Patrick McHardy; +Cc: netfilter-devel [-- Attachment #1: Type: text/plain, Size: 1024 bytes --] Patrick McHardy írta: > Laszlo Attila Toth wrote: >> But I found that in the generated man pages of the svn version of >> modules the title is >> ... (not supported, see Patch-O-Matic) >> for instance helper, length, limit etc. Is it intended? > > > No, matches and targets available in the kernel should not be > marked as not supported. Care to send another patch to fix this? > I made a new patch for connrate: it was not optional (not tested) and wasn't in the Makefile's PF_EXT_SLIB: line. It is not in the kernel version 2.6.23-rc3 (linus.git) I made the following changes in extensions/Makefile: * no extra target/match by default :) * man page of fix modules (PF_EXT_SLIB etc.) plus optional (...SLIB_OPTS) modules generated, but not all. * because of the previous one I had to rename PF_EXT_SE_SLIB to PF_EXT_SELINUX_SLIB etc. as a non-optional variable, original PF_EXT_SE_SLIB gets the value of PF_EXT_SELINUX_SLIB if DO_SELINUX is set to 1. Regards, Attila [-- Attachment #2: iptables-connrate-test.diff --] [-- Type: text/x-patch, Size: 233 bytes --] --- /dev/null 2007-07-09 10:36:18.000000000 +0200 +++ iptables/extensions/.connrate-test 2007-09-05 17:25:26.000000000 +0200 @@ -0,0 +1,3 @@ +#!/bin/bash + +[[ -e "$KERNEL_DIR/linux/netfilter_ipv4/ipt_connrate.h" ]] && echo connrate [-- Attachment #3: iptables-make2.diff --] [-- Type: text/x-patch, Size: 5024 bytes --] --- iptables.r7035/extensions/Makefile 2007-09-05 16:39:46.000000000 +0200 +++ iptables/extensions/Makefile 2007-09-05 17:51:30.000000000 +0200 @@ -9,10 +9,14 @@ PF6_EXT_SLIB:=ah dst eui64 frag hbh hl icmp6 ipv6header mh owner policy rt HL LOG REJECT PFX_EXT_SLIB:=connbytes connmark connlimit comment dccp dscp esp hashlimit helper length limit mac mark multiport physdev pkttype quota sctp state statistic standard string tcp tcpmss udp CLASSIFY CONNMARK DSCP MARK NFLOG NFQUEUE NOTRACK TCPMSS TRACE +PF_EXT_SELINUX_SLIB:= +PF6_EXT_SELINUX_SLIB:= +PFX_EXT_SELINUX_SLIB:=CONNSECMARK SECMARK + ifeq ($(DO_SELINUX), 1) -PF_EXT_SE_SLIB:= -PF6_EXT_SE_SLIB:= -PFX_EXT_SE_SLIB:=CONNSECMARK SECMARK +PF_EXT_SE_SLIB:=$(PF_EXT_SELINUX_SLIB) +PF6_EXT_SE_SLIB:=$(PF_EXT_SELINUX_SLIB) +PFX_EXT_SE_SLIB:=$(PF_EXT_SELINUX_SLIB) endif # Optionals @@ -20,9 +24,9 @@ PF6_EXT_SLIB_OPTS:=$(foreach T,$(wildcard extensions/.*-test6),$(shell KERNEL_DIR=$(KERNEL_DIR) $(T))) PFX_EXT_SLIB_OPTS:=$(foreach T,$(wildcard extensions/.*-testx),$(shell KERNEL_DIR=$(KERNEL_DIR) $(T))) -PF_EXT_ALL_SLIB:=$(patsubst extensions/libipt_%.c, %, $(wildcard extensions/libipt_*.c)) -PF6_EXT_ALL_SLIB:=$(patsubst extensions/libip6t_%.c, %, $(wildcard extensions/libip6t_*.c)) -PFX_EXT_ALL_SLIB:=$(patsubst extensions/libxt_%.c, %, $(wildcard extensions/libxt_*.c)) +PF_EXT_ALL_SLIB:=$(PF_EXT_SLIB) $(PF_EXT_SE_SLIB) $(PF_EXT_SLIB_OPTS) +PF6_EXT_ALL_SLIB:=$(PF6_EXT_SLIB) $(PF6_EXT_SE_SLIB) $(PF6_EXT_SLIB_OPTS) +PFX_EXT_ALL_SLIB:=$(PFX_EXT_SLIB) $(PFX_EXT_SE_SLIB) $(PFX_EXT_SLIB_OPTS) PF_EXT_MAN_ALL_MATCHES:=$(foreach T,$(PF_EXT_ALL_SLIB),$(shell test -f extensions/libipt_$(T).man && grep -q register_match extensions/libipt_$(T).c && echo $(T))) PF_EXT_MAN_ALL_TARGETS:=$(foreach T,$(PF_EXT_ALL_SLIB),$(shell test -f extensions/libipt_$(T).man && grep -q register_target extensions/libipt_$(T).c && echo $(T))) @@ -34,15 +38,43 @@ PF6_EXT_MAN_ALL_MATCHES+=$(foreach T,$(PFX_EXT_ALL_SLIB),$(shell test -f extensions/libip6t_$(T).man && grep -q xtables_register_match extensions/libxt_$(T).c && echo $(T))) PF6_EXT_MAN_ALL_TARGETS+=$(foreach T,$(PFX_EXT_ALL_SLIB),$(shell test -f extensions/libip6t_$(T).man && grep -q xtables_register_target extensions/libxt_$(T).c && echo $(T))) -PF_EXT_MAN_MATCHES:=$(filter $(PF_EXT_ALL_SLIB), $(PF_EXT_MAN_ALL_MATCHES)) -PF_EXT_MAN_TARGETS:=$(filter $(PF_EXT_ALL_SLIB), $(PF_EXT_MAN_ALL_TARGETS)) +PF_EXT_MAN_MATCHES:=$(filter $(PF_EXT_SLIB), $(PF_EXT_MAN_ALL_MATCHES)) +PF_EXT_MAN_MATCHES+=$(filter $(PFX_EXT_SLIB), $(PF_EXT_MAN_ALL_MATCHES)) +PF_EXT_MAN_MATCHES+=$(filter $(PF_EXT_SE_SLIB), $(PF_EXT_MAN_ALL_MATCHES)) +PF_EXT_MAN_MATCHES+=$(filter $(PFX_EXT_SE_SLIB), $(PF_EXT_MAN_ALL_MATCHES)) + +PF_EXT_MAN_TARGETS:=$(filter $(PF_EXT_SLIB), $(PF_EXT_MAN_ALL_TARGETS)) +PF_EXT_MAN_TARGETS+=$(filter $(PFX_EXT_SLIB), $(PF_EXT_MAN_ALL_TARGETS)) +PF_EXT_MAN_TARGETS+=$(filter $(PF_EXT_SE_SLIB), $(PF_EXT_MAN_ALL_TARGETS)) +PF_EXT_MAN_TARGETS+=$(filter $(PFX_EXT_SE_SLIB), $(PF_EXT_MAN_ALL_TARGETS)) + PF_EXT_MAN_EXTRA_MATCHES:=$(filter-out $(PF_EXT_MAN_MATCHES), $(PF_EXT_MAN_ALL_MATCHES)) PF_EXT_MAN_EXTRA_TARGETS:=$(filter-out $(PF_EXT_MAN_TARGETS), $(PF_EXT_MAN_ALL_TARGETS)) -PF6_EXT_MAN_MATCHES:=$(filter $(PF6_EXT_ALL_SLIB), $(PF6_EXT_MAN_ALL_MATCHES)) -PF6_EXT_MAN_TARGETS:=$(filter $(PF6_EXT_ALL_SLIB), $(PF6_EXT_MAN_ALL_TARGETS)) + +PF6_EXT_MAN_MATCHES:=$(filter $(PF6_EXT_SLIB), $(PF6_EXT_MAN_ALL_MATCHES)) +PF6_EXT_MAN_MATCHES+=$(filter $(PFX_EXT_SLIB), $(PF6_EXT_MAN_ALL_MATCHES)) +PF6_EXT_MAN_MATCHES+=$(filter $(PF6_EXT_SE_SLIB), $(PF6_EXT_MAN_ALL_MATCHES)) +PF6_EXT_MAN_MATCHES+=$(filter $(PFX_EXT_SE_SLIB), $(PF6_EXT_MAN_ALL_MATCHES)) + +PF6_EXT_MAN_TARGETS:=$(filter $(PF6_EXT_SLIB), $(PF6_EXT_MAN_ALL_TARGETS)) +PF6_EXT_MAN_TARGETS+=$(filter $(PFX_EXT_SLIB), $(PF6_EXT_MAN_ALL_TARGETS)) +PF6_EXT_MAN_TARGETS+=$(filter $(PF6_EXT_SE_SLIB), $(PF6_EXT_MAN_ALL_TARGETS)) +PF6_EXT_MAN_TARGETS+=$(filter $(PFX_EXT_SE_SLIB), $(PF6_EXT_MAN_ALL_TARGETS)) + PF6_EXT_MAN_EXTRA_MATCHES:=$(filter-out $(PF6_EXT_MAN_MATCHES), $(PF6_EXT_MAN_ALL_MATCHES)) PF6_EXT_MAN_EXTRA_TARGETS:=$(filter-out $(PF6_EXT_MAN_TARGETS), $(PF6_EXT_MAN_ALL_TARGETS)) +ifneq ($(DO_SELINUX), 1) +PF_EXT_MAN_EXTRA_MATCHES:=$(filter-out $(PF_EXT_SELINUX_SLIB), $(PF_EXT_MAN_EXTRA_MATCHES)) +PF_EXT_MAN_EXTRA_TARGETS:=$(filter-out $(PF_EXT_SELINUX_SLIB), $(PF_EXT_MAN_EXTRA_TARGETS)) +PF_EXT_MAN_EXTRA_MATCHES:=$(filter-out $(PFX_EXT_SELINUX_SLIB), $(PF_EXT_MAN_EXTRA_MATCHES)) +PF_EXT_MAN_EXTRA_TARGETS:=$(filter-out $(PFX_EXT_SELINUX_SLIB), $(PF_EXT_MAN_EXTRA_TARGETS)) + +PF6_EXT_MAN_EXTRA_MATCHES:=$(filter-out $(PF6_EXT_SELINUX_SLIB), $(PF6_EXT_MAN_EXTRA_MATCHES)) +PF6_EXT_MAN_EXTRA_TARGETS:=$(filter-out $(PF6_EXT_SELINUX_SLIB), $(PF6_EXT_MAN_EXTRA_TARGETS)) +PF6_EXT_MAN_EXTRA_MATCHES:=$(filter-out $(PFX_EXT_SELINUX_SLIB), $(PF6_EXT_MAN_EXTRA_MATCHES)) +PF6_EXT_MAN_EXTRA_TARGETS:=$(filter-out $(PFX_EXT_SELINUX_SLIB), $(PF6_EXT_MAN_EXTRA_TARGETS)) +endif allman: @echo ALL_SLIB: $(PF_EXT_ALL_SLIB) ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] Makefile for man pages of xtables extensions + connrate 2007-09-05 15:58 ` [PATCH] Makefile for man pages of xtables extensions + connrate Laszlo Attila Toth @ 2007-09-06 9:56 ` Patrick McHardy 0 siblings, 0 replies; 4+ messages in thread From: Patrick McHardy @ 2007-09-06 9:56 UTC (permalink / raw) To: panther; +Cc: netfilter-devel Laszlo Attila Toth wrote: > I made a new patch for connrate: it was not optional (not tested) and > wasn't in the Makefile's PF_EXT_SLIB: line. It is not in the kernel > version 2.6.23-rc3 (linus.git) I missed connrate when removing the other unsupported extensions, I removed it now. > I made the following changes in extensions/Makefile: > > * no extra target/match by default :) > * man page of fix modules (PF_EXT_SLIB etc.) plus optional > (...SLIB_OPTS) modules generated, but not all. > * because of the previous one I had to rename PF_EXT_SE_SLIB to > PF_EXT_SELINUX_SLIB etc. as a non-optional variable, original > PF_EXT_SE_SLIB gets the value of PF_EXT_SELINUX_SLIB if DO_SELINUX is > set to 1. Applied, thanks Attila. ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2007-09-06 9:56 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2007-09-03 12:48 [PATCH] Makefile for man pages of xtables extensions Laszlo Attila Toth 2007-09-05 13:45 ` Patrick McHardy 2007-09-05 15:58 ` [PATCH] Makefile for man pages of xtables extensions + connrate Laszlo Attila Toth 2007-09-06 9:56 ` Patrick McHardy
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).