# HG changeset patch # User Christophe Lincoln # Date 1304622843 -7200 # Node ID f02a85a1f33dd2b029c0af9a4423f9cbae5531ce # Parent 58496d7c2c18509a69ae95a801ea50b38d4a2232 Add documentation (nor only manual but also howto) and put cooker.cgi in a cgi-bin dir so it works with Busybox httpd and LightTPD diff -r 58496d7c2c18 -r f02a85a1f33d Makefile --- a/Makefile Thu May 05 19:09:32 2011 +0200 +++ b/Makefile Thu May 05 21:14:03 2011 +0200 @@ -11,9 +11,9 @@ install -m 0777 cooker $(DESTDIR)$(PREFIX)/bin install -m 0644 cook.conf $(DESTDIR)/etc/slitaz install -m 0644 cook.site $(DESTDIR)/etc/slitaz - install -m 0777 -d $(DESTDIR)/var/www/cooker + install -m 0777 -d $(DESTDIR)/var/www/cgi-bin/cooker install -m 0777 -d $(DESTDIR)$(PREFIX)/share/cook - install -m 0644 web/* $(DESTDIR)/var/www/cooker + install -m 0644 web/* $(DESTDIR)/var/www/cgi-bin/cooker cp -r data/* $(DESTDIR)$(PREFIX)/share/cook uninstall: @@ -21,4 +21,4 @@ $(DESTDIR)$(PREFIX)/bin/cook \ $(DESTDIR)$(PREFIX)/bin/cooker \ $(DESTDIR)/etc/slitaz/cook.* \ - $(DESTDIR)/var/www/cooker + $(DESTDIR)/var/www/cgi-bin/cooker diff -r 58496d7c2c18 -r f02a85a1f33d doc/cookutils.en.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/doc/cookutils.en.html Thu May 05 21:14:03 2011 +0200 @@ -0,0 +1,229 @@ + + + + Cookutils Documentation + + + + + + + + +
+ +

SliTaz Cook & Cooker

+ +

+ The SliTaz Cookutils provide tools and utils to build SliTaz packages. They + are easy to use and learn, fast and light. You will be able to create SliTaz + in a few commands. The cookutils provide the 'cook' utility and the + Cooker. +

+

+ Cook let you compile and create a package, provide a log file and check + receipt/package quality. The Cooker is a build bot with more automation + and can be used as a frontend to cook, since it provide a CGI/web interface + who let you view cook logs in a nice and colored way. +

+ +

Howto work

+

+ The first thing you will have to do before building packages is to setup + your environment. These 2 recommended way to work: cook directly on host + or cook in chroot to protect your host. In the case you want to work in a + chroot you can use Tazdev to create one and chroot in it: +

+
+# tazdev gen-chroot && tazdev chroot
+
+ +

Getting started

+

+ So you decided the way you want to work, so let prepare the cook environement. + Cook use cook.conf configuration file, if you want to use custom path for + SliTaz directories and files, you have to modify it. The setup will create + some directories and files to keep trace on activity and error, all files + are pure plain text files that you can open in a text editor. To prepare + you environment: +

+
+# cook setup
+
+ +

Test your environment

+

+ Cook provide a test command who will create a package and cook it. This let + you see if your enviroment and by the it provide and example package with + a receipt. The create package is named 'cooktest' and can be removed after + testing. To cook the cooktest: +

+
+# cook test
+
+ +

Create and cook

+

+ If you environment is setup corectly you can start creating and compiling + SliTaz packages from your wok. To create a new package with an empty receipt: +

+
+# cook new pkgname
+
+

+ If you just created a new package, you have to edit the receipt with your + favorite text editor. When the receipt is ready or if you have existing + packages, you can cook it: +

+
+# cook pkgname
+
+

+ If all went well you will find your packages in $SLITAZ/packages + directory and produced files in $SLITAZ/wok/pkgname. If you want to cook + and install the package in one command: +

+
+# cook pkgname --install
+
+ +

Clean packages

+

+ After compilation and packaging ther is several files in the wok that take + disk space. To clean a single package: +

+
+# cook pkgname --clean
+
+

+ You can also clean the full wok at once or you can choose to keep SliTaz + related files and just remove the source: +

+
+# cook clean-wok
+# cook clean-src
+
+ +

Packages lists

