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

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