https://github.com/linbit/saas
Spatch As A Service
https://github.com/linbit/saas
Last synced: about 1 year ago
JSON representation
Spatch As A Service
- Host: GitHub
- URL: https://github.com/linbit/saas
- Owner: LINBIT
- License: gpl-3.0
- Created: 2019-09-26T15:08:13.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2024-12-09T12:13:03.000Z (over 1 year ago)
- Last Synced: 2025-04-02T19:11:28.911Z (about 1 year ago)
- Language: Go
- Size: 44.9 KB
- Stars: 4
- Watchers: 8
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# saas - Spatch As A Service
Starting from DRBD kernel module version 9.0.20 we use [spatch](http://coccinelle.lip6.fr/) to generate
compatibility patches that are required to build the kernel module on a host machine. Older kernels need
different and more patches than new ones as we try to use latest Linux upstream features as our base line in
DRBD.
While using `spatch` makes maintenance a lot easier, it slightly complicates things for users just trying to
compile one of our release-tarballs on their machine.
Our tarballs ship with a wide range of pre-generated patches, but we can never build for everybody (e.g.,
locally patched kernels, distribution kernels of distributions we don't build for in the first place,...).
Additionally, `spatch` is a beast on its own. As of now we require a very current version that is not packaged
in any distribution, and even if, we actually don't like to force a ton of OCaml dependencies on everybody
trying to build a release-tarball.
This is where `saas` comes into the picture. It is a web service, hosted by [LINBIT](https://www.linbit.com),
that takes as input a "DRBD tarball version", and a "compat.h" (which describes the capabilities of your
kernel). From that, it generates a patch with `spatch`, and returns it.
## API
For the regular user, this is handled transparently by our `Makefile`s. A manual call looks similar to this:
```
curl -d "$(cat compat.h | base64 -)" -X POST http://localhost:8080/api/v1/spatch/9.0.20-0rc2
```