diff --git a/.cvsignore b/.cvsignore index 772f798..c771bb1 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -mod_fcgid.2.0.tar.gz +mod_fcgid.2.1.tar.gz diff --git a/configuration.htm b/configuration.htm index 9090493..774334c 100644 --- a/configuration.htm +++ b/configuration.htm @@ -1,156 +1,238 @@ + - - - - -The mod_fcgid Home Page + + + + The mod_fcgid Home Page - - -

This is a for regular fastcgi. 

LoadModule fcgid_module -modules/mod_fcgid.so

-<Location /fcgid>
-    SetHandler fcgid-script
-    Options ExecCGI
-    allow from all
-</Location>

-  +

This is a for regular fastcgi. 

+

LoadModule fcgid_module modules/mod_fcgid.so

+

<Location /fcgid>
+    SetHandler fcgid-script
+    Options ExecCGI
+    allow from all
+</Location>

+

  +


-

This is for suEXEC. Please get more information about suEXEC here

LoadModule fcgid_module -modules/mod_fcgid.so

-<Location /fcgid>
-    SetHandler fcgid-script
-    Options ExecCGI
-    allow from all
-</Location>

-<VirtualHost 192.168.1.89>
-    ServerAdmin webmaster@host.foo.com
-
    DocumentRoot /usr/local/apache2/htdocs/
-    ServerName host.foo.com
-    SuexecUserGroup pqf pqf
-</VirtualHost>

-  +

This is for suEXEC. Please get more +information about suEXEC here

+

LoadModule fcgid_module modules/mod_fcgid.so

+

<Location /fcgid>
+    SetHandler fcgid-script
+    Options ExecCGI
+    allow from all
+</Location>

+

<VirtualHost 192.168.1.89>
+    ServerAdmin webmaster@host.foo.com
+
    DocumentRoot /usr/local/apache2/htdocs/
+    ServerName host.foo.com
+    SuexecUserGroup pqf pqf
+</VirtualHost>

+

  +


-

This is for fastcgi-mode PHP (UNIX)

LoadModule fcgid_module modules/mod_fcgid.so

-<Directory /usr/local/apache2/htdocs/php>
-    SetHandler fcgid-script
-    FCGIWrapper /usr/local/bin/php .php
-    Options ExecCGI
-    allow from all
-</Directory>

This works too:

LoadModule fcgid_module -modules/mod_fcgid.so 

-AddHandler fcgid-script .php
-<Directory /usr/local/apache2/htdocs/php>
-    FCGIWrapper /usr/local/bin/php .php
-    Options ExecCGI
-    allow from all
-</Directory>

# Please make sure:
-# php is configured with --enable-fastcgi option
-# check error_log(with debug level), if -any thing goes wrong
+

This is for fastcgi-mode PHP (UNIX)

+

LoadModule fcgid_module modules/mod_fcgid.so

+

<Directory /usr/local/apache2/htdocs/php>
+    SetHandler fcgid-script
+    FCGIWrapper /usr/local/bin/php .php +

+

   # You need mod_fcgid +version >= 2.1 to support arguments in FCGIWrapper, if you want
+   # FCGIWrapper "/usr/local/bin/php -c /etc/" .php

+    Options ExecCGI
+

    allow from all
+</Directory>

+

This works too:

+

LoadModule fcgid_module modules/mod_fcgid.so 

+

AddHandler fcgid-script .php
+<Directory /usr/local/apache2/htdocs/php>
+    FCGIWrapper /usr/local/bin/php .php

+

    # You need mod_fcgid version >= 2.1 to +support arguments in FCGIWrapper, if you want
+   # FCGIWrapper "/usr/local/bin/php -c /etc/" .php

+

    Options ExecCGI
+    allow from all
+</Directory>

+

# Please make sure:
+# php is configured with --enable-fastcgi option
+# check error_log(with debug level), if any thing goes wrong

+


-

This is for suPHP  ( UNIX ) -

LoadModule fcgid_module modules/mod_fcgid.so
+

This is for fastcgi-mode Ruby on Rails ( Thank Andre Nathan giving +me this demo configuration )
+

+LoadModule fcgid_module modules/mod_fcgid.so
+SocketPath /tmp/fcgidsock
+SharememPath /tmp/fcgidshm
+DefaultInitEnv RAILS_ENV production

