rev |
line source |
pankso@830
|
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
pankso@830
|
2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
pankso@830
|
3 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
pankso@830
|
4 <head>
|
pankso@830
|
5 <title>SliTaz - Forge (en)</title>
|
pankso@830
|
6 <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" />
|
pankso@830
|
7 <meta name="description" content="slitaz developers forge" />
|
pankso@830
|
8 <meta name="keywords" lang="en" content="slitaz, devel, hg, bugs" />
|
pankso@830
|
9 <meta name="robots" content="index, follow, all" />
|
pankso@830
|
10 <meta name="modified" content="<?php echo (date( "Y-m-d H:i:s", getlastmod())); ?>" />
|
pankso@830
|
11 <meta name="author" content="Christophe Lincoln"/>
|
pankso@830
|
12 <link rel="shortcut icon" href="../../favicon.ico" />
|
pankso@830
|
13 <link rel="stylesheet" type="text/css" href="../../slitaz.css" />
|
pankso@830
|
14 </head>
|
pankso@830
|
15 <body>
|
pankso@830
|
16
|
pankso@830
|
17 <!-- Header -->
|
pankso@830
|
18 <div id="header">
|
pankso@830
|
19 <div id="logo"></div>
|
pankso@830
|
20 <div id="network">
|
pankso@830
|
21 <a href="http://www.slitaz.org/netmap.php">
|
pankso@830
|
22 <img src="../../images/network.png" alt="network.png" /></a>
|
pankso@830
|
23 <a href="http://scn.slitaz.org/">Community</a>
|
pankso@830
|
24 <a href="http://doc.slitaz.org/">Doc</a>
|
pankso@830
|
25 <a href="http://forum.slitaz.org/">Forum</a>
|
pankso@830
|
26 <a href="http://bugs.slitaz.org">Bugs</a>
|
pankso@830
|
27 <a href="http://hg.slitaz.org/">Hg</a>
|
pankso@830
|
28 </div>
|
pankso@830
|
29 <h1><a href="http://www.slitaz.org/">SliTaz GNU/Linux</a></h1>
|
pankso@830
|
30 </div>
|
pankso@830
|
31
|
pankso@830
|
32 <!-- Block -->
|
pankso@830
|
33 <div id="block">
|
pankso@830
|
34 <!-- Navigation -->
|
pankso@830
|
35 <div id="block_nav">
|
pankso@830
|
36 <h4>Navigation</h4>
|
pankso@830
|
37 <div class="right_box">
|
pankso@830
|
38 <ul>
|
pankso@830
|
39 <li><a href="../mailing-list.html">Mailing List</a></li>
|
pankso@830
|
40 <li><a href="../devel/">Development</a></li>
|
pankso@830
|
41 <li><a href="../packages/">Packages</a></li>
|
pankso@830
|
42 <li><a href="../artwork/">Artwork</a></li>
|
pankso@830
|
43 <li><a href="../search.html">Search</a></li>
|
pankso@830
|
44 </ul>
|
pankso@830
|
45 </div>
|
pankso@830
|
46 <div class="left_box">
|
pankso@830
|
47 <ul>
|
pankso@830
|
48 <li><a href="../">Headlines</a></li>
|
pankso@830
|
49 <li><a href="../about/">About</a></li>
|
pankso@830
|
50 <li><a href="../get/">Download</a></li>
|
pankso@830
|
51 <li><a href="../asso/">Association</a></li>
|
pankso@830
|
52 <li><a href="../doc/">Documentation</a></li>
|
pankso@830
|
53 </ul>
|
pankso@830
|
54 </div>
|
pankso@830
|
55 </div>
|
pankso@830
|
56 <!-- Information/image -->
|
pankso@830
|
57 <div id="block_info">
|
pankso@830
|
58 <h4>Forge</h4>
|
pankso@830
|
59 <p>
|
pankso@830
|
60 Tools, guideline and services used to created and build SliTaz
|
pankso@830
|
61 </p>
|
pankso@830
|
62 <p>
|
pankso@830
|
63 <img src="../../images/users.png" alt="users.png" />
|
pankso@830
|
64 <a href="http://scn.slitaz.org/">Join us on SCN</a> and
|
pankso@830
|
65 the <a href="../mailing-list.html">mailing list</a>
|
pankso@830
|
66 </p>
|
pankso@830
|
67 </div>
|
pankso@830
|
68 </div>
|
pankso@830
|
69
|
pankso@830
|
70 <!-- Content -->
|
pankso@830
|
71 <div id="content">
|
pankso@830
|
72
|
pankso@830
|
73 <h2>Collaborative management</h2>
|
pankso@830
|
74
|
pankso@830
|
75 <ul>
|
pankso@830
|
76 <li><a href="#kiss">KISS and comply to standards.</a></li>
|
pankso@830
|
77 <li><a href="#tank">Build host & home.</a></li>
|
pankso@830
|
78 <li><a href="#repos">Mercurial repositories.</a></li>
|
pankso@830
|
79 <li><a href="#gui">GUI in GTK and CGI/web</a></li>
|
pankso@830
|
80 <li><a href="#iconv">Implementation of iconv().</a></li>
|
pankso@830
|
81 <li><a href="#pkgs">Tazpkg packages.</a></li>
|
pankso@830
|
82 <li><a href="#website">Website Management.</a></li>
|
pankso@830
|
83 </ul>
|
pankso@830
|
84
|
pankso@830
|
85 <a name="kiss"></a>
|
pankso@830
|
86 <h2>KISS and comply to standards</h2>
|
pankso@830
|
87 <p>
|
pankso@830
|
88 Keep it simple: follow the best standards, carefully draft and write
|
pankso@830
|
89 high quality documentation, provide a stable and robust system and keep
|
pankso@830
|
90 the <em>rootfs</em> on the LiveCD light enough to run on machines with at
|
pankso@830
|
91 least 128 MB RAM. It's also possible to use GTK+2, Dialog, SHell scripts,
|
pankso@830
|
92 or PHP coding tools on the distribution. The idea is not to duplicate and
|
pankso@830
|
93 to think small...
|
pankso@830
|
94 </p>
|
pankso@830
|
95
|
pankso@830
|
96 <a name="tank"></a>
|
pankso@830
|
97 <h2>Tank - Build host & home</h2>
|
pankso@830
|
98 <p>
|
pankso@830
|
99 Each contributor may have an account on the project server with secure
|
pankso@830
|
100 access, disk space, a public directory and all development tools.
|
pankso@830
|
101 Developers can compile packages and maintainers of the mirror can handle
|
pankso@830
|
102 sychronization. Tank also hosts the website, web boot and mercurial
|
pankso@830
|
103 repositories: <a href="http://tank.slitaz.org/">tank.slitaz.org</a>
|
pankso@830
|
104 </p>
|
pankso@830
|
105 <p>
|
pankso@830
|
106 Instructions on using the build host are described in the Cookbook:
|
pankso@830
|
107 <a href="http://doc.slitaz.org/en:cookbook:buildhost">
|
pankso@830
|
108 SliTaz Build Host (tank)</a>.
|
pankso@830
|
109 </p>
|
pankso@830
|
110
|
pankso@830
|
111 <a name="repos"></a>
|
pankso@830
|
112 <h2>Mercurial repositories</h2>
|
pankso@830
|
113 <p>
|
pankso@830
|
114 SliTaz Mercurial or Hg repos can be browsed or cloned by anyone using
|
pankso@830
|
115 the URL: <a href="http://hg.slitaz.org/">http://hg.slitaz.org/</a>. People
|
pankso@830
|
116 with write access can directly use <code>repos.slitaz.org</code> which
|
pankso@830
|
117 requires authentication. Mercurial uses Python and is installable with:
|
pankso@830
|
118 <code>tazpkg get-install mercurial</code>
|
pankso@830
|
119 </p>
|
pankso@830
|
120
|
pankso@830
|
121 <h3>~/.hgrc</h3>
|
pankso@830
|
122 <p>
|
pankso@830
|
123 Before you push your first commit onto the server, be sure that you have a
|
pankso@830
|
124 correct Hg configuration file with your name and email address, and remember
|
pankso@830
|
125 to check that you are not root. Personal ~/.hgrc file example:
|
pankso@830
|
126 </p>
|
pankso@830
|
127 <pre class="script">
|
pankso@830
|
128 [ui]
|
pankso@830
|
129 username = FirstName LastName <you@example.org>
|
pankso@830
|
130 </pre>
|
pankso@830
|
131 <h4>Clone, modify, commit and push</h4>
|
pankso@830
|
132 <p>
|
pankso@830
|
133 Clone a repo, example for wok:
|
pankso@830
|
134 </p>
|
pankso@830
|
135 <pre>
|
pankso@830
|
136 $ hg clone http://repos.slitaz.org/wok
|
pankso@830
|
137 </pre>
|
pankso@830
|
138 <p>
|
pankso@830
|
139 Change directory to wok, note you must be in the repository to be able
|
pankso@830
|
140 to use 'hg' commands. To check all logs or just the last log:
|
pankso@830
|
141 </p>
|
pankso@830
|
142 <pre>
|
pankso@830
|
143 $ hg log
|
pankso@830
|
144 $ hg head
|
pankso@830
|
145 </pre>
|
pankso@830
|
146 <p>
|
pankso@830
|
147 Add or modify one or more files and commit:
|
pankso@830
|
148 </p>
|
pankso@830
|
149 <pre>
|
pankso@830
|
150 $ hg add
|
pankso@830
|
151 $ hg status
|
pankso@830
|
152 $ hg commit -m "Log message..."
|
pankso@830
|
153 $ hg log
|
pankso@830
|
154 </pre>
|
pankso@830
|
155 <p>
|
pankso@830
|
156 Note that you can use the command <code>rollback</code> to roll back to the last
|
pankso@830
|
157 transaction. Before pushing changes to the server, it is safe to pull once:
|
pankso@830
|
158 </p>
|
pankso@830
|
159 <pre>
|
pankso@830
|
160 $ hg pull
|
pankso@830
|
161 $ hg push
|
pankso@830
|
162 </pre>
|
pankso@830
|
163 <p>
|
pankso@830
|
164 Done, your changes, code or corrections are now on the server.
|
pankso@830
|
165 </p>
|
pankso@830
|
166 <h4>Updating a local wok</h4>
|
pankso@830
|
167 <p>
|
pankso@830
|
168 To update your wok with the local server (<em>pull</em> to pull the changes):
|
pankso@830
|
169 </p>
|
pankso@830
|
170 <pre>
|
pankso@830
|
171 $ hg pull -u
|
pankso@830
|
172 </pre>
|
pankso@830
|
173 <h4>Useful commands</h4>
|
pankso@830
|
174 <p>
|
pankso@830
|
175 Hg commands that can be used.
|
pankso@830
|
176 </p>
|
pankso@830
|
177 <ul>
|
pankso@830
|
178 <li><code>hg help</code> : Display the full list of commands.</li>
|
pankso@830
|
179 <li><code>hg rollback</code> : Undo the last action performed (commit,
|
pankso@830
|
180 pull, push).</li>
|
pankso@830
|
181 <li><code>hg log <package></code> : Display a package log.</li>
|
pankso@830
|
182 <li><code>hg head</code> : Display the last log.</li>
|
pankso@830
|
183 </ul>
|
pankso@830
|
184
|
pankso@830
|
185 <a name="gui"></a>
|
pankso@830
|
186 <h2>GUI - Pure C/GTK, Yad, Vala/Genie and CGI/web</h2>
|
pankso@830
|
187
|
pankso@830
|
188 <p>
|
pankso@830
|
189 We have many way to create user interface in the open source world. From
|
pankso@830
|
190 the start of the project until 3.0 we mainly used a tool called Gtkdialo
|
pankso@830
|
191 who let us create nice and quiet complex interfaces in GTK but with a
|
pankso@830
|
192 scripting language, no compilation, just run. But gtkdialog in unmaintained
|
pankso@830
|
193 and lack about new GTK features, so we switched to Yad for simple GUI boxes.
|
pankso@830
|
194 For all the admin, packages and configuration tools we switched to TazPanel,
|
pankso@830
|
195 a CGI/web interface with all the gui in xHTML 5 and CSS 3.
|
pankso@830
|
196 </p>
|
pankso@830
|
197 <p>
|
pankso@830
|
198 Now we Yad is very simple and dont allow us to create complex interface even
|
pankso@830
|
199 if we just need 2 or 3 entry with label and a few buttons, so an other way
|
pankso@830
|
200 must be used. The advantage of a scripting language is the fact we dont need
|
pankso@830
|
201 to compile and can code in relatime, but it produce a slower applications.
|
pankso@830
|
202 All in C is complex and we got less contributor since SHell script are easier
|
pankso@830
|
203 to understand, so the guide line now is to keep and continue improving our
|
pankso@830
|
204 cmdline tools and provide frontend in GTK or CGI/web.
|
pankso@830
|
205 </p>
|
pankso@830
|
206 <p>
|
pankso@830
|
207 They is many new languages who let use GTK such as Genie, Vala or GTKaml.
|
pankso@830
|
208 But keep in mind ther are not so popular than C and GTK and finaly not realy
|
pankso@830
|
209 easier to learn and use, at least for simple fronted you finally use SHell
|
pankso@830
|
210 scripts to perform tasks. Use can use Vala if you like but look at a pure
|
pankso@831
|
211 GTK single window, it only 14 lines:
|
pankso@830
|
212 </p>
|
pankso@830
|
213 <pre>
|
pankso@830
|
214 #include >gtk/gtk.h<
|
pankso@830
|
215
|
pankso@830
|
216 int main(int argc, char *argv[])
|
pankso@830
|
217 {
|
pankso@831
|
218 GtkWidget *window;
|
pankso@831
|
219
|
pankso@831
|
220 gtk_init(&argc, &argv);
|
pankso@831
|
221 window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
|
pankso@831
|
222 g_signal_connect (G_OBJECT (window), "destroy",
|
pankso@831
|
223 G_CALLBACK (gtk_main_quit), NULL);
|
pankso@831
|
224
|
pankso@831
|
225 gtk_widget_show(window);
|
pankso@831
|
226 gtk_main();
|
pankso@831
|
227 return 0;
|
pankso@830
|
228 }
|
pankso@830
|
229 </pre>
|
pankso@830
|
230 <p>
|
pankso@830
|
231 If you not sure about the language to use, discuss it on the mailing list.
|
pankso@830
|
232 If you just want a small GUI function, look at tazbox in the slitaz-tools
|
pankso@830
|
233 repo, it have tiny desktop tools such as a logout box. By the way the first
|
pankso@830
|
234 SliTaz sub-project all written in pure GTK is TazWeb and you may learn
|
pankso@830
|
235 some way to use system() to include system commands in your frontend. For
|
pankso@830
|
236 example TazWeb use wget for downloads and sed to add bookmarks.
|
pankso@830
|
237 </p>
|
pankso@830
|
238 <p>
|
pankso@830
|
239 Yad scripts should follow TazYad guidelines:
|
pankso@830
|
240 <a href="http://hg.slitaz.org/slitaz-dev-tools/raw-file/tip/tazyad/README">
|
pankso@830
|
241 README</a> and
|
pankso@830
|
242 <a href="http://hg.slitaz.org/slitaz-dev-tools/raw-file/tip/tazyad/tazyad">
|
pankso@830
|
243 exmaple code</a>
|
pankso@830
|
244 </p>
|
pankso@830
|
245
|
pankso@830
|
246 <a name="iconv"></a>
|
pankso@830
|
247 <h2>Implementation of iconv()</h2>
|
pankso@830
|
248 <p>
|
pankso@830
|
249 SliTaz uses iconv() provided by GNU glibc - any packages that offer
|
pankso@830
|
250 <code>libiconv</code> must use the library contained in <code>glibc-locale</code>.
|
pankso@830
|
251 There is therefore no longer a libiconv package (1.2 MB) in SliTaz.
|
pankso@830
|
252 </p>
|
pankso@830
|
253
|
pankso@830
|
254 <a name="pkgs"></a>
|
pankso@830
|
255 <h2>Tazpkg Packages</h2>
|
pankso@830
|
256 <p>
|
pankso@830
|
257 The tazpkg packages in SliTaz are automatically created via Tazwok and a
|
pankso@830
|
258 receipt in the wok. The Cookbook describes the
|
pankso@830
|
259 <a href="../doc/cookbook/wok-tools.html">use of tools</a>
|
pankso@830
|
260 and the format of <a href="../doc/cookbook/receipts.html">receipts</a>.
|
pankso@830
|
261 These are required reading before we begin.
|
pankso@830
|
262 </p>
|
pankso@830
|
263 <p>
|
pankso@830
|
264 In terms of choice of package, the idea is to offer a package by task or
|
pankso@830
|
265 functionality, ie. the lightest application in the field and not duplicated.
|
pankso@830
|
266 Note that the current packages are not immutable, if you find an alternative
|
pankso@830
|
267 that is lighter, with more features or more <em>sexy</em> for a few extra KB,
|
pankso@830
|
268 you can suggest it on the Mailing List. Particular attention is given to
|
pankso@830
|
269 packages for the LiveCD, these should be stripped, removing unnecesary
|
pankso@830
|
270 dependancies and compiler options. In general candidate packages for the core
|
pankso@830
|
271 LiveCD are discussed on the Mailing List.
|
pankso@830
|
272 </p>
|
pankso@830
|
273 <p>
|
pankso@830
|
274 Before you begin to compile and create packages for SliTaz, be sure that the
|
pankso@830
|
275 work doesn't already exist in the
|
pankso@830
|
276 <a href="http://download.tuxfamily.org/slitaz/packages/undigest/">undigest</a>
|
pankso@830
|
277 wok provided by the primary SliTaz mirror. Don't forget that the members
|
pankso@830
|
278 of the list are there to help you and that the documentation of the
|
pankso@830
|
279 <a href="../doc/cookbook/wok-tools.html">wok and tools</a>
|
pankso@830
|
280 exists to help you get started.
|
pankso@830
|
281 </p>
|
pankso@830
|
282
|
pankso@830
|
283 <a name="pkgs-naming"></a>
|
pankso@830
|
284 <h3>Naming of packages</h3>
|
pankso@830
|
285 <p>
|
pankso@830
|
286 In most cases the package name is the same as the source, except for
|
pankso@830
|
287 Python, Perl, PHP, Ruby and Lua modules. For example, the package
|
pankso@830
|
288 providing a Kid template system written in Python and XML is named:
|
pankso@830
|
289 <code>python-kid</code>.
|
pankso@830
|
290 </p>
|
pankso@830
|
291
|
pankso@830
|
292 <a name="website"></a>
|
pankso@830
|
293 <h2>Website Management</h2>
|
pankso@830
|
294 <p>
|
pankso@830
|
295 The website is managed via a mercurial repository, they can be cloned by:
|
pankso@830
|
296 </p>
|
pankso@830
|
297 <pre>
|
pankso@830
|
298 $ hg clone http://hg.slitaz.org/website
|
pankso@830
|
299 Or if you have the proper permissions:
|
pankso@830
|
300 $ hg clone http://repos.slitaz.org/website
|
pankso@830
|
301 </pre>
|
pankso@830
|
302
|
pankso@830
|
303 <h3>xHTML coding style</h3>
|
pankso@830
|
304 <p>
|
pankso@830
|
305 The pages and different <em>books</em> are coded in xHTML 1.0
|
pankso@830
|
306 transitional. The title of level 1 is used only once (at the top),
|
pankso@830
|
307 level 2 is the title of the document and levels 3 and 4 are then used for
|
pankso@830
|
308 the subtitles. If a list is used instead using smart anchors;
|
pankso@830
|
309 then that starts at the top, just after the title of level 2.
|
pankso@830
|
310 Paragraphs are contained in the tags <code><p></p></code>.
|
pankso@830
|
311 For indentation, we use tabs - the reason being semantics and to take
|
pankso@830
|
312 up less space in terms of octets (bytes). To put code, like the name of
|
pankso@830
|
313 a command inside a paragraph: <code><code></code> is the preferred
|
pankso@830
|
314 method. To view commands or to utilize a terminal, the web pages use
|
pankso@830
|
315 <code><pre></code> to display the formatted text. Example:
|
pankso@830
|
316 </p>
|
pankso@830
|
317 <pre>
|
pankso@830
|
318 $ command
|
pankso@830
|
319 </pre>
|
pankso@830
|
320 <p>
|
pankso@830
|
321 To view text that can be copied and pasted, such as scripts,
|
pankso@830
|
322 bits of code, sample configuration files, etc - we also use
|
pankso@830
|
323 <code><pre></code>, but with a CSS class named "script". Example:
|
pankso@830
|
324 </p>
|
pankso@830
|
325 <pre class="script">
|
pankso@830
|
326 <pre class="script">
|
pankso@830
|
327
|
pankso@830
|
328 code...
|
pankso@830
|
329
|
pankso@830
|
330 </pre>
|
pankso@830
|
331 </pre>
|
pankso@830
|
332 <p>
|
pankso@830
|
333 The <em>emphasized</em> words put themselves in the tag <code><em></code>
|
pankso@830
|
334 and internal links are relative. Remember to check the validity
|
pankso@830
|
335 of the code via the online <em>validator</em> of the W3C.
|
pankso@830
|
336 </p>
|
pankso@830
|
337
|
pankso@830
|
338 <a name="diff"></a>
|
pankso@830
|
339 <h2>Diff and patch</h2>
|
pankso@830
|
340 <p>
|
pankso@830
|
341 The utilities <code>diff</code> and <code>patch</code> are command-line tools
|
pankso@830
|
342 for creating and implementing a file containing differences between two files.
|
pankso@830
|
343 This technique is often used for collaboration and the changes made to the
|
pankso@830
|
344 original file can be clearly extracted. To create a <code>diff</code> file
|
pankso@830
|
345 readable by humans in a simple text editor, you must supply the <code>-u</code> option:
|
pankso@830
|
346 </p>
|
pankso@830
|
347 <pre>
|
pankso@830
|
348 $ diff -u file.orig file.new > file.diff
|
pankso@830
|
349 </pre>
|
pankso@830
|
350 <p>
|
pankso@830
|
351 To apply a patch:
|
pankso@830
|
352 </p>
|
pankso@830
|
353 <pre>
|
pankso@830
|
354 $ patch file.orig file.diff
|
pankso@830
|
355 </pre>
|
pankso@830
|
356
|
pankso@830
|
357 <!-- End of content -->
|
pankso@830
|
358 </div>
|
pankso@830
|
359
|
pankso@830
|
360 <!-- Footer -->
|
pankso@830
|
361 <div id="footer">
|
pankso@830
|
362 Copyright © <span class="year"></span>
|
pankso@830
|
363 <a href="http://www.slitaz.org/">SliTaz</a> - Network:
|
pankso@830
|
364 <a href="http://scn.slitaz.org/">Community</a>
|
pankso@830
|
365 <a href="http://doc.slitaz.org/">Doc</a>
|
pankso@830
|
366 <a href="http://forum.slitaz.org/">Forum</a>
|
pankso@830
|
367 <a href="http://pkgs.slitaz.org/">Packages</a>
|
pankso@830
|
368 <a href="http://bugs.slitaz.org">Bugs</a>
|
pankso@830
|
369 <a href="http://hg.slitaz.org/">Hg</a>
|
pankso@830
|
370 <p>
|
pankso@830
|
371 SliTaz @
|
pankso@830
|
372 <a href="http://twitter.com/slitaz">Twitter</a>
|
pankso@830
|
373 <a href="http://www.facebook.com/slitaz">Facebook</a>
|
pankso@830
|
374 <a href="http://distrowatch.com/slitaz">Distrowatch</a>
|
pankso@830
|
375 <a href="http://en.wikipedia.org/wiki/SliTaz">Wikipedia</a>
|
pankso@830
|
376 <a href="http://flattr.com/profile/slitaz">Flattr</a>
|
pankso@830
|
377 </p>
|
pankso@830
|
378 </div>
|
pankso@830
|
379
|
pankso@830
|
380 </body>
|
pankso@830
|
381 </html>
|