Commit 15e52b93 authored by Geoff Simmons's avatar Geoff Simmons

Set version 1.5.0, and add RPM packaging for Varnish 6.5.1.

parent e1e6bf43
AC_PREREQ(2.59)
AC_COPYRIGHT([Copyright (c) 2016 UPLEX - Nils Goroll Systemoptimierung])
AC_INIT([libvmod-blobdigest], [1.1])
AC_INIT([libvmod-blobdigest], [1.5.0], [varnish-support@uplex.de], [vmod-blobdigest])
AC_CONFIG_MACRO_DIR([m4])
m4_ifndef([VARNISH_VMOD_INCLUDES], AC_MSG_ERROR([Need varnish.m4 -- see README.rst]))
AC_CONFIG_SRCDIR(src/vmod_blobdigest.vcc)
......
#! /bin/bash -ex
# Build script for a VMOD blobdigest el7 RPM
# to be run in the rpmbuild/centos7 docker container.
# Env variables VERSION and RELEASE MUST be set in the docker invocation.
# DIST is set by the rpmbuild/centos7 container.
# The directory mounted to /srv MUST contain these files:
# - this script (named pkg)
# - VMOD blobdigest tarball (vmod-blobdigest-$VERSION.tar.gz)
# - RPM spec file (vmod-blobdigest.spec)
# - yum repo config for varnish65@packagecloud (varnishcache_varnish65.repo)
# (see https://packagecloud.io/varnishcache/varnish65/install#manual-rpm)
# Sample docker invocation:
# $ docker run -t -v $PWD:/srv -e VERSION=47.1.1 -e RELEASE=815 \
# rpmbuild/centos7 /srv/pkg
# At the end of the run, binary, source and debuginfo RPMs are in the
# directory mounted to /srv.
if [ -z $VERSION ]; then
echo "Env variable VERSION MUST be set"
exit 1
fi
if [ -z $RELEASE ]; then
echo "Env variable RELEASE MUST be set"
exit 1
fi
# delete the peculiar macros from the rpmbuild/centos7 image
rm /home/builder/.rpmmacros
# set up the build environment
cd /home/builder
mkdir -p rpmbuild/{BUILD,BUILDROOT,RPMS,SOURCES,SPECS,SRPMS}
cp /srv/vmod-blobdigest.spec rpmbuild/SPECS
cp /srv/vmod-blobdigest-${VERSION}.tar.gz rpmbuild/SOURCES
# install epel7 repo
sudo yum install -y -q epel-release
# set up varnish repo
sudo cp /srv/varnishcache_varnish65.repo /etc/yum.repos.d/
sudo yum -q makecache -y fast
# build requirements
sudo yum install -y -q varnish-devel pkgconfig make gcc python-docutils
# build RPMs
rpmbuild -ba -D "dist .${DIST}" \
-D "_version ${VERSION}" \
-D "_release ${RELEASE}" \
rpmbuild/SPECS/vmod-blobdigest.spec
sudo cp rpmbuild/RPMS/*/* /srv
sudo cp rpmbuild/SRPMS/* /srv
[varnishcache_varnish65]
name=varnishcache_varnish65
baseurl=https://packagecloud.io/varnishcache/varnish65/el/7/$basearch
repo_gpgcheck=1
gpgcheck=0
enabled=1
gpgkey=https://packagecloud.io/varnishcache/varnish65/gpgkey
sslverify=1
sslcacert=/etc/pki/tls/certs/ca-bundle.crt
metadata_expire=300
[varnishcache_varnish65-source]
name=varnishcache_varnish65-source
baseurl=https://packagecloud.io/varnishcache/varnish65/el/7/SRPMS
repo_gpgcheck=1
gpgcheck=0
enabled=1
gpgkey=https://packagecloud.io/varnishcache/varnish65/gpgkey
sslverify=1
sslcacert=/etc/pki/tls/certs/ca-bundle.crt
metadata_expire=300
# -D MUST pass in _version and _release, and SHOULD pass in dist.
Summary: Varnish VMOD for digests, checksums and hmacs for the VCL blob type
Name: vmod-blobdigest
Version: %{_version}
Release: %{_release}%{?dist}
License: BSD
Group: System Environment/Daemons
URL: https://code.uplex.de/uplex-varnish/libvmod-blobdigest
Source0: %{name}-%{version}.tar.gz
# varnish from varnish65 at packagecloud
Requires: varnish = 6.5.1
BuildRequires: varnish-devel = 6.5.1
BuildRequires: pkgconfig
BuildRequires: make
BuildRequires: gcc
BuildRequires: python-docutils >= 0.6
# git builds
#BuildRequires: automake
#BuildRequires: autoconf
#BuildRequires: autoconf-archive
#BuildRequires: libtool
#BuildRequires: python-docutils >= 0.6
Provides: vmod-blobdigest, vmod-blobdigest-debuginfo
%description
VMOD blobdigest is a Varnish Module for generating message digests,
keyed-hash message authentication codes (HMACs) and checksums using
the Varnish Configuration Language (VCL) data type BLOB, which may
contain arbitrary data of any length.
%prep
%setup -q -n %{name}-%{version}
%build
# if this were a git build
# ./autogen.sh
%configure
make -j
%check
make -j check
%install
make install DESTDIR=%{buildroot}
# Only use the version-specific docdir created by %doc below
rm -rf %{buildroot}%{_docdir}
# None of these for fedora/epel
find %{buildroot}/%{_libdir}/ -name '*.la' -exec rm -f {} ';'
find %{buildroot}/%{_libdir}/ -name '*.a' -exec rm -f {} ';'
%clean
rm -rf %{buildroot}
%files
%defattr(-,root,root,-)
%{_libdir}/varnish*/vmods/
%{_mandir}/man3/*.3*
%doc README.rst COPYING LICENSE
%post
/sbin/ldconfig
%changelog
* Thu Dec 31 2020 Geoff Simmons <geoff@uplex.de> - 1.5.0-1
- Update for Varnish 6.5.1
* Fri Feb 21 2020 Geoff Simmons <geoff@uplex.de> - 1.3.2-1
- Update for Varnish 6.3.2
* Mon Oct 21 2019 Geoff Simmons <geoff@uplex.de> - 1.3.1-1
- Update for Varnish 6.3.1
- Strictly require the Varnish version, since the VMOD is $ABI strict
* Tue Oct 8 2019 Geoff Simmons <geoff@uplex.de> - 1.3.0-1
- Require VRT 10.0, compatible with Varnish 6.3
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