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.
Before creating the package recipe yourself, please double check that there isn’t already an outstanding PR for the package you want to include. Please also check if someone has created a new package request issue in the AerynOS recipes repository.
Prepare your workspace
Section titled “Prepare your workspace”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.
Scaffold the recipe directory
Section titled “Scaffold the recipe directory”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:
gotoaosrepomkdir -p n/nanocd n/nanoFill the recipe step by step
Section titled “Fill the recipe step by step”The rest of this guide shows how to create a recipe and to replace any missing metadata by pulling information from upstream Nano.
Step 1 - Collect upstream metadata
Section titled “Step 1 - Collect upstream metadata”- Search for “GNU Nano download” to locate the upstream homepage: https://www.nano-editor.org/.
- Note the latest release number (
8.7at the time of writing) and the canonical download link. - Record any prerequisites listed in upstream build instructions—these become candidates for
builddepslater.
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.
boulder recipe update "upstream URL"In the example of Nano, to create a recipe based on version 8.7, you would use the following command:
boulder recipe new https://www.nano-editor.org/dist/v8/nano-8.7.tar.xzThis command does the following:
- Creates a new
stone.yamlin your current directory for the package
- Populates as many of the fields in the
stone.yamlfile as it can automatically identify - Checks the Sha256sum of the source code and inputs this in the recipe
- Creates a new
monitoring.yamlfile in your current directory for the package
- Populates as many of the fields in the
monitoring.yamlfile 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 : nanoversion : 8.7release : 1homepage : https://www.nano-editor.org/dist/v8upstreams : - https://www.nano-editor.org/dist/v8/nano-8.7.tar.xz : afd287aa672c48b8e1a93fdb6c6588453d527510d966822b687f2835f0d986e9summary : UPDATE SUMMARYdescription : | UPDATE DESCRIPTIONlicense : - 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-onlybuilddeps : - pkgconfig(ncurses) - pkgconfig(ncursesw)setup : | %configurebuild : | %makeinstall : | %make_installThe second is a monitoring.yaml file which we will address later in this guide.
Step 2 - Add core metadata fields
Section titled “Step 2 - Add core metadata fields”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.
In this case, the following changes need to be made:
- Correct the
homepagetohttps://www.nano-editor.org/. - Update the
summaryto reflect the GNU Text Editor. - Fill in the
descriptionfield with a brief description of Nano.
name : nanoversion : 8.7release : 1homepage : https://www.nano-editor.org/upstreams : - https://www.nano-editor.org/dist/v8/nano-8.7.tar.xz : afd287aa672c48b8e1a93fdb6c6588453d527510d966822b687f2835f0d986e9summary : GNU Text Editordescription : | 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.Step 3 - Declare / correct the license
Section titled “Step 3 - Declare / correct the license”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.
license : - GPL-3.0-or-laterStep 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)Step 5 · Fill in build steps
Section titled “Step 5 · Fill in build steps”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.
Step 6 · Review the finished recipe
Section titled “Step 6 · Review the finished recipe”Combining all the prior steps gives you a complete stone.yaml:
## SPDX-FileCopyrightText: © 2025- AerynOS Developers## SPDX-License-Identifier: MPL-2.0#name : nanoversion : 8.7release : 1homepage : https://www.nano-editor.org/upstreams : - https://www.nano-editor.org/dist/v8/nano-8.7.tar.xz : afd287aa672c48b8e1a93fdb6c6588453d527510d966822b687f2835f0d986e9summary : GNU Text Editordescription : | 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-laterbuilddeps : - pkgconfig(libmagic) - pkgconfig(ncursesw) - pkgconfig(zlib)setup : | %configurebuild : | %makeinstall : | %make_installUpdate/correct the monitoring.yaml file
Section titled “Update/correct the monitoring.yaml file”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_digestUpdate monitoring.yaml once you know the upstream identifiers:
- Search for the project on https://release-monitoring.org/ and copy the numeric
id. - Add an RSS or Atom feed URL if upstream publishes one; otherwise leave
rss: ~. - 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 feedsecurity: cpe: ~ # Update if upstream changes identifiersBuild and test the package
Section titled “Build and test the package”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.