Skip to content

Creating a new package recipe

This guide details the process of creating a new package recipe that is not yet present in the aerynOS repository. We will use Nano as the running example, but the same steps apply to any new package.

Prior to starting, ensure you have followed the prerequisites set up process, the Basic Packaging Workflow and updated your system in accordance with Preparing for Packaging guide.

If you have not done this, follow those steps first before proceeding.

Prior to starting, you need to create the directory structure for your recipe. In our example, we will create a recipe for the Nano text editor. Each recipe is stored in its own directory within the recipes repository you already have downloaded to your computer. In this case, we will create a directory called nano in the n directory:

Terminal window
gotoaosrepo
mkdir -p n/nano
cd n/nano

The rest of this guide shows how to create a recipe and to replace any missing metadata by pulling information from upstream Nano.

  • Search for “GNU Nano download” to locate the upstream homepage: https://www.nano-editor.org/.
  • Note the latest release number (8.7 at the time of writing) and the canonical download link.
  • Record any prerequisites listed in upstream build instructions—these become candidates for builddeps later.

The Nano “bleeding edge” page lists the following tools you should keep in mind:

Package Minimum Version
autoconf 2.69
automake 1.14
autopoint 0.20
gcc 5.0
gettext 0.20
git 2.7.4
groff 1.12
make (any version)
pkg-config 0.22
texinfo 4.0

Step 1 - Use boulder to help create the recipe

Section titled “Step 1 - Use boulder to help create the recipe”

We use boulder to help create the recipe using the boulder recipe new command. This command will generate a skeleton recipe for you to fill in. boulder will read the contents of the source code of the package you are trying to add and automatically create a stone.yaml recipe file and a monitoring.yaml file.

Terminal window
boulder recipe new "upstream URL"

In the example of Nano, to create a recipe based on version 8.7, you would use the following command:

Terminal window
boulder recipe new https://www.nano-editor.org/dist/v8/nano-8.7.tar.xz

This command does the following:

  1. Creates a new stone.yaml in your current directory for the package
  • Populates as many of the fields in the stone.yaml file as it can automatically identify
  • Checks the Sha256sum of the source code and inputs this in the recipe
  1. Creates a new monitoring.yaml file in your current directory for the package
  • Populates as many of the fields in the monitoring.yaml file as it can automatically identify

Using Nano as an example, the generated stone.yaml file will look like this:

# SPDX-FileCopyrightText: 2025 aerynOS Developers
# SPDX-License-Identifier: MPL-2.0
name : nano
version : "8.7"
release : 1
homepage : https://www.nano-editor.org/dist/v8
upstreams :
- https://www.nano-editor.org/dist/v8/nano-8.7.tar.xz : afd287aa672c48b8e1a93fdb6c6588453d527510d966822b687f2835f0d986e9
summary : UPDATE SUMMARY
description : |
UPDATE DESCRIPTION
license :
- GFDL-1.2-invariants-or-later
- GFDL-1.2-no-invariants-or-later
- GFDL-1.2-or-later
- GPL-3.0-or-later
- GFDL-1.2-no-invariants-only
- GFDL-1.2-invariants-only
- GFDL-1.2-only
- GPL-3.0-only
builddeps :
- pkgconfig(ncurses)
- pkgconfig(ncursesw)
setup : |
%configure
build : |
%make
install : |
%make_install

The second is a monitoring.yaml file which we will address later in this guide.

The boulder recipe new command has already made an attempt to populate the name, version, release and homepage. Please review these and correct them if necessary. Always quote version. Tooling reads it as text naming the upstream version. The number you bump for a new build is release.

In this case, the following changes need to be made:

  • Correct the homepage to https://www.nano-editor.org/.
  • Update the summary to reflect the GNU Text Editor.
  • Fill in the description field with a brief description of Nano.
name : nano
version : "8.7"
release : 1
homepage : https://www.nano-editor.org/
upstreams :
- https://www.nano-editor.org/dist/v8/nano-8.7.tar.xz : afd287aa672c48b8e1a93fdb6c6588453d527510d966822b687f2835f0d986e9
summary : GNU Text Editor
description : |
Nano is a small and simple text editor for use on the terminal.
It copied the interface and key bindings of the Pico editor but
added several missing features: undo/redo, syntax highlighting,
line numbers, softwrapping, multiple buffers, selecting text by
holding Shift, search-and-replace with regular expressions, and
several other conveniences.

The Nano example above uses a release archive. This is the preferred way to package software. When upstream does not publish an archive, you can use a git tag instead. Use a git commit only when you need a revision that is not a tagged release. Please use a tag or a commit id. Branch names can change and break later builds.

To use a tag, prefix the repository URL with git| and set the value to the tag name. Keep version as the quoted release number.

version : "1.2.3"
upstreams :
- git|https://github.com/example/project.git : v1.2.3

To use a commit, set the value to the full commit id. Set version to the upstream release that commit follows, then ~git. and the first 7 characters of that commit id.

version : "1.2.3~git.aabbccd"
upstreams :
- git|https://github.com/example/project.git : aabbccddeeff00112233445566778899aabbccdd

You can copy the commit id from the commit page on the project’s website. From a local clone, you can also run:

Terminal window
git rev-parse HEAD
git rev-parse --short=7 HEAD

Find the license in upstream’s repository (often COPYING, LICENSE, or package metadata). Convert it to an SPDX identifier.

Nano uses GPL-3.0-or-later. When a package has only one license, write it on a single line:

