Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
libvmod-dispatch
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
uplex-varnish
libvmod-dispatch
Commits
73786bf5
Commit
73786bf5
authored
Oct 08, 2019
by
Geoff Simmons
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add RPM packaging.
parent
b1324423
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
178 additions
and
0 deletions
+178
-0
pkg
pkg/rpm/pkg
+76
-0
varnishcache_varnish63.repo
pkg/rpm/varnishcache_varnish63.repo
+21
-0
vmod-dispatch.spec
pkg/rpm/vmod-dispatch.spec
+81
-0
No files found.
pkg/rpm/pkg
0 → 100755
View file @
73786bf5
#! /bin/bash -ex
# Build script for a VMOD dispatch 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 dispatch tarball (vmod-dispatch-$VERSION.tar.gz)
# - RPM spec file (vmod-dispatch.spec)
# - yum repo config for varnish63@packagecloud (varnishcache_varnish63.repo)
# (see https://packagecloud.io/varnishcache/varnish63/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-dispatch.spec rpmbuild/SPECS
cp
/srv/vmod-dispatch-
${
VERSION
}
.tar.gz rpmbuild/SOURCES
# install epel7 repo
sudo
yum
install
-y
-q
epel-release
# set up varnish repo
sudo cp
/srv/varnishcache_varnish63.repo /etc/yum.repos.d/
sudo
yum
-q
makecache
-y
fast
# build requirements (cf. Requires for varnish-src.rpm)
sudo
yum
install
-y
-v
varnish-devel pkgconfig make gcc python-docutils
\
yum-utils python3-sphinx jemalloc-devel libedit-devel ncurses-devel
\
pcre-devel python3-docutils systemd-units
# build Varnish source
yumdownloader
--source
varnish-6.3.0-1.el7.src
rpm
-ivh
./varnish-6.3.0-1.el7.src.rpm
cd
rpmbuild/SOURCES
tar
xfz varnish-6.3.0.tgz
cd
varnish-6.3.0
./autogen.sh
./configure
make
-j
# build RPMs
cd
/home/builder
rpmbuild
-ba
-D
"dist .
${
DIST
}
"
\
-D
"_version
${
VERSION
}
"
\
-D
"_release
${
RELEASE
}
"
\
-D
"VARNISHSRC
${
HOME
}
/rpmbuild/SOURCES/varnish-6.3.0"
\
rpmbuild/SPECS/vmod-dispatch.spec
sudo cp
rpmbuild/RPMS/
*
/
*
/srv
sudo cp
rpmbuild/SRPMS/
*
/srv
pkg/rpm/varnishcache_varnish63.repo
0 → 100644
View file @
73786bf5
[varnishcache_varnish63]
name=varnishcache_varnish63
baseurl=https://packagecloud.io/varnishcache/varnish63/el/7/$basearch
repo_gpgcheck=1
gpgcheck=0
enabled=1
gpgkey=https://packagecloud.io/varnishcache/varnish63/gpgkey
sslverify=1
sslcacert=/etc/pki/tls/certs/ca-bundle.crt
metadata_expire=300
[varnishcache_varnish63-source]
name=varnishcache_varnish63-source
baseurl=https://packagecloud.io/varnishcache/varnish63/el/7/SRPMS
repo_gpgcheck=1
gpgcheck=0
enabled=1
gpgkey=https://packagecloud.io/varnishcache/varnish63/gpgkey
sslverify=1
sslcacert=/etc/pki/tls/certs/ca-bundle.crt
metadata_expire=300
pkg/rpm/vmod-dispatch.spec
0 → 100644
View file @
73786bf5
# -D MUST pass in _version and _release, and SHOULD pass in dist.
Summary: Varnish Module for dispatching control to VCL labels or subroutines
Name: vmod-dispatch
Version: %{_version}
Release: %{_release}%{?dist}
License: BSD
Group: System Environment/Daemons
URL: https://code.uplex.de/uplex-varnish/libvmod-dispatch
Source0: %{name}-%{version}.tar.gz
# varnish from varnish62 at packagecloud
# Strictly require 6.3.0 by commit ID.
Requires: varnishd(abi)%{?_isa} == 0c9a93f1b2c6de49b8c6ec8cefd9d2be50041d79
BuildRequires: varnish-devel == 6.3.0
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-dispatch, vmod-dispatch-debuginfo
%description
Varnish Module (VMOD) for dispatching control to VCL labels or subroutines.
%prep
%setup -q -n %{name}-%{version}
%build
# if this were a git build
# ./autogen.sh
%configure VARNISHSRC=%{VARNISHSRC}
%{__make} %{?_smp_mflags}
%check
%{__make} %{?_smp_mflags} 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
* Tue Oct 8 2019 Geoff Simmons <geoff@uplex.de> - %{_version}-%{_release}
Compatible with Varnish 6.3.0.
* Tue Apr 16 2019 Geoff Simmons <geoff@uplex.de> - 0.2.0-1
Compatible with Varnish 6.2.0.
* Tue Apr 16 2019 Geoff Simmons <geoff@uplex.de> - 0.1.0-1
Compatible with Varnish 6.0.3.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment