|
Project Information
|
A set of scripts for easing the process of creating, submitting and maintaining extensions for Tiny Core Linux. Download & Installtcztools comes as a tcz extension itself so you can just drop it into your tce directory and load it: $ wget http://tcztools.googlecode.com/hg/tcztools.tcz -cP "$(cat /opt/.tce_dir)/optional" $ tce-load -i tcztools Alternatively, you can checkout the sources and run the included install script which will copy the files instead of mounting them: $ tce-load -wi mercurial $ hg clone https://cosmin.apreutesei@tcztools.googlecode.com/hg/ tcztools $ cd tcztools $ ./install Creating a new extensionSay you want to make a new software available to tinycore, let's call it foo. Make a directory somewhere with the following layout: /somewhere
*/foo* layout directory for the foo extension
*/foo-dev* layout directory for the foo-dev extension
*/foo-locale* layout directory for the foo-locale extension
*...*
*foo.tcz.dep* list of dependencies for foo.tcz, if any
*foo-dev.tcz.dep* list of dependencies for foo-dev.tcz, if any
*...*
*foo-get* download script
*foo-build* build script
This will be our "project" directory for packing up foo into one or more tcz extensions. The foo-get script must contain all necessary wget/git/untar etc. commands to download and unpack everything in /tmp/foo. Make it and run it. The foo-build script is for building the sources from /tmp/foo, if necessary, that is, if your extension is based on sources and not on precompiled binaries. Run it so we can have binaries in /tmp/foo. The directories foo, foo-dev, foo-locale, etc. are the "layout" directories, containing symlinks mapping files form /tmp/foo into their final destinations like ./foo/usr/local/bin etc. Hand-pick the files you need to include in your extensions from /tmp/foo, and create appropriate symlinks into ./foo/usr/local, etc. This cherry-picking/mapping job is very well suited for mc (use Ctrl+x s to create symlinks from one pane to the other). Any other files you need to pack that are not present in the build directory just copy them over to the appropriate locations in ./foo, ./foo-dev, etc. Following the above steps should lead you to a scheme very similar to this one. Pack everything: $ tcz-pack foo foo-dev ... At this point, tcz-pack lamented that foo.tcz.info file was not found in the current directory, but it also created a stub one for us, which we now have to edit to fill in the missing information about the package. This is also a good time to think about any dependencies of foo and list them in foo.tcz.dep. Again: $ tcz-pack foo foo-dev ... If all goes well, our extension(s) should now be packed and ready in /tmp/tcztools. Symlinks to /tmp/ were dereferenced, other files were packed as they were. The extensions were also copied to your local tce directory, so now, assuming your tce directory is persistent (i.e. you booted with the tce=hdxy boot option), we can test them by rebooting tinycore with tce=hdxy lst=none, and issuing tce-load -i foo, tce-load -i foo-doc, etc. This is the only way to be certain that the dependencies were declared correctly in the .dep file. If all goes well, you can now submit the extensions to the tinycore team for reviewing: $ tcz-submit foo foo-dev ... For this to work, you need mutt and a MTA configured for sending emails. Here's a tutorial on how to set up mutt and msmtp quickly for this purpose. Finally, if you don't want to reboot all the time while you're debugging your extensions, there's a handy uninstall script which you can use: $ tcz-umount foo Just remember that the best way to really test an extension is with a clean boot. To recap...$ tcz-pack #pack extensions $ tcz-submit #submit extensions $ tcz-umount #uninstall extension All tools start with tcz- and respond to --help so you don't have to come to this page again. Complete exampleSay you want to download, compile, test, pack, test-mount, and finally submit cipofs.tcz, for which all the necessary files are hosted here along with tcztools. The process is thus fully automated: tce-load -wi mercurial #for checking out project files, including the ones for ciopfs hg clone https://cosmin.apreutesei@tcztools.googlecode.com/hg/ tcztools #checkout the project files cd tcz-projects #enter the "projects" directory ./ciopfs-get #download it ./ciopfs-make #compile it ./ciopfs-test #test it ./ciopfs-pack #pack it into a tcz ./ciopfs-mount #test-mount it to see if everything's in the right place and all ./ciopfs-umount #ok, umount it ./ciopfs-submit #submit it to Tiny Core team for reviewing Open development of Tiny Core extensionsThe goal of this project is to help streamline the way Tiny Core extensions are built and maintained so that people other than yourself are able to upgrade and rebuild your extensions in an automated way. If you are committed to maintaining extensions for Tiny Core, putting your project files (the layout directory and the download and build scripts) up on google code or github like I did will make it easier for other people to rebuild your extensions with tcztools, plus other features like source control and a bug tracker come for free. In the future Tiny Core might develop its own standardized process of building and maintaining extensions, including version control and a bug tracker. Until then, tcztools can help fill part of that gap. Feedback
ThanksMany thanks to Tiny Core folks and to Robert Shingledecker for keeping it simple and hackable. |