- update to hiawatha-8.6

This commit is contained in:
jasper 2012-12-12 09:39:52 +00:00
parent 3ad038650a
commit d5ca356379
14 changed files with 91 additions and 150 deletions

View File

@ -1,9 +1,7 @@
# $OpenBSD: Makefile,v 1.32 2012/04/28 10:52:09 ajacoutot Exp $
# $OpenBSD: Makefile,v 1.33 2012/12/12 09:39:52 jasper Exp $
COMMENT= secure webserver
DISTNAME= hiawatha-7.5
REVISION= 0
DISTNAME= hiawatha-8.6
CATEGORIES= www net
HOMEPAGE= http://www.hiawatha-webserver.org/
@ -16,34 +14,30 @@ PERMIT_DISTFILES_FTP= Yes
MASTER_SITES= ${HOMEPAGE}files/
WANTLIB += c crypto pthread ssl xml2 z xslt
MODULES= devel/cmake
WANTLIB += c pthread xml2 z xslt
LIB_DEPENDS= textproc/libxslt
WEBROOTDIR= /var/hiawatha
CONFIGURE_ARGS= -DWEBROOT_DIR="/var/hiawatha" \
-DWORK_DIR="/var/db/hiawatha/" \
-DCONFIG_DIR="${SYSCONFDIR}/hiawatha/" \
-DLOG_DIR="/var/log/hiawatha/" \
-DCMAKE_INSTALL_MANDIR="${PREFIX}/man/" \
-DENABLE_XSLT=ON
CONFIGURE_STYLE=gnu
CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include \
-I${LOCALBASE}/include/libxml2" \
LDFLAGS="-L${LOCALBASE}/lib" \
webrootdir=${WEBROOTDIR}
CONFIGURE_ARGS= --enable-xslt
USE_GROFF = Yes
NO_REGRESS= Yes
pre-configure:
${SUBST_CMD} ${WRKSRC}/etc/hiawatha/hiawatha.conf.in \
${WRKSRC}/etc/hiawatha/cgi-wrapper.conf \
${WRKSRC}/etc/hiawatha/php-fcgi.conf \
${WRKSRC}/doc/hiawatha.1.in
${SUBST_CMD} ${WRKSRC}/config/hiawatha.conf.in \
${WRKSRC}/config/cgi-wrapper.conf \
${WRKSRC}/config/php-fcgi.conf.in \
${WRKSRC}/man/hiawatha.1.in
post-install:
${INSTALL_DATA_DIR} ${PREFIX}/share/examples/hiawatha/
${INSTALL_DATA} ${WRKSRC}/etc/hiawatha/*.conf \
${PREFIX}/share/examples/hiawatha
${INSTALL_DATA} ${WRKSRC}/etc/hiawatha/index.xslt \
${PREFIX}/share/examples/hiawatha
${INSTALL_DATA} ${WRKSRC}/doc/index.html \
${PREFIX}/share/examples/hiawatha
mv ${DESTDIR}/etc/hiawatha/ ${PREFIX}/share/examples/hiawatha/
mv ${DESTDIR}/var/hiawatha/index.html ${PREFIX}/share/examples/hiawatha/
rm -r ${PREFIX}/var/
.include <bsd.port.mk>

View File

@ -1,5 +1,2 @@
MD5 (hiawatha-7.5.tar.gz) = p+OFNJIvwJj9hPf1RbE+uA==
RMD160 (hiawatha-7.5.tar.gz) = hM9zYcvOZUz2kr4GIUILtpA6B4g=
SHA1 (hiawatha-7.5.tar.gz) = Tr9g9LFCOmAAcGZ9a4fUNL7dnzU=
SHA256 (hiawatha-7.5.tar.gz) = fxVzivMyaX589IMogWNNRtZQqpreTWWc+JNMuymey1w=
SIZE (hiawatha-7.5.tar.gz) = 276486
SHA256 (hiawatha-8.6.tar.gz) = Gn+pjOZr61T8hJDMeHRh1xmpjLDkqByu36GKyLW6Ozs=
SIZE (hiawatha-8.6.tar.gz) = 656420

View File

@ -1,24 +0,0 @@
$OpenBSD: patch-Makefile_in,v 1.14 2011/04/13 17:44:59 rpointel Exp $
--- Makefile.in.orig Tue Jul 13 09:03:47 2010
+++ Makefile.in Wed Apr 13 16:55:04 2011
@@ -50,8 +50,7 @@ DIST_COMMON = $(am__configure_deps) $(srcdir)/Makefile
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/acx_pthread.m4 \
$(top_srcdir)/m4/socket.m4 $(top_srcdir)/configure.ac
-am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
- $(ACLOCAL_M4)
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES)
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
configure.lineno config.status.lineno
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
@@ -1240,9 +1239,8 @@ info: info-am
info-am:
-install-data-am: install-logDATA install-man install-webrootDATA
+install-data-am: install-man
@$(NORMAL_INSTALL)
- $(MAKE) $(AM_MAKEFLAGS) install-data-hook
install-dvi: install-dvi-am

View File

@ -1,10 +1,11 @@
$OpenBSD: patch-etc_hiawatha_cgi-wrapper_conf,v 1.7 2009/09/22 09:29:25 ajacoutot Exp $
--- etc/hiawatha/cgi-wrapper.conf.orig Tue Sep 22 11:05:08 2009
+++ etc/hiawatha/cgi-wrapper.conf Tue Sep 22 11:05:44 2009
@@ -5,9 +5,9 @@
$OpenBSD: patch-config_cgi-wrapper_conf,v 1.1 2012/12/12 09:39:53 jasper Exp $
--- config/cgi-wrapper.conf.orig Wed Dec 12 09:13:45 2012
+++ config/cgi-wrapper.conf Wed Dec 12 09:13:56 2012
@@ -4,10 +4,9 @@
# CGIhandler = /path/to/cgi-handler
#
#CGIhandler = /usr/bin/perl
-#CGIhandler = /usr/bin/perl
-#CGIhandler = /usr/bin/php-cgi
-#CGIhandler = /usr/bin/python
-#CGIhandler = /usr/bin/ruby

View File

@ -1,6 +1,6 @@
$OpenBSD: patch-etc_hiawatha_hiawatha_conf_in,v 1.1 2009/09/22 09:29:25 ajacoutot Exp $
--- etc/hiawatha/hiawatha.conf.in.orig Tue Sep 22 11:06:11 2009
+++ etc/hiawatha/hiawatha.conf.in Tue Sep 22 11:08:10 2009
$OpenBSD: patch-config_hiawatha_conf_in,v 1.1 2012/12/12 09:39:53 jasper Exp $
--- config/hiawatha.conf.in.orig Wed Dec 12 09:12:05 2012
+++ config/hiawatha.conf.in Wed Dec 12 09:13:06 2012
@@ -4,7 +4,7 @@
# GENERAL SETTINGS
@ -9,11 +9,12 @@ $OpenBSD: patch-etc_hiawatha_hiawatha_conf_in,v 1.1 2009/09/22 09:29:25 ajacouto
+ServerId = _hiawatha:_hiawatha
ConnectionsTotal = 150
ConnectionsPerIP = 10
SystemLogfile = @logdir@/system.log
@@ -45,11 +45,13 @@ Binding {
SystemLogfile = @LOG_DIR@/system.log
@@ -44,12 +44,13 @@ Binding {
# These settings can be used to run CGI applications. Use the 'php-fcgi'
# tool to start PHP as a FastCGI daemon.
#
#CGIhandler = /usr/bin/perl:pl
-#CGIhandler = /usr/bin/perl:pl
-#CGIhandler = /usr/bin/php-cgi:php
-#CGIhandler = /usr/bin/python:py
-#CGIhandler = /usr/bin/ruby:rb

View File

@ -0,0 +1,16 @@
$OpenBSD: patch-config_php-fcgi_conf_in,v 1.1 2012/12/12 09:39:53 jasper Exp $
--- config/php-fcgi.conf.in.orig Wed Dec 12 09:09:08 2012
+++ config/php-fcgi.conf.in Wed Dec 12 09:09:11 2012
@@ -19,7 +19,8 @@ MaxRequests = 100
# PHP FastCGI servers to start.
# Server = <php-cgi executable>;<forks>;<binding>;<UID>[:<GIDs>][;<PHP configuration file>]
#
-#Server = /usr/bin/php5-cgi ; 3 ; /var/lib/hiawatha/php-fcgi.sock ; www-data
-#Server = /usr/bin/php5-cgi ; 2 ; 127.0.0.1:2005 ; 1000:100,101
-#Server = /usr/bin/php5-cgi ; 3 ; 127.0.0.1:2005 ; www-data ; /etc/php5/cgi/php.ini
-#Server = /usr/chroot|usr/bin/php5-cgi ; 1 ; 127.0.0.1:2005 ; www-data
+#Server = /usr/chroot|usr/bin/php5-cgi ; 127.0.0.1:2005 ; www-data
+#Server = ${LOCALBASE}/bin/php-fastcgi ; 127.0.0.1:2005 ; _hiawatha
+#Server = ${LOCALBASE}/bin/php-fastcgi ; 127.0.0.1:2005 ; 579:579,67
+#Server = ${LOCALBASE}/bin/php-fastcgi ; 127.0.0.1:2005 ; _hiawatha ; /var/www/conf/php.ini
+#Server = /var/chroot|${LOCALBASE}/bin/php-fastcgi ; 127.0.0.1:2005 ; _hiawatha

View File

@ -1,12 +0,0 @@
$OpenBSD: patch-configure,v 1.1 2011/04/13 17:44:59 rpointel Exp $
--- configure.orig Wed Apr 13 16:48:30 2011
+++ configure Wed Apr 13 16:48:38 2011
@@ -6806,7 +6806,7 @@ eval logdir="${localstatedir}/log/hiawatha"
eval pidfiledir="${localstatedir}/run"
-eval workdir="${localstatedir}/lib/hiawatha"
+eval workdir="${localstatedir}/db/hiawatha"

View File

@ -1,15 +0,0 @@
$OpenBSD: patch-etc_hiawatha_php-fcgi_conf,v 1.3 2011/06/02 18:53:39 rpointel Exp $
--- etc/hiawatha/php-fcgi.conf.orig Tue Jun 9 15:26:50 2009
+++ etc/hiawatha/php-fcgi.conf Thu Jul 23 07:48:49 2009
@@ -22,7 +22,7 @@ MaxRequests = 100
# PHP FastCGI servers to start.
# Server = <php-cgi executable>;<binding>;<UID>[:<GIDs>][;<PHP configuration file>]
#
-#Server = /usr/bin/php5-cgi ; /var/lib/hiawatha/php-fcgi.sock ; www-data
-#Server = /usr/bin/php5-cgi ; 127.0.0.1:2005 ; 1000:100,101
-#Server = /usr/bin/php5-cgi ; 127.0.0.1:2005 ; www-data ; /etc/php5/cgi/php.ini
-#Server = /usr/chroot|usr/bin/php5-cgi ; 127.0.0.1:2005 ; www-data
+#Server = ${LOCALBASE}/bin/php-fastcgi ; 127.0.0.1:2005 ; _hiawatha
+#Server = ${LOCALBASE}/bin/php-fastcgi ; 127.0.0.1:2005 ; 579:579,67
+#Server = ${LOCALBASE}/bin/php-fastcgi ; 127.0.0.1:2005 ; _hiawatha ; /var/www/conf/php.ini
+#Server = /var/chroot|${LOCALBASE}/bin/php-fastcgi ; 127.0.0.1:2005 ; _hiawatha

View File

@ -1,16 +0,0 @@
$OpenBSD: patch-libip_c,v 1.1 2010/09/22 15:03:45 ajacoutot Exp $
--- libip.c.orig Wed Sep 22 16:50:47 2010
+++ libip.c Wed Sep 22 16:50:56 2010
@@ -15,11 +15,11 @@
#include <string.h>
#include <sys/socket.h>
#include <netdb.h>
+#include "libip.h"
#ifdef HAVE_ARPA_INET_H
#include <arpa/inet.h>
#endif
#include "libstr.h"
-#include "libip.h"
int default_ipv4(t_ip_addr *ip_addr) {
/* set to 0.0.0.0

View File

@ -1,6 +1,6 @@
$OpenBSD: patch-doc_hiawatha_1_in,v 1.9 2011/04/13 17:44:59 rpointel Exp $
--- doc/hiawatha.1.in.orig Mon Oct 18 14:54:29 2010
+++ doc/hiawatha.1.in Wed Apr 13 16:47:17 2011
$OpenBSD: patch-man_hiawatha_1_in,v 1.1 2012/12/12 09:39:53 jasper Exp $
--- man/hiawatha.1.in.orig Wed Dec 12 09:16:46 2012
+++ man/hiawatha.1.in Wed Dec 12 09:19:41 2012
@@ -150,12 +150,12 @@ Example: CGIextension = cgi
.B CGIhandler = <CGI handler>:<extension>[, <extension>, ...]
Specify the handler for a CGI extension. A handler is an executable which will 'run' the CGI script.
@ -11,12 +11,12 @@ $OpenBSD: patch-doc_hiawatha_1_in,v 1.9 2011/04/13 17:44:59 rpointel Exp $
.B CGIwrapper = <CGI wrapper>
Specify the wrapper for CGI processes. A secure CGI wrapper is included in the Hiawatha package (see cgi-wrapper(1) for more information).
.br
-Default = @sbindir@/cgi-wrapper, example: CGIwrapper = /bin/cgi-wrapper
+Default = ${PREFIX}/sbin/cgi-wrapper, example: CGIwrapper = ${PREFIX}/sbin/cgi-wrapper
-Default = @CMAKE_INSTALL_FULL_SBINDIR@/cgi-wrapper, example: CGIwrapper = /bin/cgi-wrapper
+Default = @CMAKE_INSTALL_FULL_SBINDIR@/cgi-wrapper, example: CGIwrapper = ${PREFIX}/sbin/cgi-wrapper/cgi-wrapper
.TP
.B CommandChannel = <portnumber>, <MD5 hash of password>
The port and the password for the CommandChannel. You can use telnet to connect to the CommandChannel (localhost:<portnumber>). Type 'help' in the CommandChannel for more information.
@@ -198,7 +198,7 @@ Example: HideProxy = 192.168.10.20
.B ConnectionsPerIP = <number>
Maximum number of simultaneous connections per IP address.
@@ -185,7 +185,7 @@ Example: HideProxy = 192.168.10.20
.B Include <filename>|<directory>
Include another configurationfile or configurationfiles in a directory.
.br
@ -25,16 +25,25 @@ $OpenBSD: patch-doc_hiawatha_1_in,v 1.9 2011/04/13 17:44:59 rpointel Exp $
.TP
.B KickOnBan = yes|no
Close all other connections that originate from the same IP in case of a ban.
@@ -265,7 +265,7 @@ Example: RequestLimitMask = deny 192.168.0.1
@@ -267,7 +267,7 @@ Example: RequestLimitMask = deny 192.168.0.1
.B ServerId = <userid>|<userid>:<groupid>[,<groupid>, ...]
The userid and groupid(s) the server will change to. If only a userid is specified, the groupid(s) will be looked up in /etc/passwd and /etc/group. The userid en groupid of user root are not allowed here.
The userid and groupid(s) the server will change to. If only a userid is specified, the groupid(s) will be looked up in /etc/passwd and /etc/group. The userid en groupid of user root are not allowed here. The userid or groupid can also be a name.
.br
-Default = 65534:65534, example: ServerId = www-data
+Default = 579:579, example: ServerId = _hiawatha
.TP
.B ServerRoot = <directory>
Rootdirectory for the webserver. Hiawatha will chroot() to this directory after reading the configurationfile and writing the PID file. Cannot be used in combination with UserWebsites. Only use this option when you know what you are doing!
@@ -882,7 +882,7 @@ and
.B ServerString = <text>
The text behind 'Server:' in the HTTP header of a response. Use 'none' to completely remove the Server string from the HTTP header.
@@ -558,7 +558,7 @@ Example: Setenv PHPRC = /var/www/conf
.B ShowIndex = yes|no|<XSLT file with full path>|xml
Return a directory listing in HTML format for a directory request when the startfile does not exist. If you want to change the index layout completely, specify the path of a XSLT file. If the XSLT file is not found or 'xml' is used, Hiawatha will output the XML of the directory index. The content of a .hiawatha_index in that directory will be included in the XML.
.br
-Default = no, example: ShowIndex = /etc/hiawatha/index.xslt
+Default = no, example: ShowIndex = ${SYSCONFDIR}/hiawatha/index.xslt
.br
(requires that Hiawatha was not compiled with -DENABLE_XSLT=off)
@@ -928,7 +928,7 @@ and
.B UseGZfile
.SH MIMETYPES
@ -43,8 +52,8 @@ $OpenBSD: patch-doc_hiawatha_1_in,v 1.9 2011/04/13 17:44:59 rpointel Exp $
.TP
.B <mimetype> <extension> [<extension> ...]
Example: image/jpeg jpg jpeg jpe
@@ -909,15 +909,15 @@ Unban all IP addresses.
Clear the internal cache (requires that Hiawatha was not compiled with --disable-cache).
@@ -955,15 +955,15 @@ Unban all IP addresses.
Clear the internal cache (requires that Hiawatha was not compiled with -DENABLE_CACHE=off).
.SH FILES
-.B /usr/sbin/hiawatha

View File

@ -1,12 +0,0 @@
$OpenBSD: patch-monitor_c,v 1.2 2011/06/02 18:53:39 rpointel Exp $
--- monitor.c.orig Mon Mar 14 08:38:53 2011
+++ monitor.c Tue May 31 11:15:57 2011
@@ -89,7 +89,7 @@
return 0;
}
- snprintf(filename + filename_offset, MAX_FILENAME_SIZE, "%ld.txt.gz", time(NULL));
+ snprintf(filename + filename_offset, MAX_FILENAME_SIZE, "%d.txt.gz", time(NULL));
if ((handle = open(filename, O_CREAT | O_APPEND | O_WRONLY, S_IRUSR | S_IWUSR | S_IRGRP)) == -1) {
return -1;
}

View File

@ -1,7 +1,7 @@
$OpenBSD: patch-serverconfig_c,v 1.15 2011/04/13 17:44:59 rpointel Exp $
--- serverconfig.c.orig Tue Nov 2 17:15:29 2010
+++ serverconfig.c Wed Apr 13 16:47:17 2011
@@ -28,7 +28,7 @@
$OpenBSD: patch-src_serverconfig_c,v 1.1 2012/12/12 09:39:53 jasper Exp $
--- src/serverconfig.c.orig Wed Oct 31 19:16:45 2012
+++ src/serverconfig.c Wed Dec 12 09:05:41 2012
@@ -29,7 +29,7 @@
#include "libstr.h"
#include "libfs.h"
@ -10,14 +10,14 @@ $OpenBSD: patch-serverconfig_c,v 1.15 2011/04/13 17:44:59 rpointel Exp $
#define MAX_LENGTH_CONFIGLINE 512
#define MAX_CACHE_SIZE 50
#define MAX_UPLOAD_SIZE 100
@@ -244,8 +244,8 @@ t_config *default_config(void) {
#ifdef HAVE_CHROOT
config->server_root = NULL;
@@ -261,8 +261,8 @@ t_config *default_config(void) {
config->tomahawk_port = NULL;
#endif
- config->server_uid = (uid_t)ID_NOBODY;
- config->server_gid = (gid_t)ID_NOBODY;
+ config->server_uid = (uid_t)ID_HIAWATHA;
+ config->server_gid = (gid_t)ID_HIAWATHA;
config->server_string = "Hiawatha v"VERSION;
init_groups(&(config->groups));
#ifdef HAVE_SSL
init_charlist(&(config->cgi_extension));

View File

@ -0,0 +1,3 @@
@comment $OpenBSD: PFRAG.shared,v 1.1 2012/12/12 09:39:53 jasper Exp $
lib/hiawatha/
lib/hiawatha/libpolarssl.so

View File

@ -1,10 +1,10 @@
@comment $OpenBSD: PLIST,v 1.12 2011/06/02 18:53:39 rpointel Exp $
@comment $OpenBSD: PLIST,v 1.13 2012/12/12 09:39:53 jasper Exp $
@newgroup _hiawatha:579
@newuser _hiawatha:579:579:daemon:Hiawatha HTTP Server:/nonexistent:/sbin/nologin
%%SHARED%%
@bin bin/ssi-cgi
@man man/man1/cgi-wrapper.1
@man man/man1/hiawatha.1
@man man/man1/newroot.1
@man man/man1/php-fcgi.1
@man man/man1/ssi-cgi.1
@man man/man1/wigwam.1
@ -12,7 +12,6 @@
@bin sbin/cgi-wrapper
@mode
@bin sbin/hiawatha
sbin/newroot
@bin sbin/php-fcgi
@bin sbin/wigwam
share/examples/hiawatha/
@ -24,10 +23,6 @@ share/examples/hiawatha/hiawatha.conf
@sample ${SYSCONFDIR}/hiawatha/hiawatha.conf
share/examples/hiawatha/index.html
@sample /var/hiawatha/index.html
share/examples/hiawatha/mimetype.conf
@sample ${SYSCONFDIR}/hiawatha/mimetype.conf
share/examples/hiawatha/php-fcgi.conf
@sample ${SYSCONFDIR}/hiawatha/php-fcgi.conf
share/examples/hiawatha/index.xslt
@sample ${SYSCONFDIR}/hiawatha/index.xslt
@extraunexec rm -rf /var/db/hiawatha/*
@ -40,4 +35,8 @@ share/examples/hiawatha/index.xslt
@mode
@owner
@group
share/examples/hiawatha/mimetype.conf
@sample ${SYSCONFDIR}/hiawatha/mimetype.conf
share/examples/hiawatha/php-fcgi.conf
@sample ${SYSCONFDIR}/hiawatha/php-fcgi.conf
@rcscript ${RCDIR}/hiawatha