This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
wiki:development:development-workspace [2011/07/19 12:24] sunweaver [Build X2go Packages for Debian] |
wiki:development:development-workspace [2012/12/21 13:57] kjellski [Building] |
||
---|---|---|---|
Line 1: | Line 1: | ||
====== How to set up an X2go Development Workspace ====== | ====== How to set up an X2go Development Workspace ====== | ||
- | ===== Access to X2go Git Repositories | + | ===== Get the Code ===== |
- | You can access | + | Before you can start developing you need the source code. |
+ | The code is managed in a [[git| GIT repository]]. | ||
- | < | + | ===== Building ===== |
- | git clone git:// | + | |
- | </ | + | |
- | All available repoistories are listed at [[http:// | + | On Ubuntu you'll probably need the following dependencies |
- | + | ||
- | Please send your patches to the [[community | development mailinglist]]. | + | |
- | + | ||
- | Direct write access can also be granted if needed. | + | |
- | + | ||
- | ===== System Environment ===== | + | |
- | + | ||
- | ==== Install Software ==== | + | |
- | + | ||
- | For working with X2go Git you have to install some software on your development workstation. We will presume you develop under Debian: | + | |
< | < | ||
- | $ aptitude | + | sudo apt-get |
+ | ubuntu-dev-tools build-essential \ | ||
+ | libldap2-dev libssh-dev libxpm-dev libcups2-dev | ||
</ | </ | ||
- | ==== Setup Git Configuration | + | More info in general form: [[https:// |
+ | ==== Getting Build Dependencies | ||
+ | Each git has a file'' | ||
- | Now it is time to set up your system environment for working with Git. Main thing is to tell Git who you are. For this edit the file '' | + | The package |
- | < | + | ==== Makefile ==== |
- | [user] | + | |
- | name = < | + | |
- | email = < | + | |
- | [color] | + | |
- | ui = auto | + | |
- | </ | + | |
+ | Most projects should have a Makefile, that builds the project by running make (This is work in progress). | ||
- | ==== Setup devscripts Configuration | + | ==== DPKG ==== |
- | + | ||
- | We currently use Debian based tools to maintain the projects' | + | |
- | + | ||
- | < | + | |
- | DEBCHANGE_RELEASE_HEURISTIC=changelog | + | |
- | DEBCHANGE_MULTIMAINT_MERGE=yes | + | |
- | DEBCHANGE_MAINTTRAILER=yes | + | |
- | </ | + | |
- | + | ||
- | and these lines to '' | + | |
- | + | ||
- | < | + | |
- | export DEBFULLNAME="< | + | |
- | export EMAIL="< | + | |
- | export DEBEMAIL=${EMAIL} | + | |
- | </ | + | |
- | + | ||
- | ===== Cloning X2go Git Projects ===== | + | |
- | + | ||
- | To start working on code in X2go Git you first have to clone those Git projects from '' | + | |
- | + | ||
- | Before cloning any X2go Git project please create and then change to your development workspace folder on your local system, for example: | + | |
- | + | ||
- | < | + | |
- | $ mkdir -p ~/ | + | |
- | $ cd ~/ | + | |
- | </ | + | |
- | + | ||
- | + | ||
- | The contributor command (that is if you are someone who wants to work on X2go code and send your improvements as patches) is: | + | |
- | + | ||
- | < | + | |
- | $ git clone git:// | + | |
- | </ | + | |
- | + | ||
- | + | ||
- | The developer command for cloning an X2go Git project locally to this folder, however, is (please replace < | + | |
- | + | ||
- | < | + | |
- | $ git clone ssh:// | + | |
- | </ | + | |
+ | An installable package can be built running '' | ||
- | ===== Working on X2go Code ===== | ||
- | ==== Development Strategies ==== | + | ===== Development Strategies |
There are a few different approaches for working on X2go code (or Git-hosted code in general). This wiki page will address two of them: HEAD development and local branch development. | There are a few different approaches for working on X2go code (or Git-hosted code in general). This wiki page will address two of them: HEAD development and local branch development. | ||
Line 197: | Line 144: | ||
- | ==== Reverting Merge Commits | + | ===== Maintainer Stuff ===== |
- | If you forget to run '' | + | ==== Install Software ==== |
- | There is nothing bad about merge commits apart from the fact that the X2go Git system won't allow them being pushed to the server :-/. | + | For working with X2go Git you have to install |
- | + | ||
- | Thus, you probably want to avoid merge commits right from the beginning. However, from time to time it occurs that you crunch your Git log with a merge commit. This is how such a thing can happen: | + | |
- | + | ||
- | * change a file | + | |
- | * commit it locally | + | |
- | * push it to X2go Git | + | |
- | * find that the push operation gets rejected :-( | + | |
- | * then run '' | + | |
- | * and then uuups... realize: the '' | + | |
- | + | ||
- | One possible solution for this is // | + | |
< | < | ||
- | # make a temporary backup copy of the master branch | + | $ aptitude install |
- | $ git checkout -b master-bak-tmp | + | </ |
- | # go back to master branch | ||
- | $ git checkout master | ||
- | # and reset it to that refspec where local Git and server' | ||
- | $ git reset --hard < | ||
- | # then take a look at the log of your old local master branch | + | ==== Setup devscripts Configuration ==== |
- | $ git log master-bak-tmp | + | |
- | # now cherry-pick your local changes individually from the master-bak-tmp branch | + | We currently use Debian based tools to maintain |
- | $ git cherry-pick < | + | |
- | $ git cherry-pick < | + | |
- | ... | + | |
- | $ git cherry-pick < | + | |
- | # finally drop the tmp backup of old master | + | < |
- | $ git branch -D master-bak-tmp | + | DEBCHANGE_RELEASE_HEURISTIC=changelog |
+ | DEBCHANGE_MULTIMAINT_MERGE=yes | ||
+ | DEBCHANGE_MAINTTRAILER=yes | ||
</ | </ | ||
- | ==== Pushing | + | and these lines to '' |
- | + | ||
- | Whenever your local X2go Git project is in an acceptable state for the community, feel free to push the code to the X2go Git server: | + | |
< | < | ||
- | $ git push | + | export DEBFULLNAME="< |
+ | export EMAIL="< | ||
+ | export DEBEMAIL=${EMAIL} | ||
</ | </ | ||
- | < | ||
- | When working on master' | ||
- | Keeping back code for too long can result in code conflicts (changes in the same code block of the same file by two different developers). | ||
- | </ | ||
- | The update scripts of X2go Git will shout warnings at you while pushing. These warnings relate to | ||
- | * whitespaces found at the end of lines | ||
- | * tabs found in the file (for Python: no tabs, for Bash, Perl, C++, etc. tabs are wanted, so you can ignore these if not coding Python) | ||
- | * no \newline at end of file | ||
- | You may consider silencing those warnings before committing the next time... | ||
- | ===== Releasing X2go Projects | + | ==== Releasing X2go Projects ==== |
The X2go version scheme is a four digit version number: ''< | The X2go version scheme is a four digit version number: ''< | ||
Line 286: | Line 206: | ||
- Before you continue working on the code you should make sure that the newly released code has been built on Launchpad and also moved to the x2go-stable PPA. | - Before you continue working on the code you should make sure that the newly released code has been built on Launchpad and also moved to the x2go-stable PPA. | ||
- | ===== Git / Code Administration | + | ==== Git / Code Administration ==== |
For Git / code administation you have to be able to logon to the host '' | For Git / code administation you have to be able to logon to the host '' | ||
Line 336: | Line 256: | ||
After extending the PATH variable log off an on to make sure it takes effect (or use your own style of letting it take effect). | After extending the PATH variable log off an on to make sure it takes effect (or use your own style of letting it take effect). | ||
- | ==== Create new Git Project on X2go Git ==== | ||
- | |||
- | If you want to create a new X2go Git project on '' | ||
- | |||
- | Then create a local Git project: | ||
- | |||
- | < | ||
- | $ mkdir -p ~/ | ||
- | $ cd ~/ | ||
- | $ git init | ||
- | </ | ||
- | |||
- | Then add your first files to the new '' | ||
- | |||
- | Then run the following command sequence: | ||
- | |||
- | < | ||
- | $ cd ~/ | ||
- | $ x2go-gitcreate x2gonewthing | ||
- | # if the Git creation succeeds (check via http:// | ||
- | $ rm x2gonewthing -Rfv | ||
- | $ git clone ssh:// | ||
- | </ | ||
- | |||
- | Now you can start working on your new X2go project as on any of the other already existing X2go Git projects. | ||
- | |||
- | ==== Edit Git Configs ==== | ||
- | |||
- | As '' | ||
- | |||
- | < | ||
- | $ cd / | ||
- | $ vim config | ||
- | </ | ||
- | |||
- | ==== Edit Git Descriptions ==== | ||
- | |||
- | As '' | ||
- | |||
- | < | ||
- | $ cd / | ||
- | $ vim description | ||
- | </ | ||
- | |||
- | ==== Edit Git ACLs ==== | ||
- | |||
- | Unused feature, may come later... | ||
==== Upload Released Tarballs ==== | ==== Upload Released Tarballs ==== | ||
Line 400: | Line 273: | ||
==== Upload X2go Packages to X2go's Debian Repository ==== | ==== Upload X2go Packages to X2go's Debian Repository ==== | ||
- | As '' | + | As '' |
< | < |