Roll your Own ExtensionsForum: Other Help Topics Topic: Roll your Own Extensions started by: Fordi Posted by Fordi on Sep. 13 2004,23:44
Current DSL extensions come in three flavors:"Safe" .tar.gz files; they are just tar.gzs that are relative to root, and write to home and opt only. "tar -xvzf file.tar.gz -C /" will extract 'em for you. "potentially unsafe" .dsl files; also .tar.gz files, but they're given the .dsl extension so that DSL knows it's going to try to write to the base CD system - it needs to prepare for that. I won't tell you how to extract these - find out on your own, or let DSL do it, you can damage your system here. "Unified Compresed Image", or .uci files. These are large, static extensions. They're referred to as "unified" because of the old way of doing things. Previously (in versions 7.x), the OS would mount a .ci image and extract its .tar.gz separately. The new .uci format is essentially the same, except the .tar.gz is found inside the compressed image under the name /user.tar.gz These don't really get "extracted", but mounted. This saves a lot on your RAM.
How to make your own? Well, say you want to package Apache2 for your own use later. This is a large program, and you may not have a lot of ram available, so we're going to go for the .uci option (essentially 'cos the other forms of extension creation are pieces of piss, once you've got all the files and libs not naitively supported by DSL in one place) Download apache2 from one of their mirrors. extract it under your home directory (if you're in DSL, it's /home/dsl)
enter that folder and check out your configuration options
you should see a list of options, one of which is "--prefix". use that to your advantage and proceed with normal build
***eats chips and waits for compile*** Ok, now you've got the whole server in /opt/apache2 First: we have a conf file where our uci's going to be mounted, meaning it'll be non-writable. time to change that.
Now, enter this line into httpd.conf:
Now wipe out the original htdocs folder
And replace all instances of "/opt/apache2/htdocs" within httpd.conf with "/home/dsl/htdocs" or wherever else you'd like it to come from (my personal favorite is to have it linked there, but have that as a symlink to my USB pen drive) Finally, the fun part, making an image. I'm not going to do this the classical mkisofs way, as I like to have a bit of control later on for minor tweaks (iso is not writable, but making an ext2 image does have two disadvantages: more commands, and slightly lesser compression)
You now have what (should be) a working apache uci. Keep in mind we didn't go over configuring apache further (way out of the scope of this document), so you'll probably have to make changes to .httpd once you install everything. Posted by guest on Sep. 14 2004,07:18
look at /usr/sbin/mountci Posted by guest on Sep. 14 2004,12:16
if i try your method:create_compressed_fs -b remaster.img 65536 > remaster.ci then when i do a myDSL-load i get wrong: fs type, bad option ,.. and .ci doesnt load but when i do: mount remaster.img /mnt/test -o loop mkisofs -R /mnt/test | create_compressed_fs -b - 65536 > remaster.ci all goes well i think the newer cloop driver check for iso? Posted by Fordi on Sep. 14 2004,15:44
Yeah. I looked at the mountci script. It specifies -t iso9660 (unneeded, really; linux will automatically figure out iso9660 and ext2, as well as a couple other fs types). In other words, I am mistaken. uci files must be iso's passed through create_compressed_fs. That's not to say compressed ext2 filesystems don't work, just that dsl won't handle them proper. Funny thing is, it's a matter of removing 11 bytes from a single shell script (a modified mountci without the -t argument appears to work fine for compressed ext2) Posted by mikshaw on Jan. 03 2005,15:51
I suppose it's time I learned more about uci, with the Xfree86 and nvidia extensions providing a way to add some heavier applications such as 3D games.The explanation given by Fordi looks thorough, but the thread in general just leaves me confused. 1) How is /home/dsl/.httpd installed by the end-user? Manually? 2) What is create_compressed_fs? Is this a DSL- or cloop-specific application, and how can it be installed/used on another distro? 3) So what is the proper method of creating a UCI? It seems like there is some contradiction here. Thanks for your time. Posted by Pellaon on Feb. 07 2005,17:32
I can't compile apache 2. I have downloaded the gcc dsl. It is correctly detected but i get errers and a shutdown while building...If someone could compile apache 2 for the DSL it would be great. Posted by pellaon on Feb. 23 2005,13:44
Ok, i'm successfully made an Apache Dsl with PHP5... Still having problems with Mysql...
|