Commit 194d664e authored by Poul-Henning Kamp's avatar Poul-Henning Kamp
parents 8a385bfc 701e5c35
...@@ -54,8 +54,10 @@ TAGS ...@@ -54,8 +54,10 @@ TAGS
/lib/libvmod_std/vcc_if.h /lib/libvmod_std/vcc_if.h
# Man-files and binaries # Man-files and binaries
/man/vsc2rst
/man/vcl.7 /man/vcl.7
/man/varnish-cli.7 /man/varnish-cli.7
/man/varnish-counters.7
/bin/varnishadm/varnishadm /bin/varnishadm/varnishadm
/bin/varnishadm/varnishadm.1 /bin/varnishadm/varnishadm.1
/bin/varnishd/varnishd /bin/varnishd/varnishd
......
...@@ -98,6 +98,7 @@ mgt_sandbox(void) ...@@ -98,6 +98,7 @@ mgt_sandbox(void)
* silently ignore any errors if it doesn't exist * silently ignore any errors if it doesn't exist
*/ */
priv_addset(minimal, "net_access"); priv_addset(minimal, "net_access");
priv_addset(minimal, "file_read");
#define SETPPRIV(which, set) \ #define SETPPRIV(which, set) \
if (setppriv(PRIV_SET, which, set)) \ if (setppriv(PRIV_SET, which, set)) \
......
...@@ -34,7 +34,11 @@ ...@@ -34,7 +34,11 @@
#include <sys/time.h> #include <sys/time.h>
#ifdef HAVE_NCURSES_CURSES_H
#include <ncurses/curses.h>
#elif HAVE_CURSES_H
#include <curses.h> #include <curses.h>
#endif
#include <errno.h> #include <errno.h>
#include <signal.h> #include <signal.h>
#include <stdio.h> #include <stdio.h>
......
...@@ -87,6 +87,7 @@ AC_SUBST(CURSES_LIBS) ...@@ -87,6 +87,7 @@ AC_SUBST(CURSES_LIBS)
if test "$have_curses" = no; then if test "$have_curses" = no; then
AC_MSG_WARN([curses not found; some tools will not be built]) AC_MSG_WARN([curses not found; some tools will not be built])
fi fi
AC_CHECK_HEADERS([ncurses/curses.h curses.h])
AM_CONDITIONAL([HAVE_CURSES], [test x$have_curses = xyes]) AM_CONDITIONAL([HAVE_CURSES], [test x$have_curses = xyes])
save_LIBS="${LIBS}" save_LIBS="${LIBS}"
......
...@@ -20,11 +20,11 @@ To simplify strings, the %-encoding has been removed. If you need non-printable ...@@ -20,11 +20,11 @@ To simplify strings, the %-encoding has been removed. If you need non-printable
``log`` moved to the std vmod ``log`` moved to the std vmod
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
``log`` has moved to the std vmod: ``log`` has moved to the std vmod::
log "log something"; log "log something";
becomes becomes::
import std; import std;
std.log("log something"); std.log("log something");
...@@ -34,11 +34,11 @@ You only need to import std once. ...@@ -34,11 +34,11 @@ You only need to import std once.
purges are now called bans purges are now called bans
~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~
``purge()`` and ``purge_url()`` are now respectively ``ban()`` and ``ban_url()``, so you should replace all occurences: ``purge()`` and ``purge_url()`` are now respectively ``ban()`` and ``ban_url()``, so you should replace all occurences::
purge("req.url = " req.url); purge("req.url = " req.url);
becomes becomes::
ban("req.url = " + req.url); ban("req.url = " + req.url);
...@@ -84,22 +84,22 @@ becomes:: ...@@ -84,22 +84,22 @@ becomes::
``req.hash`` is replaced with ``hash_data()`` ``req.hash`` is replaced with ``hash_data()``
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
You no longer append to the hash with ``+=``, so You no longer append to the hash with ``+=``, so::
set req.hash += req.url; set req.hash += req.url;
becomes becomes::
hash_data(req.url); hash_data(req.url);
``esi`` is replaced with ``beresp.do_esi`` ``esi`` is replaced with ``beresp.do_esi``
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
You no longer enable ESI with ``esi``, so You no longer enable ESI with ``esi``, so::
esi; esi;
in ``vcl_fetch`` becomes in ``vcl_fetch`` becomes::
set beresp.do_esi = true; set beresp.do_esi = true;
......
# #
dist_man_MANS = vcl.7 varnish-cli.7 noinst_PROGRAMS = vsc2rst
vsc2rst_SOURCES = vsc2rst.c \
$(top_srcdir)/include/vsc_fields.h
INCLUDES = -I$(top_srcdir)/include
dist_man_MANS = vcl.7 varnish-cli.7 varnish-counters.7
MAINTAINERCLEANFILES = $(dist_man_MANS) MAINTAINERCLEANFILES = $(dist_man_MANS)
vcl.7: $(top_srcdir)/doc/sphinx/reference/vcl.rst \ vcl.7: $(top_srcdir)/doc/sphinx/reference/vcl.rst \
...@@ -23,3 +29,13 @@ else ...@@ -23,3 +29,13 @@ else
@echo "========================================" @echo "========================================"
@false @false
endif endif
varnish-counters.7: vsc2rst
if HAVE_RST2MAN
./vsc2rst | ${RST2MAN} - $@
else
@echo "========================================"
@echo "You need rst2man installed to make dist"
@echo "========================================"
@false
endif
#include <stdio.h>
#define P(x, ...) printf(x "\n", ##__VA_ARGS__)
#define VSC_F(n, t, l, f, e, d) printf("%s – %s\n\t%s\n\n", #n, e, d);
int main(int argc, char **argv)
{
(void)argc;
(void)argv;
P("================");
P("varnish-counters");
P("================");
P("");
P("---------------------------------");
P("Varnish counter field definitions");
P("---------------------------------");
P(":Author: Tollef Fog Heen");
P(":Date: 2011-09-20");
P(":Version: 1.0");
P(":Manual section: 7");
P("");
P("MAIN COUNTERS");
P("=============");
P("");
#define VSC_DO_MAIN
#include "vsc_fields.h"
#undef VSC_DO_MAIN
P("");
P("LOCK COUNTERS");
P("=============");
P("");
#define VSC_DO_LCK
#include "vsc_fields.h"
#undef VSC_DO_LCK
P("");
P("PER MALLOC STORAGE COUNTERS");
P("===========================");
P("");
#define VSC_DO_SMA
#include "vsc_fields.h"
#undef VSC_DO_SMA
P("");
P("PER FILE STORAGE COUNTERS");
P("=========================");
P("");
#define VSC_DO_SMF
#include "vsc_fields.h"
#undef VSC_DO_SMF
P("");
P("PER BACKEND COUNTERS");
P("====================");
P("");
#define VSC_DO_VBE
#include "vsc_fields.h"
#undef VSC_DO_VBE
return 0;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment