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

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