FreeBSD Bugzilla – Attachment 190375 Details for
Bug 225721
New port: net/nuster Web caching proxy server based on HAProxy
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
nuster port shar
nuster.shar (text/plain), 15.01 KB, created by
Felix Hanley
on 2018-02-07 02:48:32 UTC
(
hide
)
Description:
nuster port shar
Filename:
MIME Type:
Creator:
Felix Hanley
Created:
2018-02-07 02:48:32 UTC
Size:
15.01 KB
patch
obsolete
># This is a shell archive. Save it in a file, remove anything before ># this line, and then unpack it by entering "sh file". Note, it may ># create directories; files and directories will be owned by you and ># have default permissions. ># ># This archive contains: ># ># nuster ># nuster/files ># nuster/files/patch-src_ssl__sock.c ># nuster/files/patch-fix-cpuaffinity ># nuster/files/nuster.in ># nuster/pkg-plist ># nuster/distinfo ># nuster/Makefile ># nuster/pkg-descr ># >echo c - nuster >mkdir -p nuster > /dev/null 2>&1 >echo c - nuster/files >mkdir -p nuster/files > /dev/null 2>&1 >echo x - nuster/files/patch-src_ssl__sock.c >sed 's/^X//' >nuster/files/patch-src_ssl__sock.c << '6913418f95070becedbee908bb5c87a0' >X--- src/ssl_sock.c.orig 2017-07-07 09:49:34 UTC >X+++ src/ssl_sock.c >X@@ -794,8 +794,11 @@ static int ssl_sock_load_ocsp(SSL_CTX *c >X ocsp = NULL; >X >X #ifndef SSL_CTX_get_tlsext_status_cb >X+#ifndef SSL_CTRL_GET_TLSEXT_STATUS_REQ_CB >X+#define SSL_CTRL_GET_TLSEXT_STATUS_REQ_CB 128 >X+#endif >X # define SSL_CTX_get_tlsext_status_cb(ctx, cb) \ >X- *cb = (void (*) (void))ctx->tlsext_status_cb; >X+ *cb = SSL_CTX_ctrl(ctx,SSL_CTRL_GET_TLSEXT_STATUS_REQ_CB,0, (void (**)(void))cb) >X #endif >X SSL_CTX_get_tlsext_status_cb(ctx, &callback); >X >X@@ -823,7 +826,10 @@ static int ssl_sock_load_ocsp(SSL_CTX *c >X int key_type; >X EVP_PKEY *pkey; >X >X-#ifdef SSL_CTX_get_tlsext_status_arg >X+#if defined(SSL_CTX_get_tlsext_status_arg) || defined(LIBRESSL_VERSION_NUMBER) >X+#ifndef SSL_CTRL_GET_TLSEXT_STATUS_REQ_CB_ARG >X+#define SSL_CTRL_GET_TLSEXT_STATUS_REQ_CB_ARG 129 >X+#endif >X SSL_CTX_ctrl(ctx, SSL_CTRL_GET_TLSEXT_STATUS_REQ_CB_ARG, 0, &cb_arg); >X #else >X cb_arg = ctx->tlsext_status_arg; >X@@ -3539,7 +3545,7 @@ int ssl_sock_handshake(struct connection >X OSSL_HANDSHAKE_STATE state = SSL_get_state((SSL *)conn->xprt_ctx); >X empty_handshake = state == TLS_ST_BEFORE; >X #else >X- empty_handshake = !((SSL *)conn->xprt_ctx)->packet_length; >X+ empty_handshake = SSL_state((SSL *)conn->xprt_ctx) == SSL_ST_BEFORE; >X #endif >X >X if (empty_handshake) { >X@@ -3617,7 +3623,7 @@ int ssl_sock_handshake(struct connection >X state = SSL_get_state((SSL *)conn->xprt_ctx); >X empty_handshake = state == TLS_ST_BEFORE; >X #else >X- empty_handshake = !((SSL *)conn->xprt_ctx)->packet_length; >X+ empty_handshake = SSL_state((SSL *)conn->xprt_ctx) == SSL_ST_BEFORE; >X #endif >X if (empty_handshake) { >X if (!errno) { >6913418f95070becedbee908bb5c87a0 >echo x - nuster/files/patch-fix-cpuaffinity >sed 's/^X//' >nuster/files/patch-fix-cpuaffinity << '7ec900c3b16ee9cb2694dc521fe82ec6' >XX-Git-Url: http://git.haproxy.org/?p=haproxy.git;a=blobdiff_plain;f=src%2Fhaproxy.c;h=30e850c4ac4719b71adccb3b6bd41248ef5bb470;hp=7af4ab479c761a43b2fa64d2124388dbf5c21fc3;hb=97148f60b8feec39b76768d1bcfab6d755c12164;hpb=0d00593361b91017b894c4c7d5e24721a7838d6e >X >Xdiff --git a/src/haproxy.c b/src/haproxy.c >Xindex 7af4ab4..30e850c 100644 >X--- src/haproxy.c >X+++ src/haproxy.c >X@@ -2018,7 +2018,18 @@ int main(int argc, char **argv) >X proc < LONGBITS && /* only the first 32/64 processes may be pinned */ >X global.cpu_map[proc]) /* only do this if the process has a CPU map */ >X #ifdef __FreeBSD__ >X- cpuset_setaffinity(CPU_LEVEL_WHICH, CPU_WHICH_PID, -1, sizeof(unsigned long), (void *)&global.cpu_map[proc]); >X+ { >X+ cpuset_t cpuset; >X+ int i; >X+ unsigned long cpu_map = global.cpu_map[proc]; >X+ >X+ CPU_ZERO(&cpuset); >X+ while ((i = ffsl(cpu_map)) > 0) { >X+ CPU_SET(i - 1, &cpuset); >X+ cpu_map &= ~(1 << (i - 1)); >X+ } >X+ ret = cpuset_setaffinity(CPU_LEVEL_WHICH, CPU_WHICH_PID, -1, sizeof(cpuset), &cpuset); >X+ } >X #else >X sched_setaffinity(0, sizeof(unsigned long), (void *)&global.cpu_map[proc]); >X #endif >7ec900c3b16ee9cb2694dc521fe82ec6 >echo x - nuster/files/nuster.in >sed 's/^X//' >nuster/files/nuster.in << 'ae91f607f5f38409fa7add1eb7b7440a' >X#!/bin/sh >X >X# PROVIDE: nuster >X# REQUIRE: DAEMON LOGIN >X# KEYWORD: shutdown >X >X# >X# Add the following lines to /etc/rc.conf to enable nuster: >X# >X# nuster_enable (bool): default: "NO" >X# Set to "YES" to enable nuster >X# nuster_pidfile (str): default: /var/run/nuster.pid >X# Set to the full path of the pid file >X# nuster_config (str): default: %%PREFIX%%/etc/nuster.conf >X# Set to the full path of the config file >X# nuster_flags (str): default: Autogenerated using pidfile and config options >X# Set to override with your own options >X# nuster_profiles (str): default: empty >X# Set to space-separated list of profiles: for each profile separate nuster >X# process will be spawned, with nuster-${profile}.conf config file. >X# You can override default pidfile and config file for each profile with >X# nuster_${profile}_config and nuster_${profile}_pidfile. >X >X. /etc/rc.subr >X >Xname="nuster" >Xrcvar=nuster_enable >Xcommand="%%PREFIX%%/sbin/nuster" >Xextra_commands="reload configtest hardstop hardreload" >Xreload_cmd="nuster_reload" >Xhardreload_cmd="nuster_reload" >Xhardreload_precmd="def_hardreload_option" >Xstop_cmd="nuster_stop" >Xhardstop_cmd="nuster_stop" >Xhardstop_precmd="def_hardstop_signal" >X >X: ${nuster_enable:="NO"} >X: ${nuster_config:="%%PREFIX%%/etc/${name}.conf"} >Xpidfile=${nuster_pidfile:-"/var/run/nuster.pid"} >X >Xdef_hardreload_option() >X{ >X reload_opt="-st" >X} >X >Xdef_hardstop_signal() >X{ >X sig_stop="TERM" >X} >X >Xload_rc_config $name >X >Xis_valid_profile() { >X local profile >X for profile in $nuster_profiles; do >X if [ "$profile" = "$1" ]; then >X return 0 >X fi >X done >X return 1 >X} >X >Xif [ -n "$2" ]; then >X profile=$2 >X if ! is_valid_profile $profile; then >X echo "$0: no such profile ($profile) defined in ${name}_profiles." >X exit 1 >X fi >X eval nuster_config="\${nuster_${profile}_config:-%%PREFIX%%/etc/nuster-${profile}.conf}" >X eval pidfile="\${nuster_${profile}_pidfile:-/var/run/nuster-${profile}.pid}" >Xelse >X if [ "x${nuster_profiles}" != "x" -a "x$1" != "x" ]; then >X for profile in ${nuster_profiles}; do >X echo "===> ${name} profile: ${profile}" >X %%PREFIX%%/etc/rc.d/nuster $1 ${profile} >X retcode="$?" >X if [ ${retcode} -ne 0 ]; then >X failed="${profile} (${retcode}) ${failed:-}" >X else >X success="${profile} ${success:-}" >X fi >X done >X exit 0 >X fi >Xfi >X >X: ${nuster_flags:="-q -f ${nuster_config} -p ${pidfile}"} >Xconfigtest_cmd="$command -c -f $nuster_config" >Xstart_precmd="$command -q -c -f $nuster_config" >Xrequired_files=$nuster_config >Xsig_stop=SIGUSR1 >Xreload_opt="-sf" >X >Xnuster_reload() >X{ >X ${command} -q -c -f ${nuster_config} >X if [ $? -ne 0 ]; then >X err 1 "Error found in ${nuster_config} - not reloading current process!" >X fi >X rc_pid=$(check_pidfile ${pidfile} ${command}) >X if [ $rc_pid ]; then >X ${command} ${nuster_flags} $reload_opt $(cat ${pidfile}) >X else >X _run_rc_notrunning >X return 1 >X fi >X} >X >Xnuster_stop() >X{ >X rc_pid=$(check_pidfile ${pidfile} ${command}) >X if [ $rc_pid ]; then >X rc_pid=$(cat ${pidfile}) >X kill -$sig_stop $rc_pid >X wait_for_pids $rc_pid >X else >X _run_rc_notrunning >X return 1 >X fi >X} >X >Xrun_rc_command "$1" >ae91f607f5f38409fa7add1eb7b7440a >echo x - nuster/pkg-plist >sed 's/^X//' >nuster/pkg-plist << 'd9f27a535c4f6663d113ed3976e55324' >Xman/man1/nuster.1.gz >Xsbin/halog >Xsbin/nuster >X%%PORTDOCS%%%%DOCSDIR%%/51Degrees-device-detection.txt >X%%PORTDOCS%%%%DOCSDIR%%/DeviceAtlas-device-detection.txt >X%%PORTDOCS%%%%DOCSDIR%%/SPOE.txt >X%%PORTDOCS%%%%DOCSDIR%%/WURFL-device-detection.txt >X%%PORTDOCS%%%%DOCSDIR%%/acl.fig >X%%PORTDOCS%%%%DOCSDIR%%/architecture.txt >X%%PORTDOCS%%%%DOCSDIR%%/close-options.txt >X%%PORTDOCS%%%%DOCSDIR%%/coding-style.txt >X%%PORTDOCS%%%%DOCSDIR%%/configuration.txt >X%%PORTDOCS%%%%DOCSDIR%%/cookie-options.txt >X%%PORTDOCS%%%%DOCSDIR%%/design-thoughts/backends-v0.txt >X%%PORTDOCS%%%%DOCSDIR%%/design-thoughts/backends.txt >X%%PORTDOCS%%%%DOCSDIR%%/design-thoughts/be-fe-changes.txt >X%%PORTDOCS%%%%DOCSDIR%%/design-thoughts/binding-possibilities.txt >X%%PORTDOCS%%%%DOCSDIR%%/design-thoughts/buffer-redesign.txt >X%%PORTDOCS%%%%DOCSDIR%%/design-thoughts/buffers.fig >X%%PORTDOCS%%%%DOCSDIR%%/design-thoughts/config-language.txt >X%%PORTDOCS%%%%DOCSDIR%%/design-thoughts/connection-reuse.txt >X%%PORTDOCS%%%%DOCSDIR%%/design-thoughts/connection-sharing.txt >X%%PORTDOCS%%%%DOCSDIR%%/design-thoughts/dynamic-buffers.txt >X%%PORTDOCS%%%%DOCSDIR%%/design-thoughts/entities-v2.txt >X%%PORTDOCS%%%%DOCSDIR%%/design-thoughts/how-it-works.txt >X%%PORTDOCS%%%%DOCSDIR%%/design-thoughts/http2.txt >X%%PORTDOCS%%%%DOCSDIR%%/design-thoughts/http_load_time.url >X%%PORTDOCS%%%%DOCSDIR%%/design-thoughts/rate-shaping.txt >X%%PORTDOCS%%%%DOCSDIR%%/design-thoughts/sess_par_sec.txt >X%%PORTDOCS%%%%DOCSDIR%%/gpl.txt >X%%PORTDOCS%%%%DOCSDIR%%/haproxy.1 >X%%PORTDOCS%%%%DOCSDIR%%/internals/acl.txt >X%%PORTDOCS%%%%DOCSDIR%%/internals/body-parsing.txt >X%%PORTDOCS%%%%DOCSDIR%%/internals/buffer-operations.txt >X%%PORTDOCS%%%%DOCSDIR%%/internals/buffer-ops.fig >X%%PORTDOCS%%%%DOCSDIR%%/internals/connect-status.txt >X%%PORTDOCS%%%%DOCSDIR%%/internals/connection-header.txt >X%%PORTDOCS%%%%DOCSDIR%%/internals/connection-scale.txt >X%%PORTDOCS%%%%DOCSDIR%%/internals/entities-v2.txt >X%%PORTDOCS%%%%DOCSDIR%%/internals/entities.fig >X%%PORTDOCS%%%%DOCSDIR%%/internals/entities.pdf >X%%PORTDOCS%%%%DOCSDIR%%/internals/entities.svg >X%%PORTDOCS%%%%DOCSDIR%%/internals/entities.txt >X%%PORTDOCS%%%%DOCSDIR%%/internals/filters.txt >X%%PORTDOCS%%%%DOCSDIR%%/internals/hashing.txt >X%%PORTDOCS%%%%DOCSDIR%%/internals/header-parser-speed.txt >X%%PORTDOCS%%%%DOCSDIR%%/internals/header-tree.txt >X%%PORTDOCS%%%%DOCSDIR%%/internals/http-cookies.txt >X%%PORTDOCS%%%%DOCSDIR%%/internals/http-docs.txt >X%%PORTDOCS%%%%DOCSDIR%%/internals/http-parsing.txt >X%%PORTDOCS%%%%DOCSDIR%%/internals/list.fig >X%%PORTDOCS%%%%DOCSDIR%%/internals/lua_socket.fig >X%%PORTDOCS%%%%DOCSDIR%%/internals/lua_socket.pdf >X%%PORTDOCS%%%%DOCSDIR%%/internals/naming.txt >X%%PORTDOCS%%%%DOCSDIR%%/internals/pattern.dia >X%%PORTDOCS%%%%DOCSDIR%%/internals/pattern.pdf >X%%PORTDOCS%%%%DOCSDIR%%/internals/polling-states.fig >X%%PORTDOCS%%%%DOCSDIR%%/internals/repartition-be-fe-fi.txt >X%%PORTDOCS%%%%DOCSDIR%%/internals/sequence.fig >X%%PORTDOCS%%%%DOCSDIR%%/internals/stats-v2.txt >X%%PORTDOCS%%%%DOCSDIR%%/internals/stream-sock-states.fig >X%%PORTDOCS%%%%DOCSDIR%%/intro.txt >X%%PORTDOCS%%%%DOCSDIR%%/lgpl.txt >X%%PORTDOCS%%%%DOCSDIR%%/linux-syn-cookies.txt >X%%PORTDOCS%%%%DOCSDIR%%/lua-api/Makefile >X%%PORTDOCS%%%%DOCSDIR%%/lua-api/_static/channel.fig >X%%PORTDOCS%%%%DOCSDIR%%/lua-api/_static/channel.png >X%%PORTDOCS%%%%DOCSDIR%%/lua-api/conf.py >X%%PORTDOCS%%%%DOCSDIR%%/lua-api/index.rst >X%%PORTDOCS%%%%DOCSDIR%%/lua.txt >X%%PORTDOCS%%%%DOCSDIR%%/management.txt >X%%PORTDOCS%%%%DOCSDIR%%/netscaler-client-ip-insertion-protocol.txt >X%%PORTDOCS%%%%DOCSDIR%%/network-namespaces.txt >X%%PORTDOCS%%%%DOCSDIR%%/proxy-protocol.txt >X%%PORTDOCS%%%%DOCSDIR%%/queuing.fig >X%%PORTEXAMPLES%%%%EXAMPLESDIR%%/acl-content-sw.cfg >X%%PORTEXAMPLES%%%%EXAMPLESDIR%%/auth.cfg >X%%PORTEXAMPLES%%%%EXAMPLESDIR%%/check >X%%PORTEXAMPLES%%%%EXAMPLESDIR%%/check.conf >X%%PORTEXAMPLES%%%%EXAMPLESDIR%%/content-sw-sample.cfg >X%%PORTEXAMPLES%%%%EXAMPLESDIR%%/debug2ansi >X%%PORTEXAMPLES%%%%EXAMPLESDIR%%/debug2html >X%%PORTEXAMPLES%%%%EXAMPLESDIR%%/debugfind >X%%PORTEXAMPLES%%%%EXAMPLESDIR%%/errorfiles/400.http >X%%PORTEXAMPLES%%%%EXAMPLESDIR%%/errorfiles/403.http >X%%PORTEXAMPLES%%%%EXAMPLESDIR%%/errorfiles/408.http >X%%PORTEXAMPLES%%%%EXAMPLESDIR%%/errorfiles/500.http >X%%PORTEXAMPLES%%%%EXAMPLESDIR%%/errorfiles/502.http >X%%PORTEXAMPLES%%%%EXAMPLESDIR%%/errorfiles/503.http >X%%PORTEXAMPLES%%%%EXAMPLESDIR%%/errorfiles/504.http >X%%PORTEXAMPLES%%%%EXAMPLESDIR%%/errorfiles/README >X%%PORTEXAMPLES%%%%EXAMPLESDIR%%/haproxy.init >X%%PORTEXAMPLES%%%%EXAMPLESDIR%%/haproxy.spec >X%%PORTEXAMPLES%%%%EXAMPLESDIR%%/haproxy.vim >X%%PORTEXAMPLES%%%%EXAMPLESDIR%%/init.haproxy >X%%PORTEXAMPLES%%%%EXAMPLESDIR%%/option-http_proxy.cfg >X%%PORTEXAMPLES%%%%EXAMPLESDIR%%/seamless_reload.txt >X%%PORTEXAMPLES%%%%EXAMPLESDIR%%/ssl.cfg >X%%PORTEXAMPLES%%%%EXAMPLESDIR%%/stats_haproxy.sh >X%%PORTEXAMPLES%%%%EXAMPLESDIR%%/transparent_proxy.cfg >X%%PORTEXAMPLES%%%%EXAMPLESDIR%%/wurfl-example.cfg >d9f27a535c4f6663d113ed3976e55324 >echo x - nuster/distinfo >sed 's/^X//' >nuster/distinfo << '46b260d22724d1921e5042ce2d3382c7' >XTIMESTAMP = 1514921615 >XSHA256 (jiangwenyuan-nuster-v1.7.9.4_GH0.tar.gz) = 5dbd09734607c8e17fb9949064e5d2e866b8d3b75accc51b25c65b5a7d73e181 >XSIZE (jiangwenyuan-nuster-v1.7.9.4_GH0.tar.gz) = 1785266 >46b260d22724d1921e5042ce2d3382c7 >echo x - nuster/Makefile >sed 's/^X//' >nuster/Makefile << '0268c79245723542fd0634465b6c6906' >X# Created by: Felix Hanley >X# $FreeBSD$ >X >XPORTNAME= nuster >XPORTVERSION= 1.7.9.4 >XDISTVERSIONPREFIX= v >XCATEGORIES= net www >X >XMAINTAINER= felix@userspace.com.au >XCOMMENT= Web caching proxy server based on haproxy >X >XLICENSE= GPLv2 LGPL21 >XLICENSE_COMB= multi >X >XUSES= cpe gmake >XUSE_RC_SUBR= nuster >XUSE_GITHUB= yes >XGH_ACCOUNT= jiangwenyuan >X >XMAKE_ARGS= TARGET=freebsd DEFINE=-DFREEBSD_PORTS USE_GETADDRINFO=1 \ >X USE_ZLIB=1 USE_CPU_AFFINITY=1 USE_ACCEPT4=1 \ >X CC="${CC}" DEBUG_CFLAGS="" CPU_CFLAGS="${CFLAGS}" >X >XOPTIONS_DEFINE= DOCS EXAMPLES LUA OPENSSL DEVICEATLAS >XOPTIONS_RADIO= PCRE >XOPTIONS_RADIO_PCRE= DPCRE SPCRE >XDPCRE_DESC= Link dynamically >XSPCRE_DESC= Link statically >XDEVICEATLAS_DESC= DeviceAtlas Device Detection support >XOPTIONS_DEFAULT= SPCRE OPENSSL >X >XDPCRE_LIB_DEPENDS= libpcre.so:devel/pcre >XDPCRE_MAKE_ARGS= USE_PCRE=1 USE_PCRE_JIT=1 >XSPCRE_LIB_DEPENDS= libpcre.so:devel/pcre >XSPCRE_MAKE_ARGS= USE_PCRE=1 USE_STATIC_PCRE=1 USE_PCRE_JIT=1 >XDEVICEATLAS_LIB_DEPENDS= libda.so:net/deviceatlas-enterprise-c >XDEVICEATLAS_MAKE_ARGS= USE_DEVICEATLAS=1 DEVICEATLAS_LIB=${LOCALBASE}/lib DEVICEATLAS_INC=${LOCALBASE}/include >XOPENSSL_USES= ssl >XOPENSSL_MAKE_ARGS= USE_OPENSSL=1 SSL_LIB=${OPENSSLLIB} SSL_INC=${OPENSSLINC} >XLUA_USES= lua:53 >XLUA_MAKE_ARGS= USE_LUA=1 LUA_INC=${LUA_INCDIR} LUA_LIB=${LUA_LIBDIR} LUA_LIB_NAME=lua-${LUA_VER} >X >X.include <bsd.port.pre.mk> >X >X.if ${ARCH} == "amd64" || ${ARCH} == "i386" >XMAKE_ARGS+= USE_REGPARM=1 >X.endif >X >X.if ${PORT_OPTIONS:MOPENSSL} && ${SSL_DEFAULT:Mopenssl-devel} >XBROKEN= Does not build with openssl-devel >X.endif >X >Xpost-build: >X cd ${WRKSRC}/contrib/halog && ${MAKE_CMD} ${MAKE_ENV} >X >Xdo-install: >X ${INSTALL_PROGRAM} ${WRKSRC}/haproxy ${STAGEDIR}${PREFIX}/sbin/nuster >X ${INSTALL_PROGRAM} ${WRKSRC}/contrib/halog/halog ${STAGEDIR}${PREFIX}/sbin/ >X ${INSTALL_MAN} ${WRKSRC}/doc/haproxy.1 ${STAGEDIR}${MAN1PREFIX}/man/man1/nuster.1 >X ${MKDIR} ${STAGEDIR}${DOCSDIR} >X (cd ${WRKSRC}/doc/ && ${COPYTREE_SHARE} \* ${STAGEDIR}${DOCSDIR}) >X ${MKDIR} ${STAGEDIR}${EXAMPLESDIR} >X (cd ${WRKSRC}/examples/ && ${COPYTREE_SHARE} \* ${STAGEDIR}${EXAMPLESDIR}) >X >X.include <bsd.port.post.mk> >0268c79245723542fd0634465b6c6906 >echo x - nuster/pkg-descr >sed 's/^X//' >nuster/pkg-descr << 'b12df86920a20ce586633529338bae31' >XNuster is a simple yet powerful web caching proxy server based on HAProxy. It >Xis 100% compatible with HAProxy, and takes full advantage of the ACL >Xfunctionality of HAProxy to provide fine-grained caching policy based on the >Xcontent of request, response or server status. >X >XWWW: https://github.com/jiangwenyuan/nuster >b12df86920a20ce586633529338bae31 >exit >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 225721
: 190375