Local Package Building
This guide covers how to build Garden Linux packages locally using the package-build tools.
Prerequisites
- Git installed on your system
- Sufficient disk space for builds
- Access to the Garden Linux package repositories
Build Process
1. Clone the package-build repository
bash
git clone https://github.com/gardenlinux/package-build.git2. Clone the target package repository
Choose the package you want to build and clone its repository. For example, to build iproute2:
bash
git clone https://github.com/gardenlinux/package-iproute2.git3. Run the build script
Execute the build script from the package-build repository, passing your package directory as an argument:
bash
./package-build/build package-iproute2INFO
If your package build depends on other custom build packages, you can provide the --build-dependencies flag with a directory containing the .deb files of build-time dependencies.
Build Artifacts
The build artifacts (.deb files and others) are placed in a .build directory within your package repository. For example: ./package-iproute2/.build/.
Build Options
The build script supports several options to customize the build process:
--arch amd64: Specify the architecture to build (default:amd64, choices:amd64,arm64)--source-only: Build only the source archive--binary-only: Build only the binary archives--leave-artifacts: Create the sources folder and keep them in apackage-XYZ/output/run_<date_time>folder of the localpackage-XYZdirectory--build-dependencies: Path to a directory containing.debfiles to be used as build-time dependencies--edit: Spawn a gardenlinux/repo-debian-snapshort container withpackage-XYZ/outputmounted, quilt installed and configured