Commit 7aebc2b9 authored by Julian Wiesener's avatar Julian Wiesener

added README.rst

parent cf83ac00
=============================
Uplex varnish debian packages
=============================
This Repository contains meta data for building Debian packages as well as scripts to do it automatically. The meta data should be usable with other build systems, without changes and will be improved over time.
The build scripts require a working sbuild setup for the given target distribution/architecture as well as an aptly repository. The scripts will always build from git repositories which will be updated to the current remote master unless the package is configured otherwise.
Building packages
-----------------
The example assume you've added the *./bin* sub directory to your *PATH*.
Building all packages defined in *dpkg/build_dpkg.list* for all architectures defined in *dpkg/build_dist.list* run:
::
buildall
To build a single package (*varnish* for example) for the default target run:
::
builddpkg varnish
Once build, you'll find the binary package in *build/archive/VERSION/distribution*.
By default the current date will be used as version number for each package unless it has been set explicitly in *dpkg/PKGNAME/overrides*. Package version, target distribution and architecture can be changed by setting environment-variables, for example:
::
DEBRELEASE=trusty VERSION=20180910 ARCH=i386 builddpkg varnish
Note that the commit/tag/branch that will be build will not be affected by the *VERSION* variable but overrides will allow you to manually build a vmod with a package version that matches that of varnish on a later date.
Adding packages
---------------
To create a new package based on *dpkg/template_vmod* run:
::
newdpkg pkgname
This will create a new directory *dpkg/pkgname* which contains a *debian* sub directory which contains the debian package meta data. If you don't want to use the template and copy the debian sub directory from an other source instead, you can just use *mkdir* instead of *newpkg*.
If you want the package automatically build by *buildall*, you need to add it to the *dpkg/build_dpkg.list* file.
At the first *builddpkg* run, the git repository will be checked out inside the *./build* sub directory. If you want to checkout a repository that differs from that in the *dpkg/PKGNAME/debian/control* file, you can just do the checkout manually. Once the directory is there, it will only be updated, the remote will not be changed. If there is no git remote, you can use overrides to change the commands that update the repository.
build_dpkg.list
---------------
The file *dpkg/build_dpkg.list* contains a list of packages that will be build by the *buildall* script. The packages are build in the order they appear, parallelisation might be added in the future. There is a special marker *__push_repo* that will trigger pushing the packages that has been build before to the aptly repo. If your package depends *varnish* for example, you'll need to add it after the first *__push_repo* that follows *varnish*. There should always be a *__push_repo* entry at the end, unless you want to build packages that are not being pushed to the repository.
::
varnish
__push_repo
dcs-classifier
libvmod-blobdigest
libvmod-blobsynth
libvmod-geoip2
libvmod-re
varnish-modules
libvmod-re2
libvmod-dispatch
libvmod-hoailona
__push_repo
overrides
---------
The dpkg/PKGNAME/overrides file can be created to override defaults such as a specific git tag you want to build.
To checkout tag 1.2.3 instead of master, add a line:
::
GIT_CHEKOUT=1.2.3
To make the package version 1.2.3 instead of the current date, add:
::
VERSION=1.2.3
If the repository directory does not match the package name, add:
::
SRCDIR=varnish-cache
You can add additional environment variables that changes the behavior of the sbuild environment:
::
LOCAL_BUILD_OPTIONS=test
You can override the checkout command if there is no git repository available:
::
GIT_FETCH="git svn fetch"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment