Making Packages

Note

If you're interested, we're looking for people who wanna package software for Aerogel Linux.

Packaging several software/libraries at once as a small team is pretty hard, so if you wanna help, feel free to open pull requests on our codeberg repo.

Aerogel Linux uses the KISS Linux package format for its packages.

New packages can be submitted at the Codeberg repository here.

Table of contents:

Structure/Files Used

The structure of a KISS Linux repository is organized as follows.

Note this example also includes optional files (you can see which files are optional below).

 git-repository/
└──  repo-name/
    └──  package-name/
        ├──  build
        ├──  checksums
        ├──  depends
        ├──  post-install
        ├──  pre-remove
        ├──  sources
        └──  version
FileLanguageSupports commentsSupports blank linesRequired
buildExecutablecheck
versionDSL
(see version)
closeAll lines (except the first) are ignored.check
checksumsDSL
(see checksums)
closecloseclose
(see checksums)
dependsDSL
(see depends)
checkcheckclose
sourcesDSL
(see sources)
checkcheckclose
pre-removeExecutableclose
post-installExecutableclose

build

The build file is an executable file used to build the package.

There are two arguments given to the build file:

  1. The destination directory (the installation "root"). Packages will be copied from here; e.g. you should do something such as make install PREFIX=$1/usr in the build file.
  2. The first field of the version file; e.g. if a version is 6.12.1 1, then $2 will be set to 6.12.1.

Example build file:

#!/bin/sh

./configure --prefix="/usr"

make
make DESTDIR="$1" install

version

The version file contains the package's version split into two fields: the package version, and the file version. The file version is ignored and is usually set to 1 across all packages.

As stated in Files Used, only the first line in the version file is read. All other lines are ignored.

Example version file:

6.12.1 1

These lines are ignored; only the first line of the `version` file is actually
read by the package manager.

checksums

The checksums file contains checksums for the files in the sources file (in the same order).

The checksums file is only necessary if the sources file contains a local file as a source.

Checksums can be generated by kiss, i.e. run:

root / # kiss checksum b3sum

to generate the checksums for the b3sum package.

An example checksum file can be found below (Disabling a checksum).

Disabling checksums

Danger

Disabling checksums is a security risk and can lead to corrupted or malicious files being installed on the user's system. This should never be done unless necessary.

To disable checksums, write SKIP in the appropriate line of the checksum file:

892a0875b9872acd04a9fde79b1f943075d5ea162415de3047c327df33fbaee5
8a5b38a76b778da8d6f4236f1ea89e680daea971be6ee3a57e4e7ae99a883aa2
SKIP

depends

The depends file contains a line-separated list of dependencies and make dependencies. To mark a dependency as a make dependency, put the word make after the dependency. Comments are also supported; begin a line with # for a comment.

Example depends file:

alsa-lib
meson make

# This is a comment.
wayland
wayland-protocols make

sources

The sources file contains a line-separated list of sources to pull files from.

Internet links must begin with either https:// or http://.

Git links must begin with git+, and can be suffixed with @BRANCH or #COMMIT, where BRANCH is a commit name and COMMIT is a commit ID.

Comments begin with a #.

Example sources file:

# This is a comment.
https://causal.agency/libretls/libretls-3.3.3p1.tar.gz libretls

# This is a path to a local file:
files/update-certdata.sh

# This is a git link:
git+https://github.com/kisslinux/kiss@dev

# This is a git link, but with a commit ID:
git+https://github.com/kisslinux/kiss#6b41497cc3dda673e5f92f669305bbe391c21f5f

pre-remove

pre-remove is an executable ran before a package is uninstalled, and can be used for doing manual pre-remove steps (or informing the user on how to do them).

Example pre-remove file:

#!/bin/sh

cat <<<EOF
This package (foo) stores very large logs in the directory /var/log/foo.
It is recommended to delete this directory after package removal.
EOF

post-install

post-install is an executable ran after a package is installed; this can be done to print information such as optional dependencies or do mandatory post-install steps.

Example post-install file:

#!/bin/sh -e

cat <<EOF

The commands zcat, unpigz and gunzip were merely symbolic
links to the pigz binary. They have been removed. To gain
them back, create the symlinks (or use an alias or shell
function).

EOF

More information