]> git.pld-linux.org Git - packages/passenger.git/commitdiff
- fix problems with apache graceful restarts, see
authorJan Rękorajski <baggins@pld-linux.org>
Sat, 4 Dec 2010 19:56:52 +0000 (19:56 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
  http://code.google.com/p/phusion-passenger/issues/detail?id=569

Changed files:
    apache-mod_rails-graceful.patch -> 1.1
    apache-mod_rails.spec -> 1.14

apache-mod_rails-graceful.patch [new file with mode: 0644]
apache-mod_rails.spec

diff --git a/apache-mod_rails-graceful.patch b/apache-mod_rails-graceful.patch
new file mode 100644 (file)
index 0000000..e5168bb
--- /dev/null
@@ -0,0 +1,36 @@
+commit b83292413d860dec09ff14bf329e47a67ba30466
+Author: Hongli Lai <hongli@phusion.nl>
+Date:   Fri Nov 12 11:39:44 2010 +0100
+
+    Apparently we can't always rely on 'struct dirent'->d_type for checking whether a directory entry is a directory, so fallback to normal stat() check in case it fails.
+
+diff --git a/ext/common/ServerInstanceDir.h b/ext/common/ServerInstanceDir.h
+index b21f68c..64a17a8 100644
+--- a/ext/common/ServerInstanceDir.h
++++ b/ext/common/ServerInstanceDir.h
+@@ -221,14 +221,18 @@ private:
+       }
+       
+       bool isDirectory(const string &dir, struct dirent *entry) const {
+-              #ifdef __sun__
+-                      string path = dir;
+-                      path.append("/");
+-                      path.append(entry->d_name);
+-                      return getFileType(path) == FT_DIRECTORY;
+-              #else
+-                      return entry->d_type == DT_DIR;
++              #ifdef DT_DIR
++                      if (entry->d_type == DT_DIR) {
++                              return true;
++                      } else if (entry->d_type != DT_UNKNOWN) {
++                              return false;
++                      }
++                      // If DT_UNKNOWN, use normal check.
+               #endif
++              string path = dir;
++              path.append("/");
++              path.append(entry->d_name);
++              return getFileType(path) == FT_DIRECTORY;
+       }
+       
+ public:
index 78c786586d1b9f623413ddcead17a0d2092a1d67..bb3a9a8ac493a88888c6356875adca840dd8b7dc 100644 (file)
 Summary:       A module to bridge Ruby on Rails to Apache
 Name:          apache-mod_rails
 Version:       3.0.0
-Release:       1
+Release:       1.1
 License:       Apache
 Group:         Networking/Daemons/HTTP
 Source0:       http://rubygems.org/downloads/passenger-%{version}.gem
 # Source0-md5: 1135431e5e655fb1e1173757827b0d9d
 Source1:       %{name}.conf
-Patch1:                %{name}-nogems.patch
+Patch0:                %{name}-nogems.patch
+Patch1:                %{name}-graceful.patch
 URL:           http://www.modrails.com
 BuildRequires: apache-base >= 2.0.55-1
 BuildRequires: apache-devel >= 2.0.55-1
@@ -71,6 +72,7 @@ Dokumentacji w formacie ri dla %{pkgname}.
 %setup -q -c
 %{__tar} xf %{SOURCE0} -O data.tar.gz | %{__tar} xz
 find -newer README -o -print | xargs touch --reference %{SOURCE0}
+%patch0 -p1
 %patch1 -p1
 
 # TODO : ugly method - but works
This page took 0.036953 seconds and 4 git commands to generate.