How to implement build verification process for GPL compliance

Viewed 32

We provide our customers open source library with our fixes in binary and source code form. According to GPL, we should provide compilation scripts and modifications to the source code.
Build script logic: install required packages, clone git repository, apply patches and build it. The customer should be able to do the same on clean Ubuntu image.

How to implement verification process which uses our scripts/sources and runs it?
Should I use VM and revert the state each time when verify the build?
Should I use some docker image or something else.

1 Answers

If you have docker available, you can use a linux image and a build script. Assuming you already have a working base image, you can run your build script with docker run, for example something like

docker run -i --rm --entrypoint /bin/sh mycontainer < myscript

where mycontainer is your container name, and myscript is path to your build script (which installs dependencies and builds your application), and --rm is specified to clean up the instance after exit. The script is provided via stdin in this example, but you could include it in your container and run it directly.

If you use github or gitlab CI, you can add the automatic build to a pipeline job to automatically run it on git commits (for example every time master branch is updated). If you have docker images already configured, you only need to add a job to the CI system.

Related