From: Alejandro Colomar <alx.manpages@gmail.com>
To: Quentin Monnet <quentin@isovalent.com>,
Alexei Starovoitov <ast@kernel.org>,
Daniel Borkmann <daniel@iogearbox.net>,
Andrii Nakryiko <andrii@kernel.org>
Cc: Martin KaFai Lau <kafai@fb.com>, Song Liu <songliubraving@fb.com>,
Yonghong Song <yhs@fb.com>,
John Fastabend <john.fastabend@gmail.com>,
KP Singh <kpsingh@kernel.org>,
Stanislav Fomichev <sdf@google.com>, Hao Luo <haoluo@google.com>,
Jiri Olsa <jolsa@kernel.org>,
bpf@vger.kernel.org
Subject: Re: [PATCH bpf-next] scripts/bpf: Fix attributes for bpf-helpers(7) man page
Date: Tue, 23 Aug 2022 17:04:43 +0200 [thread overview]
Message-ID: <8af3984e-49f4-e94f-df87-6609a5330b9f@gmail.com> (raw)
In-Reply-To: <1c07206a-25c5-9621-afd5-d64913fece13@isovalent.com>
[-- Attachment #1.1: Type: text/plain, Size: 2294 bytes --]
Hi Quentin,
On 8/23/22 16:23, Quentin Monnet wrote:
> Wow, I'm two days late!
;-)
[...]
>>
>> You could append the version here. Or maybe put a placeholder that the
>> script should fill with information from the makefile or git-describe(1)?
>
> So if I understand correctly, running bpf_doc.py should currently
> produce the following string:
>
> .TH BPF-HELPERS 7 "" "Linux (5.19.0)" ""
>
> Is this what you expect?
Almost. I expect:
.TH BPF-HELPERS 7 "" "Linux 5.19.0"
Notice the differences:
- No 5th empty field "".
- No parentheses in the version string.
But since you're not in control of the last field, and it's just a bug
in rst2man, an empty 5th arg as you suggested is the best you can
provide. I'll file the bug.
As for the parentheses in the version, I wouldn't put them; I only put
them in the man-pages unreleased string, to make it clear that it's a
version, but in the final version I remove them.
See:
<https://git.kernel.org/pub/scm/docs/man-pages/man-pages.git/tree/lib/version.mk>
and
<https://git.kernel.org/pub/scm/docs/man-pages/man-pages.git/tree/lib/dist.mk#n33>
>
> I can make the script call "make kernelversion" to produce the above.
> I'm not 100% convinced it should be the role of that script vs. when
> copying it (we risk having some inaccuracies, for example I generated
> the above from the bpf-next, so it doesn't really correspond to 5.19),
> but maybe it's easier that way and avoids adding another script in the
> middle of the generation so OK.
I like it that way. Moreover, I'll always run this script from a
release tag from Linus' repo, so the version should match exactly the code.
Anyway, and I think this affects many projects out there have the same
issue:
The versioning should always be correct. git-describe(1) should be
preferred, or in absence of that, a generic (unreleased) string should
be used. Describing any commit after v5.18 and before v5.19-rc1 to be
'5.18.0' is plain wrong/misleading. The Makefile should probably
autogenerate that info from git-describe(1). See how the Linux
man-pages do it (in the links above you can see it) for example.
Cheers,
Alex
--
Alejandro Colomar
<http://www.alejandro-colomar.es/>
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2022-08-23 17:28 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-23 8:47 [PATCH bpf-next] scripts/bpf: Fix attributes for bpf-helpers(7) man page Quentin Monnet
2022-08-23 12:26 ` Alejandro Colomar
2022-08-23 14:23 ` Quentin Monnet
2022-08-23 15:04 ` Alejandro Colomar [this message]
2022-08-23 15:18 ` Quentin Monnet
2022-08-23 15:26 ` Alejandro Colomar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8af3984e-49f4-e94f-df87-6609a5330b9f@gmail.com \
--to=alx.manpages@gmail.com \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=haoluo@google.com \
--cc=john.fastabend@gmail.com \
--cc=jolsa@kernel.org \
--cc=kafai@fb.com \
--cc=kpsingh@kernel.org \
--cc=quentin@isovalent.com \
--cc=sdf@google.com \
--cc=songliubraving@fb.com \
--cc=yhs@fb.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox