diff --git a/hiawatha-6.11.tar.gz b/hiawatha-6.11.tar.gz deleted file mode 100644 index e59105b..0000000 --- a/hiawatha-6.11.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:aa743f140c95e85cd5643537cafe1b04f362d97f17a01fb0c3e200268d5b1570 -size 248371 diff --git a/hiawatha-6.7_missing_mode.patch b/hiawatha-6.7_missing_mode.patch deleted file mode 100644 index 5d6961f..0000000 --- a/hiawatha-6.7_missing_mode.patch +++ /dev/null @@ -1,26 +0,0 @@ -Index: libfs.c -=================================================================== ---- libfs.c.orig 2008-05-28 10:22:08.000000000 +0200 -+++ libfs.c 2008-05-29 18:38:28.611688311 +0200 -@@ -239,7 +239,7 @@ void touch_logfile(char *dir, char *file - } - if (logfile != NULL) { - if ((fd = open(logfile, O_RDONLY)) == -1) { -- if ((fd = open(logfile, O_CREAT|O_APPEND)) != -1) { -+ if ((fd = open(logfile, O_CREAT|O_APPEND, S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP)) != -1) { - fchmod(fd, mode); - if (getuid() == 0) { - fchown(fd, uid, gid); -Index: target.c -=================================================================== ---- target.c.orig 2008-05-28 17:08:27.000000000 +0200 -+++ target.c 2008-05-29 18:39:38.844045885 +0200 -@@ -1370,7 +1370,7 @@ int handle_put_request(t_session *sessio - if (range_found) { - return 416; - } -- if ((handle_write = open(session->file_on_disk, O_CREAT | O_WRONLY)) == -1) { -+ if ((handle_write = open(session->file_on_disk, O_CREAT | O_WRONLY, S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP)) == -1) { - log_error(session, fb_filesystem); - return 403; - } diff --git a/hiawatha-7.0.tar.gz b/hiawatha-7.0.tar.gz new file mode 100644 index 0000000..5b694ca --- /dev/null +++ b/hiawatha-7.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:568faa4b76abc815c9114586659ee79146d1575d074690d0d6edf87f6cad10a0 +size 270839 diff --git a/hiawatha-fastcgi.init b/hiawatha-fastcgi.init new file mode 100644 index 0000000..14b7feb --- /dev/null +++ b/hiawatha-fastcgi.init @@ -0,0 +1,46 @@ +#!/bin/sh +# hiawatha: Starts the hiawatha web server +# +# description: Hiawatha fastcgi wrapper +# processname: php-fcgi + +### BEGIN INIT INFO +# Provides: hiawatha-fastcgi +# Required-Start: $network +# Required-Stop: $network +# Default-Start: 3 5 +# Default-Stop: 0 1 2 6 +# Short-Description: Hiawatha fastcgi wrapper +# Description: Hiawatha fastcgi wrapper +### END INIT INFO + +. /etc/rc.status + +BIN=/usr/sbin/php-fcgi + +case "$1" in + + start) + startproc -f $BIN + rc_status -v + ;; + + stop) + if [ -e /var/run/php-fcgi.pid ] + then $BIN -k + fi + rc_status -v + ;; + + restart) + $0 stop + $0 start + ;; + + *) + echo "Usage: $0 (start|stop|restart)" + exit 1 + ;; + +esac +rc_exit diff --git a/hiawatha-httpd.init b/hiawatha-httpd.init new file mode 100644 index 0000000..dc61d6a --- /dev/null +++ b/hiawatha-httpd.init @@ -0,0 +1,54 @@ +#!/bin/sh +# hiawatha: Starts the hiawatha web server +# +# description: Hiawatha web server +# processname: hiawatha + +### BEGIN INIT INFO +# Provides: hiawatha-httpd http-server +# Required-Start: $network +# Required-Stop: $network +# Should-Start: hiawatha-fastcgi +# Should-Stop: hiawatha-fastcgi +# Default-Start: 3 5 +# Default-Stop: 0 1 2 6 +# Short-Description: Hiawatha web server +# Description: Hiawatha web server +### END INIT INFO + +. /etc/rc.status + +HIAWATHABIN=/usr/sbin/hiawatha + +case "$1" in + + start) + echo -n "Starting hiawatha daemon" + startproc -f $HIAWATHABIN + rc_status -v + ;; + + stop) + echo -n "Stopping hiawatha daemon" + killproc -TERM $HIAWATHABIN + rc_status -v + ;; + + status) + echo -n "Checking for hiawatha" + checkproc $HIAWATHABIN + rc_status -v + ;; + + restart) + $0 stop + $0 start + ;; + + *) + echo "Usage: $0 (start|stop|restart|status)" + exit 1 + ;; + +esac +rc_exit diff --git a/hiawatha.changes b/hiawatha.changes index 93a7449..8cfd1ac 100644 --- a/hiawatha.changes +++ b/hiawatha.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Mon Feb 15 23:25:00 CET 2010 - detlef@links2linux.de + +- new upstream version <7.0> +- added logrotate/init file. + ------------------------------------------------------------------- Mon Mar 9 16:50:22 CET 2009 - mrueckert@suse.de diff --git a/hiawatha.init b/hiawatha.init new file mode 100644 index 0000000..569d64a --- /dev/null +++ b/hiawatha.init @@ -0,0 +1,52 @@ +#!/bin/sh +# hiawatha: Starts the hiawatha web server +# +# description: Hiawatha web server +# processname: hiawatha + +### BEGIN INIT INFO +# Provides: hiawatha http-server +# Required-Start: $network +# Required-Stop: $network +# Default-Start: 3 5 +# Default-Stop: 0 1 2 6 +# Short-Description: Hiawatha web server +# Description: Hiawatha web server +### END INIT INFO + +. /etc/rc.status + +HIAWATHABIN=/usr/sbin/hiawatha + +case "$1" in + + start) + echo -n "Starting hiawatha daemon" + startproc -f $HIAWATHABIN + rc_status -v + ;; + + stop) + echo -n "Stopping hiawatha daemon" + killproc -TERM $HIAWATHABIN + rc_status -v + ;; + + status) + echo -n "Checking for hiawatha" + checkproc $HIAWATHABIN + rc_status -v + ;; + + restart) + $0 stop + $0 start + ;; + + *) + echo "Usage: $0 (start|stop|restart|status)" + exit 1 + ;; + +esac +rc_exit diff --git a/hiawatha.logrotate b/hiawatha.logrotate new file mode 100644 index 0000000..c237503 --- /dev/null +++ b/hiawatha.logrotate @@ -0,0 +1,14 @@ +/var/log/hiawatha/*.log { + compress + dateext + maxage 365 + rotate 99 + size=+1024k + notifempty + missingok + create 600 hiawatha hiawatha + sharedscripts + postrotate + killall -HUP hiawatha + endscript +} diff --git a/hiawatha-rpmlintrc b/hiawatha.rpmlintrc similarity index 97% rename from hiawatha-rpmlintrc rename to hiawatha.rpmlintrc index cca7a1b..3cc1e40 100644 --- a/hiawatha-rpmlintrc +++ b/hiawatha.rpmlintrc @@ -1 +1,2 @@ + addFilter("permissions-unauthorized-file") diff --git a/hiawatha.spec b/hiawatha.spec index e213e1e..cd7878a 100644 --- a/hiawatha.spec +++ b/hiawatha.spec @@ -1,89 +1,112 @@ # norootforbuild -Name: hiawatha -Version: 6.11 -Release: 0 -# -Group: Productivity/Networking/Web/Servers -License: GPL -# -BuildRoot: %{_tmppath}/%{name}-%{version}-build -BuildRequires: openssl-devel libxslt-devel libxml2-devel -PreReq: %insserv_prereq %fillup_prereq pwdutils -%define pkg_name hiawatha -%define pkg_home /var/lib/hiawatha -# -Url: http://www.hiawatha-webserver.org/homepage -Source: http://hiawatha.leisink.org/files/hiawatha-%{version}.tar.gz -Source1: hiawatha.permissions -Patch: hiawatha-6.7_missing_mode.patch -# -Summary: A secure webserver for Unix +%define webroot /srv/www + +Name: hiawatha +Version: 7.0 +Release: 1 + +Summary: A secure webserver for Unix +License: GPLv2 +Url: http://www.hiawatha-webserver.org +Group: Productivity/Networking/Web/Servers + +Source0: http://hiawatha.leisink.org/files/hiawatha-%{version}.tar.gz +Source1: %{name}.permissions +Source2: %{name}.logrotate +Source3: %{name}-httpd.init +Source4: %{name}-fastcgi.init +Source99: %{name}.rpmlintrc + +PreReq: %insserv_prereq %fillup_prereq pwdutils + +BuildRoot: %{_tmppath}/%{name}-%{version}-build + +BuildRequires: libxslt-devel openssl-devel + + %description Hiawatha is a secure webserver for Unix. It has been written with 'being secure' as its main goal. Hiawatha has many security features that no other webserver has. This and the fact that Hiawatha's source code is free of security-bugs, makes Hiawatha the most secure webserver available. - -Authors: --------- - Hugo Leisink - - %prep %setup -%patch + %build -export webrootdir="/srv/www/htdocs/hiawatha" -%configure --enable-command --enable-plugin --enable-xslt -%{__make} +%__sed -i -e "s|#ServerId = www-data|ServerId = hiawatha|g" etc/%{name}/%{name}.conf.in +export webrootdir=%{webroot}/%{name}/htdocs +%configure \ + --enable-chroot \ + --enable-command + +%__make %{?jobs:-j%{jobs}} + %install %makeinstall -%{__install} -D -m 0644 %{S:1} %{buildroot}/etc/permissions.d/%{name} -# TODO: -# needs patching -#%{__install} -D -m 0755 etc/logrotate.d/hiawatha %{buildroot}%{_sysconfdir}/logrotate.d/%{name} -# -#%{__install} -D -m 0755 %{S:1} %{buildroot}%{_sysconfdir}/init.d/%{name} -#%{__ln_s} -f %{_sysconfdir}/init.d/%{name} %{buildroot}%{_sbindir}/rc%{name} +%__mkdir_p %{buildroot}/%{_localstatedir}/log/%{name} +%__mkdir_p %{buildroot}/%{_localstatedir}/lib/%{name} +%__install -D -m 0644 %{SOURCE1} %{buildroot}/%{_sysconfdir}/permissions.d/%{name} +%__install -D -m 0644 %{SOURCE2} %{buildroot}%{_sysconfdir}/logrotate.d/%{name} +%__install -D -m 0755 %{SOURCE3} %{buildroot}%{_sysconfdir}/init.d/%{name}-httpd +%__ln_s -f %{_sysconfdir}/init.d/%{name}-httpd %{buildroot}%{_sbindir}/rc%{name}-httpd +%__install -D -m 0755 %{SOURCE4} %{buildroot}%{_sysconfdir}/init.d/%{name}-fastcgi +%__ln_s -f %{_sysconfdir}/init.d/%{name}-fastcgi %{buildroot}%{_sbindir}/rc%{name}-fastcgi -%clean -%{__rm} -rf %{buildroot} %pre -/usr/sbin/groupadd -r %{pkg_name} &>/dev/null ||: -/usr/sbin/useradd -g %{pkg_name} -s /bin/false -r -c "user for %{pkg_name}" -d %{pkg_home} %{pkg_name} &>/dev/null ||: +/usr/sbin/groupadd -r %{name} &>/dev/null || : +/usr/sbin/useradd -o -g %{name} -s /bin/false -r -c "User to run hiawatha" -d /var/lib/%{name} %{name} &>/dev/null || : + %post +%fillup_and_insserv %{name}-httpd +%fillup_and_insserv %{name}-fastcgi %run_permissions - %verifyscript %verify_permissions -e %{_sbindir}/cgi-wrapper + +%preun +%stop_on_removal %{name}-httpd +%stop_on_removal %{name}-fastcgi + + +%clean +%__rm -rf %{buildroot} + + %files -%defattr(-,root,root,-) -%dir %attr(750,root,%{pkg_name}) %{_sysconfdir}/hiawatha/ -%config(noreplace) %attr(640,root,%{pkg_name}) %{_sysconfdir}/hiawatha/cgi-wrapper.conf -%config(noreplace) %attr(640,root,%{pkg_name}) %{_sysconfdir}/hiawatha/httpd.conf -%config(noreplace) %attr(640,root,%{pkg_name}) %{_sysconfdir}/hiawatha/mimetype.conf -%config(noreplace) %attr(640,root,%{pkg_name}) %{_sysconfdir}/hiawatha/php-fcgi.conf -#%config(noreplace) %attr(640,root,%{pkg_name}) %{_sysconfdir}/hiawatha/throttle.conf -%config(noreplace) /etc/permissions.d/%{name} -%verify(not mode) %attr(4750,root,%{pkg_name}) %{_sbindir}/cgi-wrapper -%{_sbindir}/hiawatha +%defattr(-,root,root) +%doc AUTHORS ChangeLog COPYING +%{_bindir}/ssi-cgi +%verify(not mode) %attr(4750,root,%{name}) %{_sbindir}/cgi-wrapper +%{_sbindir}/%{name} %{_sbindir}/newroot %{_sbindir}/php-fcgi %{_sbindir}/wigwam -%{_mandir}/man1/cgi-wrapper.1.gz -%{_mandir}/man1/hiawatha.1.gz -%{_mandir}/man1/php-fcgi.1.gz -%{_mandir}/man1/wigwam.1.gz -%{_mandir}/man1/newroot.1.gz -/srv/www/htdocs/hiawatha/ -%doc doc/*.txt ChangeLog COPYING -#%{_sysconfdir}/logrotate.d/%{name} +%{_sbindir}/rc%{name}-httpd +%{_sbindir}/rc%{name}-fastcgi +%{_sysconfdir}/init.d/%{name}-httpd +%{_sysconfdir}/init.d/%{name}-fastcgi +%dir %{_sysconfdir}/%{name} +%config(noreplace) %{_sysconfdir}/%{name}/cgi-wrapper.conf +%config(noreplace) %{_sysconfdir}/%{name}/%{name}.conf +%config(noreplace) %{_sysconfdir}/%{name}/mimetype.conf +%config(noreplace) %{_sysconfdir}/%{name}/php-fcgi.conf +%config(noreplace) %{_sysconfdir}/%{name}/index.xslt +%config(noreplace) %{_sysconfdir}/permissions.d/%{name} +%config(noreplace) %{_sysconfdir}/logrotate.d/%{name} +%{_mandir}/man1/*.1.gz +%dir %{webroot}/%{name} +%dir %{webroot}/%{name}/htdocs +%{webroot}/%{name}/htdocs/index.html +%defattr(-,%{name},%{name}) +%dir %{_localstatedir}/log/%{name} +%dir %{_localstatedir}/lib/%{name} + %changelog