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