# README.source for Vinyl Cache

## How to package a new upstream release

```sh
git switch upstream
git pull
# note the version number which is being packaged
VER="$(git describe --tags --abbrev=0 | sed -re 's/^vinyl-cache-//')"
echo $VER

git switch debian/unstable
gbp import-ref -u $VER
gbp export-orig

git rev-list -n 1 vinyl-cache-$VER > debian/vcs_version
git add debian/vcs_version
git commit -m "debian/vcs_version: update for $VER"

dch -v $VER-1 'New upstream release.'
```

**BEWARE**: `debian/vcs_version` (the git hash used to build the strict
Varnish ABI string) MUST be updated every time the Varnish version
number changes, even if the actual ABI was not actually changed, because
the complete Varnish ABI string (`VMOD_ABI_Version`) that is compared by
Varnish when loading a vmod contains both the version number and the git
commit hash (see `vcc_ParseJSON()` in `lib/libvcc/vcc_vmod.c`).

## How to investigate test failures

Download the most recent build logs for all architectures:

```sh
getbuildlog varnish last-all
```

Delete:
- Hurd, which is not supported
- the very slow architectures on which tests are always disabled on the build daemons
- any architecture for which way too many tests failed, probably because of timeouts
- the architectures for which no tests failed

```sh
rm -fv varnish_*_hurd-*.log $(grep -l DEB_BUILD_OPTIONS=nocheck *)

egrep -c '^FAIL ' *.log | sort -t: -k2 | egrep -v ':0$'
egrep -c '^FAIL ' *.log | egrep ':0$'
```

Show all failing tests. Are some tests failing on all architectures, or
on an obvious subset?

```sh
egrep '^FAIL ' *.log | sort -k2
cat *.log | egrep '^FAIL ' | sort | uniq -c | sort -rn
```

https://wiki.debian.org/ArchitectureSpecificsMemo may help to find out
if there are common specificities among the failing architectures.

<!--
vim: syntax=markdown
-->
