| 1 |
# Fedora 5, 6, and 7 versions includes SELinux policy module package
|
| 2 |
# Fedora 8 and 9 versions include policy in errata selinux-policy releases
|
| 3 |
# Fedora 10 onwards include policy in standard selinux-policy releases
|
| 4 |
# RHEL 5.5 onwards will include policy in standard selinux-policy releases
|
| 5 |
%if 0%{?fedora}%{?rhel} < 5 || 0%{?fedora} > 7
|
| 6 |
%global selinux_module 0
|
| 7 |
%global selinux_types %{nil}
|
| 8 |
%global selinux_variants %{nil}
|
| 9 |
%global selinux_buildreqs %{nil}
|
| 10 |
%else
|
| 11 |
%global selinux_module 1
|
| 12 |
%global selinux_types %(%{__awk} '/^#[[:space:]]*SELINUXTYPE=/,/^[^#]/ { if ($3 == "-") printf "%s ", $2 }' /etc/selinux/config 2>/dev/null)
|
| 13 |
%global selinux_variants %([ -z "%{selinux_types}" ] && echo mls strict targeted || echo %{selinux_types})
|
| 14 |
%global selinux_buildreqs checkpolicy, selinux-policy-devel, hardlink
|
| 15 |
%endif
|
| 16 |
|
| 17 |
Name: mod_fcgid
|
| 18 |
Version: 2.3.4
|
| 19 |
Release: 2%{?dist}
|
| 20 |
Summary: FastCGI interface module for Apache 2
|
| 21 |
Group: System Environment/Daemons
|
| 22 |
License: ASL 2.0
|
| 23 |
URL: http://httpd.apache.org/mod_fcgid/
|
| 24 |
Source0: http://www.apache.org/dist/httpd/mod_fcgid/mod_fcgid-%{version}.tar.bz2
|
| 25 |
Source1: fcgid.conf
|
| 26 |
Source2: mod_fcgid-2.1-README.RPM
|
| 27 |
Source3: mod_fcgid-2.1-README.SELinux
|
| 28 |
Source10: fastcgi.te
|
| 29 |
Source11: fastcgi-2.5.te
|
| 30 |
Source12: fastcgi.fc
|
| 31 |
Patch0: mod_fcgid-2.3.4-fixconf-shellbang.patch
|
| 32 |
Patch1: mod_fcgid-2.3.4-svn827039.patch
|
| 33 |
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
| 34 |
BuildRequires: httpd-devel >= 2.0, pkgconfig
|
| 35 |
Requires: httpd-mmn = %([ -a %{_includedir}/httpd/.mmn ] && %{__cat} %{_includedir}/httpd/.mmn || echo missing)
|
| 36 |
# Make sure that selinux-policy is sufficiently up-to-date if it's installed
|
| 37 |
## FastCGI policy properly incorporated into EL 5.5 (not yet available)
|
| 38 |
#%if "%{?rhel}" == "5"
|
| 39 |
#Conflicts: selinux-policy < 2.4.6-257.el5
|
| 40 |
## No provide here because selinux-policy >= 2.4.6-203.el5 does the providing
|
| 41 |
#Obsoletes: mod_fcgid-selinux <= %{version}-%{release}
|
| 42 |
#%endif
|
| 43 |
%if "%{?fedora}" == "8"
|
| 44 |
Conflicts: selinux-policy < 3.0.8-123.fc8
|
| 45 |
%endif
|
| 46 |
%if "%{?fedora}" == "9"
|
| 47 |
Conflicts: selinux-policy < 3.3.1-107.fc9
|
| 48 |
%endif
|
| 49 |
%if "%{?fedora}" == "10"
|
| 50 |
Conflicts: selinux-policy < 3.5.13-8.fc10
|
| 51 |
%endif
|
| 52 |
|
| 53 |
%description
|
| 54 |
mod_fcgid is a binary-compatible alternative to the Apache module mod_fastcgi.
|
| 55 |
mod_fcgid has a new process management strategy, which concentrates on reducing
|
| 56 |
the number of fastcgi servers, and kicking out corrupt fastcgi servers as soon
|
| 57 |
as possible.
|
| 58 |
|
| 59 |
%if %{selinux_module}
|
| 60 |
%global selinux_policyver %(%{__sed} -e 's,.*selinux-policy-\\([^/]*\\)/.*,\\1,' /usr/share/selinux/devel/policyhelp || echo 0.0.0)
|
| 61 |
%global selinux_policynum %(echo %{selinux_policyver} | %{__awk} -F. '{ printf "%d%02d%02d", $1, $2, $3 }')
|
| 62 |
%package selinux
|
| 63 |
Summary: SELinux policy module supporting FastCGI applications with mod_fcgid
|
| 64 |
Group: System Environment/Base
|
| 65 |
BuildRequires: %{selinux_buildreqs}
|
| 66 |
# selinux-policy is required for directory ownership of %{_datadir}/selinux/*
|
| 67 |
# Modules built against one version of a policy may not work with older policy
|
| 68 |
# versions, as noted on fedora-selinux-list:
|
| 69 |
# http://www.redhat.com/archives/fedora-selinux-list/2006-May/msg00102.html
|
| 70 |
# Hence the versioned dependency. The versioning will hopefully be replaced by
|
| 71 |
# an ABI version requirement or something similar in the future
|
| 72 |
Requires: selinux-policy >= %{selinux_policyver}
|
| 73 |
Requires: %{name} = %{version}-%{release}
|
| 74 |
Requires(post): /usr/sbin/semodule, /sbin/restorecon
|
| 75 |
Requires(postun): /usr/sbin/semodule, /sbin/restorecon
|
| 76 |
|
| 77 |
%description selinux
|
| 78 |
SELinux policy module supporting FastCGI applications with mod_fcgid.
|
| 79 |
%endif
|
| 80 |
|
| 81 |
%prep
|
| 82 |
%setup -q
|
| 83 |
%{__cp} -p %{SOURCE1} fcgid.conf
|
| 84 |
%{__cp} -p %{SOURCE2} README.RPM
|
| 85 |
%{__cp} -p %{SOURCE3} README.SELinux
|
| 86 |
%if 0%{?selinux_policynum} < 20501
|
| 87 |
%{__cp} -p %{SOURCE10} fastcgi.te
|
| 88 |
%else
|
| 89 |
%{__cp} -p %{SOURCE11} fastcgi.te
|
| 90 |
%endif
|
| 91 |
%{__cp} -p %{SOURCE12} fastcgi.fc
|
| 92 |
|
| 93 |
# Fix shellbang in fixconf script for our location of sed
|
| 94 |
%patch0 -p1
|
| 95 |
|
| 96 |
# * Fix regexp in fixconf script that resulted in a prefix of "FcgidFcgid"
|
| 97 |
# on the updated directives
|
| 98 |
# * Fix possible corruption or truncation of request bodies that exceed
|
| 99 |
# FcgidMaxRequestInMem (regression since mod_fcgid 2.2, which effectively
|
| 100 |
# ignored FcgidMaxRequestInMem if larger than 8K)
|
| 101 |
# * Fix handling of the request body when a FastCGI
|
| 102 |
# access checker/authenticator/authorizer (AAA) was configured
|
| 103 |
# * Fix handling of FcgidCmdOptions so that it can apply to wrapper scripts
|
| 104 |
# that were defined with command-line arguments on the FcgidWrapper directive
|
| 105 |
%patch1 -p0
|
| 106 |
|
| 107 |
%build
|
| 108 |
APXS=/usr/sbin/apxs ./configure.apxs
|
| 109 |
%{__make}
|
| 110 |
%if %{selinux_module}
|
| 111 |
for selinuxvariant in %{selinux_variants}
|
| 112 |
do
|
| 113 |
%{__make} NAME=${selinuxvariant} -f /usr/share/selinux/devel/Makefile
|
| 114 |
%{__mv} fastcgi.pp fastcgi.pp.${selinuxvariant}
|
| 115 |
%{__make} NAME=${selinuxvariant} -f /usr/share/selinux/devel/Makefile clean
|
| 116 |
done
|
| 117 |
%endif
|
| 118 |
|
| 119 |
%install
|
| 120 |
%{__rm} -rf %{buildroot}
|
| 121 |
%{__make} DESTDIR=%{buildroot} MKINSTALLDIRS="%{__mkdir_p}" install
|
| 122 |
%{__install} -D -m 644 fcgid.conf %{buildroot}%{_sysconfdir}/httpd/conf.d/fcgid.conf
|
| 123 |
%{__install} -d -m 755 %{buildroot}%{_localstatedir}/run/mod_fcgid
|
| 124 |
|
| 125 |
# Include the manual as %doc, don't need it elsewhere
|
| 126 |
%{__rm} -rf %{buildroot}%{_var}/www/manual
|
| 127 |
|
| 128 |
# Install SELinux policy modules
|
| 129 |
%if %{selinux_module}
|
| 130 |
for selinuxvariant in %{selinux_variants}
|
| 131 |
do
|
| 132 |
%{__install} -d %{buildroot}%{_datadir}/selinux/${selinuxvariant}
|
| 133 |
%{__install} -p -m 644 fastcgi.pp.${selinuxvariant} \
|
| 134 |
%{buildroot}%{_datadir}/selinux/${selinuxvariant}/fastcgi.pp
|
| 135 |
done
|
| 136 |
# Hardlink identical policy module packages together
|
| 137 |
/usr/sbin/hardlink -cv %{buildroot}%{_datadir}/selinux
|
| 138 |
%endif
|
| 139 |
|
| 140 |
%clean
|
| 141 |
%{__rm} -rf %{buildroot}
|
| 142 |
|
| 143 |
%if %{selinux_module}
|
| 144 |
%post selinux
|
| 145 |
# Install SELinux policy modules
|
| 146 |
for selinuxvariant in %{selinux_variants}
|
| 147 |
do
|
| 148 |
/usr/sbin/semodule -s ${selinuxvariant} -i \
|
| 149 |
%{_datadir}/selinux/${selinuxvariant}/fastcgi.pp &> /dev/null || :
|
| 150 |
done
|
| 151 |
# Fix up non-standard directory context from earlier packages
|
| 152 |
/sbin/restorecon -R %{_localstatedir}/run/mod_fcgid || :
|
| 153 |
|
| 154 |
%postun selinux
|
| 155 |
# Clean up after package removal
|
| 156 |
if [ $1 -eq 0 ]; then
|
| 157 |
# Remove SELinux policy modules
|
| 158 |
for selinuxvariant in %{selinux_variants}; do
|
| 159 |
/usr/sbin/semodule -s ${selinuxvariant} -r fastcgi &> /dev/null || :
|
| 160 |
done
|
| 161 |
# Clean up any remaining file contexts (shouldn't be any really)
|
| 162 |
[ -d %{_localstatedir}/run/mod_fcgid ] && \
|
| 163 |
/sbin/restorecon -R %{_localstatedir}/run/mod_fcgid &> /dev/null || :
|
| 164 |
fi
|
| 165 |
exit 0
|
| 166 |
%endif
|
| 167 |
|
| 168 |
%files
|
| 169 |
%defattr(-,root,root,-)
|
| 170 |
# mod_fcgid.html.en is explicitly encoded as ISO-8859-1
|
| 171 |
%doc CHANGES-FCGID LICENSE-FCGID NOTICE-FCGID README-FCGID STATUS-FCGID
|
| 172 |
%doc docs/manual/mod/mod_fcgid.html.en modules/fcgid/ChangeLog
|
| 173 |
%doc build/fixconf.sed
|
| 174 |
%{_libdir}/httpd/modules/mod_fcgid.so
|
| 175 |
%config(noreplace) %{_sysconfdir}/httpd/conf.d/fcgid.conf
|
| 176 |
%dir %attr(0755,apache,apache) %{_localstatedir}/run/mod_fcgid/
|
| 177 |
|
| 178 |
%if %{selinux_module}
|
| 179 |
%files selinux
|
| 180 |
%defattr(-,root,root,-)
|
| 181 |
%doc fastcgi.fc fastcgi.te README.SELinux
|
| 182 |
%{_datadir}/selinux/*/fastcgi.pp
|
| 183 |
%endif
|
| 184 |
|
| 185 |
%changelog
|
| 186 |
* Wed Oct 21 2009 Paul Howarth <paul@city-fan.org> 2.3.4-2
|
| 187 |
- Add fixes from upstream svn for a number of issues, most notably that the
|
| 188 |
fixconf script had an error in the regexp, which resulted in a prefix of
|
| 189 |
"FcgidFcgid" on the updated directives
|
| 190 |
|
| 191 |
* Mon Oct 12 2009 Paul Howarth <paul@city-fan.org> 2.3.4-1
|
| 192 |
- Update to 2.3.4 (configuration directives changed again)
|
| 193 |
- Add fixconf.sed script for config file directives update
|
| 194 |
|
| 195 |
* Fri Sep 25 2009 Paul Howarth <paul@city-fan.org> 2.3.1-2.20090925svn818270
|
| 196 |
- Update to svn revision 818270
|
| 197 |
- DESTDIR and header detection patches upstreamed
|
| 198 |
- Build SELinux policy module for EL-5; support in EL-5.3 is incomplete and
|
| 199 |
will be fixed in EL-5.5 (#519369)
|
| 200 |
- Drop aliases httpd_sys_content_r{a,o,w}_t -> httpd_fastcgi_content_r{a,o,w}_t
|
| 201 |
from pre-2.5 SElinux policy module as these types aren't defined there
|
| 202 |
|
| 203 |
* Wed Sep 23 2009 Paul Howarth <paul@city-fan.org> 2.3.1-1.20090923svn817978
|
| 204 |
- Update to post-2.3.1 svn snapshot
|
| 205 |
- Upstream moved to apache.org
|
| 206 |
- License changed to ASL 2.0
|
| 207 |
- Use FCGID-prefixed config file options (old ones deprecated)
|
| 208 |
- Lots of documentation changes
|
| 209 |
- Renumber sources
|
| 210 |
- Don't defer to mod_fastcgi if both are present
|
| 211 |
- Drop gawk buildreq
|
| 212 |
- Add patches fixing RPM build issues (DESTDIR support, header detection)
|
| 213 |
|
| 214 |
* Sat Jul 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.2-13
|
| 215 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
|
| 216 |
|
| 217 |
* Tue May 26 2009 Paul Howarth <paul@city-fan.org> 2.2-12
|
| 218 |
- Don't use /etc/httpd/run as basis of "run" directory as its DAC permissions
|
| 219 |
are not permissive enough in F-11 onwards; instead, revert to
|
| 220 |
/var/run/mod_fcgid and tweak default config accordingly (#502273)
|
| 221 |
|
| 222 |
* Sun May 17 2009 Paul Howarth <paul@city-fan.org> 2.2-11
|
| 223 |
- Follow link /etc/httpd/run and make our "run" directory a subdir of wherever
|
| 224 |
that leads (#501123)
|
| 225 |
|
| 226 |
* Mon Apr 6 2009 Paul Howarth <paul@city-fan.org> 2.2-10
|
| 227 |
- EL 5.3 now has SELinux support in the main selinux-policy package so handle
|
| 228 |
that release as per Fedora >= 8, except that the RHEL selinux-policy package
|
| 229 |
doesn't Obsolete/Provide mod_fcgid-selinux like the Fedora version, so do
|
| 230 |
the obsoletion here instead
|
| 231 |
|
| 232 |
* Thu Feb 26 2009 Paul Howarth <paul@city-fan.org> 2.2-9
|
| 233 |
- Update documentation for MoinMoin, Rails (#476658), and SELinux
|
| 234 |
|
| 235 |
* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.2-8
|
| 236 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
|
| 237 |
|
| 238 |
* Wed Nov 12 2008 Paul Howarth <paul@city-fan.org> 2.2-7
|
| 239 |
- SELinux policy module no longer built for Fedora 8 onwards as it is
|
| 240 |
obsoleted by the main selinux-policy package
|
| 241 |
- Conflicts for selinux-policy packages older than the releases where mod_fcgid
|
| 242 |
policy was incorporated have been added for Fedora 8, 9, and 10 versions, to
|
| 243 |
ensure that SELinux support will work if installed
|
| 244 |
|
| 245 |
* Tue Oct 21 2008 Paul Howarth <paul@city-fan.org> 2.2-6
|
| 246 |
- SELinux policy module rewritten to merge fastcgi and system script domains
|
| 247 |
in preparation for merge into main selinux-policy package (#462318)
|
| 248 |
- Try to determine supported SELinux policy types by reading /etc/selinux/config
|
| 249 |
|
| 250 |
* Thu Jul 24 2008 Paul Howarth <paul@city-fan.org> 2.2-5
|
| 251 |
- Tweak selinux-policy version detection macro to work with current Rawhide
|
| 252 |
|
| 253 |
* Thu Feb 14 2008 Paul Howarth <paul@city-fan.org> 2.2-4
|
| 254 |
- Rebuild with gcc 4.3.0 for Fedora 9
|
| 255 |
|
| 256 |
* Mon Jan 14 2008 Paul Howarth <paul@city-fan.org> 2.2-3
|
| 257 |
- Update SELinux policy to fix occasional failures on restarts
|
| 258 |
(move shared memory file into /var/run/mod_fcgid directory)
|
| 259 |
|
| 260 |
* Thu Jan 3 2008 Paul Howarth <paul@city-fan.org> 2.2-2
|
| 261 |
- Update SELinux policy to support file transition to httpd_tmp_t for
|
| 262 |
temporary files
|
| 263 |
|
| 264 |
* Fri Sep 14 2007 Paul Howarth <paul@city-fan.org> 2.2-1
|
| 265 |
- Update to version 2.2
|
| 266 |
- Make sure docs are encoded as UTF-8
|
| 267 |
|
| 268 |
* Mon Sep 3 2007 Joe Orton <jorton@redhat.com> 2.1-6
|
| 269 |
- rebuild for fixed 32-bit APR (#254241)
|
| 270 |
|
| 271 |
* Thu Aug 23 2007 Paul Howarth <paul@city-fan.org> 2.1-5
|
| 272 |
- Update source URL to point to downloads.sf.net rather than dl.sf.net
|
| 273 |
- Upstream released new tarball without changing version number, though the
|
| 274 |
only change was in arch/win32/fcgid_pm_win.c, which is not used to build the
|
| 275 |
RPM package
|
| 276 |
- Clarify license as GPL (unspecified/any version)
|
| 277 |
- Unexpand tabs in spec
|
| 278 |
- Add buildreq of gawk
|
| 279 |
|
| 280 |
* Fri Aug 3 2007 Paul Howarth <paul@city-fan.org> 2.1-4
|
| 281 |
- Add buildreq of pkgconfig, a missing dependency of both apr-devel and
|
| 282 |
apr-util-devel on FC5
|
| 283 |
|
| 284 |
* Fri Jun 15 2007 Paul Howarth <paul@city-fan.org> 2.1-3
|
| 285 |
- Major update of SELinux policy, supporting accessing data on NFS/CIFS shares
|
| 286 |
and a new boolean, httpd_fastcgi_can_sendmail, to allow connections to SMTP
|
| 287 |
servers
|
| 288 |
- Fix for SELinux policy on Fedora 7, which didn't work due to changes in the
|
| 289 |
permissions macros in the underlying selinux-policy package
|
| 290 |
|
| 291 |
* Wed Mar 21 2007 Paul Howarth <paul@city-fan.org> 2.1-2
|
| 292 |
- Add RHEL5 with SELinux support
|
| 293 |
- Rename README.Fedora to README.RPM
|
| 294 |
|
| 295 |
* Fri Feb 16 2007 Paul Howarth <paul@city-fan.org> 2.1-1
|
| 296 |
- Update to 2.1
|
| 297 |
- Update documentation and patches
|
| 298 |
- Rename some source files to reduce chances of conflicting names
|
| 299 |
- Include SharememPath directive in conf file to avoid unfortunate upstream
|
| 300 |
default location
|
| 301 |
|
| 302 |
* Mon Oct 30 2006 Paul Howarth <paul@city-fan.org> 2.0-1
|
| 303 |
- Update to 2.0
|
| 304 |
- Source is now hosted at sourceforge.net
|
| 305 |
- Update docs
|
| 306 |
|
| 307 |
* Wed Sep 6 2006 Paul Howarth <paul@city-fan.org> 1.10-7
|
| 308 |
- Include the right README* files
|
| 309 |
|
| 310 |
* Tue Aug 29 2006 Paul Howarth <paul@city-fan.org> 1.10-6
|
| 311 |
- Buildreqs for FC5 now identical to buildreqs for FC6 onwards
|
| 312 |
|
| 313 |
* Fri Jul 28 2006 Paul Howarth <paul@city-fan.org> 1.10-5
|
| 314 |
- Split off SELinux module into separate subpackage to avoid dependency on
|
| 315 |
the selinux-policy package for the main package
|
| 316 |
|
| 317 |
* Fri Jul 28 2006 Paul Howarth <paul@city-fan.org> 1.10-4
|
| 318 |
- SELinux policy packages moved from %%{_datadir}/selinux/packages/POLICYNAME
|
| 319 |
to %%{_datadir}/selinux/POLICYNAME
|
| 320 |
- hardlink identical policy module packages together to avoid duplicate files
|
| 321 |
|
| 322 |
* Thu Jul 20 2006 Paul Howarth <paul@city-fan.org> 1.10-3
|
| 323 |
- Adjust buildreqs for FC6 onwards
|
| 324 |
- Figure out where top_dir is dynamically since the /etc/httpd/build
|
| 325 |
symlink is gone in FC6
|
| 326 |
|
| 327 |
* Wed Jul 5 2006 Paul Howarth <paul@city-fan.org> 1.10-2
|
| 328 |
- SELinux policy update: allow FastCGI apps to do DNS lookups
|
| 329 |
|
| 330 |
* Tue Jul 4 2006 Paul Howarth <paul@city-fan.org> 1.10-1
|
| 331 |
- Update to 1.10
|
| 332 |
- Expand tabs to shut rpmlint up
|
| 333 |
|
| 334 |
* Tue Jul 4 2006 Paul Howarth <paul@city-fan.org> 1.09-10
|
| 335 |
- SELinux policy update:
|
| 336 |
* allow httpd to read httpd_fastcgi_content_t without having the
|
| 337 |
| httpd_builtin_scripting boolean set
|
| 338 |
* allow httpd_fastcgi_script_t to read /etc/resolv.conf without
|
| 339 |
| having the httpd_can_network_connect boolean set
|
| 340 |
|
| 341 |
* Sun Jun 18 2006 Paul Howarth <paul@city-fan.org> 1.09-9
|
| 342 |
- Discard output of semodule in %%postun
|
| 343 |
- Include some documentation from upstream
|
| 344 |
|
| 345 |
* Fri Jun 9 2006 Paul Howarth <paul@city-fan.org> 1.09-8
|
| 346 |
- Change default context type for socket directory from var_run_t to
|
| 347 |
httpd_fastcgi_sock_t for better separation
|
| 348 |
|
| 349 |
* Thu Jun 8 2006 Paul Howarth <paul@city-fan.org> 1.09-7
|
| 350 |
- Add SELinux policy module and README.Fedora
|
| 351 |
- Conflict with selinux-policy versions older than what we're built on
|
| 352 |
|
| 353 |
* Mon May 15 2006 Paul Howarth <paul@city-fan.org> 1.09-6
|
| 354 |
- Instead of conflicting with mod_fastcgi, don't add the handler for .fcg etc.
|
| 355 |
if mod_fastcgi is present
|
| 356 |
|
| 357 |
* Fri May 12 2006 Paul Howarth <paul@city-fan.org> 1.09-5
|
| 358 |
- Use correct handler name in fcgid.conf
|
| 359 |
- Conflict with mod_fastcgi
|
| 360 |
- Create directory %%{_localstatedir}/run/mod_fcgid for sockets
|
| 361 |
|
| 362 |
* Thu May 11 2006 Paul Howarth <paul@city-fan.org> 1.09-4
|
| 363 |
- Cosmetic tweaks (personal preferences)
|
| 364 |
- Don't include INSTALL.TXT, nothing of use to end users
|
| 365 |
|
| 366 |
* Wed May 10 2006 Thomas Antony <thomas@antony.eu> 1.09-3
|
| 367 |
- Initial release
|