[arch-commits] Commit in varnish/repos/extra-x86_64 (11 files)

Dave Reisner dreisner at archlinux.org
Fri Nov 24 23:32:14 UTC 2017


    Date: Friday, November 24, 2017 @ 23:32:13
  Author: dreisner
Revision: 310835

archrelease: copy trunk to extra-x86_64

Added:
  varnish/repos/extra-x86_64/PKGBUILD
    (from rev 310834, varnish/trunk/PKGBUILD)
  varnish/repos/extra-x86_64/hack-up-vcstools-to-work-with-python-2-and-3.patch
    (from rev 310834, varnish/trunk/hack-up-vcstools-to-work-with-python-2-and-3.patch)
  varnish/repos/extra-x86_64/varnish-vcl-reload
    (from rev 310834, varnish/trunk/varnish-vcl-reload)
  varnish/repos/extra-x86_64/varnish.install
    (from rev 310834, varnish/trunk/varnish.install)
  varnish/repos/extra-x86_64/varnish.service
    (from rev 310834, varnish/trunk/varnish.service)
  varnish/repos/extra-x86_64/varnish.sysusers
    (from rev 310834, varnish/trunk/varnish.sysusers)
Deleted:
  varnish/repos/extra-x86_64/PKGBUILD
  varnish/repos/extra-x86_64/varnish-vcl-reload
  varnish/repos/extra-x86_64/varnish.install
  varnish/repos/extra-x86_64/varnish.service
  varnish/repos/extra-x86_64/varnish.sysusers

----------------------------------------------------+
 PKGBUILD                                           |  144 ++++++++++---------
 hack-up-vcstools-to-work-with-python-2-and-3.patch |   66 ++++++++
 varnish-vcl-reload                                 |   40 ++---
 varnish.install                                    |   24 +--
 varnish.service                                    |   30 +--
 varnish.sysusers                                   |    4 
 6 files changed, 191 insertions(+), 117 deletions(-)

Deleted: PKGBUILD
===================================================================
--- PKGBUILD	2017-11-24 23:31:34 UTC (rev 310834)
+++ PKGBUILD	2017-11-24 23:32:13 UTC (rev 310835)
@@ -1,68 +0,0 @@
-# $Id$
-# Maintainer: Dave Reisner <dreisner at archlinux.org>
-# Contributor: Jaroslav Lichtblau <dragonlord at aur.archlinux.org>
-# Contributor: Douglas Soares de Andrade
-# Contributor: Roberto Alsina <ralsina at kde.org>
-
-pkgname=varnish
-pkgver=5.1.3
-pkgrel=1
-pkgdesc="High-performance HTTP accelerator"
-arch=('i686' 'x86_64')
-url="https://www.varnish-cache.org/"
-license=('BSD')
-depends=('gcc' 'libedit' 'pcre')
-makedepends=('python-docutils')
-optdepends=('python: needed for vmod development')
-backup=('etc/varnish/default.vcl')
-install=$pkgname.install
-source=("https://repo.varnish-cache.org/source/$pkgname-$pkgver.tar.gz"
-        varnish-vcl-reload
-        varnish.service
-        varnish.sysusers)
-sha256sums=('7439c93ca581340f3722b8c790160f46dc6c5328188e4c0bc233c42f3f04a54e'
-            '0369e3e735e4c6150f08677df8b7cdae1a36ea75fd0e03734abe814a94312f80'
-            '069904391237641eb770e8bc3989d18a3b3a9cb2374b9cd525235bfbb49b6b1d'
-            'b58dd6b00eb81c75e4bb30421b85b2be88c049d5b72a8ee553ba690a5414972b')
-
-build() {
-  cd "$pkgname-$pkgver"
-
-  # https://github.com/varnishcache/varnish-cache/issues/1875
-  [[ $CARCH == i686 ]] && CFLAGS+=' -fexcess-precision=standard'
-
-  ./configure \
-    --prefix=/usr \
-    --sysconfdir=/etc \
-    --localstatedir=/var/lib \
-    --sbindir=/usr/bin
-
-  make
-}
-
-check() {
-  cd "$pkgname-$pkgver"
-
-  # Sometimes fails on i686 in address remapping test. Not sure if flaky
-  # test or otherwise...
-  make check
-}
-
-package() {
-  cd "$pkgname-$pkgver"
-
-  make DESTDIR="$pkgdir" install
-
-  install -m755 "$srcdir/varnish-vcl-reload" "$pkgdir/usr/bin"
-  install -Dm644 "$srcdir/$pkgname.service" "$pkgdir/usr/lib/systemd/system/$pkgname.service"
-
-  # create varnish:varnish user/group
-  install -Dm644 "$srcdir/$pkgname.sysusers" "$pkgdir/usr/lib/sysusers.d/varnish.conf"
-
-  # config
-  install -Dm644 "etc/example.vcl" "$pkgdir/etc/varnish/default.vcl"
-  install -Dm644 "etc/builtin.vcl" "$pkgdir/usr/share/doc/varnish/builtin.vcl"
-
-  # license
-  install -Dm644 "LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
-}

