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