Logoj0ke.net Open Build Service > Projects > Apache:Modules > apache2-mod_fastcgi > Changes
Sign Up | Log In

Changes of Revision 3

[-] Added apache2-mod_fastcgi-CentOS_6.spec
x
 
1
@@ -0,0 +1,143 @@
2
+# $Id$
3
+# Authority: shuff
4
+# Upstream: http://fastcgi.com/fastcgi-developers
5
+
6
+%{?el4:%define _without_selinux 1}
7
+%{?el3:%define _without_selinux 1}
8
+%{?rh9:%define _without_selinux 1}
9
+%{?rh7:%define _without_selinux 1}
10
+
11
+Summary: Apache module that enables FastCGI
12
+Name: mod_fastcgi
13
+Version: 2.4.6
14
+Release: 2%{?dist}
15
+License: GPL/Apache License
16
+Group: System Environment/Daemons
17
+URL: http://www.fastcgi.com/
18
+
19
+Packager: Steve Huff <shuff@vecna.org>
20
+Vendor: Dag Apt Repository, http://dag.wieers.com/apt/
21
+
22
+Source0: http://www.fastcgi.com/dist/mod_fastcgi-%{version}.tar.bz2
23
+Source1: mod_fastcgi.te
24
+BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
25
+
26
+BuildRequires: autoconf
27
+BuildRequires: automake
28
+BuildRequires: gcc-c++
29
+BuildRequires: httpd-devel >= 2.0
30
+Requires: httpd >= 2.0
31
+
32
+%{!?_without_selinux:BuildRequires: checkpolicy, policycoreutils}
33
+
34
+%description
35
+mod_fastcgi is a module for the Apache web server, that enables
36
+FastCGI - a standards based protocol for communicating with
37
+applications that generate dynamic content for web pages.
38
+
39
+%prep
40
+%setup -n %{name}-%{version}
41
+
42
+%build
43
+cp Makefile.AP2 Makefile
44
+%{__make} top_dir="%{_libdir}/httpd"
45
+
46
+%{__cat} <<EOF >fastcgi.httpd
47
+# WARNING: this is a kludge:
48
+## The User/Group for httpd need to be set before we can load mod_fastcgi,
49
+## but /etc/httpd/conf.d/fastcgi.conf on RHEL gets loaded before
50
+## /etc/httpd/conf/httpd.conf, so we need to set them here :(
51
+## mod_fcgid does not have this bug,
52
+## but it does not handle child PHP processes appropriately per
53
+## http://serverfault.com/questions/303535/a-single-php-fastcgi-process-blocks-all-other-php-requests/305093#305093
54
+
55
+User apache
56
+Group apache
57
+
58
+LoadModule fastcgi_module modules/mod_fastcgi.so
59
+
60
+# dir for IPC socket files
61
+FastCgiIpcDir %{_localstatedir}/run/%{name}
62
+
63
+# wrap all fastcgi script calls in suexec
64
+FastCgiWrapper On
65
+
66
+# global FastCgiConfig can be overridden by FastCgiServer options in vhost config
67
+FastCgiConfig -idle-timeout 20 -maxClassProcesses 1
68
+
69
+# sample PHP config
70
+# see /usr/share/doc/mod_fastcgi-2.4.6 for php-wrapper script
71
+# don't forget to disable mod_php in /etc/httpd/conf.d/php.conf!
72
+#
73
+# to enable privilege separation, add a "SuexecUserGroup" directive
74
+# and chown the php-wrapper script and parent directory accordingly
75
+# see also http://www.brandonturner.net/blog/2009/07/fastcgi_with_php_opcode_cache/
76
+#
77
+#FastCgiServer /var/www/cgi-bin/php-wrapper
78
+#AddHandler php-fastcgi .php
79
+#Action php-fastcgi /cgi-bin/php-wrapper
80
+#AddType application/x-httpd-php .php
81
+#DirectoryIndex index.php
82
+#
83
+#<Location /cgi-bin/php-wrapper>
84
+#    Order Deny,Allow
85
+#    Deny from All
86
+#    Allow from env=REDIRECT_STATUS
87
+#    Options ExecCGI
88
+#    SetHandler fastcgi-script
89
+#</Location>
90
+EOF
91
+
92
+%{__cat} <<WRAPPER >php-wrapper
93
+#!/bin/sh
94
+
95
+PHPRC="/etc/php.ini"
96
+export PHPRC
97
+PHP_FCGI_CHILDREN=4
98
+export PHP_FCGI_CHILDREN
99
+exec /usr/bin/php-cgi
100
+WRAPPER
101
+
102
+%{__chmod} +x php-wrapper
103
+
104
+%install
105
+%{__rm} -rf %{buildroot}
106
+%{__make} install top_dir="%{_libdir}/httpd" DESTDIR="%{buildroot}"
107
+%{__install} -Dp -m0644 fastcgi.httpd %{buildroot}%{_sysconfdir}/httpd/conf.d/fastcgi.conf
108
+
109
+# make an IPC sockets dir
110
+%{__install} -d -m770 %{buildroot}%{_localstatedir}/run/%{name}
111
+
112
+### set up SELinux module if called for (adapted from munin.spec)
113
+%if %{!?_without_selinux:1}
114
+checkmodule -M -m -o %{name}.mod %{SOURCE1}
115
+semodule_package -o %{name}.pp -m %{name}.mod
116
+%{__install} -D -d -m0755 %{buildroot}%{_datadir}/selinux/targeted/
117
+%{__install} %{name}.pp %{buildroot}%{_datadir}/selinux/targeted/
118
+%endif
119
+
120
+%clean
121
+%{__rm} -rf %{buildroot}
122
+
123
+%post
124
+%if %{!?_without_selinux:1}
125
+semodule -i %{_datadir}/selinux/targeted/%{name}.pp
126
+%endif
127
+
128
+%files
129
+%defattr(-, root, root, 0755)
130
+%doc CHANGES INSTALL* README docs/ php-wrapper
131
+%config(noreplace) %{_sysconfdir}/httpd/conf.d/fastcgi.conf
132
+%{_libdir}/httpd/modules/mod_fastcgi.so
133
+%dir %attr(770,apache,apache) %{_localstatedir}/run/%{name}
134
+%attr(0644, root, root) %{_datadir}/selinux/targeted/*
135
+
136
+%changelog
137
+* Mon May 07 2012 William Horka <whorka@hmdc.harvard.edu> 2.4.6-2
138
+- Add selinux module
139
+- Remove unused log dir and add IPC socket dir
140
+- Add FastCgiWrapper, FastCgiConfig, and FastCgiWrapper to fastcgi.conf
141
+- Set httpd User and Group in fastcgi.conf so mod_fastcgi.so will load
142
+
143
+* Fri Aug 26 2011 Philip Durbin <philipdurbin@gmail.com> 2.4.6-1
144
+- Initial release, based on mod_suphp.spec
145
[-] Added apache2-mod_fastcgi-RHEL_6.spec ^
145
 
1
@@ -0,0 +1,143 @@
2
+# $Id$
3
+# Authority: shuff
4
+# Upstream: http://fastcgi.com/fastcgi-developers
5
+
6
+%{?el4:%define _without_selinux 1}
7
+%{?el3:%define _without_selinux 1}
8
+%{?rh9:%define _without_selinux 1}
9
+%{?rh7:%define _without_selinux 1}
10
+
11
+Summary: Apache module that enables FastCGI
12
+Name: mod_fastcgi
13
+Version: 2.4.6
14
+Release: 2%{?dist}
15
+License: GPL/Apache License
16
+Group: System Environment/Daemons
17
+URL: http://www.fastcgi.com/
18
+
19
+Packager: Steve Huff <shuff@vecna.org>
20
+Vendor: Dag Apt Repository, http://dag.wieers.com/apt/
21
+
22
+Source0: http://www.fastcgi.com/dist/mod_fastcgi-%{version}.tar.bz2
23
+Source1: mod_fastcgi.te
24
+BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
25
+
26
+BuildRequires: autoconf
27
+BuildRequires: automake
28
+BuildRequires: gcc-c++
29
+BuildRequires: httpd-devel >= 2.0
30
+Requires: httpd >= 2.0
31
+
32
+%{!?_without_selinux:BuildRequires: checkpolicy, policycoreutils}
33
+
34
+%description
35
+mod_fastcgi is a module for the Apache web server, that enables
36
+FastCGI - a standards based protocol for communicating with
37
+applications that generate dynamic content for web pages.
38
+
39
+%prep
40
+%setup -n %{name}-%{version}
41
+
42
+%build
43
+cp Makefile.AP2 Makefile
44
+%{__make} top_dir="%{_libdir}/httpd"
45
+
46
+%{__cat} <<EOF >fastcgi.httpd
47
+# WARNING: this is a kludge:
48
+## The User/Group for httpd need to be set before we can load mod_fastcgi,
49
+## but /etc/httpd/conf.d/fastcgi.conf on RHEL gets loaded before
50
+## /etc/httpd/conf/httpd.conf, so we need to set them here :(
51
+## mod_fcgid does not have this bug,
52
+## but it does not handle child PHP processes appropriately per
53
+## http://serverfault.com/questions/303535/a-single-php-fastcgi-process-blocks-all-other-php-requests/305093#305093
54
+
55
+User apache
56
+Group apache
57
+
58
+LoadModule fastcgi_module modules/mod_fastcgi.so
59
+
60
+# dir for IPC socket files
61
+FastCgiIpcDir %{_localstatedir}/run/%{name}
62
+
63
+# wrap all fastcgi script calls in suexec
64
+FastCgiWrapper On
65
+
66
+# global FastCgiConfig can be overridden by FastCgiServer options in vhost config
67
+FastCgiConfig -idle-timeout 20 -maxClassProcesses 1
68
+
69
+# sample PHP config
70
+# see /usr/share/doc/mod_fastcgi-2.4.6 for php-wrapper script
71
+# don't forget to disable mod_php in /etc/httpd/conf.d/php.conf!
72
+#
73
+# to enable privilege separation, add a "SuexecUserGroup" directive
74
+# and chown the php-wrapper script and parent directory accordingly
75
+# see also http://www.brandonturner.net/blog/2009/07/fastcgi_with_php_opcode_cache/
76
+#
77
+#FastCgiServer /var/www/cgi-bin/php-wrapper
78
+#AddHandler php-fastcgi .php
79
+#Action php-fastcgi /cgi-bin/php-wrapper
80
+#AddType application/x-httpd-php .php
81
+#DirectoryIndex index.php
82
+#
83
+#<Location /cgi-bin/php-wrapper>
84
+#    Order Deny,Allow
85
+#    Deny from All
86
+#    Allow from env=REDIRECT_STATUS
87
+#    Options ExecCGI
88
+#    SetHandler fastcgi-script
89
+#</Location>
90
+EOF
91
+
92
+%{__cat} <<WRAPPER >php-wrapper
93
+#!/bin/sh
94
+
95
+PHPRC="/etc/php.ini"
96
+export PHPRC
97
+PHP_FCGI_CHILDREN=4
98
+export PHP_FCGI_CHILDREN
99
+exec /usr/bin/php-cgi
100
+WRAPPER
101
+
102
+%{__chmod} +x php-wrapper
103
+
104
+%install
105
+%{__rm} -rf %{buildroot}
106
+%{__make} install top_dir="%{_libdir}/httpd" DESTDIR="%{buildroot}"
107
+%{__install} -Dp -m0644 fastcgi.httpd %{buildroot}%{_sysconfdir}/httpd/conf.d/fastcgi.conf
108
+
109
+# make an IPC sockets dir
110
+%{__install} -d -m770 %{buildroot}%{_localstatedir}/run/%{name}
111
+
112
+### set up SELinux module if called for (adapted from munin.spec)
113
+%if %{!?_without_selinux:1}
114
+checkmodule -M -m -o %{name}.mod %{SOURCE1}
115
+semodule_package -o %{name}.pp -m %{name}.mod
116
+%{__install} -D -d -m0755 %{buildroot}%{_datadir}/selinux/targeted/
117
+%{__install} %{name}.pp %{buildroot}%{_datadir}/selinux/targeted/
118
+%endif
119
+
120
+%clean
121
+%{__rm} -rf %{buildroot}
122
+
123
+%post
124
+%if %{!?_without_selinux:1}
125
+semodule -i %{_datadir}/selinux/targeted/%{name}.pp
126
+%endif
127
+
128
+%files
129
+%defattr(-, root, root, 0755)
130
+%doc CHANGES INSTALL* README docs/ php-wrapper
131
+%config(noreplace) %{_sysconfdir}/httpd/conf.d/fastcgi.conf
132
+%{_libdir}/httpd/modules/mod_fastcgi.so
133
+%dir %attr(770,apache,apache) %{_localstatedir}/run/%{name}
134
+%attr(0644, root, root) %{_datadir}/selinux/targeted/*
135
+
136
+%changelog
137
+* Mon May 07 2012 William Horka <whorka@hmdc.harvard.edu> 2.4.6-2
138
+- Add selinux module
139
+- Remove unused log dir and add IPC socket dir
140
+- Add FastCgiWrapper, FastCgiConfig, and FastCgiWrapper to fastcgi.conf
141
+- Set httpd User and Group in fastcgi.conf so mod_fastcgi.so will load
142
+
143
+* Fri Aug 26 2011 Philip Durbin <philipdurbin@gmail.com> 2.4.6-1
144
+- Initial release, based on mod_suphp.spec
145
[-] Added apache2-mod_fastcgi-SL_6.spec ^
145
 
1
@@ -0,0 +1,143 @@
2
+# $Id$
3
+# Authority: shuff
4
+# Upstream: http://fastcgi.com/fastcgi-developers
5
+
6
+%{?el4:%define _without_selinux 1}
7
+%{?el3:%define _without_selinux 1}
8
+%{?rh9:%define _without_selinux 1}
9
+%{?rh7:%define _without_selinux 1}
10
+
11
+Summary: Apache module that enables FastCGI
12
+Name: mod_fastcgi
13
+Version: 2.4.6
14
+Release: 2%{?dist}
15
+License: GPL/Apache License
16
+Group: System Environment/Daemons
17
+URL: http://www.fastcgi.com/
18
+
19
+Packager: Steve Huff <shuff@vecna.org>
20
+Vendor: Dag Apt Repository, http://dag.wieers.com/apt/
21
+
22
+Source0: http://www.fastcgi.com/dist/mod_fastcgi-%{version}.tar.bz2
23
+Source1: mod_fastcgi.te
24
+BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
25
+
26
+BuildRequires: autoconf
27
+BuildRequires: automake
28
+BuildRequires: gcc-c++
29
+BuildRequires: httpd-devel >= 2.0
30
+Requires: httpd >= 2.0
31
+
32
+%{!?_without_selinux:BuildRequires: checkpolicy, policycoreutils}
33
+
34
+%description
35
+mod_fastcgi is a module for the Apache web server, that enables
36
+FastCGI - a standards based protocol for communicating with
37
+applications that generate dynamic content for web pages.
38
+
39
+%prep
40
+%setup -n %{name}-%{version}
41
+
42
+%build
43
+cp Makefile.AP2 Makefile
44
+%{__make} top_dir="%{_libdir}/httpd"
45
+
46
+%{__cat} <<EOF >fastcgi.httpd
47
+# WARNING: this is a kludge:
48
+## The User/Group for httpd need to be set before we can load mod_fastcgi,
49
+## but /etc/httpd/conf.d/fastcgi.conf on RHEL gets loaded before
50
+## /etc/httpd/conf/httpd.conf, so we need to set them here :(
51
+## mod_fcgid does not have this bug,
52
+## but it does not handle child PHP processes appropriately per
53
+## http://serverfault.com/questions/303535/a-single-php-fastcgi-process-blocks-all-other-php-requests/305093#305093
54
+
55
+User apache
56
+Group apache
57
+
58
+LoadModule fastcgi_module modules/mod_fastcgi.so
59
+
60
+# dir for IPC socket files
61
+FastCgiIpcDir %{_localstatedir}/run/%{name}
62
+
63
+# wrap all fastcgi script calls in suexec
64
+FastCgiWrapper On
65
+
66
+# global FastCgiConfig can be overridden by FastCgiServer options in vhost config
67
+FastCgiConfig -idle-timeout 20 -maxClassProcesses 1
68
+
69
+# sample PHP config
70
+# see /usr/share/doc/mod_fastcgi-2.4.6 for php-wrapper script
71
+# don't forget to disable mod_php in /etc/httpd/conf.d/php.conf!
72
+#
73
+# to enable privilege separation, add a "SuexecUserGroup" directive
74
+# and chown the php-wrapper script and parent directory accordingly
75
+# see also http://www.brandonturner.net/blog/2009/07/fastcgi_with_php_opcode_cache/
76
+#
77
+#FastCgiServer /var/www/cgi-bin/php-wrapper
78
+#AddHandler php-fastcgi .php
79
+#Action php-fastcgi /cgi-bin/php-wrapper
80
+#AddType application/x-httpd-php .php
81
+#DirectoryIndex index.php
82
+#
83
+#<Location /cgi-bin/php-wrapper>
84
+#    Order Deny,Allow
85
+#    Deny from All
86
+#    Allow from env=REDIRECT_STATUS
87
+#    Options ExecCGI
88
+#    SetHandler fastcgi-script
89
+#</Location>
90
+EOF
91
+
92
+%{__cat} <<WRAPPER >php-wrapper
93
+#!/bin/sh
94
+
95
+PHPRC="/etc/php.ini"
96
+export PHPRC
97
+PHP_FCGI_CHILDREN=4
98
+export PHP_FCGI_CHILDREN
99
+exec /usr/bin/php-cgi
100
+WRAPPER
101
+
102
+%{__chmod} +x php-wrapper
103
+
104
+%install
105
+%{__rm} -rf %{buildroot}
106
+%{__make} install top_dir="%{_libdir}/httpd" DESTDIR="%{buildroot}"
107
+%{__install} -Dp -m0644 fastcgi.httpd %{buildroot}%{_sysconfdir}/httpd/conf.d/fastcgi.conf
108
+
109
+# make an IPC sockets dir
110
+%{__install} -d -m770 %{buildroot}%{_localstatedir}/run/%{name}
111
+
112
+### set up SELinux module if called for (adapted from munin.spec)
113
+%if %{!?_without_selinux:1}
114
+checkmodule -M -m -o %{name}.mod %{SOURCE1}
115
+semodule_package -o %{name}.pp -m %{name}.mod
116
+%{__install} -D -d -m0755 %{buildroot}%{_datadir}/selinux/targeted/
117
+%{__install} %{name}.pp %{buildroot}%{_datadir}/selinux/targeted/
118
+%endif
119
+
120
+%clean
121
+%{__rm} -rf %{buildroot}
122
+
123
+%post
124
+%if %{!?_without_selinux:1}
125
+semodule -i %{_datadir}/selinux/targeted/%{name}.pp
126
+%endif
127
+
128
+%files
129
+%defattr(-, root, root, 0755)
130
+%doc CHANGES INSTALL* README docs/ php-wrapper
131
+%config(noreplace) %{_sysconfdir}/httpd/conf.d/fastcgi.conf
132
+%{_libdir}/httpd/modules/mod_fastcgi.so
133
+%dir %attr(770,apache,apache) %{_localstatedir}/run/%{name}
134
+%attr(0644, root, root) %{_datadir}/selinux/targeted/*
135
+
136
+%changelog
137
+* Mon May 07 2012 William Horka <whorka@hmdc.harvard.edu> 2.4.6-2
138
+- Add selinux module
139
+- Remove unused log dir and add IPC socket dir
140
+- Add FastCgiWrapper, FastCgiConfig, and FastCgiWrapper to fastcgi.conf
141
+- Set httpd User and Group in fastcgi.conf so mod_fastcgi.so will load
142
+
143
+* Fri Aug 26 2011 Philip Durbin <philipdurbin@gmail.com> 2.4.6-1
144
+- Initial release, based on mod_suphp.spec
145
[+] Deleted mod_fastcgi-CentOS_6.spec ^
[+] Deleted mod_fastcgi-RHEL_6.spec ^
[+] Deleted mod_fastcgi-SL_6.spec ^