[arch-commits] Commit in varnish/trunk (5 files)

Dave Reisner dreisner at archlinux.org
Mon Oct 5 23:10:19 UTC 2015


    Date: Tuesday, October 6, 2015 @ 01:10:19
  Author: dreisner
Revision: 248379

upgpkg: varnish 4.1.0-1

- add sysusers.d snippet to run as user 'varnish'
- adjust reload script to refer to new VCL by name, not generation

Added:
  varnish/trunk/varnish.sysusers
Modified:
  varnish/trunk/PKGBUILD
  varnish/trunk/varnish-vcl-reload
  varnish/trunk/varnish.install
  varnish/trunk/varnish.service

--------------------+
 PKGBUILD           |   17 +++++++++++------
 varnish-vcl-reload |    2 +-
 varnish.install    |   10 +++++++++-
 varnish.service    |    2 +-
 varnish.sysusers   |    2 ++
 5 files changed, 24 insertions(+), 9 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2015-10-05 19:56:30 UTC (rev 248378)
+++ PKGBUILD	2015-10-05 23:10:19 UTC (rev 248379)
@@ -5,8 +5,8 @@
 # Contributor: Roberto Alsina <ralsina at kde.org>
 
 pkgname=varnish
-pkgver=4.0.3
-pkgrel=2
+pkgver=4.1.0
+pkgrel=1
 pkgdesc="High-performance HTTP accelerator"
 arch=('i686' 'x86_64')
 url="http://www.varnish-cache.org/"
@@ -18,10 +18,12 @@
 install=$pkgname.install
 source=("http://repo.varnish-cache.org/source/$pkgname-$pkgver.tar.gz"
         varnish-vcl-reload
-        varnish.service)
-md5sums=('16a683f2e41f7d80219cec5d4649380c'
-         '03196dee7fc68e75069393d52c370762'
-         '699d118a069c2e63e49c81f275ce2658')
+        varnish.service
+        varnish.sysusers)
+md5sums=('d93e32b59c0c7487180a37781aae13f7'
+         'b494b41b2a605f406abe63ed02dc117f'
+         '8334d2e108695c121c41833b53838a05'
+         'da8263571f450e3c25fdd3c3b4a1e259')
 
 build() {
   cd "$pkgname-$pkgver"
@@ -43,6 +45,9 @@
   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"

Modified: varnish-vcl-reload
===================================================================
--- varnish-vcl-reload	2015-10-05 19:56:30 UTC (rev 248378)
+++ varnish-vcl-reload	2015-10-05 23:10:19 UTC (rev 248379)
@@ -6,7 +6,7 @@
   exit 1
 fi
 
-activecfg=$(varnishadm 'vcl.list' | awk '/active/ { print $3 }')
+activecfg=$(varnishadm 'vcl.list' | awk '/active/ { print $4 }')
 if [ -z "$activecfg" ]; then
   printf 'ERROR: No active VCL found!\n' >&2
   exit 1

Modified: varnish.install
===================================================================
--- varnish.install	2015-10-05 19:56:30 UTC (rev 248378)
+++ varnish.install	2015-10-05 23:10:19 UTC (rev 248379)
@@ -5,10 +5,18 @@
   rm -rf var/lib/varnish
 }
 
+post_install() {
+  systemd-sysusers varnish.conf
+}
+
 post_upgrade() {
-  if [ "$(vercmp 4.0.0-1 "$2")" -eq 1 ]; then
+  if [[ $(vercmp 4.0.0-1 "$2") -eq 1 ]]; then
     echo ":: You must update your VCL to be compatible with 4.0.0. See the following"
     echo "   upgrade guide to port your configuration:"
     echo "   https://www.varnish-cache.org/docs/trunk/whats-new/upgrading.html"
   fi
+
+  if [[ $(vercmp 4.1.0-1 "$2") -eq 1 ]]; then
+    systemd-sysusers varnish.conf
+  fi
 }

Modified: varnish.service
===================================================================
--- varnish.service	2015-10-05 19:56:30 UTC (rev 248378)
+++ varnish.service	2015-10-05 23:10:19 UTC (rev 248379)
@@ -3,7 +3,7 @@
 After=network.target
 
 [Service]
-ExecStart=/usr/bin/varnishd -a 0.0.0.0:80,[::]:80 -f /etc/varnish/default.vcl -T localhost:6082 -s malloc,64M -u nobody -g nobody -F
+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

Added: varnish.sysusers
===================================================================
--- varnish.sysusers	                        (rev 0)
+++ varnish.sysusers	2015-10-05 23:10:19 UTC (rev 248379)
@@ -0,0 +1,2 @@
+u varnish - "Varnish Cache Proxy"
+g varnish -



More information about the arch-commits mailing list