rpms/lighttpd/devel lighttpd-1.4.17-defaultconf.patch, NONE, 1.1 lighttpd-1.4.17-sighup.patch, NONE, 1.1 .cvsignore, 1.20, 1.21 lighttpd.spec, 1.36, 1.37 sources, 1.20, 1.21 lighttpd-1.4.13-defaultconf.patch, 1.1, NONE

Matthias Saou (thias) fedora-extras-commits at redhat.com
Wed Sep 5 11:25:43 UTC 2007


Author: thias

Update of /cvs/extras/rpms/lighttpd/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv8726

Modified Files:
	.cvsignore lighttpd.spec sources 
Added Files:
	lighttpd-1.4.17-defaultconf.patch lighttpd-1.4.17-sighup.patch 
Removed Files:
	lighttpd-1.4.13-defaultconf.patch 
Log Message:
Update to 1.4.17.


lighttpd-1.4.17-defaultconf.patch:

--- NEW FILE lighttpd-1.4.17-defaultconf.patch ---
diff -Naupr lighttpd-1.4.17.orig/doc/lighttpd.conf lighttpd-1.4.17/doc/lighttpd.conf
--- lighttpd-1.4.17.orig/doc/lighttpd.conf	2007-08-14 21:05:57.000000000 +0200
+++ lighttpd-1.4.17/doc/lighttpd.conf	2007-09-05 13:08:33.000000000 +0200
@@ -37,7 +37,7 @@ server.modules              = (
 
 ## a static document-root, for virtual-hosting take look at the
 ## server.virtual-* options
-server.document-root        = "/srv/www/htdocs/"
+server.document-root        = "/srv/www/lighttpd/"
 
 ## where to send error-messages to
 server.errorlog             = "/var/log/lighttpd/error.log"
@@ -51,6 +51,7 @@ index-file.names            = ( "index.p
 
 # mimetype mapping
 mimetype.assign             = (
+  ".rpm"          =>      "application/x-rpm",
   ".pdf"          =>      "application/pdf",
   ".sig"          =>      "application/pgp-signature",
   ".spl"          =>      "application/futuresplash",
@@ -147,7 +148,7 @@ static-file.exclude-extensions = ( ".php
 #server.error-handler-404   = "/error-handler.php"
 
 ## to help the rc.scripts
-#server.pid-file            = "/var/run/lighttpd.pid"
+server.pid-file            = "/var/run/lighttpd.pid"
 
 
 ###### virtual hosts
@@ -186,10 +187,10 @@ static-file.exclude-extensions = ( ".php
 #server.chroot              = "/"
 
 ## change uid to <uid> (default: don't care)
-#server.username            = "wwwrun"
+server.username            = "lighttpd"
 
 ## change uid to <uid> (default: don't care)
-#server.groupname           = "wwwrun"
+server.groupname           = "lighttpd"
 
 #### compress module
 #compress.cache-dir         = "/var/cache/lighttpd/compress/"
@@ -213,7 +214,7 @@ static-file.exclude-extensions = ( ".php
 #                               ( "localhost" =>
 #                                 (
 #                                   "socket" => "/var/run/lighttpd/php-fastcgi.socket",
-#                                   "bin-path" => "/usr/local/bin/php-cgi"
+#                                   "bin-path" => "/usr/bin/php-cgi"
 #                                 )
 #                               )
 #                            )

lighttpd-1.4.17-sighup.patch:

--- NEW FILE lighttpd-1.4.17-sighup.patch ---
Index: /branches/lighttpd-1.4.x/src/server.c
===================================================================
--- /branches/lighttpd-1.4.x/src/server.c (revision 1980)
+++ /branches/lighttpd-1.4.x/src/server.c (revision 1982)
@@ -69,4 +69,5 @@
 static volatile sig_atomic_t handle_sig_alarm = 1;
 static volatile sig_atomic_t handle_sig_hup = 0;
+static volatile sig_atomic_t forwarded_sig_hup = 0;
 
 #if defined(HAVE_SIGACTION) && defined(SA_SIGINFO)
@@ -95,6 +96,17 @@
 		break;
 	case SIGHUP:
-		handle_sig_hup = 1;
-		memcpy(&last_sighup_info, si, sizeof(*si));
+		/** 
+		 * we send the SIGHUP to all procs in the process-group
+		 * this includes ourself
+		 * 
+		 * make sure we only send it once and don't create a 
+		 * infinite loop
+		 */
+		if (!forwarded_sig_hup) {
+			handle_sig_hup = 1;
+			memcpy(&last_sighup_info, si, sizeof(*si));
+		} else {
+			forwarded_sig_hup = 0;
+		}
 		break;
 	case SIGCHLD:
@@ -989,5 +1001,5 @@
 	if (num_childs > 0) {
 		int child = 0;
-		while (!child && !srv_shutdown) {
+		while (!child && !srv_shutdown && !graceful_shutdown) {
 			if (num_childs > 0) {
 				switch (fork()) {
@@ -1004,12 +1016,59 @@
 				int status;
 
-				/* ignore EINTR */
-				if (-1 != wait(&status)) num_childs++;
-			}
-		}
-		if (srv_shutdown) {
-			kill(0, SIGTERM);
-		}
-		if (!child) return 0;
+				if (-1 != wait(&status)) {
+					/** 
+					 * one of our workers went away 
+					 */
+					num_childs++;
+				} else {
+					switch (errno) {
+					case EINTR:
+						/**
+						 * if we receive a SIGHUP we have to close our logs ourself as we don't 
+						 * have the mainloop who can help us here
+						 */
+						if (handle_sig_hup) {
+							handle_sig_hup = 0;
+
+							log_error_cycle(srv);
+
+							/**
+							 * forward to all procs in the process-group
+							 * 
+							 * we also send it ourself
+							 */
+							if (!forwarded_sig_hup) {
+								forwarded_sig_hup = 1;
+								kill(0, SIGHUP);
+							}
+						}
+						break;
+					default:
+						break;
+					}
+				}
+			}
+		}
+
+		/**
+		 * for the parent this is the exit-point 
+		 */
+		if (!child) {
+			/** 
+			 * kill all children too 
+			 */
+			if (graceful_shutdown) {
+				kill(0, SIGINT);
+			} else if (srv_shutdown) {
+				kill(0, SIGTERM);
+			}
+
+			log_error_close(srv);
+			network_close(srv);
+			connections_free(srv);
+			plugins_free(srv);
+			server_free(srv);
+			return 0;
+		}
 	}
 #endif
@@ -1102,7 +1161,7 @@
 				log_error_write(srv, __FILE__, __LINE__, "sdsd", 
 					"logfiles cycled UID =",
-					last_sigterm_info.si_uid,
+					last_sighup_info.si_uid,
 					"PID =",
-					last_sigterm_info.si_pid);
+					last_sighup_info.si_pid);
 #else
 				log_error_write(srv, __FILE__, __LINE__, "s", 


Index: .cvsignore
===================================================================
RCS file: /cvs/extras/rpms/lighttpd/devel/.cvsignore,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -r1.20 -r1.21
--- .cvsignore	26 Jul 2007 08:08:02 -0000	1.20
+++ .cvsignore	5 Sep 2007 11:25:10 -0000	1.21
@@ -1 +1 @@
-lighttpd-1.4.16.tar.bz2
+lighttpd-1.4.17.tar.bz2


Index: lighttpd.spec
===================================================================
RCS file: /cvs/extras/rpms/lighttpd/devel/lighttpd.spec,v
retrieving revision 1.36
retrieving revision 1.37
diff -u -r1.36 -r1.37
--- lighttpd.spec	23 Aug 2007 10:23:42 -0000	1.36
+++ lighttpd.spec	5 Sep 2007 11:25:10 -0000	1.37
@@ -2,8 +2,8 @@
 
 Summary: Lightning fast webserver with light system requirements
 Name: lighttpd
-Version: 1.4.16
-Release: 3%{?dist}
+Version: 1.4.17
+Release: 1%{?dist}
 License: BSD
 Group: System Environment/Daemons
 URL: http://www.lighttpd.net/
@@ -15,7 +15,8 @@
 Source12: powered_by_fedora.png
 Source13: http://www.lighttpd.net/light_button.png
 Source14: http://www.lighttpd.net/light_logo.png
-Patch0: lighttpd-1.4.13-defaultconf.patch
+Patch0: lighttpd-1.4.17-defaultconf.patch
+Patch1: lighttpd-1.4.17-sighup.patch
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
 Requires(pre): /usr/sbin/useradd
 Requires(post): /sbin/chkconfig
@@ -72,6 +73,7 @@
 %prep
 %setup -q
 %patch0 -p1 -b .defaultconf
+%patch1 -p3 -b .sighup
 
 
 %build
@@ -120,6 +122,9 @@
 # Install empty log directory to include
 %{__mkdir_p} %{buildroot}%{_var}/log/lighttpd
 
+# Install empty run directory to include (for the example fastcgi socket)
+%{__mkdir_p} %{buildroot}%{_var}/run/lighttpd
+
 
 %clean
 %{__rm} -rf %{buildroot}
@@ -160,6 +165,7 @@
 %exclude %{_libdir}/lighttpd/mod_mysql_vhost.so
 %{_mandir}/man1/lighttpd.1*
 %attr(0750, lighttpd, lighttpd) %{_var}/log/lighttpd/
+%attr(0750, lighttpd, lighttpd) %{_var}/run/lighttpd/
 %{webroot}/
 
 %files mod_mysql_vhost
@@ -179,6 +185,12 @@
 
 
 %changelog
+* Wed Sep  5 2007 Matthias Saou <http://freshrpms.net/> 1.4.17-1
+- Update to 1.4.17.
+- Update defaultconf patch to match new example configuration.
+- Include patch to fix log file rotation with max-workers set (trac #902).
+- Add /var/run/lighttpd/ directory where to put fastcgi sockets.
+
 * Thu Aug 23 2007 Matthias Saou <http://freshrpms.net/> 1.4.16-3
 - Add /usr/bin/awk build requirement, used to get LIGHTTPD_VERSION_ID.
 


Index: sources
===================================================================
RCS file: /cvs/extras/rpms/lighttpd/devel/sources,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -r1.20 -r1.21
--- sources	26 Jul 2007 08:08:02 -0000	1.20
+++ sources	5 Sep 2007 11:25:10 -0000	1.21
@@ -1 +1 @@
-ea671997591f772417b7e540d325f8cc  lighttpd-1.4.16.tar.bz2
+85c99c2d6baf8ad9e38e6267efe7d9aa  lighttpd-1.4.17.tar.bz2


--- lighttpd-1.4.13-defaultconf.patch DELETED ---




More information about the scm-commits mailing list