www/vinyl09: New port

Vinyl Cache, formerly known as Varnish Cache, is a web application accelerator
also known as a caching HTTP reverse proxy. You install it in front of any
server that speaks HTTP and configure it to cache the contents. Vinyl Cache is
really, really fast. It typically speeds up delivery by a factor of 300-1000x,
depending on your architecture.

Documentation and additional information about vinyl is available on
https://vinyl-cache.org/docs/index.html

Technical questions about vinyl and this release should be addressed
to <vinyl-dev@vinyl-cache.org>
This commit is contained in:
Danilo G. Baio
2026-03-22 13:45:11 -03:00
parent 10affd73b3
commit 6af727639c
12 changed files with 520 additions and 3 deletions
+1 -1
View File
@@ -371,7 +371,7 @@ drweb:*:426:
# free: 428
varnish:*:429:
# free: 430
# free: 431
vinyl:*:431:
# free: 432
# free: 433
# free: 434
+2 -2
View File
@@ -377,8 +377,8 @@ drweb:*:426:426::0:0:Dr.Web Mail Scanner:/nonexistent:/usr/sbin/nologin
# free: 428
varnish:*:429:429::0:0:Varnish Cache User:/nonexistent:/usr/sbin/nologin
varnishlog:*:430:429::0:0:Varnish Log User:/nonexistent:/usr/sbin/nologin
# free: 431
# free: 432
vinyl:*:431:431::0:0:Vinyl Cache User:/nonexistent:/usr/sbin/nologin
vinyllog:*:432:431::0:0:Vinyl Log User:/nonexistent:/usr/sbin/nologin
# free: 433
# free: 434
# free: 435
+1
View File
@@ -2673,6 +2673,7 @@
SUBDIR += vger
SUBDIR += vigil
SUBDIR += vimb
SUBDIR += vinyl09
SUBDIR += visitors
SUBDIR += volta
SUBDIR += vultr-cli
+55
View File
@@ -0,0 +1,55 @@
PORTNAME= vinyl
DISTVERSION= 9.0.0
CATEGORIES= www
MASTER_SITES= https://vinyl-cache.org/downloads/
PKGNAMESUFFIX= 09
DISTNAME= vinyl-cache-${PORTVERSION}
MAINTAINER= dbaio@FreeBSD.org
COMMENT= High-performance HTTP accelerator
WWW= https://vinyl-cache.org/
LICENSE= BSD2CLAUSE
LICENSE_FILE= ${WRKSRC}/LICENSE
BUILD_DEPENDS= rst2man:textproc/py-docutils@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}sphinx>=0,1:textproc/py-sphinx@${PY_FLAVOR}
LIB_DEPENDS= libpcre2-8.so:devel/pcre2
USES= cpe libedit libtool localbase ncurses pathfix \
pkgconfig python:build shebangfix tar:tgz
CPE_VENDOR= vinyl-cache
CPE_PRODUCT= vinyl_cache
GNU_CONFIGURE= yes
GNU_CONFIGURE_MANPREFIX= ${PREFIX}/share
SHEBANG_FILES= lib/libvcc/*.py lib/libvsc/*.py
USE_LDCONFIG= yes
USE_RC_SUBR= vinyld vinyllog vinylncsa
USERS= vinyl vinyllog
GROUPS= vinyl
INSTALL_TARGET= install-strip
TEST_TARGET= check
TEST_ARGS= TESTS_PARALLELISM=1
CONFIGURE_ARGS= --localstatedir=${PREFIX} --without-dot
# Needed for clang 15 (#268814)
CONFIGURE_ENV+= ax_cv_check_cflags___Werror=no
.if defined(NO_INET6) || defined(WITHOUT_INET6)
BAD_TESTS= r00832
EXTRA_PATCHES= ${FILESDIR}/no-inet6.patch
.endif
OPTIONS_DEFINE= DOCS
post-patch:
.if defined(BAD_TESTS)
${RM} ${BAD_TESTS:C|.+|${WRKSRC}/bin/vinyltest/tests/\0.vtc|}
.endif
pre-install:
${MKDIR} ${STAGEDIR}${PREFIX}/vinyl-cache
.include <bsd.port.mk>
+3
View File
@@ -0,0 +1,3 @@
TIMESTAMP = 1773711858
SHA256 (vinyl-cache-9.0.0.tgz) = 9740c210c2a77627d50fd0ad6c759dc3ca094fcb4e6555ba55fca71cf483bd17
SIZE (vinyl-cache-9.0.0.tgz) = 6353519
+8
View File
@@ -0,0 +1,8 @@
--- bin/vinyltest/tests/c00005.vtc 2012-08-20 05:20:39.000000000 -0400
+++ bin/vinyltest/tests/c00005.vtc 2012-09-26 12:09:59.000000000 -0400
@@ -32,5 +32,4 @@
! "localhost";
"0.0.0.0" / 0;
- "::" / 0;
}
+125
View File
@@ -0,0 +1,125 @@
#!/bin/sh
# PROVIDE: vinyld
# REQUIRE: DAEMON
# KEYWORD: shutdown
#
# Add the following line to /etc/rc.conf to enable vinyld:
#
# vinyld_enable="YES"
#
# Configuration variables and their default values:
#
# vinyld_pidfile - full path to the PID file.
# default: "/var/run/vinyld.pid"
#
# vinyld_listen - address and port at which vinyld will listen for
# client requests.
# default: ":80"
#
# vinyld_admin - address and port at which vinyld will listen for
# administrative commands.
# default: "localhost:81"
#
# vinyld_backend - address of the backend server.
# default: "localhost:8080"
#
# vinyld_config - name of the vinyld config file.
# default: unset.
#
# vinyld_hash - hash algorithm
# default: "critbit"
#
# vinyld_storage - storage method and parameters.
# default: "file,/tmp,100M"
#
# vinyld_jailuser - unprivileged user for the child process.
# default: "vinyl"
#
# vinyld_flags - complete command line arguments.
# default if vinyld_config is unset: "-j unix,user=${vinyld_jailuser} -P ${vinyld_pidfile} -a ${vinyld_listen} -T ${vinyld_admin} -b ${vinyld_backend} -s ${vinyld_storage} -h ${vinyld_hash} ${vinyld_extra_flags}"
# default if vinyld_config is set: "-j unix,user=${vinyld_jailuser} -P ${vinyld_pidfile} -a ${vinyld_listen} -T ${vinyld_admin} -f ${vinyld_config} -s ${vinyld_storage} -h ${vinyld_hash} ${vinyld_extra_flags}"
#
# See vinyld(1) for a detailed overview of command-line options.
#
. /etc/rc.subr
name=vinyld
rcvar=vinyld_enable
load_rc_config ${name}
: ${vinyld_enable:=NO}
: ${vinyld_pidfile=/var/run/${name}.pid}
: ${vinyld_listen=:80}
: ${vinyld_admin=localhost:81}
: ${vinyld_backend=localhost:8080}
: ${vinyld_storage=file,/tmp,100M}
: ${vinyld_hash=critbit}
: ${vinyld_jailuser=vinyl}
command="%%PREFIX%%/sbin/${name}"
pidfile="${vinyld_pidfile}"
configtest_cmd="vinyld_checkconfig"
reload_cmd="vinyld_reload"
restart_precmd="vinyld_checkconfig"
start_precmd="vinyld_precmd"
extra_commands="status reload configtest"
if [ -n "${vinyld_config}" ] ; then
: ${vinyld_flags:="-j unix,user=${vinyld_jailuser} -P ${vinyld_pidfile} -a ${vinyld_listen} -T ${vinyld_admin} -f ${vinyld_config} -s ${vinyld_storage} -h ${vinyld_hash} ${vinyld_extra_flags}"}
else
: ${vinyld_flags:="-j unix,user=${vinyld_jailuser} -P ${vinyld_pidfile} -a ${vinyld_listen} -T ${vinyld_admin} -b ${vinyld_backend} -s ${vinyld_storage} -h ${vinyld_hash} ${vinyld_extra_flags}"}
fi
vinyld_checkconfig()
{
if [ -z "${vinyld_config}" ]; then
echo "${name}: nothing to check, no configuration file defined, builtin VCL used"
else
echo "Performing sanity check on ${name} configuration:"
if eval ${command} -s ${vinyld_storage} ${vinyld_extra_flags} -C -f "${vinyld_config}" 2> /dev/null ; then
echo "${name}: the configuration file ${vinyld_config} syntax is ok"
else
err 1 "${name}: the configuration file ${vinyld_config} syntax is NOT ok"
fi
fi
}
# Adapted from work done by Ingvar Hagelund <ingvar@redpill-linpro.com> (see redhat/vinyl_reload_vcl)
vinyld_reload()
{
local _current_config_name _new_config_name _vinyladm_cmd
if [ -z "${vinyld_config}" ]; then
echo "${name}: nothing to reload, no configuration file defined, builtin VCL used"
else
_new_config_name="reloaded_$(date +%Y%m%d%H%M%S)"
_vinyladm_cmd="%%PREFIX%%/bin/vinyladm ${vinyl_cli_flags}"
if ! eval ${_vinyladm_cmd} vcl.list > /dev/null; then
err 1 "${name}: can't connect to vinyladm"
fi
_current_config_name=$(${_vinyladm_cmd} vcl.list | awk ' /^active/ { print $3 } ')
if ! eval ${_vinyladm_cmd} vcl.load ${_new_config_name} ${vinyld_config} > /dev/null; then
err 1 "${name}: vcl.load failed, you're still using previous rules (${_current_config_name})"
fi
if eval ${_vinyladm_cmd} vcl.use ${_new_config_name} > /dev/null; then
echo "VCL file \"${vinyld_config}\" has been successfully loaded as \"${_new_config_name}\""
echo "To remove previous loaded configurations, you should run \"${_vinyladm_cmd} vcl.discard <configname>\" by yourself"
else
err 1 "${name}: vcl.use failed, you're still using previous rules (${_current_config_name})"
fi
fi
return 0
}
vinyld_precmd()
{
# Check config before starting
vinyld_checkconfig
}
run_rc_command "$1"
+62
View File
@@ -0,0 +1,62 @@
#!/bin/sh
# PROVIDE: vinyllog
# REQUIRE: DAEMON vinyld
# KEYWORD: shutdown
#
# Add the following line to /etc/rc.conf to enable vinyllog:
#
# vinyllog_enable="YES"
#
# Configuration variables and their default values:
#
# vinyllog_pidfile - full path to the PID file.
# default: "/var/run/vinyllog.pid"
#
# vinyllog_file - full path to the log file.
# default: "/var/log/vinyl.log"
#
# vinyllog_flags - command line arguments.
# default: "-t off -P ${vinyllog_pidfile} -D -a -A -w ${vinyllog_file}"
#
# Add the following line to /etc/newsyslog.conf to rotate the log file
# once a day:
#
# /var/log/vinyl.log vinyllog:vinyl 640 7 * @T00 JB /var/run/vinyllog.pid
#
# See vinyllog(1) for a detailed overview of command-line options.
#
. /etc/rc.subr
name=vinyllog
rcvar=vinyllog_enable
load_rc_config ${name}
: ${vinyllog_enable:=NO}
: ${vinyllog_pidfile=/var/run/${name}.pid}
: ${vinyllog_file=/var/log/vinyl.log}
: ${vinyllog_flags="-t off -P ${vinyllog_pidfile} -D -a -A -w ${vinyllog_file}"}
procname="%%PREFIX%%/bin/${name}"
command="/usr/sbin/daemon"
command_args="-f -u vinyllog ${procname} ${vinyllog_flags}"
pidfile=${vinyllog_pidfile}
start_precmd=precmd
precmd()
{
# vinyllog_flags gets applied too early if we don't do this.
rc_flags=""
if [ ! -e ${pidfile} ]; then
install -o vinyllog -g vinyl -m 644 /dev/null ${pidfile};
fi
if [ ! -e ${vinyllog_file} ]; then
install -o vinyllog -g vinyl -m 640 /dev/null ${vinyllog_file};
fi
}
run_rc_command "$1"
+77
View File
@@ -0,0 +1,77 @@
#!/bin/sh
# PROVIDE: vinylncsa
# REQUIRE: DAEMON vinyld
# KEYWORD: shutdown
#
# Add the following line to /etc/rc.conf to enable vinylncsa:
#
# vinylncsa_enable="YES"
#
# Configuration variables and their default values:
#
# vinylncsa_pidfile - full path to the PID file.
# default: "/var/run/vinylncsa.pid"
#
# vinylncsa_file - full path to the log file.
# default: "/var/log/vinylncsa.log"
#
# vinylncsa_log_method - log to file or syslog
# default: "-D -a -w ${vinylncsa_file}"
# vinylncsa_syslog="YES": '| /usr/bin/logger -t vinyl -p daemon.info &'
#
# vinylncsa_flags - command line arguments.
# default: "-t off -P ${vinylncsa_pidfile} ${vinylncsa_logformat:+ -F \"$vinylncsa_logformat\"} ${vinylncsa_log_method}"
#
# vinylncsa_logformat - log file format.
# default: "" (uses vinylncsa's default format)
# example: "%h %l %u %t %r %s %b %{Referer}i %{User-agent}i"
#
# Add the following line to /etc/newsyslog.conf to rotate the log file
# once a day:
#
# /var/log/vinylncsa.log vinyllog:vinyl 640 7 * @T00 JB /var/run/vinylncsa.pid
#
# See vinylncsa(1) for a detailed overview of command-line options.
#
. /etc/rc.subr
name=vinylncsa
rcvar=vinylncsa_enable
load_rc_config ${name}
: ${vinylncsa_enable:=NO}
: ${vinylncsa_pidfile=/var/run/${name}.pid}
: ${vinylncsa_file=/var/log/${name}.log}
: ${vinylncsa_flags="-t off -P ${vinylncsa_pidfile} ${vinylncsa_logformat:+-F \"$vinylncsa_logformat\"}"}
: ${vinylncsa_syslog:=NO}
if checkyesno vinylncsa_syslog; then
vinylncsa_log_method='| /usr/bin/logger -t vinyl -p daemon.info &'
else
vinylncsa_log_method="-D -a -w ${vinylncsa_file}"
fi
command="%%PREFIX%%/bin/${name}"
command_args="${vinylncsa_flags} ${vinylncsa_log_method}"
pidfile=${vinylncsa_pidfile}
start_precmd=precmd
precmd()
{
# $vinylncsa_flags gets applied too early if we don't do this.
rc_flags=""
if [ ! -e ${pidfile} ]; then
install -o vinyllog -g vinyl -m 644 /dev/null ${pidfile};
fi
if [ ! -e ${vinylncsa_file} ]; then
install -o vinyllog -g vinyl -m 640 /dev/null ${vinylncsa_file};
fi
}
run_rc_command "$1"
+11
View File
@@ -0,0 +1,11 @@
Vinyl Cache, formerly known as Varnish Cache, is a web application accelerator
also known as a caching HTTP reverse proxy. You install it in front of any
server that speaks HTTP and configure it to cache the contents. Vinyl Cache is
really, really fast. It typically speeds up delivery by a factor of 300-1000x,
depending on your architecture.
Documentation and additional information about vinyl is available on
https://vinyl-cache.org/docs/index.html
Technical questions about vinyl and this release should be addressed
to <vinyl-dev@vinyl-cache.org>
+18
View File
@@ -0,0 +1,18 @@
[
{ type: install
message: <<EOM
QUICK-START GUIDE
It's two in the morning and someone posted a link to your website on Hacker
News. Don't panic, it takes only a minute to set up vinyl in front of your
web server:
1) Install vinyl
2) Reconfigure your web server to listen on localhost:8080
3) sysrc vinyld_enable=YES
4) service vinyld start
Refer to the documentation for more advanced configuration.
EOM
}
]
+157
View File
@@ -0,0 +1,157 @@
bin/vinyladm
bin/vinylhist
bin/vinyllog
bin/vinylncsa
bin/vinylstat
bin/vinylstat_help_gen
bin/vinyltest
bin/vinyltop
bin/vtest
include/vinyl-cache/cache/cache.h
include/vinyl-cache/cache/cache_backend.h
include/vinyl-cache/cache/cache_director.h
include/vinyl-cache/cache/cache_filter.h
include/vinyl-cache/cache/cache_vinyld.h
include/vinyl-cache/common/common_param.h
include/vinyl-cache/miniobj.h
include/vinyl-cache/tbl/acct_fields_bereq.h
include/vinyl-cache/tbl/acct_fields_req.h
include/vinyl-cache/tbl/backend_poll.h
include/vinyl-cache/tbl/ban_arg_oper.h
include/vinyl-cache/tbl/ban_oper.h
include/vinyl-cache/tbl/ban_vars.h
include/vinyl-cache/tbl/bereq_flags.h
include/vinyl-cache/tbl/beresp_flags.h
include/vinyl-cache/tbl/boc_state.h
include/vinyl-cache/tbl/body_status.h
include/vinyl-cache/tbl/cli_cmds.h
include/vinyl-cache/tbl/debug_bits.h
include/vinyl-cache/tbl/experimental_bits.h
include/vinyl-cache/tbl/feature_bits.h
include/vinyl-cache/tbl/h2_error.h
include/vinyl-cache/tbl/h2_frames.h
include/vinyl-cache/tbl/h2_settings.h
include/vinyl-cache/tbl/h2_stream.h
include/vinyl-cache/tbl/htc.h
include/vinyl-cache/tbl/http_headers.h
include/vinyl-cache/tbl/http_response.h
include/vinyl-cache/tbl/locks.h
include/vinyl-cache/tbl/obj_attr.h
include/vinyl-cache/tbl/oc_exp_flags.h
include/vinyl-cache/tbl/oc_flags.h
include/vinyl-cache/tbl/params.h
include/vinyl-cache/tbl/req_bereq_flags.h
include/vinyl-cache/tbl/req_flags.h
include/vinyl-cache/tbl/sess_attr.h
include/vinyl-cache/tbl/sess_close.h
include/vinyl-cache/tbl/symbol_kind.h
include/vinyl-cache/tbl/vcc_feature_bits.h
include/vinyl-cache/tbl/vcl_context.h
include/vinyl-cache/tbl/vcl_returns.h
include/vinyl-cache/tbl/vcl_states.h
include/vinyl-cache/tbl/vhd_fsm.h
include/vinyl-cache/tbl/vhd_fsm_funcs.h
include/vinyl-cache/tbl/vhd_return.h
include/vinyl-cache/tbl/vhp_huffman.h
include/vinyl-cache/tbl/vhp_static.h
include/vinyl-cache/tbl/vrt_stv_var.h
include/vinyl-cache/tbl/vsc_levels.h
include/vinyl-cache/tbl/vsig_list.h
include/vinyl-cache/tbl/vsl_tags.h
include/vinyl-cache/tbl/vsl_tags_http.h
include/vinyl-cache/tbl/waiters.h
include/vinyl-cache/tbl/well_known_methods.h
include/vinyl-cache/vapi/vapi_options.h
include/vinyl-cache/vapi/voptget.h
include/vinyl-cache/vapi/vsc.h
include/vinyl-cache/vapi/vsig.h
include/vinyl-cache/vapi/vsl.h
include/vinyl-cache/vapi/vsl_int.h
include/vinyl-cache/vapi/vsm.h
include/vinyl-cache/vas.h
include/vinyl-cache/vav.h
include/vinyl-cache/vbh.h
include/vinyl-cache/vbm.h
include/vinyl-cache/vcl.h
include/vinyl-cache/vcli.h
include/vinyl-cache/vcs.h
include/vinyl-cache/vdef.h
include/vinyl-cache/vmod_abi.h
include/vinyl-cache/vnum.h
include/vinyl-cache/vqueue.h
include/vinyl-cache/vre.h
include/vinyl-cache/vre_pcre2.h
include/vinyl-cache/vrnd.h
include/vinyl-cache/vrt.h
include/vinyl-cache/vrt_obj.h
include/vinyl-cache/vsa.h
include/vinyl-cache/vsb.h
include/vinyl-cache/vsha256.h
include/vinyl-cache/vtcp.h
include/vinyl-cache/vte.h
include/vinyl-cache/vtim.h
include/vinyl-cache/vtree.h
include/vinyl-cache/vut.h
include/vinyl-cache/vut_options.h
include/vinyl-cache/waiter/waiter.h
lib/libvinylapi.so
lib/libvinylapi.so.3
lib/libvinylapi.so.3.1.0
lib/vinyl-cache/vmods/libvmod_blob.so
lib/vinyl-cache/vmods/libvmod_cookie.so
lib/vinyl-cache/vmods/libvmod_directors.so
lib/vinyl-cache/vmods/libvmod_h2.so
lib/vinyl-cache/vmods/libvmod_math.so
lib/vinyl-cache/vmods/libvmod_proxy.so
lib/vinyl-cache/vmods/libvmod_purge.so
lib/vinyl-cache/vmods/libvmod_std.so
lib/vinyl-cache/vmods/libvmod_unix.so
lib/vinyl-cache/vmods/libvmod_vtc.so
libdata/pkgconfig/vinylapi.pc
sbin/vinyld
share/aclocal/vinyl-legacy.m4
share/aclocal/vinyl.m4
%%PORTDOCS%%%%DOCSDIR%%-cache/builtin.vcl
%%PORTDOCS%%%%DOCSDIR%%-cache/example.vcl
share/man/man1/vinyladm.1.gz
share/man/man1/vinyld.1.gz
share/man/man1/vinylhist.1.gz
share/man/man1/vinyllog.1.gz
share/man/man1/vinylncsa.1.gz
share/man/man1/vinylstat.1.gz
share/man/man1/vinyltest.1.gz
share/man/man1/vinyltop.1.gz
share/man/man3/vmod_blob.3.gz
share/man/man3/vmod_cookie.3.gz
share/man/man3/vmod_directors.3.gz
share/man/man3/vmod_h2.3.gz
share/man/man3/vmod_math.3.gz
share/man/man3/vmod_proxy.3.gz
share/man/man3/vmod_purge.3.gz
share/man/man3/vmod_std.3.gz
share/man/man3/vmod_unix.3.gz
share/man/man3/vmod_vtc.3.gz
share/man/man7/vcl-backend.7.gz
share/man/man7/vcl-probe.7.gz
share/man/man7/vcl-step.7.gz
share/man/man7/vcl-var.7.gz
share/man/man7/vcl.7.gz
share/man/man7/vinyl-cli.7.gz
share/man/man7/vinyl-counters.7.gz
share/man/man7/vsl-query.7.gz
share/man/man7/vsl.7.gz
share/man/man7/vtc.7.gz
%%DATADIR%%-cache/vcc/vmod_blob.vcc
%%DATADIR%%-cache/vcc/vmod_cookie.vcc
%%DATADIR%%-cache/vcc/vmod_directors.vcc
%%DATADIR%%-cache/vcc/vmod_h2.vcc
%%DATADIR%%-cache/vcc/vmod_math.vcc
%%DATADIR%%-cache/vcc/vmod_proxy.vcc
%%DATADIR%%-cache/vcc/vmod_purge.vcc
%%DATADIR%%-cache/vcc/vmod_std.vcc
%%DATADIR%%-cache/vcc/vmod_unix.vcc
%%DATADIR%%-cache/vcc/vmod_vtc.vcc
%%DATADIR%%-cache/vcl/devicedetect.vcl
%%DATADIR%%-cache/vmodtool.py
%%DATADIR%%-cache/vsctool.py
@dir vinyl-cache