Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "Virgo/Source"

Line 1: Line 1:
 
{{Virgo}}  
 
{{Virgo}}  
 +
 
= Virgo git Repositories  =
 
= Virgo git Repositories  =
  
Line 135: Line 136:
 
template.mf                        // Bundlor template
 
template.mf                        // Bundlor template
 
</pre>  
 
</pre>  
 +
= How to add another git repository to Virgo  =
 +
 +
While this information is mainly of use while the Virgo repositories are initially being populated, it may be useful later. It says how to trace back from Virgo to its origins, how to update a repository description, and what files to copy when a new repository is added.
 +
 +
1. Add the new repository to the git server (may require project lead privileges):
 +
<pre>&gt;ssh &lt;committer_id&gt;@git.eclipse.org
 +
&gt;cd /gitroot/virgo
 +
&gt;initrepo org.eclipse.virgo.&lt;reponame&gt;.git
 +
&lt;log out e.g. using Ctrl-D&gt;
 +
</pre>
 +
2. Clone the new repository:
 +
<pre>&gt;git clone ssh://&lt;committer_id&gt;@git.eclipse.org/gitroot/virgo/org.eclipse.virgo.&lt;reponame&gt;.git &lt;repo dir&gt;
 +
</pre>
 +
3. Create the directories of the new repository and any .gitignore file. For example:
 +
<pre>&gt;cp &lt;source dir&gt;/.gitignore org.eclipse.virgo.&lt;reponame&gt;/.
 +
&gt;cp &lt;source dir&gt;/o* org.eclipse.virgo.&lt;reponame&gt;/.
 +
&gt;cp &lt;source dir&gt;/b* org.eclipse.virgo.&lt;reponame&gt;/.
 +
</pre>
 +
4. If you are creating the new repository from an existing git repository, tag the existing repository and make a note of the tagged commit SHA.
 +
<pre>&gt;cd &lt;source dir&gt;
 +
&gt;git tag Virgo-checkin
 +
&gt;git push origin master --tags
 +
&gt;cd &lt;repo dir&gt;
 +
</pre>
 +
5. Add a submodule for Virgo build.
 +
<pre>&gt;git submodule add git://git.eclipse.org/gitroot/virgo/org.eclipse.virgo.virgo-build.git virgo-build
 +
</pre>
 +
6. Stage all the above changes and push to master.
 +
<pre>&gt;git add .
 +
&gt; git commit -m "initial checkin from &lt;existing repository&gt; commit &lt;tagged commit SHA&gt;"
 +
&gt;git push origin master
 +
</pre>
 +
7. Edit .git/description, making sure the file is a single line ending in a newline, and rsynch this.
 +
<pre>&gt;rsync .git/description &lt;committer-id&gt;@git.eclipse.org:/gitroot/virgo/org.eclipse.virgo.&lt;reponame&gt;.git/description
 +
</pre>
 +
8. Add the new repository to the table above.
 +
 
[[Category:Virgo]] [[Category:EclipseRT]]
 
[[Category:Virgo]] [[Category:EclipseRT]]

Revision as of 03:56, 5 May 2010


Virgo git Repositories

The Virgo source code is organised into separate components each stored in a git repository. The Build tab details how to clone and build these components, but if you want a quick peek at the source code, follow the Short Name links in the table.