license : GPL-3.0-or-later

When it has more than one license, list each identifier:

license :
- GPL-3.0-or-later
- LGPL-2.1-or-later

Step 4 - Translate prerequisites into build dependencies

Section titled “Step 4 - Translate prerequisites into build dependencies”

Map each upstream requirement to the package name that exists in aerynOS. Use pkg-config() helpers when libraries provide .pc files. Toolchain components like gcc and make are already available inside the build environment, so you do not have to list them.

Upstream prerequisite Recipe build dependency
ncurses pkgconfig(ncursesw)
zlib pkgconfig(zlib)
libmagic pkgconfig(libmagic)
autoconf, automake already provided by the sandbox

Add them to builddeps:

builddeps :
- pkgconfig(libmagic)
- pkgconfig(ncursesw)
- pkgconfig(zlib)

Nano follows the GNU autotools flow, so uses the standard macros (%configure, %make, %make_install). These have already been populated by boulder recipe new so do not need to be adapted. You can consult the macros documentation for variations and additional guidance.

Combining all the prior steps gives you a complete stone.yaml:

# SPDX-FileCopyrightText: 2025 aerynOS Developers
# SPDX-License-Identifier: MPL-2.0
name : nano
version : "8.7"
release : 1
homepage : https://www.nano-editor.org/
upstreams :
- https://www.nano-editor.org/dist/v8/nano-8.7.tar.xz : afd287aa672c48b8e1a93fdb6c6588453d527510d966822b687f2835f0d986e9
summary : GNU Text Editor
description : |
Nano is a small and simple text editor for use on the terminal.
It copied the interface and key bindings of the Pico editor but
added several missing features: undo/redo, syntax highlighting,
line numbers, softwrapping, multiple buffers, selecting text by
holding Shift, search-and-replace with regular expressions, and
several other conveniences.
license :
- GPL-3.0-or-later
builddeps :
- pkgconfig(libmagic)
- pkgconfig(ncursesw)
- pkgconfig(zlib)
setup : |
%configure
build : |
%make
install : |
%make_install

Release monitoring keeps automated eyes on your package. More details around our monitoring file can be found on our Monitoring page.

As mentioned earlier in this guide, the boulder recipe new command has already attempted to create a monitoring.yaml file for you.

In the case of Nano, it wasn’t able to uniquely identify the project so the output was not as valuable and needs to be corrected.

For reference, its output is as below:

releases:
id: ~ # https://release-monitoring.org/ and use the numeric id in the url of project
rss: ~
security:
cpe:
- vendor: gnu
product: nano
- vendor: nano_arena_project
product: nano_arena
- vendor: viz
product: nano_id
- vendor: lenovo
product: thinkpad_x1_nano_gen_1_firmware
- vendor: nvidia
product: jetson_nano
- vendor: lenovo
product: thinkpad_x1_nano_gen_2_firmware
- vendor: lenovo
product: thinkpad_x1_nano_gen_2
- vendor: lenovo
product: thinkpad_x1_nano_gen_1
- vendor: nxp
product: mifare_ultralight_nano_firmware
- vendor: jtekt
product: nano_cpu_tuc-6941_firmware
- vendor: jtekt
product: nano_10gx_tuc-1157_firmware
- vendor: autelrobotics
product: evo_nano_drone_firmware
- vendor: jtekt
product: nano_safety_rs01ip_tuu-1087
- vendor: jtekt
product: nano_safety_rs00ip_tuu-1086
- vendor: netshieldcorp
product: nano_25_firmware
- vendor: ledger
product: nano_x_firmware
- vendor: ledger
product: nano_s_firmware
- vendor: jtekt
product: nano_cpu_firmware
- vendor: jtekt
product: nano_2et_firmware
- vendor: jtekt
product: nano_10gx_firmware
- vendor: nxp
product: mifare_ultralight_nano
- vendor: nxp
product: i.mx_8m_nano
- vendor: nvidia
product: jetson_nano_2gb
- vendor: jtekt
product: nano_safety_tuc-1085
- vendor: jtekt
product: nano_cpu_tuc-6941
- vendor: jtekt
product: nano_2et_tuu-6949
- vendor: jtekt
product: nano_10gx_tuc-1157
- vendor: autelrobotics
product: evo_nano_drone
- vendor: netshieldcorp
product: nano_25
- vendor: ledger
product: nano_x
- vendor: ledger
product: nano_s
- vendor: jtekt
product: nano_cpu
- vendor: jtekt
product: nano_2et
- vendor: jtekt
product: nano_10gx
- vendor: magzter
product: nano_digest

Update monitoring.yaml once you know the upstream identifiers:

  1. Search for the project on https://release-monitoring.org/ and copy the numeric id.
  2. Add an RSS or Atom feed URL if upstream publishes one; otherwise leave rss: ~.
  3. Check the National Vulnerability Database for a CPE string (https://nvd.nist.gov/products/cpe/search). If none exists, leave it as ~.

Using this information we can correctly identify the id as 2046 and that there is no rss feed or cpe string. The monitoring.yaml file should look like this:

releases:
id: 2046 # Release Monitoring ID for nano
rss: ~ # Replace when upstream publishes a feed
security:
cpe: ~ # Update if upstream changes identifiers

Once you have made the relevant changes to the package, you will need to build it locally. Refer to the Building and Testing packages page on guidance of how to do this.

When the package is ready, commit it on its own. aerynOS requires one commit per package. See Using git and Submitting a PR for the commit workflow and message format.