From 4d977d352e8074db5f1e9a9c078c198f44a4beb8 Mon Sep 17 00:00:00 2001 From: Baptiste Daroussin Date: Mon, 29 Nov 2010 11:30:11 +0000 Subject: [PATCH] - update to 0.1.5 - Changes: fix segfault with HEAD requests fix potential security problem in comments allow to self start the fastcgi Can now be used both as a fastcgi and a cgi add rc script --- www/cblog/Makefile | 7 +++-- www/cblog/distinfo | 5 ++-- www/cblog/files/cblog.in | 59 ++++++++++++++++++++++++++++++++++++++++ www/cblog/pkg-descr | 2 +- 4 files changed, 67 insertions(+), 6 deletions(-) create mode 100644 www/cblog/files/cblog.in diff --git a/www/cblog/Makefile b/www/cblog/Makefile index bbac49de1ddf..a7c6c4272470 100644 --- a/www/cblog/Makefile +++ b/www/cblog/Makefile @@ -6,9 +6,10 @@ # PORTNAME= cblog -PORTVERSION= 0.1.2 +PORTVERSION= 0.1.5 CATEGORIES= www -MASTER_SITES= http://cloud.github.com/downloads/bapt/cblog/ +MASTER_SITES= http://git.etoilebsd.net/cblog/snapshot/ \ + LOCAL/bapt MAINTAINER= bapt@FreeBSD.org COMMENT= Simple weblog in C using markdown @@ -19,6 +20,8 @@ LIB_DEPENDS= fcgi.0:${PORTSDIR}/www/fcgi LICENSE= BSD +USE_RC_SUBR= cblog + PLIST_FILES= libexec/cblog.fcgi \ bin/cblogctl \ etc/cblog.conf.sample diff --git a/www/cblog/distinfo b/www/cblog/distinfo index 7bde0fbb08fe..0742e013bb50 100644 --- a/www/cblog/distinfo +++ b/www/cblog/distinfo @@ -1,3 +1,2 @@ -MD5 (cblog-0.1.2.tar.gz) = f42f67ad017a4aea5ef3b81054a6c550 -SHA256 (cblog-0.1.2.tar.gz) = 13d3714040d0008b1fe20d5828e300ae5f7c2571a962eaae65b4d8f77bfae1af -SIZE (cblog-0.1.2.tar.gz) = 36666 +SHA256 (cblog-0.1.5.tar.gz) = 14dba575fd89eb259ecba08497bfc2d370e1be58b974584dd9cffa1d4fa97321 +SIZE (cblog-0.1.5.tar.gz) = 37088 diff --git a/www/cblog/files/cblog.in b/www/cblog/files/cblog.in new file mode 100644 index 000000000000..97f2a15fbbdf --- /dev/null +++ b/www/cblog/files/cblog.in @@ -0,0 +1,59 @@ +#!/bin/sh + +# $FreeBSD$ +# +# cblog.fcgi startup script +# +# PROVIDE: cblog +# REQUIRE: login +# KEYWORK: shutdown + +# Add the following to /etc/rc.conf[.local] to enable this service +# +# cblog_enable=YES +# +# You can fine tune others variables too: +# cblog_fib="NONE" +# cblog_socket="unix:/var/run/cblog/cblog.sock" +# syntax can be : +# unix:/patch/to/socket +# tcp:IP:PORT (ipv6 and ipv4 supported) +# Use cblog_user to run cblog as user + +cblog_setfib() { + sysctl net.fibs >/dev/null 2>&1 || return 0 + + case "$cblog_fib" in + [Nn][Oo][Nn][Ee]) + ;; + *) + command="setfib -F ${cblog_fib} ${command}" + ;; + esac +} + +cblog_precmd() { + cblog_setfib + + test -d /var/run/cblog || mkdir -p /var/run/cblog + if [ -n "${cblog_user}" ]; then + chown -R ${cblog_user} /var/run/cblog + fi +} + +. /etc/rc.subr + +name="cblog" +rcvar=`set_rcvar` + +command="%%PREFIX%%/libexec/cblog.fcgi" +start_precmd="cblog_precmd" + +load_rc_config $name +cblog_enable=${cblog_enable:-"NO"} +cblog_fib=${cblog_fib:-"NONE"} +cblog_socket=${cblog_socker:-"unix:/var/run/cblog/cblog.sock"} + +command_args=${cblog_socket} + +run_rc_command "$1" diff --git a/www/cblog/pkg-descr b/www/cblog/pkg-descr index d66151f36ca0..0b1bd3d8e8db 100644 --- a/www/cblog/pkg-descr +++ b/www/cblog/pkg-descr @@ -1,4 +1,4 @@ simple weblog written in C using markdown to write posts and tinycdb to store them -WWW: http://github.com/bapt/cblog +WWW: http://git.etoilebsd.net/cblog/about