1 |
commit: 1a9ede7eaa41f510c0f643de14ff712cce564c18 |
2 |
Author: Anthony G. Basile <blueness <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Jan 29 10:42:19 2016 +0000 |
4 |
Commit: Anthony G. Basile <blueness <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Jan 29 10:42:19 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1a9ede7e |
7 |
|
8 |
www-servers/varnish: version bump to 4.1.1, fix bug #567756 |
9 |
|
10 |
Package-Manager: portage-2.2.26 |
11 |
|
12 |
www-servers/varnish/Manifest | 1 + |
13 |
www-servers/varnish/files/varnishd.confd-r4 | 18 +++++ |
14 |
www-servers/varnish/files/varnishd.initd-r4 | 78 +++++++++++++++++++++ |
15 |
www-servers/varnish/varnish-4.1.1.ebuild | 105 ++++++++++++++++++++++++++++ |
16 |
4 files changed, 202 insertions(+) |
17 |
|
18 |
diff --git a/www-servers/varnish/Manifest b/www-servers/varnish/Manifest |
19 |
index b6e8a47..320bb6a 100644 |
20 |
--- a/www-servers/varnish/Manifest |
21 |
+++ b/www-servers/varnish/Manifest |
22 |
@@ -1,3 +1,4 @@ |
23 |
DIST varnish-3.0.7.tar.gz 2102037 SHA256 a27e9f11391617fab27cc6edc31d3c8681b8d6975f8c2cd07f6e081bc54c24ce SHA512 5fa9749305eb1a546ef4aae8a1797247fcc9098e1661453b9b87916da9fbc60d76bc0de9542ab17136e3da4b256c8a547aded2b4372dbbb54c44e93eff34a061 WHIRLPOOL 00ff6d16603ba4bf42608d55d769048f35c275a8ffa2b6860df6de2571d0481c39019d58d5b843f8a64492a5bf26caf9d841a023826d2fd2771ed8d35447a659 |
24 |
DIST varnish-4.0.3.tar.gz 1866760 SHA256 94b9a174097f47db2286acd2c35f235e49a2b7a9ddfdbd6eb7aa4da9ae8f8206 SHA512 db7bb141afd4617ac95573983dc30591b0eb9bc1af06df1094f2c1eeac539da936afb4a239d2f446d3c3a51b88a781b7f9f6d9a0b2028eaf0e7049ea2159d883 WHIRLPOOL 942456e19be427859283959dabe5522667519d36decbc598c8ee1e949767ea7435469393289d4373db6abac5275e50a95fc3799a837dc17740a490b4912bfe6f |
25 |
DIST varnish-4.1.0.tar.gz 1990932 SHA256 4a6ea08e30b62fbf25f884a65f0d8af42e9cc9d25bf70f45ae4417c4f1c99017 SHA512 b50aaa41247b912b40307423f99ae519ae5e19bea3546b049f148661727887f06b3d27712e685c219ae18cb6d53d89b415ddbd10bada7cfac00b2fd995995f5c WHIRLPOOL ae462819521b2ad5df29e82a1966190b849eba2c0d9d146cf97c8a0dba325653c24a6c67ed8a154c1cb1cba6a1a25c78bfda6d83deff72ad7756a57725521d92 |
26 |
+DIST varnish-4.1.1.tar.gz 2009042 SHA256 1230ac1b87248b5a3f3fdfddc66cf080c7c4d80a97fcb44efa6286e5ccf8354f SHA512 8407fa049aafd3ae1c7dfe134a2ecaa10d1a0fb77359bd423cc97e90790eacf3b8a785926956a3d0842efbdeb1558ecb487181f093124b9698961f29d30f0b15 WHIRLPOOL 4766fb3fd1fd22382dd1316dab40ded1639567bb7afaff92675acec6b5d0bd561d706983aa34b54ed0a2bd1d9ffb1aab3cb62f6f7ac5e326ead169fa82e24e6b |
27 |
|
28 |
diff --git a/www-servers/varnish/files/varnishd.confd-r4 b/www-servers/varnish/files/varnishd.confd-r4 |
29 |
new file mode 100644 |
30 |
index 0000000..1a18b64 |
31 |
--- /dev/null |
32 |
+++ b/www-servers/varnish/files/varnishd.confd-r4 |
33 |
@@ -0,0 +1,18 @@ |
34 |
+# /etc/conf.d/varnishd |
35 |
+ |
36 |
+VARNISHD="/usr/sbin/varnishd" |
37 |
+VARNISHADM="/usr/bin/varnishadm" |
38 |
+ |
39 |
+#CONFIGFILES="/etc/varnish/${SVCNAME}.vcl" |
40 |
+CONFIGFILE="/etc/varnish/default.vcl" |
41 |
+ |
42 |
+# Listen on 127.0.0.1:8080 and connect to backend 127.0.0.1:80 |
43 |
+#VARNISHD_OPTS="-a 127.0.0.1:8080 -a 127.0.0.1:8080" |
44 |
+ |
45 |
+# Alternatively, don't listen to a backend |
46 |
+VARNISHD_OPTS="-a 127.0.0.1:8080" |
47 |
+ |
48 |
+# You may need to increase the number of open files (-n) |
49 |
+# and the maximum amount off locked memory (-l) |
50 |
+# See bug #459142 |
51 |
+#rc_ulimit="-n 32786 -l 82000" |
52 |
|
53 |
diff --git a/www-servers/varnish/files/varnishd.initd-r4 b/www-servers/varnish/files/varnishd.initd-r4 |
54 |
new file mode 100644 |
55 |
index 0000000..b0ec918 |
56 |
--- /dev/null |
57 |
+++ b/www-servers/varnish/files/varnishd.initd-r4 |
58 |
@@ -0,0 +1,78 @@ |
59 |
+#!/sbin/runscript |
60 |
+# Copyright 1999-2014 Gentoo Foundation |
61 |
+# Distributed under the terms of the GNU General Public License v2 |
62 |
+# $Id$ |
63 |
+ |
64 |
+VARNISHD_PID=${VARNISHD_PID:-/run/${SVCNAME}.pid} |
65 |
+CONFIGFILES="${CONFIGFILE:-/etc/varnish/default.vcl}" |
66 |
+ |
67 |
+command="${VARNISHD:-/usr/sbin/varnishd}" |
68 |
+command_args="-j unix,user=varnish -P ${VARNISHD_PID} -f ${CONFIGFILE} ${VARNISHD_OPTS}" |
69 |
+pidfile="${VARNISHD_PID}" |
70 |
+ |
71 |
+extra_commands="configtest" |
72 |
+extra_started_commands="reload" |
73 |
+ |
74 |
+description_configtest="Run syntax tests for configuration files." |
75 |
+description_reload="Reloads the configuration." |
76 |
+ |
77 |
+depend() { |
78 |
+ need net |
79 |
+} |
80 |
+ |
81 |
+configtest() { |
82 |
+ ebegin "Checking ${SVCNAME} configuration" |
83 |
+ checkconfig |
84 |
+ eend $? |
85 |
+} |
86 |
+ |
87 |
+checkconfig() { |
88 |
+ ${VARNISHD} -C -f ${CONFIGFILE} >/dev/null 2>&1 |
89 |
+ ret=$? |
90 |
+ if [ $ret -ne 0 ]; then |
91 |
+ eerror "${SVCNAME} has detected an error in your setup:" |
92 |
+ ${VARNISHD} -C -f ${CONFIGFILE} |
93 |
+ fi |
94 |
+ |
95 |
+ return $ret |
96 |
+} |
97 |
+ |
98 |
+start_pre() { |
99 |
+ checkconfig || return 1 |
100 |
+} |
101 |
+ |
102 |
+stop_pre() { |
103 |
+ if [ "${RC_CMD}" = "restart" ]; then |
104 |
+ checkconfig || return 1 |
105 |
+ fi |
106 |
+} |
107 |
+ |
108 |
+reload() { |
109 |
+ checkconfig || return 1 |
110 |
+ |
111 |
+ ebegin "Reloading varnish" |
112 |
+ |
113 |
+ $VARNISHADM vcl.list >/dev/null 2>&1 |
114 |
+ ret=$? |
115 |
+ if [ $ret -ne 0 ]; then |
116 |
+ eerror "${SVCNAME} cannot list configuration" |
117 |
+ return 1 |
118 |
+ fi |
119 |
+ |
120 |
+ new_config="reload_$(date +%FT%H:%M:%S)" |
121 |
+ $VARNISHADM vcl.load $new_config $CONFIGFILE >/dev/null 2>&1 |
122 |
+ ret=$? |
123 |
+ if [ $ret -ne 0 ]; then |
124 |
+ eerror "${SVCNAME} cannot load configuration" |
125 |
+ return 1 |
126 |
+ fi |
127 |
+ |
128 |
+ $VARNISHADM vcl.use $new_config >/dev/null 2>&1 |
129 |
+ ret=$? |
130 |
+ if [ $ret -ne 0 ]; then |
131 |
+ eerror "${SVCNAME} cannot switch configuration" |
132 |
+ return 1 |
133 |
+ fi |
134 |
+ |
135 |
+ eend 0 |
136 |
+} |
137 |
|
138 |
diff --git a/www-servers/varnish/varnish-4.1.1.ebuild b/www-servers/varnish/varnish-4.1.1.ebuild |
139 |
new file mode 100644 |
140 |
index 0000000..52170ef |
141 |
--- /dev/null |
142 |
+++ b/www-servers/varnish/varnish-4.1.1.ebuild |
143 |
@@ -0,0 +1,105 @@ |
144 |
+# Copyright 1999-2016 Gentoo Foundation |
145 |
+# Distributed under the terms of the GNU General Public License v2 |
146 |
+# $Id$ |
147 |
+ |
148 |
+EAPI="5" |
149 |
+ |
150 |
+PYTHON_COMPAT=( python{2_7,3_3,3_4} pypy ) |
151 |
+ |
152 |
+inherit user autotools-utils eutils systemd python-r1 |
153 |
+ |
154 |
+DESCRIPTION="Varnish is a state-of-the-art, high-performance HTTP accelerator" |
155 |
+HOMEPAGE="http://www.varnish-cache.org/" |
156 |
+SRC_URI="http://repo.varnish-cache.org/source/${P}.tar.gz" |
157 |
+ |
158 |
+LICENSE="BSD-2 GPL-2" |
159 |
+SLOT="0" |
160 |
+KEYWORDS="~amd64 ~mips ~x86" |
161 |
+IUSE="jemalloc jit static-libs" |
162 |
+ |
163 |
+CDEPEND=" |
164 |
+ || ( dev-libs/libedit sys-libs/readline:= ) |
165 |
+ dev-libs/libpcre[jit?] |
166 |
+ jemalloc? ( dev-libs/jemalloc ) |
167 |
+ sys-libs/ncurses:=" |
168 |
+ |
169 |
+#varnish compiles stuff at run time |
170 |
+RDEPEND=" |
171 |
+ ${PYTHON_DEPS} |
172 |
+ ${CDEPEND} |
173 |
+ sys-devel/gcc" |
174 |
+ |
175 |
+DEPEND=" |
176 |
+ ${CDEPEND} |
177 |
+ dev-python/docutils |
178 |
+ virtual/pkgconfig" |
179 |
+ |
180 |
+REQUIRED_USE="${PYTHON_REQUIRED_USE}" |
181 |
+ |
182 |
+RESTRICT="test" #315725 |
183 |
+ |
184 |
+DOCS=( README doc/changes.rst ) |
185 |
+ |
186 |
+AUTOTOOLS_AUTORECONF="yes" |
187 |
+ |
188 |
+pkg_setup() { |
189 |
+ ebegin "Creating varnish user and group" |
190 |
+ enewgroup varnish 40 |
191 |
+ enewuser varnish 40 -1 /var/lib/varnish varnish |
192 |
+ eend $? |
193 |
+} |
194 |
+ |
195 |
+src_prepare() { |
196 |
+ # Remove bundled libjemalloc. We also fix |
197 |
+ # automagic dep in our patches, bug #461638 |
198 |
+ rm -rf lib/libjemalloc |
199 |
+ |
200 |
+ autotools-utils_src_prepare |
201 |
+} |
202 |
+ |
203 |
+src_configure() { |
204 |
+ local myeconfargs=( |
205 |
+ $(use_enable static-libs static) |
206 |
+ $(use_enable jit pcre-jit ) |
207 |
+ $(use_with jemalloc) |
208 |
+ ) |
209 |
+ autotools-utils_src_configure |
210 |
+} |
211 |
+ |
212 |
+src_install() { |
213 |
+ autotools-utils_src_install |
214 |
+ |
215 |
+ python_replicate_script "${D}/usr/share/varnish/vmodtool.py" |
216 |
+ |
217 |
+ newinitd "${FILESDIR}"/varnishlog.initd varnishlog |
218 |
+ newconfd "${FILESDIR}"/varnishlog.confd varnishlog |
219 |
+ |
220 |
+ newinitd "${FILESDIR}"/varnishncsa.initd-r1 varnishncsa |
221 |
+ newconfd "${FILESDIR}"/varnishncsa.confd varnishncsa |
222 |
+ |
223 |
+ newinitd "${FILESDIR}"/varnishd.initd-r4 varnishd |
224 |
+ newconfd "${FILESDIR}"/varnishd.confd-r4 varnishd |
225 |
+ |
226 |
+ insinto /etc/logrotate.d/ |
227 |
+ newins "${FILESDIR}/varnishd.logrotate-r2" varnishd |
228 |
+ |
229 |
+ diropts -m750 |
230 |
+ |
231 |
+ dodir /var/log/varnish/ |
232 |
+ |
233 |
+ systemd_dounit "${FILESDIR}/${PN}d.service" |
234 |
+ |
235 |
+ insinto /etc/varnish/ |
236 |
+ doins lib/libvmod_std/vmod.vcc |
237 |
+ doins etc/example.vcl |
238 |
+ |
239 |
+ fowners root:varnish /etc/varnish/ |
240 |
+ fowners varnish:varnish /var/lib/varnish/ |
241 |
+ fperms 0750 /var/lib/varnish/ /etc/varnish/ |
242 |
+} |
243 |
+ |
244 |
+pkg_postinst () { |
245 |
+ elog "No demo-/sample-configfile is included in the distribution. Please" |
246 |
+ elog "read the man-page for more info. A sample configuration proxying" |
247 |
+ elog "localhost:8080 for localhost:80 is given in /etc/conf.d/varnishd." |
248 |
+} |