ports/82519: Update port: www/zerowait-httpd to 0.7m

Vsevolod Stakhov vsevolod at highsecure.ru
Wed Jun 22 10:50:20 UTC 2005


>Number:         82519
>Category:       ports
>Synopsis:       Update port: www/zerowait-httpd to 0.7m
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          maintainer-update
>Submitter-Id:   current-users
>Arrival-Date:   Wed Jun 22 10:50:19 GMT 2005
>Closed-Date:
>Last-Modified:
>Originator:     Vsevolod Stakhov
>Release:        FreeBSD 5.3-STABLE i386
>Organization:
>Environment:
>Description:
Update to version 0.7m that contains a number of improvements and bugfixes.
>How-To-Repeat:
>Fix:

diff -ruPN zerowait-httpd.orig/Makefile zerowait-httpd/Makefile
--- zerowait-httpd.orig/Makefile	Wed Jun 22 14:42:31 2005
+++ zerowait-httpd/Makefile	Wed Jun 22 14:43:04 2005
@@ -6,7 +6,7 @@
 #
 
 PORTNAME=	zerowait-httpd
-PORTVERSION=	0.7l
+PORTVERSION=	0.7m
 CATEGORIES=	www
 MASTER_SITES=	http://www.0w.ru/httpd/
 DISTNAME=	0W-httpd-${DISTVERSIONPREFIX}${DISTVERSION}${DISTVERSIONSUFFIX}
@@ -15,16 +15,19 @@
 COMMENT=	Lightweight and fast http server
 
 USE_GMAKE=	yes
-USE_REINPLACE=	yes
+USE_OPENSSL=	yes
+USE_RC_SUBR=	yes
 
-WRKSRC=		${WRKDIR}/${DISTNAME}/src
 MAKE_ARGS=	CFLAGS="${CFLAGS}" CPPFLAGS=-I..
+WWW_USER?=	${WWWOWN}
+WWW_GROUP?=	${WWWGRP}
 
-post-patch:
-	@${REINPLACE_CMD} -e "s,/var/0W,${PREFIX}," ${WRKSRC}/Makefile
-	@${REINPLACE_CMD} -e "s,/var/0W,${PREFIX}," ${WRKSRC}/common/settings.h
+pre-build:
+	@${SED} -e 's,%%PREFIX%%,${PREFIX},g' -e 's,%%RC_SUBR%%,${RC_SUBR},' \
+			${FILESDIR}/0W-httpd.sh > ${WORKSDIR}/0W-httpd.sh
+	@${SH} -c 'cd ${WRKSRC} && ./configure --prefix=${PREFIX} --owner=${WWW_USER} --group=${WWW_GROUP}'
 
 post-install:
-	@${INSTALL_SCRIPT} -m 755 ${FILESDIR}/0W-httpd.sh ${PREFIX}/etc/rc.d/0W-httpd.sh
+	@${INSTALL_SCRIPT} -m 755 ${WORKDIR}/0W-httpd.sh ${PREFIX}/etc/rc.d/0W-httpd.sh
 
 .include <bsd.port.mk>
diff -ruPN zerowait-httpd.orig/distinfo zerowait-httpd/distinfo
--- zerowait-httpd.orig/distinfo	Wed Jun 22 14:42:31 2005
+++ zerowait-httpd/distinfo	Wed Jun 22 14:43:04 2005
@@ -1,2 +1,2 @@
-Size (0W-httpd-0.7l.tar.gz) = 86107
-MD5 (0W-httpd-0.7l.tar.gz) = f3c94bf665c71ae286cb99f50921af92 
+MD5 (0W-httpd-0.7m.tar.gz) = b599bf9c6e7c784eda29f420aab45e31
+SIZE (0W-httpd-0.7m.tar.gz) = 83930
diff -ruPN zerowait-httpd.orig/files/0W-httpd.sh zerowait-httpd/files/0W-httpd.sh
--- zerowait-httpd.orig/files/0W-httpd.sh	Wed Jun 22 14:42:31 2005
+++ zerowait-httpd/files/0W-httpd.sh	Wed Jun 22 14:43:04 2005
@@ -1,27 +1,28 @@
 #!/bin/sh
 # $FreeBSD: ports/www/zerowait-httpd/files/0W-httpd.sh,v 1.1 2005/03/20 15:34:32 sem Exp $
 
