* [PATCH bpf-next v3] bpftool: fix build failure
@ 2020-09-14 18:31 Yonghong Song
2020-09-14 21:46 ` Song Liu
2020-09-14 22:19 ` Andrii Nakryiko
0 siblings, 2 replies; 4+ messages in thread
From: Yonghong Song @ 2020-09-14 18:31 UTC (permalink / raw)
To: bpf, netdev
Cc: Alexei Starovoitov, Daniel Borkmann, kernel-team, Quentin Monnet,
Andrii Nakryiko
When building bpf selftests like
make -C tools/testing/selftests/bpf -j20
I hit the following errors:
...
GEN /net-next/tools/testing/selftests/bpf/tools/build/bpftool/Documentation/bpftool-gen.8
<stdin>:75: (WARNING/2) Block quote ends without a blank line; unexpected unindent.
<stdin>:71: (WARNING/2) Literal block ends without a blank line; unexpected unindent.
<stdin>:85: (WARNING/2) Literal block ends without a blank line; unexpected unindent.
<stdin>:57: (WARNING/2) Block quote ends without a blank line; unexpected unindent.
<stdin>:66: (WARNING/2) Literal block ends without a blank line; unexpected unindent.
<stdin>:109: (WARNING/2) Literal block ends without a blank line; unexpected unindent.
<stdin>:175: (WARNING/2) Literal block ends without a blank line; unexpected unindent.
<stdin>:273: (WARNING/2) Literal block ends without a blank line; unexpected unindent.
make[1]: *** [/net-next/tools/testing/selftests/bpf/tools/build/bpftool/Documentation/bpftool-perf.8] Error 12
make[1]: *** Waiting for unfinished jobs....
make[1]: *** [/net-next/tools/testing/selftests/bpf/tools/build/bpftool/Documentation/bpftool-iter.8] Error 12
make[1]: *** [/net-next/tools/testing/selftests/bpf/tools/build/bpftool/Documentation/bpftool-struct_ops.8] Error 12
...
I am using:
-bash-4.4$ rst2man --version
rst2man (Docutils 0.11 [repository], Python 2.7.5, on linux2)
-bash-4.4$
The Makefile generated final .rst file (e.g., bpftool-cgroup.rst) looks like
...
ID AttachType AttachFlags Name
\n SEE ALSO\n========\n\t**bpf**\ (2),\n\t**bpf-helpers**\
(7),\n\t**bpftool**\ (8),\n\t**bpftool-btf**\
(8),\n\t**bpftool-feature**\ (8),\n\t**bpftool-gen**\
(8),\n\t**bpftool-iter**\ (8),\n\t**bpftool-link**\
(8),\n\t**bpftool-map**\ (8),\n\t**bpftool-net**\
(8),\n\t**bpftool-perf**\ (8),\n\t**bpftool-prog**\
(8),\n\t**bpftool-struct_ops**\ (8)\n
The rst2man generated .8 file looks like
Literal block ends without a blank line; unexpected unindent.
.sp
n SEEALSOn========nt**bpf**(2),nt**bpf\-helpers**(7),nt**bpftool**(8),nt**bpftool\-btf**(8),nt**
bpftool\-feature**(8),nt**bpftool\-gen**(8),nt**bpftool\-iter**(8),nt**bpftool\-link**(8),nt**
bpftool\-map**(8),nt**bpftool\-net**(8),nt**bpftool\-perf**(8),nt**bpftool\-prog**(8),nt**
bpftool\-struct_ops**(8)n
Looks like that particular version of rst2man prefers to have actual new line
instead of \n.
Since `echo -e` may not be available in some environment, let us use `printf`.
Format string "%b" is used for `printf` to ensure all escape characters are
interpretted properly.
Cc: Quentin Monnet <quentin@isovalent.com>
Suggested-by: Andrii Nakryiko <andrii.nakryiko@gmail.com>
Fixes: 18841da98100 ("tools: bpftool: Automate generation for "SEE ALSO" sections in man pages")
Signed-off-by: Yonghong Song <yhs@fb.com>
---
tools/bpf/bpftool/Documentation/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/bpf/bpftool/Documentation/Makefile b/tools/bpf/bpftool/Documentation/Makefile
index 4c9dd1e45244..f33cb02de95c 100644
--- a/tools/bpf/bpftool/Documentation/Makefile
+++ b/tools/bpf/bpftool/Documentation/Makefile
@@ -44,7 +44,7 @@ $(OUTPUT)%.8: %.rst
ifndef RST2MAN_DEP
$(error "rst2man not found, but required to generate man pages")
endif
- $(QUIET_GEN)( cat $< ; echo -n $(call see_also,$<) ) | rst2man $(RST2MAN_OPTS) > $@
+ $(QUIET_GEN)( cat $< ; printf "%b" $(call see_also,$<) ) | rst2man $(RST2MAN_OPTS) > $@
clean: helpers-clean
$(call QUIET_CLEAN, Documentation)
--
2.24.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH bpf-next v3] bpftool: fix build failure
2020-09-14 18:31 [PATCH bpf-next v3] bpftool: fix build failure Yonghong Song
@ 2020-09-14 21:46 ` Song Liu
2020-09-14 22:19 ` Andrii Nakryiko
1 sibling, 0 replies; 4+ messages in thread
From: Song Liu @ 2020-09-14 21:46 UTC (permalink / raw)
To: Yonghong Song
Cc: bpf, Networking, Alexei Starovoitov, Daniel Borkmann,
Kernel Team, Quentin Monnet, Andrii Nakryiko
> On Sep 14, 2020, at 11:31 AM, Yonghong Song <yhs@fb.com> wrote:
>
> When building bpf selftests like
> make -C tools/testing/selftests/bpf -j20
> I hit the following errors:
> ...
> GEN /net-next/tools/testing/selftests/bpf/tools/build/bpftool/Documentation/bpftool-gen.8
> <stdin>:75: (WARNING/2) Block quote ends without a blank line; unexpected unindent.
> <stdin>:71: (WARNING/2) Literal block ends without a blank line; unexpected unindent.
> <stdin>:85: (WARNING/2) Literal block ends without a blank line; unexpected unindent.
> <stdin>:57: (WARNING/2) Block quote ends without a blank line; unexpected unindent.
> <stdin>:66: (WARNING/2) Literal block ends without a blank line; unexpected unindent.
> <stdin>:109: (WARNING/2) Literal block ends without a blank line; unexpected unindent.
> <stdin>:175: (WARNING/2) Literal block ends without a blank line; unexpected unindent.
> <stdin>:273: (WARNING/2) Literal block ends without a blank line; unexpected unindent.
> make[1]: *** [/net-next/tools/testing/selftests/bpf/tools/build/bpftool/Documentation/bpftool-perf.8] Error 12
> make[1]: *** Waiting for unfinished jobs....
> make[1]: *** [/net-next/tools/testing/selftests/bpf/tools/build/bpftool/Documentation/bpftool-iter.8] Error 12
> make[1]: *** [/net-next/tools/testing/selftests/bpf/tools/build/bpftool/Documentation/bpftool-struct_ops.8] Error 12
> ...
>
> I am using:
> -bash-4.4$ rst2man --version
> rst2man (Docutils 0.11 [repository], Python 2.7.5, on linux2)
> -bash-4.4$
>
> The Makefile generated final .rst file (e.g., bpftool-cgroup.rst) looks like
> ...
> ID AttachType AttachFlags Name
> \n SEE ALSO\n========\n\t**bpf**\ (2),\n\t**bpf-helpers**\
> (7),\n\t**bpftool**\ (8),\n\t**bpftool-btf**\
> (8),\n\t**bpftool-feature**\ (8),\n\t**bpftool-gen**\
> (8),\n\t**bpftool-iter**\ (8),\n\t**bpftool-link**\
> (8),\n\t**bpftool-map**\ (8),\n\t**bpftool-net**\
> (8),\n\t**bpftool-perf**\ (8),\n\t**bpftool-prog**\
> (8),\n\t**bpftool-struct_ops**\ (8)\n
>
> The rst2man generated .8 file looks like
> Literal block ends without a blank line; unexpected unindent.
> .sp
> n SEEALSOn========nt**bpf**(2),nt**bpf\-helpers**(7),nt**bpftool**(8),nt**bpftool\-btf**(8),nt**
> bpftool\-feature**(8),nt**bpftool\-gen**(8),nt**bpftool\-iter**(8),nt**bpftool\-link**(8),nt**
> bpftool\-map**(8),nt**bpftool\-net**(8),nt**bpftool\-perf**(8),nt**bpftool\-prog**(8),nt**
> bpftool\-struct_ops**(8)n
>
> Looks like that particular version of rst2man prefers to have actual new line
> instead of \n.
>
> Since `echo -e` may not be available in some environment, let us use `printf`.
> Format string "%b" is used for `printf` to ensure all escape characters are
> interpretted properly.
>
> Cc: Quentin Monnet <quentin@isovalent.com>
> Suggested-by: Andrii Nakryiko <andrii.nakryiko@gmail.com>
> Fixes: 18841da98100 ("tools: bpftool: Automate generation for "SEE ALSO" sections in man pages")
> Signed-off-by: Yonghong Song <yhs@fb.com>
Acked-by: Song Liu <songliubraving@fb.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH bpf-next v3] bpftool: fix build failure
2020-09-14 18:31 [PATCH bpf-next v3] bpftool: fix build failure Yonghong Song
2020-09-14 21:46 ` Song Liu
@ 2020-09-14 22:19 ` Andrii Nakryiko
2020-09-15 1:49 ` Alexei Starovoitov
1 sibling, 1 reply; 4+ messages in thread
From: Andrii Nakryiko @ 2020-09-14 22:19 UTC (permalink / raw)
To: Yonghong Song
Cc: bpf, Networking, Alexei Starovoitov, Daniel Borkmann,
Kernel Team, Quentin Monnet
On Mon, Sep 14, 2020 at 11:31 AM Yonghong Song <yhs@fb.com> wrote:
>
> When building bpf selftests like
> make -C tools/testing/selftests/bpf -j20
> I hit the following errors:
> ...
> GEN /net-next/tools/testing/selftests/bpf/tools/build/bpftool/Documentation/bpftool-gen.8
> <stdin>:75: (WARNING/2) Block quote ends without a blank line; unexpected unindent.
> <stdin>:71: (WARNING/2) Literal block ends without a blank line; unexpected unindent.
> <stdin>:85: (WARNING/2) Literal block ends without a blank line; unexpected unindent.
> <stdin>:57: (WARNING/2) Block quote ends without a blank line; unexpected unindent.
> <stdin>:66: (WARNING/2) Literal block ends without a blank line; unexpected unindent.
> <stdin>:109: (WARNING/2) Literal block ends without a blank line; unexpected unindent.
> <stdin>:175: (WARNING/2) Literal block ends without a blank line; unexpected unindent.
> <stdin>:273: (WARNING/2) Literal block ends without a blank line; unexpected unindent.
> make[1]: *** [/net-next/tools/testing/selftests/bpf/tools/build/bpftool/Documentation/bpftool-perf.8] Error 12
> make[1]: *** Waiting for unfinished jobs....
> make[1]: *** [/net-next/tools/testing/selftests/bpf/tools/build/bpftool/Documentation/bpftool-iter.8] Error 12
> make[1]: *** [/net-next/tools/testing/selftests/bpf/tools/build/bpftool/Documentation/bpftool-struct_ops.8] Error 12
> ...
>
> I am using:
> -bash-4.4$ rst2man --version
> rst2man (Docutils 0.11 [repository], Python 2.7.5, on linux2)
> -bash-4.4$
>
> The Makefile generated final .rst file (e.g., bpftool-cgroup.rst) looks like
> ...
> ID AttachType AttachFlags Name
> \n SEE ALSO\n========\n\t**bpf**\ (2),\n\t**bpf-helpers**\
> (7),\n\t**bpftool**\ (8),\n\t**bpftool-btf**\
> (8),\n\t**bpftool-feature**\ (8),\n\t**bpftool-gen**\
> (8),\n\t**bpftool-iter**\ (8),\n\t**bpftool-link**\
> (8),\n\t**bpftool-map**\ (8),\n\t**bpftool-net**\
> (8),\n\t**bpftool-perf**\ (8),\n\t**bpftool-prog**\
> (8),\n\t**bpftool-struct_ops**\ (8)\n
>
> The rst2man generated .8 file looks like
> Literal block ends without a blank line; unexpected unindent.
> .sp
> n SEEALSOn========nt**bpf**(2),nt**bpf\-helpers**(7),nt**bpftool**(8),nt**bpftool\-btf**(8),nt**
> bpftool\-feature**(8),nt**bpftool\-gen**(8),nt**bpftool\-iter**(8),nt**bpftool\-link**(8),nt**
> bpftool\-map**(8),nt**bpftool\-net**(8),nt**bpftool\-perf**(8),nt**bpftool\-prog**(8),nt**
> bpftool\-struct_ops**(8)n
>
> Looks like that particular version of rst2man prefers to have actual new line
> instead of \n.
>
> Since `echo -e` may not be available in some environment, let us use `printf`.
> Format string "%b" is used for `printf` to ensure all escape characters are
> interpretted properly.
>
> Cc: Quentin Monnet <quentin@isovalent.com>
> Suggested-by: Andrii Nakryiko <andrii.nakryiko@gmail.com>
> Fixes: 18841da98100 ("tools: bpftool: Automate generation for "SEE ALSO" sections in man pages")
> Signed-off-by: Yonghong Song <yhs@fb.com>
> ---
Acked-by: Andrii Nakryiko <andriin@fb.com>
> tools/bpf/bpftool/Documentation/Makefile | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tools/bpf/bpftool/Documentation/Makefile b/tools/bpf/bpftool/Documentation/Makefile
> index 4c9dd1e45244..f33cb02de95c 100644
> --- a/tools/bpf/bpftool/Documentation/Makefile
> +++ b/tools/bpf/bpftool/Documentation/Makefile
> @@ -44,7 +44,7 @@ $(OUTPUT)%.8: %.rst
> ifndef RST2MAN_DEP
> $(error "rst2man not found, but required to generate man pages")
> endif
> - $(QUIET_GEN)( cat $< ; echo -n $(call see_also,$<) ) | rst2man $(RST2MAN_OPTS) > $@
> + $(QUIET_GEN)( cat $< ; printf "%b" $(call see_also,$<) ) | rst2man $(RST2MAN_OPTS) > $@
>
> clean: helpers-clean
> $(call QUIET_CLEAN, Documentation)
> --
> 2.24.1
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH bpf-next v3] bpftool: fix build failure
2020-09-14 22:19 ` Andrii Nakryiko
@ 2020-09-15 1:49 ` Alexei Starovoitov
0 siblings, 0 replies; 4+ messages in thread
From: Alexei Starovoitov @ 2020-09-15 1:49 UTC (permalink / raw)
To: Andrii Nakryiko
Cc: Yonghong Song, bpf, Networking, Alexei Starovoitov,
Daniel Borkmann, Kernel Team, Quentin Monnet
On Mon, Sep 14, 2020 at 3:20 PM Andrii Nakryiko
<andrii.nakryiko@gmail.com> wrote:
>
> On Mon, Sep 14, 2020 at 11:31 AM Yonghong Song <yhs@fb.com> wrote:
> >
> > When building bpf selftests like
> > make -C tools/testing/selftests/bpf -j20
> > I hit the following errors:
> > ...
> > GEN /net-next/tools/testing/selftests/bpf/tools/build/bpftool/Documentation/bpftool-gen.8
> > <stdin>:75: (WARNING/2) Block quote ends without a blank line; unexpected unindent.
> > <stdin>:71: (WARNING/2) Literal block ends without a blank line; unexpected unindent.
> > <stdin>:85: (WARNING/2) Literal block ends without a blank line; unexpected unindent.
> > <stdin>:57: (WARNING/2) Block quote ends without a blank line; unexpected unindent.
> > <stdin>:66: (WARNING/2) Literal block ends without a blank line; unexpected unindent.
> > <stdin>:109: (WARNING/2) Literal block ends without a blank line; unexpected unindent.
> > <stdin>:175: (WARNING/2) Literal block ends without a blank line; unexpected unindent.
> > <stdin>:273: (WARNING/2) Literal block ends without a blank line; unexpected unindent.
> > make[1]: *** [/net-next/tools/testing/selftests/bpf/tools/build/bpftool/Documentation/bpftool-perf.8] Error 12
> > make[1]: *** Waiting for unfinished jobs....
> > make[1]: *** [/net-next/tools/testing/selftests/bpf/tools/build/bpftool/Documentation/bpftool-iter.8] Error 12
> > make[1]: *** [/net-next/tools/testing/selftests/bpf/tools/build/bpftool/Documentation/bpftool-struct_ops.8] Error 12
> > ...
> >
> > I am using:
> > -bash-4.4$ rst2man --version
> > rst2man (Docutils 0.11 [repository], Python 2.7.5, on linux2)
> > -bash-4.4$
> >
> > The Makefile generated final .rst file (e.g., bpftool-cgroup.rst) looks like
> > ...
> > ID AttachType AttachFlags Name
> > \n SEE ALSO\n========\n\t**bpf**\ (2),\n\t**bpf-helpers**\
> > (7),\n\t**bpftool**\ (8),\n\t**bpftool-btf**\
> > (8),\n\t**bpftool-feature**\ (8),\n\t**bpftool-gen**\
> > (8),\n\t**bpftool-iter**\ (8),\n\t**bpftool-link**\
> > (8),\n\t**bpftool-map**\ (8),\n\t**bpftool-net**\
> > (8),\n\t**bpftool-perf**\ (8),\n\t**bpftool-prog**\
> > (8),\n\t**bpftool-struct_ops**\ (8)\n
> >
> > The rst2man generated .8 file looks like
> > Literal block ends without a blank line; unexpected unindent.
> > .sp
> > n SEEALSOn========nt**bpf**(2),nt**bpf\-helpers**(7),nt**bpftool**(8),nt**bpftool\-btf**(8),nt**
> > bpftool\-feature**(8),nt**bpftool\-gen**(8),nt**bpftool\-iter**(8),nt**bpftool\-link**(8),nt**
> > bpftool\-map**(8),nt**bpftool\-net**(8),nt**bpftool\-perf**(8),nt**bpftool\-prog**(8),nt**
> > bpftool\-struct_ops**(8)n
> >
> > Looks like that particular version of rst2man prefers to have actual new line
> > instead of \n.
> >
> > Since `echo -e` may not be available in some environment, let us use `printf`.
> > Format string "%b" is used for `printf` to ensure all escape characters are
> > interpretted properly.
> >
> > Cc: Quentin Monnet <quentin@isovalent.com>
> > Suggested-by: Andrii Nakryiko <andrii.nakryiko@gmail.com>
> > Fixes: 18841da98100 ("tools: bpftool: Automate generation for "SEE ALSO" sections in man pages")
> > Signed-off-by: Yonghong Song <yhs@fb.com>
> > ---
>
> Acked-by: Andrii Nakryiko <andriin@fb.com>
Applied. Thanks
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2020-09-15 1:49 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-14 18:31 [PATCH bpf-next v3] bpftool: fix build failure Yonghong Song
2020-09-14 21:46 ` Song Liu
2020-09-14 22:19 ` Andrii Nakryiko
2020-09-15 1:49 ` Alexei Starovoitov
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.