summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--www-servers/lighttpd/Manifest68
-rw-r--r--www-servers/lighttpd/files/1.4.18/03_all_lighttpd-1.4.11-errorlog-pipe.diff179
-rw-r--r--www-servers/lighttpd/files/1.4.18/04_all_lighttpd-1.4.13-deprecated-ldap-api.diff10
-rw-r--r--www-servers/lighttpd/files/1.4.18/05_all_lighttpd-1.4.18-dirlisting-sort.diff91
-rw-r--r--www-servers/lighttpd/files/1.4.18/06_all_lighttpd-1.4.18-dirlisting-brezhoneg-on-sort.diff45
-rw-r--r--www-servers/lighttpd/files/conf/lighttpd.conf321
-rw-r--r--www-servers/lighttpd/files/conf/mime-types.conf76
-rw-r--r--www-servers/lighttpd/files/conf/mod_cgi.conf33
-rw-r--r--www-servers/lighttpd/files/conf/mod_fastcgi.conf18
-rw-r--r--www-servers/lighttpd/files/conf/mod_fastcgi.conf-1.4.13-r217
-rw-r--r--www-servers/lighttpd/files/lighttpd.confd12
-rw-r--r--www-servers/lighttpd/files/lighttpd.initd55
-rw-r--r--www-servers/lighttpd/files/lighttpd.initd-1.4.13-r367
-rw-r--r--www-servers/lighttpd/files/lighttpd.logrotate17
-rw-r--r--www-servers/lighttpd/files/spawn-fcgi.confd35
-rw-r--r--www-servers/lighttpd/files/spawn-fcgi.initd51
-rw-r--r--www-servers/lighttpd/lighttpd-1.4.18.ebuild210
17 files changed, 1305 insertions, 0 deletions
diff --git a/www-servers/lighttpd/Manifest b/www-servers/lighttpd/Manifest
new file mode 100644
index 00000000..f3de4bb4
--- /dev/null
+++ b/www-servers/lighttpd/Manifest
@@ -0,0 +1,68 @@
+AUX 1.4.18/03_all_lighttpd-1.4.11-errorlog-pipe.diff 5267 RMD160 c23c816fcddbc99758a0426fc11f70677dbc06e9 SHA1 22e0d05d49cecb652d1250ac66de13fdf228cce4 SHA256 b37042549247ca2d83581aa3bcd1a5356c37015000711cecafda05aa6d6a15c4
+MD5 34d6720749f96327d311661a02886a65 files/1.4.18/03_all_lighttpd-1.4.11-errorlog-pipe.diff 5267
+RMD160 c23c816fcddbc99758a0426fc11f70677dbc06e9 files/1.4.18/03_all_lighttpd-1.4.11-errorlog-pipe.diff 5267
+SHA256 b37042549247ca2d83581aa3bcd1a5356c37015000711cecafda05aa6d6a15c4 files/1.4.18/03_all_lighttpd-1.4.11-errorlog-pipe.diff 5267
+AUX 1.4.18/04_all_lighttpd-1.4.13-deprecated-ldap-api.diff 502 RMD160 a10372a6cdfce349c6221f5038f2fda699f5f74e SHA1 12c39cd4ca731509256e271daf4aaac8a62e82c4 SHA256 0a7f3626e23291b3859e953bcc1762117a1585c2717adc065ccbb0ccf2f3577a
+MD5 87cf789e1f6866b9ece50a4af418b5b8 files/1.4.18/04_all_lighttpd-1.4.13-deprecated-ldap-api.diff 502
+RMD160 a10372a6cdfce349c6221f5038f2fda699f5f74e files/1.4.18/04_all_lighttpd-1.4.13-deprecated-ldap-api.diff 502
+SHA256 0a7f3626e23291b3859e953bcc1762117a1585c2717adc065ccbb0ccf2f3577a files/1.4.18/04_all_lighttpd-1.4.13-deprecated-ldap-api.diff 502
+AUX 1.4.18/05_all_lighttpd-1.4.18-dirlisting-sort.diff 3482 RMD160 def2d4cb50973a0a4c62a68e2455ea97273ec514 SHA1 54281eb0405bb73edf9a11e606f1099b94df7bb5 SHA256 5c5cc0976d99b73bc949b10ffd6343d0a9de7aa0a4a03bf92fe071a5c3f67e80
+MD5 4c2b9a07c63c4a34bc7f157c8f9dfeb9 files/1.4.18/05_all_lighttpd-1.4.18-dirlisting-sort.diff 3482
+RMD160 def2d4cb50973a0a4c62a68e2455ea97273ec514 files/1.4.18/05_all_lighttpd-1.4.18-dirlisting-sort.diff 3482
+SHA256 5c5cc0976d99b73bc949b10ffd6343d0a9de7aa0a4a03bf92fe071a5c3f67e80 files/1.4.18/05_all_lighttpd-1.4.18-dirlisting-sort.diff 3482
+AUX 1.4.18/06_all_lighttpd-1.4.18-dirlisting-brezhoneg-on-sort.diff 2468 RMD160 f2709714cf66e3dd66603f82b32c48ff57d2cad7 SHA1 1ac0c94f9c0a7492dcebf51a85a1e7c30349e93c SHA256 0edad0948e654ca6591a589e3b81735b0da97b9db826df2ef7517c71fddc0f2c
+MD5 a9b587cf6723021d3ad9aad092f217a0 files/1.4.18/06_all_lighttpd-1.4.18-dirlisting-brezhoneg-on-sort.diff 2468
+RMD160 f2709714cf66e3dd66603f82b32c48ff57d2cad7 files/1.4.18/06_all_lighttpd-1.4.18-dirlisting-brezhoneg-on-sort.diff 2468
+SHA256 0edad0948e654ca6591a589e3b81735b0da97b9db826df2ef7517c71fddc0f2c files/1.4.18/06_all_lighttpd-1.4.18-dirlisting-brezhoneg-on-sort.diff 2468
+AUX conf/lighttpd.conf 8182 RMD160 450cf40f4ec517331f8932618a3c492cb566e4f3 SHA1 16922786a79807fa3233d1af105a99582d3486a5 SHA256 c0f6951e00d4e8c928f1799a84976ab8bb536bd59a104c13ca9d1d3661d8cebd
+MD5 df5b2360ea380d988bf16905ab214286 files/conf/lighttpd.conf 8182
+RMD160 450cf40f4ec517331f8932618a3c492cb566e4f3 files/conf/lighttpd.conf 8182
+SHA256 c0f6951e00d4e8c928f1799a84976ab8bb536bd59a104c13ca9d1d3661d8cebd files/conf/lighttpd.conf 8182
+AUX conf/mime-types.conf 3291 RMD160 157c9a6f7d00e52c7d4118edcce8d1eb1e0a3c20 SHA1 3eec39060014e1498d3254919b10a64ca1e6ff00 SHA256 575231104d51fa1882c47021ab0aa00d615401059a6748d64453cb39aafba537
+MD5 fef397e7bcf1b741dea211a555e1803c files/conf/mime-types.conf 3291
+RMD160 157c9a6f7d00e52c7d4118edcce8d1eb1e0a3c20 files/conf/mime-types.conf 3291
+SHA256 575231104d51fa1882c47021ab0aa00d615401059a6748d64453cb39aafba537 files/conf/mime-types.conf 3291
+AUX conf/mod_cgi.conf 869 RMD160 1d447bad36822657d014990128891cbdb6169468 SHA1 30066f52e469339cc8a5df8864b4cc2d9c558c3d SHA256 322656b4cfd22ca9f1f8ab160e0b932f1646622422fd49c6fc82ab416223eecf
+MD5 9c1407e95f62ed22da66c4ef5f69c3b5 files/conf/mod_cgi.conf 869
+RMD160 1d447bad36822657d014990128891cbdb6169468 files/conf/mod_cgi.conf 869
+SHA256 322656b4cfd22ca9f1f8ab160e0b932f1646622422fd49c6fc82ab416223eecf files/conf/mod_cgi.conf 869
+AUX conf/mod_fastcgi.conf 661 RMD160 83b4126a4b0537fcd04db607a53e4742ceae039b SHA1 853a54799e9cd42ab9ff92bf0c07a0515ebe2d2a SHA256 61daa2ffac9e948d9d5130cc43f560a18c8dfb052cb7e3d4c6bd1decb6c9fd06
+MD5 b4c80dba9c626d5f89d3c3797ac6670c files/conf/mod_fastcgi.conf 661
+RMD160 83b4126a4b0537fcd04db607a53e4742ceae039b files/conf/mod_fastcgi.conf 661
+SHA256 61daa2ffac9e948d9d5130cc43f560a18c8dfb052cb7e3d4c6bd1decb6c9fd06 files/conf/mod_fastcgi.conf 661
+AUX conf/mod_fastcgi.conf-1.4.13-r2 687 RMD160 f165f27a08f35c4792bd332be3a04370b69152e3 SHA1 ebb469944098a91772424a825fdd5a0464cef158 SHA256 d1adc1358b5d9e85353caa2e706bfa231d145dd59c075cdcb3f818b3cb5d722e
+MD5 f3363e39832f1b6678468b482d121afb files/conf/mod_fastcgi.conf-1.4.13-r2 687
+RMD160 f165f27a08f35c4792bd332be3a04370b69152e3 files/conf/mod_fastcgi.conf-1.4.13-r2 687
+SHA256 d1adc1358b5d9e85353caa2e706bfa231d145dd59c075cdcb3f818b3cb5d722e files/conf/mod_fastcgi.conf-1.4.13-r2 687
+AUX lighttpd.confd 315 RMD160 c2d9c166a1209b853b400b5d21627f5d3f2d5216 SHA1 a09597a0d38d0b4d36a8f16f5d6fd5c4b7462b26 SHA256 94f69a173dc26610a43532474230537b9bc31ec846fb9f94cb72765f125edf87
+MD5 0dede109282bfe685bdec6b35f0e4b6b files/lighttpd.confd 315
+RMD160 c2d9c166a1209b853b400b5d21627f5d3f2d5216 files/lighttpd.confd 315
+SHA256 94f69a173dc26610a43532474230537b9bc31ec846fb9f94cb72765f125edf87 files/lighttpd.confd 315
+AUX lighttpd.initd 1162 RMD160 9a1afa2777428a27857e9e587c1e94457b95c6eb SHA1 e1208f1906cf089e8bac00d0271b4691e9922f60 SHA256 8bbe703055f65742158ceeed7725a914d2fa4059e720b9983fa5e647626111aa
+MD5 8ff031d9ffcbbcdc040a6f212a611cc9 files/lighttpd.initd 1162
+RMD160 9a1afa2777428a27857e9e587c1e94457b95c6eb files/lighttpd.initd 1162
+SHA256 8bbe703055f65742158ceeed7725a914d2fa4059e720b9983fa5e647626111aa files/lighttpd.initd 1162
+AUX lighttpd.initd-1.4.13-r3 1442 RMD160 17ce31a67f06f22b351ba6abfd868925eb5ad85f SHA1 58678d19bb60fd4e52a55381d9277ca472cbe805 SHA256 a4865824084d952050a1edc93bdffcbca33532d69268e13e96bb86c1a9a4bae6
+MD5 6910842e8ba496e8aa984ab30a46eb72 files/lighttpd.initd-1.4.13-r3 1442
+RMD160 17ce31a67f06f22b351ba6abfd868925eb5ad85f files/lighttpd.initd-1.4.13-r3 1442
+SHA256 a4865824084d952050a1edc93bdffcbca33532d69268e13e96bb86c1a9a4bae6 files/lighttpd.initd-1.4.13-r3 1442
+AUX lighttpd.logrotate 487 RMD160 2edb8b4abf75031af0a3b4182efb5b589dfa0d3c SHA1 24e1b048d7be5520ca5ef8ce31b55df13cc8d72b SHA256 503ee1cd454e2c0f9a212ef60dc8321893eda06ccf721ecbe94d189a09e0bc6c
+MD5 ad091c9157134890499f26d170352c9f files/lighttpd.logrotate 487
+RMD160 2edb8b4abf75031af0a3b4182efb5b589dfa0d3c files/lighttpd.logrotate 487
+SHA256 503ee1cd454e2c0f9a212ef60dc8321893eda06ccf721ecbe94d189a09e0bc6c files/lighttpd.logrotate 487
+AUX spawn-fcgi.confd 1076 RMD160 9468249fdedc39fa762a569622bae93f8b3481f9 SHA1 81bad945fc016275873e01e5f69838f73b275a3a SHA256 bfa452a849165f921a2febf0b06879db18c4c921f156b1452d06bb821063f768
+MD5 1d925aed297ec4541fb230dd19e11bc1 files/spawn-fcgi.confd 1076
+RMD160 9468249fdedc39fa762a569622bae93f8b3481f9 files/spawn-fcgi.confd 1076
+SHA256 bfa452a849165f921a2febf0b06879db18c4c921f156b1452d06bb821063f768 files/spawn-fcgi.confd 1076
+AUX spawn-fcgi.initd 1398 RMD160 3fd0fa41d100629e85960034237abc0866ec3d38 SHA1 9c07c9fd59ec73d5f37df109b188b8a7d691f949 SHA256 ae10c764e2bde9bfc483c57ca94a63d87c24cba00b4c06917885c533d2d245b1
+MD5 78bc6ceac57ecaa47abf4d5df857fe57 files/spawn-fcgi.initd 1398
+RMD160 3fd0fa41d100629e85960034237abc0866ec3d38 files/spawn-fcgi.initd 1398
+SHA256 ae10c764e2bde9bfc483c57ca94a63d87c24cba00b4c06917885c533d2d245b1 files/spawn-fcgi.initd 1398
+DIST lighttpd-1.4.18.tar.bz2 600227 RMD160 9fcd5e09ee2b1b517868d8843883228cd8b4145f SHA1 a53a8f8ae8d42d036f0b5129764b822e943cc778 SHA256 d59123850f3dd4a10f067d9a0c527324a70203cd3f82f70f0e44b8cb8068db43
+EBUILD lighttpd-1.4.18.ebuild 5805 RMD160 01e9138c52205b0a0406ef41b650c0a97c7cb9f1 SHA1 1894cd578f1b1d0f76ff8306f3a1da58555e2872 SHA256 df6c3771fba0da7aff39d6d9336df6a86961ae50f82d1d259d7a8c93f3ba8553
+MD5 3a2187a4caea72d09285c6e55ce429c3 lighttpd-1.4.18.ebuild 5805
+RMD160 01e9138c52205b0a0406ef41b650c0a97c7cb9f1 lighttpd-1.4.18.ebuild 5805
+SHA256 df6c3771fba0da7aff39d6d9336df6a86961ae50f82d1d259d7a8c93f3ba8553 lighttpd-1.4.18.ebuild 5805
+MD5 5a83e2ede2ef46ec8480a2a7e13e5cd2 files/digest-lighttpd-1.4.18 250
+RMD160 77cf7429b639aaf1b1b7fa14bf7ff29a3c69a062 files/digest-lighttpd-1.4.18 250
+SHA256 f3d4f1fcb4d07b2aecf7d9c3c5e7e4d58eaa8f0f9e227b32c27f774828e06578 files/digest-lighttpd-1.4.18 250
diff --git a/www-servers/lighttpd/files/1.4.18/03_all_lighttpd-1.4.11-errorlog-pipe.diff b/www-servers/lighttpd/files/1.4.18/03_all_lighttpd-1.4.11-errorlog-pipe.diff
new file mode 100644
index 00000000..c168eba7
--- /dev/null
+++ b/www-servers/lighttpd/files/1.4.18/03_all_lighttpd-1.4.11-errorlog-pipe.diff
@@ -0,0 +1,179 @@
+diff -ur lighttpd-1.4.11.orig/src/base.h lighttpd-1.4.11/src/base.h
+--- lighttpd-1.4.11.orig/src/base.h 2006-01-13 06:51:04.000000000 -0800
++++ lighttpd-1.4.11/src/base.h 2006-12-17 18:01:39.000000000 -0800
+@@ -505,7 +505,7 @@
+
+ /* the errorlog */
+ int errorlog_fd;
+- enum { ERRORLOG_STDERR, ERRORLOG_FILE, ERRORLOG_SYSLOG } errorlog_mode;
++ enum { ERRORLOG_STDERR, ERRORLOG_FILE, ERRORLOG_SYSLOG, ERRORLOG_PIPE } errorlog_mode;
+ buffer *errorlog_buf;
+
+ fdevents *ev, *ev_ins;
+diff -ur lighttpd-1.4.11.orig/src/log.c lighttpd-1.4.11/src/log.c
+--- lighttpd-1.4.11.orig/src/log.c 2005-13-07 05:01:35.000000000 -0800
++++ lighttpd-1.4.11/src/log.c 2006-12-17 18:09:43.000000000 -0800
+@@ -34,10 +34,11 @@
+ /**
+ * open the errorlog
+ *
+- * we have 3 possibilities:
++ * we have 4 possibilities:
+ * - stderr (default)
+ * - syslog
+ * - logfile
++ * - pipe
+ *
+ * if the open failed, report to the user and die
+ *
+@@ -57,21 +58,81 @@
+ srv->errorlog_mode = ERRORLOG_SYSLOG;
+ } else if (!buffer_is_empty(srv->srvconf.errorlog_file)) {
+ const char *logfile = srv->srvconf.errorlog_file->ptr;
+-
+- if (-1 == (srv->errorlog_fd = open(logfile, O_APPEND | O_WRONLY | O_CREAT | O_LARGEFILE, 0644))) {
+- log_error_write(srv, __FILE__, __LINE__, "SSSS",
+- "opening errorlog '", logfile,
+- "' failed: ", strerror(errno));
+-
++
++ if (logfile[0] == '|') {
++#ifdef HAVE_FORK
++ /* create write pipe and spawn process */
++
++ int to_log_fds[2];
++ pid_t pid;
++
++ if (pipe(to_log_fds)) {
++ log_error_write(srv, __FILE__, __LINE__, "ss",
++ "pipe failed: ", strerror(errno));
++ return -1;
++ }
++
++ /* fork, execve */
++ switch (pid = fork()) {
++ case 0:
++ /* child */
++
++ close(STDIN_FILENO);
++ dup2(to_log_fds[0], STDIN_FILENO);
++ close(to_log_fds[0]);
++ /* not needed */
++ close(to_log_fds[1]);
++
++ /* we don't need the client socket */
++ for (fd = 3; fd < 256; fd++) {
++ close(fd);
++ }
++
++ /* exec the log-process (skip the | )
++ *
++ */
++
++ execl("/bin/sh", "sh", "-c", logfile + 1, NULL);
++
++ log_error_write(srv, __FILE__, __LINE__, "sss",
++ "spawning log-process failed: ",
++ strerror(errno), logfile + 1);
++
++ exit(-1);
++ break;
++ case -1:
++ /* error */
++ log_error_write(srv, __FILE__, __LINE__, "ss", "fork failed:", strerror(errno));
++ break;
++ default:
++ close(to_log_fds[0]);
++
++ srv->errorlog_fd = to_log_fds[1];
++
++ break;
++ }
++ srv->errorlog_mode = ERRORLOG_PIPE;
++#else
++ log_error_write(srv, __FILE__, __LINE__, "SSS",
++ "opening errorlog '", logfile,"' impossible");
+ return -1;
+- }
++#endif
++ } else {
++ if (-1 == (srv->errorlog_fd = open(logfile, O_APPEND | O_WRONLY | O_CREAT | O_LARGEFILE, 0644))) {
++ log_error_write(srv, __FILE__, __LINE__, "SSSS",
++ "opening errorlog '", logfile,
++ "' failed: ", strerror(errno));
++
++ return -1;
++ }
++ srv->errorlog_mode = ERRORLOG_FILE;
++ }
+ #ifdef FD_CLOEXEC
+- /* close fd on exec (cgi) */
+- fcntl(srv->errorlog_fd, F_SETFD, FD_CLOEXEC);
++ /* close fd on exec (cgi) */
++ fcntl(srv->errorlog_fd, F_SETFD, FD_CLOEXEC);
+ #endif
+- srv->errorlog_mode = ERRORLOG_FILE;
+- }
+-
++ }
++
+ log_error_write(srv, __FILE__, __LINE__, "s", "server started");
+
+ #ifdef HAVE_VALGRIND_VALGRIND_H
+@@ -99,7 +160,7 @@
+ */
+
+ int log_error_cycle(server *srv) {
+- /* only cycle if we are not in syslog-mode */
++ /* only cycle if the error log is a file */
+
+ if (srv->errorlog_mode == ERRORLOG_FILE) {
+ const char *logfile = srv->srvconf.errorlog_file->ptr;
+@@ -135,6 +196,7 @@
+ log_error_write(srv, __FILE__, __LINE__, "s", "server stopped");
+
+ switch(srv->errorlog_mode) {
++ case ERRORLOG_PIPE: /* fall through */
+ case ERRORLOG_FILE:
+ close(srv->errorlog_fd);
+ break;
+@@ -154,6 +216,7 @@
+ va_list ap;
+
+ switch(srv->errorlog_mode) {
++ case ERRORLOG_PIPE:
+ case ERRORLOG_FILE:
+ case ERRORLOG_STDERR:
+ /* cache the generated timestamp */
+@@ -238,6 +301,7 @@
+ va_end(ap);
+
+ switch(srv->errorlog_mode) {
++ case ERRORLOG_PIPE: /* fall through */
+ case ERRORLOG_FILE:
+ BUFFER_APPEND_STRING_CONST(srv->errorlog_buf, "\n");
+ write(srv->errorlog_fd, srv->errorlog_buf->ptr, srv->errorlog_buf->used - 1);
+diff -ur lighttpd-1.4.11.orig/src/mod_cgi.c lighttpd-1.4.11/src/mod_cgi.c
+--- lighttpd-1.4.11.orig/src/mod_cgi.c 2006-02-22 05:15:10.000000000 -0800
++++ lighttpd-1.4.11/src/mod_cgi.c 2006-12-17 18:01:39.000000000 -0800
+@@ -750,7 +750,7 @@
+ *
+ * we feed the stderr of the CGI to our errorlog, if possible
+ */
+- if (srv->errorlog_mode == ERRORLOG_FILE) {
++ if ((srv->errorlog_mode == ERRORLOG_FILE) || (srv->errorlog_mode == ERRORLOG_PIPE)) {
+ close(STDERR_FILENO);
+ dup2(srv->errorlog_fd, STDERR_FILENO);
+ }
+diff -ur lighttpd-1.4.11.orig/src/mod_rrdtool.c lighttpd-1.4.11/src/mod_rrdtool.c
+--- lighttpd-1.4.11.orig/src/mod_rrdtool.c 2005-08-21 15:52:24.000000000 -0700
++++ lighttpd-1.4.11/src/mod_rrdtool.c 2006-12-17 18:01:39.000000000 -0800
+@@ -134,7 +134,7 @@
+
+ close(STDERR_FILENO);
+
+- if (srv->errorlog_mode == ERRORLOG_FILE) {
++ if ((srv->errorlog_mode == ERRORLOG_FILE) || (srv->errorlog_mode == ERRORLOG_PIPE)) {
+ dup2(srv->errorlog_fd, STDERR_FILENO);
+ close(srv->errorlog_fd);
+ }
diff --git a/www-servers/lighttpd/files/1.4.18/04_all_lighttpd-1.4.13-deprecated-ldap-api.diff b/www-servers/lighttpd/files/1.4.18/04_all_lighttpd-1.4.13-deprecated-ldap-api.diff
new file mode 100644
index 00000000..259ad4b2
--- /dev/null
+++ b/www-servers/lighttpd/files/1.4.18/04_all_lighttpd-1.4.13-deprecated-ldap-api.diff
@@ -0,0 +1,10 @@
+--- lighttpd-1.4.13.old/src/Makefile.am 2006-10-09 12:19:34.000000000 -0400
++++ lighttpd-1.4.13/src/Makefile.am 2007-03-26 10:10:26.000000000 -0400
+@@ -213,6 +213,7 @@
+ mod_auth_la_SOURCES = mod_auth.c http_auth_digest.c http_auth.c
+ mod_auth_la_LDFLAGS = -module -export-dynamic -avoid-version -no-undefined
+ mod_auth_la_LIBADD = $(CRYPT_LIB) $(LDAP_LIB) $(LBER_LIB) $(common_libadd)
++mod_auth_la_CFLAGS = -DLDAP_DEPRECATED
+
+ lib_LTLIBRARIES += mod_rewrite.la
+ mod_rewrite_la_SOURCES = mod_rewrite.c
diff --git a/www-servers/lighttpd/files/1.4.18/05_all_lighttpd-1.4.18-dirlisting-sort.diff b/www-servers/lighttpd/files/1.4.18/05_all_lighttpd-1.4.18-dirlisting-sort.diff
new file mode 100644
index 00000000..f4bb6a5d
--- /dev/null
+++ b/www-servers/lighttpd/files/1.4.18/05_all_lighttpd-1.4.18-dirlisting-sort.diff
@@ -0,0 +1,91 @@
+--- src/mod_dirlisting.c.old 2007-10-01 14:57:24.000000000 +0200
++++ src/mod_dirlisting.c 2007-10-01 15:36:12.000000000 +0200
+@@ -503,6 +503,73 @@
+ "}\n"
+ "</style>\n"
+ );
++
++ BUFFER_APPEND_STRING_CONST(out,
++ "<script type=\"text/javascript\">\n"
++ "// <!--\n"
++ "var sort_column;\n"
++ "var prev_span = null;\n");
++
++ BUFFER_APPEND_STRING_CONST(out,
++ "function get_inner_text(el) {\n"
++ " if((typeof el == 'string')||(typeof el == 'undefined'))\n"
++ " return el;\n"
++ " if(el.innerText)\n"
++ " return el.innerText;\n"
++ " else {\n"
++ " var str = \"\";\n"
++ " var cs = el.childNodes;\n"
++ " var l = cs.length;\n"
++ " for (i=0;i<l;i++) {\n"
++ " if (cs[i].nodeType==1) str += get_inner_text(cs[i]);\n"
++ " else if (cs[i].nodeType==3) str += cs[i].nodeValue;\n"
++ " }\n"
++ " }\n"
++ " return str;\n"
++ "}\n");
++
++ BUFFER_APPEND_STRING_CONST(out,
++ "function sortfn(a,b) {\n"
++ " var at = get_inner_text(a.cells[sort_column]);\n"
++ " var bt = get_inner_text(b.cells[sort_column]);\n"
++ " if (a.cells[sort_column].className == 'int') {\n"
++ " return parseInt(at)-parseInt(bt);\n"
++ " } else {\n"
++ " aa = at.toLowerCase();\n"
++ " bb = bt.toLowerCase();\n"
++ " if (aa==bb) return 0;\n"
++ " else if (aa<bb) return -1;\n"
++ " else return 1;\n"
++ " }\n"
++ "}\n");
++
++ BUFFER_APPEND_STRING_CONST(out,
++ "function resort(lnk) {\n"
++ " var span = lnk.childNodes[1];\n"
++ " var table = lnk.parentNode.parentNode.parentNode.parentNode;\n"
++ " var rows = new Array();\n"
++ " for (j=1;j<table.rows.length;j++)\n"
++ " rows[j-1] = table.rows[j];\n"
++ " sort_column = lnk.parentNode.cellIndex;\n"
++ " rows.sort(sortfn);\n");
++
++ BUFFER_APPEND_STRING_CONST(out,
++ " if (prev_span != null) prev_span.innerHTML = '';\n"
++ " if (span.getAttribute('sortdir')=='down') {\n"
++ " span.innerHTML = '&uarr;';\n"
++ " span.setAttribute('sortdir','up');\n"
++ " rows.reverse();\n"
++ " } else {\n"
++ " span.innerHTML = '&darr;';\n"
++ " span.setAttribute('sortdir','down');\n"
++ " }\n"
++ " for (i=0;i<rows.length;i++)\n"
++ " table.tBodies[0].appendChild(rows[i]);\n"
++ " prev_span = span;\n"
++ "}\n"
++ "// -->\n"
++ "</script>\n");
++
+ }
+
+ BUFFER_APPEND_STRING_CONST(out, "</head>\n<body>\n");
+@@ -532,10 +599,10 @@
+ "<table summary=\"Directory Listing\" cellpadding=\"0\" cellspacing=\"0\">\n"
+ "<thead>"
+ "<tr>"
+- "<th class=\"n\">Name</th>"
+- "<th class=\"m\">Last Modified</th>"
+- "<th class=\"s\">Size</th>"
+- "<th class=\"t\">Type</th>"
++ "<th class=\"n\"><a href=\"#\" class=\"sortheader\" onclick=\"resort(this);return false;\">Name <span class=\"sortarrow\"></span></a></th>"
++ "<th class=\"m\"><a href=\"#\" class=\"sortheader\" onclick=\"resort(this);return false;\">Last Modified <span class=\"sortarrow\"></span></a></th>"
++ "<th class=\"s\"><a href=\"#\" class=\"sortheader\" onclick=\"resort(this);return false;\">Size <span class=\"sortarrow\"></span></a></th>"
++ "<th class=\"t\"><a href=\"#\" class=\"sortheader\" onclick=\"resort(this);return false;\">Type <span class=\"sortarrow\"></span></a></th>"
+ "</tr>"
+ "</thead>\n"
+ "<tbody>\n"
diff --git a/www-servers/lighttpd/files/1.4.18/06_all_lighttpd-1.4.18-dirlisting-brezhoneg-on-sort.diff b/www-servers/lighttpd/files/1.4.18/06_all_lighttpd-1.4.18-dirlisting-brezhoneg-on-sort.diff
new file mode 100644
index 00000000..f1a481f3
--- /dev/null
+++ b/www-servers/lighttpd/files/1.4.18/06_all_lighttpd-1.4.18-dirlisting-brezhoneg-on-sort.diff
@@ -0,0 +1,45 @@
+--- src/mod_dirlisting.c.sort 2007-11-03 01:47:43.103815487 +0100
++++ src/mod_dirlisting.c 2007-11-03 01:49:34.549747465 +0100
+@@ -458,7 +458,7 @@
+ "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.1//EN\" \"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd\">\n"
+ "<html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"en\">\n"
+ "<head>\n"
+- "<title>Index of "
++ "<title>Taolenn verr "
+ );
+ buffer_append_string_encoded(out, CONST_BUF_LEN(con->uri.path), ENCODING_MINIMAL_XML);
+ BUFFER_APPEND_STRING_CONST(out, "</title>\n");
+@@ -591,7 +591,7 @@
+ stream_close(&s);
+ }
+
+- BUFFER_APPEND_STRING_CONST(out, "<h2>Index of ");
++ BUFFER_APPEND_STRING_CONST(out, "<h2>Taolenn verr ");
+ buffer_append_string_encoded(out, CONST_BUF_LEN(con->uri.path), ENCODING_MINIMAL_XML);
+ BUFFER_APPEND_STRING_CONST(out,
+ "</h2>\n"
+@@ -599,18 +599,18 @@
+ "<table summary=\"Directory Listing\" cellpadding=\"0\" cellspacing=\"0\">\n"
+ "<thead>"
+ "<tr>"
+- "<th class=\"n\"><a href=\"#\" class=\"sortheader\" onclick=\"resort(this);return false;\">Name <span class=\"sortarrow\"></span></a></th>"
+- "<th class=\"m\"><a href=\"#\" class=\"sortheader\" onclick=\"resort(this);return false;\">Last Modified <span class=\"sortarrow\"></span></a></th>"
+- "<th class=\"s\"><a href=\"#\" class=\"sortheader\" onclick=\"resort(this);return false;\">Size <span class=\"sortarrow\"></span></a></th>"
+- "<th class=\"t\"><a href=\"#\" class=\"sortheader\" onclick=\"resort(this);return false;\">Type <span class=\"sortarrow\"></span></a></th>"
++ "<th class=\"n\"><a href=\"#\" class=\"sortheader\" onclick=\"resort(this);return false;\">Anv <span class=\"sortarrow\"></span></a></th>"
++ "<th class=\"m\"><a href=\"#\" class=\"sortheader\" onclick=\"resort(this);return false;\">Kemm da ziwezhañ <span class=\"sortarrow\"></span></a></th>"
++ "<th class=\"s\"><a href=\"#\" class=\"sortheader\" onclick=\"resort(this);return false;\">Brasentez <span class=\"sortarrow\"></span></a></th>"
++ "<th class=\"t\"><a href=\"#\" class=\"sortheader\" onclick=\"resort(this);return false;\">Benaos <span class=\"sortarrow\"></span></a></th>"
+ "</tr>"
+ "</thead>\n"
+ "<tbody>\n"
+ "<tr>"
+- "<td class=\"n\"><a href=\"../\">Parent Directory</a>/</td>"
++ "<td class=\"n\"><a href=\"../\">Dreist</a>/</td>"
+ "<td class=\"m\">&nbsp;</td>"
+ "<td class=\"s\">- &nbsp;</td>"
+- "<td class=\"t\">Directory</td>"
++ "<td class=\"t\">Roll Skridoù</td>"
+ "</tr>\n"
+ );
+ }
diff --git a/www-servers/lighttpd/files/conf/lighttpd.conf b/www-servers/lighttpd/files/conf/lighttpd.conf
new file mode 100644
index 00000000..778a4062
--- /dev/null
+++ b/www-servers/lighttpd/files/conf/lighttpd.conf
@@ -0,0 +1,321 @@
+###############################################################################
+# Default lighttpd.conf for Gentoo.
+# $Header: /var/cvsroot/gentoo-x86/www-servers/lighttpd/files/conf/lighttpd.conf,v 1.3 2005/09/01 14:22:35 ka0ttic Exp $
+###############################################################################
+
+# {{{ variables
+var.basedir = "/var/www/localhost"
+var.logdir = "/var/log/lighttpd"
+var.statedir = "/var/lib/lighttpd"
+# }}}
+
+# {{{ modules
+# At the very least, mod_access and mod_accesslog should be enabled.
+# All other modules should only be loaded if necessary.
+# NOTE: the order of modules is important.
+server.modules = (
+# "mod_rewrite",
+# "mod_redirect",
+# "mod_alias",
+ "mod_access",
+# "mod_cml",
+# "mod_trigger_b4_dl",
+# "mod_auth",
+# "mod_status",
+# "mod_setenv",
+# "mod_proxy",
+# "mod_simple_vhost",
+# "mod_evhost",
+# "mod_userdir",
+# "mod_compress",
+# "mod_ssi",
+# "mod_usertrack",
+# "mod_expire",
+# "mod_secdownload",
+# "mod_rrdtool",
+# "mod_webdav",
+ "mod_accesslog"
+)
+# }}}
+
+# {{{ includes
+include "mime-types.conf"
+# uncomment for cgi support
+# include "mod_cgi.conf"
+# uncomment for php/fastcgi support
+# include "mod_fastcgi.conf"
+# }}}
+
+# {{{ server settings
+server.username = "lighttpd"
+server.groupname = "lighttpd"
+
+server.document-root = var.basedir + "/htdocs"
+server.pid-file = "/var/run/lighttpd.pid"
+
+server.errorlog = var.logdir + "/error.log"
+# log errors to syslog instead
+# server.errorlog-use-syslog = "enable"
+
+server.indexfiles = ("index.php", "index.html",
+ "index.htm", "default.htm")
+
+# server.tag = "lighttpd"
+
+server.follow-symlink = "enable"
+
+# event handler (defaults to "poll")
+# see performance.txt
+#
+# for >= linux-2.4
+# server.event-handler = "linux-rtsig"
+# for >= linux-2.6
+# server.event-handler = "linux-sysepoll"
+# for FreeBSD
+# server.event-handler = "freebsd-kqueue"
+
+# chroot to directory (defaults to no chroot)
+# server.chroot = "/"
+
+# bind to port (defaults to 80)
+# server.port = 81
+
+# bind to name (defaults to all interfaces)
+# server.bind = "grisu.home.kneschke.de"
+
+# error-handler for status 404
+# server.error-handler-404 = "/error-handler.html"
+# server.error-handler-404 = "/error-handler.php"
+
+# Format: <errorfile-prefix><status-code>.html
+# -> ..../status-404.html for 'File not found'
+# server.errorfile-prefix = var.basedir + "/error/status-"
+
+# FAM support for caching stat() calls
+# requires that lighttpd be built with USE=fam
+# server.stat-cache-engine = "fam"
+# }}}
+
+# {{{ mod_staticfile
+
+# which extensions should not be handled via static-file transfer
+# (extensions that are usually handled by mod_cgi, mod_fastcgi, etc).
+static-file.exclude-extensions = (".php", ".pl", ".cgi", ".fcgi")
+# }}}
+
+# {{{ mod_accesslog
+accesslog.filename = var.logdir + "/access.log"
+# }}}
+
+# {{{ mod_dirlisting
+# enable directory listings
+# dir-listing.activate = "enable"
+#
+# don't list hidden files/directories
+# dir-listing.hide-dotfiles = "enable"
+#
+# use a different css for directory listings
+# dir-listing.external-css = "/path/to/dir-listing.css"
+#
+# list of regular expressions. files that match any of the
+# specified regular expressions will be excluded from directory
+# listings.
+# dir-listing.exclude = ("^\.", "~$")
+# }}}
+
+# {{{ mod_access
+# see access.txt
+
+url.access-deny = ("~", ".inc")
+# }}}
+
+# {{{ mod_userdir
+# see userdir.txt
+#
+# userdir.path = "public_html"
+# userdir.exclude-user = ("root")
+# }}}
+
+# {{{ mod_ssi
+# see ssi.txt
+#
+# ssi.extension = (".shtml")
+# }}}
+
+# {{{ mod_ssl
+# see ssl.txt
+#
+# ssl.engine = "enable"
+# ssl.pemfile = "server.pem"
+# }}}
+
+# {{{ mod_status
+# see status.txt
+#
+# status.status-url = "/server-status"
+# status.config-url = "/server-config"
+# }}}
+
+# {{{ mod_simple_vhost
+# see simple-vhost.txt
+#
+# If you want name-based virtual hosting add the next three settings and load
+# mod_simple_vhost
+#
+# document-root =
+# virtual-server-root + virtual-server-default-host + virtual-server-docroot
+# or
+# virtual-server-root + http-host + virtual-server-docroot
+#
+# simple-vhost.server-root = "/home/weigon/wwwroot/servers/"
+# simple-vhost.default-host = "grisu.home.kneschke.de"
+# simple-vhost.document-root = "/pages/"
+# }}}
+
+# {{{ mod_compress
+# see compress.txt
+#
+# compress.cache-dir = var.statedir + "/cache/compress"
+# compress.filetype = ("text/plain", "text/html")
+# }}}
+
+# {{{ mod_proxy
+# see proxy.txt
+#
+# proxy.server = ( ".php" =>
+# ( "localhost" =>
+# (
+# "host" => "192.168.0.101",
+# "port" => 80
+# )
+# )
+# )
+# }}}
+
+# {{{ mod_auth
+# see authentication.txt
+#
+# auth.backend = "plain"
+# auth.backend.plain.userfile = "lighttpd.user"
+# auth.backend.plain.groupfile = "lighttpd.group"
+
+# auth.backend.ldap.hostname = "localhost"
+# auth.backend.ldap.base-dn = "dc=my-domain,dc=com"
+# auth.backend.ldap.filter = "(uid=$)"
+
+# auth.require = ( "/server-status" =>
+# (
+# "method" => "digest",
+# "realm" => "download archiv",
+# "require" => "user=jan"
+# ),
+# "/server-info" =>
+# (
+# "method" => "digest",
+# "realm" => "download archiv",
+# "require" => "valid-user"
+# )
+# )
+# }}}
+
+# {{{ mod_rewrite
+# see rewrite.txt
+#
+# url.rewrite = (
+# "^/$" => "/server-status"
+# )
+# }}}
+
+# {{{ mod_redirect
+# see redirect.txt
+#
+# url.redirect = (
+# "^/wishlist/(.+)" => "http://www.123.org/$1"
+# )
+# }}}
+
+# {{{ mod_evhost
+# define a pattern for the host url finding
+# %% => % sign
+# %0 => domain name + tld
+# %1 => tld
+# %2 => domain name without tld
+# %3 => subdomain 1 name
+# %4 => subdomain 2 name
+#
+# evhost.path-pattern = "/home/storage/dev/www/%3/htdocs/"
+# }}}
+
+# {{{ mod_expire
+# expire.url = (
+# "/buggy/" => "access 2 hours",
+# "/asdhas/" => "access plus 1 seconds 2 minutes"
+# )
+# }}}
+
+# {{{ mod_rrdtool
+# see rrdtool.txt
+#
+# rrdtool.binary = "/usr/bin/rrdtool"
+# rrdtool.db-name = var.statedir + "/lighttpd.rrd"
+# }}}
+
+# {{{ mod_setenv
+# see setenv.txt
+#
+# setenv.add-request-header = ( "TRAV_ENV" => "mysql://user@host/db" )
+# setenv.add-response-header = ( "X-Secret-Message" => "42" )
+# }}}
+
+# {{{ mod_trigger_b4_dl
+# see trigger_b4_dl.txt
+#
+# trigger-before-download.gdbm-filename = "/home/weigon/testbase/trigger.db"
+# trigger-before-download.memcache-hosts = ( "127.0.0.1:11211" )
+# trigger-before-download.trigger-url = "^/trigger/"
+# trigger-before-download.download-url = "^/download/"
+# trigger-before-download.deny-url = "http://127.0.0.1/index.html"
+# trigger-before-download.trigger-timeout = 10
+# }}}
+
+# {{{ mod_cml
+# see cml.txt
+#
+# don't forget to add index.cml to server.indexfiles
+# cml.extension = ".cml"
+# cml.memcache-hosts = ( "127.0.0.1:11211" )
+# }}}
+
+# {{{ mod_webdav
+# see webdav.txt
+#
+# $HTTP["url"] =~ "^/dav($|/)" {
+# webdav.activate = "enable"
+# webdav.is-readonly = "enable"
+# }
+# }}}
+
+# {{{ extra rules
+#
+# set Content-Encoding and reset Content-Type for browsers that
+# support decompressing on-thy-fly (requires mod_setenv)
+# $HTTP["url"] =~ "\.gz$" {
+# setenv.add-response-header = ("Content-Encoding" => "x-gzip")
+# mimetype.assign = (".gz" => "text/plain")
+# }
+
+# $HTTP["url"] =~ "\.bz2$" {
+# setenv.add-response-header = ("Content-Encoding" => "x-bzip2")
+# mimetype.assign = (".bz2" => "text/plain")
+# }
+#
+# }}}
+
+# {{{ debug
+# debug.log-request-header = "enable"
+# debug.log-response-header = "enable"
+# debug.log-request-handling = "enable"
+# debug.log-file-not-found = "enable"
+# }}}
+
+# vim: set ft=conf foldmethod=marker et :
diff --git a/www-servers/lighttpd/files/conf/mime-types.conf b/www-servers/lighttpd/files/conf/mime-types.conf
new file mode 100644
index 00000000..3c365777
--- /dev/null
+++ b/www-servers/lighttpd/files/conf/mime-types.conf
@@ -0,0 +1,76 @@
+###############################################################################
+# Default mime-types.conf for Gentoo.
+# include'd from lighttpd.conf.
+# $Header: /var/cvsroot/gentoo-x86/www-servers/lighttpd/files/conf/mime-types.conf,v 1.2 2005/08/27 12:36:13 ka0ttic Exp $
+###############################################################################
+
+# {{{ mime types
+mimetype.assign = (
+ ".pdf" => "application/pdf",
+ ".sig" => "application/pgp-signature",
+ ".spl" => "application/futuresplash",
+ ".class" => "application/octet-stream",
+ ".ps" => "application/postscript",
+ ".torrent" => "application/x-bittorrent",
+ ".dvi" => "application/x-dvi",
+ ".gz" => "application/x-gzip",
+ ".pac" => "application/x-ns-proxy-autoconfig",
+ ".swf" => "application/x-shockwave-flash",
+ ".tar.gz" => "application/x-tgz",
+ ".tgz" => "application/x-tgz",
+ ".tar" => "application/x-tar",
+ ".zip" => "application/zip",
+ ".mp3" => "audio/mpeg",
+ ".m3u" => "audio/x-mpegurl",
+ ".wma" => "audio/x-ms-wma",
+ ".wax" => "audio/x-ms-wax",
+ ".ogg" => "application/ogg",
+ ".wav" => "audio/x-wav",
+ ".gif" => "image/gif",
+ ".jpg" => "image/jpeg",
+ ".jpeg" => "image/jpeg",
+ ".png" => "image/png",
+ ".xbm" => "image/x-xbitmap",
+ ".xpm" => "image/x-xpixmap",
+ ".xwd" => "image/x-xwindowdump",
+ ".css" => "text/css",
+ ".html" => "text/html",
+ ".htm" => "text/html",
+ ".js" => "text/javascript",
+ ".asc" => "text/plain",
+ ".c" => "text/plain",
+ ".h" => "text/plain",
+ ".cc" => "text/plain",
+ ".cpp" => "text/plain",
+ ".hh" => "text/plain",
+ ".hpp" => "text/plain",
+ ".conf" => "text/plain",
+ ".log" => "text/plain",
+ ".text" => "text/plain",
+ ".txt" => "text/plain",
+ ".diff" => "text/plain",
+ ".patch" => "text/plain",
+ ".ebuild" => "text/plain",
+ ".eclass" => "text/plain",
+ ".rtf" => "application/rtf",
+ ".bmp" => "image/bmp",
+ ".tif" => "image/tiff",
+ ".tiff" => "image/tiff",
+ ".ico" => "image/x-icon",
+ ".dtd" => "text/xml",
+ ".xml" => "text/xml",
+ ".mpeg" => "video/mpeg",
+ ".mpg" => "video/mpeg",
+ ".mov" => "video/quicktime",
+ ".qt" => "video/quicktime",
+ ".avi" => "video/x-msvideo",
+ ".asf" => "video/x-ms-asf",
+ ".asx" => "video/x-ms-asf",
+ ".wmv" => "video/x-ms-wmv",
+ ".bz2" => "application/x-bzip",
+ ".tbz" => "application/x-bzip-compressed-tar",
+ ".tar.bz2" => "application/x-bzip-compressed-tar"
+ )
+# }}}
+
+# vim: set ft=conf foldmethod=marker et :
diff --git a/www-servers/lighttpd/files/conf/mod_cgi.conf b/www-servers/lighttpd/files/conf/mod_cgi.conf
new file mode 100644
index 00000000..1cb3770f
--- /dev/null
+++ b/www-servers/lighttpd/files/conf/mod_cgi.conf
@@ -0,0 +1,33 @@
+###############################################################################
+# mod_cgi.conf
+# include'd by lighttpd.conf.
+# $Header: /var/cvsroot/gentoo-x86/www-servers/lighttpd/files/conf/mod_cgi.conf,v 1.1 2005/08/27 12:36:13 ka0ttic Exp $
+###############################################################################
+
+#
+# see cgi.txt for more information on using mod_cgi
+#
+
+server.modules += ("mod_cgi")
+
+# NOTE: this requires mod_alias
+alias.url = (
+ "/cgi-bin/" => var.basedir + "/cgi-bin/"
+)
+
+#
+# Note that you'll also want to enable the
+# cgi-bin alias via mod_alias (above).
+#
+
+$HTTP["url"] =~ "^/cgi-bin/" {
+ # disable directory listings
+ dir-listing.activate = "disable"
+ # only allow cgi's in this directory
+ cgi.assign = (
+ ".pl" => "/usr/bin/perl",
+ ".cgi" => "/usr/bin/perl"
+ )
+}
+
+# vim: set ft=conf foldmethod=marker et :
diff --git a/www-servers/lighttpd/files/conf/mod_fastcgi.conf b/www-servers/lighttpd/files/conf/mod_fastcgi.conf
new file mode 100644
index 00000000..452e1749
--- /dev/null
+++ b/www-servers/lighttpd/files/conf/mod_fastcgi.conf
@@ -0,0 +1,18 @@
+###############################################################################
+# mod_fastcgi.conf
+# include'd by lighttpd.conf.
+# $Header: /var/cvsroot/gentoo-x86/www-servers/lighttpd/files/conf/mod_fastcgi.conf,v 1.2 2005/08/27 12:36:13 ka0ttic Exp $
+###############################################################################
+
+server.modules += ("mod_fastcgi")
+fastcgi.server = ( ".php" =>
+ ( "localhost" =>
+ (
+ "host" => "127.0.0.1",
+ "port" => 1026,
+ "bin-path" => "/usr/bin/php-cgi"
+ )
+ )
+ )
+
+# vim: set ft=conf foldmethod=marker et :
diff --git a/www-servers/lighttpd/files/conf/mod_fastcgi.conf-1.4.13-r2 b/www-servers/lighttpd/files/conf/mod_fastcgi.conf-1.4.13-r2
new file mode 100644
index 00000000..ca1369af
--- /dev/null
+++ b/www-servers/lighttpd/files/conf/mod_fastcgi.conf-1.4.13-r2
@@ -0,0 +1,17 @@
+###############################################################################
+# mod_fastcgi.conf
+# include'd by lighttpd.conf.
+# $Header: /var/cvsroot/gentoo-x86/www-servers/lighttpd/files/conf/mod_fastcgi.conf-1.4.13-r2,v 1.1 2007/04/01 23:22:00 robbat2 Exp $
+###############################################################################
+
+server.modules += ("mod_fastcgi")
+fastcgi.server = ( ".php" =>
+ ( "localhost" =>
+ (
+ "socket" => "/var/run/lighttpd/lighttpd-fastcgi-php-" + PID + ".socket",
+ "bin-path" => "/usr/bin/php-cgi"
+ )
+ )
+ )
+
+# vim: set ft=conf foldmethod=marker et :
diff --git a/www-servers/lighttpd/files/lighttpd.confd b/www-servers/lighttpd/files/lighttpd.confd
new file mode 100644
index 00000000..70d41705
--- /dev/null
+++ b/www-servers/lighttpd/files/lighttpd.confd
@@ -0,0 +1,12 @@
+# /etc/conf.d/lighttpd
+
+# Location of a shell used by the 'include_shell' directive
+# in the lighttpd's configuration file
+#export SHELL="/bin/bash"
+
+# Location of the lighttpd configuration file
+LIGHTTPD_CONF="/etc/lighttpd/lighttpd.conf"
+
+# Location of the lighttpd pid file
+LIGHTTPD_PID="/var/run/lighttpd.pid"
+
diff --git a/www-servers/lighttpd/files/lighttpd.initd b/www-servers/lighttpd/files/lighttpd.initd
new file mode 100644
index 00000000..1ce30659
--- /dev/null
+++ b/www-servers/lighttpd/files/lighttpd.initd
@@ -0,0 +1,55 @@
+#!/sbin/runscript
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/www-servers/lighttpd/files/lighttpd.initd,v 1.12 2007/10/12 20:54:46 swegener Exp $
+
+opts="depend checkconfig start stop reload"
+
+depend() {
+ need net
+ use mysql logger spawn-fcgi ldap slapd
+ after famd
+ after sshd
+}
+
+checkconfig() {
+ if [[ ! -f ${LIGHTTPD_CONF} ]] ; then
+ ewarn "${LIGHTTPD_CONF} does not exist."
+ return 1
+ fi
+
+ /usr/sbin/lighttpd -t -f ${LIGHTTPD_CONF} >/dev/null
+}
+
+start() {
+ checkconfig || return 1
+
+ ebegin "Starting lighttpd"
+ start-stop-daemon --start --quiet \
+ --background --pidfile ${LIGHTTPD_PID} \
+ --exec /usr/sbin/lighttpd -- -f ${LIGHTTPD_CONF}
+ eend $?
+}
+
+stop() {
+ local rv=0
+ ebegin "Stopping lighttpd"
+ if start-stop-daemon --stop --quiet --pidfile ${LIGHTTPD_PID} \
+ --signal 2 ; then
+ rm -f ${LIGHTTPD_PID}
+ else
+ rv=1
+ fi
+ eend $rv
+}
+
+reload() {
+ if [ ! -f ${LIGHTTPD_PID} ]; then
+ eerror "lighttpd isn't running"
+ return 1
+ fi
+ checkconfig || return 1
+ ebegin "Re-opening lighttpd log files"
+ kill -HUP `cat ${LIGHTTPD_PID}` &>/dev/null
+ eend $?
+}
diff --git a/www-servers/lighttpd/files/lighttpd.initd-1.4.13-r3 b/www-servers/lighttpd/files/lighttpd.initd-1.4.13-r3
new file mode 100644
index 00000000..80aaacc5
--- /dev/null
+++ b/www-servers/lighttpd/files/lighttpd.initd-1.4.13-r3
@@ -0,0 +1,67 @@
+#!/sbin/runscript
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/www-servers/lighttpd/files/lighttpd.initd-1.4.13-r3,v 1.2 2007/10/12 20:54:46 swegener Exp $
+
+opts="reload graceful"
+
+depend() {
+ need net
+ use mysql logger spawn-fcgi ldap slapd
+ after famd
+ after sshd
+}
+
+checkconfig() {
+ if [ ! -f "${LIGHTTPD_CONF}" ] ; then
+ ewarn "${LIGHTTPD_CONF} does not exist."
+ return 1
+ fi
+
+ /usr/sbin/lighttpd -t -f ${LIGHTTPD_CONF} >/dev/null
+}
+
+start() {
+ checkconfig || return 1
+
+ ebegin "Starting lighttpd"
+ start-stop-daemon --start --quiet --exec /usr/sbin/lighttpd \
+ --pidfile "${LIGHTTPD_PID}" -- -f "${LIGHTTPD_CONF}"
+ eend $?
+}
+
+stop() {
+ local rv=0
+ ebegin "Stopping lighttpd"
+ start-stop-daemon --stop --quiet --pidfile "${LIGHTTPD_PID}"
+ eend $?
+}
+
+reload() {
+ if ! service_started "${SVCNAME}" ; then
+ eerror "${SVCNAME} isn't running"
+ return 1
+ fi
+ checkconfig || return 1
+
+ ebegin "Re-opening lighttpd log files"
+ start-stop-daemon --stop --oknodo --quiet --pidfile "${LIGHTTPD_PID}" \
+ --signal HUP
+ eend $?
+}
+
+graceful() {
+ if ! service_started "${SVCNAME}" ; then
+ eerror "${SVCNAME} isn't running"
+ return 1
+ fi
+ checkconfig || return 1
+
+ ebegin "Gracefully stopping lighttpd"
+ start-stop-daemon --stop --oknodo --quiet --pidfile "${LIGHTTPD_PID}" \
+ --signal INT
+ if eend $? ; then
+ rm -f "${LIGHTTPD_PID}"
+ start
+ fi
+}
diff --git a/www-servers/lighttpd/files/lighttpd.logrotate b/www-servers/lighttpd/files/lighttpd.logrotate
new file mode 100644
index 00000000..76f0ef3f
--- /dev/null
+++ b/www-servers/lighttpd/files/lighttpd.logrotate
@@ -0,0 +1,17 @@
+# $Header: /var/cvsroot/gentoo-x86/www-servers/lighttpd/files/lighttpd.logrotate,v 1.2 2006/05/30 19:49:29 bangert Exp $
+# lighttpd logrotate script for Gentoo
+
+/var/log/lighttpd/*.log {
+ daily
+ missingok
+ copytruncate
+ rotate 7
+ compress
+ notifempty
+ sharedscripts
+ postrotate
+ if [ -f /var/run/lighttpd.pid ]; then \
+ /etc/init.d/lighttpd reload > /dev/null 2>&1 || true ; \
+ fi;
+ endscript
+}
diff --git a/www-servers/lighttpd/files/spawn-fcgi.confd b/www-servers/lighttpd/files/spawn-fcgi.confd
new file mode 100644
index 00000000..2a88806a
--- /dev/null
+++ b/www-servers/lighttpd/files/spawn-fcgi.confd
@@ -0,0 +1,35 @@
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/www-servers/lighttpd/files/spawn-fcgi.confd,v 1.1 2005/02/14 11:39:01 ka0ttic Exp $
+
+# Configuration file for the FCGI-Part of /etc/init.d/lighttpd
+
+## Set this to "yes" to enable SPAWNFCGI
+ENABLE_SPAWNFCGI="yes"
+
+## ABSOLUTE path to the spawn-fcgi binary
+SPAWNFCGI="/usr/bin/spawn-fcgi"
+
+## ABSOLUTE path to the PHP binary
+FCGIPROGRAM="/usr/bin/php-cgi"
+
+## bind to tcp-port on localhost
+FCGIPORT="1026"
+
+## number of PHP childs to spawn
+PHP_FCGI_CHILDREN=5
+
+## number of request server by a single php-process until is will be restarted
+PHP_FCGI_MAX_REQUESTS=1000
+
+## IP adresses where PHP should access server connections from
+FCGI_WEB_SERVER_ADDRS="127.0.0.1"
+
+# allowed environment variables sperated by spaces
+ALLOWED_ENV="PATH USER"
+# do NOT change line below
+ALLOWED_ENV="$ALLOWED_ENV PHP_FCGI_MAX_REQUESTS FCGI_WEB_SERVER_ADDRS"
+
+## if this script is run as root switch to the following user
+USERID=lighttpd
+GROUPID=lighttpd
diff --git a/www-servers/lighttpd/files/spawn-fcgi.initd b/www-servers/lighttpd/files/spawn-fcgi.initd
new file mode 100644
index 00000000..63daa750
--- /dev/null
+++ b/www-servers/lighttpd/files/spawn-fcgi.initd
@@ -0,0 +1,51 @@
+#!/sbin/runscript
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/www-servers/lighttpd/files/spawn-fcgi.initd,v 1.2 2007/04/02 12:46:08 uberlord Exp $
+
+SPAWNFCGI_PID="/var/run/spawn-fcgi.pid"
+
+depend() {
+ need net
+}
+
+start() {
+ local my_end
+
+ ebegin "Starting spawn-fcgi"
+ export PHP_FCGI_MAX_REQUESTS FCGI_WEB_SERVER_ADDRS
+
+ EX="${SPAWNFCGI} -p ${FCGIPORT} -f ${FCGIPROGRAM} -u ${USERID} \
+ -g ${GROUPID} -C ${PHP_FCGI_CHILDREN}"
+
+ # copy the allowed environment variables
+ unset E
+ for i in ${ALLOWED_ENV}; do
+ E="${E} ${i}=${!i}"
+ done
+
+ # clean environment and set up a new one
+ env - ${E} ${EX} 2>${SPAWNFCGI_PID}
+ my_end=$?
+ if [ "$my_end" != "0" ]; then
+ [ -f ${SPAWNFCGI_PID} ] && rm -f ${SPAWNFCGI_PID}
+ eend $my_end
+ fi
+
+ #extract parent-process-id and write it back to the file
+ FCGI_PPID=`cat ${SPAWNFCGI_PID} | cut -d':' -f4`
+ echo ${FCGI_PPID} > ${SPAWNFCGI_PID}
+ eend 0
+}
+
+stop() {
+ ebegin "Stopping spawn-fcgi"
+ if ! kill `cat ${SPAWNFCGI_PID}` ; then
+ eend $?
+ return 1
+ fi
+ if [ -w ${SPAWNFCGI_PID} ]; then
+ rm ${SPAWNFCGI_PID}
+ fi
+ eend 0
+}
diff --git a/www-servers/lighttpd/lighttpd-1.4.18.ebuild b/www-servers/lighttpd/lighttpd-1.4.18.ebuild
new file mode 100644
index 00000000..db153d8a
--- /dev/null
+++ b/www-servers/lighttpd/lighttpd-1.4.18.ebuild
@@ -0,0 +1,210 @@
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/www-servers/lighttpd/lighttpd-1.4.18.ebuild,v 1.6 2007/09/13 15:14:56 jer Exp $
+
+WANT_AUTOCONF=latest
+WANT_AUTOMAKE=latest
+inherit eutils autotools depend.php
+
+DESCRIPTION="Lightweight high-performance web server"
+HOMEPAGE="http://www.lighttpd.net/"
+SRC_URI="http://www.lighttpd.net/download/${P}.tar.bz2"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="alpha amd64 ~arm hppa ia64 ~mips ppc ppc64 ~sh sparc ~sparc-fbsd x86 ~x86-fbsd"
+IUSE="bzip2 doc fam fastcgi gdbm ipv6 ldap lua minimal memcache mysql pcre php rrdtool ssl test webdav xattr"
+
+RDEPEND=">=sys-libs/zlib-1.1
+ bzip2? ( app-arch/bzip2 )
+ fam? ( virtual/fam )
+ gdbm? ( sys-libs/gdbm )
+ ldap? ( >=net-nds/openldap-2.1.26 )
+ lua? ( >=dev-lang/lua-5.1 )
+ memcache? ( dev-libs/libmemcache )
+ mysql? ( >=virtual/mysql-4.0 )
+ pcre? ( >=dev-libs/libpcre-3.1 )
+ php? ( virtual/httpd-php )
+ rrdtool? ( net-analyzer/rrdtool )
+ ssl? ( >=dev-libs/openssl-0.9.7 )
+ webdav? (
+ dev-libs/libxml2
+ >=dev-db/sqlite-3
+ sys-fs/e2fsprogs
+ )
+ xattr? ( kernel_linux? ( sys-apps/attr ) )"
+
+DEPEND="${RDEPEND}
+ doc? ( dev-python/docutils )
+ test? (
+ virtual/perl-Test-Harness
+ dev-libs/fcgi
+ )"
+
+# update certain parts of lighttpd.conf based on conditionals
+update_config() {
+ local config="/etc/lighttpd/lighttpd.conf"
+
+ # enable php/mod_fastcgi settings
+ use php && \
+ dosed 's|#.*\(include.*fastcgi.*$\)|\1|' ${config}
+
+ # enable stat() caching
+ use fam && \
+ dosed 's|#\(.*stat-cache.*$\)|\1|' ${config}
+}
+
+# remove non-essential stuff (for USE=minimal)
+remove_non_essential() {
+ local libdir="${D}/usr/$(get_libdir)/${PN}"
+
+ # text docs
+ use doc || rm -fr ${D}/usr/share/doc/${PF}/txt
+
+ # non-essential modules
+ rm -f \
+ ${libdir}/mod_{compress,evhost,expire,proxy,scgi,secdownload,simple_vhost,status,setenv,trigger*,usertrack}.*
+
+ # allow users to keep some based on USE flags
+ use pcre || rm -f ${libdir}/mod_{ssi,re{direct,write}}.*
+ use webdav || rm -f ${libdir}/mod_webdav.*
+ use mysql || rm -f ${libdir}/mod_mysql_vhost.*
+ use lua || rm -f ${libdir}/mod_{cml,magnet}.*
+ use rrdtool || rm -f ${libdir}/mod_rrdtool.*
+
+ if ! use fastcgi ; then
+ rm -f ${libdir}/mod_fastcgi.* ${D}/usr/bin/spawn-fcgi \
+ ${D}/usr/share/man/man1/spawn-fcgi.*
+ fi
+}
+
+pkg_setup() {
+ if ! use pcre ; then
+ ewarn "It is highly recommended that you build ${PN}"
+ ewarn "with perl regular expressions support via USE=pcre."
+ ewarn "Otherwise you lose support for some core options such"
+ ewarn "as conditionals and modules such as mod_re{write,direct}"
+ ewarn "and mod_ssi."
+ ebeep 5
+ fi
+
+ use php && require_php_with_use cgi
+
+ enewgroup lighttpd
+ enewuser lighttpd -1 -1 /var/www/localhost/htdocs lighttpd
+}
+
+src_unpack() {
+ unpack ${A}
+ cd ${S}
+
+ EPATCH_SUFFIX="diff" EPATCH_OPTS="-l" epatch ${FILESDIR}/${PVR} || die "Patching failed!"
+
+ eautoreconf || die
+
+ # dev-python/docutils installs rst2html.py not rst2html
+ sed -i -e 's|\(rst2html\)|\1.py|g' doc/Makefile.in || \
+ die "sed doc/Makefile.in failed"
+
+ # fix typo
+ sed -i -e 's|\(output_content\)_\(type\)|\1\2|' doc/cml.txt || \
+ die "sed doc/cml.txt failed"
+}
+
+src_compile() {
+ econf --libdir=/usr/$(get_libdir)/${PN} \
+ --enable-lfs \
+ $(use_enable ipv6) \
+ $(use_with bzip2) \
+ $(use_with fam) \
+ $(use_with gdbm) \
+ $(use_with lua) \
+ $(use_with ldap) \
+ $(use_with memcache) \
+ $(use_with mysql) \
+ $(use_with pcre) \
+ $(use_with ssl openssl) \
+ $(use_with webdav webdav-props) \
+ $(use_with webdav webdav-locks) \
+ $(use_with xattr attr) \
+ || die "econf failed"
+
+ emake || die "emake failed"
+
+ if use doc ; then
+ einfo "Building HTML documentation"
+ cd doc
+ emake html || die "failed to build HTML documentation"
+ fi
+}
+
+src_install() {
+ make DESTDIR="${D}" install || die "make install failed"
+
+ # init script stuff
+ newinitd ${FILESDIR}/lighttpd.initd-1.4.13-r3 lighttpd || die
+ newconfd ${FILESDIR}/lighttpd.confd lighttpd || die
+ use fam && has_version app-admin/fam && \
+ sed -i 's/after famd/need famd/g' "${D}"/etc/init.d/lighttpd
+
+ if use php || use fastcgi ; then
+ newinitd ${FILESDIR}/spawn-fcgi.initd spawn-fcgi || die
+ newconfd ${FILESDIR}/spawn-fcgi.confd spawn-fcgi || die
+ fi
+
+ # configs
+ insinto /etc/lighttpd
+ doins ${FILESDIR}/conf/lighttpd.conf
+ doins ${FILESDIR}/conf/mime-types.conf
+ doins ${FILESDIR}/conf/mod_cgi.conf
+ newins ${FILESDIR}/conf/mod_fastcgi.conf-1.4.13-r2 mod_fastcgi.conf
+ # Secure directory for fastcgi sockets
+ keepdir /var/run/lighttpd/
+ fperms 0750 /var/run/lighttpd/
+ fowners lighttpd:lighttpd /var/run/lighttpd/
+
+ # update lighttpd.conf directives based on conditionals
+ update_config
+
+ # docs
+ dodoc AUTHORS README NEWS ChangeLog doc/*.sh
+ newdoc doc/lighttpd.conf lighttpd.conf.distrib
+
+ use doc && dohtml -r doc/*
+
+ docinto txt
+ dodoc doc/*.txt
+
+ # logrotate
+ insinto /etc/logrotate.d
+ newins ${FILESDIR}/lighttpd.logrotate lighttpd || die
+
+ keepdir /var/l{ib,og}/lighttpd /var/www/localhost/htdocs
+ fowners lighttpd:lighttpd /var/l{ib,og}/lighttpd
+ fperms 0750 /var/l{ib,og}/lighttpd
+
+ use minimal && remove_non_essential
+}
+
+pkg_postinst () {
+ echo
+ if [[ -f ${ROOT}etc/conf.d/spawn-fcgi.conf ]] ; then
+ einfo "spawn-fcgi is now included with lighttpd"
+ einfo "spawn-fcgi's init script configuration is now located"
+ einfo "at /etc/conf.d/spawn-fcgi."
+ echo
+ fi
+
+ if [[ -f ${ROOT}etc/lighttpd.conf ]] ; then
+ ewarn "As of lighttpd-1.4.1, Gentoo has a customized configuration,"
+ ewarn "which is now located in /etc/lighttpd. Please migrate your"
+ ewarn "existing configuration."
+ ebeep 5
+ fi
+
+ if use fam ; then
+ einfo "Remember to re-emerge lighttpd should you switch from"
+ einfo "app-admin/famd to app-admin/gamin or vice versa."
+ fi
+ echo
+}