summaryrefslogtreecommitdiff
path: root/www-servers/varnish
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /www-servers/varnish
reinit the tree, so we can have metadata
Diffstat (limited to 'www-servers/varnish')
-rw-r--r--www-servers/varnish/Manifest21
-rw-r--r--www-servers/varnish/files/fix-build-x86.patch25
-rw-r--r--www-servers/varnish/files/varnishd.confd-r322
-rw-r--r--www-servers/varnish/files/varnishd.confd-r418
-rw-r--r--www-servers/varnish/files/varnishd.initd-r377
-rw-r--r--www-servers/varnish/files/varnishd.initd-r477
-rw-r--r--www-servers/varnish/files/varnishd.logrotate-r231
-rw-r--r--www-servers/varnish/files/varnishd.service16
-rw-r--r--www-servers/varnish/files/varnishlog.confd3
-rw-r--r--www-servers/varnish/files/varnishlog.initd31
-rw-r--r--www-servers/varnish/files/varnishncsa.confd3
-rw-r--r--www-servers/varnish/files/varnishncsa.initd31
-rw-r--r--www-servers/varnish/files/varnishncsa.initd-r144
-rw-r--r--www-servers/varnish/metadata.xml30
-rw-r--r--www-servers/varnish/varnish-4.0.5.ebuild97
-rw-r--r--www-servers/varnish/varnish-4.1.8.ebuild103
-rw-r--r--www-servers/varnish/varnish-5.1.3.ebuild101
17 files changed, 730 insertions, 0 deletions
diff --git a/www-servers/varnish/Manifest b/www-servers/varnish/Manifest
new file mode 100644
index 000000000000..8ce206d8db08
--- /dev/null
+++ b/www-servers/varnish/Manifest
@@ -0,0 +1,21 @@
+AUX fix-build-x86.patch 871 SHA256 0cb4ce599607498bfd6fe96615b08c2a7043d13190bb04c12384a9dd7d7f1ee8 SHA512 b46ab9cbfc5e7e4a75d1caf624fab453338531a19a8653550347fc233652199977ea907ba79e4db7822cb5c24f12f48aa765e4d582ba1bbd43edaf88d6b05d7c WHIRLPOOL 89d754b014e21948dde20f0c8516493e803873dcf56c047394d2bfc6c212fe1694b3f5a883d0c0ab4b24a8fe690e4bc91f34473262441cb8527987e3aee265f5
+AUX varnishd.confd-r3 589 SHA256 09e039be32bc0fb616925dd5bed8b9d76553f34549034425265afa59da5e861b SHA512 dad4bf5ddcc84a9267ee00ed8b3e36c136674b0b87e686fa5ab1f854cb1a111b3f8943439a3b7a1b20b81f3dfe57879e126434673c6520ccfc6b900e8edc6d9e WHIRLPOOL f17b8d043a6a2439730fead3d527ffa1ce0d8643e7674dfa1562f80368b60cbcfd044fe16b8fe0306bc871cff65d983d8b67b96201579b30882e30322e7b6d7d
+AUX varnishd.confd-r4 519 SHA256 bc29e1a65f1712e414479323bfb88833e86ad277e03ac87c892a32d959917a4e SHA512 98c8901e53f3c6adb908b9eb01fd441ea53f3c54d4a79aecb1fb1eddfa2fc93de3d0de403a4464a9baff15873b3a20623837e3a37cb225e924a329e32b9e37d6 WHIRLPOOL 6097071e366ff4b41affe529a63bbc2e5603a32b32a4653cba05e21d490cd0ebe85c7e955d71e6a983922ae57caed029f440f334b53ebf00dd14f08bec548a99
+AUX varnishd.initd-r3 1552 SHA256 a6fad9fb7ff878ac09fc132934cbe1cb75c8b1f90b291493644ccd58c55965fe SHA512 750cae57851c7e1d4ad05f53e66331b04c9a7d594e99514ca3368134cdec540552995360f65cc7e6a727a060c068db26759bae31e1b7792e725fc0142b0993bd WHIRLPOOL fedcf466cabaab5e939c5bc3ebf3355b96a62c835b67da340a27bce4bf8d2e4616dd1dfa1c54e15ae48d31d0f31b765dbfc1dfbea2a2a0965b0128a6c18f888a
+AUX varnishd.initd-r4 1573 SHA256 c99dee20979955822fa944c9eae3593a92df3d960aac67a805ee6a4f9cdaabda SHA512 5ac7867e85cbd721f903c524ed4b524423d9dada4acfeefb0e543214a208828df5cc4efe2f012991bea6b38c2b223c24b17d3890ec4ed2c57d2b441b8e5a6900 WHIRLPOOL 0980fb5221d69d5ac457f55be94ecd370e852d6f256a31fbb68d2011d987ea75b1c491d9e2ff8a742d2c53b83f698fcd7e4d78dcf37a518ada236061fc8ad516
+AUX varnishd.logrotate-r2 470 SHA256 4c1b7abf23bfc32a65f65633c0be0d065fb9fee72e4b533feca35c596d9c5a2c SHA512 51cc6d46ff7439de93977ab87dfb0af399458c1e446475696f73342ae7a0c1a8ca8fc6e79e593659f1af30716a5f8a1ee5e3b1f5e7b35df40b45d47e7b0f2ffd WHIRLPOOL f6fa4d5b6e53934d79c83cb2ec683f0aad9ee4ba473c13fe9fa4c4e4105e40397f8677d25103804ea4da60dfca3bf6b9a1f88f75efb8546a1dd87a802d5666b1
+AUX varnishd.service 455 SHA256 2cdb47ce8bc90f94df5b06b2468e8c7f1f20a32910d19fea00b7ccbfbf0f9bc5 SHA512 aa1671e1a0c374c30df31a1bb41248fc28d10ee3e7f062737e13502c8f5282ee4fb2c20255bf943016809b5f3f31d3f16b3c453b8663abf6ad3ce23d6fcaf57a WHIRLPOOL 4f78e9aa471723b3226f78228426cf1edea86e4a2ddfe10f7cbd86518fdac8a41cac9a50b3857cb7e6fbd7f44be347cb527834dcc9f57f2e6bcd3405d4646059
+AUX varnishlog.confd 82 SHA256 e285fe31434addbeee40c6fae7745536574750a0fe658788318acb33943e38d3 SHA512 88fe9b545a2b25d6e6e45f1cfecbeca5f503bc1fbe95856386e568edee41b487b162cddceba8cb152b0a37d8d96635a76c0715fc69d87d6c667ac403ebae0bb7 WHIRLPOOL 4214c022296126d73bcdc98c8c75f8a1c62a31862e521338afdb36d48e5b209889b05bcc949ec2544897193f4e1bd44faeab28627c3407977203dd901b86710e
+AUX varnishlog.initd 707 SHA256 83eff5fc7af8b129f86673a3dce88ded71bc025cd73f6b3cd6c2c2b2b6de671b SHA512 c67a7898f40849989edcbe74e1a418e196f48e178ca30126bc13db226e4f4c2c2ba74d9d0650ef68ed88732917fc06b80ef1f62c2d9d2c14a89f26fd25aed0f7 WHIRLPOOL 6159d1fbd8b906ecb18d550709bacb99fbc6a9273a24e2c93997035a8348624c5d34a4250ad6921a7c7ec7eef70fb76a75f2025de752185252e8baa8d7e9c922
+AUX varnishncsa.confd 84 SHA256 60e03274b8d786abf7769be26a4ee6c671a155a761b16ee92d5c8b183491870e SHA512 a5426ff66b89d2afb6273f05e4117b3eec5ce0162a624d52c92b418960f72e58bd01224165613221af76ec241bd98e1eb985b2ef7b83a5b615e9ece67234dcc8 WHIRLPOOL cc83c4093d17e8d80a917486012ddc3946fd644a4d09648c8c6749fa476e7e5080c6d013d5be21418d7c36fcf6e76f8c648bdeb56908f856816fffde70998f6a
+AUX varnishncsa.initd 716 SHA256 7616e89960ce44b927cc09cdd4f23f04c52acee4586f86360f5c50549180b9b7 SHA512 1d0c781675ecba5adce02c37a02c431c4b44d64310a0945bff4f6f57f7d0c87cb7dda874311e44d667317d5beda113b62f4ba49c81534a0c078314b3fa15a512 WHIRLPOOL 1afdedc914aaa7bc69228b96e6fe684fc41e8217bcd3cffeb0d6c808b0bf354a1722ffbee3cbb7b6ff8f2996a43f07384b2d824f5c11490f01f95c98c0b5ff26
+AUX varnishncsa.initd-r1 1001 SHA256 b7bf0ea8162f10b87a8c66c04da7bcbdb3d60e99ef73500674a7ab57116318d6 SHA512 e0b7d67bbd710f0a17b77837c581f128e6b746eff2b12e81d03d1ad040037e95bb00fb8007d89bc6dab18cfa659456078f310ac268f104774ef85ad068efecca WHIRLPOOL 48ae9cf0b5eb5b10ab6b51376f186cdec6adc704ae5d67f9f29e1aebd576c1dd0489ed9d5c62f668a425a9420357e7d80bb6419d58c7a869abadb82f7a9032e1
+DIST varnish-4.0.5.tar.gz 1947888 SHA256 d90ffa33902d3ac40742cbb50588a37f467f23797f93e67a261724f4a7fb0aff SHA512 a08259f6f9c6fffa188b26c1f8c630de5e6d2f6d52f6efa9d5d8239cdd8721c53e2be3379f8100efb537e74416eadd6c865f4cc687db1c5a9f757bb3f73abeda WHIRLPOOL feea23e932e4bb422885679f15ddfed8d87976ab129f9658a96a01c81de8b3cd92e747739ad96693477b09025aecc9a5da9ce9170fdb9fdfc04c1d7c4ef8d3f4
+DIST varnish-4.1.8.tar.gz 2254772 SHA256 908e7fbfa0325498717686b2050181134aa0a69d1495c02b2625cd34d35a4ff1 SHA512 c642359118d87e8713d2ccf817da317a454a0f9ae6f7a07da1d10b5076aa7e5d7dcc203ef71ae19d56b7592db0c66b4ca96cb43d5fa0e6aa588d1dc8e03e026e WHIRLPOOL 2e04466f2a7a60cb788177b6328f47a4929767c927c0083da33ccb30bfa2fa39b220ddab965c1093e77c2b222f959798f91090a37e809476781c45e23601fb3e
+DIST varnish-5.1.3.tar.gz 2643223 SHA256 7439c93ca581340f3722b8c790160f46dc6c5328188e4c0bc233c42f3f04a54e SHA512 a10c317dc38ddff139ca8153f6388955df449c3abeb4d4f069b632ba2b32064a2827ab05fa8515994b251a68507fc3a7bf4e08eacc991fc03283ab234b9efd0a WHIRLPOOL 7dbd0da80bb9b8de194da83c6e8d198ec2652ae8d17105196b0af76d9df1129cecc67b3fd47a73c53d0f175872782478ee836ec6a75738b343b444ecb1dd1f19
+EBUILD varnish-4.0.5.ebuild 2057 SHA256 7cb589899035cc0216c86fae0fa5df97aab72048a2ee9d0458db24df197ab162 SHA512 6cb433aa628f972b7d86ecc2f0ae537f65cac24c57842c4f22e2805e0038755b06db38bb9079f6a89647c6a5819373dbea487dd0db0a5364edbb882a94572d4f WHIRLPOOL 9c2d68ddd025ae950383a69a02bb83debed27c8398b569237945bc22b36ca7265be3db5182a0c80600a774ca7400c40152d51f0e882fe5106906dfe34b1f1d54
+EBUILD varnish-4.1.8.ebuild 2215 SHA256 eb4a3619d0ceaa400a583cb70026da2068d646d6d396df7282ca8120ff4d51a3 SHA512 54616f3283bba6d40e78e943231d8e5408eca16bbda42dc4ea2816182cbcc7a86164a4e2fa3d0b35bc3705329d80fbe0e6b52ec9cf5cab0f7c4083d440ab6dd7 WHIRLPOOL 0443117c71d4d76d6cdbfb14eb565972a4685af6915884aae0e76e64cd1b08054206452f431b9b07489a1c5f6b808ddf17027141fb7130fa70dcb6aa7220339c
+EBUILD varnish-5.1.3.ebuild 2220 SHA256 026726b0ec6111511529a58a340ba5b27792063e9793392b18ddb46bb9694e7f SHA512 e6c7189739a6dfd2ab7413899c0c76cbde4f04a622288891e9b1d4beb4c65f22bac6f90f4d94955cb4c226bfd5bdf32240b2a7146c768d7811233679ea7528b4 WHIRLPOOL 47e11f619b5f35eb351c45429854d87ba61fb349878f8b56195259763589b3c835831747d3bbd7e31e145be1f2fc7ce56a4f61f8fc494a77f037d79b0e9aeb8a
+MISC ChangeLog 7102 SHA256 17c72c03d5e005936e705c46feb52d2ae4fb5816838cf2110b235315462d24f4 SHA512 2ceab636943fbe947b531c65bdb0c4d4cdfdac34b26f899bc8f852bd57ac210213bd8905586e930b2801846301946600cb0bc62df13709cb9f38f72985cc612f WHIRLPOOL a52fbe0aa2c926d06fd3434357315895a87e21a7b23013fa75007577b01d63c5959fb0a5d4c5c383a2dea0a38ca13dc13fcbd969a35f3a3d1fbaf46667db3dc5
+MISC ChangeLog-2015 14367 SHA256 bb4566ce5abfd3e41ba2cd9813184edae1680e9b1173dbdfea7b1b4ed4dce905 SHA512 09f34ef2260b993f33472ea76f0240c8622cb01d775f6cd453639c0d7e3622893ff3b3b0ac4ec79f210c380dbfef0a67e02810820be978552dba50d061700d86 WHIRLPOOL f12e0581fae1d7610ba43dbaf778f2b4d541bc0ec84a9fec3b10da3932f66f350d2bd2578b265126fd5272754f2edb8bf84a4d372776aeec10f3b5289e456b2c
+MISC metadata.xml 1308 SHA256 24cb97f7d9dd144ce50c6a490ff73f1acf397b5a3fa935857706c5ce377b423f SHA512 fa3f9a9c23cfb4aba84af4c2bad5deca139017b26543ca9a2c2164358beff13d2d91c6863902e9832661790253985859faec6773e70bd9eea86190ba77560356 WHIRLPOOL 8248d97c803eaf56c6a955ab569853f522be76c71cf8b793aceb87124dbf6c6f7b7ffe6b2917773f0aedb9979abfba2548242ba5b79508d4917fc2d2caab72be
diff --git a/www-servers/varnish/files/fix-build-x86.patch b/www-servers/varnish/files/fix-build-x86.patch
new file mode 100644
index 000000000000..acacd3b9d610
--- /dev/null
+++ b/www-servers/varnish/files/fix-build-x86.patch
@@ -0,0 +1,25 @@
+See https://bugs.gentoo.org/show_bug.cgi?id=620952
+
+From 54b5a09f00c027da280361b30d32a4ff309ba3ab Mon Sep 17 00:00:00 2001
+From: Poul-Henning Kamp <phk@FreeBSD.org>
+Date: Tue, 28 Mar 2017 18:44:12 +0000
+Subject: [PATCH] Try to confuse GCC to not doing FP brain-damage.
+
+Fixes #1875 (maybe)
+---
+ bin/varnishd/mgt/mgt_param_tweak.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/bin/varnishd/mgt/mgt_param_tweak.c b/bin/varnishd/mgt/mgt_param_tweak.c
+index 12a7a52ef..b26581e2e 100644
+--- a/bin/varnishd/mgt/mgt_param_tweak.c
++++ b/bin/varnishd/mgt/mgt_param_tweak.c
+@@ -52,7 +52,7 @@ static int
+ tweak_generic_double(struct vsb *vsb, volatile double *dest,
+ const char *arg, const char *min, const char *max, const char *fmt)
+ {
+- double u, minv = 0, maxv = 0;
++ volatile double u, minv = 0, maxv = 0;
+
+ if (arg != NULL) {
+ if (min != NULL) {
diff --git a/www-servers/varnish/files/varnishd.confd-r3 b/www-servers/varnish/files/varnishd.confd-r3
new file mode 100644
index 000000000000..c05b8fb7521c
--- /dev/null
+++ b/www-servers/varnish/files/varnishd.confd-r3
@@ -0,0 +1,22 @@
+# /etc/conf.d/varnishd
+
+VARNISHD="/usr/sbin/varnishd"
+VARNISHADM="/usr/bin/varnishadm"
+
+#CONFIGFILES="/etc/varnish/${SVCNAME}.vcl"
+CONFIGFILE="/etc/varnish/default.vcl"
+
+# Listen on 127.0.0.1:8080 and connect to backend 127.0.0.1:80
+#VARNISHD_OPTS="-a 127.0.0.1:8080 -a 127.0.0.1:8080"
+
+# Alternatively, don't listen to a backend
+VARNISHD_OPTS="-a 127.0.0.1:8080"
+
+
+# User/Group
+VARNISHD_OPTS="${VARNISHD_OPTS} -u varnish -g varnish"
+
+# You may need to increase the number of open files (-n)
+# and the maximum amount off locked memory (-l)
+# See bug #459142
+#rc_ulimit="-n 32786 -l 82000"
diff --git a/www-servers/varnish/files/varnishd.confd-r4 b/www-servers/varnish/files/varnishd.confd-r4
new file mode 100644
index 000000000000..1a18b648541a
--- /dev/null
+++ b/www-servers/varnish/files/varnishd.confd-r4
@@ -0,0 +1,18 @@
+# /etc/conf.d/varnishd
+
+VARNISHD="/usr/sbin/varnishd"
+VARNISHADM="/usr/bin/varnishadm"
+
+#CONFIGFILES="/etc/varnish/${SVCNAME}.vcl"
+CONFIGFILE="/etc/varnish/default.vcl"
+
+# Listen on 127.0.0.1:8080 and connect to backend 127.0.0.1:80
+#VARNISHD_OPTS="-a 127.0.0.1:8080 -a 127.0.0.1:8080"
+
+# Alternatively, don't listen to a backend
+VARNISHD_OPTS="-a 127.0.0.1:8080"
+
+# You may need to increase the number of open files (-n)
+# and the maximum amount off locked memory (-l)
+# See bug #459142
+#rc_ulimit="-n 32786 -l 82000"
diff --git a/www-servers/varnish/files/varnishd.initd-r3 b/www-servers/varnish/files/varnishd.initd-r3
new file mode 100644
index 000000000000..ff8eaf691ea3
--- /dev/null
+++ b/www-servers/varnish/files/varnishd.initd-r3
@@ -0,0 +1,77 @@
+#!/sbin/openrc-run
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+VARNISHD_PID=${VARNISHD_PID:-/run/${SVCNAME}.pid}
+CONFIGFILES="${CONFIGFILE:-/etc/varnish/default.vcl}"
+
+command="${VARNISHD:-/usr/sbin/varnishd}"
+command_args="-P ${VARNISHD_PID} -f ${CONFIGFILE} ${VARNISHD_OPTS}"
+pidfile="${VARNISHD_PID}"
+
+extra_commands="configtest"
+extra_started_commands="reload"
+
+description_configtest="Run syntax tests for configuration files."
+description_reload="Reloads the configuration."
+
+depend() {
+ need net
+}
+
+configtest() {
+ ebegin "Checking ${SVCNAME} configuration"
+ checkconfig
+ eend $?
+}
+
+checkconfig() {
+ ${VARNISHD} -C -f ${CONFIGFILE} >/dev/null 2>&1
+ ret=$?
+ if [ $ret -ne 0 ]; then
+ eerror "${SVCNAME} has detected an error in your setup:"
+ ${VARNISHD} -C -f ${CONFIGFILE}
+ fi
+
+ return $ret
+}
+
+start_pre() {
+ checkconfig || return 1
+}
+
+stop_pre() {
+ if [ "${RC_CMD}" = "restart" ]; then
+ checkconfig || return 1
+ fi
+}
+
+reload() {
+ checkconfig || return 1
+
+ ebegin "Reloading varnish"
+
+ $VARNISHADM vcl.list >/dev/null 2>&1
+ ret=$?
+ if [ $ret -ne 0 ]; then
+ eerror "${SVCNAME} cannot list configuration"
+ return 1
+ fi
+
+ new_config="reload_$(date +%FT%H:%M:%S)"
+ $VARNISHADM vcl.load $new_config $CONFIGFILE >/dev/null 2>&1
+ ret=$?
+ if [ $ret -ne 0 ]; then
+ eerror "${SVCNAME} cannot load configuration"
+ return 1
+ fi
+
+ $VARNISHADM vcl.use $new_config >/dev/null 2>&1
+ ret=$?
+ if [ $ret -ne 0 ]; then
+ eerror "${SVCNAME} cannot switch configuration"
+ return 1
+ fi
+
+ eend 0
+}
diff --git a/www-servers/varnish/files/varnishd.initd-r4 b/www-servers/varnish/files/varnishd.initd-r4
new file mode 100644
index 000000000000..4bc5061d2356
--- /dev/null
+++ b/www-servers/varnish/files/varnishd.initd-r4
@@ -0,0 +1,77 @@
+#!/sbin/openrc-run
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+VARNISHD_PID=${VARNISHD_PID:-/run/${SVCNAME}.pid}
+CONFIGFILES="${CONFIGFILE:-/etc/varnish/default.vcl}"
+
+command="${VARNISHD:-/usr/sbin/varnishd}"
+command_args="-j unix,user=varnish -P ${VARNISHD_PID} -f ${CONFIGFILE} ${VARNISHD_OPTS}"
+pidfile="${VARNISHD_PID}"
+
+extra_commands="configtest"
+extra_started_commands="reload"
+
+description_configtest="Run syntax tests for configuration files."
+description_reload="Reloads the configuration."
+
+depend() {
+ need net
+}
+
+configtest() {
+ ebegin "Checking ${SVCNAME} configuration"
+ checkconfig
+ eend $?
+}
+
+checkconfig() {
+ ${VARNISHD} -C -f ${CONFIGFILE} >/dev/null 2>&1
+ ret=$?
+ if [ $ret -ne 0 ]; then
+ eerror "${SVCNAME} has detected an error in your setup:"
+ ${VARNISHD} -C -f ${CONFIGFILE}
+ fi
+
+ return $ret
+}
+
+start_pre() {
+ checkconfig || return 1
+}
+
+stop_pre() {
+ if [ "${RC_CMD}" = "restart" ]; then
+ checkconfig || return 1
+ fi
+}
+
+reload() {
+ checkconfig || return 1
+
+ ebegin "Reloading varnish"
+
+ $VARNISHADM vcl.list >/dev/null 2>&1
+ ret=$?
+ if [ $ret -ne 0 ]; then
+ eerror "${SVCNAME} cannot list configuration"
+ return 1
+ fi
+
+ new_config="reload_$(date +%FT%H:%M:%S)"
+ $VARNISHADM vcl.load $new_config $CONFIGFILE >/dev/null 2>&1
+ ret=$?
+ if [ $ret -ne 0 ]; then
+ eerror "${SVCNAME} cannot load configuration"
+ return 1
+ fi
+
+ $VARNISHADM vcl.use $new_config >/dev/null 2>&1
+ ret=$?
+ if [ $ret -ne 0 ]; then
+ eerror "${SVCNAME} cannot switch configuration"
+ return 1
+ fi
+
+ eend 0
+}
diff --git a/www-servers/varnish/files/varnishd.logrotate-r2 b/www-servers/varnish/files/varnishd.logrotate-r2
new file mode 100644
index 000000000000..e697e428f3dd
--- /dev/null
+++ b/www-servers/varnish/files/varnishd.logrotate-r2
@@ -0,0 +1,31 @@
+/var/log/varnish/varnishncsa.log {
+ daily
+ rotate 31
+ copytruncate
+ dateext
+ dateyesterday
+ delaycompress
+ compress
+ notifempty
+ missingok
+
+ prerotate
+ /etc/init.d/varnishncsa -q status && /etc/init.d/varnishncsa -q flush
+ endscript
+}
+
+/var/log/varnish/varnishlog.log {
+ daily
+ rotate 31
+ copytruncate
+ dateext
+ dateyesterday
+ delaycompress
+ compress
+ notifempty
+ missingok
+
+ prerotate
+ /etc/init.d/varnishlog -q status && /etc/init.d/varnishlog -q flush
+ endscript
+}
diff --git a/www-servers/varnish/files/varnishd.service b/www-servers/varnish/files/varnishd.service
new file mode 100644
index 000000000000..a45f1e247839
--- /dev/null
+++ b/www-servers/varnish/files/varnishd.service
@@ -0,0 +1,16 @@
+[Unit]
+Description=Varnish is a high-performance HTTP accelerator
+After=network.target
+
+[Service]
+Type=forking
+LimitNOFILE=32786
+LimitMEMLOCK=82000
+PIDFile=/var/run/varnishd.pid
+ExecStart=/usr/sbin/varnishd -a 0.0.0.0:80 -P /var/run/varnishd.pid
+
+#If you wish to use a config file, then use the following ExecStart line
+#ExecStart=/usr/sbin/varnishd -a 0.0.0.0:80 -f /etc/varnish/default.vcl -P /var/run/varnishd.pid
+
+[Install]
+WantedBy=multi-user.target
diff --git a/www-servers/varnish/files/varnishlog.confd b/www-servers/varnish/files/varnishlog.confd
new file mode 100644
index 000000000000..d7358b1dc898
--- /dev/null
+++ b/www-servers/varnish/files/varnishlog.confd
@@ -0,0 +1,3 @@
+# /etc/conf.d/varnishlog
+
+VARNISHLOG_OPTS="-a -w /var/log/varnish/varnishlog.log"
diff --git a/www-servers/varnish/files/varnishlog.initd b/www-servers/varnish/files/varnishlog.initd
new file mode 100644
index 000000000000..ebbf52ec4da3
--- /dev/null
+++ b/www-servers/varnish/files/varnishlog.initd
@@ -0,0 +1,31 @@
+#!/sbin/openrc-run
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+VARNISHLOG_PID=${VARNISHLOG_PID:-/run/${SVCNAME}.pid}
+
+command="${VARNISHLOG:-/usr/bin/varnishlog}"
+command_args="-D -P ${VARNISHLOG_PID} ${VARNISHLOG_OPTS}"
+pidfile="${VARNISHLOG_PID}"
+
+extra_started_commands="reload rotate flush"
+
+description_rotate="Rotate the log file"
+description_flush="Flush any outstanding transactions"
+
+rotate() {
+ ebegin "Rotating log file"
+ start-stop-daemon -p ${VARNISHLOG_PID} -s SIGHUP
+ eend $?
+}
+
+flush() {
+ ebegin "Flushing any outstanding transactions"
+ start-stop-daemon -p ${VARNISHLOG_PID} -s SIGUSR1
+ eend $?
+}
+
+reload() {
+ flush
+ rotate
+}
diff --git a/www-servers/varnish/files/varnishncsa.confd b/www-servers/varnish/files/varnishncsa.confd
new file mode 100644
index 000000000000..f3112fdd532a
--- /dev/null
+++ b/www-servers/varnish/files/varnishncsa.confd
@@ -0,0 +1,3 @@
+# /etc/conf.d/varnishncsa
+
+VARNISHNCSA_OPTS="-a -w /var/log/varnish/${SVCNAME}.log"
diff --git a/www-servers/varnish/files/varnishncsa.initd b/www-servers/varnish/files/varnishncsa.initd
new file mode 100644
index 000000000000..e9c0001736eb
--- /dev/null
+++ b/www-servers/varnish/files/varnishncsa.initd
@@ -0,0 +1,31 @@
+#!/sbin/openrc-run
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+VARNISHNCSA_PID=${VARNISHNCSA_PID:-/run/${SVCNAME}.pid}
+
+command="${VARNISHNCSA:-/usr/bin/varnishncsa}"
+command_args="-D -P ${VARNISHNCSA_PID} ${VARNISHNCSA_OPTS}"
+pidfile="${VARNISHNCSA_PID}"
+
+extra_started_commands="reload rotate flush"
+
+description_rotate="Rotate the log file"
+description_flush="Flush any outstanding transactions"
+
+rotate() {
+ ebegin "Rotating log file"
+ start-stop-daemon -p ${VARNISHNCSA_PID} -s SIGHUP
+ eend $?
+}
+
+flush() {
+ ebegin "Flushing any outstanding transactions"
+ start-stop-daemon -p ${VARNISHNCSA_PID} -s SIGUSR1
+ eend $?
+}
+
+reload() {
+ flush
+ rotate
+}
diff --git a/www-servers/varnish/files/varnishncsa.initd-r1 b/www-servers/varnish/files/varnishncsa.initd-r1
new file mode 100644
index 000000000000..8a584decc965
--- /dev/null
+++ b/www-servers/varnish/files/varnishncsa.initd-r1
@@ -0,0 +1,44 @@
+#!/sbin/openrc-run
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+VARNISHNCSA_PID=${VARNISHNCSA_PID:-/run/${SVCNAME}.pid}
+
+command="${VARNISHNCSA:-/usr/bin/varnishncsa}"
+command_args="-D -P ${VARNISHNCSA_PID} ${VARNISHNCSA_OPTS}"
+pidfile="${VARNISHNCSA_PID}"
+
+extra_started_commands="reload rotate flush"
+
+description_rotate="Rotate the log file"
+description_flush="Flush any outstanding transactions"
+
+# We need to make sure varnishd has started first, bug #524284
+start_pre() {
+ TIMEOUT=${TIMEOUT:-5}
+
+ local i=0
+ while [ $i -lt ${TIMEOUT} ]; do
+ echo status | varnishadm 2>/dev/null | grep -q "Child in state running"
+ test $? -eq 0 && break
+
+ sleep 1 && i=$(expr $i + 1)
+ done
+}
+
+rotate() {
+ ebegin "Rotating log file"
+ start-stop-daemon -p ${VARNISHNCSA_PID} -s SIGHUP
+ eend $?
+}
+
+flush() {
+ ebegin "Flushing any outstanding transactions"
+ start-stop-daemon -p ${VARNISHNCSA_PID} -s SIGUSR1
+ eend $?
+}
+
+reload() {
+ flush
+ rotate
+}
diff --git a/www-servers/varnish/metadata.xml b/www-servers/varnish/metadata.xml
new file mode 100644
index 000000000000..fa6c19836485
--- /dev/null
+++ b/www-servers/varnish/metadata.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>blueness@gentoo.org</email>
+ <name>Anthony G. Basile</name>
+ </maintainer>
+ <maintainer type="person">
+ <email>idl0r@gentoo.org</email>
+ <name>Christian Ruppert</name>
+ <description>Secondary maintainer</description>
+ </maintainer>
+ <use>
+ <flag name="jemalloc">Use dev-libs/jemalloc for allocations</flag>
+ </use>
+ <longdescription lang="en">
+ Varnish is an HTTP accelerator. An HTTP accelerator (often called Reverse Proxy)
+ is an application that stores (caches) documents that have been requested over
+ the HTTP protocol.
+ Based on certain criteria the next client requesting the document is either
+ given the cached document, or a "fresh" document requested from a backend
+ server. The purpose of this is to minimize the requests going to the backend
+ server(s) by serving the same document to potentially many users.
+
+ The goal of Varnish is to be a very fast, stable and effective light-weight HTTP
+ accelerator daemon, by using modern and effective technologies. Ease of
+ managment and good documentation is also a main goal of the project since the
+ lack of either one will render Varnish useless.
+ </longdescription>
+</pkgmetadata>
diff --git a/www-servers/varnish/varnish-4.0.5.ebuild b/www-servers/varnish/varnish-4.0.5.ebuild
new file mode 100644
index 000000000000..5240acf564bf
--- /dev/null
+++ b/www-servers/varnish/varnish-4.0.5.ebuild
@@ -0,0 +1,97 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+PYTHON_COMPAT=( python{2_7,3_4} pypy )
+
+inherit user autotools systemd python-r1
+
+DESCRIPTION="Varnish is a state-of-the-art, high-performance HTTP accelerator"
+HOMEPAGE="http://www.varnish-cache.org/"
+SRC_URI="http://repo.varnish-cache.org/source/${P}.tar.gz"
+
+LICENSE="BSD-2 GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~mips x86"
+IUSE="jemalloc jit static-libs"
+
+CDEPEND="
+ sys-libs/readline:0=
+ dev-libs/libpcre[jit?]
+ jemalloc? ( dev-libs/jemalloc )
+ sys-libs/ncurses:0="
+
+#varnish compiles stuff at run time
+RDEPEND="
+ ${PYTHON_DEPS}
+ ${CDEPEND}
+ sys-devel/gcc"
+
+DEPEND="
+ ${CDEPEND}
+ dev-python/docutils
+ virtual/pkgconfig"
+
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+RESTRICT="test" #315725
+
+pkg_setup() {
+ ebegin "Creating varnish user and group"
+ enewgroup varnish
+ enewuser varnish -1 -1 /var/lib/varnish varnish
+ eend $?
+}
+
+src_prepare() {
+ # Remove bundled libjemalloc. We also fix
+ # automagic dep in our patches, bug #461638
+ rm -rf lib/libjemalloc
+
+ eapply_user
+
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ $(use_enable static-libs static) \
+ $(use_enable jit pcre-jit ) \
+ $(use_with jemalloc)
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+
+ python_replicate_script "${D}/usr/share/varnish/vmodtool.py"
+
+ newinitd "${FILESDIR}"/varnishlog.initd varnishlog
+ newconfd "${FILESDIR}"/varnishlog.confd varnishlog
+
+ newinitd "${FILESDIR}"/varnishncsa.initd varnishncsa
+ newconfd "${FILESDIR}"/varnishncsa.confd varnishncsa
+
+ newinitd "${FILESDIR}"/varnishd.initd-r4 varnishd
+ newconfd "${FILESDIR}"/varnishd.confd-r4 varnishd
+
+ insinto /etc/logrotate.d/
+ newins "${FILESDIR}/varnishd.logrotate-r2" varnishd
+
+ diropts -m750
+
+ dodir /var/log/varnish/
+
+ systemd_dounit "${FILESDIR}/${PN}d.service"
+
+ insinto /etc/varnish/
+ doins lib/libvmod_std/vmod.vcc
+ doins etc/example.vcl
+
+ dodoc README
+ dodoc doc/changes.rst
+
+ fowners root:varnish /etc/varnish/
+ fowners varnish:varnish /var/lib/varnish/
+ fperms 0750 /var/lib/varnish/ /etc/varnish/
+}
diff --git a/www-servers/varnish/varnish-4.1.8.ebuild b/www-servers/varnish/varnish-4.1.8.ebuild
new file mode 100644
index 000000000000..dd30bd9dab1b
--- /dev/null
+++ b/www-servers/varnish/varnish-4.1.8.ebuild
@@ -0,0 +1,103 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+PYTHON_COMPAT=( python{2_7,3_4} pypy )
+
+inherit user autotools systemd python-r1
+
+DESCRIPTION="Varnish is a state-of-the-art, high-performance HTTP accelerator"
+HOMEPAGE="http://www.varnish-cache.org/"
+SRC_URI="http://repo.varnish-cache.org/source/${P}.tar.gz"
+
+LICENSE="BSD-2 GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~mips ~ppc ~ppc64 x86"
+IUSE="jemalloc jit static-libs"
+
+CDEPEND="
+ sys-libs/readline:0=
+ dev-libs/libpcre[jit?]
+ jemalloc? ( dev-libs/jemalloc )
+ sys-libs/ncurses:0="
+
+#varnish compiles stuff at run time
+RDEPEND="
+ ${PYTHON_DEPS}
+ ${CDEPEND}
+ sys-devel/gcc"
+
+DEPEND="
+ ${CDEPEND}
+ dev-python/docutils
+ virtual/pkgconfig"
+
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+RESTRICT="test" #315725
+
+pkg_setup() {
+ ebegin "Creating varnish user and group"
+ enewgroup varnish
+ enewuser varnish -1 -1 /var/lib/varnish varnish
+ eend $?
+}
+
+src_prepare() {
+ # Remove bundled libjemalloc. We also fix
+ # automagic dep in our patches, bug #461638
+ rm -rf lib/libjemalloc
+
+ # Fix bug #620952
+ eapply "${FILESDIR}"/fix-build-x86.patch
+
+ # Remove -Werror bug #528354
+ sed -i -e 's/-Werror\([^=]\)/\1/g' configure.ac
+
+ eapply_user
+
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ $(use_enable static-libs static) \
+ $(use_enable jit pcre-jit ) \
+ $(use_with jemalloc)
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+
+ python_replicate_script "${D}/usr/share/varnish/vmodtool.py"
+
+ newinitd "${FILESDIR}"/varnishlog.initd varnishlog
+ newconfd "${FILESDIR}"/varnishlog.confd varnishlog
+
+ newinitd "${FILESDIR}"/varnishncsa.initd varnishncsa
+ newconfd "${FILESDIR}"/varnishncsa.confd varnishncsa
+
+ newinitd "${FILESDIR}"/varnishd.initd-r4 varnishd
+ newconfd "${FILESDIR}"/varnishd.confd-r4 varnishd
+
+ insinto /etc/logrotate.d/
+ newins "${FILESDIR}/varnishd.logrotate-r2" varnishd
+
+ diropts -m750
+
+ dodir /var/log/varnish/
+
+ systemd_dounit "${FILESDIR}/${PN}d.service"
+
+ insinto /etc/varnish/
+ doins lib/libvmod_std/vmod.vcc
+ doins etc/example.vcl
+
+ dodoc README.rst
+ dodoc doc/changes.rst
+
+ fowners root:varnish /etc/varnish/
+ fowners varnish:varnish /var/lib/varnish/
+ fperms 0750 /var/lib/varnish/ /etc/varnish/
+}
diff --git a/www-servers/varnish/varnish-5.1.3.ebuild b/www-servers/varnish/varnish-5.1.3.ebuild
new file mode 100644
index 000000000000..d2bfc697e39f
--- /dev/null
+++ b/www-servers/varnish/varnish-5.1.3.ebuild
@@ -0,0 +1,101 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+PYTHON_COMPAT=( python{2_7,3_4,3_5,3_6} pypy )
+
+inherit user autotools systemd python-r1
+
+DESCRIPTION="Varnish is a state-of-the-art, high-performance HTTP accelerator"
+HOMEPAGE="http://www.varnish-cache.org/"
+SRC_URI="http://repo.varnish-cache.org/source/${P}.tar.gz"
+
+LICENSE="BSD-2 GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~mips ~ppc ~ppc64 x86"
+IUSE="jemalloc jit static-libs"
+
+CDEPEND="
+ sys-libs/readline:0=
+ dev-libs/libpcre[jit?]
+ jemalloc? ( dev-libs/jemalloc )
+ sys-libs/ncurses:0="
+
+#varnish compiles stuff at run time
+RDEPEND="
+ ${PYTHON_DEPS}
+ ${CDEPEND}
+ sys-devel/gcc"
+
+DEPEND="
+ ${CDEPEND}
+ dev-python/docutils
+ virtual/pkgconfig"
+
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+RESTRICT="test" #315725
+
+pkg_setup() {
+ ebegin "Creating varnish user and group"
+ enewgroup varnish
+ enewuser varnish -1 -1 /var/lib/varnish varnish
+ eend $?
+}
+
+src_prepare() {
+ # Remove -Werror bug #528354
+ sed -i -e 's/-Werror\([^=]\)/\1/g' configure.ac
+
+ # Upstream doesn't put varnish.m4 in the m4/ directory
+ # We link because the Makefiles look for the file in
+ # the original location
+ ln -sf ../varnish.m4 m4/varnish.m4
+
+ eapply_user
+
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ $(use_enable static-libs static) \
+ $(use_enable jit pcre-jit ) \
+ $(use_with jemalloc)
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+
+ python_replicate_script "${D}/usr/share/varnish/vmodtool.py"
+
+ newinitd "${FILESDIR}"/varnishlog.initd varnishlog
+ newconfd "${FILESDIR}"/varnishlog.confd varnishlog
+
+ newinitd "${FILESDIR}"/varnishncsa.initd varnishncsa
+ newconfd "${FILESDIR}"/varnishncsa.confd varnishncsa
+
+ newinitd "${FILESDIR}"/varnishd.initd-r4 varnishd
+ newconfd "${FILESDIR}"/varnishd.confd-r4 varnishd
+
+ insinto /etc/logrotate.d/
+ newins "${FILESDIR}/varnishd.logrotate-r2" varnishd
+
+ diropts -m750
+
+ dodir /var/log/varnish/
+
+ systemd_dounit "${FILESDIR}/${PN}d.service"
+
+ insinto /etc/varnish/
+ doins lib/libvmod_std/vmod.vcc
+ doins etc/example.vcl
+
+ dodoc README.rst
+ dodoc doc/changes.rst
+
+ fowners root:varnish /etc/varnish/
+ fowners varnish:varnish /var/lib/varnish/
+ fperms 0750 /var/lib/varnish/ /etc/varnish/
+}