Skip to contentSkip to conversation

rSTify contribution-related wiki pages

PATCH In review Kashyap Chamarthy 3 participants 9 messages Nov 10, 2021 – Nov 17, 2021

lore
Share & tools
lore
#1 lore raw

PATCH v3 1/3 docs: rSTify the "TrivialPatches" wiki

In reply to Kashyap Chamarthy

The original wiki is here[1]. I converted by copying the wiki source into a .wiki file and convert to rST using pandoc:

        $ pandoc -f Mediawiki -t rst trivial-patches.wiki -o trivial-patches.rst

Update the active maintainer names (and drop Michael Tokarev's inactive repo) to reflect current reality.

[1] https://wiki.qemu.org/Contribute/TrivialPatches

---
 docs/devel/index.rst           |  1 +
 docs/devel/trivial-patches.rst | 50 ++++++++++++++++++++++++++++++++++
 2 files changed, 51 insertions(+)
 create mode 100644 docs/devel/trivial-patches.rst
docs/devel/index.rst +1 -0
index f95df10b3e..f1822a35bf 100644
@@ -45,3 +45,4 @@ modifying QEMU's source code.
    vfio-migration
    qapi-code-gen
    writing-qmp-commands
+   trivial-patches
docs/devel/trivial-patches.rst new file +50 -0

50 lines not on this page · raw message

Signature · 1 line
2.31.1
#0 lore raw

v3 cover rSTify contribution-related wiki pages

My main motivation was to convert SubmitAPatch[1] based on a chat with Peter Maydell and Dan Berrangé on #qemu channel (on OFTC). But the page also links to a couple of other contribution-related pages, so I converted them too:

- SubmitAPullRequest: https://wiki.qemu.org/Contribute/SubmitAPullRequest
- TrivialPatches: https://wiki.qemu.org/Contribute/TrivialPatches

[1] https://wiki.qemu.org/Contribute/SubmitAPatch

I built with configure --target-list=x86_64-softmmu --enable-docs && make -j8, and verified there isn't any breakage in the rendered docs.

* * *
Changes in v3:

- Update index entry as part of each individual rST conversion patch [PeterM]
- Drop the SpellCheck rST [PeterM]
- Drop the KeySigning rST [ThomasH]
- Drop mjt's Git repo from trivial-patches.rst [LaurentV]

Changes in v2:

- Consistently use the preferred rST headings: ===, ---, and ~~~~ [Paolo]
- Add entries in the devel/toctree.rst [Paolo]
- Clean up the SpellCheck wiki [Peter Maydell]
- In trivial-patches.rst, keep only Laurent as the active maintainer [Philippe]
- Convert the wiki SubmitAPullRequest to rST, because this is also linked to from the SubmitAPatch wiki page
- Convert the KeySigningParty wiki to rST
- Update the links to point to the rST-generated HTML files, instead of wiki

Kashyap Chamarthy (3):
docs: rSTify the "TrivialPatches" wiki
docs: rSTify the "SubmitAPullRequest" wiki
docs: rSTify the "SubmitAPatch" wiki

 docs/devel/index.rst                     |   3 +
 docs/devel/submitting-a-patch.rst        | 456 +++++++++++++++++++++++
 docs/devel/submitting-a-pull-request.rst |  76 ++++
 docs/devel/trivial-patches.rst           |  50 +++
 4 files changed, 585 insertions(+)
 create mode 100644 docs/devel/submitting-a-patch.rst
 create mode 100644 docs/devel/submitting-a-pull-request.rst
 create mode 100644 docs/devel/trivial-patches.rst
Signature · 1 line
2.31.1
#2 lore raw

PATCH v3 2/3 docs: rSTify the "SubmitAPullRequest" wiki

The original wiki is here[1]. I converted by copying the wiki source into a .wiki file and convert to rST using pandoc:

    $ pandoc -f Mediawiki -t rst submitting-a-pull-request.wiki \
        -o submitting-a-pull-request.rst

This is a 1-1 conversion; no content changes.

[1] https://wiki.qemu.org/Contribute/SubmitAPullRequest

---
 docs/devel/index.rst                     |  1 +
 docs/devel/submitting-a-pull-request.rst | 76 ++++++++++++++++++++++++
 2 files changed, 77 insertions(+)
 create mode 100644 docs/devel/submitting-a-pull-request.rst
docs/devel/index.rst +1 -0
index f1822a35bf..816eb7b7b0 100644
@@ -46,3 +46,4 @@ modifying QEMU's source code.
    qapi-code-gen
    writing-qmp-commands
    trivial-patches
+   submitting-a-pull-request
docs/devel/submitting-a-pull-request.rst new file +76 -0

76 lines not on this page · raw message

Signature · 1 line
2.31.1
#3 lore raw

PATCH v3 3/3 docs: rSTify the "SubmitAPatch" wiki

In reply to Kashyap Chamarthy

- The original wiki is here[1]. I copied the wiki source[2] into a .wiki file, and used pandoc to convert it to rST:

$> pandoc -f Mediawiki -t rst submitting-a-patch.wiki -o
submitting-a-patch.rst

- The only minor touch-ups I did was to fix URLs. But 99%, it is a 1-1 conversion.

(An example of a "touch-up": under the section "Patch emails must include a Signed-off-by: line", I updated the "see SubmittingPatches 1.12" to "1.12) Sign your work")

- I have also converted a couple other related wiki pages (included in this patch series) that were hyperlinked within the SubmitAPatch page, or a page that it refers to:

- SubmitAPullRequest: https://wiki.qemu.org/Contribute/SubmitAPullRequest
- TrivialPatches: https://wiki.qemu.org/Contribute/TrivialPatches

- Over time, many people contributed to this wiki page; you can find all the authors in the wiki history[3].

[1] https://wiki.qemu.org/Contribute/SubmitAPatch
[2] http://wiki.qemu.org/index.php?title=Contribute/SubmitAPatch&action=edit
[3] http://wiki.qemu.org/index.php?title=Contribute/SubmitAPatch&action=history

---
 docs/devel/index.rst              |   1 +
 docs/devel/submitting-a-patch.rst | 456 ++++++++++++++++++++++++++++++
 2 files changed, 457 insertions(+)
 create mode 100644 docs/devel/submitting-a-patch.rst
docs/devel/index.rst +1 -0
index 816eb7b7b0..c3cfa9e41f 100644
@@ -47,3 +47,4 @@ modifying QEMU's source code.
    writing-qmp-commands
    trivial-patches
    submitting-a-pull-request
+   submitting-a-patch
docs/devel/submitting-a-patch.rst new file +456 -0

456 lines not on this page · raw message

Signature · 1 line
2.31.1
Reviewed-by on the v3 series
#8 lore raw
In reply to Kashyap Chamarthy
Quoted 36 lines · Kashyap Chamarthy

My main motivation was to convert SubmitAPatch[1] based on a chat with Peter Maydell and Dan Berrangé on #qemu channel (on OFTC). But the page also links to a couple of other contribution-related pages, so I converted them too:

- SubmitAPullRequest: https://wiki.qemu.org/Contribute/SubmitAPullRequest
- TrivialPatches: https://wiki.qemu.org/Contribute/TrivialPatches

[1] https://wiki.qemu.org/Contribute/SubmitAPatch

I built with configure --target-list=x86_64-softmmu --enable-docs && make -j8, and verified there isn't any breakage in the rendered docs.

* * *
Changes in v3:

- Update index entry as part of each individual rST conversion patch [PeterM]
- Drop the SpellCheck rST [PeterM]
- Drop the KeySigning rST [ThomasH]
- Drop mjt's Git repo from trivial-patches.rst [LaurentV]

Changes in v2:

- Consistently use the preferred rST headings: ===, ---, and ~~~~ [Paolo]
- Add entries in the devel/toctree.rst [Paolo]
- Clean up the SpellCheck wiki [Peter Maydell]
- In trivial-patches.rst, keep only Laurent as the active maintainer [Philippe]
- Convert the wiki SubmitAPullRequest to rST, because this is also linked to from the SubmitAPatch wiki page
- Convert the KeySigningParty wiki to rST
- Update the links to point to the rST-generated HTML files, instead of wiki

Quoted 4 lines

Kashyap Chamarthy (3):
docs: rSTify the "TrivialPatches" wiki
docs: rSTify the "SubmitAPullRequest" wiki
docs: rSTify the "SubmitAPatch" wiki

#4 lore raw

Re: [PATCH v3 3/3] docs: rSTify the "SubmitAPatch" wiki

In reply to Kashyap Chamarthy
Quoted 39 lines · Kashyap Chamarthy

- The original wiki is here[1]. I copied the wiki source[2] into a .wiki file, and used pandoc to convert it to rST:

$> pandoc -f Mediawiki -t rst submitting-a-patch.wiki -o
submitting-a-patch.rst

- The only minor touch-ups I did was to fix URLs. But 99%, it is a 1-1 conversion.

(An example of a "touch-up": under the section "Patch emails must include a Signed-off-by: line", I updated the "see SubmittingPatches 1.12" to "1.12) Sign your work")

- I have also converted a couple other related wiki pages (included in this patch series) that were hyperlinked within the SubmitAPatch page, or a page that it refers to:

- SubmitAPullRequest: https://wiki.qemu.org/Contribute/SubmitAPullRequest
- TrivialPatches: https://wiki.qemu.org/Contribute/TrivialPatches

- Over time, many people contributed to this wiki page; you can find all the authors in the wiki history[3].

[1] https://wiki.qemu.org/Contribute/SubmitAPatch
[2] http://wiki.qemu.org/index.php?title=Contribute/SubmitAPatch&action=edit
[3] http://wiki.qemu.org/index.php?title=Contribute/SubmitAPatch&action=history

---
  docs/devel/index.rst              |   1 +
  docs/devel/submitting-a-patch.rst | 456 ++++++++++++++++++++++++++++++
  2 files changed, 457 insertions(+)

create mode 100644 docs/devel/submitting-a-patch.rst

docs/devel/index.rst +0 -0
index 816eb7b7b0..c3cfa9e41f 100644

docs/devel/index.rst modifying QEMU's source code. · line 50

Quoted 4 lines
docs/devel/index.rst +1 -0
@@ -47,3 +47,4 @@ modifying QEMU's source code.
     writing-qmp-commands
     trivial-patches
     submitting-a-pull-request
+   submitting-a-patch

I'd suggest to insert this before the pull-request entry, in case anybody reads the manual sequentially, it might be better to learn about the patch submission process first before reading about pull requests. (I can fix this up when picking up the patch, no need to resend)

Quoted 5 lines
docs/devel/submitting-a-patch.rst new file +0 -0
new file mode 100644
index 0000000000..c80dad47fa

...

docs/devel/submitting-a-patch.rst line 88

Quoted 8 lines
docs/devel/submitting-a-patch.rst new file +8 -0
+Split up long patches
+~~~~~~~~~~~~~~~~~~~~~
+
+Split up longer patches into a patch series of logical code changes.
+Each change should compile and execute successfully. For instance, don't
+add a file to the makefile in patch one and then add the file itself in
+patch two. (This rule is here so that people can later use tools like
+```git bisect`` <http://git-scm.com/docs/git-bisect>`__ without hitting

That hyperlink showed up in the rendered output. I'll fix it up by removing the "``" quotes.

Quoted 4 lines

+.. _write_a_meaningful_commit_message:

docs/devel/submitting-a-patch.rst new file +3 -0
+
+Write a meaningful commit message
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

docs/devel/submitting-a-patch.rst

Quoted 10 lines
docs/devel/submitting-a-patch.rst new file +10 -0
+
+Commit messages should be meaningful and should stand on their own as a
+historical record of why the changes you applied were necessary or
+useful.
+
+QEMU follows the usual standard for git commit messages: the first line
+(which becomes the email subject line) is "subsystem: single line
+summary of change". Whether the "single line summary of change" starts
+with a capital is a matter of taste, but we prefer that the summary does
+not end in ".".

That ".". looks a little bit weird in the output ... maybe we should replace it with "does not end with a dot." ?

docs/devel/submitting-a-patch.rst line 166

Quoted 10 lines

Look at ``git shortlog -30`` for an idea of sample

docs/devel/submitting-a-patch.rst new file +9 -0
+subject lines. Then there is a blank line and a more detailed
+description of the patch, another blank and your Signed-off-by: line.
+Please do not use lines that are longer than 76 characters in your
+commit message (so that the text still shows up nicely with "git show"
+in a 80-columns terminal window).
+
+The body of the commit message is a good place to document why your
+change is important. Don't include comments like "This is a suggestion
+for fixing this bug" (they can go below the "---" line in the email so

That --- gets translated into a — character ... I'll replace the "---" with ``---`` to fix it.

Thomas

#5 lore raw

Re: [PATCH v3 3/3] docs: rSTify the "SubmitAPatch" wiki

Quoted 1 line · Thomas Huth

On 10/11/2021 15.49, Kashyap Chamarthy wrote:

[...]

Quoted 8 lines
Quoted 4 lines

writing-qmp-commands
trivial-patches
submitting-a-pull-request
+ submitting-a-patch

I'd suggest to insert this before the pull-request entry, in case anybody reads the manual sequentially, it might be better to learn about the patch submission process first before reading about pull requests.

I did notice it when looking at the rendered output, and still missed to fix it; bad me.

Quoted 1 line

(I can fix this up when picking up the patch, no need to resend)

Thank you.

[...]

Quoted 8 lines

docs/devel/submitting-a-patch.rst line 88

Quoted 5 lines
docs/devel/submitting-a-patch.rst new file +5 -0
+Split up longer patches into a patch series of logical code changes.
+Each change should compile and execute successfully. For instance, don't
+add a file to the makefile in patch one and then add the file itself in
+patch two. (This rule is here so that people can later use tools like
+```git bisect`` <http://git-scm.com/docs/git-bisect>`__ without hitting

That hyperlink showed up in the rendered output. I'll fix it up by removing the "``" quotes.

Oops, good catch.

[...]

Quoted 8 lines

docs/devel/submitting-a-patch.rst

Quoted 5 lines
docs/devel/submitting-a-patch.rst new file +5 -0
+QEMU follows the usual standard for git commit messages: the first line
+(which becomes the email subject line) is "subsystem: single line
+summary of change". Whether the "single line summary of change" starts
+with a capital is a matter of taste, but we prefer that the summary does
+not end in ".".

That ".". looks a little bit weird in the output ... maybe we should replace it with "does not end with a dot." ?

Re-looking the output, yes it does look odd. And yes, your amendment is good.

[...]

Quoted 6 lines

docs/devel/submitting-a-patch.rst line 166

Quoted 3 lines
docs/devel/submitting-a-patch.rst new file +3 -0
+The body of the commit message is a good place to document why your
+change is important. Don't include comments like "This is a suggestion
+for fixing this bug" (they can go below the "---" line in the email so

That --- gets translated into a — character ... I'll replace the "---" with ``---`` to fix it.

Ah, when I locally ran rst2html5 submitting-a-patch.rst submitting-a-patch.html it retained the "---", but when I built QEMU (configure --target-list=x86_64-softmmu --enable-docs), Sphinx does turn it into an em-dash (—), and missed to notice it.

Thanks for the careful review and submitting the PR. I'm assuming I don't need to respin a v4.

Signature · 1 line
/kashyap
#6 lore raw

Re: [PATCH v3 3/3] docs: rSTify the "SubmitAPatch" wiki

On 17/11/2021 11.25, Kashyap Chamarthy wrote:
...

Quoted 11 lines
Quoted 8 lines

docs/devel/submitting-a-patch.rst

Quoted 5 lines
docs/devel/submitting-a-patch.rst new file +5 -0
+QEMU follows the usual standard for git commit messages: the first line
+(which becomes the email subject line) is "subsystem: single line
+summary of change". Whether the "single line summary of change" starts
+with a capital is a matter of taste, but we prefer that the summary does
+not end in ".".

That ".". looks a little bit weird in the output ... maybe we should replace it with "does not end with a dot." ?

Re-looking the output, yes it does look odd. And yes, your amendment is good.

I haven't updated that one while picking up the patch - so we might want to fix it with an additional patch on top.

Quoted 7 lines
Quoted 6 lines

docs/devel/submitting-a-patch.rst line 166

Quoted 3 lines
docs/devel/submitting-a-patch.rst new file +3 -0
+The body of the commit message is a good place to document why your
+change is important. Don't include comments like "This is a suggestion
+for fixing this bug" (they can go below the "---" line in the email so

That --- gets translated into a — character ... I'll replace the "---" with ``---`` to fix it.

Quoted 7 lines

Ah, when I locally ran rst2html5 submitting-a-patch.rst submitting-a-patch.html it retained the "---", but when I built QEMU (configure --target-list=x86_64-softmmu --enable-docs), Sphinx does turn it into an em-dash (—), and missed to notice it.

Thanks for the careful review and submitting the PR. I'm assuming I don't need to respin a v4.

Right, patches have been merged now.

Something I just noticed afterwards, after looking at the pages online: https://www.qemu.org/docs/master/devel/submitting-a-pull-request.html uses "Submit" in the heading, while https://www.qemu.org/docs/master/devel/submitting-a-patch.html uses "Submitting" ... looks a little bit inconsequent ... should we change it to use one form only? The Wiki used "submit", not "submitting", so maybe use that one?

Thomas

#7 lore raw

Re: [PATCH v3 3/3] docs: rSTify the "SubmitAPatch" wiki

Quoted 1 line · Thomas Huth

On 17/11/2021 11.25, Kashyap Chamarthy wrote:

[...]

Quoted 8 lines
Quoted 5 lines
Quoted 2 lines

That ".". looks a little bit weird in the output ... maybe we should replace it with "does not end with a dot." ?

Re-looking the output, yes it does look odd. And yes, your amendment is good.

I haven't updated that one while picking up the patch - so we might want to fix it with an additional patch on top.

Sure, no prob.

[...]

Quoted 4 lines
Quoted 2 lines

Thanks for the careful review and submitting the PR. I'm assuming I don't need to respin a v4.

Right, patches have been merged now.

Thanks!

Quoted 7 lines

Something I just noticed afterwards, after looking at the pages online:
https://www.qemu.org/docs/master/devel/submitting-a-pull-request.html uses "Submit" in the heading, while
https://www.qemu.org/docs/master/devel/submitting-a-patch.html uses "Submitting" ... looks a little bit inconsequent ... should we change it to use one form only? The Wiki used "submit", not "submitting", so maybe use that one?

Right, I generally also prefer the imperative mood ("submit"). I went with "submitting" to keep things a bit consistent with the existing
convention: 'writing-qmp-commands.rst", "testing.rst", "tracing.rst", "secure-coding-practises.rst", etc. And as discussed on #qemu, OFTC, I'll update the heading in submitting-a-pull-request.rst from "submit" to "submitting".

Also, thanks for reminding on IRC of updating 'qemu-web' links to update from Wiki to the in-tree docs.

https://www.qemu.org/contribute/

I'll send a follow-up for that. I see a three occurrences in the 'qemu-web' repo:

$> git grep SubmitAPatch
CONTRIBUTING.md:https://wiki.qemu.org/Contribute/SubmitAPatch
contribute.md:Please do not submit merge requests on GitLab; patches are sent to the mailing list according to QEMU's [patch submissions guidelines](https://wiki.qemu.org/Contribute/SubmitAPatch). contribute/report-a-bug.md:QEMU does not use GitLab merge requests; patches are sent to the mailing list according to QEMU's [patch submissions guidelines](https://wiki.qemu.org/Contribute/SubmitAPatch).

Signature · 1 line
/kashyap