Difference between revisions of "How to submit patches"

From OpenVZ Virtuozzo Containers Wiki
Jump to: navigation, search
(Mark as stub article)
(Marked this version for translation)
 
(11 intermediate revisions by the same user not shown)
Line 1: Line 1:
−
{{Stub}}
+
{{Virtuozzo}}
  
 +
<translate>
 +
<!--T:1-->
 +
* [[Kernel patches]]
 +
* [[Userspace patches]]
 +
* [[Best practices for development of EZ templates]]
  
−
== Setting up working enviroment ==
+
== Wait for response == <!--T:2-->
−
 
 
−
=== Obtaining the source code ===
 
−
 
 
−
The OpenVZ sources are tracked by Git SCM and placed on http://git.openvz.org
 
−
repository. You either could download packed sources or use git tool itself.
 
−
 
 
−
For example to clone vzctl one need to type
 
−
 
 
−
        git clone git://git.openvz.org/vzctl.git
 
−
 
 
−
 
 
−
=== Compiling the source code ===
 
−
 
 
−
{{FIXME|describe how to compile OpenVZ components}}
 
−
 
 
−
 
 
−
== Changing the source code ==
 
−
 
 
−
=== Kernel ===
 
−
 
 
−
When you change the source code keep in mind - we prefer tabs and indentations
 
−
to be 8 characters width. Consider reading [https://www.kernel.org/doc/Documentation/CodingStyle Linux kernel coding style].
 
−
 
 
−
Other "rules" could be learned from the source code - just make your code
 
−
to look similar.
 
−
 
 
−
=== Userspace ===
 
−
 
 
−
{{FIXME|describe code style}}
 
−
 
 
−
 
 
−
== Producing a patch ==
 
−
 
 
−
=== Kernel ===
 
−
 
 
−
There are at least two ways to make it right.
 
−
 
 
−
1) git format-patch
 
−
 
 
−
You might need to read documentation on Git SCM how to prepare patch
 
−
for mail submission. Take a look on http://book.git-scm.com/ and/or
 
−
http://git-scm.com/documentation for details. It should not be hard
 
−
at all.
 
−
 
 
−
2) Use "diff -up"
 
−
 
 
−
Use <code>diff -up</code> or <code>diff -uprN</code> to create patches.
 
−
 
 
−
 
 
−
=== Userspace ===
 
−
 
 
−
{{FIXME|describe preparing patch}}
 
−
 
 
−
 
 
−
== Checking patches for errors ==
 
−
 
 
−
=== Kernel ===
 
−
 
 
−
Basic style error checking is provided by scripts/checkpatch.pl script
 
−
from linux kernel source tree. You might have headers or complete sources
 
−
of linux kernel at /usr/src/. Run
 
−
 
 
−
        checkpatch.pl my_patch.patch (consider --no-tree option for headers-only)
 
−
 
 
−
It will produce detailed report on style problems in your patch.
 
−
Make sure to fix all _errors_(some warnings may be ignored).
 
−
 
 
−
 
 
−
=== Userspace ===
 
−
 
 
−
Several of our components contains tests. To check whether your patches don't harm anything run:
 
−
 
 
−
        make test
 
−
 
 
−
It will launch tests. Check for error messages produced by it.
 
−
 
 
−
== Sending patches ==
 
−
 
 
−
=== Kernel ===
 
−
 
 
−
Patches related to kernel should be sent to development mailing list devel@openvz.org
 
−
which is located at https://openvz.org/mailman/listinfo/devel. Pay attention that mails
 
−
from emails not subscribed to list must pass moderation (i.e. not so fast).
 
−
 
 
−
Please make sure the email client you're using doesn't screw your patch
 
−
(line wrapping and so on).
 
−
 
 
−
=== Userspace ===
 
−
 
 
−
Patches related to userspace tools should be submitted to code review system (FIXME).
 
−
 
 
−
 
 
−
== Wait for response ==
 
  
 +
<!--T:3-->
 
Be patient. Most OpenVZ developers are pretty busy people so if
 
Be patient. Most OpenVZ developers are pretty busy people so if
 
there is no immediate response on your patch - don't be surprised,
 
there is no immediate response on your patch - don't be surprised,
 
sometimes a patch may fly around a week(s) before it get reviewed.
 
sometimes a patch may fly around a week(s) before it get reviewed.
 
But definitely the patches will not go to <code>/dev/null</code>.
 
But definitely the patches will not go to <code>/dev/null</code>.
 +
 +
== External links == <!--T:4-->
 +
 +
<!--T:5-->
 +
* [[OpenVZ_infrastructure#Code|OpenVZ source code]]
 +
</translate>
  
 
[[Category:Development]]
 
[[Category:Development]]
 +
[[Category:Contributions]]
 +
[[Category:Virtuozzo]]

Latest revision as of 22:37, 25 December 2015

<translate>

Wait for response[edit]

Be patient. Most OpenVZ developers are pretty busy people so if there is no immediate response on your patch - don't be surprised, sometimes a patch may fly around a week(s) before it get reviewed. But definitely the patches will not go to /dev/null.

External links[edit]

</translate>