1
0
forked from pool/hiawatha

Accepting request 32890 from home:drcux

Copy from home:drcux/hiawatha via accept of submit request 32890 revision 6.
Request was accepted with message:
reviewed

OBS-URL: https://build.opensuse.org/request/show/32890
OBS-URL: https://build.opensuse.org/package/show/server:http/hiawatha?expand=0&rev=30
This commit is contained in:
Marcus Rückert 2010-02-22 14:16:27 +00:00 committed by Git OBS Bridge
parent 92f0c03ec4
commit 0f7c144df9
10 changed files with 258 additions and 88 deletions

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:aa743f140c95e85cd5643537cafe1b04f362d97f17a01fb0c3e200268d5b1570
size 248371

View File

@ -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;
}

3
hiawatha-7.0.tar.gz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:568faa4b76abc815c9114586659ee79146d1575d074690d0d6edf87f6cad10a0
size 270839

46
hiawatha-fastcgi.init Normal file
View File

@ -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

54
hiawatha-httpd.init Normal file
View File

@ -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

View File

@ -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

52
hiawatha.init Normal file
View File

@ -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

14
hiawatha.logrotate Normal file
View File

@ -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
}

View File

@ -1 +1,2 @@
addFilter("permissions-unauthorized-file")

View File

@ -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 <hugo@leisink.net>
%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