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/08/09 08:02] morty Remove git..... |
wiki:development:development-workspace [2012/12/21 12:32] kjellski [Building] |
||
---|---|---|---|
Line 4: | Line 4: | ||
Before you can start developing you need the source code. | Before you can start developing you need the source code. | ||
- | The code is managed in a [[git | GIT repository]]. | + | The code is managed in a [[git| GIT repository]]. |
===== Building ===== | ===== Building ===== | ||
+ | |||
+ | On Ubuntu you'll probably need the following dependencies to get a proper build: | ||
+ | |||
+ | < | ||
+ | sudo apt-get install devscripts debhelper \ | ||
+ | ubuntu-dev-tools build-essential \ | ||
+ | libldap2-dev libssh-dev libxpm-dev libcups2-dev | ||
+ | </ | ||
+ | |||
+ | |||
==== Getting Build Dependencies ==== | ==== Getting Build Dependencies ==== | ||
Each git has a file'' | Each git has a file'' | ||
Line 13: | Line 23: | ||
==== Makefile ==== | ==== Makefile ==== | ||
- | Most projects should have makefile, that builds the project running make (This is work in progress). | + | |
+ | Most projects should have a Makefile, that builds the project | ||
==== DPKG ==== | ==== DPKG ==== | ||
- | A installable package can be built running '' | + | |
+ | An installable package can be built running '' | ||
Line 132: | Line 144: | ||
- | ===== Maintiner | + | ===== Maintainer |
==== Install Software ==== | ==== Install Software ==== | ||
Line 165: | Line 177: | ||
- | ==== Reverting Merge Commits ==== | ||
- | |||
- | If you forget to run '' | ||
- | |||
- | 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 :-/. | ||
- | |||
- | 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 | ||
- | $ 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 | ||
- | $ git log master-bak-tmp | ||
- | |||
- | # now cherry-pick your local changes individually from the master-bak-tmp branch (where refspec-1 ... refspec-n are the commit hashes of each commit): | ||
- | $ git cherry-pick < | ||
- | $ git cherry-pick < | ||
- | ... | ||
- | $ git cherry-pick < | ||
- | |||
- | # finally drop the tmp backup of old master | ||
- | $ git branch -D master-bak-tmp | ||
- | </ | ||
- | |||
- | ==== Pushing to X2go Git ==== | ||
- | |||
- | 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 | ||
- | </ | ||
- | |||
- | < | ||
- | 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 254: | 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 '' |