-<VirtualHost *:80>
-    ServerName test2.example.com
-    DocumentRoot /usr/local/apache2/htdocs/test2.example.com/
-    SuexecUserGroup pqf pqf
-</VirtualHost>
+<Directory /home/sneakymustard/tumble/public>
+    Options ExecCGI FollowSymLinks
+    AllowOverride AuthConfig Indexes Limit
+    Order allow,deny
+    Allow from all

-<Directory /usr/local/apache2/htdocs/test2.example.com/>
-    AddHandler fcgid-script .php
-    Options ExecCGI
-    allow from all
-    FCGIWrapper /usr/local/apache2/htdocs/test2.example.com/php .php
-</Directory>

-

- -# Please make sure:
-# php is configured with --enable-fastcgi option
-# copy php execution to /usr/local/apache2/htdocs/test2.example.com/ directory
-# make sure all files in /usr/local/apache2/htdocs/test2.example.com/ with right -owner and group
-# check error_log(with debug level) and suexec_log, if -any thing goes wrong
+    AddHandler fcgid-script .fcgi

+

    # You need +mod_fcgid version >= 2.1 to support arguments "xxx/dispatch.fcgi" in +FCGIWrapper
+
    FCGIWrapper "/usr/bin/ruby +/home/sneakymustard/tumble/public/dispatch.fcgi" .fcgi

- +    RewriteEngine On
+    RewriteRule ^$ index.html [QSA]
+    RewriteRule ^([^.]+)$ $1.html [QSA]
+    RewriteCond %{REQUEST_FILENAME} !-f
+    RewriteRule ^(.*)$ dispatch.fcgi [QSA,L]
+</Directory>
+
+

+ +

+
+

This is for suPHP  ( UNIX )

+

LoadModule fcgid_module modules/mod_fcgid.so
+
+<VirtualHost *:80>
+    ServerName test2.example.com
+    DocumentRoot +/usr/local/apache2/htdocs/test2.example.com/
+    SuexecUserGroup pqf pqf
+</VirtualHost>
+
+<Directory /usr/local/apache2/htdocs/test2.example.com/>
+    AddHandler fcgid-script .php
+    Options ExecCGI
+    allow from all
+    FCGIWrapper +/usr/local/apache2/htdocs/test2.example.com/php .php

+

+

    # You need mod_fcgid version >= 2.1 to +support arguments in FCGIWrapper, if you want
+   # FCGIWrapper "/usr/local/bin/php -c /etc/" .php

+

</Directory>

+

# Please make sure:
+# php is configured with --enable-fastcgi option
+# copy php execution to /usr/local/apache2/htdocs/test2.example.com/ +directory
+# make sure all files in /usr/local/apache2/htdocs/test2.example.com/ +with right owner and group
+# check error_log(with debug level) and suexec_log, if any thing goes +wrong

+



-This is for fastcgi-mode PHP ( Windows )

LoadModule fcgid_module modules/mod_fcgid.so

-<Directory "C:/Apache2/htdocs/php/">
-    SetHandler fcgid-script
-    Options execCGI
-    AllowOverride None
-    Order allow,deny
-    Allow from all
-    FCGIWrapper "c:/php/php.exe" .php
-</Directory>

This works too:

LoadModule fcgid_module modules/mod_fcgid.so 

-AddHandler fcgid-script .php
-<Directory "C:/Apache2/htdocs/php/">
-    FCGIWrapper "c:/php/php.exe" .php
-    Options ExecCGI
-    allow from all
+This is for fastcgi-mode PHP ( Windows ) +

+

LoadModule fcgid_module modules/mod_fcgid.so
+DefaultInitEnv PHPRC "c:/php/"
+DefaultInitEnv PATH +"c:/php;C:/WINDOWS/system32;C:/WINDOWS;C:/WINDOWS/System32/Wbem;"
+DefaultInitEnv SystemRoot "C:/Windows"
+DefaultInitEnv SystemDrive "C:"
+DefaultInitEnv TEMP "C:/WINDOWS/TEMP"
+DefaultInitEnv TMP "C:/WINDOWS/TEMP"
+DefaultInitEnv windir "C:/WINDOWS"
+<Directory "C:/Apache2/htdocs/php/">
+    SetHandler fcgid-script
+    Options execCGI
+    AllowOverride None
+    Order allow,deny
+    Allow from all
+    FCGIWrapper "c:/php/php.exe" .php