-# PROVIDE: 0W-httpd
+# PROVIDE: zerowait
 # REQUIRE: DAEMON
 # BEFORE: LOGIN
 # KEYWORD: shutdown
 
-# Define these 0Whttpd_* variables in one of these files:
+# Define these zerowait_enable variables in one of these files:
 #       /etc/rc.conf
 #       /etc/rc.conf.local
 #
 # DO NOT CHANGE THESE DEFAULT VALUES HERE
 #
-0Whttpd_enable=${0Whttpd_enable-"NO"}
-
 . %%RC_SUBR%%
 
-name="0Whttpd"
+name="zerowait"
 rcvar=`set_rcvar`
 command="%%PREFIX%%/sbin/0W-httpd"
 args="-c %%PREFIX%%/etc/0W-httpd/httpd.conf"
+required_files="%%PREFIX%%/etc/0W-httpd/httpd.conf"
+pidfile="%%PREFIX%%/0W-httpd/pids/httpd"
 
 load_rc_config $name
+: ${zerowait_enable="NO"}
 
 start_cmd="echo \"Starting ${name}.\"; /usr/bin/limits -U www ${command}"
 
diff -ruPN zerowait-httpd.orig/files/patch-Makefile zerowait-httpd/files/patch-Makefile
--- zerowait-httpd.orig/files/patch-Makefile	Wed Jun 22 14:42:31 2005
+++ zerowait-httpd/files/patch-Makefile	Wed Jun 22 14:43:04 2005
@@ -1,30 +1,31 @@
---- Makefile.orig	Wed Oct  6 21:21:53 2004
-+++ Makefile	Sun Mar 20 17:31:49 2005
-@@ -2,6 +2,6 @@
+--- Makefile.orig	Sun Apr 17 05:07:11 2005
++++ Makefile	Wed Jun 22 14:16:31 2005
+@@ -10,13 +10,15 @@
+ 	rm -f *~ src/*~
  
--ROOT=/var/0W
--PRIV=nobody:nobody
-+ROOT=/var/0W
-+PRIV=www:www
- 
- SUBDIRS=common httpd
- 
-@@ -14,7 +14,14 @@
- 
- install:
- 	set -e; for i in $(SUBDIRS); do $(MAKE) -C $$i install; done
--	test -d $(ROOT) || (mkdir $(ROOT) && cp -R ../bin ../conf ../data ../logs $(ROOT))
--	test ../bin/0W-httpd -ef $(ROOT)/bin/0W-httpd || cp ../bin/0W-httpd $(ROOT)/bin/0W-httpd
--	chown -R $(PRIV) $(ROOT)/bin/0W-httpd $(ROOT)/logs $(ROOT)/data
--	chmod +s $(ROOT)/bin/0W-httpd
+ install: compile
+-	install -d $(ROOT)/bin $(ROOT)/conf $(ROOT)/docs
+-	install -d -o $(OWNER) -g $(GROUP) $(ROOT)/logs $(ROOT)/data/pids $(ROOT)/data/httpd
+-	test -f $(ROOT)/conf/httpd.conf || install -m 644 conf/httpd.conf $(ROOT)/conf
+-	install -b -m 644 conf/countries* $(ROOT)/conf
+-	install -b -m 644 docs/* $(ROOT)/docs
+-	install -b bin/update-countries.sh src/httpd/convert-ranges src/httpd/convert-geoip $(ROOT)/bin
+-	install -b -m 6755 -o $(OWNER) -g $(GROUP) src/httpd/0W-httpd $(ROOT)/bin
 +	test -d $(ROOT)/0W-httpd || (mkdir $(ROOT)/0W-httpd)
-+	cp -R ../data ../logs $(ROOT)/0W-httpd
-+	test ../bin/0W-httpd -ef $(ROOT)/sbin/0W-httpd || cp ../bin/0W-httpd $(ROOT)/sbin/0W-httpd
-+	test -d $(ROOT)/etc/0W-httpd || (mkdir $(ROOT)/etc/0W-httpd && cd ../conf/ && \
-+									cp countries $(ROOT)/etc/0W-httpd/countries.sample &&	\
-+									cp crontab $(ROOT)/etc/0W-httpd/crontab.sample 	&&	\
-+									cp httpd.conf $(ROOT)/etc/0W-httpd/httpd.conf.sample &&	\
-+									cp httpd.txt $(ROOT)/etc/0W-httpd/httpd.txt.sample &&	\
-+									cp ip2country $(ROOT)/etc/0W-httpd/ip2country.sample )
-+	chown -R $(PRIV) $(ROOT)/sbin/0W-httpd $(ROOT)/0W-httpd/logs $(ROOT)/0W-httpd/data
-+	chmod +s $(ROOT)/sbin/0W-httpd
++	install -d $(ROOT)/0W-httpd/data $(ROOT)/0W-httpd/logs $(ROOT)/0W-httpd/pids
++	install -m 0755 bin/update-countries.sh src/httpd/convert-ranges src/httpd/convert-geoip $(ROOT)/bin
++	install -m 6755 -o $(OWNER) -g $(GROUP) src/httpd/0W-httpd $(ROOT)/sbin
++	test -d $(ROOT)/etc/0W-httpd || (mkdir $(ROOT)/etc/0W-httpd && cd conf/ && \
++			cp countries* $(ROOT)/etc/0W-httpd/ && \
++			cp httpd.conf $(ROOT)/etc/0W-httpd/httpd.conf.sample )
++	chown -R $(OWNER):$(GROUP) $(ROOT)/sbin/0W-httpd $(ROOT)/0W-httpd/logs $(ROOT)/0W-httpd/data $(ROOT)/0W-httpd/pids
++
+ 	@echo
+ 	@echo "Installed, run as root: $(ROOT)/bin/0W-httpd [-h]"
+ 
+@@ -33,3 +35,5 @@
+ 	@read answer
+ 	killall 0W-httpd || true
+ 	rm -rf $(ROOT)
++
++all: compile
diff -ruPN zerowait-httpd.orig/files/patch-settings.h zerowait-httpd/files/patch-settings.h
--- zerowait-httpd.orig/files/patch-settings.h	Wed Jun 22 14:42:31 2005
+++ zerowait-httpd/files/patch-settings.h	Thu Jan  1 03:00:00 1970
@@ -1,28 +0,0 @@
---- common/settings.h.orig	Thu Mar 17 20:22:31 2005
-+++ common/settings.h	Thu Mar 17 20:25:53 2005
-@@ -39,16 +39,16 @@
- #define BLOCK_SIZE	 4096
- #define BUFFER_SIZE	 4088
- 
--#define ROOT "/var/0W"
--#define CONF ROOT "/conf"
--#define DATA ROOT "/data"
--#define CMD	 ROOT "/cmd"
--#define LOGS ROOT "/logs"
-+#define ROOT "/var/0W/0W-httpd/"
-+#define CONF ROOT "/var/0W/etc/0W-httpd/"
-+#define DATA ROOT "/var/0W/0W-httpd/data"
-+#define CMD	 ROOT "/var/0W/0W-httpd/cmd"
-+#define LOGS ROOT "/var/0W/0W-httpd/logs/"
- #define TMP	 ROOT "/tmp"
--#define PIDS DATA "/pids"
--#define TMPL DATA "/templates"
--#define WWW	 ROOT "/www"
--#define HTML WWW  "/data"
-+#define PIDS DATA "/var/0W/0W-httpd/pids"
-+#define TMPL DATA "/var/0W/0W-httpd/templates"
-+#define WWW	 ROOT "/var/0W/0W-httpd/www"
-+#define HTML WWW  "/var/0W/0W-httpd/data"
- 
- #define ADMIN_EMAIL "counter at rax.ru"
- #define SITE_URL "http://www.rax.ru"
diff -ruPN zerowait-httpd.orig/files/patch-src_common_settings.h zerowait-httpd/files/patch-src_common_settings.h
--- zerowait-httpd.orig/files/patch-src_common_settings.h	Thu Jan  1 03:00:00 1970
+++ zerowait-httpd/files/patch-src_common_settings.h	Wed Jun 22 14:43:04 2005
@@ -0,0 +1,29 @@
+--- src/common/settings.h.orig	Sat Apr 16 06:48:58 2005
++++ src/common/settings.h	Wed Jun 22 13:35:16 2005
+@@ -37,18 +37,18 @@
+ #ifndef ROOT
+ #define ROOT "/var/0W"
+ #endif
+-#define CONF ROOT "/conf"
+-#define DATA ROOT "/data"
+-#define CMD  ROOT "/cmd"
+-#define LOGS ROOT "/logs"
+-#define TMP  ROOT "/tmp"
++
++#define CONF ROOT "/etc/0W-httpd/"
++#define DATA ROOT "/0W-httpd"
++#define CMD     ROOT "/0W-httpd/cmd"
++#define LOGS ROOT "/0W-httpd/logs"
++#define TMP     ROOT "/0W-httpd/tmp"
+ #define PIDS DATA "/pids"
+ #define TMPL DATA "/templates"
+-#define WWW  ROOT "/www"
+-#define HTML WWW  "/data"
++#define WWW     ROOT "/0W-httpd"
++#define HTML ROOT  "/0W-httpd/data"
+ 
+ #define RN "\r\n"
+-
+ 
+ #if __GLIBC__ == 2 && __GLIBC_MINOR__ >= 1
+ #define HAVE_BACKTRACE
diff -ruPN zerowait-httpd.orig/files/patch-src_httpd_Makefile zerowait-httpd/files/patch-src_httpd_Makefile
--- zerowait-httpd.orig/files/patch-src_httpd_Makefile	Thu Jan  1 03:00:00 1970
+++ zerowait-httpd/files/patch-src_httpd_Makefile	Wed Jun 22 14:43:04 2005
@@ -0,0 +1,15 @@
+--- src/httpd/Makefile.orig	Wed Jun 22 13:16:28 2005
++++ src/httpd/Makefile	Wed Jun 22 13:16:44 2005
+@@ -14,10 +14,10 @@
+ 	$(CC) $(LDFLAGS) $(OBJS) $(COMMON) built.o -o $@
+ 
+ convert-ranges: $(COMMON) Makefile ../Rules.make convert-ranges.c
+-	$(CC) $(CFLAGS) $(LDFLAGS) $@.c $(COMMON) -o $@
++	$(CC) $(CFLAGS) -I.. $(LDFLAGS) $@.c $(COMMON) -o $@
+ 
+ convert-geoip: $(COMMON) Makefile ../Rules.make convert-geoip.c
+-	$(CC) $(CFLAGS) $(LDFLAGS) $@.c $(COMMON) -o $@
++	$(CC) $(CFLAGS) -I.. $(LDFLAGS) $@.c $(COMMON) -o $@
+ 
+ $(COMMON):
+ 	cd ../common &&$(MAKE)
diff -ruPN zerowait-httpd.orig/pkg-plist zerowait-httpd/pkg-plist
--- zerowait-httpd.orig/pkg-plist	Wed Jun 22 14:42:31 2005
+++ zerowait-httpd/pkg-plist	Wed Jun 22 14:43:04 2005
@@ -1,13 +1,16 @@
+ at comment $FreeBSD$
+ at unexec %D/etc/rc.d/0W-httpd.sh stop
+bin/update-countries.sh
+bin/convert-ranges
+bin/convert-geoip
 sbin/0W-httpd
-etc/0W-httpd/countries.sample
-etc/0W-httpd/crontab.sample
+etc/0W-httpd/countries
+etc/0W-httpd/countries.ips
+etc/0W-httpd/countries.rus
 etc/0W-httpd/httpd.conf.sample
-etc/0W-httpd/httpd.txt.sample
-etc/0W-httpd/ip2country.sample
 etc/rc.d/0W-httpd.sh
 @dirrm etc/0W-httpd/
- at dirrm 0W-httpd/data/pids
- at dirrm 0W-httpd/data/httpd
+ at dirrm 0W-httpd/pids
 @dirrm 0W-httpd/data
- at unexec rm -fr %D/0W-httpd/logs/
+ at unexec rm -fr %D/0W-httpd/logs/ > /dev/null 2>&1 || true
 @dirrm 0W-httpd/

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



More information about the freebsd-ports-bugs mailing list