Commit 1941f863 authored by Dridi Boukelmoune's avatar Dridi Boukelmoune

Append a default system-wide location to vmod_path

By default: /usr/share/vcl

This directory becomes a drop-in, and standard location for library-like
VCL files. It streamlines third-party VCL packaging, offering a blessed
for installation, leaving the canonical /etc/varnish directory entirely
to the end-user.

While it is common to see VMOD packages in the wild, there are some VCL
libraries (sometimes backed by VMODs) that would benefit some form of
standardization. It then becomes possible to install packages, and use
relative includes that JustWork(tm). This is especially true for VCL
libraries that are split into several files, they can put themselves in
a subdirectory in /usr/share/vcl and use it as a namespace for includes
between files of the library:

    # somewhere in my awesome "foo" library
    include "foo/some_feature.vcl"

Choosing a default path of `/etc/varnish:/usr/share/vcl` prevents VCLs
dropped in the system from shadowing end-users VCLs but at the same
empowers said users to override a "standard" VCL in their `/etc` tree,
with no additional parameters fiddling.
parent f3862b47
......@@ -145,7 +145,7 @@ varnishd_CFLAGS = \
-DVARNISHD_IS_NOT_A_VMOD \
-DVARNISH_STATE_DIR='"${VARNISH_STATE_DIR}"' \
-DVARNISH_VMOD_DIR='"${pkglibdir}/vmods"' \
-DVARNISH_VCL_DIR='"${varnishconfdir}"'
-DVARNISH_VCL_DIR='"${varnishconfdir}:${datarootdir}/varnish/vcl"'
varnishd_LDFLAGS = -export-dynamic
......
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