+

    # You need mod_fcgid version >= 2.1 to +support arguments in FCGIWrapper, if you want
+   # FCGIWrapper "/usr/local/bin/php -c /etc/" .php

+</Directory>

+

This works too: +

+

LoadModule fcgid_module modules/mod_fcgid.so
+DefaultInitEnv PHPRC "c:/php/"
+DefaultInitEnv PATH +"c:/php;C:/WINDOWS/system32;C:/WINDOWS;C:/WINDOWS/System32/Wbem;"
+DefaultInitEnv SystemRoot "C:/Windows"
+DefaultInitEnv SystemDrive "C:"
+DefaultInitEnv TEMP "C:/WINDOWS/TEMP"
+DefaultInitEnv TMP "C:/WINDOWS/TEMP"
+DefaultInitEnv windir "C:/WINDOWS"
+AddHandler fcgid-script .php
+<Directory "C:/Apache2/htdocs/php/">
+    FCGIWrapper "c:/php/php.exe" .php

+

    # You need mod_fcgid version >= 2.1 to +support arguments in FCGIWrapper, if you want
+   # FCGIWrapper "/usr/local/bin/php -c /etc/" .php
+

+

     +Options ExecCGI
+    allow from all
</Directory>
- -


-

This is for Authenticator

-

LoadModule fcgid_module modules/mod_fcgid.so -

<Location /fcgid>
- SetHandler fcgid-script
- Options ExecCGI
- allow from all
- AuthType Basic
- AuthName ProtectedRealm
- FastCgiAuthenticator /some/path/authenticator
- require valid-user
-</Location>

-

Another configuration: FastCgiAuthenticatorAuthoritative -(default On)

-

Setting the FastCgiAuthenticatorAuthoritative directive -explicitly to Off allows authentication to be passed on to lower level -modules

-
-

This is for Authorizer

- +

This is for Authenticator

LoadModule fcgid_module modules/mod_fcgid.so -

<Location /fcgid>
- SetHandler fcgid-script
- Options ExecCGI
- allow from all
- AuthType Basic
- AuthName ProtectedRealm
- FastCgiAuthorizer /some/place/Authorizer
-</Location>

- -

Another configuration: FastCgiAuthorizerAuthoritative -(default On)

- -

Setting the FastCgiAuthorizerAuthoritative directive explicitly -to Off allows authorization to be passed on to lower level modules

- -
-

This is for AccessChecker

-

LoadModule fcgid_module modules/mod_fcgid.so -

<Location /fcgid>
- SetHandler fcgid-script
- Options ExecCGI
- allow from all
- FastCgiAccessChecker /some/place/access-checker
-</Location>

-

Another configuration: FastCgiAccessCheckerAuthoritative +

<Location /fcgid>
+SetHandler fcgid-script
+Options ExecCGI
+allow from all
+AuthType Basic
+AuthName ProtectedRealm
+FastCgiAuthenticator /some/path/authenticator
+require valid-user
+</Location>
+

+

Another configuration: FastCgiAuthenticatorAuthoritative (default On)

-

Setting the FastCgiAccessCheckerAuthoritative directive -explicitly to Off allows access checking to be passed on to lower level -modules

-

 

-

 

- +

Setting the FastCgiAuthenticatorAuthoritative +directive explicitly to Off allows authentication to be +passed on to lower level modules

+
+

This is for Authorizer

+

LoadModule fcgid_module modules/mod_fcgid.so +

+

<Location /fcgid>
+SetHandler fcgid-script
+Options ExecCGI
+allow from all
+AuthType Basic
+AuthName ProtectedRealm
+FastCgiAuthorizer /some/place/Authorizer
+</Location>

+

Another configuration: FastCgiAuthorizerAuthoritative +(default On)

+

Setting the FastCgiAuthorizerAuthoritative directive +explicitly to Off allows authorization to be passed on to +lower level modules

+
+

This is for AccessChecker

+

LoadModule fcgid_module modules/mod_fcgid.so +

+

<Location /fcgid>
+SetHandler fcgid-script
+Options ExecCGI
+allow from all
+FastCgiAccessChecker /some/place/access-checker
+</Location>
+

+

Another configuration: FastCgiAccessCheckerAuthoritative +(default On)

+

Setting the FastCgiAccessCheckerAuthoritative +directive explicitly to Off allows access checking to be +passed on to lower level modules

