Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add checkdeps #418

Merged
merged 1 commit into from
Jan 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .cspell-allowed-words.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,11 @@ builddeps
caddyfile
caja
cangjie
cbindgen
centrino
cflags
changeme
checkdeps
chipsets
chrooted
chrooting
Expand All @@ -48,6 +50,7 @@ confopts
cran
cryptsetup
cxxflags
cython
datacenter
datagrip
dbus
Expand Down
32 changes: 16 additions & 16 deletions docs/packaging/package.yml.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 4 additions & 0 deletions docs/packaging/packaging-changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).
Expand Down
13 changes: 12 additions & 1 deletion docs/packaging/packaging-practices.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ Note the same static archive rules apply to `32bit` packages. These packages are

### The utils subpackage

This is not an automatic subpackage, you must use `patterns` to utilise it. It is provided for instances that it may not be suitable to have binaries present, i.e. for a library package.
This is not an automatic subpackage, you must use `patterns` to utilize it. It is provided for instances that it may not be suitable to have binaries present, i.e. for a library package.

## Maintenance

Expand Down Expand Up @@ -239,6 +239,17 @@ rundeps:
- someotherpackage
```

## Check dependencies

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 determining 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`
Expand Down