Copied: varnish/repos/extra-x86_64/PKGBUILD (from rev 310834, varnish/trunk/PKGBUILD)
===================================================================
--- PKGBUILD	                        (rev 0)
+++ PKGBUILD	2017-11-24 23:32:13 UTC (rev 310835)
@@ -0,0 +1,76 @@
+# $Id$
+# Maintainer: Dave Reisner <dreisner at archlinux.org>
+# Contributor: Jaroslav Lichtblau <dragonlord at aur.archlinux.org>
+# Contributor: Douglas Soares de Andrade
+# Contributor: Roberto Alsina <ralsina at kde.org>
+
+pkgname=varnish
+pkgver=5.2.1
+pkgrel=1
+pkgdesc="High-performance HTTP accelerator"
+arch=('x86_64')
+url="https://www.varnish-cache.org/"
+license=('BSD')
+depends=('gcc' 'libedit' 'pcre')
+makedepends=('python-docutils' 'python')
+optdepends=('python: needed for vmod development')
+backup=('etc/varnish/default.vcl')
+options=('!buildflags')
+install=$pkgname.install
+source=("https://github.com/varnishcache/varnish-cache/archive/varnish-$pkgver.tar.gz"
+        hack-up-vcstools-to-work-with-python-2-and-3.patch
+        varnish-vcl-reload
+        varnish.service
+        varnish.sysusers)
+sha256sums=('f44decf0f382a2ac76aaaa2478167a6b41909a3f6179eeefce402d19e694aba0'
+            '97a00962474a5bf97fd71e4c0e792861157aa8ac872fc9c5636b763f11445e8c'
+            '0369e3e735e4c6150f08677df8b7cdae1a36ea75fd0e03734abe814a94312f80'
+            '069904391237641eb770e8bc3989d18a3b3a9cb2374b9cd525235bfbb49b6b1d'
+            'b58dd6b00eb81c75e4bb30421b85b2be88c049d5b72a8ee553ba690a5414972b')
+
+prepare() {
+  cd "varnish-cache-varnish-$pkgver"
+
+  patch -Np1 <"$srcdir/hack-up-vcstools-to-work-with-python-2-and-3.patch"
+
+  ./autogen.sh
+}
+
+build() {
+  cd "varnish-cache-varnish-$pkgver"
+
+  ./configure \
+    --prefix=/usr \
+    --sysconfdir=/etc \
+    --localstatedir=/var/lib \
+    --sbindir=/usr/bin
+
+  make
+}
+
+check() {
+  cd "varnish-cache-varnish-$pkgver"
+
+  # Sometimes fails on i686 in address remapping test. Not sure if flaky
+  # test or otherwise...
+  make check
+}
+
+package() {
+  cd "varnish-cache-varnish-$pkgver"
+
+  make DESTDIR="$pkgdir" install
+
+  install -m755 "$srcdir/varnish-vcl-reload" "$pkgdir/usr/bin"
+  install -Dm644 "$srcdir/$pkgname.service" "$pkgdir/usr/lib/systemd/system/$pkgname.service"
+
+  # create varnish:varnish user/group
+  install -Dm644 "$srcdir/$pkgname.sysusers" "$pkgdir/usr/lib/sysusers.d/varnish.conf"
+
+  # config
+  install -Dm644 "etc/example.vcl" "$pkgdir/etc/varnish/default.vcl"
+  install -Dm644 "etc/builtin.vcl" "$pkgdir/usr/share/doc/varnish/builtin.vcl"
+
+  # license
+  install -Dm644 "LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+}

Copied: varnish/repos/extra-x86_64/hack-up-vcstools-to-work-with-python-2-and-3.patch (from rev 310834, varnish/trunk/hack-up-vcstools-to-work-with-python-2-and-3.patch)
===================================================================
--- hack-up-vcstools-to-work-with-python-2-and-3.patch	                        (rev 0)
+++ hack-up-vcstools-to-work-with-python-2-and-3.patch	2017-11-24 23:32:13 UTC (rev 310835)
@@ -0,0 +1,66 @@
+From 17c92e43fda114bf5341e51d752e882238b8fe8c Mon Sep 17 00:00:00 2001
+From: Nils Goroll <nils.goroll at uplex.de>
+Date: Thu, 5 Oct 2017 13:39:23 +0200
+Subject: [PATCH] hack up vsctool to work with python 2 and 3
+
+StringIO does not exist any more in python3, yet requiring 2.7 would
+not pave the path forward, so try to be compatible with both.
+
+Works for me on Python 2.7.9 and Python 3.4
+
+I would appreciate if someone more fluent in serpentinous programming
+language reviewed and/or rewrote this.
+---
+ lib/libvcc/vsctool.py | 24 ++++++++++++++++++++----
+ 1 file changed, 20 insertions(+), 4 deletions(-)
+
+diff --git a/lib/libvcc/vsctool.py b/lib/libvcc/vsctool.py
+index 854968e3b..829c6e518 100644
+--- a/lib/libvcc/vsctool.py
++++ b/lib/libvcc/vsctool.py
+@@ -37,7 +37,10 @@
+ import json
+ import sys
+ import gzip
+-import StringIO
++try:
++    import StringIO
++except ImportError:
++    import io
+ import collections
+ import struct
+ 
+@@ -54,9 +57,22 @@
+ 	"format":	[ "integer", FORMATS],
+ }
+ 
++# http://python3porting.com/problems.html#bytes-strings-and-unicode
++if sys.version_info < (3,):
++    def b(x):
++        return x
++else:
++    import codecs
++    def b(x):
++        return codecs.latin_1_encode(x)[0]
++
+ def gzip_str(s):
+-	out = StringIO.StringIO()
+-	gzip.GzipFile(fileobj=out, mode="w").write(s)
++	try:
++		out = StringIO.StringIO()
++	except NameError:
++		out = io.BytesIO()
++
++	gzip.GzipFile(fileobj=out, mode="w").write(b(s))
+ 	out.seek(4)
+ 	out.write(struct.pack("<L", 0x12bfd58))
+ 	return out.getvalue()
+@@ -285,7 +301,7 @@ class rst_vsc(directive):
+ 	def __init__(self, s):
+ 		super(rst_vsc, self).__init__(s)
+ 
+-		for i,v in PARAMS.iteritems():
++		for i,v in PARAMS.items():
+ 			if v is not True:
+ 				self.do_default(i, v[0], v[1])
+ 

