Skip to contentSkip to conversation

fix "manpages: do not include v4-only modules in ip6tables manpage"

PATCH In review Florian Westphal 3 participants 4 messages May 31, 2009 – Jun 1, 2009 netfilter

lore
Share & tools
lore

Florian Westphal

author maintainer
#0 lore raw

PATCH 1/1 fix "manpages: do not include v4-only modules in ip6tables manpage"

previous commit tries to skip v4-only module manpages by searching for NFPROTO_IPV(4|6) -- in the man page itself.

Searching the .c file instead is not sufficient:
- there is at least one page (libxt_policy) without a libxt_*c
- there are targets/modules which use family AF_UNSPEC.

---
 extensions/GNUmakefile.in |   11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)
extensions/GNUmakefile.in +7 -4
index 8d7f21d..44a6d02 100644
@@ -161,10 +161,13 @@ man_run    = \
 	${AM_VERBOSE_GEN} \
 	for ext in $(1); do \
 		f="${srcdir}/libxt_$$ext.man"; \
-		if [ -f "$$f" ] && grep -q "$(3)" "$$f"; then \
-			echo ".SS $$ext"; \
-			cat "$$f"; \
-			continue; \
+		if [ -f "$$f" ] ; then \
+			cfile="${srcdir}/libxt_$$ext.c"; \
+			if [ ! -f "$$cfile" ] || grep -q "\(_UNSPEC\|$(3)\)" "$$cfile"; then \
+				echo ".SS $$ext"; \
+				cat "$$f"; \
+				continue; \
+			fi; \
 		fi; \
 		f="${srcdir}/lib$(2)t_$$ext.man"; \
 		if [ -f "$$f" ]; then \
Signature · 1 line
1.6.0.6
#1 lore raw
Quoted 6 lines · Florian Westphal

previous commit tries to skip v4-only module manpages by searching for NFPROTO_IPV(4|6) -- in the man page itself.

Searching the .c file instead is not sufficient:
- there is at least one page (libxt_policy) without a libxt_*c
- there are targets/modules which use family AF_UNSPEC.

No, this one misses manpages too... Bah, time to eradicate the ip/ip6/ name mess.

Quoted 22 lines
extensions/GNUmakefile.in +7 -4
index 8d7f21d..44a6d02 100644
@@ -161,10 +161,13 @@ man_run    = \
 	${AM_VERBOSE_GEN} \
 	for ext in $(1); do \
 		f="${srcdir}/libxt_$$ext.man"; \
-		if [ -f "$$f" ] && grep -q "$(3)" "$$f"; then \
-			echo ".SS $$ext"; \
-			cat "$$f"; \
-			continue; \
+		if [ -f "$$f" ] ; then \
+			cfile="${srcdir}/libxt_$$ext.c"; \
+			if [ ! -f "$$cfile" ] || grep -q "\(_UNSPEC\|$(3)\)" "$$cfile"; then \
+				echo ".SS $$ext"; \
+				cat "$$f"; \
+				continue; \
+			fi; \
 		fi; \
 		f="${srcdir}/lib$(2)t_$$ext.man"; \
 		if [ -f "$$f" ]; then \
#2 lore raw
Quoted 11 lines · Jan Engelhardt
Quoted 6 lines · Florian Westphal

previous commit tries to skip v4-only module manpages by searching for NFPROTO_IPV(4|6) -- in the man page itself.

Searching the .c file instead is not sufficient:
- there is at least one page (libxt_policy) without a libxt_*c
- there are targets/modules which use family AF_UNSPEC.

No, this one misses manpages too... Bah, time to eradicate the ip/ip6/ name mess.

Florian is trying to help fixing this broken feature that you introduced. Why don't you tell him what pages are missing?

Signature · 1 line
"Los honestos son inadaptados sociales" -- Les Luthiers
#3 lore raw
Quoted 10 lines · Pablo Neira Ayuso
Quoted 9 lines · Jan Engelhardt
Quoted 6 lines · Florian Westphal

previous commit tries to skip v4-only module manpages by searching for NFPROTO_IPV(4|6) -- in the man page itself.

Searching the .c file instead is not sufficient:
- there is at least one page (libxt_policy) without a libxt_*c
- there are targets/modules which use family AF_UNSPEC.

Quoted 5 lines
Quoted 2 lines

No, this one misses manpages too... Bah, time to eradicate the ip/ip6/ name mess.

Florian is trying to help fixing this broken feature that you introduced. Why don't you tell him what pages are missing?

Fair enough. The problem is that we have a libxt_poilcy.man file, but no libxt_policy.c file. After further looking into this, it becomes apparent that libip6t_policy.c is quite redundant (since struct ip6t_policy_info is actually xt_policy_info) and should be incorporated into libipt_policy.c, to be renamed to libxt_policy.c. Will be sending a pull soon.