What are Porteus Modules?
An introduction to modules
Instead of the traditional style of downloading a program and installing it, Porteus uses a file called a module which you activate (install) or deactivate (uninstall). Modules are similar to zip files in that they are compressed and they can contain multiple files and directories. The file extension of Porteus modules is .xzm. To activate a module you simply double click on it and it will be injected into the Porteus directory structure and all of the required files will be put in their place. To deactivate the module just double click on it again and all the files will be removed from the directory structure and packed back into the module. This makes installing applications very simple and you don't clutter up your computer with thousands of rarely used files.
You can download modules and store them on your computer or flash drive. Sometimes a package has linux dependencies which are required on your system in order for it to work properly.
Modules that are placed into the porteus/modules folder will be activated automatically when Porteus boots. Modules that you only want to use occasionally can be stored in the 'optional' folder, and you can activate them on demand. Both of these directories are located in the 'porteus' folder which sits in the root of your storage device.
A more in depth look at modules
Porteus modules are compressed using the LZMA2 (Lempel-Ziv-Markov chain Algorithm) compression algorithms and a squashfs file system. The result is a file that, when double clicked, will inject itself into the Porteus directory structure. LZMA compression is known for it's fast decompression rate; however this is at the expense of a slower compression rate as extra passes are made.
The modules in the base folder contain multiple packages in one module so if you are looking to remove or extract a package from a module you will need to decompress the file. Porteus has built in commands to decompress or create modules. For example if you wanted to decompress a module called 'firefox' on your desktop, you would issue these commands in a console:
# mkdir ~/Desktop/myFolder
# xzm2dir ~/Desktop/firefox.xzm ~/Desktop/myFolder
Like wise, one can create their own modules. Imagine that I have a script that does something useful, like searching my 'optional modules' folder for a module that I type the name of. I want this script to be in my /usr/bin directory so I create a fake /usr/bin in my /tmp directory and put the script in there.
# mkdir -p /tmp/fakeRoot/usr/bin
# cp ~/Desktop/myScript.sh /tmp/fakeRoot/usr/bin
Now I can create a module from the fakeFolder and when this module is activated it will inject the script into the /usr/bin directory.
# dir2xzm /tmp/fakeRoot ~/Desktop/scriptModule.xzm
Brokenman, one of the Porteus developers, has created the 'Porteus Package Manager' utility which is included by default in all editions of Porteus. This utility allows users to connect to various slackware repositories to download slackware packages
For a more in-depth guide to creating and manipulating modules in Porteus, please read this document.