diff options
author | Anthony G. Basile <blueness@gentoo.org> | 2016-01-29 05:42:19 -0500 |
---|---|---|
committer | Anthony G. Basile <blueness@gentoo.org> | 2016-01-29 05:42:19 -0500 |
commit | 1a9ede7eaa41f510c0f643de14ff712cce564c18 (patch) | |
tree | d7f34b02a2cfa12755e10892a1bbb70463bf2e17 /www-servers/varnish | |
parent | Merge remote-tracking branch 'remotes/sbraz/fail2ban' (diff) | |
download | gentoo-1a9ede7eaa41f510c0f643de14ff712cce564c18.tar.gz gentoo-1a9ede7eaa41f510c0f643de14ff712cce564c18.tar.bz2 gentoo-1a9ede7eaa41f510c0f643de14ff712cce564c18.zip |
www-servers/varnish: version bump to 4.1.1, fix bug #567756
Package-Manager: portage-2.2.26
Diffstat (limited to 'www-servers/varnish')
-rw-r--r-- | www-servers/varnish/Manifest | 1 | ||||
-rw-r--r-- | www-servers/varnish/files/varnishd.confd-r4 | 18 | ||||
-rw-r--r-- | www-servers/varnish/files/varnishd.initd-r4 | 78 | ||||
-rw-r--r-- | www-servers/varnish/varnish-4.1.1.ebuild | 105 |
4 files changed, 202 insertions, 0 deletions
diff --git a/www-servers/varnish/Manifest b/www-servers/varnish/Manifest index b6e8a478abab..320bb6adee17 100644 --- a/www-servers/varnish/Manifest +++ b/www-servers/varnish/Manifest @@ -1,3 +1,4 @@ DIST varnish-3.0.7.tar.gz 2102037 SHA256 a27e9f11391617fab27cc6edc31d3c8681b8d6975f8c2cd07f6e081bc54c24ce SHA512 5fa9749305eb1a546ef4aae8a1797247fcc9098e1661453b9b87916da9fbc60d76bc0de9542ab17136e3da4b256c8a547aded2b4372dbbb54c44e93eff34a061 WHIRLPOOL 00ff6d16603ba4bf42608d55d769048f35c275a8ffa2b6860df6de2571d0481c39019d58d5b843f8a64492a5bf26caf9d841a023826d2fd2771ed8d35447a659 DIST varnish-4.0.3.tar.gz 1866760 SHA256 94b9a174097f47db2286acd2c35f235e49a2b7a9ddfdbd6eb7aa4da9ae8f8206 SHA512 db7bb141afd4617ac95573983dc30591b0eb9bc1af06df1094f2c1eeac539da936afb4a239d2f446d3c3a51b88a781b7f9f6d9a0b2028eaf0e7049ea2159d883 WHIRLPOOL 942456e19be427859283959dabe5522667519d36decbc598c8ee1e949767ea7435469393289d4373db6abac5275e50a95fc3799a837dc17740a490b4912bfe6f DIST varnish-4.1.0.tar.gz 1990932 SHA256 4a6ea08e30b62fbf25f884a65f0d8af42e9cc9d25bf70f45ae4417c4f1c99017 SHA512 b50aaa41247b912b40307423f99ae519ae5e19bea3546b049f148661727887f06b3d27712e685c219ae18cb6d53d89b415ddbd10bada7cfac00b2fd995995f5c WHIRLPOOL ae462819521b2ad5df29e82a1966190b849eba2c0d9d146cf97c8a0dba325653c24a6c67ed8a154c1cb1cba6a1a25c78bfda6d83deff72ad7756a57725521d92 +DIST varnish-4.1.1.tar.gz 2009042 SHA256 1230ac1b87248b5a3f3fdfddc66cf080c7c4d80a97fcb44efa6286e5ccf8354f SHA512 8407fa049aafd3ae1c7dfe134a2ecaa10d1a0fb77359bd423cc97e90790eacf3b8a785926956a3d0842efbdeb1558ecb487181f093124b9698961f29d30f0b15 WHIRLPOOL 4766fb3fd1fd22382dd1316dab40ded1639567bb7afaff92675acec6b5d0bd561d706983aa34b54ed0a2bd1d9ffb1aab3cb62f6f7ac5e326ead169fa82e24e6b 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-r4 b/www-servers/varnish/files/varnishd.initd-r4 new file mode 100644 index 000000000000..b0ec918bb7ad --- /dev/null +++ b/www-servers/varnish/files/varnishd.initd-r4 @@ -0,0 +1,78 @@ +#!/sbin/runscript +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +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/varnish-4.1.1.ebuild b/www-servers/varnish/varnish-4.1.1.ebuild new file mode 100644 index 000000000000..52170ef8191b --- /dev/null +++ b/www-servers/varnish/varnish-4.1.1.ebuild @@ -0,0 +1,105 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="5" + +PYTHON_COMPAT=( python{2_7,3_3,3_4} pypy ) + +inherit user autotools-utils eutils 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=" + || ( dev-libs/libedit sys-libs/readline:= ) + dev-libs/libpcre[jit?] + jemalloc? ( dev-libs/jemalloc ) + sys-libs/ncurses:=" + +#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 + +DOCS=( README doc/changes.rst ) + +AUTOTOOLS_AUTORECONF="yes" + +pkg_setup() { + ebegin "Creating varnish user and group" + enewgroup varnish 40 + enewuser varnish 40 -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 + + autotools-utils_src_prepare +} + +src_configure() { + local myeconfargs=( + $(use_enable static-libs static) + $(use_enable jit pcre-jit ) + $(use_with jemalloc) + ) + autotools-utils_src_configure +} + +src_install() { + autotools-utils_src_install + + python_replicate_script "${D}/usr/share/varnish/vmodtool.py" + + newinitd "${FILESDIR}"/varnishlog.initd varnishlog + newconfd "${FILESDIR}"/varnishlog.confd varnishlog + + newinitd "${FILESDIR}"/varnishncsa.initd-r1 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 + + fowners root:varnish /etc/varnish/ + fowners varnish:varnish /var/lib/varnish/ + fperms 0750 /var/lib/varnish/ /etc/varnish/ +} + +pkg_postinst () { + elog "No demo-/sample-configfile is included in the distribution. Please" + elog "read the man-page for more info. A sample configuration proxying" + elog "localhost:8080 for localhost:80 is given in /etc/conf.d/varnishd." +} |