我目前正在尝试生成一个修补过的 apache2 2.4.3 的 RPM 包
我修改了存档提供的 httpd.spec,以使用 APR 的 SVN 版本(CentOS 不提供 1.4 版):
%build
# forcibly prevent use of bundled apr, apr-util, pcre
rm -rf srclib/{apr,apr-util,pcre}
svn co http://svn.apache.org/repos/asf/apr/apr/trunk srclib/apr
./buildconf
%configure \
--enable-layout=RPM \
--libdir=%{_libdir} \
--sysconfdir=%{_sysconfdir}/httpd/conf \
--includedir=%{_includedir}/httpd \
--libexecdir=%{_libdir}/httpd/modules \
--datadir=%{contentdir} \
--with-installbuilddir=%{_libdir}/httpd/build \
--enable-mpms-shared=all \
--with-included-apr \
--enable-suexec --with-suexec \
--with-suexec-caller=%{suexec_caller} \
--with-suexec-docroot=%{contentdir} \
--with-suexec-logfile=%{_localstatedir}/log/httpd/suexec.log \
--with-suexec-bin=%{_sbindir}/suexec \
--with-suexec-uidmin=500 --with-suexec-gidmin=100 \
--enable-pie \
--with-pcre \
--with-libxml2 \
--enable-mods-shared=all \
--enable-ssl --with-ssl --enable-socache-dc --enable-bucketeer \
--enable-case-filter --enable-case-filter-in \
--enable-session-crypto --with-crypto \
--enable-ldap --enable-authnz-ldap --with-ldap \
--disable-imagemap
重要的部分是:
--with-included-apr \
--enable-ldap --enable-authnz-ldap --with-ldap \
当我生成包时:
rpmbuild -ba ~/rpmbuild/SPECS/httpd.spec
我收到以下错误:
checking for ldap support in apr/apr-util... no
configure: WARNING: apr/apr-util is compiled without ldap support
checking whether to enable mod_authnz_ldap... configure: error: mod_authnz_ldap has been requested but can not be built due to prerequisite failures
--with-ldap
我在邮件列表中找到了一些答案,这些答案说明了实际存在的缺失选项。