Developement
SliTaz Developers corner
- Mercurial repositories.
- Tazpkg packages.
- Website Management.
- Mailing List.
- Wok & Tools.
- Hg repositories: hg.slitaz.org
- Scratchpad: wiki.slitaz.org
SliTaz is an open source and community driven distribution. Everyone is welcome to join and contribute, from users, to hackers and developers there is always something to do, ie. Proofreading or writing documentation, sending bugs or patches to the Mailing list, gaining access to the wok and pushing some new packages or simply to help others on the Mailing list or forum. SliTaz has got Mercurial repositories hosted on a SliTaz system, developers can ask for a new repo if needed and contributors have write access to correct typos, scripts, etc.
SliTaz is a tiny community and listens to it's users. There are several developers who are active on the forum and the Mailing List.
Mercurial repositories
SliTaz Mercurial or Hg repos can be browsed or cloned by anyone using the URL:
http://hg.slitaz.org/. People with write
access can directly use repos.slitaz.org
which needs authentication.
Mercurial uses Python and is installable with:
tazpkg get-install mercurial
~/.hgrc
Before you push your first commit onto the server, be sure you have a correct Hg configuration file with your name and email address and remember to check that you are not root. Personal ~/.hgrc file example:
[ui] username = FirstName LastName <you@example.org>
Clone, modify, commit and push
Clone a repo, example for slitaz-doc:
$ hg clone http://repos.slitaz.org/slitaz-doc
Change directory to slitaz-doc, note you must be in the repository to be able to use 'hg' commands. To check all logs or just the last log:
$ hg log $ hg head
Modify one or more files and commit:
$ hg status $ hg commit -m "Log message..." $ hg log
Note that you can use the command rollback
to roll back to the last
transaction. Before pushing changes to the server it is safe to pull once:
$ hg pull $ hg push
Done, your changes, code or corrections are now on the server.
Tazpkg Packages
The tazpkg packages in SliTaz are automatically created via Tazwok and a receipt in the wok. The Cookbook describes the use of tools and the format of receipts. These are required reading before we begin.
In terms of choice of package, the idea is to offer a package by task or functionality, ie. the lightest application in the field and not duplicated. Note that the current packages are not immutable, if you find an alternative that is lighter, with more features or more sexy for a few extra KB, you can suggest it on the Mailing List. Particular attention is given to packages for the LiveCD; these should be stripped, removing unnecesary dependancies and compiler options. In general candidate packages for the core LiveCD are discussed on the Mailing List.
Before you begin to compile and create packages for SliTaz, be sure that the work doesn't already exist in the wok indigest provided by the primary SliTaz mirror. Don't forget that the members of the list are there to help you and that the documentation of the wok and tools exists to help you get started.
Website Management and Books
The management of the website and books (Handbook & Cookbook) is made via
a rsync module, Mercurial, diff and patch utilities and the Mailing List.
Rsync is a tool for incremental backup; using an ultra-fast algorithm, It can
transfer or syncronize data both locally or over the network. The
diff
utility is used to send the list of files containing only
the changes and patch
to apply the changes to the original pages.
You can syncronize the site and books graphically using Grsync or via the
command line. To download the site for the first time or syncronize the pages
in the directory /home/hacker/Public/slitaz/website
,
use the module rsync://slitaz.org/website
:
$ rsync -r -t -p -v \ --progress --delete \ rsync://slitaz.org/website /home/hacker/Public/slitaz/website
Diff and patch
The utilities diff
and patch
are command-line tools
for creating and implementing the differences between two files. This technique
is often used for collaboration and the changes made to the original file can
be clearly extracted. To create a diff
file readable by humans in
a simple text editor, you must supply the -u
option:
$ diff -u file.orig file.new > file.diff
To apply a patch:
$ patch file.orig file.diff