%define groupid 65026 %define userid 65026 %define nobodygroupid 65013 %define nobodyuserid 65013 Name: apache Version: 2.2.22 Release: 1mamba Epoch: 1 Summary: The Apache webserver Group: System/Servers Vendor: openmamba Distribution: openmamba Packager: Silvan Calarco URL: http://httpd.apache.org Source0: http://www.apache.org/dist/httpd/httpd-%{version}.tar.bz2 Source1: httpd-initscript Source2: httpd-sysconfig Source3: httpd-logrotate Source4: httpd-update_httpdconf.sh License: Apache License 2.0 ## AUTOBUILDREQ-BEGIN BuildRequires: glibc-devel BuildRequires: libapr-devel BuildRequires: libdb47-devel BuildRequires: libe2fs-devel BuildRequires: libexpat-devel BuildRequires: libgdbm-devel BuildRequires: libmysql5-devel BuildRequires: libopenldap-devel BuildRequires: libopenssl-devel BuildRequires: libpcre-devel BuildRequires: libpostgresql-devel BuildRequires: libsasl-devel BuildRequires: libsqlite-devel BuildRequires: libz-devel BuildRequires: perl-devel ## AUTOBUILDREQ-END BuildRequires: libdistcache-devel Provides: httpd = %{?epoch:%epoch:}%{version}-%{release} Obsoletes: apache-source BuildRoot: %{_tmppath}/%{name}-%{version}-root %description Apache is a powerful, full-featured, efficient, and freely-available Web server. Apache is also the most popular Web server on the Internet. The Apache/Perl integration project brings together the full power of the Perl programming language and the Apache HTTP server. %package devel Group: Development/Libraries Summary: Module development tools for apache Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release} Provides: httpd-devel = %{?epoch:%epoch:}%{version}-%{release} %description -n apache-devel The apache-devel package contains the APXS binary and other files that you need to build Dynamic Shared Objects (DSOs) for Apache. If you are installing the Apache Web server and you want to be able to compile or develop additional modules for Apache, you need to install this package. %package manual Summary: The apache Manual Group: Documentation Provides: httpd-manual = %{?epoch:%epoch:}%{version}-%{release} %description -n apache-manual This package contains the apache server documentation in HTML format. %package source Summary: The apache sources Group: Development/Applications Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release} Requires: %{name}-devel = %{?epoch:%epoch:}%{version}-%{release} Provides: httpd-source = %{?epoch:%epoch:}%{version}-%{release} %description -n apache-source This package contains the apache server sources, to be used to build modules. %package mod_suexec Group: Applications/Security Summary: Apache module for launching a CGI script as another user Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release} %description mod_suexec Apache module for launching a CGI script as another user. %debug_package %prep %setup -q -n httpd-%{version} cat >> config.layout << _EOF prefix: %{_prefix} exec_prefix: %{_prefix} bindir: %{_bindir} sbindir: %{_sbindir} libdir: %{_libdir} libexecdir: %{_libdir}/apache mandir: %{_mandir} sysconfdir: %{_sysconfdir}/httpd/ datadir: /var/www installbuilddir: /usr/lib/apache/build errordir: /var/www/error iconsdir: /var/www/icons htdocsdir: /var/www/html manualdir: /var/www/manual cgidir: /var/www/cgi-bin includedir: %{_includedir}/apache localstatedir: /var runtimedir: /var/run/httpd logfiledir: /var/log/httpd proxycachedir: /var/cache/httpd _EOF %build %configure \ --datadir=/var/www \ --includedir=%{_includedir}/apache \ --libexecdir=%{_libdir}/apache \ --sysconfdir=%{_sysconfdir}/httpd/ \ --enable-layout=OPENMAMBA \ --enable-so \ --enable-modules=all \ --enable-mods-shared=all \ --enable-authn-file=shared \ --enable-authn_dbm=shared \ --enable-authn_anon=shared \ --enable-authn_dbd=shared \ --enable-authn_default=shared \ --enable-authn_alias=shared \ --enable-authz_host=shared \ --enable-authz_groupfile=shared \ --enable-authz_user=shared \ --enable-authz_dbm=shared \ --enable-authz_owner=shared \ --enable-authnz_ldap=shared \ --enable-auth_digest=shared \ --enable-alias=shared \ --enable-file-cache=shared \ --enable-cache=shared \ --enable-disk-cache=shared \ --enable-mem-cache=shared \ --enable-dbd=shared \ --enable-bucketeer=shared \ --enable-dumpio=shared \ --enable-echo=shared \ --enable-case_filter=shared \ --enable-case-filter-in=shared \ --enable-ext-filter=shared \ --enable-include=shared \ --enable-charset-lite=shared \ --enable-deflate=shared \ --enable-ldap=shared \ --enable-log_config=shared \ --enable-log-forensic=shared \ --enable-logio=shared \ --enable-env=shared \ --enable-mime-magic=shared \ --enable-cern-meta=shared \ --enable-expires=shared \ --enable-headers=shared \ --enable-ident=shared \ --enable-usertrack=shared \ --enable-unique-id=shared \ --enable-setenvif=shared \ --enable-proxy=shared \ --enable-proxy-connect=shared \ --enable-proxy-ftp=shared \ --enable-proxy-http=shared \ --enable-proxy-ajp=shared \ --enable-proxy-balancer=shared \ --enable-ssl=shared \ --enable-optional-hook-export=shared \ --enable-optional-hook-import=shared \ --enable-optional-fn-import=shared \ --enable-optional-fn-export=shared \ --enable-mime=shared \ --enable-dav=shared \ --enable-status=shared \ --enable-autoindex=shared \ --enable-asis=shared \ --enable-info=shared \ --enable-cgid=shared \ --enable-cgi=shared \ --enable-dav-fs=shared \ --enable-dav-lock=shared \ --enable-vhost-alias=shared \ --enable-negotiation=shared \ --enable-dir=shared \ --enable-imagemap=shared \ --enable-actions=shared \ --enable-speling=shared \ --enable-userdir=shared \ --enable-alias=shared \ --enable-rewrite=shared \ --enable-suexec=shared \ --disable-example \ --enable-distcache \ --enable-http=yes \ --with-z=%{_prefix} \ --with-ssl=%{_prefix} \ --with-pcre=%{_prefix} # Win32 module: --enable-isapi %make %install [ "%{buildroot}" != / ] && rm -rf "%{buildroot}" %makeinstall install -d %{buildroot}%{_libdir}/apache/build install -d %{buildroot}/var/log/httpd install -d %{buildroot}/var/run/httpd #mv %{buildroot}/var/www/build/* %{buildroot}%{_libdir}/apache/build/ install -p -D -m 0755 %{S:1} %{buildroot}%{_initrddir}/httpd install -p -D -m 0644 %{S:2} %{buildroot}%{_sysconfdir}/sysconfig/httpd # logrotate stuff install -D -m 0644 %{S:3} %{buildroot}%{_sysconfdir}/logrotate.d/httpd # create void log files > %{buildroot}/var/log/httpd/access_log > %{buildroot}/var/log/httpd/error_log %make clean # modify configuration file sed -i "\ s|^User .*|User apache|;\ s|^Group .*|Group nobody|;\ s|#\(AddHandler cgi-script .cgi\)|\1|;\ s|\(LoadModule suexec_module.*\)|#\1|" \ %{buildroot}%{_sysconfdir}/httpd/httpd.conf # modify SSL configuration file sed -i "\ s|logs/|/var/log/httpd/|;\ s|you@example.com|webmaster@`hostname -d`|;\ s|/etc/httpd/.*/server.crt|/var/ssl/certs/localhost.crt|;\ s|/etc/httpd/.*/server.key|/var/ssl/private/localhost.key|;\ s|/usr/htdocs|/var/www/html|" \ %{buildroot}%{_sysconfdir}/httpd/extra/httpd-ssl.conf sed -i "s|^\(#Include .*httpd-ssl.conf\)|\1|" \ %{buildroot}%{_sysconfdir}/httpd/httpd.conf # add httpd.d configuration dir install -d %{buildroot}%{_sysconfdir}/httpd/httpd.d echo " Include %{_sysconfdir}/httpd/httpd.d/*.conf" >> \ %{buildroot}%{_sysconfdir}/httpd/httpd.conf # install httpd.conf conversion tool install -m 0755 %{S:4} %{buildroot}%{_sbindir}/update_httpdconf %clean [ "%{buildroot}" != / ] && rm -rf "%{buildroot}" %pre if [ $1 -ge 1 ]; then /usr/sbin/groupadd apache -g %{groupid} 2>/dev/null /usr/sbin/useradd -u %{userid} -c 'Apache user' -d /dev/null -g apache \ -s /bin/false apache 2>/dev/null /usr/sbin/groupadd nobody -g %{nobodygroupid} 2>/dev/null /usr/sbin/useradd -c nobody -u %{nobodyuserid} -d /dev/null -g nobody \ -s /bin/false nobody 2>/dev/null fi exit 0 %post # new install if [ $1 -eq 1 ]; then # do configuration stuff sed -i "s|^ServerAdmin .*|ServerAdmin webmaster@`hostname -d`|" \ %{_sysconfdir}/httpd/httpd.conf if [ -d %{_sysconfdir}/qmail ]; then install -d %{_sysconfdir}/qmail/alias/ echo "root" > %{_sysconfdir}/qmail/alias/.qmail-webmaster fi /sbin/chkconfig --add httpd fi if [ $1 -eq 2 ]; then # update grep "httpd\.d" %{_sysconfdir}/httpd/httpd.conf >/dev/null || \ echo " Include %{_sysconfdir}/httpd/httpd.d/*.conf" >> %{_sysconfdir}/httpd/httpd.conf fi /sbin/ldconfig exit 0 %preun if [ $1 -eq 0 ]; then /sbin/chkconfig --del httpd service httpd stop 2>/dev/null /usr/sbin/groupdel apache 2>/dev/null /usr/sbin/userdel apache 2>/dev/null fi exit 0 %postun if [ $1 -eq 1 ]; then service httpd condrestart fi /sbin/ldconfig exit 0 %posttrans %{_sbindir}/update_httpdconf exit 0 %post mod_suexec if [ $1 -eq 1 ]; then #install apxs -e -a -n suexec %{_libdir}/apache/mod_suexec.so test -e /var/lock/subsys/httpd && %{_initrddir}/httpd reload fi exit 0 %preun mod_suexec if [ $1 -eq 0 ]; then #erase apxs -e -A -n suexec %{_libdir}/apache/mod_suexec.so fi exit 0 %postun mod_suexec if [ $1 -eq 1 ]; then #upgrade test -e /var/lock/subsys/httpd && %{_initrddir}/httpd reload fi exit 0 %files %defattr(-,root,root) %{_sbindir}/ab %{_sbindir}/apachectl %{_sbindir}/apxs %{_sbindir}/checkgid %{_sbindir}/dbmmanage %{_sbindir}/envvars %{_sbindir}/htdbm %{_sbindir}/htdigest %{_sbindir}/htpasswd %{_sbindir}/httpd %{_sbindir}/logresolve %{_sbindir}/rotatelogs %{_sbindir}/htcacheclean %{_sbindir}/httxt2dbm %{_sbindir}/update_httpdconf %dir %{_sysconfdir}/httpd %dir %{_sysconfdir}/httpd/extra %dir %{_sysconfdir}/httpd/original %{_sysconfdir}/httpd/extra/* %{_sysconfdir}/httpd/original/* %config(noreplace) %{_sysconfdir}/httpd/httpd.conf %config(noreplace) %{_sysconfdir}/httpd/magic %config(noreplace) %{_sysconfdir}/httpd/mime.types %config(noreplace) %{_sysconfdir}/sysconfig/httpd %config(noreplace) %{_sysconfdir}/logrotate.d/httpd %dir %{_sysconfdir}/httpd/httpd.d %{_initrddir}/httpd %dir %{_libdir}/apache %{_libdir}/apache/httpd.exp %{_libdir}/apache/mod_*.so %exclude %{_libdir}/apache/mod_suexec.so %{_libdir}/apache/build/* /var/www/cgi-bin/* %dir /var/www/error /var/www/error/* /var/www/html/* %dir /var/www/icons /var/www/icons/* %attr(0755,apache,apache) %dir /var/log/httpd %attr(0755,apache,apache) %dir /var/run/httpd %ghost /var/log/httpd/access_log %ghost /var/log/httpd/error_log %{_mandir}/man?/* %files devel %defattr(-,root,root) %{_sbindir}/envvars-std %dir %{_includedir}/apache %{_includedir}/apache/* %dir %{_libdir}/apache %files -n apache-manual %defattr(-,root,root) %dir /var/www/manual /var/www/manual/* %files mod_suexec %defattr(-,root,root) %attr(4750,root,apache) %{_sbindir}/suexec %{_libdir}/apache/mod_suexec.so %changelog * Tue Jan 31 2012 Automatic Build System 2.2.22-1mamba - automatic version update by autodist * Tue Sep 13 2011 Automatic Build System 2.2.21-1mamba - automatic version update by autodist * Wed Aug 31 2011 Automatic Build System 2.2.20-1mamba - automatic version update by autodist * Sun May 22 2011 Automatic Build System 2.2.19-1mamba - automatic update by autodist * Wed May 11 2011 Automatic Build System 2.2.18-1mamba - automatic update by autodist * Mon Mar 14 2011 Silvan Calarco 2.2.17-3mamba - disable mod_suexec in default configuration as it is packaged apart * Wed Nov 24 2010 Silvan Calarco 2.2.17-2mamba - rebuilt with --enable-mods-shared=all; added debug package * Mon Oct 18 2010 Automatic Build System 2.2.17-1mamba - automatic update to 2.2.17 by autodist * Mon Jul 26 2010 Automatic Build System 2.2.16-1mamba - update to 2.2.16 * Fri Apr 09 2010 Silvan Calarco 2.2.15-2mamba - rebuilt with mod_suexec enabled and packaged apart (required by virtualmin) * Sat Mar 06 2010 Automatic Build System 2.2.15-1mamba - automatic update to 2.2.15 by autodist * Tue Oct 06 2009 Automatic Build System 2.2.14-1mamba - automatic update to 2.2.14 by autodist * Sun Aug 09 2009 Automatic Build System 2.2.13-1mamba - automatic update to 2.2.13 by autodist * Tue Jul 28 2009 Automatic Build System 2.2.12-1mamba - automatic update to 2.2.12 by autodist * Fri Dec 19 2008 Silvan Calarco 2.2.11-1mamba - automatic update to 2.2.11 by autodist * Wed Oct 15 2008 Silvan Calarco 2.2.10-1mamba - automatic update to 2.2.10 by autodist * Sat Jul 05 2008 gil 2.2.9-1mamba - update to 2.2.9 * Thu May 29 2008 Silvan Calarco 2.2.8-1mamba - update to 2.2.8 * Sat Oct 06 2007 Silvan Calarco 2.2.6-2mamba - fix typo in post script * Wed Sep 12 2007 Aleph0 2.2.6-1mamba - update to 2.2.6 - fix CVE-2006-5752, CVE-2007-1862, CVE-2007-1863, CVE-2007-3304, CVE-2007-3847 - fix permissions of %{_sysconfdir}/sysconfig/httpd - build requires libsqlite2-devel * Thu May 24 2007 Silvan Calarco 2.2.4-2mamba - use nobody as the daemon execution group * Thu Apr 19 2007 Davide Madrisan 2.2.4-1mamba - update to version 2.2.4 by autospec - start/stop httpd using a call to service - update initscript * Wed Aug 02 2006 Davide Madrisan 2.2.3-1qilnx - update to version 2.2.3 by autospec - also fixes CVE-2006-3747 (bugzilla#210) - bumped to epoch 1 * Fri May 12 2006 Davide Madrisan 2.2.2-1qilnx - update to version 2.2.2 by autospec - this release include the fixes for both CVE-2005-3352 and CVE-2005-3357 * Wed Mar 01 2006 Silvan Calarco 2.2.0-1qilnx - update to version 2.2.0 by autospec - added modules configuration update script - removed source package * Wed Jan 25 2006 Davide Madrisan 2.0.55-3qilnx - security update for CVE-2005-3352 and CVE-2005-3357 (qibug#96) - fixed package license - some minor fixes on the specfile * Wed Nov 02 2005 Davide Madrisan 2.0.55-2qilnx - requires libapr 0.9.7 * Wed Nov 02 2005 Davide Madrisan 2.0.55-1qilnx - update to version 2.0.55 by autospec - 2.0.55 addresses CAN-2005-[1268,2088,2491,2700,2728,2970]: QSA-2005-130 * Thu Sep 22 2005 Alessandro Ramazzina 2.0.54-3qilnx - security fixes: CAN-2005-2700, CAN-2005-2728 (QSA-2005-110) * Wed Jun 01 2005 Silvan Calarco 2.0.54-2qilnx - added logrotate - added nobody user creation for standards compatibility * Mon May 09 2005 Davide Madrisan 2.0.54-1qilnx - update to version 2.0.54 by autospec - group modified - specfile updates * Fri Feb 18 2005 Silvan Calarco 2.0.53-2qilnx - chkconfig service on new install * Mon Feb 07 2005 Silvan Calarco 2.0.53-1qilnx - update to version 2.0.53 by autospec * Fri Jan 28 2005 Silvan Calarco 2.0.52-5qilnx - apache user and group are now created with their own system (>65000) ids * Thu Jan 27 2005 Silvan Calarco 2.0.52-4qilnx - removed dependency on qmail * Mon Nov 22 2004 Davide Madrisan 2.0.52-3qilnx - security fix QSA-2004-059 (CAN-2004-0942) * Thu Oct 28 2004 Silvan Calarco 2.0.52-2qilnx - rebuild with libdb42 * Wed Oct 27 2004 Silvan Calarco 2.0.52-1qilnx - update to version 2.0.52 by autospec - added httpd.d directory management for included configuration files - also fix: CAN-2004-0811, CAN-2004-0885 * Thu Sep 16 2004 Davide Madrisan 2.0.51-1qilnx - update to version 2.0.51 by autospec - also fixes security vulnerabilities: CAN-2004-0747, CAN-2004-0748, CAN-2004-0751, CAN-2004-0786, CAN-2004-0809 * Fri Sep 03 2004 Davide Madrisan 2.0.50-2qilnx - fixed SSL crt, key path, and webmaster name in the ssl configuration file * Thu Jul 01 2004 Davide Madrisan 2.0.50-1qilnx - new version rebuild - security fixes: CAN-2004-0488, CAN-2004-0493 * Fri May 14 2004 Davide Madrisan 2.0.49-1qilnx - new version rebuild * Wed May 12 2004 Davide Madrisan 2.0.48-4qilnx - security fix: CAN-2004-0113 * Wed Feb 18 2004 Silvan Calarco 2.0.48-3qilnx - fixed initscript reload and condrestart * Tue Feb 17 2004 Silvan Calarco 2.0.48-2qilnx - apr stuff moved to main package * Mon Nov 03 2003 Davide Madrisan 2.0.48-1qilnx - rebuilt with version 2.0.48 - specfile updates * Mon Sep 15 2003 Silvan Calarco 2.0.47-2qilnx - added /etc/sysconfig/httpd with option for ssl - ssl.conf adapted to QiLinux system environment * Tue Sep 09 2003 Silvan Calarco 2.0.47-1qilnx - rebuilt with new version * Wed Jun 18 2003 Silvan Calarco 2.0.45-9qilnx - moved apxs from devel to main package * Tue Jun 17 2003 Silvan Calarco 2.0.45-8qilnx - added apache-source package - fixed %%post and %%postun ... scripts * Wed May 21 2003 Silvan Calarco 2.0.45-7qilnx - moved user creation from %%post to %%pre script * Wed May 21 2003 Silvan Calarco 2.0.45-7qilnx - moved user creation from %%post to %%pre script * Tue May 20 2003 Silvan Calarco 2.0.45-6qilnx - fixed chkconfig initscript part * Tue May 20 2003 Silvan Calarco 2.0.45-5qilnx - added layout configuration * Mon May 19 2003 Silvan Calarco 2.0.45-4qilnx - added httpd initscript * Mon May 12 2003 Alessandro Ramazzina - fixed modules compilation so that they are created as shared objects * Tue May 06 2003 Alessandro Ramazzina - creation of apache package