Changes

Jump to navigation Jump to search
Line 36: Line 36:  
== 0sugar tool ==
 
== 0sugar tool ==
   −
To start developing services, install [http://0install.net/injector.html injector] tool, and ''0sugar'' - main tool to maintain services infrastructure.
+
To start developing services, install injector and 0sugar tools:
   −
0alias 0sugar http://download.sugarlabs.org/services/0sugar/runtime.xml
+
* Install [http://download.sugarlabs.org/services/zeroinstall-injector/bundles/zeroinstall-injector-latest.sh last version] of patched zeroinstall-injector, see also 0install [http://0install.net/injector-using.html|tutorials] for more 0install related information
   −
While working, ''0sugar'' creates ''dist/'' directory in project's root and uses it as a rsynced copy of service's directory on the server. So, you need ssh access to sunjammer server, create ticket for ''shell.sugarlabs.org'' category on http://bugs.sugarlabs.org/.
+
* Tweak PATH environment variable, after executing command you need to relogin
 +
echo 'PATH=~/.local/bin:$PATH' >> ~/.bashrc
   −
''0sugar'' commands are:
+
* Register 0sugar alias
 +
0alias 0sugar http://services.sugarlabs.org/0sugar
   −
* ''init'', create service/ directory and default service.info file
+
While working, 0sugar creates .0sugar directory which is cache directory and should not be included to version control system repository, it has hierarchy:
* ''clone'', rsync entirely dist/ from the server
  −
* ''dist'', create source or any arch tarball/implementation in ''dist/'' directory and tweak ''dist/feed.xml'' correspondingly<br>If there is second option-less argument, it will be treated as a path of tarball to release(e.g. you can create such tarball by ''make distcheck'' command for autotools based projects), otherwise ''0sugar'' will tar all project files(and try to avoid temporary files as much as possible)<br>''dist'' will create
  −
** any arch archive, if ''build-command'' field was omitted in ''service.info''
  −
** source archive, if ''service.info'' has ''build-command'' field
  −
* ''dist_bin'', create binary tarball/implementation for current arch in ''dist/'' directory and tweak ''dist/feed.xml'' correspondingly<br>if second argument was passed, it will be treated as a name of ''service.info'' section with additional ''requires'' fields
  −
* ''push'', rsync dist/ to the server
  −
* ''lint'', check feed file on the server<br>will run [http://0install.net/feedlint.html FeedLint] application for http://download.sugarlabs.org/services/ feed
     −
Feed files in ''dist/'' directory could be changed manually but keep in mind that ''dist*'' commands will rewrite entries for current service version.
+
* .0sugar/remote, rsynced copy(could be partial) of service directory on the server
 +
* .0sugar/local, directory with output tarballs after invoking dist and build commands
 +
* .0sugar/(src|build|dist) directories after invoking build command
 +
 
 +
During maintaining session, 0sugar will create result files in .0sugar/remote directory that will be rsynced to the server by push command i.e. shell account on sunjammer server is required, to get one follow [[Sysadmin/Shell_account_request|instructions]].
    
== Versioning scheme ==
 
== Versioning scheme ==

Navigation menu