Lyo uses Gerrit to accept, review and approve code contributions from the community. '''NOTE:''' Please see [http://wiki.eclipse.org/Gerrit the Eclipse Gerrit guide ] for information on configuring EGit or the command line to push to the Eclipse Gerrit instance. You will need to get your unique Gerrit userid by following those instructions. Using ssh to communicate is required and involves registering your public SSH key with Gerrit as described in the instructions.

+

Lyo uses Gerrit to accept, review and approve code contributions from the community. '''NOTE:''' Please see [http://wiki.eclipse.org/Gerrit the Eclipse Gerrit guide ] for information on configuring EGit or the command line to push to the Eclipse Gerrit instance. You will need to get your unique Gerrit userid by following those instructions. Using ssh to communicate is recommended and involves registering your public SSH key with Gerrit as described in the instructions.

The Lyo Gerrit ssh repository URLs to push to are:

The Lyo Gerrit ssh repository URLs to push to are:

Line 26:

Line 26:

| ssh://<userid>@git.eclipse.org:29418/lyo/org.eclipse.lyo.core.git

| ssh://<userid>@git.eclipse.org:29418/lyo/org.eclipse.lyo.core.git

|-

|-

−

| OSLC Samples

+

| OSLC Server

| ssh://<userid>@git.eclipse.org:29418/lyo/org.eclipse.lyo.server.git

| ssh://<userid>@git.eclipse.org:29418/lyo/org.eclipse.lyo.server.git

|-

|-

Line 37:

Line 37:

| OSLC Client

| OSLC Client

| ssh://<userid>@git.eclipse.org:29418/lyo/org.eclipse.lyo.client.git

| ssh://<userid>@git.eclipse.org:29418/lyo/org.eclipse.lyo.client.git

+

|-

+

| OSLC Samples

+

| ssh://<userid>@git.eclipse.org:29418/lyo/org.eclipse.lyo.docs.git

+

|-

+

| LDP (Linked Data Platform)

+

| ssh://<userid>@git.eclipse.org:29418/lyo/org.eclipse.lyo.ldp.git

|}

|}