+

 

+

 

 

 

 

@@ -171,7 +253,5 @@ modules

 

 

 

- - diff --git a/doc.htm b/doc.htm index 2966dc5..51b1c1a 100644 --- a/doc.htm +++ b/doc.htm @@ -1,113 +1,210 @@ - - + - - -The mod_fcgid Home Page - - - + The mod_fcgid Home Page + - - - - - - - - + + + - - - +

+ + +
- -  - - - - - -
- -Home
-Chinese Info
-Download (source)
-Documentations
- - -Feedback - - -
- -
    -
  • - -

    Here are some examples of configuration

    -
  • -
- -

Configuration for Regular fastcgi -(non-PHP, non-Ruby, non-Python) 

Configuration -for suEXEC fastcgi

Configuration for PHP -(UNIX)

Configuration for suPHP (UNIX)

Configuration -for PHP (Windows)

Configuration -for Authenticator

Configuration -for Authorizer

Configuration -for AccessChecker

  -


-
    -
  • There are +

  + + + + + + +
Home
+ Chinese Info
+ Download (source)
+ Documentations
+ Feedback
+ Support This Project
+
+
    +
  • +

    Here are some examples of configuration

    +
  • +
+

Configuration +for Regular fastcgi +(non-PHP, non-Ruby, non-Python) 

+

Configuration +for suEXEC fastcgi

+

Configuration for PHP +(UNIX)
+

+

Configuration for Ruby on +Rails
+

+

Configuration for suPHP +(UNIX)

+

Configuration +for PHP (Windows)

+

Configuration +for Authenticator

+

Configuration +for Authorizer

+

Configuration +for AccessChecker

+

 

+
+
    +
  • +

    There are some other configurations you can set

    -
  • -
-

IdleTimeout n (300 -seconds)

An idle fastcgi application will be terminated after IdleTimeout -seconds.

IdleScanInterval n (120 seconds)

The scan interval for idle -fastcgi applications.

BusyTimeout n (300 seconds)

a fastcgi -application will be terminated if handing a single request longer than busy -timeout.

BusyScanInterval n (120 seconds)

The scan interval for busy -timeout fastcgi applications.

ErrorScanInterval n (3 seconds)

The -scan interval for exit pending fastcgi applications. fastcgi applications will -be terminated within this scanning.

ZombieScanInterval n (3 seconds)

The -scan interval for zombie process. 

ProcessLifeTime n (3600 seconds)

A -fastcgi application will be terminated if lifetime expired, even no error is -detected.

SocketPath path (logs/fcgidsock)

The directory to put the -UNIX domain socket. (UNIX only)

SpawnScoreUpLimit n (10)

The -spawn-speed control score up water limit. Score increases while a process is spawned or terminated, and decreases -as time progresses; while the score is higher than SpawnScoreUpLimit, the spawning will be -held for a while. The higher this number is, the higher speed of the spawning -can be.

SpawnScore n (1)

The weight of spawning.  This weight -will be plused to the spawn-control score on every spawn. The higher this number -is, the lower speed of spawning can be.

TerminationScore n (2)

The -weight of termination. This weight will be plused to the score while fastcgi -process terminates. The higher this number is, the lower speed of spawning can -be.

MaxProcessCount n (1000)

The max count of total fastcgi process -count.

DefaultMaxClassProcessCount n (100)

The maximum number of -fastcgi application instances allowed to run for any one fastcgi application. 

DefaultMinClassProcessCount n -(3)

The minimum number of -fastcgi application instances for any one fastcgi application. 

DefaultInitEnv  -env_name env_value

The default environment variables before a fastcgi + + +

IdleTimeout n (300 +seconds)

+

An idle fastcgi application will be terminated after +IdleTimeout +seconds.

+

IdleScanInterval n (120 seconds)

+

The scan interval for idle +fastcgi applications.

+

BusyTimeout n (300 seconds)

+

a fastcgi +application will be terminated if handing a single request longer than +busy +timeout.

+

BusyScanInterval n (120 seconds)

+

The scan interval for busy +timeout fastcgi applications.

+

ErrorScanInterval n (3 seconds)

+

The +scan interval for exit pending fastcgi applications. fastcgi +applications will +be terminated within this scanning.

+

ZombieScanInterval n (3 seconds)

+

The +scan interval for zombie process. 

+

ProcessLifeTime n (3600 seconds)

