Author: baggins                      Date: Sat Dec  4 19:56:57 2010 GMT
Module: packages                      Tag: HEAD
---- Log message:
- fix problems with apache graceful restarts, see
  http://code.google.com/p/phusion-passenger/issues/detail?id=569

---- Files affected:
packages/apache-mod_rails:
   apache-mod_rails.spec (1.13 -> 1.14) , apache-mod_rails-graceful.patch (NONE 
-> 1.1)  (NEW)

---- Diffs:

================================================================
Index: packages/apache-mod_rails/apache-mod_rails.spec
diff -u packages/apache-mod_rails/apache-mod_rails.spec:1.13 
packages/apache-mod_rails/apache-mod_rails.spec:1.14
--- packages/apache-mod_rails/apache-mod_rails.spec:1.13        Thu Dec  2 
20:00:58 2010
+++ packages/apache-mod_rails/apache-mod_rails.spec     Sat Dec  4 20:56:52 2010
@@ -15,13 +15,14 @@
 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
@@ -72,6 +73,7 @@
 %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
@@ -171,6 +173,10 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.14  2010/12/04 19:56:52  baggins
+- fix problems with apache graceful restarts, see
+  http://code.google.com/p/phusion-passenger/issues/detail?id=569
+
 Revision 1.13  2010/12/02 19:00:58  baggins
 - fix BR
 - no need to separately build docs

================================================================
Index: packages/apache-mod_rails/apache-mod_rails-graceful.patch
diff -u /dev/null packages/apache-mod_rails/apache-mod_rails-graceful.patch:1.1
--- /dev/null   Sat Dec  4 20:56:58 2010
+++ packages/apache-mod_rails/apache-mod_rails-graceful.patch   Sat Dec  4 
20:56:52 2010
@@ -0,0 +1,36 @@
+commit b83292413d860dec09ff14bf329e47a67ba30466
+Author: Hongli Lai <[email protected]>
+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:
================================================================

---- CVS-web:
    
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/apache-mod_rails/apache-mod_rails.spec?r1=1.13&r2=1.14&f=u

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to