From 7f9ff36ab3df7845f5abde6b8ed15ad6d744032d Mon Sep 17 00:00:00 2001 From: David Harder Date: Tue, 24 Oct 2023 15:05:50 -0500 Subject: [PATCH] Add checkdeps Add info about checkdeps to the following pages: - packaging changes - package.yml - packaging-practices (just a stub for now) --- docs/packaging/package.yml.md | 32 +++++++++++++-------------- docs/packaging/packaging-changes.md | 4 ++++ docs/packaging/packaging-practices.md | 13 +++++++++++ 3 files changed, 33 insertions(+), 16 deletions(-) diff --git a/docs/packaging/package.yml.md b/docs/packaging/package.yml.md index 1a4eb9d5b..32cf24a3b 100644 --- a/docs/packaging/package.yml.md +++ b/docs/packaging/package.yml.md @@ -63,22 +63,22 @@ Not all fields in `package.yml` are mandatory, but a small selection are. Below ### Optional, supported keys -| Key Name | Type | Description | -| --------------- | ----------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- | -| **clang** | `bool` | Set to `yes` if this package benefits from being built with Clang. | -| **avx2** | `bool` | Set to `yes` if this package benefits from being built with x64-64-v3 | -| **extract** | `bool` | Set to `no` to disable automatic source extraction. | -| **autodep** | `bool` | Set to `no` to disable automatic binary dependency resolution at build time. | -| **emul32** | `bool` | Set to `yes` to enable an `-m32` build (32-bit libs). | -| **libsplit** | `bool` | Set to `no` to disable splitting of libraries into `devel` sub-packages. | -| **conflicts** | `string(s)` | Specify packages that cannot be installed together with this one. | -| **optimize** | `list` | Specify preset keys to modify compiler and linker flags during build. You can learn more [here](/docs/packaging/package.yml#optimize-values). | -| **builddeps** | `list` | Specify build dependencies for the package. You can learn more [here](/docs/packaging/packaging-practices#build-dependencies). | -| **rundeps** | `dict(s)` | Specify further runtime dependencies for the packages. You can learn more [here](/docs/packaging/packaging-practices#runtime-dependencies). | -| **replaces** | `dict(s)` | Replace one package with another, used when renaming or deprecating packages for clean upgrade paths. | -| **patterns** | `dict(s)` | Allows fine grained control over file placement within the package or sub-packages. Useful for packages that are development only (i.e. `/usr/bin` files). | -| **environment** | `unicode` | Specify code that will be exported to all packaging steps of the build (i.e. exporting variables for the entire build). | -| **networking** | `bool` | Set to `yes` to enable networking within solbuild. | + Key Name | Type | Description | +| --------------- | ----------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| **clang** | `bool` | Set to `yes` if this package benefits from being built with Clang. | +| **extract** | `bool` | Set to `no` to disable automatic source extraction. | +| **autodep** | `bool` | Set to `no` to disable automatic binary dependency resolution at build time. | +| **emul32** | `bool` | Set to `yes` to enable an `-m32` build (32-bit libs). | +| **libsplit** | `bool` | Set to `no` to disable splitting of libraries into `devel` sub-packages. | +| **conflicts** | `string(s)` | Specify packages that cannot be installed together with this one. | +| **optimize** | `list` | Specify preset keys to modify compiler and linker flags during build. You can learn more [here](/docs/packaging/package.yml#optimize-values). | +| **builddeps** | `list` | Specify build dependencies for the package. You can learn more [here](/docs/packaging/packaging-practices#build-dependencies). | +| **rundeps** | `dict(s)` | Specify further runtime dependencies for the packages. You can learn more [here](/docs/packaging/packaging-practices#runtime-dependencies). | +| **checkdeps** | `dict(s)` | Specify build dependencies for the package which will _not_ be considered when determining build order for automatic builds. These dependencies should only be used during the `check` build phase. You can learn more [here](/docs/packaging/packaging-practices#check-dependencies) | +| **replaces** | `dict(s)` | Replace one package with another, used when renaming or deprecating packages for clean upgrade paths. | +| **patterns** | `dict(s)` | Allows fine grained control over file placement within the package or sub-packages. Useful for packages that are development only (i.e. `/usr/bin` files). | +| **environment** | `unicode` | Specify code that will be exported to all packaging steps of the build (i.e. exporting variables for the entire build). | +| **networking** | `bool` | Set to `yes` to enable networking within solbuild. | ### Packaging Step Keys, optional diff --git a/docs/packaging/packaging-changes.md b/docs/packaging/packaging-changes.md index 6f3c2e63c..257bb07fa 100644 --- a/docs/packaging/packaging-changes.md +++ b/docs/packaging/packaging-changes.md @@ -15,6 +15,10 @@ This page is meant to serve as a changelog of sorts for the Solus packaging envi ### October +#### Adding `checkdeps` in `package.yml` + +- A new type of packaging dependency was added: `checkdeps`. They behave the same as `builddeps`, except they are not considered when determining build order for automatic builds. See the [package.yml page](/docs/packaging/package.yml). + #### Git hooks - Run `go-task init` to initialize Git hooks for the packages repository. See [Prepare for packaging](prepare-for-packaging.md#initialize-git-hooks). diff --git a/docs/packaging/packaging-practices.md b/docs/packaging/packaging-practices.md index c8bfc3d43..b5bd265de 100644 --- a/docs/packaging/packaging-practices.md +++ b/docs/packaging/packaging-practices.md @@ -239,6 +239,19 @@ rundeps: - someotherpackage ``` +## Check dependencies + +_TODO This is a stub for now_ + +Check dependencies are a special kind of build dependency reserved for automatic package testing by `solbuild`. Check dependencies should only be used during the `check` build phase. +When a package is part of an automatic build sequence, these dependencies will **not** be considered when determing build order. + +### Example + +The package `cbindgen` includes `cython` in `checkdeps` to run tests in the `check` phase. + +[cbindgen package.yml file](https://github.com/getsolus/packages/blob/main/packages/c/cbindgen/package.yml) + ## Patching / extra files Files that may be required during the build can be accessed via the `$pkgfiles` variable. Note that you must store your files in the `./files` directory relative to your `package.yml`