+

A +fastcgi application will be terminated if lifetime expired, even no +error is +detected.

+

SocketPath path (logs/fcgidsock)

+

The directory to put the +UNIX domain socket. (UNIX only)
+

+

SharememPath path +(logs/fcgid_shm)
+

+

The share memory file path. (UNIX only) (version >= 2.1 +only)
+

+

SpawnScoreUpLimit n (10)

+

The +spawn-speed control score up water limit. Score increases while a +process is spawned or terminated, and decreases +as time progresses; while the score is higher than SpawnScoreUpLimit, +the spawning will be +held for a while. The higher this number is, the higher speed of the +spawning +can be.

+

SpawnScore n (1)

+

The weight of spawning.  This weight +will be plused to the spawn-control score on every spawn. The higher +this number +is, the lower speed of spawning can be.

+

TerminationScore n (2)

+

The +weight of termination. This weight will be plused to the score while +fastcgi +process terminates. The higher this number is, the lower speed of +spawning can +be.

+

MaxProcessCount n (1000)

+

The max count of total fastcgi process +count.

+

DefaultMaxClassProcessCount n (100)

+

The maximum number of +fastcgi application instances allowed to run for any one fastcgi +application. 

+

DefaultMinClassProcessCount n +(3)

+

The minimum number of +fastcgi application instances for any one fastcgi application. 

+

DefaultInitEnv  +env_name env_value

+

The default environment variables before a fastcgi application is spawned. You can set this configuration more -than once.

IPCConnectTimeout n (3 seconds)

The connect timeout to a -fastcgi application. 

IPCCommTimeout n (20 seconds)

The communication -timeout to a fastcgi application. Please increase this value if your CGI have a -slow initialization or slow respond.

OutputBufferSize n (64k bytes)

CGI -output cache buffer size.

PHP_Fix_Pathinfo_Enable n(n=0/1, default 0)

If +than once.
+

+ + + + + + +
Note: If you get:
+
Can't create TCP/IP +socket (10106) error while running PHP script(on Win32 only), you will have to set +these(Please modify the values if +necessary):
+ DefaultInitEnv PHPRC "c:/php/"
+DefaultInitEnv PATH +"c:/php;C:/WINDOWS/system32;C:/WINDOWS;C:/WINDOWS/System32/Wbem;"
+DefaultInitEnv SystemRoot "C:/Windows"
+DefaultInitEnv SystemDrive "C:"
+DefaultInitEnv TEMP "C:/WINDOWS/TEMP"
+DefaultInitEnv TMP "C:/WINDOWS/TEMP"
+DefaultInitEnv windir "C:/WINDOWS"
+
+(Thank Steffen of apachelounge.com for this note)
+
+
+


+

+

IPCConnectTimeout n (3 seconds)

+

The connect timeout to a +fastcgi application. 

+

IPCCommTimeout n (20 seconds)

+

The communication +timeout to a fastcgi application. Please increase this value if your +CGI have a +slow initialization or slow respond.

+

OutputBufferSize n (64k bytes)

+

CGI +output cache buffer size.

+

PHP_Fix_Pathinfo_Enable n(n=0/1, default 0)

+

If you are using PHP and set cgi.fix_pathinfo=1 in php.ini, set -PHP_Fix_Pathinfo_Enable 1.

MaxRequestsPerProcess n (-1)

(Added in -version 1.11, patch from Robert L Mathews)

Adds a MaxRequestsPerProcess parameter that allows mod_fcgid to -exit after handling a certain number of requests, similar to the existing ProcessLifeTime option. 

This solves a problem with PHP in FastCGI mode. By default, PHP stops -accepting new FastCGI connections after handling 500 requests; unfortunately, there is a potential race condition during the PHP cleanup code in which -PHP can be shutting down but still have the socket open, so mod_fcgid under heavy load can send request number 501 to PHP and have it "accepted", but then -PHP appears to simply exit, causing errors.

If you are using PHP, you should -set it to 500. -1 mean fastcgi process will not exit no matter how many requests +PHP_Fix_Pathinfo_Enable 1.

+

MaxRequestsPerProcess n (-1)

+

(Added in +version 1.11, patch from Robert L Mathews)

+

Adds a MaxRequestsPerProcess parameter that allows mod_fcgid +to +exit after handling a certain number of requests, similar to the +existing ProcessLifeTime option. 

