| aramis.sh | ||
| aramis_simple.sh | ||
| Makefile | ||
| README.md | ||
Aramis
A script for packaging precompiled binaries into an installable package. This is useful if you have a Linux machine that, for whatever reason, the package manager does not provide a package you need, and you also are unable to compile it on that very same machine. This script will allow you to compile applications on another machine, or even take already compiled and installed programs, and package them into something that can be installed on another machine.
It works by isolating each package and each version into its own subfolder within the /opt/aramis directory, allowing each application to be packaged with all of its dependencies and the correct versions of those dependencies. This makes this not an ideal replacement for a functional package manager as it is rather space inefficient, but it does allow for getting software on a machine that would otherwise be much more difficult or not feasible.
It is also useful for Busybox-style machines. Since every package is wholly contained within /opt/aramis, this can be a mount point for an external drive, so the packages can be installed entirely on an external device. There are symbolic links that are created in /usr/local/bin when a package is installed that would be dropped on a Busybox-style machine, but these can be added back using aramis setup after boot.
Here are a couple real-world use cases as to why I made this script and to give an example of its use cases.
The first was a machine running UnionTech Operating System Home Edition. Development on this operating system officially has been on pause, so it has not received an update in awhile, making it too old to play Steam. I used this program to compile Flatpak 1.16.1 on a Debian 13 machine and package that into an Aramis package which could be installed onto the UOS machine. Compiling Flatpak 1.16.1 on UOS is not practical because its glibc is far too old. Through Flatpak 1.16.1, I could then install more up-to-date software that is still maintained, including Steam itself, modern browsers like Floorp, Lossless Scaling, so on and so forth.
The second was an embedded device with a loongarch64 processor running LoongOS. This operating system did not come with a package manager or even an on-board compiler as it is far too simple for that, as the device only has a few hundred megabytes of RAM and eMMC storage. Setting up a cross-compiling toolchain to build exactly to it and to all of its libraries was rather tedious. Instead, I managed to get my software running on there by running Loongnix in a Qemu virtual machine, installing and compiling packages there, and then using Aramis to send them over to the physical device.
Installation
#Installs the full script
sudo make install
#Installs a reduced script
sudo make install_simple
Uninstallation
sudo make uninstall
Usage
Use aramis init [package name] [version] to initialize a temporary directory for a new package.
Use aramis import [file] [path] to import a file into the package. Note that the file can also be a command. The path should be where the file should exist after the prefix, such as, the path is most commonly bin.
Use aramis export [file path] to make a binary executable globally accessible after installation. For example, if you imported mybinary to bin, then exporting bin/mybinary will make mybinary globally accessible after the user installs the package. It does this by creating a symbolic link to the executable within /usr/local/bin/.
Use aramis mkdir [path] to create an empty directy inside of the package.
Use aramis tree to see the current file structure of the package.
Use aramis build [tar|deb] to build the package as a TAR (any Linux distribution) or a DEB (Debian-based distribution) file.
Use aramis clean to remove the temporary directory.
Example
Below is a complete example of packaging whatever version of wget happens to be installed onto your system into a DEB package.
ver=$(wget --version | grep 'GNU W' | cut -d " " -f 3)
aramis init wget $ver
aramis import wget bin
aramis export bin/wget
aramis build deb
aramis clean
For a more complicated example, we can build Flatpak 1.16.1, which is sufficient to run Steam and Lossless Scaling.
#Since Flatpak calls other programs, you need to specify the Aramis prefix when compiling it
prefix=/opt/aramis/flatpak/1.16.1
#Download Flatpak 1.16.1 and compile it
wget https://github.com/flatpak/flatpak/releases/download/1.16.1/flatpak-1.16.1.tar.xz
tar -xvf flatpak-1.16.1.tar.xz
cd flatpak-1.16.1
meson setup --prefix=$prefix builddir
ninja -C builddir
#Create a default repo config file
echo '[core]
repo_version=1
mode=bare-user-only
min-free-space-size=500MB
'>config
cd ..
#Create the aramis package
aramis init flatpak 1.16.1
aramis import flatpak-1.16.1/builddir/app/flatpak bin
aramis import flatpak-1.16.1/builddir/subprojects/bubblewrap/flatpak-bwrap libexec
aramis import flatpak-1.16.1/builddir/subprojects/dbus-proxy/flatpak-dbus-proxy libexec
aramis import flatpak-1.16.1/builddir/portal/flatpak-portal libexec
aramis import flatpak-1.16.1/config var/lib/flatpak/repo
aramis mkdir var/lib/flatpak/repo/tmp
aramis mkdir var/lib/flatpak/repo/objects
aramis global bin/flatpak
aramis build deb
aramis clean
Installing Aramis Packages
If the package is built as a TAR file, it can be installed with the command shown below.
sudo tar -xvf [tar file] -C /
If the package is built as a DEB file, it can be installed with the command shown below.
sudo apt install [deb file]
The Aramis script itself can also be used to install and uninstall TAR packages.
sudo aramis install [tar file]
sudo aramis uninstall [package name] [version]
Installed packages can also be listed with aramis list.
The aramis_simple.sh script includes just the code for the installer, uninstaller, and list. This has far less dependencies, and is thus useful for installing onto simpler systems where the packages are intended to be employed and not built.
Repository
I am currently hosting a repository with programs I have converted for my own purposes. This includes Flatpak 1.16.1.
deb [trusted=yes] https://www.foleosoft.com/firmware/aramis/amd64 ./