Short Name Description Anonymous: git clone Committer: git clone
web-server Web server packaging build
documentation End-user documentation
apps Virgo-supplied applications
web Web integration layer
kernel Kernel
artifact-repository Artifact repository git://git.eclipse.org/gitroot/virgo/org.eclipse.virgo.artifact-repository.git ssh://committer_id@git.eclipse.org/gitroot/virgo/org.eclipse.virgo.artifact-repository.git
medic Diagnostics git://git.eclipse.org/gitroot/virgo/org.eclipse.virgo.medic.git ssh://committer_id@git.eclipse.org/gitroot/virgo/org.eclipse.virgo.medic.git
test Test framework git://git.eclipse.org/gitroot/virgo/org.eclipse.virgo.test.git ssh://committer_id@git.eclipse.org/gitroot/virgo/org.eclipse.virgo.test.git
util utilities git://git.eclipse.org/gitroot/virgo/org.eclipse.virgo.util.git ssh://committer_id@git.eclipse.org/gitroot/virgo/org.eclipse.virgo.util.git
osgi-extensions Launcher and Equinox hooks git://git.eclipse.org/gitroot/virgo/org.eclipse.virgo.osgi-extensions.git ssh://committer_id@git.eclipse.org/gitroot/virgo/org.eclipse.virgo.osgi-extensions.git
osgi-test-stubs Unit test stubs for common OSGi interfaces git://git.eclipse.org/gitroot/virgo/org.eclipse.virgo.osgi-test-stubs.git ssh://committer_id@git.eclipse.org/gitroot/virgo/org.eclipse.virgo.osgi-test-stubs.git
virgo-build Ant/Ivy based build system git://git.eclipse.org/gitroot/virgo/org.eclipse.virgo.virgo-build.git ssh://committer_id@git.eclipse.org/gitroot/virgo/org.eclipse.virgo.virgo-build.git
performance-test Performance tests
system-verification-tests SVT tests
kernel-system-verification-tests Kernel SVT tests
kernel-tools Tools integration layer
sample-greenpages Greenpages sample
sample-configuration-properties Configuration properties sample
sample-formtags Formtags sample
sample-osgi-examples OSGi samples

Source Organisation

A typical git repository is organised into the following files and directories:

build-xxx/                         // top-level build directory
build.properties                   // properties substituted during build
build.versions                     // dependency version properties
org.eclipse.virgo.xxx.y.z/         // a project
...                                // more projects
virgo-build/                       // git submodule

Each project is organised into the following files and directories:

.classpath                         // Eclipse build class path
.project                           // Eclipse project metadata
.settings/                         // Settings
.springBeans                       // Spring tooling metadata
build.xml                          // Ant build instructions
ivy.xml                            // Ivy build dependencies
src/main/java/                     // Runtime source
src/main/resources/                // Runtime resources
src/test/java/                     // Unit/integration test source
src/test/resources/                // Unit/integration test resources
template.mf                        // Bundlor template

How to add another git repository to Virgo

While this information is mainly of use while the Virgo repositories are initially being populated, it may be useful later. It says how to trace back from Virgo to its origins, how to update a repository description, and what files to copy when a new repository is added.

1. Add the new repository to the git server (may require project lead privileges):

>ssh <committer_id>@git.eclipse.org
>cd /gitroot/virgo
>initrepo org.eclipse.virgo.<reponame>.git
<log out e.g. using Ctrl-D>

2. Clone the new repository:

>git clone ssh://<committer_id>@git.eclipse.org/gitroot/virgo/org.eclipse.virgo.<reponame>.git <repo dir>

3. Create the directories of the new repository and any .gitignore file. For example:

>cp <source dir>/.gitignore org.eclipse.virgo.<reponame>/.
>cp <source dir>/o* org.eclipse.virgo.<reponame>/.
>cp <source dir>/b* org.eclipse.virgo.<reponame>/.

4. If you are creating the new repository from an existing git repository, tag the existing repository and make a note of the tagged commit SHA.

>cd <source dir>
>git tag Virgo-checkin
>git push origin master --tags
>cd <repo dir>

5. Add a submodule for Virgo build.

>git submodule add git://git.eclipse.org/gitroot/virgo/org.eclipse.virgo.virgo-build.git virgo-build

6. Stage all the above changes and push to master.

>git add .
> git commit -m "initial checkin from <existing repository> commit <tagged commit SHA>"
>git push origin master

7. Edit .git/description, making sure the file is a single line ending in a newline, and rsynch this.

>rsync .git/description <committer-id>@git.eclipse.org:/gitroot/virgo/org.eclipse.virgo.<reponame>.git/description

8. Add the new repository to the table above.

Back to the top