Blame SubmittingPatches

Packit Service 31306d
How to contribute a patch to libssh
Packit Service 31306d
====================================
Packit Service 31306d
Packit Service 31306d
Please checkout the libssh source code using git. Change the code and then
Packit Service 31306d
use  "git format-patch" to create a patch. The patch should be signed (see
Packit Service 31306d
below) and send it to libssh@libssh.org, or attach it to a bug report at
Packit Service 31306d
https://red.libssh.org/
Packit Service 31306d
Packit Service 31306d
For larger code changes, breaking the changes up into a set of simple
Packit Service 31306d
patches, each of which does a single thing, are much easier to review.
Packit Service 31306d
Patch sets like that will most likely have an easier time being merged
Packit Service 31306d
into the libssh code than large single patches that make lots of
Packit Service 31306d
changes in one large diff.
Packit Service 31306d
Packit Service 31306d
Ownership of the contributed code
Packit Service 31306d
==================================
Packit Service 31306d
Packit Service 31306d
libssh is a project with distributed copyright ownership, which means
Packit Service 31306d
we prefer the copyright on parts of libssh to be held by individuals
Packit Service 31306d
rather than corporations if possible. There are historical legal
Packit Service 31306d
reasons for this, but one of the best ways to explain it is that it's
Packit Service 31306d
much easier to work with individuals who have ownership than corporate
Packit Service 31306d
legal departments if we ever need to make reasonable compromises with
Packit Service 31306d
people using and working with libssh.
Packit Service 31306d
Packit Service 31306d
We track the ownership of every part of libssh via https://git.libssh.org,
Packit Service 31306d
our source code control system, so we know the provenance of every piece
Packit Service 31306d
of code that is committed to libssh.
Packit Service 31306d
Packit Service 31306d
So if possible, if you're doing libssh changes on behalf of a company
Packit Service 31306d
who normally owns all the work you do please get them to assign
Packit Service 31306d
personal copyright ownership of your changes to you as an individual,
Packit Service 31306d
that makes things very easy for us to work with and avoids bringing
Packit Service 31306d
corporate legal departments into the picture.
Packit Service 31306d
Packit Service 31306d
If you can't do this we can still accept patches from you owned by
Packit Service 31306d
your employer under a standard employment contract with corporate
Packit Service 31306d
copyright ownership. It just requires a simple set-up process first.
Packit Service 31306d
Packit Service 31306d
We use a process very similar to the way things are done in the Linux
Packit Service 31306d
Kernel community, so it should be very easy to get a sign off from
Packit Service 31306d
your corporate legal department. The only changes we've made are to
Packit Service 31306d
accommodate the license we use, which is LGPLv2 (or later) whereas the
Packit Service 31306d
Linux kernel uses GPLv2.
Packit Service 31306d
Packit Service 31306d
The process is called signing.
Packit Service 31306d
Packit Service 31306d
How to sign your work
Packit Service 31306d
----------------------
Packit Service 31306d
Packit Service 31306d
Once you have permission to contribute to libssh from your employer, simply
Packit Service 31306d
email a copy of the following text from your corporate email address to:
Packit Service 31306d
Packit Service 31306d
contributing@libssh.org
Packit Service 31306d
Packit Service 31306d
Packit Service 31306d
Packit Service 31306d
libssh Developer's Certificate of Origin. Version 1.0
Packit Service 31306d
Packit Service 31306d
Packit Service 31306d
By making a contribution to this project, I certify that:
Packit Service 31306d
Packit Service 31306d
(a) The contribution was created in whole or in part by me and I
Packit Service 31306d
    have the right to submit it under the appropriate
Packit Service 31306d
    version of the GNU General Public License; or
Packit Service 31306d
Packit Service 31306d
(b) The contribution is based upon previous work that, to the best of
Packit Service 31306d
    my knowledge, is covered under an appropriate open source license
Packit Service 31306d
    and I have the right under that license to submit that work with
Packit Service 31306d
    modifications, whether created in whole or in part by me, under
Packit Service 31306d
    the GNU General Public License, in the appropriate version; or
Packit Service 31306d
Packit Service 31306d
(c) The contribution was provided directly to me by some other
Packit Service 31306d
    person who certified (a) or (b) and I have not modified it.
Packit Service 31306d
Packit Service 31306d
(d) I understand and agree that this project and the contribution are
Packit Service 31306d
    public and that a record of the contribution (including all
Packit Service 31306d
    metadata and personal information I submit with it, including my
Packit Service 31306d
    sign-off) is maintained indefinitely and may be redistributed
Packit Service 31306d
    consistent with the libssh Team's policies and the requirements of
Packit Service 31306d
    the GNU GPL where they are relevant.
Packit Service 31306d
Packit Service 31306d
(e) I am granting this work to this project under the terms of the
Packit Service 31306d
    GNU Lesser General Public License as published by the
Packit Service 31306d
    Free Software Foundation; either version 2.1 of
Packit Service 31306d
    the License, or (at the option of the project) any later version.
Packit Service 31306d
Packit Service 31306d
    https://www.gnu.org/licenses/lgpl-2.1.html
Packit Service 31306d
Packit Service 31306d
Packit Service 31306d
We will maintain a copy of that email as a record that you have the
Packit Service 31306d
rights to contribute code to libssh under the required licenses whilst
Packit Service 31306d
working for the company where the email came from.
Packit Service 31306d
Packit Service 31306d
Then when sending in a patch via the normal mechanisms described
Packit Service 31306d
above, add a line that states:
Packit Service 31306d
Packit Service 31306d
   Signed-off-by: Random J Developer <random@developer.example.org>
Packit Service 31306d
Packit Service 31306d
using your real name and the email address you sent the original email
Packit Service 31306d
you used to send the libssh Developer's Certificate of Origin to us
Packit Service 31306d
(sorry, no pseudonyms or anonymous contributions.)
Packit Service 31306d
Packit Service 31306d
That's it! Such code can then quite happily contain changes that have
Packit Service 31306d
copyright messages such as:
Packit Service 31306d
Packit Service 31306d
   (c) Example Corporation.
Packit Service 31306d
Packit Service 31306d
and can be merged into the libssh codebase in the same way as patches
Packit Service 31306d
from any other individual. You don't need to send in a copy of the
Packit Service 31306d
libssh Developer's Certificate of Origin for each patch, or inside each
Packit Service 31306d
patch. Just the sign-off message is all that is required once we've
Packit Service 31306d
received the initial email.
Packit Service 31306d
Packit Service 31306d
Have fun and happy libssh hacking !
Packit Service 31306d
Packit Service 31306d
The libssh Team
Packit Service 31306d