Error creating thumbnail: File missing
- 1 OCS Inventory
- 1.1 About Bazaar
- 1.2 Use Bazaar
- 1.3 Propose your revision to another Branch
OCS Inventory source code is managed with Bazaar and published on Launchpad. You can browse the different branches directly on OCS Project on Launchpad.
|Warning: This is not a complete Tutorial about Bazaar ! The goal is to help you participate in this project.
If you need more informations about Bazaar, read the official documentation.
All Bazaar commands (begin by bzr) must be used in your branch directory.
Bazaar is VCS ( Version Control System ). More information about What's Repository or Revision Control System on Wikipedia.
Quickly, Bazaar allow to all people to take part of this project : you are able to get current sources files, to modify and to upload them in your personal branch. Then, you can propose your changes to maintainer who will be able to merge your branche with the upstream one. You do not need a patch anymore.
In the same way, you can get other branch for testing or yourself, improving this code.
Get the current development code
Check your Bazaar Installation
Use your favorite package manager to install Bazaar or update to the latest version. On Ubuntu the Bazaar package is called bzr.
Or get the last version on Bazaar Web site.
You also need the Loom plugin to read some branches of the repository (far Ocsinventory Unix Agent braches for example). (Ubuntu package bzr-loom.)
For other distribution, you must download bzr-loom-2.0. This version is stable and no affected with a bug present in version 2.1. Here is [http://launchpad.net/bzr-loom/2.0/2.0/+download/bzr-loom-2.0.tar.gz ]. After download, gunzip and untar the tarball. Create a directory named plugins in your .bzr or .bazaar folder, then move the untared directory to your plugins directory and change the name to loom.
Retrieve the current development code
The quickly way is
bzr branch lp:ocsinventory-unix-agent
You get the project mother branch.
If you want a specific OCS branch, alter the command to get the wanted branch:
bzr branch lp:~[login]/ocsinventory-unix-agent/[OcsBranchName]
bzr branch lp:~mylogin/ocsinventory-unix-agent/newdeploy
Also for each branch, specific launchpad page are available to get some information.
This page acquaint you all last branch revisions, and another useful informations.
If you're behind a HTTP proxy:
export https_proxy=http://www-proxy:8080 bzr branch http://bazaar.launchpad.net/~mylogin/ocsinventory-unix-agent/stable-1.2
Keep last version
At any time, you can update downloaded files with the last branch version.
Yours modifications aren't drop. If new code lines are in conflict with our modification, Bazaar notify you the problem and ask our solution.
Commit your version
Before, you need Launchpad Account.
|Warning: You will learn how to commit your modification on some branch, but be careful to commit in a branch where you have write granted access.
You can't erase the branch (thanks to revision system) and committing to a locked branch can simply abort the commit.
You need to login to your launchpad account by Bazaar.
But, Launchpad require Dsa or Rsa Key to secure the transaction between your system and launchpad. On Launchpad account web site, you put your public key. Then, you use your private key to authenticate. If you don't already have a keys pair, you need to generate one using ssh-keygen.
Example on linux:
Passphrase is password which will be ask to you each time before using your private key. It's suggest to you to use it : if your private key is duplicate, any person need your passphrase before use it, and it's more difficult to usurp your identity.
You can log on launchpad using bazaar :
bzr launchpad-login YourLogin
Your will have to submit your password
You can set your display name :
bzr whoami "John Doe <firstname.lastname@example.org>"
and you can check who you are :
Your display name will be saved on ~/.bazaar.
So each time you will use new system, do not forget to set your display name, or it's your login name that will be used instead.
Commit your version
Then you have applied you changes and test ? you can now commit to your branche.
First Step: Commit
Bazaar lists all modifications, and with the default text editor, you can add a log for each. It's useful for other developers who need futher informations about your revision.
To use the default text editor (nano, emacs, vim, ...), read the specific documentation.
Second Step: Push
You will send your revision to your branch.
bzr push lp:~[YourLogin]/ocsinventory-unix-agent/[OcsBranchName]
[OcsBranchName] is the name of the branch. It describes what you changes do. E.g: “fix_Linux_AMD64”.
If everything runs perfectly, you can see in a little moment, the new version on your branch web site.
Propose your revision to another Branch
On your branch page on Launchpad, after the Description field, you can see the list of merges propositions: first, there is all merge propositions pending from outside for this branch ; next, it's all your merges propositions for this branch.
And finally, you can suggest merging to another branch with use Propose for merging into another branch link.