website view en/devel/index.html @ rev 665

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