+

This solves a problem with PHP in FastCGI mode. By default, +PHP stops +accepting new FastCGI connections after handling 500 requests; +unfortunately, there is a potential race condition during the PHP +cleanup code in which +PHP can be shutting down but still have the socket open, so mod_fcgid +under heavy load can send request number 501 to PHP and have it +"accepted", but then +PHP appears to simply exit, causing errors.

+

If you are using PHP, you should +set it to 500. -1 mean fastcgi process will not exit no matter how many +requests it has handled.
- -

- - + + diff --git a/fcgid.conf b/fcgid.conf index 8bf626b..0981b9c 100644 --- a/fcgid.conf +++ b/fcgid.conf @@ -11,5 +11,6 @@ LoadModule fcgid_module modules/mod_fcgid.so AddHandler fcgid-script fcg fcgi fpl -# Sane place to put sockets +# Sane place to put sockets and shared memory file SocketPath run/mod_fcgid +SharememPath run/fcgid_shm diff --git a/README.Fedora b/mod_fcgid-2.1-README.Fedora similarity index 100% rename from README.Fedora rename to mod_fcgid-2.1-README.Fedora diff --git a/README.SELinux b/mod_fcgid-2.1-README.SELinux similarity index 100% rename from README.SELinux rename to mod_fcgid-2.1-README.SELinux diff --git a/mod_fcgid.1.09-docurls.patch b/mod_fcgid.1.09-docurls.patch deleted file mode 100644 index 18494a1..0000000 --- a/mod_fcgid.1.09-docurls.patch +++ /dev/null @@ -1,21 +0,0 @@ ---- mod_fcgid.1.09/directives.htm 2006-06-18 09:27:53.000000000 +0100 -+++ mod_fcgid.1.09/directives.htm 2006-06-18 09:29:02.000000000 +0100 -@@ -27,13 +27,13 @@ - - - --Home
--Chinese Info
--Download (source)
--Documentations
-+Home
-+Chinese Info
-+Download (source)
-+Documentations
- - --Feedback -+Feedback - - - diff --git a/mod_fcgid.2.1-docurls.patch b/mod_fcgid.2.1-docurls.patch new file mode 100644 index 0000000..a192ad4 --- /dev/null +++ b/mod_fcgid.2.1-docurls.patch @@ -0,0 +1,17 @@ +--- mod_fcgid.2.1/directives.htm 2007-02-16 03:40:23.000000000 +0000 ++++ mod_fcgid.2.1/directives.htm 2007-02-16 10:45:44.000000000 +0000 +@@ -14,10 +14,10 @@ + + Home
+- Chinese Info
+- Download (source)
+- Documentations
+- Feedback
++ Chinese Info
++ Download (source)
++ Documentations
++ Feedback
+ = 2.0 Requires: httpd-mmn = %([ -a %{_includedir}/httpd/.mmn ] && %{__cat} %{_includedir}/httpd/.mmn || echo missing) @@ -38,9 +38,9 @@ as possible. %if %{selinux_module} %define selinux_policyver %(sed -e 's,.*selinux-policy-\\([^/]*\\)/.*,\\1,' /usr/share/selinux/devel/policyhelp) %package selinux -Summary: SELinux policy module supporting FastCGI applications with mod_fcgid -Group: System Environment/Base -BuildRequires: %{selinux_buildreqs} +Summary: SELinux policy module supporting FastCGI applications with mod_fcgid +Group: System Environment/Base +BuildRequires: %{selinux_buildreqs} # selinux-policy is required for directory ownership of %{_datadir}/selinux/* # Modules built against one version of a policy may not work with older policy # versions, as noted on fedora-selinux-list: @@ -48,9 +48,9 @@ BuildRequires: %{selinux_buildreqs} # Hence the versioned dependency. The versioning will hopefully be replaced by # an ABI version requirement or something similar in the future %if "%{selinux_policyver}" != "" -Requires: selinux-policy >= %{selinux_policyver} +Requires: selinux-policy >= %{selinux_policyver} %endif -Requires: %{name} = %{version}-%{release} +Requires: %{name} = %{version}-%{release} Requires(post): /usr/sbin/semodule, /sbin/restorecon Requires(postun): /usr/sbin/semodule, /sbin/restorecon @@ -60,8 +60,13 @@ SELinux policy module supporting FastCGI applications with mod_fcgid. %prep %setup -q -n mod_fcgid.%{version} -%{__cp} -p %{SOURCE2} %{SOURCE3} %{SOURCE4} %{SOURCE6} %{SOURCE7} . +%{__cp} -p %{SOURCE1} fcgid.conf +%{__cp} -p %{SOURCE2} fastcgi.te +%{__cp} -p %{SOURCE3} fastcgi.fc +%{__cp} -p %{SOURCE4} README.Fedora %{__cp} -p %{SOURCE5} directives.htm +%{__cp} -p %{SOURCE6} configuration.htm +%{__cp} -p %{SOURCE7} README.SELinux %patch0 -p1 %{__sed} -i -e 's/\r$//' directives.htm configuration.htm @@ -71,9 +76,9 @@ topdir=$(/usr/bin/dirname $(/usr/sbin/apxs -q exp_installbuilddir)) %if %{selinux_module} for selinuxvariant in %{selinux_variants} do - %{__make} NAME=${selinuxvariant} -f /usr/share/selinux/devel/Makefile - %{__mv} fastcgi.pp fastcgi.pp.${selinuxvariant} - %{__make} NAME=${selinuxvariant} -f /usr/share/selinux/devel/Makefile clean + %{__make} NAME=${selinuxvariant} -f /usr/share/selinux/devel/Makefile + %{__mv} fastcgi.pp fastcgi.pp.${selinuxvariant} + %{__make} NAME=${selinuxvariant} -f /usr/share/selinux/devel/Makefile clean done %endif @@ -81,20 +86,20 @@ done %{__rm} -rf %{buildroot} topdir=$(/usr/bin/dirname $(/usr/sbin/apxs -q exp_installbuilddir)) %{__make} \ - top_dir=${topdir} \ - DESTDIR=%{buildroot} \ - MKINSTALLDIRS="%{__mkdir_p}" \ - install -%{__install} -D -m 644 %{SOURCE1} %{buildroot}%{_sysconfdir}/httpd/conf.d/fcgid.conf + top_dir=${topdir} \ + DESTDIR=%{buildroot} \ + MKINSTALLDIRS="%{__mkdir_p}" \ + install +%{__install} -D -m 644 fcgid.conf %{buildroot}%{_sysconfdir}/httpd/conf.d/fcgid.conf %{__install} -d -m 755 %{buildroot}%{_localstatedir}/run/mod_fcgid # Install SELinux policy modules %if %{selinux_module} for selinuxvariant in %{selinux_variants} do - %{__install} -d %{buildroot}%{_datadir}/selinux/${selinuxvariant} - %{__install} -p -m 644 fastcgi.pp.${selinuxvariant} \ - %{buildroot}%{_datadir}/selinux/${selinuxvariant}/fastcgi.pp + %{__install} -d %{buildroot}%{_datadir}/selinux/${selinuxvariant} + %{__install} -p -m 644 fastcgi.pp.${selinuxvariant} \ + %{buildroot}%{_datadir}/selinux/${selinuxvariant}/fastcgi.pp done # Hardlink identical policy module packages together /usr/sbin/hardlink -cv %{buildroot}%{_datadir}/selinux @@ -129,7 +134,7 @@ fi %endif %files -%defattr(-,root,root,0755) +%defattr(-,root,root,-) %doc ChangeLog AUTHOR COPYING configuration.htm directives.htm %doc README.Fedora %{_libdir}/httpd/modules/mod_fcgid.so @@ -138,12 +143,19 @@ fi %if %{selinux_module} %files selinux -%defattr(-,root,root,0755) +%defattr(-,root,root,-) %doc fastcgi.fc fastcgi.te README.SELinux %{_datadir}/selinux/*/fastcgi.pp %endif %changelog +* Fri Feb 16 2007 Paul Howarth 2.1-1 +- Update to 2.1 +- Update documentation and patches +- Rename some source files to reduce chances of conflicting names +- Include SharememPath directive in conf file to avoid unfortunate upstream + default location + * Mon Oct 30 2006 Paul Howarth 2.0-1 - Update to 2.0 - Source is now hosted at sourceforge.net diff --git a/sources b/sources index ff83b31..fd27e84 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -3aa51f1e293e6d881028295a23021dae mod_fcgid.2.0.tar.gz +68a6479e398a20577334f16a8b06c418 mod_fcgid.2.1.tar.gz