From 18ad9617112cf6018dc99de4ffb67de1da9875a8 Mon Sep 17 00:00:00 2001 From: Dridi Boukelmoune Date: Mon, 28 Apr 2014 07:30:40 +0200 Subject: [PATCH 01/17] bumped version to experimental 4.0.0 --- vagent.automake.patch | 9 -- vagent.configure.patch | 13 --- vagent.disable_ban_tests.patch | 12 --- vagent.disable_test.patch | 12 +++ vagent.secret_privileges.patch | 79 ---------------- vagent.test_suite.patch | 161 --------------------------------- varnish-agent.spec | 46 +++++----- 7 files changed, 36 insertions(+), 296 deletions(-) delete mode 100644 vagent.automake.patch delete mode 100644 vagent.configure.patch delete mode 100644 vagent.disable_ban_tests.patch create mode 100644 vagent.disable_test.patch delete mode 100644 vagent.secret_privileges.patch delete mode 100644 vagent.test_suite.patch diff --git a/vagent.automake.patch b/vagent.automake.patch deleted file mode 100644 index 406af63..0000000 --- a/vagent.automake.patch +++ /dev/null @@ -1,9 +0,0 @@ -diff --git i/src/Makefile.am w/src/Makefile.am -index e03f762..f343bdc 100644 ---- i/src/Makefile.am -+++ w/src/Makefile.am -@@ -1,3 +1,4 @@ -+AUTOMAKE_OPTIONS=subdir-objects - AM_CPPFLAGS = -I$(top_srcdir)/include - AM_CFLAGS = -Wall -Werror -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wcast-align -Wunused-parameter -Wchar-subscripts -Winline -Wnested-externs -Wredundant-decls -Wformat -Wextra -Wno-missing-field-initializers -Wno-sign-compare -fstack-protector-all - diff --git a/vagent.configure.patch b/vagent.configure.patch deleted file mode 100644 index 4a6cba6..0000000 --- a/vagent.configure.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git i/configure.ac w/configure.ac -index 4238306..1e1d6ed 100644 ---- i/configure.ac -+++ w/configure.ac -@@ -5,7 +5,7 @@ AC_PREREQ(2.61) - AC_COPYRIGHT([Copyright (c) 2012-2013 Varnish Software]) - AC_INIT([varnish-agent], [2.1]) - AC_CONFIG_SRCDIR([src/main.c]) --AM_CONFIG_HEADER(config.h) -+AC_CONFIG_HEADERS([config.h]) - - AM_INIT_AUTOMAKE([-Wall -Werror foreign parallel-tests]) - diff --git a/vagent.disable_ban_tests.patch b/vagent.disable_ban_tests.patch deleted file mode 100644 index 65c0633..0000000 --- a/vagent.disable_ban_tests.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git i/tests/Makefile.am w/tests/Makefile.am -index 0d433a3..010f801 100644 ---- i/tests/Makefile.am -+++ w/tests/Makefile.am -@@ -1,6 +1,5 @@ - LOG_COMPILER = $(srcdir)/test-wrapper --TESTS = ban.sh \ -- badvarnishd.sh \ -+TESTS = badvarnishd.sh \ - json.sh \ - log.sh \ - status.sh \ diff --git a/vagent.disable_test.patch b/vagent.disable_test.patch new file mode 100644 index 0000000..ba8992f --- /dev/null +++ b/vagent.disable_test.patch @@ -0,0 +1,12 @@ +diff --git i/tests/Makefile.am w/tests/Makefile.am +index 454dce1..4528a50 100644 +--- i/tests/Makefile.am ++++ w/tests/Makefile.am +@@ -2,7 +2,6 @@ LOG_COMPILER = $(srcdir)/test-wrapper + TESTS = ban.sh \ + arguments.sh \ + buffers.sh \ +- vac_register.sh \ + json.sh \ + log.sh \ + status.sh \ diff --git a/vagent.secret_privileges.patch b/vagent.secret_privileges.patch deleted file mode 100644 index 018bec7..0000000 --- a/vagent.secret_privileges.patch +++ /dev/null @@ -1,79 +0,0 @@ -diff --git i/include/common.h w/include/common.h -index bd1ac3c..4c4bf46 100644 ---- i/include/common.h -+++ w/include/common.h -@@ -42,6 +42,7 @@ struct agent_config_t { - char *T_arg; - char *T_arg_orig; - char *S_arg; -+ int S_arg_fd; - char *n_arg; - char *u_arg; - char *g_arg; -diff --git i/src/main.c w/src/main.c -index 4bd0f5a..b2a1b54 100644 ---- i/src/main.c -+++ w/src/main.c -@@ -41,6 +41,7 @@ - #define daemon I_hate_you_so_much_right_now - #endif - -+#include - #include - #include - #include -@@ -97,6 +98,7 @@ static void core_opt(struct agent_core_t *core, int argc, char **argv) - assert(core->config != NULL); - core->config->n_arg = NULL; - core->config->S_arg = NULL; -+ core->config->S_arg_fd = -1; - core->config->T_arg = NULL; - core->config->g_arg = NULL; - core->config->u_arg = NULL; -@@ -125,7 +127,11 @@ static void core_opt(struct agent_core_t *core, int argc, char **argv) - core->config->n_arg = optarg; - break; - case 'S': -+ // avoid fd leak -+ if (core->config->S_arg_fd > 0) -+ close(core->config->S_arg_fd); - core->config->S_arg = optarg; -+ core->config->S_arg_fd = open(optarg, O_RDONLY); - break; - case 'T': - core->config->T_arg_orig = optarg; -diff --git i/src/modules/vadmin.c w/src/modules/vadmin.c -index 547813b..a63b8b6 100644 ---- i/src/modules/vadmin.c -+++ w/src/modules/vadmin.c -@@ -145,7 +145,7 @@ n_arg_sock(struct agent_core_t *core) - static int - cli_sock(struct vadmin_config_t *vadmin, struct agent_core_t *core) - { -- int fd; -+ int fd = core->config->S_arg_fd; - unsigned status; - char *answer = NULL; - char buf[CLI_AUTH_RESPONSE_LEN + 1]; -@@ -167,7 +167,12 @@ cli_sock(struct vadmin_config_t *vadmin, struct agent_core_t *core) - assert(close(vadmin->sock) == 0); - return(-1); - } -- fd = open(core->config->S_arg, O_RDONLY); -+ if (fd < 0) { -+ fd = open(core->config->S_arg, O_RDONLY); -+ core->config->S_arg_fd = fd; -+ } -+ else -+ lseek(fd, 0, SEEK_SET); - if (fd < 0) { - logger(vadmin->logger, "Cannot open \"%s\": %s", - core->config->S_arg, strerror(errno)); -@@ -175,7 +180,6 @@ cli_sock(struct vadmin_config_t *vadmin, struct agent_core_t *core) - return (-1); - } - VCLI_AuthResponse(fd, answer, buf); -- assert(close(fd) == 0); - free(answer); - - cli_write(vadmin->sock, "auth "); diff --git a/vagent.test_suite.patch b/vagent.test_suite.patch deleted file mode 100644 index 477fe3f..0000000 --- a/vagent.test_suite.patch +++ /dev/null @@ -1,161 +0,0 @@ -diff --git a/tests/badvarnishd.sh b/tests/badvarnishd.sh -index 2e6ed13..6e4913c 100755 ---- a/tests/badvarnishd.sh -+++ b/tests/badvarnishd.sh -@@ -6,6 +6,7 @@ VARNISH_PID=$TMPDIR/varnish.pid - PHASE=1 - VARNISH_PORT=$(( 1024 + ( $RANDOM % 48000 ) )) - -+start_backend - phase() { - now=$(date +%s) - echo -@@ -121,5 +122,6 @@ test_it GET status "" "Child in state stopped" - phase "Cleanup" - stop_agent - stop_varnish -+stop_backend - rm -fr $TMPDIR - exit $ret -diff --git a/tests/data/boot.vcl b/tests/data/boot.vcl -index 312a052..ddf7d13 100644 ---- a/tests/data/boot.vcl -+++ b/tests/data/boot.vcl -@@ -1 +1 @@ --backend default { .host = "kly.no"; } -+backend default { .host = "localhost"; } -diff --git a/tests/empty_response_backend.py b/tests/empty_response_backend.py -new file mode 100755 -index 0000000..2dde367 ---- /dev/null -+++ b/tests/empty_response_backend.py -@@ -0,0 +1,21 @@ -+#!/usr/bin/python -+ -+import BaseHTTPServer -+ -+class EmptyResponseHandler(BaseHTTPServer.BaseHTTPRequestHandler): -+ -+ def send_empty_response(self): -+ self.send_response(204) -+ self.end_headers() -+ -+ def do_GET(self): -+ self.send_empty_response() -+ -+ def do_HEAD(self): -+ self.send_empty_response() -+ -+ def do_POST(self): -+ self.send_empty_response() -+ -+if __name__ == '__main__': -+ BaseHTTPServer.test(EmptyResponseHandler) -diff --git a/tests/util.sh b/tests/util.sh -index e353e48..9910c51 100644 ---- a/tests/util.sh -+++ b/tests/util.sh -@@ -10,6 +10,8 @@ TMPDIR="${TMPDIR:-$(mktemp -d)}" - SRCDIR="${SRCDIR:-"."}" - ORIGPWD="${ORIGPWD:-"."}" - VARNISH_PID="${TMPDIR}/varnish.pid" -+BACKEND_PID="${TMPDIR}/backend.pid" -+BACKEND_LOG="${TMPDIR}/backend.log" - - inc() { - N=$(( ${N} + 1 )) -@@ -30,30 +32,43 @@ pass() { - echo "$*" - } - -+stop_backend() { -+ backendpid="$(cat "$BACKEND_PID")" -+ if [ -z "$backendpid" ]; then -+ fail "NO BACKEND_PID? Damn..." -+ else -+ echo -e "\tStopping the backend($backendpid)" -+ kill $backendpid -+ fi -+} -+ - stop_varnish() { - varnishpid="$(cat "$VARNISH_PID")" - if [ -z "$varnishpid" ]; then -- fail "NO VARNISHPID? Bad stuff..." -+ fail "NO VARNISH_PID? Bad stuff..." -+ else -+ echo -e "\tStopping varnish($varnishpid)" -+ kill $varnishpid - fi -- echo -e "\tStopping varnish($varnishpid)" -- kill $varnishpid - } - - stop_agent() { - agentpid=$(cat ${TMPDIR}/agent.pid) -- if [ -z $agentpid ]; then -+ if [ -z "$agentpid" ]; then - fail "Stopping agent but no agent pid found. BORK" -+ else -+ echo -e "\tStopping agent($agentpid)" -+ kill $agentpid - fi -- echo -e "\tStopping agent($agentpid)" -- kill $agentpid - } - - cleanup() { -- echo Stopping varnishd and the agent -+ echo Stopping varnishd, the agent and the backend - [ -z "$varnishpid" ] || kill "$varnishpid" || true - [ -z "$agentpid" ] || kill "$agentpid" || true -- stop_varnish - stop_agent -+ stop_varnish -+ stop_backend - echo Cleaning up - rm -rf ${TMPDIR} - } -@@ -88,13 +103,33 @@ pidwait() { - fi - } - -+start_backend() { -+ echo "Starting backend:" -+ python -u empty_response_backend.py 0 >$BACKEND_LOG 2>&1 & -+ backendpid=$(jobs -p %+) -+ echo $backendpid >$BACKEND_PID -+ echo -e "\tStarted the backend. Pid $backendpid" -+ for i in $(seq 10); do -+ sleep 1 -+ backendport=$(grep -F 'Serving HTTP' $BACKEND_LOG | awk '{print $6}') -+ [ -n "$backendport" ] && break -+ done -+ if [ -z "$backendport" ]; then -+ echo -e "\tFailed to bind in a timely fashion" -+ exit 1 -+ fi -+ echo -e "\tListening to *:$backendport" -+ echo "backend default { .host = \"localhost:$backendport\"; }" >$TMPDIR/boot.vcl -+} -+ - start_varnish() { - head -c 16 /dev/urandom > "$TMPDIR/secret" -- printf "${INDENT}Starting varnishd\n\n" -+ printf "${INDENT}Starting varnishd:\n\n" - varnishd -f "${SRCDIR}/data/boot.vcl" \ - -P "$VARNISH_PID" \ - -n "$TMPDIR" \ - -p auto_restart=off \ -+ -p ban_lurker_sleep=10 \ - -a 127.0.0.1:0 \ - -T 127.0.0.1:0 \ - -s malloc,50m \ -@@ -115,6 +150,7 @@ start_agent() { - - init_all() { - init_misc -+ start_backend - start_varnish - start_agent - } diff --git a/varnish-agent.spec b/varnish-agent.spec index cca1a9e..547942e 100644 --- a/varnish-agent.spec +++ b/varnish-agent.spec @@ -1,34 +1,31 @@ +%global commit 1b8447bffa6dd4872995f1e244a42493789f0c47 +%global shortcommit %(c=%{commit}; echo ${c:0:7}) + Name: varnish-agent -Version: 2.1 -Release: 5%{?dist} +Version: 4.0.0 +Release: 0.1%{?dist} Summary: Administration agent for Varnish Cache Group: System Environment/Daemons License: BSD URL: https://github.com/varnish/vagent2 -Source0: https://github.com/varnish/vagent2/archive/%{version}.tar.gz +Source0: https://github.com/varnish/vagent2/archive/%{commit}/vagent2-%{version}-%{shortcommit}.tar.gz Source1: varnish-agent.service Source2: agent.params -# The patches all come from the following pull requests: -# https://github.com/varnish/vagent2/pull/94 -# https://github.com/varnish/vagent2/pull/101 +Patch0: vagent.disable_test.patch -# offers a better out-of-the-box experience -Patch0: vagent.secret_privileges.patch - -# necessary fixes for the build -Patch1: vagent.configure.patch -Patch2: vagent.automake.patch -Patch3: vagent.test_suite.patch - -# disables a failing test upstream is investigating -# it looks like a bug in varnish, not the agent -Patch4: vagent.disable_ban_tests.patch - -BuildRequires: autoconf automake libtool python-docutils -BuildRequires: systemd varnish-libs-devel libmicrohttpd-devel -BuildRequires: varnish python-demjson perl-libwww-perl +BuildRequires: autoconf +BuildRequires: automake +BuildRequires: libcurl-devel +BuildRequires: libmicrohttpd-devel +BuildRequires: libtool +BuildRequires: perl-libwww-perl +BuildRequires: python-demjson +BuildRequires: python-docutils +BuildRequires: systemd +BuildRequires: varnish +BuildRequires: varnish-libs-devel Requires: varnish @@ -43,7 +40,7 @@ Administration Console (VAC). %prep -%autosetup -n vagent2-%{version} -p1 +%autosetup -n vagent2-%{commit} -p1 # varnish-agent expects to be built from the git repository sed -i s/NOGIT/%{version}/ include/Makefile.am @@ -93,6 +90,11 @@ make check %changelog +* Mon Apr 28 2014 Dridi Boukelmoune - 4.0.0-0.1 +- Bumped version to experimental 4.0.0 +- Switched to a commit tarball from github +- Removed the upstreamed patches + * Sun Dec 08 2013 Dridi Boukelmoune - 2.1-5 - Removed the %%optflags on the %%configure command line From c9faa5d3e6683782c07fda0966c41bb7b8767dfd Mon Sep 17 00:00:00 2001 From: Dridi Boukelmoune Date: Mon, 5 May 2014 15:41:40 +0200 Subject: [PATCH 02/17] added a snapshot source tarball for vagent2-4.0.0 --- .gitignore | 1 + sources | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index e66617e..80ed702 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ /2.1.tar.gz +/vagent2-4.0.0-1b8447b.tar.gz diff --git a/sources b/sources index 086db7e..186d644 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -e0db886b0a2e63285bb5270dbbeaa9e8 2.1.tar.gz +6c3ff69372df2039da5b20ec349424e6 vagent2-4.0.0-1b8447b.tar.gz From 387d7b25deb18aa5e3bd4190fb650f7660f87349 Mon Sep 17 00:00:00 2001 From: Dridi Boukelmoune Date: Tue, 3 Jun 2014 16:02:10 +0200 Subject: [PATCH 03/17] bumped version to 4.0.0-RC2 --- .gitignore | 1 + sources | 2 +- varnish-agent.spec | 9 ++++++--- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 80ed702..eae85be 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ /2.1.tar.gz /vagent2-4.0.0-1b8447b.tar.gz +/vagent2-4.0.0-8352e30.tar.gz diff --git a/sources b/sources index 186d644..4c1939c 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -6c3ff69372df2039da5b20ec349424e6 vagent2-4.0.0-1b8447b.tar.gz +bfc8c7362659f54188aee3cbf24ef42d vagent2-4.0.0-8352e30.tar.gz diff --git a/varnish-agent.spec b/varnish-agent.spec index 547942e..493adce 100644 --- a/varnish-agent.spec +++ b/varnish-agent.spec @@ -1,9 +1,9 @@ -%global commit 1b8447bffa6dd4872995f1e244a42493789f0c47 +%global commit 8352e30d79364f0145cb583a88ed3fe328771c63 %global shortcommit %(c=%{commit}; echo ${c:0:7}) Name: varnish-agent Version: 4.0.0 -Release: 0.1%{?dist} +Release: 0.2.RC2%{?dist} Summary: Administration agent for Varnish Cache Group: System Environment/Daemons @@ -90,6 +90,9 @@ make check %changelog +* Tue Jun 03 2014 Dridi Boukelmoune - 4.0.0-0.2.RC2 +- Bumped version to 4.0.0-RC2 + * Mon Apr 28 2014 Dridi Boukelmoune - 4.0.0-0.1 - Bumped version to experimental 4.0.0 - Switched to a commit tarball from github @@ -113,7 +116,7 @@ make check - Added a patch for root privileges on the secret file - Added a patch for the deprecated AM_CONFIG_HEADER macro - Added a check section -- sed -i s/NOGIT/%{version}/ include/Makefile.am +- sed -i s/NOGIT/%%{version}/ include/Makefile.am - mv vagent.params agent.params * Sun Sep 15 2013 Dridi Boukelmoune - 2.1-1 From b73c0a45406ef53be03c1c04a532642425cbc467 Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Sat, 7 Jun 2014 22:18:31 -0500 Subject: [PATCH 04/17] - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild --- varnish-agent.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/varnish-agent.spec b/varnish-agent.spec index 493adce..87042d2 100644 --- a/varnish-agent.spec +++ b/varnish-agent.spec @@ -3,7 +3,7 @@ Name: varnish-agent Version: 4.0.0 -Release: 0.2.RC2%{?dist} +Release: 0.3.RC2%{?dist} Summary: Administration agent for Varnish Cache Group: System Environment/Daemons @@ -90,6 +90,9 @@ make check %changelog +* Sun Jun 08 2014 Fedora Release Engineering - 4.0.0-0.3.RC2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + * Tue Jun 03 2014 Dridi Boukelmoune - 4.0.0-0.2.RC2 - Bumped version to 4.0.0-RC2 From 6f54e1babd0330e751b54270a161715f4d1971bd Mon Sep 17 00:00:00 2001 From: Peter Robinson Date: Mon, 18 Aug 2014 07:32:10 +0000 Subject: [PATCH 05/17] - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild --- varnish-agent.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/varnish-agent.spec b/varnish-agent.spec index 87042d2..ca6d62a 100644 --- a/varnish-agent.spec +++ b/varnish-agent.spec @@ -3,7 +3,7 @@ Name: varnish-agent Version: 4.0.0 -Release: 0.3.RC2%{?dist} +Release: 0.4.RC2%{?dist} Summary: Administration agent for Varnish Cache Group: System Environment/Daemons @@ -90,6 +90,9 @@ make check %changelog +* Mon Aug 18 2014 Fedora Release Engineering - 4.0.0-0.4.RC2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild + * Sun Jun 08 2014 Fedora Release Engineering - 4.0.0-0.3.RC2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild From 672d6dba153a1b674480d22ea411f585a1008c3f Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Fri, 19 Jun 2015 01:50:17 +0000 Subject: [PATCH 06/17] - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild --- varnish-agent.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/varnish-agent.spec b/varnish-agent.spec index ca6d62a..0946318 100644 --- a/varnish-agent.spec +++ b/varnish-agent.spec @@ -3,7 +3,7 @@ Name: varnish-agent Version: 4.0.0 -Release: 0.4.RC2%{?dist} +Release: 0.5.RC2%{?dist} Summary: Administration agent for Varnish Cache Group: System Environment/Daemons @@ -90,6 +90,9 @@ make check %changelog +* Fri Jun 19 2015 Fedora Release Engineering - 4.0.0-0.5.RC2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + * Mon Aug 18 2014 Fedora Release Engineering - 4.0.0-0.4.RC2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild From 05ecb9e6d036936195c6cf3a50988b2fe0822c42 Mon Sep 17 00:00:00 2001 From: Kalev Lember Date: Thu, 5 Nov 2015 11:25:11 +0100 Subject: [PATCH 07/17] Rebuilt for libmicrohttpd soname bump --- varnish-agent.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/varnish-agent.spec b/varnish-agent.spec index 0946318..f8755ed 100644 --- a/varnish-agent.spec +++ b/varnish-agent.spec @@ -3,7 +3,7 @@ Name: varnish-agent Version: 4.0.0 -Release: 0.5.RC2%{?dist} +Release: 0.6.RC2%{?dist} Summary: Administration agent for Varnish Cache Group: System Environment/Daemons @@ -90,6 +90,9 @@ make check %changelog +* Thu Nov 05 2015 Kalev Lember - 4.0.0-0.6.RC2 +- Rebuilt for libmicrohttpd soname bump + * Fri Jun 19 2015 Fedora Release Engineering - 4.0.0-0.5.RC2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild From e04e0279e31ec0967434b243e4cb195cbd6bf471 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 5 Feb 2016 02:33:52 +0000 Subject: [PATCH 08/17] - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild --- varnish-agent.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/varnish-agent.spec b/varnish-agent.spec index f8755ed..21df0e4 100644 --- a/varnish-agent.spec +++ b/varnish-agent.spec @@ -3,7 +3,7 @@ Name: varnish-agent Version: 4.0.0 -Release: 0.6.RC2%{?dist} +Release: 0.7.RC2%{?dist} Summary: Administration agent for Varnish Cache Group: System Environment/Daemons @@ -90,6 +90,9 @@ make check %changelog +* Fri Feb 05 2016 Fedora Release Engineering - 4.0.0-0.7.RC2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + * Thu Nov 05 2015 Kalev Lember - 4.0.0-0.6.RC2 - Rebuilt for libmicrohttpd soname bump From b8a62b24a8ebc6299bb3d07bf27a889a52b3bacb Mon Sep 17 00:00:00 2001 From: Dridi Boukelmoune Date: Mon, 8 Feb 2016 14:05:19 +0100 Subject: [PATCH 09/17] Bump version to 4.1.0 --- varnish-agent-4.1.0.fix_for_old_lwp.patch | 28 ++++++ varnish-agent.spec | 113 +++++++++++++++++----- 2 files changed, 117 insertions(+), 24 deletions(-) create mode 100644 varnish-agent-4.1.0.fix_for_old_lwp.patch diff --git a/varnish-agent-4.1.0.fix_for_old_lwp.patch b/varnish-agent-4.1.0.fix_for_old_lwp.patch new file mode 100644 index 0000000..b8fa9e5 --- /dev/null +++ b/varnish-agent-4.1.0.fix_for_old_lwp.patch @@ -0,0 +1,28 @@ +diff -ru tests.orig/http.sh tests/http.sh +--- i/tests.orig/http.sh 2015-10-22 21:32:15.000000000 +0200 ++++ w/tests/http.sh 2015-10-23 01:06:18.465944881 +0200 +@@ -12,7 +12,7 @@ + test_it_code GET html/index.html "" "200" + test_it_code GET html/ "" "200" + test_it_code GET html "" "301" +-FOO=$(lwp-request -USsed -C ${PASS} http://localhost:$AGENT_PORT/html) ++FOO=$(curl -L -D - -u ${PASS} http://localhost:$AGENT_PORT/html) + if [ "x$?" = "x0" ]; then pass; else fail "$*: $FOO"; fi + inc + if echo -e "$FOO" | grep -q "200 OK"; then pass; else fail "Redirect failed to yield 200 OK"; fi +diff -ru tests.orig/util.sh tests/util.sh +--- i/tests.orig/util.sh 2015-10-22 21:32:15.000000000 +0200 ++++ w/tests/util.sh 2015-10-23 01:06:22.976205467 +0200 +@@ -254,10 +254,10 @@ + } + + test_it_code() { +- FOO=$(lwp-request -Ssd -C ${PASS} -m $1 http://${PASS}@localhost:$AGENT_PORT/$2 <<<"$3") ++ FOO=$(curl -D - -s -u ${PASS} -X $1 http://localhost:$AGENT_PORT/$2 <<<"$3") + if [ "x$?" = "x0" ]; then pass; else fail "$*: $FOO"; fi + inc +- CODE=$(echo -e "$FOO" | grep -v "^$1" | head -n1 | cut -f1 -d' ') ++ CODE=$(echo -e "$FOO" | head -n1 | cut -d' ' -f 2) + if [ "x$CODE" = "x$4" ]; then pass; else fail "$*: $FOO"; fi + inc + } diff --git a/varnish-agent.spec b/varnish-agent.spec index 21df0e4..3f3fafa 100644 --- a/varnish-agent.spec +++ b/varnish-agent.spec @@ -1,43 +1,58 @@ -%global commit 8352e30d79364f0145cb583a88ed3fe328771c63 +%global commit 28eacbb0ef5df7ea274bccbaca5a4a6ce5eda916 %global shortcommit %(c=%{commit}; echo ${c:0:7}) +%global varnishver 4.1.1 +%global vabi 3.1 +%global vabistrict 66bb824 + +%global agent_secret %{_sysconfdir}/varnish/agent_secret + Name: varnish-agent -Version: 4.0.0 -Release: 0.7.RC2%{?dist} +Version: 4.1.0 +Release: 0.4.20160201git%{?shortcommit}%{?dist} Summary: Administration agent for Varnish Cache Group: System Environment/Daemons License: BSD URL: https://github.com/varnish/vagent2 Source0: https://github.com/varnish/vagent2/archive/%{commit}/vagent2-%{version}-%{shortcommit}.tar.gz -Source1: varnish-agent.service -Source2: agent.params Patch0: vagent.disable_test.patch +Patch1: varnish-agent-4.1.0.fix_for_old_lwp.patch BuildRequires: autoconf BuildRequires: automake -BuildRequires: libcurl-devel +BuildRequires: curl-devel +BuildRequires: libedit-devel BuildRequires: libmicrohttpd-devel BuildRequires: libtool -BuildRequires: perl-libwww-perl +BuildRequires: nc +BuildRequires: perl(LWP) BuildRequires: python-demjson BuildRequires: python-docutils -BuildRequires: systemd -BuildRequires: varnish -BuildRequires: varnish-libs-devel +BuildRequires: sed +BuildRequires: strace +BuildRequires: varnish = %{varnishver} +BuildRequires: varnish-libs-devel = %{varnishver} -Requires: varnish +Requires: varnish = %varnishver +Requires: varnishabi-%vabi +Requires: varnishabi-strict-%vabistrict -Requires(post): systemd -Requires(preun): systemd -Requires(postun): systemd +%if 0%{?fedora} || 0%{?rhel} >= 7 +BuildRequires: systemd-units +Requires(post): systemd-units +Requires(preun): systemd-units +Requires(postun): systemd-units +%endif %description -Varnish Agent software that runs on all caches managed by Varnish -Administration Console (VAC). +Varnish Agent is a small daemon meant to communicate with Varnish and other +varnish-related services to allow remote control and monitoring of Varnish. +Required component for running the Varnish Administration Console (VAC) from +Varnish Software. %prep %autosetup -n vagent2-%{commit} -p1 @@ -59,8 +74,15 @@ install -m 755 -d %{buildroot}%{_sharedstatedir}/%{name} install -m 755 -d %{buildroot}%{_unitdir} install -m 755 -d %{buildroot}%{_sysconfdir}/varnish -install -pm 644 -t %{buildroot}%{_unitdir} %{SOURCE1} -install -pm 644 -t %{buildroot}%{_sysconfdir}/varnish %{SOURCE2} +%if 0%{?fedora} || 0%{?rhel} >= 7 +install -pm 644 -t %{buildroot}%{_unitdir} redhat/%{name}.service +install -pm 644 -t %{buildroot}%{_sysconfdir}/varnish redhat/%{name}.params +%else +install -pm 644 -t %{buildroot}%{_sysconfdir}/sysconfig redhat/%{name}.sysconfig +install -pm 644 -t %{buildroot}%{_initddir} redhat/%{name}.initrc +%endif + +touch %{buildroot}%{agent_secret} %check @@ -68,34 +90,77 @@ make check %files -%doc LICENSE THANKS +%doc NEWS.rst README.rst THANKS %{_bindir}/%{name} %{_mandir}/man1/%{name}.1* %{_datadir}/%{name} +%if 0%{?fedora} || 0%{?rhel} >= 7 %{_unitdir}/%{name}.service -%{_sharedstatedir}/%{name} -%config(noreplace) %{_sysconfdir}/varnish/agent.params +%config(noreplace) %{_sysconfdir}/varnish/%{name}.params +%license LICENSE +%else +%config(noreplace) %{_initddir}/%{name} +%config(noreplace) %{_sysconfdir}/sysconfig/%{name} +%doc LICENSE +%endif +%ghost %attr(600, -, -) %{agent_secret} +%attr(-, varnish, varnish) %{_sharedstatedir}/%{name} %post -%systemd_post varnish-agent.service +test -f %{agent_secret} || ( + password="$(head -c 8 /dev/urandom | base64)" + echo "varnish:$password" > %{agent_secret} && + chmod 0600 %{agent_secret} +) +%if 0%{?fedora} || 0%{?rhel} >= 7 +%systemd_post %{name}.service +%else +/sbin/chkconfig --add %{name} +%endif %preun -%systemd_preun varnish-agent.service +%if 0%{?fedora} || 0%{?rhel} >= 7 +%systemd_preun %{name}.service +%else +if [ $1 -lt 1 ] +then + /sbin/service %{name} stop >/dev/null + /sbin/chkconfig --del %{name} +fi +%endif %postun -%systemd_postun_with_restart varnish-agent.service +%if 0%{?fedora} || 0%{?rhel} >= 7 +%systemd_postun_with_restart %{name}.service +%endif %changelog +* Mon Feb 08 2016 Dridi Boukelmoune - 0.4.20160201git28eacbb +- Merged in upstream/Ingvar's spec + * Fri Feb 05 2016 Fedora Release Engineering - 4.0.0-0.7.RC2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild +* Mon Feb 01 2016 Ingvar Hagelund - 0.4.20160201git28eacbb +- Updated to new git checkout for varnish-4.1.1 support +- Added missing doc items +- Use %%systemd_preun when available + * Thu Nov 05 2015 Kalev Lember - 4.0.0-0.6.RC2 - Rebuilt for libmicrohttpd soname bump +* Mon Nov 02 2015 Ingvar Hagelund - 0.3.git.846d880 +- Fixed reported 32 bit build bug. Dropped workaround patch. + +* Thu Oct 22 2015 Ingvar Hagelund - 4.1.0-0.2.git.a50ebc2 +- First wrap for fedora/copr, based on upstream specfile +- Added a patch replacing old lwp calls with curl on el5 +- Added a patch removing -Werror for i386 on el5 and el6 + * Fri Jun 19 2015 Fedora Release Engineering - 4.0.0-0.5.RC2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild From 15d5e5581bfb05f574304e192f45f86bf7427215 Mon Sep 17 00:00:00 2001 From: Dridi Boukelmoune Date: Mon, 8 Feb 2016 14:58:04 +0100 Subject: [PATCH 10/17] Add missing source for 4.1.0 --- .gitignore | 1 + sources | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index eae85be..1ae24b2 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ /2.1.tar.gz /vagent2-4.0.0-1b8447b.tar.gz /vagent2-4.0.0-8352e30.tar.gz +/vagent2-4.1.0-28eacbb.tar.gz diff --git a/sources b/sources index 4c1939c..34bec0d 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -bfc8c7362659f54188aee3cbf24ef42d vagent2-4.0.0-8352e30.tar.gz +775795133392a7aba501017a51a77fdb vagent2-4.1.0-28eacbb.tar.gz From ebf377f13de228355876f574cd7dc7f6c0577920 Mon Sep 17 00:00:00 2001 From: Dridi Boukelmoune Date: Tue, 9 Feb 2016 12:26:32 +0100 Subject: [PATCH 11/17] Bump release number and remove the date --- varnish-agent.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/varnish-agent.spec b/varnish-agent.spec index 3f3fafa..2372356 100644 --- a/varnish-agent.spec +++ b/varnish-agent.spec @@ -9,7 +9,7 @@ Name: varnish-agent Version: 4.1.0 -Release: 0.4.20160201git%{?shortcommit}%{?dist} +Release: 0.5.git%{?shortcommit}%{?dist} Summary: Administration agent for Varnish Cache Group: System Environment/Daemons From a30fdcabff7df5aaceba6cc4a30cbafad5203efc Mon Sep 17 00:00:00 2001 From: Dridi Boukelmoune Date: Wed, 31 Aug 2016 18:43:04 +0200 Subject: [PATCH 12/17] Bump to version 4.1.1 --- .gitignore | 1 + sources | 2 +- vagent.disable_test.patch | 12 --------- varnish-agent-4.1.0.fix_for_old_lwp.patch | 28 ------------------- varnish-agent.spec | 33 +++++++++-------------- 5 files changed, 15 insertions(+), 61 deletions(-) delete mode 100644 vagent.disable_test.patch delete mode 100644 varnish-agent-4.1.0.fix_for_old_lwp.patch diff --git a/.gitignore b/.gitignore index 1ae24b2..8a8e021 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ /vagent2-4.0.0-1b8447b.tar.gz /vagent2-4.0.0-8352e30.tar.gz /vagent2-4.1.0-28eacbb.tar.gz +/varnish-agent-4.1.1.tar.gz diff --git a/sources b/sources index 34bec0d..755ee79 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -775795133392a7aba501017a51a77fdb vagent2-4.1.0-28eacbb.tar.gz +12d3e4fb564c8c75660dcf3e8d9f50d2 varnish-agent-4.1.1.tar.gz diff --git a/vagent.disable_test.patch b/vagent.disable_test.patch deleted file mode 100644 index ba8992f..0000000 --- a/vagent.disable_test.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git i/tests/Makefile.am w/tests/Makefile.am -index 454dce1..4528a50 100644 ---- i/tests/Makefile.am -+++ w/tests/Makefile.am -@@ -2,7 +2,6 @@ LOG_COMPILER = $(srcdir)/test-wrapper - TESTS = ban.sh \ - arguments.sh \ - buffers.sh \ -- vac_register.sh \ - json.sh \ - log.sh \ - status.sh \ diff --git a/varnish-agent-4.1.0.fix_for_old_lwp.patch b/varnish-agent-4.1.0.fix_for_old_lwp.patch deleted file mode 100644 index b8fa9e5..0000000 --- a/varnish-agent-4.1.0.fix_for_old_lwp.patch +++ /dev/null @@ -1,28 +0,0 @@ -diff -ru tests.orig/http.sh tests/http.sh ---- i/tests.orig/http.sh 2015-10-22 21:32:15.000000000 +0200 -+++ w/tests/http.sh 2015-10-23 01:06:18.465944881 +0200 -@@ -12,7 +12,7 @@ - test_it_code GET html/index.html "" "200" - test_it_code GET html/ "" "200" - test_it_code GET html "" "301" --FOO=$(lwp-request -USsed -C ${PASS} http://localhost:$AGENT_PORT/html) -+FOO=$(curl -L -D - -u ${PASS} http://localhost:$AGENT_PORT/html) - if [ "x$?" = "x0" ]; then pass; else fail "$*: $FOO"; fi - inc - if echo -e "$FOO" | grep -q "200 OK"; then pass; else fail "Redirect failed to yield 200 OK"; fi -diff -ru tests.orig/util.sh tests/util.sh ---- i/tests.orig/util.sh 2015-10-22 21:32:15.000000000 +0200 -+++ w/tests/util.sh 2015-10-23 01:06:22.976205467 +0200 -@@ -254,10 +254,10 @@ - } - - test_it_code() { -- FOO=$(lwp-request -Ssd -C ${PASS} -m $1 http://${PASS}@localhost:$AGENT_PORT/$2 <<<"$3") -+ FOO=$(curl -D - -s -u ${PASS} -X $1 http://localhost:$AGENT_PORT/$2 <<<"$3") - if [ "x$?" = "x0" ]; then pass; else fail "$*: $FOO"; fi - inc -- CODE=$(echo -e "$FOO" | grep -v "^$1" | head -n1 | cut -f1 -d' ') -+ CODE=$(echo -e "$FOO" | head -n1 | cut -d' ' -f 2) - if [ "x$CODE" = "x$4" ]; then pass; else fail "$*: $FOO"; fi - inc - } diff --git a/varnish-agent.spec b/varnish-agent.spec index 2372356..4d68734 100644 --- a/varnish-agent.spec +++ b/varnish-agent.spec @@ -1,24 +1,14 @@ -%global commit 28eacbb0ef5df7ea274bccbaca5a4a6ce5eda916 -%global shortcommit %(c=%{commit}; echo ${c:0:7}) - -%global varnishver 4.1.1 -%global vabi 3.1 -%global vabistrict 66bb824 - %global agent_secret %{_sysconfdir}/varnish/agent_secret Name: varnish-agent -Version: 4.1.0 -Release: 0.5.git%{?shortcommit}%{?dist} +Version: 4.1.1 +Release: 1%{?dist} Summary: Administration agent for Varnish Cache Group: System Environment/Daemons License: BSD URL: https://github.com/varnish/vagent2 -Source0: https://github.com/varnish/vagent2/archive/%{commit}/vagent2-%{version}-%{shortcommit}.tar.gz - -Patch0: vagent.disable_test.patch -Patch1: varnish-agent-4.1.0.fix_for_old_lwp.patch +Source: %{url}/releases/download/%{version}/%{name}-%{version}.tar.gz BuildRequires: autoconf BuildRequires: automake @@ -32,12 +22,10 @@ BuildRequires: python-demjson BuildRequires: python-docutils BuildRequires: sed BuildRequires: strace -BuildRequires: varnish = %{varnishver} -BuildRequires: varnish-libs-devel = %{varnishver} +BuildRequires: varnish +BuildRequires: varnish-libs-devel -Requires: varnish = %varnishver -Requires: varnishabi-%vabi -Requires: varnishabi-strict-%vabistrict +Requires: varnish %if 0%{?fedora} || 0%{?rhel} >= 7 BuildRequires: systemd-units @@ -55,14 +43,13 @@ Required component for running the Varnish Administration Console (VAC) from Varnish Software. %prep -%autosetup -n vagent2-%{commit} -p1 +%setup -q # varnish-agent expects to be built from the git repository sed -i s/NOGIT/%{version}/ include/Makefile.am %build -./autogen.sh %configure make %{?_smp_mflags} @@ -139,6 +126,12 @@ fi %changelog +* Wed Aug 31 2016 Dridi Boukelmoune - 4.1.1-1 +- Bumped version to 4.1.1 +- Relied on libvarnishapi binary dependency for the varnish requirement +- Switched to a dist tarball from upstream +- Removed existing patches + * Mon Feb 08 2016 Dridi Boukelmoune - 0.4.20160201git28eacbb - Merged in upstream/Ingvar's spec From aae235ed46640908f7a8e00c49429a0ce8d374d6 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 11 Feb 2017 16:57:02 +0000 Subject: [PATCH 13/17] - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild --- varnish-agent.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/varnish-agent.spec b/varnish-agent.spec index 4d68734..b4f2853 100644 --- a/varnish-agent.spec +++ b/varnish-agent.spec @@ -2,7 +2,7 @@ Name: varnish-agent Version: 4.1.1 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Administration agent for Varnish Cache Group: System Environment/Daemons @@ -126,6 +126,9 @@ fi %changelog +* Sat Feb 11 2017 Fedora Release Engineering - 4.1.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + * Wed Aug 31 2016 Dridi Boukelmoune - 4.1.1-1 - Bumped version to 4.1.1 - Relied on libvarnishapi binary dependency for the varnish requirement From 164d17506273f19a01e9568dae6b5636a0dd2a20 Mon Sep 17 00:00:00 2001 From: Dridi Boukelmoune Date: Sat, 18 Feb 2017 09:33:59 +0100 Subject: [PATCH 14/17] BuildRequires cleanup --- varnish-agent.spec | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/varnish-agent.spec b/varnish-agent.spec index b4f2853..3c7c958 100644 --- a/varnish-agent.spec +++ b/varnish-agent.spec @@ -10,20 +10,18 @@ License: BSD URL: https://github.com/varnish/vagent2 Source: %{url}/releases/download/%{version}/%{name}-%{version}.tar.gz -BuildRequires: autoconf BuildRequires: automake -BuildRequires: curl-devel -BuildRequires: libedit-devel -BuildRequires: libmicrohttpd-devel -BuildRequires: libtool BuildRequires: nc BuildRequires: perl(LWP) +BuildRequires: pkgconfig(libcurl) +BuildRequires: pkgconfig(libedit) +BuildRequires: pkgconfig(libmicrohttpd) +BuildRequires: pkgconfig(varnishapi) BuildRequires: python-demjson BuildRequires: python-docutils BuildRequires: sed BuildRequires: strace BuildRequires: varnish -BuildRequires: varnish-libs-devel Requires: varnish From bb86974ee4d5d4ce490e572b3c4e59bd3a7b256b Mon Sep 17 00:00:00 2001 From: Dridi Boukelmoune Date: Sat, 18 Feb 2017 12:01:43 +0100 Subject: [PATCH 15/17] Work around bug 1422256 --- varnish-agent.spec | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/varnish-agent.spec b/varnish-agent.spec index 3c7c958..8830085 100644 --- a/varnish-agent.spec +++ b/varnish-agent.spec @@ -32,6 +32,14 @@ Requires(preun): systemd-units Requires(postun): systemd-units %endif +# XXX: https://bugzilla.redhat.com/show_bug.cgi?id=1422256 +BuildRequires: pkgconfig(nettle) +BuildRequires: pkgconfig(hogweed) +BuildRequires: pkgconfig(libtasn1) +BuildRequires: pkgconfig(libidn) +BuildRequires: pkgconfig(p11-kit-1) +BuildRequires: pkgconfig(zlib) + %description Varnish Agent is a small daemon meant to communicate with Varnish and other @@ -48,6 +56,11 @@ sed -i s/NOGIT/%{version}/ include/Makefile.am %build + +# XXX: https://bugzilla.redhat.com/show_bug.cgi?id=1422256 +sed s/libidn2,// %_libdir/pkgconfig/gnutls.pc >gnutls.pc +export PKG_CONFIG_PATH=. + %configure make %{?_smp_mflags} From ac21eb09f057a715a00182fc0a16c945daaa2428 Mon Sep 17 00:00:00 2001 From: Dridi Boukelmoune Date: Mon, 20 Feb 2017 16:40:39 +0100 Subject: [PATCH 16/17] master --- .gitignore | 5 - agent.params | 14 --- dead.package | 1 + sources | 1 - varnish-agent.service | 23 ----- varnish-agent.spec | 210 ------------------------------------------ 6 files changed, 1 insertion(+), 253 deletions(-) delete mode 100644 .gitignore delete mode 100644 agent.params create mode 100644 dead.package delete mode 100644 sources delete mode 100644 varnish-agent.service delete mode 100644 varnish-agent.spec diff --git a/.gitignore b/.gitignore deleted file mode 100644 index 8a8e021..0000000 --- a/.gitignore +++ /dev/null @@ -1,5 +0,0 @@ -/2.1.tar.gz -/vagent2-4.0.0-1b8447b.tar.gz -/vagent2-4.0.0-8352e30.tar.gz -/vagent2-4.1.0-28eacbb.tar.gz -/varnish-agent-4.1.1.tar.gz diff --git a/agent.params b/agent.params deleted file mode 100644 index a3f30fc..0000000 --- a/agent.params +++ /dev/null @@ -1,14 +0,0 @@ -# Varnish-agent environment configuration description. This was derived -# from the old style sysconfig/defaults settings - -# Default port to bind to. -VAGENT_PORT=6085 - -# Default location of the HTML interface. -VAGENT_HTML_DIRECTORY=/usr/share/varnish-agent/html - -# Additional options if needed. -VAGENT_OPTS= - -# Shared secret file, used to authenticate with varnishd -VAGENT_SECRET_FILE=/etc/varnish/agent_secret diff --git a/dead.package b/dead.package new file mode 100644 index 0000000..1f7391f --- /dev/null +++ b/dead.package @@ -0,0 +1 @@ +master diff --git a/sources b/sources deleted file mode 100644 index 755ee79..0000000 --- a/sources +++ /dev/null @@ -1 +0,0 @@ -12d3e4fb564c8c75660dcf3e8d9f50d2 varnish-agent-4.1.1.tar.gz diff --git a/varnish-agent.service b/varnish-agent.service deleted file mode 100644 index c9ec625..0000000 --- a/varnish-agent.service +++ /dev/null @@ -1,23 +0,0 @@ -[Unit] -Description=Administration agent for Varnish Cache -Documentation=man:varnish-agent(1) -After=varnish - -[Service] - -EnvironmentFile=/etc/varnish/*.params -Type=forking -PIDFile=/var/run/varnish-agent.pid -PrivateTmp=true - -ExecStart=/usr/bin/varnish-agent \ - -P /var/run/varnish-agent.pid \ - -c $VAGENT_PORT \ - -H $VAGENT_HTML_DIRECTORY \ - -u $VARNISH_USER \ - -g $VARNISH_GROUP \ - -S $VARNISH_SECRET_FILE \ - $VAGENT_OPTS - -[Install] -WantedBy=multi-user.target diff --git a/varnish-agent.spec b/varnish-agent.spec deleted file mode 100644 index 8830085..0000000 --- a/varnish-agent.spec +++ /dev/null @@ -1,210 +0,0 @@ -%global agent_secret %{_sysconfdir}/varnish/agent_secret - -Name: varnish-agent -Version: 4.1.1 -Release: 2%{?dist} -Summary: Administration agent for Varnish Cache -Group: System Environment/Daemons - -License: BSD -URL: https://github.com/varnish/vagent2 -Source: %{url}/releases/download/%{version}/%{name}-%{version}.tar.gz - -BuildRequires: automake -BuildRequires: nc -BuildRequires: perl(LWP) -BuildRequires: pkgconfig(libcurl) -BuildRequires: pkgconfig(libedit) -BuildRequires: pkgconfig(libmicrohttpd) -BuildRequires: pkgconfig(varnishapi) -BuildRequires: python-demjson -BuildRequires: python-docutils -BuildRequires: sed -BuildRequires: strace -BuildRequires: varnish - -Requires: varnish - -%if 0%{?fedora} || 0%{?rhel} >= 7 -BuildRequires: systemd-units -Requires(post): systemd-units -Requires(preun): systemd-units -Requires(postun): systemd-units -%endif - -# XXX: https://bugzilla.redhat.com/show_bug.cgi?id=1422256 -BuildRequires: pkgconfig(nettle) -BuildRequires: pkgconfig(hogweed) -BuildRequires: pkgconfig(libtasn1) -BuildRequires: pkgconfig(libidn) -BuildRequires: pkgconfig(p11-kit-1) -BuildRequires: pkgconfig(zlib) - - -%description -Varnish Agent is a small daemon meant to communicate with Varnish and other -varnish-related services to allow remote control and monitoring of Varnish. - -Required component for running the Varnish Administration Console (VAC) from -Varnish Software. - -%prep -%setup -q - -# varnish-agent expects to be built from the git repository -sed -i s/NOGIT/%{version}/ include/Makefile.am - - -%build - -# XXX: https://bugzilla.redhat.com/show_bug.cgi?id=1422256 -sed s/libidn2,// %_libdir/pkgconfig/gnutls.pc >gnutls.pc -export PKG_CONFIG_PATH=. - -%configure -make %{?_smp_mflags} - - -%install -%make_install - -install -m 755 -d %{buildroot}%{_sharedstatedir}/%{name} -install -m 755 -d %{buildroot}%{_unitdir} -install -m 755 -d %{buildroot}%{_sysconfdir}/varnish - -%if 0%{?fedora} || 0%{?rhel} >= 7 -install -pm 644 -t %{buildroot}%{_unitdir} redhat/%{name}.service -install -pm 644 -t %{buildroot}%{_sysconfdir}/varnish redhat/%{name}.params -%else -install -pm 644 -t %{buildroot}%{_sysconfdir}/sysconfig redhat/%{name}.sysconfig -install -pm 644 -t %{buildroot}%{_initddir} redhat/%{name}.initrc -%endif - -touch %{buildroot}%{agent_secret} - - -%check -make check - - -%files -%doc NEWS.rst README.rst THANKS -%{_bindir}/%{name} -%{_mandir}/man1/%{name}.1* -%{_datadir}/%{name} -%if 0%{?fedora} || 0%{?rhel} >= 7 -%{_unitdir}/%{name}.service -%config(noreplace) %{_sysconfdir}/varnish/%{name}.params -%license LICENSE -%else -%config(noreplace) %{_initddir}/%{name} -%config(noreplace) %{_sysconfdir}/sysconfig/%{name} -%doc LICENSE -%endif -%ghost %attr(600, -, -) %{agent_secret} -%attr(-, varnish, varnish) %{_sharedstatedir}/%{name} - - -%post -test -f %{agent_secret} || ( - password="$(head -c 8 /dev/urandom | base64)" - echo "varnish:$password" > %{agent_secret} && - chmod 0600 %{agent_secret} -) -%if 0%{?fedora} || 0%{?rhel} >= 7 -%systemd_post %{name}.service -%else -/sbin/chkconfig --add %{name} -%endif - - -%preun -%if 0%{?fedora} || 0%{?rhel} >= 7 -%systemd_preun %{name}.service -%else -if [ $1 -lt 1 ] -then - /sbin/service %{name} stop >/dev/null - /sbin/chkconfig --del %{name} -fi -%endif - - -%postun -%if 0%{?fedora} || 0%{?rhel} >= 7 -%systemd_postun_with_restart %{name}.service -%endif - - -%changelog -* Sat Feb 11 2017 Fedora Release Engineering - 4.1.1-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild - -* Wed Aug 31 2016 Dridi Boukelmoune - 4.1.1-1 -- Bumped version to 4.1.1 -- Relied on libvarnishapi binary dependency for the varnish requirement -- Switched to a dist tarball from upstream -- Removed existing patches - -* Mon Feb 08 2016 Dridi Boukelmoune - 0.4.20160201git28eacbb -- Merged in upstream/Ingvar's spec - -* Fri Feb 05 2016 Fedora Release Engineering - 4.0.0-0.7.RC2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild - -* Mon Feb 01 2016 Ingvar Hagelund - 0.4.20160201git28eacbb -- Updated to new git checkout for varnish-4.1.1 support -- Added missing doc items -- Use %%systemd_preun when available - -* Thu Nov 05 2015 Kalev Lember - 4.0.0-0.6.RC2 -- Rebuilt for libmicrohttpd soname bump - -* Mon Nov 02 2015 Ingvar Hagelund - 0.3.git.846d880 -- Fixed reported 32 bit build bug. Dropped workaround patch. - -* Thu Oct 22 2015 Ingvar Hagelund - 4.1.0-0.2.git.a50ebc2 -- First wrap for fedora/copr, based on upstream specfile -- Added a patch replacing old lwp calls with curl on el5 -- Added a patch removing -Werror for i386 on el5 and el6 - -* Fri Jun 19 2015 Fedora Release Engineering - 4.0.0-0.5.RC2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild - -* Mon Aug 18 2014 Fedora Release Engineering - 4.0.0-0.4.RC2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild - -* Sun Jun 08 2014 Fedora Release Engineering - 4.0.0-0.3.RC2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild - -* Tue Jun 03 2014 Dridi Boukelmoune - 4.0.0-0.2.RC2 -- Bumped version to 4.0.0-RC2 - -* Mon Apr 28 2014 Dridi Boukelmoune - 4.0.0-0.1 -- Bumped version to experimental 4.0.0 -- Switched to a commit tarball from github -- Removed the upstreamed patches - -* Sun Dec 08 2013 Dridi Boukelmoune - 2.1-5 -- Removed the %%optflags on the %%configure command line - -* Sat Dec 07 2013 Dridi Boukelmoune - 2.1-4 -- Added a patch to make the test suites work offline -- Added a patch to disable the ban test suite -- Removed the default -S option from the service - -* Fri Nov 01 2013 Dridi Boukelmoune - 2.1-3 -- Added a patch for subdir-objects in automake -- Moved CFLAGS to the configure command line - -* Sun Oct 27 2013 Dridi Boukelmoune - 2.1-2 -- Requires: varnish -- BuildRequires: varnish python-demjson -- Added a patch for root privileges on the secret file -- Added a patch for the deprecated AM_CONFIG_HEADER macro -- Added a check section -- sed -i s/NOGIT/%%{version}/ include/Makefile.am -- mv vagent.params agent.params - -* Sun Sep 15 2013 Dridi Boukelmoune - 2.1-1 -- Initial spec. From 1590785278f992aa867379b8f09592c4436f7d66 Mon Sep 17 00:00:00 2001 From: Dridi Boukelmoune Date: Mon, 20 Feb 2017 16:42:09 +0100 Subject: [PATCH 17/17] Fix dead.package reason --- dead.package | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dead.package b/dead.package index 1f7391f..ae1012e 100644 --- a/dead.package +++ b/dead.package @@ -1 +1 @@ -master +not compatible with varnish 5+