User Tools

Site Tools


wiki:development:development-workspace

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
wiki:development:development-workspace [2011/08/09 07:34]
morty Romove duplicate information
wiki:development:development-workspace [2013/03/08 13:31]
127.0.0.1 external edit
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]]. 
-===== System Environment =====+
  
-==== Install Software ====+===== Building =====
  
-For working with X2go Git you have to install some software on your development workstation. We will presume you develop under Debian:+On Ubuntu you'll probably need the following dependencies to get a proper build:
  
 <code> <code>
-$ aptitude install git devscripts+  sudo apt-get install devscripts debhelper \ 
 +    ubuntu-dev-tools build-essential \ 
 +    libldap2-dev libssh-dev libxpm-dev libcups2-dev
 </code> </code>
  
 +More info in general form: [[https://wiki.ubuntu.com/PackagingGuide/HandsOn]]
 +==== Getting Build Dependencies ====
 +Each git has a file'' debian/control''. It has a section ''Build-Depends''.
  
 +The package ''ubuntu-dev-tools'' (also provided in Debian) allows to install them running ''sudo get-build-deps debian/control''.
  
-==== Setup devscripts Configuration ====+==== Makefile ====
  
-We currently use Debian based tools to maintain the projects' changelogs. This may change in the future (in order to become even more generic and Debian-independent), but for now, developers should add these lines to ''~/.devscripts'':+Most projects should have a Makefile, that builds the project by running make (This is work in progress).
  
-<code> +==== DPKG ====
-DEBCHANGE_RELEASE_HEURISTIC=changelog +
-DEBCHANGE_MULTIMAINT_MERGE=yes +
-DEBCHANGE_MAINTTRAILER=yes +
-</code> +
- +
-and these lines to ''~/.bashrc'': +
- +
-<code> +
-export DEBFULLNAME="<Firstname Lastname>" +
-export EMAIL="<my.mailaccount@mydomain.com>" +
-export DEBEMAIL=${EMAIL} +
-</code>+
  
 +An installable package can be built running ''debuild -b -us -uc'' in the project folder. The .deb-file will be placed in the superior folder. The package can be installed using ''dpkg -i <packagenmame>*.deb''.
  
-===== 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 151: Line 144:
  
  
-==== Reverting Merge Commits ====+===== Maintainer Stuff =====
  
-If you forget to run ''git-pull'' before modifying code files you will run into merge problems when committing your changes.+==== 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 some software on your development workstationWe will presume you develop under Debian:
- +
-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 ''git-pull'' instead +
-  * and then uuups... realize: the ''git-pull'' fetched in some code for the same file, I have just been working on...) -> you probably forgot to run a ''git-pull'' before starting to work on that particular file... +
- +
-One possible solution for this is //cherry-picking//. Here is an example (presuming that your are working on the master branch):+
  
 <code> <code>
-# make a temporary backup copy of the master branch +aptitude install git devscripts 
-$ git checkout -b master-bak-tmp+</code>
  
-# go back to master branch 
-$ git checkout master 
  
-# and reset it to that refspec where local Git and server's Git were known to be still in sync 
-$ git reset --hard <last-refspec-known-to-be-identical-with-server> 
  
-# 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 (where refspec-... refspec-n are the commit hashes of each commit): +We currently use Debian based tools to maintain the projects' changelogs. This may change in the future (in order to become even more generic and Debian-independent), but for now, developers should add these lines to ''~/.devscripts'':
-$ git cherry-pick <refspec-1> +
-$ git cherry-pick <refspec-2> +
-... +
-$ git cherry-pick <refspec-n>+
  
-# finally drop the tmp backup of old master +<code> 
-$ git branch -D master-bak-tmp+DEBCHANGE_RELEASE_HEURISTIC=changelog 
 +DEBCHANGE_MULTIMAINT_MERGE=yes 
 +DEBCHANGE_MAINTTRAILER=yes
 </code> </code>
  
-==== Pushing to X2go Git ==== +and these lines to ''~/.bashrc'':
- +
-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:+
  
 <code> <code>
-git push+export DEBFULLNAME="<Firstname Lastname>" 
 +export EMAIL="<my.mailaccount@mydomain.com>" 
 +export DEBEMAIL=${EMAIL}
 </code> </code>
  
-<note> 
-When working on master's HEAD do not wait __too__ long before pushing them to the server as it may happen that others work on master's HEAD as well. 
  
-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). 
-</note> 
  
-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: ''<major>.<minor>.<micro>.<nano>'' The X2go version scheme is a four digit version number: ''<major>.<minor>.<micro>.<nano>''
Line 240: 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 ''code.x2go.org'' as user ''x2go-admin'': For Git / code administation you have to be able to logon to the host ''code.x2go.org'' as user ''x2go-admin'':
Line 290: 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 ''code.x2go.org'' please discuss this first on the x2go-dev mailing list. 
- 
-Then create a local Git project: 
- 
-<code> 
-$ mkdir -p ~/MyCode/x2go-upstream/x2gonewthing 
-$ cd ~/MyCode/x2go-upstream/x2gonewthing 
-$ git init 
-</code> 
- 
-Then add your first files to the new ''x2gonewthing'' project. Commit these files as the first commit. Maybe commit more... 
- 
-Then run the following command sequence: 
- 
-<code> 
-$ cd ~/MyCode/x2go-upstream/ 
-$ x2go-gitcreate x2gonewthing 
-# if the Git creation succeeds (check via http://code.x2go.org/gitweb), only then... 
-$ rm x2gonewthing -Rfv 
-$ git clone ssh://x2go@code.x2go.org:32032/srv/git/code.x2go.org/x2gonewthing.git 
-</code> 
- 
-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 ''x2go-admin'' on ''code.x2go.org'': 
- 
-<code> 
-$ cd /srv/git/code.x2go.org/<x2go-project>.git 
-$ vim config 
-</code> 
- 
-==== Edit Git Descriptions ==== 
- 
-As ''x2go-admin'' on ''code.x2go.org'': 
- 
-<code> 
-$ cd /srv/git/code.x2go.org/<x2go-project>.git 
-$ vim description 
-</code> 
- 
-==== Edit Git ACLs ==== 
- 
-Unused feature, may come later... 
  
 ==== Upload Released Tarballs ==== ==== Upload Released Tarballs ====
wiki/development/development-workspace.txt · Last modified: 2013/03/14 23:40 by sunweaver