%define webroot /var/www/lighttpd # LUA support requires >= 5.1 but EPEL4 provides only 5.0, so disable %{?el4: %define _without_lua 1} Summary: Lightning fast webserver with light system requirements Name: lighttpd Version: 1.4.35 Release: 1%{?dist} License: BSD Group: System Environment/Daemons URL: http://www.lighttpd.net/ Source0: http://www.lighttpd.net/download/lighttpd-%{version}.tar.bz2 Source1: lighttpd.logrotate Source2: php.d-lighttpd.ini Source10: index.html Source11: http://www.lighttpd.net/favicon.ico Source12: http://www.lighttpd.net/light_button.png Source13: http://www.lighttpd.net/light_logo.png Source14: lighttpd-empty.png #Source100: lighttpd-mod_geoip.c #Source101: lighttpd-mod_geoip.txt #Patch0: lighttpd-1.4.20-defaultconf.patch #Patch1: lighttpd-1.4.18-mod_geoip.patch Patch2: lighttpd-1.4.20-initinfo.patch #Patch3: lighttpd-1.4.29-network-c.patch #Patch4: lighttpd-fix-base64-signedness.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root # For the target poweredby.png image (skip requirement + provide image on RHEL) %if 0%{!?rhel:1} Requires: system-logos >= 7.92.1 %endif Requires(pre): /usr/sbin/useradd Requires(post): /sbin/chkconfig Requires(preun): /sbin/service, /sbin/chkconfig Requires(postun): /sbin/service Provides: webserver BuildRequires: openssl-devel, pcre-devel, bzip2-devel, zlib-devel BuildRequires: /usr/bin/awk %{!?_without_ldap:BuildRequires: openldap-devel} %{?_with_gamin:BuildRequires: gamin-devel} %{!?_without_gdbm:BuildRequires: gdbm-devel} %{!?_without_lua:BuildRequires: lua-devel} # On Fedora <= 6 (and RHEL?), we still need this because of the "broken" lua %if %{!?fedora:0}%{?fedora} <= 6 BuildRequires: readline-devel %endif %if 0%{?rhel} <= 6 BuildRequires: readline-devel %endif %description Secure, fast, compliant and very flexible web-server which has been optimized for high-performance environments. It has a very low memory footprint compared to other webservers and takes care of cpu-load. Its advanced feature-set (FastCGI, CGI, Auth, Output-Compression, URL-Rewriting and many more) make it the perfect webserver-software for every server that is suffering load problems. Available rpmbuild rebuild options : --with : gamin webdavprops webdavlocks memcache --without : ldap gdbm lua (cml) %package fastcgi Summary: FastCGI module and spawning helper for lighttpd and PHP configuration Group: System Environment/Daemons Requires: %{name} = %{version}-%{release} # Not really a requirement, but it used to be included (until 1.4.20-5) Requires: spawn-fcgi %description fastcgi This package contains the spawn-fcgi helper for lighttpd's automatic spawning of local FastCGI programs. Included is also a PHP .ini file to change a few defaults needed for correct FastCGI behavior. #%package mod_geoip #Summary: GeoIP module for lighttpd to use for location lookups #Group: System Environment/Daemons #Requires: %{name} = %{version}-%{release} #BuildRequires: GeoIP-devel #%description mod_geoip #GeoIP module for lighttpd to use for location lookups. %package mod_mysql_vhost Summary: Virtual host module for lighttpd that uses a MySQL database Group: System Environment/Daemons Requires: %{name} = %{version}-%{release} BuildRequires: mysql-devel %description mod_mysql_vhost Virtual host module for lighttpd that uses a MySQL database. #%package -n spawn-fcgi #Summary: Simple program for spawning FastCGI processes #Group: System Environment/Daemons #%description -n spawn-fcgi #This package contains the spawn-fcgi program used for spawning FastCGI #processes, which can be local or remote. %prep %setup -q #%patch0 -p1 -b .defaultconf #%patch1 -p1 -b .mod_geoip %patch2 -p1 -b .initinfo #%patch3 -p1 -b .network-c #%patch4 -p1 -b .base64 #%{__install} -p -m 0644 %{SOURCE100} src/mod_geoip.c #%{__install} -p -m 0644 %{SOURCE101} mod_geoip.txt %build %configure \ --libdir="%{_libdir}/lighttpd" \ --with-mysql \ %{!?_without_ldap:--with-ldap} \ --with-openssl \ %{?_with_gamin:--with-fam} \ %{?_with_webdavprops:--with-webdav-props} \ %{?_with_webdavlocks:--with-webdav-locks} \ %{!?_without_gdbm:--with-gdbm} \ %{?_with_memcache:--with-memcache} \ %{?!_without_lua:--with-lua} %{__make} %{?_smp_mflags} %install %{__rm} -rf %{buildroot} %{__make} install DESTDIR=%{buildroot} # Install included init script and sysconfig entry %{__install} -D -p -m 0755 doc/initscripts/rc.lighttpd.redhat \ %{buildroot}%{_sysconfdir}/rc.d/init.d/lighttpd %{__install} -D -p -m 0644 doc/initscripts/sysconfig.lighttpd \ %{buildroot}%{_sysconfdir}/sysconfig/lighttpd # Install (*patched above*) sample config file %{__install} -D -p -m 0640 doc/config/lighttpd.conf \ %{buildroot}%{_sysconfdir}/lighttpd/lighttpd.conf %{__mkdir_p} %{buildroot}%{_sysconfdir}/lighttpd/conf.d # Install our own logrotate entry %{__install} -D -p -m 0644 %{SOURCE1} \ %{buildroot}%{_sysconfdir}/logrotate.d/lighttpd # Install our own php.d ini file %{__install} -D -p -m 0644 %{SOURCE2} \ %{buildroot}%{_sysconfdir}/php.d/lighttpd.ini # Install our own default web page and images %{__mkdir_p} %{buildroot}%{webroot} %{__install} -p -m 0644 %{SOURCE10} %{SOURCE11} %{SOURCE12} %{SOURCE13} \ %{buildroot}%{webroot}/ # Symlink for the powered-by-$DISTRO image (install empty image on RHEL) %if 0%{!?rhel:1} %{__ln_s} %{_datadir}/pixmaps/poweredby.png \ %else %{__install} -p -m 0644 %{SOURCE14} \ %endif %{buildroot}%{webroot}/poweredby.png # Install empty log directory to include %{__mkdir_p} %{buildroot}%{_var}/log/lighttpd # Install empty run directory to include (for the example fastcgi socket) %{__mkdir_p} %{buildroot}%{_var}/run/lighttpd %clean %{__rm} -rf %{buildroot} %pre /usr/sbin/useradd -s /sbin/nologin -M -r -d %{webroot} \ -c "lighttpd web server" lighttpd &>/dev/null || : %post /sbin/chkconfig --add lighttpd %preun if [ $1 -eq 0 ]; then /sbin/service lighttpd stop &>/dev/null || : /sbin/chkconfig --del lighttpd fi %postun if [ $1 -ge 1 ]; then /sbin/service lighttpd condrestart &>/dev/null || : fi %files %defattr(-,root,root,-) %doc AUTHORS COPYING README %doc doc/*.css doc/config/*.conf doc/initscripts/r* doc/initscripts/s* doc/outdated/*.txt doc/scripts/*.sh %dir %{_sysconfdir}/lighttpd/ %dir %{_sysconfdir}/lighttpd/conf.d/ %config(noreplace) %{_sysconfdir}/lighttpd/lighttpd.conf %config(noreplace) %{_sysconfdir}/logrotate.d/lighttpd %config(noreplace) %{_sysconfdir}/sysconfig/lighttpd %{_sysconfdir}/rc.d/init.d/lighttpd %{_sbindir}/lighttpd %{_sbindir}/lighttpd-angel %{_libdir}/lighttpd/ %exclude %{_libdir}/lighttpd/*.la %exclude %{_libdir}/lighttpd/mod_fastcgi.so #%exclude %{_libdir}/lighttpd/mod_geoip.so %exclude %{_libdir}/lighttpd/mod_mysql_vhost.so %{_mandir}/man8/lighttpd.8* %attr(0750, lighttpd, lighttpd) %{_var}/log/lighttpd/ %attr(0750, lighttpd, lighttpd) %{_var}/run/lighttpd/ %dir %{webroot}/ %{webroot}/*.ico %{webroot}/*.png # This is not really configuration, but prevent loss of local changes %config %{webroot}/index.html %files fastcgi %defattr(-,root,root,-) #%doc doc/fastcgi*.txt %config(noreplace) %{_sysconfdir}/php.d/lighttpd.ini %dir %{_libdir}/lighttpd/ %{_libdir}/lighttpd/mod_fastcgi.so #%files mod_geoip #%defattr(-,root,root,-) #%doc mod_geoip.txt #%dir %{_libdir}/lighttpd/ #%{_libdir}/lighttpd/mod_geoip.so %files mod_mysql_vhost %defattr(-,root,root,-) #%doc doc/mysqlvhost.txt %dir %{_libdir}/lighttpd/ %{_libdir}/lighttpd/mod_mysql_vhost.so #%files -n spawn-fcgi #%defattr(-,root,root,-) #%{_bindir}/spawn-fcgi #%{_mandir}/man1/spawn-fcgi.1* %changelog * Mon Mar 30 2009 Matthias Saou 1.4.22-2 - Update to 1.4.22. - Add missing defattr for the spawn-fcgi package. * Wed Feb 25 2009 Fedora Release Engineering - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild * Wed Feb 18 2009 Matthias Saou 1.4.21-1 - Update to 1.4.21. * Sat Jan 24 2009 Caolán McNamara 1.4.20-7 - rebuild for dependencies * Wed Dec 24 2008 Matthias Saou 1.4.20-6 - Partially revert last change by creating a "spawn-fastcgi" symlink, so that nothing breaks currently (especially for EL). - Install empty poweredby image on RHEL since the symlink's target is missing. - Split spawn-fcgi off in its own sub-package, have fastcgi package require it to provide backwards compatibility. * Mon Dec 22 2008 Matthias Saou 1.4.20-3 - Rename spawn-fastcgi to lighttpd-spawn-fastcgi to avoid clash with other packages providing it for their own needs (#472749). It's not used as-is by lighttpd, so it shouldn't be a problem... at worst, some custom scripts will need to be updated. * Mon Dec 22 2008 Matthias Saou 1.4.20-2 - Include conf.d/*.conf configuration snippets (#444953). - Mark the default index.html in order to not loose changes upon upgrade if it was edited or replaced with a different file (#438564). - Include patch to add the INIT INFO block to the init script (#246973). * Mon Oct 13 2008 Matthias Saou 1.4.20-1 - Update to 1.4.20 final. * Mon Sep 22 2008 Matthias Saou 1.4.20-0.1.r2303 - Update to 1.4.20 r2303 pre-release. * Mon Sep 22 2008 Matthias Saou 1.4.19-5 - Include memory leak patch (changeset #2305 from ticket #1774). * Thu Apr 24 2008 Matthias Saou 1.4.19-4 - Merge in second changest from upstream fix for upstream bug #285. * Thu Mar 27 2008 Matthias Saou 1.4.19-3 - Include sslshutdown patch, upstream fix to upstream bug #285 (#439066). * Sat Mar 22 2008 Matthias Saou 1.4.19-2 - Provide "webserver" (#437884). * Wed Mar 12 2008 Matthias Saou 1.4.19-1 - Update to 1.4.19, which includes all previous security fixes + bugfixes. * Tue Mar 4 2008 Matthias Saou 1.4.18-6 - Include patch for CVE-2008-0983 (crash when low on file descriptors). - Include patch for CVE-2008-1111 (cgi source disclosure). * Tue Feb 19 2008 Fedora Release Engineering - Autorebuild for GCC 4.3 * Wed Dec 05 2007 Release Engineering - Rebuild for deps * Wed Oct 31 2007 Matthias Saou 1.4.18-3 - Update mod_geoip source to fix segfault upon stopping lighttpd. * Mon Oct 22 2007 Matthias Saou 1.4.18-2 - Include mod_geoip additional source, make it an optional sub-package. - Reorder sub-packages alphabetically in spec file. - Make sub-packages require exact release, just in case. - Change default webroot back from /srv to /var. * Mon Sep 10 2007 Matthias Saou 1.4.18-1 - Update to 1.4.18. - Include newly installed lighttpd-angel ("angel" process meant to always run as root and restart lighttpd when it crashes, spawn processes on SIGHUP), but it's in testing stage and must be run with -D for now. * Wed Sep 5 2007 Matthias Saou 1.4.17-1 - Update to 1.4.17. - Update defaultconf patch to match new example configuration. - Include patch to fix log file rotation with max-workers set (trac #902). - Add /var/run/lighttpd/ directory where to put fastcgi sockets. * Thu Aug 23 2007 Matthias Saou 1.4.16-3 - Add /usr/bin/awk build requirement, used to get LIGHTTPD_VERSION_ID. * Wed Aug 22 2007 Matthias Saou 1.4.16-2 - Rebuild to fix wrong execmem requirement on ppc32. * Thu Jul 26 2007 Matthias Saou 1.4.16-1 - Update to 1.4.16 security fix release. * Mon Apr 16 2007 Matthias Saou 1.4.15-1 - Update to 1.4.15. - Remove now included previous patch. - Switch to using the bz2 source. - Add optional --with-webdav-locks support. * Fri Feb 16 2007 Matthias Saou 1.4.13-6 - Include patch to fix 99% cpu bug when client connection is dropped. * Fri Feb 2 2007 Matthias Saou 1.4.13-5 - Update defaultconf patch to change php binary to /usr/bin/php-cgi (#219723). - Noticed %%{?_smp_mflags} was missing, so add it as it works fine. * Mon Jan 29 2007 Matthias Saou 1.4.13-4 - Remove readline-devel build req, added by lua but since fixed (#213895). * Mon Nov 6 2006 Matthias Saou 1.4.13-3 - Switch to using killall for log rotation to fix it when using workers. * Mon Oct 16 2006 Matthias Saou 1.4.13-2 - Remove gcc-c++ build req, it's part of the defaults. - Add readline-devel build req, needed on RHEL4. * Wed Oct 11 2006 Matthias Saou 1.4.13-1 - Update to 1.4.13, which contains the previous fix. * Tue Oct 3 2006 Matthias Saou 1.4.12-3 - Include fix for segfaults (lighttpd bug #876, changeset 1352). * Mon Sep 25 2006 Matthias Saou 1.4.12-1 - Update to 1.4.12 final. * Fri Sep 22 2006 Matthias Saou 1.4.12-0.1.r1332 - Update to latest 1.4.12 pre-release, fixes SSL issues and other bugs. - Update powered_by_fedora.png to the new logo. * Mon Aug 28 2006 Matthias Saou 1.4.11-2 - FC6 rebuild. * Thu Mar 9 2006 Matthias Saou 1.4.11-1 - Update to 1.4.11. * Mon Mar 6 2006 Matthias Saou 1.4.10-2 - FC5 rebuild. * Wed Feb 8 2006 Matthias Saou 1.4.10-1 - Update to 1.4.10. - Remove now included fix. * Wed Jan 25 2006 Matthias Saou 1.4.9-2 - Add mod_fastcgi-fix patch to fix crash on backend overload. * Mon Jan 16 2006 Matthias Saou 1.4.9-1 - Update to 1.4.9. * Wed Nov 23 2005 Matthias Saou 1.4.8-1 - Update to 1.4.8. * Fri Nov 4 2005 Matthias Saou 1.4.7-1 - Update to 1.4.7. * Wed Oct 12 2005 Matthias Saou 1.4.6-1 - Update to 1.4.6. * Mon Oct 3 2005 Matthias Saou 1.4.5-1 - Update to 1.4.5. - Disable gamin/fam support for now, it does not work. * Tue Sep 27 2005 Matthias Saou 1.4.4-3 - Update to current SVN to check if it fixes the remaining load problems. * Wed Sep 21 2005 Matthias Saou 1.4.4-2 - Patch to SVN 722 revision : Fixes a crash in mod_mysql_vhost and a problem with keepalive and certain browsers. * Mon Sep 19 2005 Matthias Saou 1.4.4-1 - Update to 1.4.4 final. - Enable ldap auth, gdbm and gamin/fam support by default. * Thu Sep 15 2005 Matthias Saou 1.4.4-0 - Update to 1.4.4 pre-release (fixes another fastcgi memleak). - Enable lua (cml module) by default. - Add --with-webdav-props conditional option. * Tue Sep 13 2005 Matthias Saou 1.4.3-2 - Include lighttpd-1.4.3-stat_cache.patch to fix memleak. * Fri Sep 2 2005 Matthias Saou 1.4.3-1.1 - Rearrange the included index.html to include the new logo, button and favicon from lighttpd.net. * Fri Sep 2 2005 Matthias Saou 1.4.3-1 - Update to 1.4.3. - No longer override libdir at make install stage, use DESTDIR instead, as the resulting binary would now have referenced to %%{buildroot} :-( * Tue Aug 30 2005 Matthias Saou 1.4.2-1 - Update to 1.4.2. * Mon Aug 22 2005 Matthias Saou 1.4.1-1 - Update to 1.4.1. * Sun Aug 21 2005 Matthias Saou 1.4.0-1 - Update to 1.4.0. - Add conditional of gamin, gdbm, memcache and lua options. * Mon Aug 1 2005 Matthias Saou 1.3.16-2 - Update to 1.3.16, rebuild. * Mon Jul 18 2005 Matthias Saou 1.3.15-1 - Update to 1.3.15. * Mon Jun 20 2005 Matthias Saou 1.3.14-1 - Update to 1.3.14. * Sun May 22 2005 Jeremy Katz - 1.3.13-5 - rebuild on all arches * Mon Apr 4 2005 Matthias Saou 1.3.13-4 - Change signal sent from the logrotate script from USR1 to HUP, as that's the correct one. * Fri Apr 1 2005 Michael Schwendt 1.3.13-2 - Include /etc/lighttpd directory. * Sun Mar 6 2005 Matthias Saou 1.3.13-1 - Update to 1.3.13. * Wed Mar 2 2005 Matthias Saou 1.3.12-1 - Update to 1.3.12. - Remove obsolete empty_cgi_handler patch. * Tue Mar 1 2005 Matthias Saou 1.3.11-2 - Add missing defattr to sub-packages (#150018). * Mon Feb 21 2005 Matthias Saou 1.3.11-0 - Update to 1.3.11. - Remove cleanconf and init.d patches (merged upstream). - Add empty_cgi_handler patch. * Fri Feb 18 2005 Matthias Saou 1.3.10-0 - Split off -fastcgi sub-package. - Include php.d entry to set sane FastCGI defaults. * Wed Feb 16 2005 Matthias Saou 1.3.10-0 - Spec file cleanup for freshrpms.net/Extras. - Compile OpenSSL support unconditionally. - Put modules in a subdirectory of libdir. - Don't include all of libdir's content to avoid debuginfo content. - Add optional LDAP support. - Add patch to change the default configuration. - Add dedicated lighttpd user/group creation. - Add logrotate entry. - Include a nice little default page for the default setup. - Split off mod_mysql_vhost sub-package, get dep only there. - Use webroot in /srv by default. - Exclude .la files, I doubt anyone will need them. * Thu Sep 30 2004 1.3.1 - upgraded to 1.3.1 * Tue Jun 29 2004 1.2.3 - rpmlint'ed the package - added URL - added (noreplace) to start-script - change group to Networking/Daemon (like apache) * Sun Feb 23 2003 - initial version