fix "manpages: do not include v4-only modules in ip6tables manpage"
Florian Westphal
maintainerPATCH 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
@@ -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
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 familyAF_UNSPEC.
No, this one misses manpages too... Bah, time to eradicate the ip/ip6/ name mess.
Quoted 22 lines
extensions/GNUmakefile.in +7
-4@@ -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 \
Pablo Neira Ayuso
maintainerQuoted 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 familyAF_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
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 familyAF_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.