Accepting request 602965 from server:http
- Update to new upstream release 6.0.0 OBS-URL: https://build.opensuse.org/request/show/602965 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/varnish?expand=0&rev=24
This commit is contained in:
commit
54fcbe132f
@ -10,9 +10,28 @@ upgraded in a future release (see commit 5fae561 on master branch at
|
|||||||
https://github.com/varnishcache/varnish-cache/commit/5fae561).
|
https://github.com/varnishcache/varnish-cache/commit/5fae561).
|
||||||
|
|
||||||
--
|
--
|
||||||
diff -up varnish-5.1.2/lib/libvgz/infback.c.orig varnish-5.1.2/lib/libvgz/infback.c
|
---
|
||||||
--- varnish-5.1.2/lib/libvgz/infback.c.orig 2017-06-25 18:25:04.558206683 +0200
|
bin/varnishadm/varnishadm.c | 1 +
|
||||||
+++ varnish-5.1.2/lib/libvgz/infback.c 2017-06-25 18:25:16.410207203 +0200
|
lib/libvgz/infback.c | 1 +
|
||||||
|
lib/libvgz/inflate.c | 18 ++++++++++++++++++
|
||||||
|
3 files changed, 20 insertions(+)
|
||||||
|
|
||||||
|
Index: varnish-6.0.0/bin/varnishadm/varnishadm.c
|
||||||
|
===================================================================
|
||||||
|
--- varnish-6.0.0.orig/bin/varnishadm/varnishadm.c
|
||||||
|
+++ varnish-6.0.0/bin/varnishadm/varnishadm.c
|
||||||
|
@@ -452,6 +452,7 @@ main(int argc, char * const *argv)
|
||||||
|
case 'h':
|
||||||
|
/* Usage help */
|
||||||
|
usage(0);
|
||||||
|
+ break;
|
||||||
|
case 'n':
|
||||||
|
n_arg = optarg;
|
||||||
|
break;
|
||||||
|
Index: varnish-6.0.0/lib/libvgz/infback.c
|
||||||
|
===================================================================
|
||||||
|
--- varnish-6.0.0.orig/lib/libvgz/infback.c
|
||||||
|
+++ varnish-6.0.0/lib/libvgz/infback.c
|
||||||
@@ -477,6 +477,7 @@ void FAR *out_desc;
|
@@ -477,6 +477,7 @@ void FAR *out_desc;
|
||||||
}
|
}
|
||||||
Tracev((stderr, "inflate: codes ok\n"));
|
Tracev((stderr, "inflate: codes ok\n"));
|
||||||
@ -21,18 +40,19 @@ diff -up varnish-5.1.2/lib/libvgz/infback.c.orig varnish-5.1.2/lib/libvgz/infbac
|
|||||||
|
|
||||||
case LEN:
|
case LEN:
|
||||||
/* use inflate_fast() if we have enough input and output */
|
/* use inflate_fast() if we have enough input and output */
|
||||||
diff -up varnish-5.1.2/lib/libvgz/inflate.c.orig varnish-5.1.2/lib/libvgz/inflate.c
|
Index: varnish-6.0.0/lib/libvgz/inflate.c
|
||||||
--- varnish-5.1.2/lib/libvgz/inflate.c.orig 2017-06-25 18:24:51.234206098 +0200
|
===================================================================
|
||||||
+++ varnish-5.1.2/lib/libvgz/inflate.c 2017-06-25 18:25:42.098208329 +0200
|
--- varnish-6.0.0.orig/lib/libvgz/inflate.c
|
||||||
@@ -719,6 +719,7 @@ int flush;
|
+++ varnish-6.0.0/lib/libvgz/inflate.c
|
||||||
if (state->flags & 0x0200) CRC2(state->check, hold);
|
@@ -747,6 +747,7 @@ int flush;
|
||||||
|
CRC2(state->check, hold);
|
||||||
INITBITS();
|
INITBITS();
|
||||||
state->mode = EXLEN;
|
state->mode = EXLEN;
|
||||||
+ /* FALLTHROUGH */
|
+ /* FALLTHROUGH */
|
||||||
case EXLEN:
|
case EXLEN:
|
||||||
if (state->flags & 0x0400) {
|
if (state->flags & 0x0400) {
|
||||||
NEEDBITS(16);
|
NEEDBITS(16);
|
||||||
@@ -731,6 +732,7 @@ int flush;
|
@@ -760,6 +761,7 @@ int flush;
|
||||||
else if (state->head != Z_NULL)
|
else if (state->head != Z_NULL)
|
||||||
state->head->extra = Z_NULL;
|
state->head->extra = Z_NULL;
|
||||||
state->mode = EXTRA;
|
state->mode = EXTRA;
|
||||||
@ -40,7 +60,7 @@ diff -up varnish-5.1.2/lib/libvgz/inflate.c.orig varnish-5.1.2/lib/libvgz/inflat
|
|||||||
case EXTRA:
|
case EXTRA:
|
||||||
if (state->flags & 0x0400) {
|
if (state->flags & 0x0400) {
|
||||||
copy = state->length;
|
copy = state->length;
|
||||||
@@ -753,6 +755,7 @@ int flush;
|
@@ -782,6 +784,7 @@ int flush;
|
||||||
}
|
}
|
||||||
state->length = 0;
|
state->length = 0;
|
||||||
state->mode = NAME;
|
state->mode = NAME;
|
||||||
@ -48,7 +68,7 @@ diff -up varnish-5.1.2/lib/libvgz/inflate.c.orig varnish-5.1.2/lib/libvgz/inflat
|
|||||||
case NAME:
|
case NAME:
|
||||||
if (state->flags & 0x0800) {
|
if (state->flags & 0x0800) {
|
||||||
if (have == 0) goto inf_leave;
|
if (have == 0) goto inf_leave;
|
||||||
@@ -774,6 +777,7 @@ int flush;
|
@@ -803,6 +806,7 @@ int flush;
|
||||||
state->head->name = Z_NULL;
|
state->head->name = Z_NULL;
|
||||||
state->length = 0;
|
state->length = 0;
|
||||||
state->mode = COMMENT;
|
state->mode = COMMENT;
|
||||||
@ -56,7 +76,7 @@ diff -up varnish-5.1.2/lib/libvgz/inflate.c.orig varnish-5.1.2/lib/libvgz/inflat
|
|||||||
case COMMENT:
|
case COMMENT:
|
||||||
if (state->flags & 0x1000) {
|
if (state->flags & 0x1000) {
|
||||||
if (have == 0) goto inf_leave;
|
if (have == 0) goto inf_leave;
|
||||||
@@ -794,6 +798,7 @@ int flush;
|
@@ -823,6 +827,7 @@ int flush;
|
||||||
else if (state->head != Z_NULL)
|
else if (state->head != Z_NULL)
|
||||||
state->head->comment = Z_NULL;
|
state->head->comment = Z_NULL;
|
||||||
state->mode = HCRC;
|
state->mode = HCRC;
|
||||||
@ -64,7 +84,7 @@ diff -up varnish-5.1.2/lib/libvgz/inflate.c.orig varnish-5.1.2/lib/libvgz/inflat
|
|||||||
case HCRC:
|
case HCRC:
|
||||||
if (state->flags & 0x0200) {
|
if (state->flags & 0x0200) {
|
||||||
NEEDBITS(16);
|
NEEDBITS(16);
|
||||||
@@ -817,6 +822,7 @@ int flush;
|
@@ -846,6 +851,7 @@ int flush;
|
||||||
strm->adler = state->check = ZSWAP32(hold);
|
strm->adler = state->check = ZSWAP32(hold);
|
||||||
INITBITS();
|
INITBITS();
|
||||||
state->mode = DICT;
|
state->mode = DICT;
|
||||||
@ -72,7 +92,7 @@ diff -up varnish-5.1.2/lib/libvgz/inflate.c.orig varnish-5.1.2/lib/libvgz/inflat
|
|||||||
case DICT:
|
case DICT:
|
||||||
if (state->havedict == 0) {
|
if (state->havedict == 0) {
|
||||||
RESTORE();
|
RESTORE();
|
||||||
@@ -824,8 +830,10 @@ int flush;
|
@@ -853,8 +859,10 @@ int flush;
|
||||||
}
|
}
|
||||||
strm->adler = state->check = adler32(0L, Z_NULL, 0);
|
strm->adler = state->check = adler32(0L, Z_NULL, 0);
|
||||||
state->mode = TYPE;
|
state->mode = TYPE;
|
||||||
@ -83,7 +103,7 @@ diff -up varnish-5.1.2/lib/libvgz/inflate.c.orig varnish-5.1.2/lib/libvgz/inflat
|
|||||||
case TYPEDO:
|
case TYPEDO:
|
||||||
if (strm->start_bit == 0)
|
if (strm->start_bit == 0)
|
||||||
strm->start_bit = 8 * (strm->total_in + in - have) - bits;
|
strm->start_bit = 8 * (strm->total_in + in - have) - bits;
|
||||||
@@ -881,8 +889,10 @@ int flush;
|
@@ -910,8 +918,10 @@ int flush;
|
||||||
INITBITS();
|
INITBITS();
|
||||||
state->mode = COPY_;
|
state->mode = COPY_;
|
||||||
if (flush == Z_TREES) goto inf_leave;
|
if (flush == Z_TREES) goto inf_leave;
|
||||||
@ -94,7 +114,7 @@ diff -up varnish-5.1.2/lib/libvgz/inflate.c.orig varnish-5.1.2/lib/libvgz/inflat
|
|||||||
case COPY:
|
case COPY:
|
||||||
copy = state->length;
|
copy = state->length;
|
||||||
if (copy) {
|
if (copy) {
|
||||||
@@ -1022,8 +1032,10 @@ int flush;
|
@@ -1051,8 +1061,10 @@ int flush;
|
||||||
Tracev((stderr, "inflate: codes ok\n"));
|
Tracev((stderr, "inflate: codes ok\n"));
|
||||||
state->mode = LEN_;
|
state->mode = LEN_;
|
||||||
if (flush == Z_TREES) goto inf_leave;
|
if (flush == Z_TREES) goto inf_leave;
|
||||||
@ -105,7 +125,7 @@ diff -up varnish-5.1.2/lib/libvgz/inflate.c.orig varnish-5.1.2/lib/libvgz/inflat
|
|||||||
case LEN:
|
case LEN:
|
||||||
if (have >= 6 && left >= 258) {
|
if (have >= 6 && left >= 258) {
|
||||||
RESTORE();
|
RESTORE();
|
||||||
@@ -1073,6 +1085,7 @@ int flush;
|
@@ -1102,6 +1114,7 @@ int flush;
|
||||||
}
|
}
|
||||||
state->extra = (unsigned)(here.op) & 15;
|
state->extra = (unsigned)(here.op) & 15;
|
||||||
state->mode = LENEXT;
|
state->mode = LENEXT;
|
||||||
@ -113,7 +133,7 @@ diff -up varnish-5.1.2/lib/libvgz/inflate.c.orig varnish-5.1.2/lib/libvgz/inflat
|
|||||||
case LENEXT:
|
case LENEXT:
|
||||||
if (state->extra) {
|
if (state->extra) {
|
||||||
NEEDBITS(state->extra);
|
NEEDBITS(state->extra);
|
||||||
@@ -1083,6 +1096,7 @@ int flush;
|
@@ -1112,6 +1125,7 @@ int flush;
|
||||||
Tracevv((stderr, "inflate: length %u\n", state->length));
|
Tracevv((stderr, "inflate: length %u\n", state->length));
|
||||||
state->was = state->length;
|
state->was = state->length;
|
||||||
state->mode = DIST;
|
state->mode = DIST;
|
||||||
@ -121,7 +141,7 @@ diff -up varnish-5.1.2/lib/libvgz/inflate.c.orig varnish-5.1.2/lib/libvgz/inflat
|
|||||||
case DIST:
|
case DIST:
|
||||||
for (;;) {
|
for (;;) {
|
||||||
here = state->distcode[BITS(state->distbits)];
|
here = state->distcode[BITS(state->distbits)];
|
||||||
@@ -1110,6 +1124,7 @@ int flush;
|
@@ -1139,6 +1153,7 @@ int flush;
|
||||||
state->offset = (unsigned)here.val;
|
state->offset = (unsigned)here.val;
|
||||||
state->extra = (unsigned)(here.op) & 15;
|
state->extra = (unsigned)(here.op) & 15;
|
||||||
state->mode = DISTEXT;
|
state->mode = DISTEXT;
|
||||||
@ -129,7 +149,7 @@ diff -up varnish-5.1.2/lib/libvgz/inflate.c.orig varnish-5.1.2/lib/libvgz/inflat
|
|||||||
case DISTEXT:
|
case DISTEXT:
|
||||||
if (state->extra) {
|
if (state->extra) {
|
||||||
NEEDBITS(state->extra);
|
NEEDBITS(state->extra);
|
||||||
@@ -1126,6 +1141,7 @@ int flush;
|
@@ -1155,6 +1170,7 @@ int flush;
|
||||||
#endif
|
#endif
|
||||||
Tracevv((stderr, "inflate: distance %u\n", state->offset));
|
Tracevv((stderr, "inflate: distance %u\n", state->offset));
|
||||||
state->mode = MATCH;
|
state->mode = MATCH;
|
||||||
@ -137,7 +157,7 @@ diff -up varnish-5.1.2/lib/libvgz/inflate.c.orig varnish-5.1.2/lib/libvgz/inflat
|
|||||||
case MATCH:
|
case MATCH:
|
||||||
if (left == 0) goto inf_leave;
|
if (left == 0) goto inf_leave;
|
||||||
copy = out - left;
|
copy = out - left;
|
||||||
@@ -1201,6 +1217,7 @@ int flush;
|
@@ -1230,6 +1246,7 @@ int flush;
|
||||||
}
|
}
|
||||||
#ifdef GUNZIP
|
#ifdef GUNZIP
|
||||||
state->mode = LENGTH;
|
state->mode = LENGTH;
|
||||||
@ -145,7 +165,7 @@ diff -up varnish-5.1.2/lib/libvgz/inflate.c.orig varnish-5.1.2/lib/libvgz/inflat
|
|||||||
case LENGTH:
|
case LENGTH:
|
||||||
if (state->wrap && state->flags) {
|
if (state->wrap && state->flags) {
|
||||||
NEEDBITS(32);
|
NEEDBITS(32);
|
||||||
@@ -1214,6 +1231,7 @@ int flush;
|
@@ -1243,6 +1260,7 @@ int flush;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
state->mode = DONE;
|
state->mode = DONE;
|
||||||
@ -153,14 +173,3 @@ diff -up varnish-5.1.2/lib/libvgz/inflate.c.orig varnish-5.1.2/lib/libvgz/inflat
|
|||||||
case DONE:
|
case DONE:
|
||||||
ret = Z_STREAM_END;
|
ret = Z_STREAM_END;
|
||||||
goto inf_leave;
|
goto inf_leave;
|
||||||
diff -up varnish-5.1.2/bin/varnishadm/varnishadm.c.orig varnish-5.1.2/bin/varnishadm/varnishadm.c
|
|
||||||
--- varnish-5.1.2/bin/varnishadm/varnishadm.c.orig 2017-06-25 18:38:35.790242267 +0200
|
|
||||||
+++ varnish-5.1.2/bin/varnishadm/varnishadm.c 2017-06-25 18:41:45.510250589 +0200
|
|
||||||
@@ -462,6 +462,7 @@ main(int argc, char * const *argv)
|
|
||||||
case 'h':
|
|
||||||
/* Usage help */
|
|
||||||
usage(0);
|
|
||||||
+ break;
|
|
||||||
case 'n':
|
|
||||||
n_arg = optarg;
|
|
||||||
break;
|
|
||||||
|
@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:39d858137e26948a7c85f07363f13f0778da61d234126e03a160a0cb9ba4fce3
|
|
||||||
size 2597817
|
|
3
varnish-6.0.0.tgz
Normal file
3
varnish-6.0.0.tgz
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:c7b2839c95b2bf1f336abc20b5d8b149c3aa72deff142f2379d1d431206b0bee
|
||||||
|
size 3033621
|
@ -1,7 +1,21 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed May 2 06:47:32 UTC 2018 - jengelh@inai.de
|
||||||
|
|
||||||
|
- Put %fillup back into %post
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Mar 19 22:22:35 UTC 2018 - jengelh@inai.de
|
||||||
|
|
||||||
|
- Update to new upstream release 6.0.0
|
||||||
|
* Added support for Unix Domain Sockets, both for clients and
|
||||||
|
for backend servers. This brings a new level of the VCL
|
||||||
|
language, version 4.1.
|
||||||
|
* Always use HTTP/1.1 on backend connections for pass fetch.
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Thu Nov 23 13:50:41 UTC 2017 - rbrown@suse.com
|
Thu Nov 23 13:50:41 UTC 2017 - rbrown@suse.com
|
||||||
|
|
||||||
- Replace references to /var/adm/fillup-templates with new
|
- Replace references to /var/adm/fillup-templates with new
|
||||||
%_fillupdir macro (boo#1069468)
|
%_fillupdir macro (boo#1069468)
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
|
@ -5,7 +5,7 @@ After=network.target
|
|||||||
[Service]
|
[Service]
|
||||||
EnvironmentFile=/etc/sysconfig/varnish
|
EnvironmentFile=/etc/sysconfig/varnish
|
||||||
PIDFile=/var/run/varnishd.pid
|
PIDFile=/var/run/varnishd.pid
|
||||||
ExecStart=/usr/sbin/varnishd $VARNISHD_PARAMS -P /var/run/varnishd.pid -F
|
ExecStart=/usr/sbin/varnishd -P /var/run/varnishd.pid -F $VARNISHD_PARAMS
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
|
85
varnish.spec
85
varnish.spec
@ -17,8 +17,8 @@
|
|||||||
|
|
||||||
|
|
||||||
#Compat macro for new _fillupdir macro introduced in Nov 2017
|
#Compat macro for new _fillupdir macro introduced in Nov 2017
|
||||||
%if ! %{defined _fillupdir}
|
%if !0%{?_fillupdir:1}
|
||||||
%define _fillupdir /var/adm/fillup-templates
|
%define _fillupdir /var/adm/fillup-templates
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%define library_name libvarnishapi1
|
%define library_name libvarnishapi1
|
||||||
@ -26,15 +26,15 @@
|
|||||||
%define pkg_logdir %_localstatedir/log/%name
|
%define pkg_logdir %_localstatedir/log/%name
|
||||||
%define pkg_cachedir %_localstatedir/cache/%name
|
%define pkg_cachedir %_localstatedir/cache/%name
|
||||||
Name: varnish
|
Name: varnish
|
||||||
Version: 5.1.2
|
Version: 6.0.0
|
||||||
Release: 0
|
Release: 0
|
||||||
Summary: High-performance HTTP accelerator
|
Summary: Accelerator for HTTP services
|
||||||
License: BSD-2-Clause
|
License: BSD-2-Clause
|
||||||
Group: Productivity/Networking/Web/Proxy
|
Group: Productivity/Networking/Web/Proxy
|
||||||
URL: http://varnish-cache.org/
|
URL: http://varnish-cache.org/
|
||||||
#Git-Clone: git://git.varnish-cache.org/varnish-cache
|
#Git-Clone: git://git.varnish-cache.org/varnish-cache
|
||||||
#Git-Web: https://varnish-cache.org/trac/browser
|
#Git-Web: https://varnish-cache.org/trac/browser
|
||||||
Source: https://repo.varnish-cache.org/source/%name-%version.tar.gz
|
Source: https://varnish-cache.org/_downloads/%name-%version.tgz
|
||||||
Source3: varnish.sysconfig
|
Source3: varnish.sysconfig
|
||||||
Source5: varnish.logrotate
|
Source5: varnish.logrotate
|
||||||
Source7: varnish.service
|
Source7: varnish.service
|
||||||
@ -51,17 +51,17 @@ BuildRequires: systemd-rpm-macros
|
|||||||
BuildRequires: xz
|
BuildRequires: xz
|
||||||
Requires: c_compiler
|
Requires: c_compiler
|
||||||
BuildRoot: %_tmppath/%name-%version-build
|
BuildRoot: %_tmppath/%name-%version-build
|
||||||
Prereq(post): %_sbindir/useradd %_sbindir/groupadd
|
Requires(pre): %_sbindir/useradd %_sbindir/groupadd
|
||||||
%if 0%{?suse_version} >= 1010
|
%if 0%{?suse_version} >= 1010
|
||||||
Recommends: logrotate
|
Recommends: logrotate
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%description
|
%description
|
||||||
Varnish is an HTTP accelerator. An HTTP accelerator (often called Reverse
|
Varnish is an HTTP accelerator. Often called Reverse Proxy, it is an
|
||||||
Proxy) is an application that stores (caches) documents that have been
|
application that stores (caches) documents that have been requested
|
||||||
requested over the HTTP protocol.
|
over the HTTP protocol.
|
||||||
|
|
||||||
Based on certain criteria the next client requesting the document is either
|
Based on certain criteria, the next client requesting the document is either
|
||||||
given the cached document, or a "fresh" document requested from a backend
|
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. The purpose of this is to minimize the requests going to the backend
|
||||||
server(s) by serving the same document to potentially many users.
|
server(s) by serving the same document to potentially many users.
|
||||||
@ -71,11 +71,11 @@ Summary: Shared libraries for Varnish
|
|||||||
Group: Productivity/Networking/Web/Proxy
|
Group: Productivity/Networking/Web/Proxy
|
||||||
|
|
||||||
%description -n %library_name
|
%description -n %library_name
|
||||||
Varnish is an HTTP accelerator. An HTTP accelerator (often called Reverse
|
Varnish is an HTTP accelerator. Often called Reverse Proxy, it is an
|
||||||
Proxy) is an application that stores (caches) documents that have been
|
application that stores (caches) documents that have been requested
|
||||||
requested over the HTTP protocol.
|
over the HTTP protocol.
|
||||||
|
|
||||||
Based on certain criteria the next client requesting the document is either
|
Based on certain criteria, the next client requesting the document is either
|
||||||
given the cached document, or a "fresh" document requested from a backend
|
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. The purpose of this is to minimize the requests going to the backend
|
||||||
server(s) by serving the same document to potentially many users.
|
server(s) by serving the same document to potentially many users.
|
||||||
@ -88,14 +88,9 @@ Group: Development/Libraries/C and C++
|
|||||||
Requires: %name = %version
|
Requires: %name = %version
|
||||||
|
|
||||||
%description devel
|
%description devel
|
||||||
Varnish is an HTTP accelerator. An HTTP accelerator (often called Reverse
|
Varnish is an HTTP accelerator. Often called Reverse Proxy, it is an
|
||||||
Proxy) is an application that stores (caches) documents that have been
|
application that stores (caches) documents that have been requested
|
||||||
requested over the HTTP protocol.
|
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.
|
|
||||||
|
|
||||||
This package holds the development files for varnish.
|
This package holds the development files for varnish.
|
||||||
|
|
||||||
@ -106,7 +101,7 @@ This package holds the development files for varnish.
|
|||||||
%build
|
%build
|
||||||
export CFLAGS="%optflags -fstack-protector"
|
export CFLAGS="%optflags -fstack-protector"
|
||||||
%ifarch %ix86
|
%ifarch %ix86
|
||||||
export CFLAGS+=" -ffloat-store -fexcess-precision=standard"
|
export CFLAGS="$CFLAGS -ffloat-store -fexcess-precision=standard"
|
||||||
%endif
|
%endif
|
||||||
%configure --disable-static --docdir="%_docdir/%name" \
|
%configure --disable-static --docdir="%_docdir/%name" \
|
||||||
--localstatedir="%_localstatedir/cache/" \
|
--localstatedir="%_localstatedir/cache/" \
|
||||||
@ -115,22 +110,22 @@ export CFLAGS+=" -ffloat-store -fexcess-precision=standard"
|
|||||||
make %{?_smp_mflags}
|
make %{?_smp_mflags}
|
||||||
|
|
||||||
%install
|
%install
|
||||||
b="%buildroot";
|
b="%buildroot"
|
||||||
%make_install
|
%make_install
|
||||||
# There is no use for them to normal users
|
# There is no use for them to normal users
|
||||||
mv "$b/%_bindir"/* "$b/%_sbindir/";
|
mv "$b/%_bindir"/* "$b/%_sbindir/"
|
||||||
#
|
#
|
||||||
##missing directories
|
##missing directories
|
||||||
install -dm 0755 "$b"/{%pkg_logdir,%pkg_home};
|
install -dm 0755 "$b"/{%pkg_logdir,%pkg_home}
|
||||||
install -Dpm 0644 "%{S:5}" "$b/%_sysconfdir/logrotate.d/varnish";
|
install -Dpm 0644 "%{S:5}" "$b/%_sysconfdir/logrotate.d/varnish"
|
||||||
#
|
#
|
||||||
##init scripts
|
##init scripts
|
||||||
install -Dpm 0644 "%{S:3}" "$b%{_fillupdir}/sysconfig.%name";
|
install -Dpm 0644 "%{S:3}" "$b/%_fillupdir/sysconfig.%name"
|
||||||
install -Dpm 0644 "%{S:7}" "$b/%_unitdir/varnish.service";
|
install -Dpm 0644 "%{S:7}" "$b/%_unitdir/varnish.service"
|
||||||
install -Dpm 0644 "%{S:8}" "$b/%_unitdir/varnishlog.service";
|
install -Dpm 0644 "%{S:8}" "$b/%_unitdir/varnishlog.service"
|
||||||
mkdir -p "$b/%_sbindir";
|
mkdir -p "$b/%_sbindir"
|
||||||
ln -s service "$b/%_sbindir/rcvarnish";
|
ln -s service "$b/%_sbindir/rcvarnish"
|
||||||
ln -s service "$b/%_sbindir/rcvarnishlog";
|
ln -s service "$b/%_sbindir/rcvarnishlog"
|
||||||
#
|
#
|
||||||
##config files
|
##config files
|
||||||
mkdir -p "$b/%_sysconfdir/%name"
|
mkdir -p "$b/%_sysconfdir/%name"
|
||||||
@ -141,6 +136,9 @@ mkdir -p "$b/%pkg_logdir"
|
|||||||
mkdir -p "$b/%_docdir/%name"
|
mkdir -p "$b/%_docdir/%name"
|
||||||
cp -a ChangeLog LICENSE README.rst "$b/%_docdir/%name/"
|
cp -a ChangeLog LICENSE README.rst "$b/%_docdir/%name/"
|
||||||
|
|
||||||
|
perl -i -pe 's{^#!/usr/bin/env python}{#!/usr/bin/python}g' \
|
||||||
|
"$b/usr/share/varnish/vmodtool.py" "$b/usr/share/varnish/vsctool.py"
|
||||||
|
|
||||||
%check
|
%check
|
||||||
if ! make %{?_smp_mflags} check; then
|
if ! make %{?_smp_mflags} check; then
|
||||||
x="$?"
|
x="$?"
|
||||||
@ -150,24 +148,21 @@ fi
|
|||||||
|
|
||||||
%pre
|
%pre
|
||||||
%_bindir/getent group varnish >/dev/null || \
|
%_bindir/getent group varnish >/dev/null || \
|
||||||
%_sbindir/groupadd -r varnish || :
|
%_sbindir/groupadd -r varnish
|
||||||
%_bindir/getent passwd varnish >/dev/null || \
|
%_bindir/getent passwd varnish >/dev/null || \
|
||||||
%_sbindir/useradd -g varnish -s /bin/false -r -c "user for Varnish" \
|
%_sbindir/useradd -g varnish -s /bin/false -r -c "user for Varnish" \
|
||||||
-d %pkg_home varnish || :
|
-d %pkg_home varnish
|
||||||
%service_add_pre varnish.service
|
%service_add_pre varnish.service varnishlog.service
|
||||||
%service_add_pre varnishlog.service
|
|
||||||
|
|
||||||
%post
|
%post
|
||||||
%service_add_post varnish.service
|
%fillup_only
|
||||||
%service_add_post varnishlog.service
|
%service_add_post varnish.service varnishlog.service
|
||||||
|
|
||||||
%preun
|
%preun
|
||||||
%service_del_preun varnish.service
|
%service_del_preun varnish.service varnishlog.service
|
||||||
%service_del_preun varnishlog.service
|
|
||||||
|
|
||||||
%postun
|
%postun
|
||||||
%service_del_postun varnish.service
|
%service_del_postun varnish.service varnishlog.service
|
||||||
%service_del_postun varnishlog.service
|
|
||||||
|
|
||||||
%post -n %library_name -p /sbin/ldconfig
|
%post -n %library_name -p /sbin/ldconfig
|
||||||
%postun -n %library_name -p /sbin/ldconfig
|
%postun -n %library_name -p /sbin/ldconfig
|
||||||
@ -187,7 +182,7 @@ fi
|
|||||||
%dir %attr(0750,varnish,varnish) %pkg_home
|
%dir %attr(0750,varnish,varnish) %pkg_home
|
||||||
%dir %attr(0750,varnish,varnish) %pkg_cachedir
|
%dir %attr(0750,varnish,varnish) %pkg_cachedir
|
||||||
%dir %attr(0750,varnish,varnish) %pkg_logdir
|
%dir %attr(0750,varnish,varnish) %pkg_logdir
|
||||||
%{_fillupdir}/sysconfig.%name
|
%_fillupdir/sysconfig.%name
|
||||||
|
|
||||||
%files -n %library_name
|
%files -n %library_name
|
||||||
%defattr(-,root,root,-)
|
%defattr(-,root,root,-)
|
||||||
@ -195,7 +190,7 @@ fi
|
|||||||
|
|
||||||
%files devel
|
%files devel
|
||||||
%defattr(-,root,root,-)
|
%defattr(-,root,root,-)
|
||||||
%_includedir/varnish
|
%_includedir/varnish/
|
||||||
%_datadir/aclocal/
|
%_datadir/aclocal/
|
||||||
%_libdir/pkgconfig/*
|
%_libdir/pkgconfig/*
|
||||||
%_libdir/libvarnishapi.so
|
%_libdir/libvarnishapi.so
|
||||||
|
@ -6,7 +6,7 @@ Requires=varnish.service
|
|||||||
[Service]
|
[Service]
|
||||||
EnvironmentFile=/etc/sysconfig/varnish
|
EnvironmentFile=/etc/sysconfig/varnish
|
||||||
PIDFile=/var/run/varnishlog.pid
|
PIDFile=/var/run/varnishlog.pid
|
||||||
ExecStart=/usr/sbin/varnishncsa $VARNISHLOG_PARAMS -P /var/run/varnishlog.pid
|
ExecStart=/usr/sbin/varnishncsa -P /var/run/varnishlog.pid $VARNISHLOG_PARAMS
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
|
Loading…
Reference in New Issue
Block a user