From 6a967632cbd62456665f0293383371b58fb158e4 Mon Sep 17 00:00:00 2001 From: Bertrand Jacquin Date: Sun, 28 Sep 2008 14:48:57 +0200 Subject: Re add lighttpd brezhoneg language pack --- www-servers/lighttpd/Manifest | 17 ++ .../03_all_lighttpd-1.4.11-errorlog-pipe.diff | 179 ++++++++++++ ...04_all_lighttpd-1.4.13-deprecated-ldap-api.diff | 10 + ...9-force_lowercase_filenames_in_mod_userdir.diff | 14 + ...losing_foreign_ssl_connections-dos-taketwo.diff | 100 +++++++ .../10_all_lighttpd-1.4.18-dirlisting-sort.diff | 91 ++++++ ...ghttpd-1.4.18-dirlisting-brezhoneg-on-sort.diff | 54 ++++ www-servers/lighttpd/files/conf/lighttpd.conf | 321 +++++++++++++++++++++ www-servers/lighttpd/files/conf/mime-types.conf | 76 +++++ www-servers/lighttpd/files/conf/mod_cgi.conf | 33 +++ .../lighttpd/files/conf/mod_fastcgi.conf-1.4.13-r2 | 17 ++ www-servers/lighttpd/files/lighttpd.confd | 12 + .../lighttpd/files/lighttpd.initd-1.4.13-r3 | 67 +++++ www-servers/lighttpd/files/lighttpd.logrotate | 17 ++ www-servers/lighttpd/files/spawn-fcgi.confd | 35 +++ www-servers/lighttpd/files/spawn-fcgi.initd | 51 ++++ www-servers/lighttpd/lighttpd-1.4.19-r2.ebuild | 210 ++++++++++++++ 17 files changed, 1304 insertions(+) create mode 100644 www-servers/lighttpd/Manifest create mode 100644 www-servers/lighttpd/files/1.4.19-r2/03_all_lighttpd-1.4.11-errorlog-pipe.diff create mode 100644 www-servers/lighttpd/files/1.4.19-r2/04_all_lighttpd-1.4.13-deprecated-ldap-api.diff create mode 100644 www-servers/lighttpd/files/1.4.19-r2/05_all_lighttpd-1.4.19-force_lowercase_filenames_in_mod_userdir.diff create mode 100644 www-servers/lighttpd/files/1.4.19-r2/07_all_lighttpd-1.4.19-closing_foreign_ssl_connections-dos-taketwo.diff create mode 100644 www-servers/lighttpd/files/1.4.19-r2/10_all_lighttpd-1.4.18-dirlisting-sort.diff create mode 100644 www-servers/lighttpd/files/1.4.19-r2/11_all_lighttpd-1.4.18-dirlisting-brezhoneg-on-sort.diff create mode 100644 www-servers/lighttpd/files/conf/lighttpd.conf create mode 100644 www-servers/lighttpd/files/conf/mime-types.conf create mode 100644 www-servers/lighttpd/files/conf/mod_cgi.conf create mode 100644 www-servers/lighttpd/files/conf/mod_fastcgi.conf-1.4.13-r2 create mode 100644 www-servers/lighttpd/files/lighttpd.confd create mode 100644 www-servers/lighttpd/files/lighttpd.initd-1.4.13-r3 create mode 100644 www-servers/lighttpd/files/lighttpd.logrotate create mode 100644 www-servers/lighttpd/files/spawn-fcgi.confd create mode 100644 www-servers/lighttpd/files/spawn-fcgi.initd create mode 100644 www-servers/lighttpd/lighttpd-1.4.19-r2.ebuild (limited to 'www-servers') diff --git a/www-servers/lighttpd/Manifest b/www-servers/lighttpd/Manifest new file mode 100644 index 00000000..3c4f73ef --- /dev/null +++ b/www-servers/lighttpd/Manifest @@ -0,0 +1,17 @@ +AUX 1.4.19-r2/03_all_lighttpd-1.4.11-errorlog-pipe.diff 5267 RMD160 c23c816fcddbc99758a0426fc11f70677dbc06e9 SHA1 22e0d05d49cecb652d1250ac66de13fdf228cce4 SHA256 b37042549247ca2d83581aa3bcd1a5356c37015000711cecafda05aa6d6a15c4 +AUX 1.4.19-r2/04_all_lighttpd-1.4.13-deprecated-ldap-api.diff 502 RMD160 a10372a6cdfce349c6221f5038f2fda699f5f74e SHA1 12c39cd4ca731509256e271daf4aaac8a62e82c4 SHA256 0a7f3626e23291b3859e953bcc1762117a1585c2717adc065ccbb0ccf2f3577a +AUX 1.4.19-r2/05_all_lighttpd-1.4.19-force_lowercase_filenames_in_mod_userdir.diff 465 RMD160 570e27715c359c75459d7c967b67ca8c7c15972d SHA1 65558d8eb54e1a722c9e1983e1ab126a8466497a SHA256 81051f76e57f54ab6158300799be0351b68c4fa86d632b423268f35f41bbd0c1 +AUX 1.4.19-r2/07_all_lighttpd-1.4.19-closing_foreign_ssl_connections-dos-taketwo.diff 2948 RMD160 7cc3d41c227d7eb12204d353eec208fb9456a2b8 SHA1 0475987b269c229400b7e4527fdb98827114ae04 SHA256 3f2edba70fd5fd06e19657c14dc7b314cdec7c54bef96587ee5b50662c26c025 +AUX 1.4.19-r2/10_all_lighttpd-1.4.18-dirlisting-sort.diff 3482 RMD160 def2d4cb50973a0a4c62a68e2455ea97273ec514 SHA1 54281eb0405bb73edf9a11e606f1099b94df7bb5 SHA256 5c5cc0976d99b73bc949b10ffd6343d0a9de7aa0a4a03bf92fe071a5c3f67e80 +AUX 1.4.19-r2/11_all_lighttpd-1.4.18-dirlisting-brezhoneg-on-sort.diff 2960 RMD160 ef621718a87b32790514b639c2f5c7fd2d5e1ca9 SHA1 cf1e9eb509d150387708b76086adfc32c72d9078 SHA256 2620e3ae8bae994c3e9adfff062338f5c9482272c8ba5737216b48619c5cc743 +AUX conf/lighttpd.conf 8182 RMD160 450cf40f4ec517331f8932618a3c492cb566e4f3 SHA1 16922786a79807fa3233d1af105a99582d3486a5 SHA256 c0f6951e00d4e8c928f1799a84976ab8bb536bd59a104c13ca9d1d3661d8cebd +AUX conf/mime-types.conf 3291 RMD160 157c9a6f7d00e52c7d4118edcce8d1eb1e0a3c20 SHA1 3eec39060014e1498d3254919b10a64ca1e6ff00 SHA256 575231104d51fa1882c47021ab0aa00d615401059a6748d64453cb39aafba537 +AUX conf/mod_cgi.conf 869 RMD160 1d447bad36822657d014990128891cbdb6169468 SHA1 30066f52e469339cc8a5df8864b4cc2d9c558c3d SHA256 322656b4cfd22ca9f1f8ab160e0b932f1646622422fd49c6fc82ab416223eecf +AUX conf/mod_fastcgi.conf-1.4.13-r2 687 RMD160 f165f27a08f35c4792bd332be3a04370b69152e3 SHA1 ebb469944098a91772424a825fdd5a0464cef158 SHA256 d1adc1358b5d9e85353caa2e706bfa231d145dd59c075cdcb3f818b3cb5d722e +AUX lighttpd.confd 315 RMD160 c2d9c166a1209b853b400b5d21627f5d3f2d5216 SHA1 a09597a0d38d0b4d36a8f16f5d6fd5c4b7462b26 SHA256 94f69a173dc26610a43532474230537b9bc31ec846fb9f94cb72765f125edf87 +AUX lighttpd.initd-1.4.13-r3 1442 RMD160 17ce31a67f06f22b351ba6abfd868925eb5ad85f SHA1 58678d19bb60fd4e52a55381d9277ca472cbe805 SHA256 a4865824084d952050a1edc93bdffcbca33532d69268e13e96bb86c1a9a4bae6 +AUX lighttpd.logrotate 487 RMD160 2edb8b4abf75031af0a3b4182efb5b589dfa0d3c SHA1 24e1b048d7be5520ca5ef8ce31b55df13cc8d72b SHA256 503ee1cd454e2c0f9a212ef60dc8321893eda06ccf721ecbe94d189a09e0bc6c +AUX spawn-fcgi.confd 1076 RMD160 9468249fdedc39fa762a569622bae93f8b3481f9 SHA1 81bad945fc016275873e01e5f69838f73b275a3a SHA256 bfa452a849165f921a2febf0b06879db18c4c921f156b1452d06bb821063f768 +AUX spawn-fcgi.initd 1398 RMD160 3fd0fa41d100629e85960034237abc0866ec3d38 SHA1 9c07c9fd59ec73d5f37df109b188b8a7d691f949 SHA256 ae10c764e2bde9bfc483c57ca94a63d87c24cba00b4c06917885c533d2d245b1 +DIST lighttpd-1.4.19.tar.bz2 610347 RMD160 8731ba3efc95659a16dbb11b7298e3b539ab3c75 SHA1 fd4450e7faae55ebe0905114722995b0c57397cc SHA256 a239323239c3735a04290f7c063a14ed2c4560a88c15181c253fcd68c6c2f1d7 +EBUILD lighttpd-1.4.19-r2.ebuild 5839 RMD160 0947b4c115cc5ecbc0ec67aa4b077b70c1714d09 SHA1 9ccbbb41364d162b09e52134cbc47c72f731ffdc SHA256 373f9b64c41abce5d09af55a16218ab34ac44bedc4cc6019d034d20865db4ac4 diff --git a/www-servers/lighttpd/files/1.4.19-r2/03_all_lighttpd-1.4.11-errorlog-pipe.diff b/www-servers/lighttpd/files/1.4.19-r2/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.19-r2/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.19-r2/04_all_lighttpd-1.4.13-deprecated-ldap-api.diff b/www-servers/lighttpd/files/1.4.19-r2/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.19-r2/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.19-r2/05_all_lighttpd-1.4.19-force_lowercase_filenames_in_mod_userdir.diff b/www-servers/lighttpd/files/1.4.19-r2/05_all_lighttpd-1.4.19-force_lowercase_filenames_in_mod_userdir.diff new file mode 100644 index 00000000..9d67afd0 --- /dev/null +++ b/www-servers/lighttpd/files/1.4.19-r2/05_all_lighttpd-1.4.19-force_lowercase_filenames_in_mod_userdir.diff @@ -0,0 +1,14 @@ +--- lighttpd-1.4.19/src/mod_userdir.c 2008-03-10 22:45:29.000000000 +1100 ++++ lighty-dev/src/mod_userdir.c 2008-03-12 17:44:43.000000000 +1100 +@@ -286,6 +286,11 @@ + + BUFFER_APPEND_SLASH(p->temp_path); + buffer_append_string(p->temp_path, rel_url + 1); /* skip the / */ ++ ++ if (con->conf.force_lowercase_filenames) { ++ buffer_to_lower(p->temp_path); ++ } ++ + buffer_copy_string_buffer(con->physical.path, p->temp_path); + + buffer_reset(p->temp_path); diff --git a/www-servers/lighttpd/files/1.4.19-r2/07_all_lighttpd-1.4.19-closing_foreign_ssl_connections-dos-taketwo.diff b/www-servers/lighttpd/files/1.4.19-r2/07_all_lighttpd-1.4.19-closing_foreign_ssl_connections-dos-taketwo.diff new file mode 100644 index 00000000..d2f3801f --- /dev/null +++ b/www-servers/lighttpd/files/1.4.19-r2/07_all_lighttpd-1.4.19-closing_foreign_ssl_connections-dos-taketwo.diff @@ -0,0 +1,100 @@ +diff -r ade3eead0e8d -r 82c24356bcd0 NEWS +--- a/NEWS Fri Mar 28 16:30:14 2008 +0100 ++++ b/NEWS Fri Mar 28 17:45:28 2008 +0100 +@@ -8,6 +8,7 @@ + * added support for If-Range: (#1346) + * added support for matching $HTTP["scheme"] in configs + * fixed initgroups() called after chroot (#1384) ++ * Fix #285 again: read error after SSL_shutdown (thx marton.illes@balabit.com) and clear the error queue before some other calls + * fixed case-sensitive check for Auth-Method (#1456) + * execute fcgi app without /bin/sh if used as argument to spawn-fcgi (#1428) + * fixed a bug that made /-prefixed extensions being handled also when +diff -r ade3eead0e8d -r 82c24356bcd0 src/connections.c +--- a/src/connections.c Fri Mar 28 16:30:14 2008 +0100 ++++ b/src/connections.c Fri Mar 28 17:45:28 2008 +0100 +@@ -199,6 +199,7 @@ + + /* don't resize the buffer if we were in SSL_ERROR_WANT_* */ + ++ ERR_clear_error(); + do { + if (!con->ssl_error_want_reuse_buffer) { + b = buffer_init(); +@@ -1668,21 +1669,51 @@ + } + #ifdef USE_OPENSSL + if (srv_sock->is_ssl) { +- int ret; ++ int ret, ssl_r; ++ unsigned long err; ++ ERR_clear_error(); + switch ((ret = SSL_shutdown(con->ssl))) { + case 1: + /* ok */ + break; + case 0: +- SSL_shutdown(con->ssl); +- break; ++ ERR_clear_error(); ++ if (-1 != (ret = SSL_shutdown(con->ssl))) break; ++ ++ // fall through + default: +- log_error_write(srv, __FILE__, __LINE__, "sds", "SSL:", +- SSL_get_error(con->ssl, ret), +- ERR_error_string(ERR_get_error(), NULL)); +- return -1; ++ ++ switch ((ssl_r = SSL_get_error(con->ssl, ret))) { ++ case SSL_ERROR_WANT_WRITE: ++ case SSL_ERROR_WANT_READ: ++ break; ++ case SSL_ERROR_SYSCALL: ++ /* perhaps we have error waiting in our error-queue */ ++ if (0 != (err = ERR_get_error())) { ++ do { ++ log_error_write(srv, __FILE__, __LINE__, "sdds", "SSL:", ++ ssl_r, ret, ++ ERR_error_string(err, NULL)); ++ } while((err = ERR_get_error())); ++ } else { ++ log_error_write(srv, __FILE__, __LINE__, "sddds", "SSL (error):", ++ ssl_r, r, errno, ++ strerror(errno)); ++ } ++ ++ break; ++ default: ++ while((err = ERR_get_error())) { ++ log_error_write(srv, __FILE__, __LINE__, "sdds", "SSL:", ++ ssl_r, ret, ++ ERR_error_string(err, NULL)); ++ } ++ ++ break; ++ } + } + } ++ ERR_clear_error(); + #endif + + switch(con->mode) { +diff -r ade3eead0e8d -r 82c24356bcd0 src/network_openssl.c +--- a/src/network_openssl.c Fri Mar 28 16:30:14 2008 +0100 ++++ b/src/network_openssl.c Fri Mar 28 17:45:28 2008 +0100 +@@ -85,6 +85,7 @@ + * + */ + ++ ERR_clear_error(); + if ((r = SSL_write(ssl, offset, toSend)) <= 0) { + unsigned long err; + +@@ -187,6 +188,7 @@ + + close(ifd); + ++ ERR_clear_error(); + if ((r = SSL_write(ssl, s, toSend)) <= 0) { + unsigned long err; + diff --git a/www-servers/lighttpd/files/1.4.19-r2/10_all_lighttpd-1.4.18-dirlisting-sort.diff b/www-servers/lighttpd/files/1.4.19-r2/10_all_lighttpd-1.4.18-dirlisting-sort.diff new file mode 100644 index 00000000..f4bb6a5d --- /dev/null +++ b/www-servers/lighttpd/files/1.4.19-r2/10_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" + "\n" + ); ++ ++ BUFFER_APPEND_STRING_CONST(out, ++ "\n"); ++ + } + + BUFFER_APPEND_STRING_CONST(out, "\n\n"); +@@ -532,10 +599,10 @@ + "\n" + "" + "" +- "" +- "" +- "" +- "" ++ "" ++ "" ++ "" ++ "" + "" + "\n" + "\n" diff --git a/www-servers/lighttpd/files/1.4.19-r2/11_all_lighttpd-1.4.18-dirlisting-brezhoneg-on-sort.diff b/www-servers/lighttpd/files/1.4.19-r2/11_all_lighttpd-1.4.18-dirlisting-brezhoneg-on-sort.diff new file mode 100644 index 00000000..aa81da57 --- /dev/null +++ b/www-servers/lighttpd/files/1.4.19-r2/11_all_lighttpd-1.4.18-dirlisting-brezhoneg-on-sort.diff @@ -0,0 +1,54 @@ +--- src/mod_dirlisting.c.ori 2007-11-06 19:22:03.456537443 +0100 ++++ src/mod_dirlisting.c 2007-11-06 19:22:56.430836948 +0100 +@@ -458,7 +458,7 @@ + "\n" + "\n" + "\n" +- "Index of " ++ "<title>Taolenn verr " + ); + buffer_append_string_encoded(out, CONST_BUF_LEN(con->uri.path), ENCODING_MINIMAL_XML); + BUFFER_APPEND_STRING_CONST(out, "\n"); +@@ -591,7 +591,7 @@ + stream_close(&s); + } + +- BUFFER_APPEND_STRING_CONST(out, "

Index of "); ++ BUFFER_APPEND_STRING_CONST(out, "

Taolenn verr "); + buffer_append_string_encoded(out, CONST_BUF_LEN(con->uri.path), ENCODING_MINIMAL_XML); + BUFFER_APPEND_STRING_CONST(out, + "

\n" +@@ -599,18 +599,18 @@ + "
NameLast ModifiedSizeTypeName Last Modified Size Type
\n" + "" + "" +- "" +- "" +- "" +- "" ++ "" ++ "" ++ "" ++ "" + "" + "\n" + "\n" + "" +- "" ++ "" + "" + "" +- "" ++ "" + "\n" + ); + } +@@ -835,7 +835,7 @@ + buffer_append_string_encoded(out, DIRLIST_ENT_NAME(tmp), tmp->namelen, ENCODING_MINIMAL_XML); + BUFFER_APPEND_STRING_CONST(out, "/\n"); ++ BUFFER_APPEND_STRING_CONST(out, "\n"); + + free(tmp); + } 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: .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-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-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.19-r2.ebuild b/www-servers/lighttpd/lighttpd-1.4.19-r2.ebuild new file mode 100644 index 00000000..75b726c0 --- /dev/null +++ b/www-servers/lighttpd/lighttpd-1.4.19-r2.ebuild @@ -0,0 +1,210 @@ +# Copyright 1999-2008 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/www-servers/lighttpd/lighttpd-1.4.19-r2.ebuild,v 1.7 2008/04/20 21:13:10 vapier 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 +} -- cgit v1.2.3
Name Last Modified Size Type Anv Kemm da ziwezhañ Brasentez Benaos
Parent Directory/Dreist/ -  DirectoryRoll Skridoù
"); + buffer_append_string_len(out, datebuf, sizeof(datebuf) - 1); +- BUFFER_APPEND_STRING_CONST(out, "-  Directory
-  Roll Skridoù