Deleted: varnish-vcl-reload
===================================================================
--- varnish-vcl-reload	2017-11-24 23:31:34 UTC (rev 310834)
+++ varnish-vcl-reload	2017-11-24 23:32:13 UTC (rev 310835)
@@ -1,20 +0,0 @@
-#!/bin/sh
-
-cfg=${1:-/etc/varnish/default.vcl}
-if [ ! -e "$cfg" ]; then
-  printf 'ERROR: VCL file %s does not exist\n' "$cfg" >&2
-  exit 1
-fi
-
-activecfg=$(varnishadm 'vcl.list' | awk '/active/ { print $4 }')
-if [ -z "$activecfg" ]; then
-  printf 'ERROR: No active VCL found!\n' >&2
-  exit 1
-fi
-
-newcfg=$(date +'vcl-%s')
-printf 'INFO: using new config %s\n' "$cfg"
-
-varnishadm "vcl.load $newcfg $cfg" &&
-varnishadm "vcl.use $newcfg" &&
-varnishadm "vcl.discard $activecfg"

Copied: varnish/repos/extra-x86_64/varnish-vcl-reload (from rev 310834, varnish/trunk/varnish-vcl-reload)
===================================================================
--- varnish-vcl-reload	                        (rev 0)
+++ varnish-vcl-reload	2017-11-24 23:32:13 UTC (rev 310835)
@@ -0,0 +1,20 @@
+#!/bin/sh
+
+cfg=${1:-/etc/varnish/default.vcl}
+if [ ! -e "$cfg" ]; then
+  printf 'ERROR: VCL file %s does not exist\n' "$cfg" >&2
+  exit 1
+fi
+
+activecfg=$(varnishadm 'vcl.list' | awk '/active/ { print $4 }')
+if [ -z "$activecfg" ]; then
+  printf 'ERROR: No active VCL found!\n' >&2
+  exit 1
+fi
+
+newcfg=$(date +'vcl-%s')
+printf 'INFO: using new config %s\n' "$cfg"
+
+varnishadm "vcl.load $newcfg $cfg" &&
+varnishadm "vcl.use $newcfg" &&
+varnishadm "vcl.discard $activecfg"

