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 "Orbit/Bundle Checklist"

(Update the Feature)
(19 intermediate revisions by 5 users not shown)
Line 3: Line 3:
  
 
===CQs===
 
===CQs===
A CQ is a Contribution Questionnaire and it basically refers to legal approval to use a third party bundle in Eclipse. Every bundle in Orbit needs to have '''at least''' 2 CQs, one for the bundle being in the Eclipse repository (being a part of Orbit), and then one for each of the projects which are going to be using the Orbit bundle. These subsequent CQs can be created as "piggy-back" CQs which are commonly easier to clear legal since the code has already been approved and you just want permission to re-use it.
+
A CQ is a Contribution Questionnaire and it basically refers to legal approval to use a third party bundle in Eclipse. Every bundle in Orbit needs to have either a CQ, or reference to ClearlyDefined indicating an appropriate score for the third party library.
  
 
CQs can be created on the [http://portal.eclipse.org Eclipse Foundation] web site in the portal.
 
CQs can be created on the [http://portal.eclipse.org Eclipse Foundation] web site in the portal.
  
===Add the Bundle to CVS===
+
[https://clearlydefined.io/ ClearlyDefined] can also be used.
In Orbit we store bundle versions in branches in CVS. Look at our [[Adding Bundles to Orbit]] document for instructions on how to initially put your bundle into Orbit.
+
  
===Create a Source Bundle===
+
===Add the Bundle to Git===
If you have source for your bundle, then follow these steps for getting your bundle into the right format to be consumed
+
In Orbit we store the metadata necessary to generate a bundle in the [http://git.eclipse.org/c/gerrit/orbit/orbit-recipes.git/ orbit-recipes] Git repository. Look at our [[Adding Bundles to Orbit]] document for instructions on how to initially put your bundle into Orbit.
by the build.
+
* In your bundle root, create a directory called <code>source-bundle</code>
+
* Add the appropriate <code>about.html</code> file and an <code>about_files</code> directory with the licenses.
+
* Modify the bundle manifest to add the line to say that your source bundle is attached to the main bundle.
+
<pre>
+
...
+
Bundle-SymbolicName: my.bundle.id.source
+
Eclipse-SourceBundle: my.bundle.id;version="1.0.0.qualifier"
+
...
+
</pre>
+
* Extract the source to the root of the directory.
+
* Modify the <code>build.properties</code> to ensure the root of the source is included in the build.  
+
  
In the example below, the <code>my/</code> directory is the root of the source since it is for the bundle <code>my.bundle.id</code>. The bundle also contains legal files in an <code>about_files</code> directory so it is included here.
+
===Verify the osgi.bnd ===
 
+
The osgi.bnd file is used to generate the bundle manifest (<code>META-INF/MANIFEST.MF</code>), and while this file gets generated with some defaults, it is very important to verify it as well as the contents of the generated manifest to ensure the final result is what one expects. In particular the <code>Import-Package</code> header patterns should be verified.
<pre>
+
bin.includes = about.html,\
+
              about_files/,\
+
              plugin.properties,\
+
              META-INF/,\
+
              my/
+
</pre>
+
  
 
===Update the Feature===
 
===Update the Feature===
In Eclipse we build features so when we add a new bundle to Orbit, we must add it to the feature so the builder is aware that we should build it. Please update <code>org.eclipse.orbit.build.feature.set1/feature.xml</code> with an entry for your new bundle. (you don't need one for the source bundle) Changes to the Orbit feature are done in HEAD in CVS.
+
In Eclipse we build features so when we add a new bundle to Orbit, we must add it to the feature so the builder is aware that we should build it. Please update <code>releng/aggregationfeature/feature.xml</code> in [https://git.eclipse.org/c/orbit/orbit-recipes.git/ orbit-recipes] with an entry for your new bundle. (you don't need one for the source bundle) Changes to the Orbit feature are done in the master branch on Git.
<pre>
+
<plugin
+
id="my.bundle.id"
+
download-size="0"
+
install-size="0"
+
version="1.0.0.qualifier"
+
unpack="false"/>
+
</pre>
+
  
===Update the Map File===
+
<plugin id="javax.servlet" version="2.3.0.qualifier" />
In Eclipse, the build contributions are driven from map files which specify your bundle, version, and location in the repository. In Orbit our map file is stored in <code>org.eclipse.orbit.releng/maps/bundles.map</code> in HEAD in CVS.
+
  
When you add a new bundle to the build, you must add an entry for your bundle to the <code>bundles.map</code> file. Don't forget to add an entry for the source bundle if you created one. You must tag your projects (''Team -> Tag as Version'') and also the feature if you changed it, and then update the map file.
+
===Update the IP Log===
 +
In Orbit we keep an on-going IP Log to make it easier when it comes to release review time. By keeping this log all the information is always up-to-date and readily available on the web. IP Log files are stored under <code>src/eclipse/ip_log.xml</code> for a given bundle's module. Generally most of the information should be filled out automatically as part of the creation of the bundle recipes (ebr:create-recipe) but certain information will need to be filled in manually. For example, contact information for the bundle, and the corresponding ipzilla bug id (Add To Orbit CQ Number).
  
<pre>
+
For more information about the IP Log file, a template and instructions can be found on our [[Orbit IP Log]] wiki page.
plugin@my.bundle.id,1.0.0=v200802271055,:pserver:anonymous@dev.eclipse.org:/cvsroot/tools,,org.eclipse.orbit/my.bundle.id
+
plugin@my.bundle.id.source,1.0.0=v200802271055,:pserver:anonymous@dev.eclipse.org:/cvsroot/tools,,org.eclipse.orbit/my.bundle.id/source-bundle
+
...
+
feature@org.eclipse.orbit.build.feature.set1=v200802271055,:pserver:anonymous@dev.eclipse.org:/cvsroot/tools,,org.eclipse.orbit/org.eclipse.orbit.build.feature.set1
+
</pre>
+
 
+
===Update the Project Set File===
+
We keep a project set file in HEAD to keep track of the list of bundles that we have in Orbit. It can be found here: <code>org.eclipse.orbit.releng/psf/orbit.psf</code>. We always add a version number to the name of the project that we are checking out, so we handle multiple project versions. Also ensure that you are specifying the correct stream to check out the project from.
+
 
+
<pre>
+
<project reference="1.0,:extssh:dev.eclipse.org:/cvsroot/tools,org.eclipse.orbit/my.bundle.id,my.bundle.id_v1.0.0,v1_0_0"/>
+
</pre>
+
 
+
===Update the IP Log===
+
In Orbit we keep an on-going IP Log to make it easier when it comes to release review time. By keeping this log all the information is always up-to-date and readily available on the web. IP Log files are stored in HEAD in <code>org.eclipse.orbit.releng/ip_logs</code> and a template and instructions can be found on our [[Orbit IP Log]] wiki page.
+
  
 
===Final Notes===
 
===Final Notes===
Line 73: Line 30:
  
 
===Example Layout===
 
===Example Layout===
 +
Here is an example structure for a bundle.
 +
 
<pre>
 
<pre>
my.bundle.id/
+
my.bundle.id_1.0.0/
     about_files/
+
     pom.xml
     my/bundle/id/Main.class
+
     src/
    META-INF/MANIFEST.MF
+
        eclipse/ip_log.xml
    about.html
+
         main/resources/
    build.properties
+
            about_files/LICENSE.txt
    plugin.properties
+
            about.html
    source-bundle/
+
    .project
         my/bundle/id/Main.java
+
    osgi.bnd
        about_files/
+
        about.html
+
        build.properties
+
        META-INF/MANIFEST.MF
+
 
</pre>
 
</pre>
 +
 +
[[Category:Orbit|Bundle Checklist]]

Revision as of 15:25, 31 December 2020

Here are the steps for adding a new bundle to Orbit. Please use them as a checklist to ensure that you have done everything correctly when you have a new bundle to add.

CQs

A CQ is a Contribution Questionnaire and it basically refers to legal approval to use a third party bundle in Eclipse. Every bundle in Orbit needs to have either a CQ, or reference to ClearlyDefined indicating an appropriate score for the third party library.

CQs can be created on the Eclipse Foundation web site in the portal.

ClearlyDefined can also be used.

Add the Bundle to Git

In Orbit we store the metadata necessary to generate a bundle in the orbit-recipes Git repository. Look at our Adding Bundles to Orbit document for instructions on how to initially put your bundle into Orbit.

Verify the osgi.bnd

The osgi.bnd file is used to generate the bundle manifest (META-INF/MANIFEST.MF), and while this file gets generated with some defaults, it is very important to verify it as well as the contents of the generated manifest to ensure the final result is what one expects. In particular the Import-Package header patterns should be verified.

Update the Feature

In Eclipse we build features so when we add a new bundle to Orbit, we must add it to the feature so the builder is aware that we should build it. Please update releng/aggregationfeature/feature.xml in orbit-recipes with an entry for your new bundle. (you don't need one for the source bundle) Changes to the Orbit feature are done in the master branch on Git.

<plugin id="javax.servlet" version="2.3.0.qualifier" />

Update the IP Log

In Orbit we keep an on-going IP Log to make it easier when it comes to release review time. By keeping this log all the information is always up-to-date and readily available on the web. IP Log files are stored under src/eclipse/ip_log.xml for a given bundle's module. Generally most of the information should be filled out automatically as part of the creation of the bundle recipes (ebr:create-recipe) but certain information will need to be filled in manually. For example, contact information for the bundle, and the corresponding ipzilla bug id (Add To Orbit CQ Number).

For more information about the IP Log file, a template and instructions can be found on our Orbit IP Log wiki page.

Final Notes

  • When in doubt, look at the other bundles in Orbit to see what they did.
  • Always check the build output to ensure that it is what you expect.

Example Layout

Here is an example structure for a bundle.

my.bundle.id_1.0.0/
    pom.xml
    src/
        eclipse/ip_log.xml
        main/resources/
            about_files/LICENSE.txt
            about.html
    .project
    osgi.bnd

Back to the top