From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id DC3E758974 for ; Fri, 29 Jan 2016 10:34:04 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id AE9B4E086F; Fri, 29 Jan 2016 10:34:02 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 30CFAE086F for ; Fri, 29 Jan 2016 10:34:02 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id C2693340AE2 for ; Fri, 29 Jan 2016 10:34:00 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 2F6898DA for ; Fri, 29 Jan 2016 10:33:58 +0000 (UTC) From: "Anthony G. Basile" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Anthony G. Basile" Message-ID: <1454064139.1a9ede7eaa41f510c0f643de14ff712cce564c18.blueness@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: www-servers/varnish/, www-servers/varnish/files/ X-VCS-Repository: repo/gentoo X-VCS-Files: www-servers/varnish/Manifest www-servers/varnish/files/varnishd.confd-r4 www-servers/varnish/files/varnishd.initd-r4 www-servers/varnish/varnish-4.1.1.ebuild X-VCS-Directories: www-servers/varnish/files/ www-servers/varnish/ X-VCS-Committer: blueness X-VCS-Committer-Name: Anthony G. Basile X-VCS-Revision: 1a9ede7eaa41f510c0f643de14ff712cce564c18 X-VCS-Branch: master Date: Fri, 29 Jan 2016 10:33:58 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: f1b78bff-5924-4e3d-be56-03b727845254 X-Archives-Hash: 6ff62cee5ffa797561927921d142a3b9 commit: 1a9ede7eaa41f510c0f643de14ff712cce564c18 Author: Anthony G. Basile gentoo org> AuthorDate: Fri Jan 29 10:42:19 2016 +0000 Commit: Anthony G. Basile gentoo org> CommitDate: Fri Jan 29 10:42:19 2016 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1a9ede7e www-servers/varnish: version bump to 4.1.1, fix bug #567756 Package-Manager: portage-2.2.26 www-servers/varnish/Manifest | 1 + www-servers/varnish/files/varnishd.confd-r4 | 18 +++++ www-servers/varnish/files/varnishd.initd-r4 | 78 +++++++++++++++++++++ www-servers/varnish/varnish-4.1.1.ebuild | 105 ++++++++++++++++++++++++++++ 4 files changed, 202 insertions(+) diff --git a/www-servers/varnish/Manifest b/www-servers/varnish/Manifest index b6e8a47..320bb6a 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 0000000..1a18b64 --- /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 0000000..b0ec918 --- /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 0000000..52170ef --- /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." +}