website view en/devel/index.html @ rev 636
Summer of Documentation
author | Rohit Joshi <jozee@slitaz.org> |
---|---|
date | Sat May 08 05:02:14 2010 -0400 (2010-05-08) |
parents | ae7f0cc1f201 |
children | 16a92906ce05 |
line source
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4 <head>
5 <title>SliTaz - Developers corner</title>
6 <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" />
7 <meta name="description" content="SliTaz GNU/Linux project information overview" />
8 <meta name="keywords" lang="en" content="about slitaz, gnu, linux, mini distro, livecd" />
9 <meta name="robots" content="index, follow, all" />
10 <meta name="revisit-after" content="7 days" />
11 <meta name="expires" content="never" />
12 <meta name="modified" content="2009-06-13 21:15:00" />
13 <meta name="author" content="Christophe Lincoln"/>
14 <meta name="publisher" content="www.slitaz.org" />
15 <link rel="shortcut icon" href="../../favicon.ico" />
16 <link rel="stylesheet" type="text/css" href="../../slitaz.css" />
17 <link rel="Content" href="index.html#content" />
18 </head>
19 <body bgcolor="#ffffff">
20 <!-- Header -->
21 <div id="header">
22 <a name="top"></a>
23 <!-- Access -->
24 <div id="access">
25 Language:
26 <a href="../../de/devel/index.html">Deutsch</a> |
27 <a href="../../fr/devel/index.html" title="Développement en français">Français</a> |
28 <a href="../../pt/devel/index.html">Português</a>
29 </div>
30 <a href="http://www.slitaz.org/en/index.html"><img id="logo"
31 src="../../pics/website/logo.png" title="www.slitaz.org/en" alt="www.slitaz.org"
32 style="border: 0px solid ; width: 200px; height: 74px;" /></a>
33 <p id="titre">#!/GNU/Linux</p>
34 </div>
36 <!-- Navigation menu -->
37 <div id="nav">
39 <div class="nav_box">
40 <h4>Navigation</h4>
41 <!-- General -->
42 <ul>
43 <li><a href="../about/index.html" title="Information about the SliTaz project">About the project</a></li>
44 <li><a href="../asso/index.html" title="SliTaz non-profit association">Association</a></li>
45 <li><a href="../get/index.html" title="Download - LiveCD ISO">Download</a></li>
46 <li><a href="../doc/index.html" title="LiveCD usage and howto">Documentation</a></li>
47 <li><a href="../packages/index.html" title="Packaged software">Packages</a></li>
48 <li><a href="../devel/index.html" title="Developers corner">Development</a></li>
49 <li><a href="../mailing-list.html" title="Support, contact and collaboration">Mailing List</a></li>
50 <li><a href="../artwork/index.html" title="Artwork, colors and images">Artwork</a></li>
51 <li><a href="../search.html" title="Search engine">Search</a></li>
52 <li><a href="../sitemap.html" title="Web site overview">Sitemap</a></li>
53 </ul>
54 </div>
56 <!-- SliTaz network -->
57 <div class="nav_box">
58 <h4>SliTaz Network</h4>
59 <ul>
60 <li><a href="http://forum.slitaz.org/">Community Forum</a></li>
61 <li><a href="http://doc.slitaz.org/en:start">Wiki Documentation</a></li>
62 <li><a href="http://labs.slitaz.org/">SliTaz Laboratories</a></li>
63 <li><a href="http://labs.slitaz.org/issues">Bug Tracking</a></li>
64 <li><a href="http://boot.slitaz.org/">SliTaz Web Boot</a></li>
65 <li><a href="http://twitter.com/slitaz">SliTaz on Twitter</a></li>
66 <li><a href="http://distrowatch.com/slitaz">SliTaz on DistroWatch</a></li>
67 </ul>
68 </div>
70 </div>
72 <!-- Content -->
73 <div id="content">
74 <a name="content"></a>
76 <h1><font color="#3e1220">Development</font></h1>
77 <h2><font color="#df8f06">SliTaz Developers corner</font></h2>
79 <ul>
80 <li><a href="index.html#kiss">KISS and comply to standards.</a></li>
81 <li><a href="index.html#tank">Build host & home.</a></li>
82 <li><a href="index.html#repos">Mercurial repositories.</a></li>
83 <li><a href="index.html#iconv">Implementation of iconv().</a></li>
84 <li><a href="index.html#pkgs">Tazpkg packages.</a></li>
85 <li><a href="index.html#pkgs-naming">Naming of packages.</a></li>
86 <li><a href="index.html#website">Website Management.</a></li>
87 <li><a href="index.html#xhtml">xHTML coding style.</a></li>
88 <li><a href="../mailing-list.html">Mailing List.</a></li>
89 <li><a href="../doc/cookbook/wok-tools.html">Wok & Tools.</a></li>
90 <li>Mercurial Repositories: <a href="http://hg.slitaz.org" >hg.slitaz.org</a></li>
91 <li>SliTaz Laboratories: <a href="http://labs.slitaz.org/">labs.slitaz.org</a></li>
92 <li><a href="http://labs.slitaz.org/wiki/distro">Developers Wiki</a></li>
93 </ul>
95 <p>
96 SliTaz is an open source and community driven distribution. Everyone is welcome
97 to join and contribute, from users, to hackers and developers, there is always
98 something to do, ie. Proofreading or writing documentation, sending bugs or
99 patches to the Mailing list, gaining access to the wok and pushing some new
100 packages or simply to help others on the Mailing list or forum. SliTaz has got
101 Mercurial repositories hosted on a SliTaz system, developers can ask for a new
102 repo if needed and contributors have write access to correct typos, scripts, etc.
103 </p>
104 <p>
105 SliTaz is a tiny community and listens to its users. There are several
106 developers who are active on the <a href="http://forum.slitaz.org/">forum</a>
107 and the <a href="../mailing-list.html">Mailing List</a>.
108 </p>
109 <p>
110 For artists there is a dedicated website, simply create an account and
111 post your graphics or pictures. The site is managed by the community. If
112 you want to lend a hand to administer the site, please contact a
113 contributor or e-mail the discussion list. The website art.slitaz.org:
114 <a href="http://art.slitaz.org/">SliTaz Community Art</a>
115 </p>
117 <a name="kiss"></a>
118 <h3>KISS and comply to standards</h3>
119 <p>
120 Keep it simple: follow the best standards, carefully draft and write
121 high quality documentation, provide a stable and robust system and keep
122 the <em>rootfs</em> on the LiveCD light enough to run on machines with at
123 least 128 MB RAM. It's also possible to use GTK+2, Dialog, SHell scripts,
124 or PHP coding tools on the distribution. The idea is not to duplicate and
125 to think small...
126 </p>
128 <a name="tank"></a>
129 <h3>Tank - Build host & home</h3>
130 <p>
131 Each contributor may have an account on the project server with secure
132 access, disk space, a public directory and all development tools.
133 Developers can compile packages and maintainers of the mirror can handle
134 sychronization. Tank also hosts the website, web boot and mercurial
135 repositories: <a href="http://tank.slitaz.org/">tank.slitaz.org</a>
136 </p>
137 <p>
138 Instructions on using the build host are described in the Cookbook:
139 <a href="../doc/cookbook/build-host.html">SliTaz Build Host (tank)</a>.
140 </p>
142 <a name="repos"></a>
143 <h3>Mercurial repositories</h3>
144 <p>
145 SliTaz Mercurial or Hg repos can be browsed or cloned by anyone using the URL:
146 <a href="http://hg.slitaz.org/">http://hg.slitaz.org/</a>. People with write
147 access can directly use <code>repos.slitaz.org</code> which requires authentication.
148 Mercurial uses Python and is installable with:
149 <code>tazpkg get-install mercurial</code>
150 </p>
151 <h4>~/.hgrc</h4>
152 <p>
153 Before you push your first commit onto the server, be sure that you have a correct
154 Hg configuration file with your name and email address, and remember to check
155 that you are not root. Personal ~/.hgrc file example:
156 </p>
157 <pre class="script">
158 [ui]
159 username = FirstName LastName <you@example.org>
160 </pre>
161 <h4>Clone, modify, commit and push</h4>
162 <p>
163 Clone a repo, example for wok:
164 </p>
165 <pre>
166 $ hg clone http://repos.slitaz.org/wok
167 </pre>
168 <p>
169 Change directory to wok, note you must be in the repository to be able
170 to use 'hg' commands. To check all logs or just the last log:
171 </p>
172 <pre>
173 $ hg log
174 $ hg head
175 </pre>
176 <p>
177 Add or modify one or more files and commit:
178 </p>
179 <pre>
180 $ hg add
181 $ hg status
182 $ hg commit -m "Log message..."
183 $ hg log
184 </pre>
185 <p>
186 Note that you can use the command <code>rollback</code> to roll back to the last
187 transaction. Before pushing changes to the server, it is safe to pull once:
188 </p>
189 <pre>
190 $ hg pull
191 $ hg push
192 </pre>
193 <p>
194 Done, your changes, code or corrections are now on the server.
195 </p>
196 <h4>Updating a local wok</h4>
197 <p>
198 To update your wok with the local server (<em>pull</em> to pull the changes):
199 </p>
200 <pre>
201 $ hg pull
202 $ hg update
203 </pre>
204 <h4>Useful commands</h4>
205 <p>
206 Hg commands that can be used.
207 </p>
208 <ul>
209 <li><code>hg help</code> : Display the full list of commands.</li>
210 <li><code>hg rollback</code> : Undo the last action performed (commit,
211 pull, push).</li>
212 <li><code>hg log <package></code> : Display a package log.</li>
213 <li><code>hg head</code> : Display the last log.</li>
214 </ul>
216 <a name="iconv"></a>
217 <h3>Implementation of iconv()</h3>
218 <p>
219 SliTaz uses iconv() provided by GNU glibc - any packages that offer
220 <code>libiconv</code> must use the library contained in <code>glibc-locale</code>.
221 There is therefore no longer a libiconv package (1.2 MB) in SliTaz.
222 </p>
224 <a name="pkgs"></a>
225 <h3>Tazpkg Packages</h3>
226 <p>
227 The tazpkg packages in SliTaz are automatically created via Tazwok and a
228 receipt in the wok. The Cookbook describes the
229 <a href="../doc/cookbook/wok-tools.html">use of tools</a>
230 and the format of <a href="../doc/cookbook/receipts.html">receipts</a>.
231 These are required reading before we begin.
232 </p>
233 <p>
234 In terms of choice of package, the idea is to offer a package by task or
235 functionality, ie. the lightest application in the field and not duplicated.
236 Note that the current packages are not immutable, if you find an alternative
237 that is lighter, with more features or more <em>sexy</em> for a few extra KB,
238 you can suggest it on the Mailing List. Particular attention is given to
239 packages for the LiveCD, these should be stripped, removing unnecesary
240 dependancies and compiler options. In general candidate packages for the core
241 LiveCD are discussed on the Mailing List.
242 </p>
243 <p>
244 Before you begin to compile and create packages for SliTaz, be sure that the
245 work doesn't already exist in the
246 <a href="http://download.tuxfamily.org/slitaz/packages/undigest/">undigest</a>
247 wok provided by the primary SliTaz mirror. Don't forget that the members
248 of the list are there to help you and that the documentation of the
249 <a href="../doc/cookbook/wok-tools.html">wok and tools</a>
250 exists to help you get started.
251 </p>
253 <a name="pkgs-naming"></a>
254 <h3>Naming of packages</h3>
255 <p>
256 In most cases the package name is the same as the source, except for
257 Python, Perl, PHP, Ruby and Lua modules. For example, the package
258 providing a Kid template system written in Python and XML is named:
259 <code>python-kid</code>.
260 </p>
262 <a name="website"></a>
263 <h3>Website Management and Books</h3>
264 <p>
265 The website and books (Handbook and Cookbook) are managed via
266 a mercurial repository, they can be cloned by:
267 </p>
268 <pre>
269 $ hg clone http://hg.slitaz.org/website
270 Or if you have the proper permissions:
271 $ hg clone http://repos.slitaz.org/website
272 </pre>
274 <a name="xhtml"></a>
275 <h3>xHTML coding style</h3>
276 <p>
277 The pages and different <em>books</em> are coded in xHTML 1.0
278 transitional. The colors for the <code>body</code> and the titles
279 are placed directly on the page so the links are easy to follow.
280 The title of level 1 is used only once (at the top), level 2 is
281 the title of the document and levels 3 and 4 are then used for
282 the subtitles. If a list is used instead using smart anchors;
283 then that starts at the top, just after the title of level 2.
284 Paragraphs are contained in the tags <code><p></p></code>.
285 For indentation, we use tabs - the reason being semantics and to take
286 up less space in terms of octets (bytes). To put code, like the name of
287 a command inside a paragraph: <code><code></code> is the preferred
288 method. To view commands or to utilize a terminal, the web pages use
289 <code><pre></code> to display the formatted text. Example:
290 </p>
291 <pre>
292 $ command
293 </pre>
294 <p>
295 To view text that can be copied and pasted, such as scripts,
296 bits of code, sample configuration files, etc - we also use
297 <code><pre></code>, but with a CSS class named "script". Example:
298 </p>
299 <pre class="script">
300 <pre class="script">
302 code...
304 </pre>
305 </pre>
306 <p>
307 The <em>emphasized</em> words put themselves in the tag <code><em></code>
308 and internal links are relative. Remember to check the validity
309 of the code via the online <em>validator</em> of the W3C.
310 </p>
312 <h3>Diff and patch</h3>
313 <p>
314 The utilities <code>diff</code> and <code>patch</code> are command-line tools
315 for creating and implementing a file containing differences between two files.
316 This technique is often used for collaboration and the changes made to the
317 original file can be clearly extracted. To create a <code>diff</code> file
318 readable by humans in a simple text editor, you must supply the <code>-u</code> option:
319 </p>
320 <pre>
321 $ diff -u file.orig file.new > file.diff
322 </pre>
323 <p>
324 To apply a patch:
325 </p>
326 <pre>
327 $ patch file.orig file.diff
328 </pre>
330 <!-- End of content with round corner -->
331 </div>
332 <div id="content_bottom">
333 <div class="bottom_left"></div>
334 <div class="bottom_right"></div>
335 </div>
337 <!-- Start of footer and copy notice -->
338 <div id="copy">
339 <p>
340 Last modification : 2009-06-13 21:15:00 -
341 <a href="index.html#top">Top of the page</a>
342 </p>
343 <p>
344 Copyright © 2009 <a href="http://www.slitaz.org/">SliTaz</a> -
345 <a href="http://www.gnu.org/licenses/gpl.html">GNU General Public License</a>
346 </p>
347 <!-- End of copy -->
348 </div>
350 <!-- Bottom and logo's -->
351 <div id="bottom">
352 <p>
353 <a href="http://validator.w3.org/check?uri=referer"><img
354 src="../../pics/website/xhtml10.png" alt="Valid XHTML 1.0"
355 title="Code validé XHTML 1.0"
356 style="width: 80px; height: 15px;" /></a>
357 </p>
358 </div>
360 </body>
361 </html>