(1) Discuss any large changes on the mailing list first. Post patches early and
listen to feedback.
-
-
(2) Official upstream repository is kept in git ("git://libvirt.org/libvirt.git")
and is browsable along with other libvirt-related repositories (e.g.
libvirt-python) online <http://libvirt.org/git/>.
-
-
(3) Patches to translations are maintained via the zanata project
<https://fedora.zanata.org/>. If you want to fix a translation in a .po file,
join the appropriate language team. The libvirt release process automatically
pulls the latest version of each translation file from zanata.
-
-
(4) Post patches using "git send-email", with git rename detection enabled. You
need a one-time setup of:
"--subject-prefix=PATCHv2" appended to "git send-email" (substitute "v2" with
the correct version if needed though).
-
-
(5) In your commit message, make the summary line reasonably short (60 characters
is typical), followed by a blank line, followed by any longer description of
why your patch makes sense. If the patch fixes a regression, and you know what
Libvirt does not currently attach any meaning to Signed-off-by: lines, so it
is up to you if you want to include or omit them in the commit message.
-
-
(6) Split large changes into a series of smaller patches, self-contained if
possible, with an explanation of each patch and an explanation of how the
sequence of patches fits together. Moreover, please keep in mind that it's
failures (this is to preserve the usefulness of "git bisect", among other
things).
-
-
(7) Make sure your patches apply against libvirt GIT. Developers only follow GIT
and don't care much about released versions.
-
-
(8) Run the automated tests on your code before submitting any changes. In
particular, configure with compile warnings set to -Werror. This is done
automatically for a git checkout; from a tarball, use:
VIR_TEST_FILE_ACCESS=1 VIR_TEST_FILE_ACCESS_OUTPUT="/tmp/file_access.txt" ./qemuxml2argvtest
-
-
(9) The Valgrind test should produce similar output to "make check". If the output
has traces within libvirt API's, then investigation is required in order to
determine the cause of the issue. Output such as the following indicates some
obj:*/lib*/ld-2.*so*
}
-
-
(10) Update tests and/or documentation, particularly if you are adding a new
feature or changing the output of a program.
-
-
-
-
There is more on this subject, including lots of links to background reading
on the subject, on Richard Jones' guide to working with open source projects
<http://people.redhat.com/rjones/how-to-supply-code-to-open-source-projects/>.
-
-
Of course, take all of the above with a grain of salt. If you're about to use
some system interface that requires a type like "size_t", "pid_t" or "off_t",
use matching types for any corresponding variables.
-
-
File handling
=============
Usage of the "fdopen()", "close()", "fclose()" APIs is deprecated in libvirt
-
-
String comparisons
==================
Do not use the strcmp, strncmp, etc functions directly. Instead use one of the
-
-
String copying
==============
Do not use the strncpy function. According to the man page, it does *not*
conditional and a block instead of a goto. Perhaps some of your function's
logic would be better pulled out into a helper function.
-
-
Although libvirt does not encourage the Linux kernel wind/unwind style of
multiple labels, there's a good general discussion of the issue archived at
KernelTrap <http://kerneltrap.org/node/553/2131>
<xsl:value-of select="normalize-space(.)"/>
<xsl:text>
</xsl:text>======================
+
+
</xsl:template>
-<xsl:template match="html:ol|html:ul|html:p">
+<xsl:template match="html:p">
<xsl:apply-templates/><xsl:value-of select="$newline"/><xsl:value-of select="$newline"/>
</xsl:template>
-<xsl:template match="html:ol/html:li">
-<xsl:choose>
-<xsl:when test=".//node()[position()=last()]/self::pre">(<xsl:value-of select="position()"/>) <xsl:apply-templates/>
-</xsl:when>
-<!-- only append two newlines when the last element isn't a pre element -->
-<xsl:otherwise>(<xsl:value-of select="position()"/>) <xsl:apply-templates/><xsl:value-of select="$newline"/><xsl:value-of select="$newline"/>
-</xsl:otherwise>
-</xsl:choose>
+<xsl:template match="html:ol/html:li">(<xsl:value-of select="position()"/>) <xsl:apply-templates/>
</xsl:template>