lighttpd-vl.spec 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415
  1. %define webroot /var/www/lighttpd
  2. %if %{?_dist_release} == "vl6"
  3. %define owneruser lighttpd
  4. %define ownergroup lighttpd
  5. %else
  6. %define owneruser www-data
  7. %define ownergroup www-data
  8. %endif
  9. Summary: Lightning fast webserver with light system requirements
  10. Summary(ja): 少ないシステムリソースで動く超高速なウェブサーバ
  11. Name: lighttpd
  12. Version: 1.4.33
  13. Release: 2%{?_dist_release}
  14. License: BSD
  15. Group: System Environment/Daemons
  16. URL: http://www.lighttpd.net/
  17. Source0: http://www.lighttpd.net/download/lighttpd-%{version}.tar.xz
  18. Source1: lighttpd.logrotate
  19. Source2: php.d-lighttpd.ini
  20. Source3: lighttpd.init
  21. Source10: index.html
  22. Source11: http://www.lighttpd.net/favicon.ico
  23. Source13: http://www.lighttpd.net/light_button.png
  24. Source14: http://www.lighttpd.net/light_logo.png
  25. # config file patches
  26. ## for vl7 and later
  27. Patch0: lighttpd-1.4.31-vine.patch
  28. ## for vl6
  29. Patch1: lighttpd-1.4.31-vine6.patch
  30. # security patch(es)
  31. Patch1001: http://download.lighttpd.net/lighttpd/security/lighttpd-1.4.33_fix_ssl_sni.patch
  32. BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
  33. Requires(pre): shadow-utils
  34. %if %{?_dist_release} != "vl6"
  35. Requires(pre): www-common
  36. %endif
  37. Requires(post): chkconfig
  38. Requires(preun): chkconfig
  39. Requires(postun): chkconfig
  40. BuildRequires: openssl-devel, pcre-devel, bzip2-devel, zlib-devel, gcc-c++
  41. %{?_with_ldap:BuildRequires: openldap-devel}
  42. BuildRequires: gamin-devel
  43. BuildRequires: gdbm-devel
  44. BuildRequires: lua-devel
  45. %description
  46. Secure, fast, compliant and very flexible web-server which has been optimized
  47. for high-performance environments. It has a very low memory footprint compared
  48. to other webservers and takes care of cpu-load. Its advanced feature-set
  49. (FastCGI, CGI, Auth, Output-Compression, URL-Rewriting and many more) make
  50. it the perfect webserver-software for every server that is suffering load
  51. problems.
  52. Available rpmbuild rebuild options :
  53. --with : memcache webdavprops ldap
  54. --without: lua
  55. %package mod_mysql_vhost
  56. Summary: Virtual host module for lighttpd that uses a MySQL database
  57. Group: System Environment/Daemons
  58. Requires: %{name} = %{version}
  59. BuildRequires: mysql-devel
  60. %description mod_mysql_vhost
  61. Virtual host module for lighttpd that uses a MySQL database.
  62. %package fastcgi
  63. Summary: FastCGI module and spawning helper for lighttpd and PHP configuration
  64. Group: System Environment/Daemons
  65. Requires: %{name} = %{version}
  66. Requires: spawn-fcgi
  67. %description fastcgi
  68. This package contains the spawn-fcgi helper for lighttpd's automatic spawning
  69. of local FastCGI programs. Included is also a PHP .ini file to change a few
  70. defaults needed for correct FastCGI behavior.
  71. Note that for FastCGI to work with PHP, you will most likely need to find a
  72. tweaked PHP package (--enable-fastcgi and --enable-discard-path added) or
  73. recompile PHP yourself.
  74. %prep
  75. %setup -q
  76. %if %{?_dist_release} == "vl6"
  77. %patch1 -p1 -b .vine6
  78. %else
  79. %patch0 -p1 -b .vine
  80. %endif
  81. %patch1001 -p1
  82. %build
  83. %configure \
  84. --libdir="%{_libdir}/lighttpd" \
  85. --with-mysql \
  86. %{?_with_ldap:--with-ldap} \
  87. --with-openssl \
  88. --with-fam \
  89. --with-gdbm \
  90. --with-pcre \
  91. %{?_with_memcache:--with-memcache} \
  92. %{?_with_webdavprops:--with-webdav-props} \
  93. %{?_with_webdavlocks:--with-webdav-locks} \
  94. %{?!_without_lua:--with-lua}
  95. %{__make}
  96. %install
  97. %{__rm} -rf %{buildroot}
  98. %{__make} install DESTDIR=%{buildroot}
  99. # Install included init script and sysconfig entry
  100. %{__install} -D -p -m 0755 doc/initscripts/rc.lighttpd.redhat \
  101. %{buildroot}%{_sysconfdir}/rc.d/init.d/lighttpd
  102. %{__install} -D -p -m 0644 doc/initscripts/sysconfig.lighttpd \
  103. %{buildroot}%{_sysconfdir}/sysconfig/lighttpd
  104. # Install (*patched above*) sample config file
  105. %{__install} -D -p -m 0640 doc/config/lighttpd.conf \
  106. %{buildroot}%{_sysconfdir}/lighttpd/lighttpd.conf
  107. %{__install} -D -p -m 0640 doc/config/modules.conf \
  108. %{buildroot}%{_sysconfdir}/lighttpd/modules.conf
  109. mkdir -p %{buildroot}%{_sysconfdir}/lighttpd/conf.d/
  110. %{__install} -D -p -m 0640 doc/config/conf.d/*.conf \
  111. %{buildroot}%{_sysconfdir}/lighttpd/conf.d/
  112. mkdir -p %{buildroot}%{_sysconfdir}/lighttpd/vhosts.d/
  113. %{__install} -D -p -m 0640 doc/config/vhosts.d/vhosts.template \
  114. %{buildroot}%{_sysconfdir}/lighttpd/vhosts.d/
  115. # Install our own logrotate entry
  116. %{__install} -D -p -m 0644 %{SOURCE1} \
  117. %{buildroot}%{_sysconfdir}/logrotate.d/lighttpd
  118. # Install our own php.d ini file
  119. %{__install} -D -p -m 0644 %{SOURCE2} \
  120. %{buildroot}%{_sysconfdir}/php.d/lighttpd.ini
  121. # Install our own init script
  122. %{__install} -D -p -m 0755 %{SOURCE3} \
  123. %{buildroot}%{_sysconfdir}/rc.d/init.d/lighttpd
  124. # Install our own default web page and images
  125. %{__mkdir_p} %{buildroot}%{webroot}
  126. %{__install} -p -m 0644 %{SOURCE10} %{SOURCE11} %{SOURCE13} \
  127. %{SOURCE14} \
  128. %{buildroot}%{webroot}/
  129. # Install empty log directory to include
  130. %{__mkdir_p} %{buildroot}%{_var}/log/lighttpd
  131. # Install empty run directory to include (for the example fastcgi socket)
  132. %{__mkdir_p} %{buildroot}%{_var}/run/lighttpd
  133. %clean
  134. %{__rm} -rf %{buildroot}
  135. %if %{?_dist_release} == "vl6"
  136. %pre
  137. /usr/sbin/useradd -s /sbin/nologin -M -r -d %{webroot} \
  138. -c "lighttpd web server" lighttpd &>/dev/null || :
  139. %endif
  140. %post
  141. /sbin/chkconfig --add lighttpd
  142. %preun
  143. if [ $1 -eq 0 ]; then
  144. /sbin/service lighttpd stop &>/dev/null || :
  145. /sbin/chkconfig --del lighttpd
  146. fi
  147. %postun
  148. if [ $1 -ge 1 ]; then
  149. /sbin/service lighttpd condrestart &>/dev/null || :
  150. fi
  151. %files
  152. %defattr(-, root, root, 0755)
  153. %doc AUTHORS NEWS COPYING README
  154. %doc doc/config/lighttpd.conf
  155. %dir %{_sysconfdir}/lighttpd/
  156. %config(noreplace) %{_sysconfdir}/lighttpd/lighttpd.conf
  157. %config(noreplace) %{_sysconfdir}/lighttpd/modules.conf
  158. %config(noreplace) %{_sysconfdir}/lighttpd/conf.d/*
  159. %config(noreplace) %{_sysconfdir}/lighttpd/vhosts.d/*
  160. %config(noreplace) %{_sysconfdir}/logrotate.d/lighttpd
  161. %config(noreplace) %{_sysconfdir}/sysconfig/lighttpd
  162. %{_sysconfdir}/rc.d/init.d/lighttpd
  163. %{_sbindir}/lighttpd
  164. %{_sbindir}/lighttpd-angel
  165. %{_libdir}/lighttpd/
  166. %exclude %{_libdir}/lighttpd/*.la
  167. %exclude %{_libdir}/lighttpd/mod_fastcgi.so
  168. %exclude %{_libdir}/lighttpd/mod_mysql_vhost.so
  169. %exclude %{_sysconfdir}/lighttpd/conf.d/fastcgi.conf
  170. %exclude %{_sysconfdir}/lighttpd/conf.d/mysql_vhost.conf
  171. %{_mandir}/man8/lighttpd.8*
  172. %attr(0750, %{owneruser}, %{ownergroup}) %{_var}/log/lighttpd/
  173. %{webroot}/
  174. %files mod_mysql_vhost
  175. %defattr(-, root, root, 0755)
  176. %dir %{_libdir}/lighttpd/
  177. %{_sysconfdir}/lighttpd/conf.d/mysql_vhost.conf
  178. %{_libdir}/lighttpd/mod_mysql_vhost.so
  179. %files fastcgi
  180. %defattr(-, root, root, 0755)
  181. %config(noreplace) %{_sysconfdir}/php.d/lighttpd.ini
  182. %dir %{_libdir}/lighttpd/
  183. %{_libdir}/lighttpd/mod_fastcgi.so
  184. %{_sysconfdir}/lighttpd/conf.d/fastcgi.conf
  185. %changelog
  186. * Sun May 15 2016 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.4.33-2
  187. - rebuild with openssl-1.0.2
  188. * Sun Jan 5 2014 IWAI, Masaharu <iwaim.sub@gmail.com> 1.4.33-1
  189. - update to 1.4.33
  190. - add CVE-2013-4508 patch (Patch1001)
  191. - require www-common without vl6
  192. - drop outdated mod_mysql_vhost document
  193. - see upstream #2248: http://redmine.lighttpd.net/issues/2248
  194. - come back useradd pre script for Vine Linux 6
  195. * Thu Nov 29 2012 Daisuke SUZUKI <daisuke@linux.or.jp> 1.4.32-1
  196. - new upstream release
  197. * Wed Oct 24 2012 Daisuke SUZUKI <daisuke@linux.or.jp> 1.4.31-1
  198. - update to 1.4.31
  199. - build with pcre-8.31
  200. - require www-common, change docroot owner to www-data
  201. * Sun Feb 06 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.4.22-2
  202. - rebuild with openssl-1.0.0c
  203. * Fri Jun 05 2009 Daisuke SUZUKI <daisuke@linux.or.jp> 1.4.22-1
  204. - new upstream release
  205. - build with lua, add BR: lua-devel
  206. - update init script
  207. * Fri May 22 2009 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.4.20-2
  208. - rebuilt with MySQL-5.1.34.
  209. * Wed Oct 08 2008 MATSUBAYASHI Kohji <shaolin@vinelinux.org> - 1.4.20-1
  210. - updated to 1.4.20 release with many bug/security fixes, including:
  211. - CVE-2008-4298: fix memory leak in request header handling
  212. - CVE-2008-4360: fix mod_userdir information disclosure
  213. - CVE-2008-4359: fix bypassing rewrite/redirect rules with encoded urls
  214. - CVE-2008-1531: fix DoS of ssl connections
  215. - modified Patch0 for version 1.4.20
  216. - add %{_sbindir}/lighttpd-angel to the filelist
  217. * Fri Oct 03 2008 Shu KONNO <owa@bg.wakwak.com> 1.4.16-1vl5
  218. - applied new versioning policy, spec in utf-8
  219. * Tue Jul 31 2007 Daisuke SUZUKI <daisuke@linux.or.jp> 1.4.16-0vl1
  220. - new upstream release
  221. * Fri Nov 03 2006 Daisuke SUZUKI <daisuke@linux.or.jp> 1.4.13-0vl1
  222. - initial build for Vine Linux
  223. * Wed Oct 11 2006 Matthias Saou <http://freshrpms.net/> 1.4.13-1
  224. - Update to 1.4.13, which contains the previous fix.
  225. * Tue Oct 3 2006 Matthias Saou <http://freshrpms.net/> 1.4.12-3
  226. - Include fix for segfaults (lighttpd bug #876, changeset 1352).
  227. * Mon Sep 25 2006 Matthias Saou <http://freshrpms.net/> 1.4.12-1
  228. - Update to 1.4.12 final.
  229. * Fri Sep 22 2006 Matthias Saou <http://freshrpms.net/> 1.4.12-0.1.r1332
  230. - Update to latest 1.4.12 pre-release, fixes SSL issues and other bugs.
  231. - Update powered_by_fedora.png to the new logo.
  232. * Mon Aug 28 2006 Matthias Saou <http://freshrpms.net/> 1.4.11-2
  233. - FC6 rebuild.
  234. * Thu Mar 9 2006 Matthias Saou <http://freshrpms.net/> 1.4.11-1
  235. - Update to 1.4.11.
  236. * Mon Mar 6 2006 Matthias Saou <http://freshrpms.net/> 1.4.10-2
  237. - FC5 rebuild.
  238. * Wed Feb 8 2006 Matthias Saou <http://freshrpms.net/> 1.4.10-1
  239. - Update to 1.4.10.
  240. - Remove now included fix.
  241. * Wed Jan 25 2006 Matthias Saou <http://freshrpms.net/> 1.4.9-2
  242. - Add mod_fastcgi-fix patch to fix crash on backend overload.
  243. * Mon Jan 16 2006 Matthias Saou <http://freshrpms.net/> 1.4.9-1
  244. - Update to 1.4.9.
  245. * Wed Nov 23 2005 Matthias Saou <http://freshrpms.net/> 1.4.8-1
  246. - Update to 1.4.8.
  247. * Fri Nov 4 2005 Matthias Saou <http://freshrpms.net/> 1.4.7-1
  248. - Update to 1.4.7.
  249. * Wed Oct 12 2005 Matthias Saou <http://freshrpms.net/> 1.4.6-1
  250. - Update to 1.4.6.
  251. * Mon Oct 3 2005 Matthias Saou <http://freshrpms.net/> 1.4.5-1
  252. - Update to 1.4.5.
  253. - Disable gamin/fam support for now, it does not work.
  254. * Tue Sep 27 2005 Matthias Saou <http://freshrpms.net/> 1.4.4-3
  255. - Update to current SVN to check if it fixes the remaining load problems.
  256. * Wed Sep 21 2005 Matthias Saou <http://freshrpms.net/> 1.4.4-2
  257. - Patch to SVN 722 revision : Fixes a crash in mod_mysql_vhost and a problem
  258. with keepalive and certain browsers.
  259. * Mon Sep 19 2005 Matthias Saou <http://freshrpms.net/> 1.4.4-1
  260. - Update to 1.4.4 final.
  261. - Enable ldap auth, gdbm and gamin/fam support by default.
  262. * Thu Sep 15 2005 Matthias Saou <http://freshrpms.net/> 1.4.4-0
  263. - Update to 1.4.4 pre-release (fixes another fastcgi memleak).
  264. - Enable lua (cml module) by default.
  265. - Add --with-webdav-props conditional option.
  266. * Tue Sep 13 2005 Matthias Saou <http://freshrpms.net/> 1.4.3-2
  267. - Include lighttpd-1.4.3-stat_cache.patch to fix memleak.
  268. * Fri Sep 2 2005 Matthias Saou <http://freshrpms.net/> 1.4.3-1.1
  269. - Rearrange the included index.html to include the new logo, button and
  270. favicon from lighttpd.net.
  271. * Fri Sep 2 2005 Matthias Saou <http://freshrpms.net/> 1.4.3-1
  272. - Update to 1.4.3.
  273. - No longer override libdir at make install stage, use DESTDIR instead, as
  274. the resulting binary would now have referenced to %%{buildroot} :-(
  275. * Tue Aug 30 2005 Matthias Saou <http://freshrpms.net/> 1.4.2-1
  276. - Update to 1.4.2.
  277. * Mon Aug 22 2005 Matthias Saou <http://freshrpms.net/> 1.4.1-1
  278. - Update to 1.4.1.
  279. * Sun Aug 21 2005 Matthias Saou <http://freshrpms.net/> 1.4.0-1
  280. - Update to 1.4.0.
  281. - Add conditional of gamin, gdbm, memcache and lua options.
  282. * Mon Aug 1 2005 Matthias Saou <http://freshrpms.net/> 1.3.16-2
  283. - Update to 1.3.16, rebuild.
  284. * Mon Jul 18 2005 Matthias Saou <http://freshrpms.net/> 1.3.15-1
  285. - Update to 1.3.15.
  286. * Mon Jun 20 2005 Matthias Saou <http://freshrpms.net/> 1.3.14-1
  287. - Update to 1.3.14.
  288. * Sun May 22 2005 Jeremy Katz <katzj@redhat.com> - 1.3.13-5
  289. - rebuild on all arches
  290. * Mon Apr 4 2005 Matthias Saou <http://freshrpms.net/> 1.3.13-4
  291. - Change signal sent from the logrotate script from USR1 to HUP, as that's the
  292. correct one.
  293. * Fri Apr 1 2005 Michael Schwendt <mschwendt[AT]users.sf.net> 1.3.13-2
  294. - Include /etc/lighttpd directory.
  295. * Sun Mar 6 2005 Matthias Saou <http://freshrpms.net/> 1.3.13-1
  296. - Update to 1.3.13.
  297. * Wed Mar 2 2005 Matthias Saou <http://freshrpms.net/> 1.3.12-1
  298. - Update to 1.3.12.
  299. - Remove obsolete empty_cgi_handler patch.
  300. * Tue Mar 1 2005 Matthias Saou <http://freshrpms.net/> 1.3.11-2
  301. - Add missing defattr to sub-packages (#150018).
  302. * Mon Feb 21 2005 Matthias Saou <http://freshrpms.net/> 1.3.11-0
  303. - Update to 1.3.11.
  304. - Remove cleanconf and init.d patches (merged upstream).
  305. - Add empty_cgi_handler patch.
  306. * Fri Feb 18 2005 Matthias Saou <http://freshrpms.net/> 1.3.10-0
  307. - Split off -fastcgi sub-package.
  308. - Include php.d entry to set sane FastCGI defaults.
  309. * Wed Feb 16 2005 Matthias Saou <http://freshrpms.net/> 1.3.10-0
  310. - Spec file cleanup for freshrpms.net/Extras.
  311. - Compile OpenSSL support unconditionally.
  312. - Put modules in a subdirectory of libdir.
  313. - Don't include all of libdir's content to avoid debuginfo content.
  314. - Add optional LDAP support.
  315. - Add patch to change the default configuration.
  316. - Add dedicated lighttpd user/group creation.
  317. - Add logrotate entry.
  318. - Include a nice little default page for the default setup.
  319. - Split off mod_mysql_vhost sub-package, get dep only there.
  320. - Use webroot in /srv by default.
  321. - Exclude .la files, I doubt anyone will need them.
  322. * Thu Sep 30 2004 <jan@kneschke.de> 1.3.1
  323. - upgraded to 1.3.1
  324. * Tue Jun 29 2004 <jan@kneschke.de> 1.2.3
  325. - rpmlint'ed the package
  326. - added URL
  327. - added (noreplace) to start-script
  328. - change group to Networking/Daemon (like apache)
  329. * Sun Feb 23 2003 <jan@kneschke.de>
  330. - initial version