動作環境は Amazon Linux 上の httpd24 (+ httpd24-devel)を想定。
目的は--enable-fds-setsizeの値を変更したビルドを利用するため。
使用したSRPMは IUS の
php55u-5.5.12-1.ius.centos6.src.rpm
IUS のRPMとEPELのRPMを無理やり混在させているので.rpmmacrosで帳尻を合わせる。
$ cat ~/.rpmmacros
%dist .centos6
EPELのhttpd24を導入
# rpm -e apr-util apr apr-devel httpd httpd-devel httpd-tools apr-util-ldap apr-util-devel
# curl -s http://repos.fedorapeople.org/repos/jkaluza/httpd24/epel-httpd24.repo > /etc/yum.repos.d/epel-httpd24.repo
# yum install -y httpd24-httpd-devel
rpmbuildするときにPKG_CONFIG_PATHも調整が必要
export PKG_CONFIG_PATH=/opt/rh/httpd24/root/usr/lib64/pkgconfig
EPEL+IUSという特殊な組み合わせのため、試行錯誤して生まれたpatch が↓のとおり
(動的に値を取得しているところを直書きにしているのは単なる手抜き)
php55u-spec.patch
--- php55u.spec.orig 2014-05-23 07:18:03.606275541 +0000
+++ php55u.spec 2014-05-23 08:06:17.001012367 +0000
@@ -35,8 +35,8 @@
%endif
# /usr/sbin/apsx with httpd < 2.4 and defined as /usr/bin/apxs with httpd >= 2.4
-%{!?_httpd_apxs: %{expand: %%global _httpd_apxs %%{_sbindir}/apxs}}
-%{!?_httpd_mmn: %{expand: %%global _httpd_mmn %%(cat %{_includedir}/httpd/.mmn 2>/dev/null || echo missing-httpd-devel)}}
+%{!?_httpd_apxs: %{expand: %%global _httpd_apxs /opt/rh/httpd24/root/usr/bin/apxs}}
+%{!?_httpd_mmn: %{expand: %%global _httpd_mmn 20120211x86-64}}
%{!?_httpd_confdir: %{expand: %%global _httpd_confdir %%{_sysconfdir}/httpd/conf.d}}
# /etc/httpd/conf.d with httpd < 2.4 and defined as /etc/httpd/conf.modules.d with httpd >= 2.4
%{!?_httpd_modconfdir: %{expand: %%global _httpd_modconfdir %%{_sysconfdir}/httpd/conf.d}}
@@ -123,7 +123,7 @@
Patch47: php-5.4.9-phpinfo.patch
BuildRequires: bzip2-devel, curl-devel >= 7.9
-BuildRequires: httpd-devel >= 2.0.46-1, pam-devel
+BuildRequires: httpd24-httpd-devel >= 2.4, pam-devel
BuildRequires: libstdc++-devel, openssl-devel
BuildRequires: sqlite-devel >= 3.6.0
BuildRequires: zlib-devel, smtpdaemon, libedit-devel
@@ -1020,6 +1020,7 @@
ln -sf ../configure
%configure \
+ --enable-fd-setsize=32767 \
--cache-file=../config.cache \
--with-libdir=%{_lib} \
--with-config-file-path=%{_sysconfdir} \