Developing Tiny Core Linux extensions
Packaging AppImages
The method shown for packaging AdoptOpenJDK can be adapted for AppImage files. The only difference is that you won't be able to unpackage them with tar
, since their contents are encapsulated as filesystem images instead. AppImage files can be extracted using the --appimage-extract
switch. For example, in order to extract Nextcloud-Client after downloading it, run:
$ chmod +x Nextcloud-2.6.4-x86_64.AppImage $ ./Nextcloud-2.6.4-x86_64.AppImage --appimage-extract
Remember: In an AMD64 system, you will need to ensure that /lib64/ld-linux-x86-64.so.2
, the dynamic linker, is available. Otherwise, AppImages won't work. The best way to do this is to create /lib64
if it does not exist and then make a symlink from /lib/ld-linux-x86-64.so.2
to /lib64/ld-linux-x86-64.so.2
.
Packaging from Source Code
The procedure for packaging a piece of software from its source code is not complex. Instead of taking a precompiled build and decompressing it into the extension file tree, you just compile the software directly into the extension file tree:
$ cd source_code $ ./configure --prefix=/usr/local $ make $ sudo make install \ DESTDIR=/tmp/package-extension
The --prefix
switch is required to configure the software to operate under /usr/local
once installed. The make install
command is passed a DESTDIR
parameter to get the software installed directly into the extension folder (rather than the actual operating system doing the building!).
Making Your Extension Official
If you don't intend to share your extensions, you are done. However, if you intend to submit your extension to an official repository, you still have work to do.
Every submission to the official repository needs a file that contains the extension's checksum, a list of the files contained in the extension, a generic information file, and a list of dependencies.
To generate the extension's checksum, use the following commands:
$ cd /tmp $ md5sum adoptopenjdk-12.tcz >> adoptopenjdk-12.tcz.md5.txt
Then, you can generate a valid list of the extension's contents with the following commands:
$ cd /tmp/package-adoptopenjdk-12 $ find * \! -type d >> /tmp/adoptopenjdk-12.tcz.list $ sort -o /tmp/adoptopenjdk-12.tcz.list /tmp/adoptopenjdk-12.tcz.list
In order to generate a valid information file, you should download an existing file from the official repository and use it as a template [6].
For the list of dependencies, check the documentation of the software you are packaging. You can also use ldd
to obtain a list of the libraries a binary uses, which is a great starting point if the documentation is unhelpful:
$ find * -type f | xargs file | grep ELF |cut -f 1 -d \: | xargs ldd
You should place the list of dependencies in a file with the extension *.tcz.dep
(e.g., adoptopenjdk-12.tcz.dep
). Check the official repository for examples.
In order to ensure your dependency list is correct, boot a Tiny Core Linux instance with the base
and norestore
cheat codes. Then install the dependencies listed in the *.tcz.dep
file using tce-load
. Try to load and use your new extension. If everything works, your list of dependencies is correct.
The official policy for extensions is that they should not touch anything in the filesystem structure's higher levels directly. An extension's files should be placed in /usr/local
. If you need the extension to make any modification elsewhere in the filesystem, you should use a tce.installed
script, as shown in this article.
You will also need to strip binaries within the extension. This is easily accomplished with the strip
command:
$ find * -type f | xargs file | grep ELF |cut -f 1 -d \: | xargs sudo strip
In order to find out if extensions are fully compliant, Tiny Core Linux offers a submitqc extension. Using this extension is as easy as placing the extension, the *.info
file, the *.dep
file, and the *.md5.txt
file in the same folder. Then open a terminal in the folder and run:
$ submitqtc --libs
The program will generate a log and report any issues it encounters.
If you are packaging graphical applications, it may be a good idea to generate a freedesktop-compliant entry, such as the one shown in Figure 3. This will allow your extension to appear in the desktop environments' menus and in the Tiny Core Linux's default Wbar (Figure 4).

Finally, remember to include the software license! The software that governs the distribution and use of your extension should be installed in /usr/local/share/doc/$extension
(where $extension is the name of your extension).
« Previous 1 2 3 Next »
Buy this article as PDF
(incl. VAT)
Buy Linux Magazine
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters
Support Our Work
Linux Magazine content is made possible with support from readers like you. Please consider contributing when you've found an article to be beneficial.
News
-
Arch Linux 2023.12.01 Released with a Much-Improved Installer
If you've ever wanted to install Arch Linux, now is your time. With the latest release, the archinstall script vastly simplifies the process.
-
Zorin OS 17 Beta Available for Testing
The upcoming version of Zorin OS includes plenty of improvements to take your PC to a whole new level of user-friendliness.
-
Red Hat Migrates RHEL from Xorg to Wayland
If you've been wondering when Xorg will finally be a thing of the past, wonder no more, as Red Hat has made it clear.
-
PipeWire 1.0 Officially Released
PipeWire was created to take the place of the oft-troubled PulseAudio and has finally reached the 1.0 status as a major update with plenty of improvements and the usual bug fixes.
-
Rocky Linux 9.3 Available for Download
The latest version of the RHEL alternative is now available and brings back cloud and container images for ppc64le along with plenty of new features and fixes.
-
Ubuntu Budgie Shifts How to Tackle Wayland
Ubuntu Budgie has yet to make the switch to Wayland but with a change in approaches, they're finally on track to making it happen.
-
TUXEDO's New Ultraportable Linux Workstation Released
The TUXEDO Pulse 14 blends portability with power, thanks to the AMD Ryzen 7 7840HS CPU.
-
AlmaLinux Will No Longer Be "Just Another RHEL Clone"
With the release of AlmaLinux 9.3, the distribution will be built entirely from upstream sources.
-
elementary OS 8 Has a Big Surprise in Store
When elementary OS 8 finally arrives, it will not only be based on Ubuntu 24.04 but it will also default to Wayland for better performance and security.
-
OpenELA Releases Enterprise Linux Source Code
With Red Hat restricting the source for RHEL, it was only a matter of time before those who depended on that source struck out on their own.