Where <userid> is the user ID received when following the instructions in [http://wiki.eclipse.org/Gerrit the Eclipse Gerrit guide ]. It is not your Bugzilla user ID.

Where <userid> is the user ID received when following the instructions in [http://wiki.eclipse.org/Gerrit the Eclipse Gerrit guide ]. It is not your Bugzilla user ID.

+

+

Some users, especially when using EGit to configure ssh, have reported needing a file called '''<home>/.ssh/config''' for things to work. The content of this file should be the following line:

+

+

IdentityFile .ssh/id_rsa

Example of a correctly configured Gerrit Push configuration for the Lyo Core repository:

Example of a correctly configured Gerrit Push configuration for the Lyo Core repository:

[[Image:Lyo Gerrit Config.png]]

[[Image:Lyo Gerrit Config.png]]

+

+

=== SSH configuration tips (Windows, especially) ===

+

+

Linux and Mac users can generally use the built-in ssh client and configuration files which are managed by the OS. You can also use these tips if you want to manage them from EGit, but this information is primarily for Windows users.

* Click Save Private Key (you can use the Load Existing Key button later to reload the public key to this dialog)

+

* Go to https://git.eclipse.org/r/#/settings/ and sign in with your Bugzilla email/passwd and click Profile to see your Gerrit username to use when configuring your connection. This is different from your Bugzilla username.

+

* Click on the SSH Public Keys link on the left hand side and click Add Key and paste in your public key from the step above

+

+

[[Image:Lyo Gerrit SSH Config.png]]

+

+

This should prepare your Eclipse environment to follow the steps above

== Building and running the code ==

== Building and running the code ==

Line 57:

Line 88:

== Lyo contribution process ==

== Lyo contribution process ==

−

You're ready to contribute a bug fix or some new functionality to Lyo? Great. Here's what you need to do:

+

You're ready to contribute a bug fix or some new functionality to Lyo? Great. Here's what you need to do.

−

* Make sure there is a [https://bugs.eclipse.org/bugs/enter_bug.cgi?product=Lyo Bugzilla bug] open for the work that you are doing. Make a comment in the bug or on the [mailto:lyo-dev.org mailing list] that you want it assigned to you.

+

* Make sure you have a signed [http://wiki.eclipse.org/Development_Resources/Contributing_via_Git#Eclipse_Foundation_Contributor_License_Agreement Eclipse Contributor License Agreement]. This is a one-time step, but sadly we won't be able to commit your change without a signed CLA even if it solves all integration problems, fights world hunger, and brews coffee.

−

* Pull the latest Lyo code from the appropriate [http://git.eclipse.org/c/lyo Lyo git repository] per the instructions in the "Building and running the code" secition above.

+

* Open a [https://bugs.eclipse.org/bugs/enter_bug.cgi?product=Lyo Bugzilla bug] the work that you are doing. Make a comment in the bug or on the [mailto:lyo-dev.org mailing list] that you want it assigned to you.

+

* Pull the latest Lyo code from the appropriate [http://git.eclipse.org/c/lyo Lyo git repository] per the instructions in the "Building and running the code" section above.

+

* (Optional) Create a topic branch for your work.

* Code your change - make sure you update any copyright headers as needed. Use existing source if you need to place a new copyright header. Make sure it references '''both''' the [http://www.eclipse.org/legal/copyrightandlicensenotice.php EPL] and [http://www.eclipse.org/org/documents/edl-v10.php EDL] licenses (see [[Lyo/Licenses]] for more details about this particular choice of dual licensing in Eclipse lyo).

* Code your change - make sure you update any copyright headers as needed. Use existing source if you need to place a new copyright header. Make sure it references '''both''' the [http://www.eclipse.org/legal/copyrightandlicensenotice.php EPL] and [http://www.eclipse.org/org/documents/edl-v10.php EDL] licenses (see [[Lyo/Licenses]] for more details about this particular choice of dual licensing in Eclipse lyo).

−

* Commit your change locally - all commits must include the Bugzilla number in the first line of thecommit message. Your commit must have the Gerrit Change-Id string in the last paragraph and must include a Signed-off-by. See [[Lyo/ContributorsGettingStarted#Requirements_for_Lyo_Commits | Requirements for Lyo Commits]]

+

* Commit your change locally - all commits must include the Bugzilla number in the first line of the commit message. Your commit must have the Gerrit Change-Id string in the last paragraph and must include a Signed-off-by. See [[Lyo/ContributorsGettingStarted#Requirements_for_Lyo_Commits | Requirements for Lyo Commits]]

** Add at least one of the project committers (fiedler.mf@gmail-dot-com or spadgett@us-dot-ibm-dot-com are good choices) as a reviewer

** Add at least one of the project committers (fiedler.mf@gmail-dot-com or spadgett@us-dot-ibm-dot-com are good choices) as a reviewer

** Add any others you think would be able to provide a valuable review

** Add any others you think would be able to provide a valuable review

−

* Edit the Bugzilla bug tracking this work and add this statement (only if it is true!!): "I wrote all this code, and have the rights to contribute it to Eclipse and contribute it under the EPL and EDL"

+

* (Optional) Send a notification to the lyo-dev mailing list that the change is ready for review.

−

* (Optional) send a notification to the lyo-dev mailing list that the change is ready for review.

+

After the change is reviewed, it may require additional work or amendment based on the review comments. See [http://wiki.eclipse.org/EGit/User_Guide#Amending_Commits the EGit User's Guide] for information on amending commits.

After the change is reviewed, it may require additional work or amendment based on the review comments. See [http://wiki.eclipse.org/EGit/User_Guide#Amending_Commits the EGit User's Guide] for information on amending commits.

Line 80:

Line 112:

* '''A descriptive commit message.''' The first line of the commit message should be the Bug ID and a short summary of the change. Example: "Bug 12345: Add NPE protection to Foo::Bar". A more detailed explanation of the change on subsequent lines is encouraged.

* '''A descriptive commit message.''' The first line of the commit message should be the Bug ID and a short summary of the change. Example: "Bug 12345: Add NPE protection to Foo::Bar". A more detailed explanation of the change on subsequent lines is encouraged.

−

* '''A Signed-off-by-line with your name and e-mail.''' In EGit there is a widget in the upper right of the commit dialog to add this. Example: "Signed-off-by: Michael Fiedler <fiedler.mf@example.com>". This asserts you are contributing this under the Eclipse IP terms.

+

* '''A Signed-off-by-line with your name and e-mail.''' In EGit there is a widget in the upper right of the commit dialog to add this. Example: "Signed-off-by: Michael Fiedler <fiedler.mf@example.com>". This asserts you are contributing this commit under the Eclipse IP terms.

* '''A Gerrit Change-ID string. ''' In EGit there is a widget in the upper right of the commit dialog to add this. Don't worry about the value, EGit will compute it. Example: "Change-Id: I0000000000000000000000000000000000000000"

* '''A Gerrit Change-ID string. ''' In EGit there is a widget in the upper right of the commit dialog to add this. Don't worry about the value, EGit will compute it. Example: "Change-Id: I0000000000000000000000000000000000000000"

Line 90:

Line 122:

** '''EGit''': In the Git repositories view, right click the repository where you be making a change and select '''Pull'''

** '''EGit''': In the Git repositories view, right click the repository where you be making a change and select '''Pull'''

** (Optional, but good practice) Before merging, repeat the steps above to pull from Eclipse in case anything was committed while you were making your change, especially if your change took a long time.

+

** (Optional, but good practice) Before merging, repeat the steps above to pull from Eclipse in case anything was committed while you were making your change, especially if your change took a long time to code and test.

Git repositories

Gerrit and Lyo

Lyo uses Gerrit to accept, review and approve code contributions from the community. NOTE: Please see the Eclipse Gerrit guide for information on configuring EGit or the command line to push to the Eclipse Gerrit instance. You will need to get your unique Gerrit userid by following those instructions. Using ssh to communicate is recommended and involves registering your public SSH key with Gerrit as described in the instructions.

Where <userid> is the user ID received when following the instructions in the Eclipse Gerrit guide . It is not your Bugzilla user ID.

Some users, especially when using EGit to configure ssh, have reported needing a file called <home>/.ssh/config for things to work. The content of this file should be the following line:

IdentityFile .ssh/id_rsa

Example of a correctly configured Gerrit Push configuration for the Lyo Core repository:

SSH configuration tips (Windows, especially)

Linux and Mac users can generally use the built-in ssh client and configuration files which are managed by the OS. You can also use these tips if you want to manage them from EGit, but this information is primarily for Windows users.

Click Save Private Key (you can use the Load Existing Key button later to reload the public key to this dialog)

Go to https://git.eclipse.org/r/#/settings/ and sign in with your Bugzilla email/passwd and click Profile to see your Gerrit username to use when configuring your connection. This is different from your Bugzilla username.

Click on the SSH Public Keys link on the left hand side and click Add Key and paste in your public key from the step above

This should prepare your Eclipse environment to follow the steps above

Building and running the code

For information on how to build and run the various components in Lyo in a development environment, please see the following guides:

Lyo contribution process

You're ready to contribute a bug fix or some new functionality to Lyo? Great. Here's what you need to do.

Make sure you have a signed Eclipse Contributor License Agreement. This is a one-time step, but sadly we won't be able to commit your change without a signed CLA even if it solves all integration problems, fights world hunger, and brews coffee.

Open a Bugzilla bug the work that you are doing. Make a comment in the bug or on the mailing list that you want it assigned to you.

Pull the latest Lyo code from the appropriate Lyo git repository per the instructions in the "Building and running the code" section above.

(Optional) Create a topic branch for your work.

Code your change - make sure you update any copyright headers as needed. Use existing source if you need to place a new copyright header. Make sure it references both the EPL and EDL licenses (see Lyo/Licenses for more details about this particular choice of dual licensing in Eclipse lyo).

Commit your change locally - all commits must include the Bugzilla number in the first line of the commit message. Your commit must have the Gerrit Change-Id string in the last paragraph and must include a Signed-off-by. See Requirements for Lyo Commits

Add at least one of the project committers (fiedler.mf@gmail-dot-com or spadgett@us-dot-ibm-dot-com are good choices) as a reviewer

Add any others you think would be able to provide a valuable review

(Optional) Send a notification to the lyo-dev mailing list that the change is ready for review.

After the change is reviewed, it may require additional work or amendment based on the review comments. See the EGit User's Guide for information on amending commits.

Once your change is approved, there is nothing more for you to do - the committers will push the change to the appropriate repository and others can then fetch or pull it.

Requirements for Lyo Commits

All Git commits for Lyo must include:

A descriptive commit message. The first line of the commit message should be the Bug ID and a short summary of the change. Example: "Bug 12345: Add NPE protection to Foo::Bar". A more detailed explanation of the change on subsequent lines is encouraged.

A Signed-off-by-line with your name and e-mail. In EGit there is a widget in the upper right of the commit dialog to add this. Example: "Signed-off-by: Michael Fiedler <fiedler.mf@example.com>". This asserts you are contributing this commit under the Eclipse IP terms.

A Gerrit Change-ID string. In EGit there is a widget in the upper right of the commit dialog to add this. Don't worry about the value, EGit will compute it. Example: "Change-Id: I0000000000000000000000000000000000000000"

Suggested Git workflow for making a change in Lyo

The following steps should help minimize the amount of merging you and the committers will have to do to integrate your change

Before making any changes, make sure you have the latest code from Eclipse

EGit: In the Git repositories view, right click the repository where you be making a change and select Pull

Command Line: cd to the git repository and then git pull origin master

Create a new local branch to make your change on

EGit: Expand the repository -> Branches, right click Local -> Switch To -> New Branch. Name your branch BugXXXXX where XXXXXX is the Bugzilla number.

Command Line: git checkout -b BugXXXXXX where XXXXXXX is the Bugzilla number

(Optional, but good practice) Before merging, repeat the steps above to pull from Eclipse in case anything was committed while you were making your change, especially if your change took a long time to code and test.