Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 23 Apr 2011 03:31:00 -0500
From:      Zhihao Yuan <lichray@gmail.com>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   www/156595: New port: httpsqs - a Simple Queue Service
Message-ID:  <4db28e4b.4914e70a.7251.5185@mx.google.com>
Resent-Message-ID: <201104230840.p3N8eAKp063524@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         156595
>Category:       www
>Synopsis:       New port: httpsqs - a Simple Queue Service
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-www
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sat Apr 23 08:40:10 UTC 2011
>Closed-Date:
>Last-Modified:
>Originator:     Zhihao Yuan
>Release:        FreeBSD 8.2-STABLE amd64
>Organization:
Northern Illinois University
>Environment:
System: FreeBSD compaq.yuetime 8.2-STABLE FreeBSD 8.2-STABLE #0: Mon Mar 14 02:51:28 CDT 2011 root@compaq.yuetime:/usr/obj/usr/src/sys/HOUKAGO amd64


	
>Description:
	
	    HTTPSQS is a Simple Queue Service based on HTTP GET/POST protocol. Check
		https://code.google.com/p/httpsqs/
		for details.
>How-To-Repeat:
	
>Fix:

	The software uses procfs once, only for getting the full path to it's executable file. I replaced it with a compile time substitution.

	I do wanted to write a rc script for it, since it's a server. But this program does not read a config file, and all configurations need to be supplied through command line. So, you know.
	

--- httpsqs.shar begins here ---
# 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:
#
#	httpsqs
#	httpsqs/pkg-descr
#	httpsqs/Makefile
#	httpsqs/files
#	httpsqs/files/Makefile
#	httpsqs/files/patch-httpsqs.c
#	httpsqs/distinfo
#
echo c - httpsqs
mkdir -p httpsqs > /dev/null 2>&1
echo x - httpsqs/pkg-descr
sed 's/^X//' >httpsqs/pkg-descr << '05a11d6e39e6499894daf191473a113e'
XHTTPSQS is a Simple Queue Service based on HTTP GET/POST protocol. It can
Xhandle more than 10000 requests/sec concurrent connections. Currently it's
Xwidely deployed throughout the xoyo.com under the Kingsoft Corporation.
X
XWWW:	https://code.google.com/p/httpsqs/
05a11d6e39e6499894daf191473a113e
echo x - httpsqs/Makefile
sed 's/^X//' >httpsqs/Makefile << '3ed3eff11371d23315e6188518d76b9e'
X# New ports collection makefile for:	httpsqs
X# Date created:		2011-04-22
X# Whom:			Zhihao Yuan <lichray@gmail.com>
X#
X# $FreeBSD$
X#
X
XPORTNAME=	httpsqs
XPORTVERSION=	1.6
XCATEGORIES=	www devel
XMASTER_SITES=	${MASTER_SITE_GOOGLE_CODE}
X
XMAINTAINER=	lichray@gmail.com
XCOMMENT=	Simple Queue Service based on HTTP GET/POST protocol
X
XLIB_DEPENDS+=	tokyocabinet:${PORTSDIR}/databases/tokyocabinet \
X	event-2.0:${PORTSDIR}/devel/libevent2
X
XBUILD_DEPENDS+=	pkg-config:${PORTSDIR}/devel/pkg-config
X
XLICENSE=	BSD
X
XPLIST_FILES=	bin/${PORTNAME}
X
Xpost-patch:
X	${CP} ${PATCHDIR}/Makefile ${WRKSRC}
X	@${REINPLACE_CMD} -e 's|{ 0 }|"${PREFIX}/bin/${PORTNAME}"|' \
X		${WRKSRC}/httpsqs.c
X
Xpost-install:
X	${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${PREFIX}/bin
X
X.include <bsd.port.pre.mk>
X.include <bsd.port.post.mk>
3ed3eff11371d23315e6188518d76b9e
echo c - httpsqs/files
mkdir -p httpsqs/files > /dev/null 2>&1
echo x - httpsqs/files/Makefile
sed 's/^X//' >httpsqs/files/Makefile << '7df6d7e2e71af4818db503e1666c657b'
X# Makefile for httpsqs (pmake)
X
Xtokyocabinet_CFLAGS!=	pkg-config --cflags tokyocabinet
Xlibevent_CFLAGS!=	pkg-config --cflags libevent
Xtokyocabinet_LIBS!=	pkg-config --libs tokyocabinet
Xlibevent_LIBS!=	pkg-config --libs libevent
XCFLAGS+=	${tokyocabinet_CFLAGS} ${libevent_CFLAGS}
XLIBS+=	${tokyocabinet_LIBS} ${libevent_LIBS}
X
Xall: httpsqs
X
Xhttpsqs: httpsqs.o prename.o
X	${CC} ${LDFLAGS} ${LIBS} -o ${.TARGET} ${.ALLSRC}
Xhttpsqs.o: httpsqs.c
Xprename.o: prename.c
X
Xinstall: httpsqs
7df6d7e2e71af4818db503e1666c657b
echo x - httpsqs/files/patch-httpsqs.c
sed 's/^X//' >httpsqs/files/patch-httpsqs.c << 'e7be4abaeefd693ef34648c1790e6c31'
X--- httpsqs.c.orig	2011-04-14 00:46:09.000000000 -0500
X+++ httpsqs.c	2011-04-23 03:19:34.920926265 -0500
X@@ -30,6 +30,7 @@ This is free software, and you are welco
X #include <signal.h>
X #include <stdbool.h>
X #include <pthread.h>
X+#include <sys/wait.h>
X 
X #include <err.h>
X #include <event.h>
X@@ -656,7 +657,7 @@ int main(int argc, char *argv[], char *e
X 	char httpsqs_path_file[1024] = { 0 }; // httpsqs_path_file 为 httpsqs 程序的绝对路径
X 	struct evbuffer *httpsqs_prename_buf; /* 原命令行参数 */
X     httpsqs_prename_buf = evbuffer_new();
X-	readlink("/proc/self/exe", httpsqs_path_file, sizeof(httpsqs_path_file));
X+	//readlink("/proc/self/exe", httpsqs_path_file, sizeof(httpsqs_path_file));
X 	evbuffer_add_printf(httpsqs_prename_buf, "%s", httpsqs_path_file);
X 	for (httpsqs_prename_num = 1; httpsqs_prename_num < argc; httpsqs_prename_num++) {
X 		evbuffer_add_printf(httpsqs_prename_buf, " %s", argv[httpsqs_prename_num]);
e7be4abaeefd693ef34648c1790e6c31
echo x - httpsqs/distinfo
sed 's/^X//' >httpsqs/distinfo << 'd53a2d7b24b4bb1b5fe02e95bdb29296'
XSHA256 (httpsqs-1.6.tar.gz) = 784043357e52556830e9efa20dfb1d66161cbca781dcd6c367b017fe5d3dbb68
XSIZE (httpsqs-1.6.tar.gz) = 8871
d53a2d7b24b4bb1b5fe02e95bdb29296
exit
--- httpsqs.shar ends here ---


>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4db28e4b.4914e70a.7251.5185>