Deleted: varnish.install
===================================================================
--- varnish.install	2017-11-24 23:31:34 UTC (rev 310834)
+++ varnish.install	2017-11-24 23:32:13 UTC (rev 310835)
@@ -1,12 +0,0 @@
-# remove localstatedir -- compiled VCL and slab files will still be here.
-post_remove() {
-  rm -rf var/lib/varnish
-}
-
-post_upgrade() {
-  if [[ $(vercmp 5.0.0-1 "$2") -eq 1 ]]; then
-    echo ":: You must update your VCL to be compatible with varnish 5.0.0. See the"
-    echo "   following upgrade guide to port your configuration:"
-    echo "   http://varnish-cache.org/docs/5.0/whats-new/upgrading-5.0.html"
-  fi
-}

Copied: varnish/repos/extra-x86_64/varnish.install (from rev 310834, varnish/trunk/varnish.install)
===================================================================
--- varnish.install	                        (rev 0)
+++ varnish.install	2017-11-24 23:32:13 UTC (rev 310835)
@@ -0,0 +1,12 @@
+# remove localstatedir -- compiled VCL and slab files will still be here.
+post_remove() {
+  rm -rf var/lib/varnish
+}
+
+post_upgrade() {
+  if [[ $(vercmp 5.0.0-1 "$2") -eq 1 ]]; then
+    echo ":: You must update your VCL to be compatible with varnish 5.0.0. See the"
+    echo "   following upgrade guide to port your configuration:"
+    echo "   http://varnish-cache.org/docs/5.0/whats-new/upgrading-5.0.html"
+  fi
+}

Deleted: varnish.service
===================================================================
--- varnish.service	2017-11-24 23:31:34 UTC (rev 310834)
+++ varnish.service	2017-11-24 23:32:13 UTC (rev 310835)
@@ -1,15 +0,0 @@
-[Unit]
-Description=High-perfomance HTTP accelerator
-After=network.target
-
-[Service]
-ExecStart=/usr/bin/varnishd -j unix -a 0.0.0.0:80 -a [::]:80 -f /etc/varnish/default.vcl -T localhost:6082 -s malloc,64M -F
-ExecReload=/usr/bin/varnish-vcl-reload
-PrivateTmp=true
-PrivateDevices=true
-LimitNOFILE=131072
-LimitMEMLOCK=82000
-LimitCORE=infinity
-
-[Install]
-WantedBy=multi-user.target

Copied: varnish/repos/extra-x86_64/varnish.service (from rev 310834, varnish/trunk/varnish.service)
===================================================================
--- varnish.service	                        (rev 0)
+++ varnish.service	2017-11-24 23:32:13 UTC (rev 310835)
@@ -0,0 +1,15 @@
+[Unit]
+Description=High-perfomance HTTP accelerator
+After=network.target
+
+[Service]
+ExecStart=/usr/bin/varnishd -j unix -a 0.0.0.0:80 -a [::]:80 -f /etc/varnish/default.vcl -T localhost:6082 -s malloc,64M -F
+ExecReload=/usr/bin/varnish-vcl-reload
+PrivateTmp=true
+PrivateDevices=true
+LimitNOFILE=131072
+LimitMEMLOCK=82000
+LimitCORE=infinity
+
+[Install]
+WantedBy=multi-user.target

Deleted: varnish.sysusers
===================================================================
--- varnish.sysusers	2017-11-24 23:31:34 UTC (rev 310834)
+++ varnish.sysusers	2017-11-24 23:32:13 UTC (rev 310835)
@@ -1,2 +0,0 @@
-u varnish - "Varnish Cache Proxy"
-g varnish -

Copied: varnish/repos/extra-x86_64/varnish.sysusers (from rev 310834, varnish/trunk/varnish.sysusers)
===================================================================
--- varnish.sysusers	                        (rev 0)
+++ varnish.sysusers	2017-11-24 23:32:13 UTC (rev 310835)
@@ -0,0 +1,2 @@
+u varnish - "Varnish Cache Proxy"
+g varnish -


More information about the arch-commits mailing list