]> git.pld-linux.org Git - packages/lighttpd.git/commitdiff
drop outdated patches
authorElan Ruusamäe <glen@delfi.ee>
Sun, 16 Oct 2016 16:34:51 +0000 (19:34 +0300)
committerElan Ruusamäe <glen@delfi.ee>
Sun, 16 Oct 2016 16:35:06 +0000 (19:35 +0300)
lighttpd-modinit-before-fork.patch [deleted file]
lighttpd.spec

diff --git a/lighttpd-modinit-before-fork.patch b/lighttpd-modinit-before-fork.patch
deleted file mode 100644 (file)
index 2f2c5e5..0000000
+++ /dev/null
@@ -1,187 +0,0 @@
---- ./src/server.c     (working copy)
-+++ lighttpd-1.4.19/src/server.c       2008-09-19 17:43:33.695522751 +0300
-@@ -865,34 +865,9 @@
-               return -1;
-       }
--#ifdef HAVE_FORK
--      /* network is up, let's deamonize ourself */
--      if (srv->srvconf.dont_daemonize == 0) daemonize();
--#endif
--
-       srv->gid = getgid();
-       srv->uid = getuid();
--      /* write pid file */
--      if (pid_fd != -1) {
--              buffer_copy_long(srv->tmp_buf, getpid());
--              buffer_append_string_len(srv->tmp_buf, CONST_STR_LEN("\n"));
--              write(pid_fd, srv->tmp_buf->ptr, srv->tmp_buf->used - 1);
--              close(pid_fd);
--              pid_fd = -1;
--      }
--
--      /* Close stderr ASAP in the child process to make sure that nothing
--       * is being written to that fd which may not be valid anymore. */
--      if (-1 == log_error_open(srv)) {
--              log_error_write(srv, __FILE__, __LINE__, "s", "Opening errorlog failed. Going down.");
--
--              plugins_free(srv);
--              network_close(srv);
--              server_free(srv);
--              return -1;
--      }
--
-       if (HANDLER_GO_ON != plugins_call_set_defaults(srv)) {
-               log_error_write(srv, __FILE__, __LINE__, "s", "Configuration of plugins failed. Going down.");
-@@ -918,7 +893,86 @@
-               return -1;
-       }
-+      if (NULL == (srv->ev = fdevent_init(srv->max_fds + 1, srv->event_handler))) {
-+              log_error_write(srv, __FILE__, __LINE__,
-+                              "s", "fdevent_init failed");
-+              return -1;
-+      }
-+      /*
-+       * kqueue() is called here, select resets its internals,
-+       * all server sockets get their handlers
-+       *
-+       * */
-+      if (0 != network_register_fdevents(srv)) {
-+              plugins_free(srv);
-+              network_close(srv);
-+              server_free(srv);
-+
-+              return -1;
-+      }
-+
-+      /* might fail if user is using fam (not gamin) and famd isn't running */
-+      if (NULL == (srv->stat_cache = stat_cache_init())) {
-+              log_error_write(srv, __FILE__, __LINE__, "s",
-+                      "stat-cache could not be setup, dieing.");
-+              return -1;
-+      }
-+
-+#ifdef HAVE_FAM_H
-+      /* setup FAM */
-+      if (srv->srvconf.stat_cache_engine == STAT_CACHE_ENGINE_FAM) {
-+              if (0 != FAMOpen2(srv->stat_cache->fam, "lighttpd")) {
-+                      log_error_write(srv, __FILE__, __LINE__, "s",
-+                                       "could not open a fam connection, dieing.");
-+                      return -1;
-+              }
-+#ifdef HAVE_FAMNOEXISTS
-+              FAMNoExists(srv->stat_cache->fam);
-+#endif
-+
-+              srv->stat_cache->fam_fcce_ndx = -1;
-+              fdevent_register(srv->ev, FAMCONNECTION_GETFD(srv->stat_cache->fam), stat_cache_handle_fdevent, NULL);
-+              fdevent_event_add(srv->ev, &(srv->stat_cache->fam_fcce_ndx), FAMCONNECTION_GETFD(srv->stat_cache->fam), FDEVENT_IN);
-+      }
-+#endif
-+
-+
-+      /* get the current number of FDs */
-+      srv->cur_fds = open("/dev/null", O_RDONLY);
-+      close(srv->cur_fds);
-+
-+      for (i = 0; i < srv->srv_sockets.used; i++) {
-+              server_socket *srv_socket = srv->srv_sockets.ptr[i];
-+              if (-1 == fdevent_fcntl_set(srv->ev, srv_socket->fd)) {
-+                      log_error_write(srv, __FILE__, __LINE__, "ss", "fcntl failed:", strerror(errno));
-+                      return -1;
-+              }
-+      }
-+
-+      /* Close stderr ASAP to make sure that nothing is being written to
-+       * that fd which may not be valid anymore after forking. */
-+      if (-1 == log_error_open(srv)) {
-+              log_error_write(srv, __FILE__, __LINE__, "s", "Opening errorlog failed. Going down.");
-+
-+              plugins_free(srv);
-+              network_close(srv);
-+              server_free(srv);
-+              return -1;
-+      }
-+
-+#ifdef HAVE_FORK
-+      /* network is up, let's deamonize ourself */
-+      if (srv->srvconf.dont_daemonize == 0) daemonize();
-+#endif
-+      /* write pid file */
-+      if (pid_fd != -1) {
-+              buffer_copy_long(srv->tmp_buf, getpid());
-+              buffer_append_string_len(srv->tmp_buf, CONST_STR_LEN("\n"));
-+              write(pid_fd, srv->tmp_buf->ptr, srv->tmp_buf->used - 1);
-+              close(pid_fd);
-+              pid_fd = -1;
-+      }
- #ifdef HAVE_SIGACTION
-@@ -1042,62 +1096,6 @@
-       }
- #endif
--      if (NULL == (srv->ev = fdevent_init(srv->max_fds + 1, srv->event_handler))) {
--              log_error_write(srv, __FILE__, __LINE__,
--                              "s", "fdevent_init failed");
--              return -1;
--      }
--      /*
--       * kqueue() is called here, select resets its internals,
--       * all server sockets get their handlers
--       *
--       * */
--      if (0 != network_register_fdevents(srv)) {
--              plugins_free(srv);
--              network_close(srv);
--              server_free(srv);
--
--              return -1;
--      }
--
--      /* might fail if user is using fam (not gamin) and famd isn't running */
--      if (NULL == (srv->stat_cache = stat_cache_init())) {
--              log_error_write(srv, __FILE__, __LINE__, "s",
--                      "stat-cache could not be setup, dieing.");
--              return -1;
--      }
--
--#ifdef HAVE_FAM_H
--      /* setup FAM */
--      if (srv->srvconf.stat_cache_engine == STAT_CACHE_ENGINE_FAM) {
--              if (0 != FAMOpen2(srv->stat_cache->fam, "lighttpd")) {
--                      log_error_write(srv, __FILE__, __LINE__, "s",
--                                       "could not open a fam connection, dieing.");
--                      return -1;
--              }
--#ifdef HAVE_FAMNOEXISTS
--              FAMNoExists(srv->stat_cache->fam);
--#endif
--
--              srv->stat_cache->fam_fcce_ndx = -1;
--              fdevent_register(srv->ev, FAMCONNECTION_GETFD(srv->stat_cache->fam), stat_cache_handle_fdevent, NULL);
--              fdevent_event_add(srv->ev, &(srv->stat_cache->fam_fcce_ndx), FAMCONNECTION_GETFD(srv->stat_cache->fam), FDEVENT_IN);
--      }
--#endif
--
--
--      /* get the current number of FDs */
--      srv->cur_fds = open("/dev/null", O_RDONLY);
--      close(srv->cur_fds);
--
--      for (i = 0; i < srv->srv_sockets.used; i++) {
--              server_socket *srv_socket = srv->srv_sockets.ptr[i];
--              if (-1 == fdevent_fcntl_set(srv->ev, srv_socket->fd)) {
--                      log_error_write(srv, __FILE__, __LINE__, "ss", "fcntl failed:", strerror(errno));
--                      return -1;
--              }
--      }
--
-       /* main-loop */
-       while (!srv_shutdown) {
-               int n;
index ceabf5a991db208df603a8b128bc2aaa3a988572..e2cfcf688f64f7eca8a01f985dc1fefb2d780a4c 100644 (file)
@@ -107,11 +107,9 @@ Patch2:            %{name}-mod_h264_streaming.patch
 Patch3:                %{name}-branding.patch
 Patch6:                test-port-setup.patch
 Patch7:                env-documentroot.patch
-#Patch:                %{name}-modinit-before-fork.patch
-#Patch:                %{name}-errorlog-before-fork.patch
 URL:           http://www.lighttpd.net/
-%{?with_xattr:BuildRequires:   attr-devel}
 %{?with_geoip:BuildRequires:   GeoIP-devel}
+%{?with_xattr:BuildRequires:   attr-devel}
 BuildRequires: autoconf >= 2.57
 %if "%{pld_release}" != "ac"
 BuildRequires: automake >= 1:1.11.2
This page took 0.159578 seconds and 4 git commands to generate.