diff --git a/.gitignore b/.gitignore index e6ced76..8ac7f7e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ /darkhttpd-1.9.tar.bz2 /darkhttpd-1.10.tar.bz2 +/darkhttpd-1.11.tar.bz2 diff --git a/darkhttpd.service b/darkhttpd.service index d01f994..2baf7a5 100644 --- a/darkhttpd.service +++ b/darkhttpd.service @@ -1,9 +1,26 @@ +# It's not recommended to modify this file in-place, because it will be +# overwritten during package upgrades. If you want to customize, the best +# way is to create a file "/etc/systemd/system/darkhttpd.service", +# containing +# .include /lib/systemd/system/darkhttpd.service +# ...make your changes here... +# For more info about custom unit files, see +# http://fedoraproject.org/wiki/Systemd#How_do_I_customize_a_unit_file.2F_add_a_custom_unit_file.3F + +# For example, to pass additional options to the +# darkhttpd binary at startup, you need to create a file named +# "/etc/systemd/system/darkhttpd.service" containing: +# .include /lib/systemd/system/darkhttpd.service +# [Service] +# Environment=OPTIONS=-DMY_DEFINE + [Unit] -Description=Darkhttpd webserver daemon +Description=Darkhttpd Web Server +After=network.target [Service] EnvironmentFile=-/etc/sysconfig/darkhttpd -ExecStart=/usr/bin/darkhttpd $DARKHTTPD_ROOT --daemon $DARKHTTPD_FLAGS +ExecStart=/usr/sbin/darkhttpd $DARKHTTPD_ROOT --daemon $DARKHTTPD_FLAGS $MIMETYPES Type=forking [Install] diff --git a/darkhttpd.spec b/darkhttpd.spec index d8900e2..2417a00 100644 --- a/darkhttpd.spec +++ b/darkhttpd.spec @@ -1,8 +1,8 @@ %global _hardened_build 1 Name: darkhttpd -Version: 1.10 -Release: 3%{?dist} +Version: 1.11 +Release: 1%{?dist} Summary: A secure, lightweight, fast, single-threaded HTTP/1.1 server License: BSD URL: http://unix4lyfe.org/darkhttpd/ @@ -10,41 +10,53 @@ Source0: http://unix4lyfe.org/%{name}/%{name}-%{version}.tar.bz2 Source1: %{name}.service Source2: %{name}.sysconfig BuildRequires: systemd -Requires(post): systemd -Requires(preun): systemd -Requires(postun): systemd +Requires: /etc/mime.types +Requires(post): systemd +Requires(preun): systemd +Requires(postun): systemd %description -darkhttpd is a secure, lightweight, fast, single-threaded HTTP/1.1 server. - -Features: -Simple to set up. -Single binary, no other files, no installation needed. -Standalone, doesn't need inetd or ucspi-tcp. -No messing around with config files - all you have to specify is the www root. -Written in C - efficient and portable. -Small memory footprint. -Event loop, single threaded - no fork() or pthreads. -Generates directory listings. -Supports HTTP GET and HEAD requests. -Supports Range / partial content. -Supports If-Modified-Since. -Supports Keep-Alive connections. -Can serve 301 redirects based on Host header. -Uses sendfile(). +darkhttpd is a secure, lightweight, fast and single-threaded HTTP/1.1 server. + +== Features == +* Simple to set up: + * Single binary, no other files. + * Standalone, doesn't need inetd or ucspi-tcp. + * No messing around with config files. +* Written in C - efficient and portable. +* Small memory footprint. +* Event loop, single threaded - no fork() or pthreads. +* Generates directory listings. +* Supports HTTP GET and HEAD requests. +* Supports Range / partial content. +* Supports If-Modified-Since. +* Supports Keep-Alive connections. +* Can serve 301 redirects based on Host header. +* Uses sendfile(). + +== Security == +* Can log accesses, including Referer and User-Agent. +* Can chroot. +* Can drop privileges. +* Impervious to /../ sniffing. +* Times out idle connections. +* Drops overly long requests. + +== Limitations == +* This server only serves static content - *NO* CGI supported! %prep %setup -q -sed -i 's|$@|$@ $(LDFLAGS)|g' Makefile %build -make CFLAGS="%{optflags}" LDFLAGS="%{?__global_ldflags}" %{?_smp_mflags} +%{__cc} %{optflags} darkhttpd.c -o %{name} %{?__global_ldflags} %install -install -pDm755 %{name} %{buildroot}%{_bindir}/%{name} +install -pDm755 %{name} %{buildroot}%{_sbindir}/%{name} install -pDm644 %{S:1} %{buildroot}%{_unitdir}/%{name}.service install -pDm644 %{S:2} %{buildroot}%{_sysconfdir}/sysconfig/%{name} +%post %systemd_post %{S:1} %preun @@ -56,10 +68,13 @@ install -pDm644 %{S:2} %{buildroot}%{_sysconfdir}/sysconfig/%{name} %files %doc README %config(noreplace) %{_sysconfdir}/sysconfig/%{name} -%{_bindir}/%{name} +%{_sbindir}/%{name} %{_unitdir}/%{name}.service %changelog +* Sat Jan 17 2015 Christopher Meng - 1.11-1 +- Update to 1.11 + * Sat Aug 16 2014 Fedora Release Engineering - 1.10-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild diff --git a/darkhttpd.sysconfig b/darkhttpd.sysconfig index 10b7125..5e3eae4 100644 --- a/darkhttpd.sysconfig +++ b/darkhttpd.sysconfig @@ -1,2 +1,3 @@ DARKHTTPD_ROOT="/var/www" DARKHTTPD_FLAGS="--uid nobody --gid nobody --chroot" +MIMETYPES="--mimetypes /etc/mime.types" diff --git a/sources b/sources index 0824086..6d15a52 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -652968ca104e57235519cadd2d6fdda2 darkhttpd-1.10.tar.bz2 +050e5a821b1fa71a82c6efba7fda1323 darkhttpd-1.11.tar.bz2