solbuild is a
chroot based package build system, used to safely and efficiently build Solus packages from source, in a highly controlled and isolated environment. This tool succeeds the
evobuild tool, originally in Evolve OS, which is now known as Solus. The very core concept of the layered builder has always remained the same, this is the next .. evolution.. of the tool.
solbuild makes use of
OverlayFS to provide a simple caching system, whereby a base image (provided by the Solus project) is used as the bottom-most, read-only layer, and changes are made in temporary upper layers. Currently the project provides two base images for the default profiles shipped with
- main-x86_64: Built using the stable Solus repositories, suitable for production deployments for
- unstable-x86_64: Built using the unstable Solus repositories, ideal for developers, and the Solus build machinery for the repo waterfall prior to
package.yml files (ypkg), the tool will also disable all networking within the environment, apart from the loopback device. This is intended to prevent uncontrolled build environments in which a package may be fetching external, unverified sources, during the build.
solbuild also allows developers to control the repositories used by configuring the profiles:
- Remove any base image repo
- Add any given repo, remote or local. Local repos are bind mounted and can be automatically indexed by
solbuild performs heavy caching throughout, with source archives being stored in unique hash based directories globally, and the
ccache being retained after each build through bind mounts. A single package cache is retained to speed up subsequent builds, and users may speed this up further by updating their base images.
As a last speed booster,
solbuild allows you to perform builds in memory via the
solbuild is designed in such a way that you do not need to be running Solus. You can build packages for Solus from any compatible host.
solbuild is a Solus project.
sudo eopkg up sudo eopkg it solbuild # If you only ever want to use the unstable repo by default sudo eopkg it solbuild-config-unstable
git clone https://github.com/solus-project/solbuild.git cd solbuild make ensure_modules make sudo make install
You may wish to use the provided tarballs, which include vendored dependencies. Distributions are free to nuke the src/vendor directory from the distributed tarball and use their own golang dependencies if appropriate.
Initialising the root
Run the following command to fetch and install the base image. If you wish
to change the profile, use the
-p flag (
-u flag will automatically update the image.
sudo solbuild init -u
Updating the image
# Update the default profile sudo solbuild update # Update a specific profile sudo solbuild update unstable-x86_64
# Build the first package found in the current directory sudo solbuild build # Build a specific path sudo solbuild build ../mypackages/package.yml # Build for unstable profile sudo solbuild -p unstable-x86_64 build
solbuild help command for more details, or
- golang (tested with 1.7.4)
gitat runtime for submodules)
Your kernel must support the
Git is required as
solbuild supports the
git| source type of ypkg files. Additionally,
solbuild will try to generate a package changelog from the git history where the YPKG file is found. This is used within Solus to create a changelog dynamically from the git tags, and automatically marking security updates, etc.
Copyright © 2016-2017 Solus Project
solbuild is available under the terms of the Apache-2.0 license
Help us keep the lights on
v1.4.2 - Nov 21, 2017
Minor maintenance update
- Add new
- Default to en_US.utf8 locale to resolve issues with
- Improve portability with non-Solus distros (Manjaro, etc)
- Improve reproducible builds by locking timestamp changes purely to version change events (not package bumps)
v1.4.1 - Oct 6, 2017
- Fix broken test suite
- Rebase on libgit2 v26 ABI
v1.4 - Sep 21, 2017
A minor release to solbuild, introducing new experimental support for ferryd.
--transit-manifest option (private to build systems) when set, will emit a
.tram transit manifest file with the target set to the specified argument.
This file is used to provide an accompanying payload description to ferryd for payload validation.
v1.3.3 - May 27, 2017
- Fix history sorting bug for missing changelog entries in builds
v1.3.2 - May 12, 2017
- Switch to CURL for reliable FTP source handlig
- Be more verbose with
- Resolve history encoding issues for Solus SC by using
CDATAfor the git logs embedded into the packages