lighttpd-vl.spec 14 KB

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