+

+ Cook can list packages in the wok but also create suitable packages list + for Tazpkg. That let you create a locale packages repository quiet easily + and is used to create official SliTaz packages list found on mirrors. To + list the current wok used by cook (you dont need to be root): +

+
+$ cook list-wok
+
+

+ To create packages lists: +

+
+# cook pkglist
+
+ + +

The Cooker

+

+ The Cooker is a Build Bot, it first usage is to check for commits in a wok, + create an ordered cooklist and cook all modified packages. It can also be + used as a frontend to cook since they use the same files. The Cooker can + also be used to cook a big list of packages at once such has all package + of a flavor. The Cooker provide a nice CGI/Web interface that works by + default on any SliTaz system since we provide CGI support via Busybox httpd + web server. +

+ +

Cooker setup

+

+ Like cook, the Cooker needs a working environment before starting using it. + The main difference with the cook environment is that the Cooker needs 2 wok. + One Hg and clean wok as reference and one build wok, in this way is is easy + to compare both wok and get modifications. If you already have a cook + environement, you must move your wok before setting up the Cooker or it + will complain: +

+
+# cooker --setup
+
+

+ If all went well you have now 2 wok, base developement packages installed + and all needed files created. The default behavor is to check for commits, + you can run a test: +

+
+# cooker
+
+ +

Cooker cook

+

+ Again, 2 way to work now: make change in the clean Hg wok and launch the + cooker without any argument or cook packages manually. The cooker let you + cook a single package, all packages of a category or a flavor. You can also + try to build all unbuilt packages, but be aware the Cooker was not designed + to handle thousand of packages. +

+

+ To cook a single package wich is the same than 'cook pkgname' but with more + logs: +

+
+# cooker --pkg=pkgname
+
+

+ To cook more than one package at once you have different kind of choices. + The currently implemeted way (more will come such as --list= --flavor=) +

+
+# cooker --cat=pkg-category
+
+ +

Cooker CGI/Web

+

+ To let you view log files in a nice way, keep activity trace and help find + errors, you can use the Cooker Web interface located by default in + /var/www/cooker. If you dont use a chroot and the Busybox httpd web server + is running, the web interface will work without modifiaction and should be + reachable at: + http://localhost/cgi-bin/cooker/cooker.cgi +

+

+ If you used a chroot environment, you should also install cookutils on your + host and modify the SLITAZ path variable. A standard working way is to have + a chroot in: +

+
+/home/slitaz/cooking/chroot
+
+

+With /etc/slitaz/cook.conf modified as bellow: +

+
+SLITAZ="/home/slitaz/cooking/chroot/home/slitaz"
+
+

+ Note: It's not obligatory to install the cookutils on your host to use the + web interface, you can also copy the cooker.cgi and style.css files for + example in your ~/Public directory and use a custom cook.conf with it. Say + you have cloned or downloaded the cookutils: +

+
+$ cp cookutils/web ~/Public/cgi-bin/cooker
+$ cp cookutils/cook.conf ~/Public/cgi-bin/cooker
+
+

+Edit ~/Public/cgi-bin/cooker/cook.conf and you all done! +

+ + + +
+ + + + + + diff -r 58496d7c2c18 -r f02a85a1f33d doc/cookutils.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/doc/cookutils.html Thu May 05 21:14:03 2011 +0200 @@ -0,0 +1,1 @@ +cookutils.en.html \ No newline at end of file diff -r 58496d7c2c18 -r f02a85a1f33d doc/style.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/doc/style.css Thu May 05 21:14:03 2011 +0200 @@ -0,0 +1,29 @@ +/* CSS style for SliTaz Doc */ + +body { font: 88% sans-serif, vernada, arial; margin: 0; } +h1 { margin: 0; padding: 8px; color: #fff; font-size: 20px; } +h2 { color: #444; } h3 { color: #666; font-size: 140%; } +a:hover { text-decoration: none; } +pre { + background-color: #f8f8f8; + border: 1px solid #ddd; + padding: 10px; + border-radius: 4px; +} + +#header { + background: #351a0a; + height: 40px; + border-bottom: 8px solid #d66018; +} + +#content { + margin: 40px 80px; + text-align: justify; +} + +#footer { + text-align: center; + padding: 20px; + border-top: 1px solid #ddd; +}