Closed scottybrisbane closed 7 years ago
Was Varnish 5 installed from packages or from sources?
while ago i have build a small script to compile this on debian/ubuntu:
#/bin/bash
set -x
export LC_ALL=C.UTF-8
cd /usr/src/ || exit
apt-get install pkg-config automake libtool python-docutils debhelper build-essential
test -f varnish-dev_5.0.0-1_amd64.deb || wget https://repo.varnish-cache.org/pkg/5.0.0/varnish-dev_5.0.0-1_amd64.deb
test -f varnish_5.0.0-1_amd64.deb || wget https://repo.varnish-cache.org/pkg/5.0.0/varnish_5.0.0-1_amd64.deb
if [ $(dpkg -l varnish varnish-dev| grep varnish | fgrep "5.0" | wc -l ) -ne 2 ] ; then
dpkg -i /usr/src/varnish*.deb
fi
apt-get -f install
test -d libvmod-dynamic || git clone https://github.com/nigoroll/libvmod-dynamic.git
cd libvmod-dynamic
git pull
if fgrep -q www.localhost /etc/hosts ; then
echo hosts ok
else
cat <<EOF >> /etc/hosts
127.0.0.1 www.localhost img.localhost
EOF
/etc/init.d/dnsmasq restart
fi
gpg --recv-key 335B21B2
sed -i 's/4\.1\.1/5.0.0/g ; s/libvarnishapi-dev/varnish-dev/g' debian/control
./autogen.sh
dpkg-buildpackage && echo done
dpkg -i /usr/src/libvmod-dynamic_0.2_amd64.deb
echo "all done"
Please update versions hope this helps
Please update versions
Do you mean, like this line in your script?
sed -i 's/4\.1\.1/5.0.0/g ; s/libvarnishapi-dev/varnish-dev/g' debian/control
I guess it could be solved by #2 but time is running thin for this.
Regarding @scottybrisbane's error, it looks like Varnish was not installed from packages, or at the very least not in the default aclocal
path. This problem could be solved by not building from git, but we haven't squashed #3 yet. Solving the aclocal
path would probably trigger an error with the pkg-config
path though.
@Dridi That sed is to fix the "Build-depends:" i replace the old 4.x version or varnish5, to enforce that this requires varnish5, not varnish4, but this change is really optional
I also rename the debian dev package from "libvarnishapi-dev" to the varnish dev package, named varnish-dev. This is required for varnish5 due the different name
Probably we can put this to work on both varnish4 and varnish5 with this:
Source: libvmod-dynamic
Section: web
Priority: extra
Maintainer: Dridi Boukelmoune <dridi.boukelmoune@gmail.com>
Build-Depends: debhelper (>= 7),
build-essential,
pkg-config,
python-docutils,
varnish (>= 4.1.1),
libvarnishapi-dev (>= 4.1.1) | varnish-dev (>=5.0.0)
Standards-Version: 3.8.1
Vcs-Git: git://github.com/nigoroll/libvmod-named.git
Package: libvmod-dynamic
Architecture: any
Depends: varnish (>= 4.1.1), ${shlibs:Depends}, ${misc:Depends}, ${Varnish:ABI}
Description: Named vmod for Varnish
That is, adding the | varnish-dev (>=5.0.0)
after the libvarnishapi-dev (>= 4.1.1)
Like this should work in both varnish versions... but it is probably not enforcing that libvmod-dynamic for varnish5 can not be installed in varnish4... but i only have basic understanding of the debian/control files
I might be mistaken but I think that the package rename is effective since 4.1.4, I would need to double-check that. Regarding packaging, #2 should be my best candidate, but I will keep your comment in mind,
Regarding this very issue: ETIMEDOUT
I'm having trouble compiling the vmod against Varnish 5.0 on a Ubuntu 16.04 machine. When running
./autogen.sh
I receive the following output:Chances are I've missed something, but could someone please point me in the right direction?