# Add A Den Package Use this guide when adding a Den-owned conda package to the system generation. Recipe changes happen in the `den-os/den-forge` checkout; this page focuses on the Den rootfs and smoke-test integration points. See the [`den-forge` docs](https://github.com/den-os/den-forge/blob/main/docs/index.md) for package-forge maintainer commands. ## Add The Recipe Work from the `den-forge` checkout and create a directory under `recipes/`: ```text recipes/den-example/ ``` Add at least: ```text recipes/den-example/recipe.yaml recipes/den-example/build.sh ``` Keep package payloads under `$PREFIX`. A conda package should not assume that it can write directly to the root filesystem. ## Project Rootfs Files If the package must provide rootfs files such as `/etc` content, install them under: ```text $PREFIX/share/den/rootfs-files.d//rootfs ``` Optional modes go in: ```text $PREFIX/share/den/rootfs-files.d//modes ``` Mode lines use: ```text 0600 /etc/shadow ``` ## Project Rootfs Links If the package must provide root-level symlinks, install a manifest under: ```text $PREFIX/share/den/rootfs-links.d/.links ``` These manifests are applied by `den image assemble-rootfs`. Prefer links through `/run/current-system/sw` for paths that should change when the active generation changes. ## Add The Dependency Add the package to `conda.toml`, usually in: ```toml [feature.system.target.linux-aarch64.dependencies] den-example = "0.1.*" ``` ## Build And Check Render recipes: ```bash cd ../den-forge den forge recipes render ``` Build local packages and update the local channel index: ```bash den forge recipes build ``` Then run the rootfs smoke from the Den OS repo, pointing it at the forge local channel: ```bash cd ../den DEN_PACKAGE_CHANNEL="file://$(cd ../den-forge && pwd)/build/conda" ct run lock ct run smoke ``` Run boot smoke if the package affects boot, systemd, loader paths, rootfs layout, or generation switching: ```bash ct run image-bundle-smoke ``` ## Build Numbers Bump the recipe build number whenever package contents change. Otherwise conda can reuse an older local artifact from `build/conda`.