]> git.pld-linux.org Git - packages/apache.git/blobdiff - apache.spec
- up to 2.4.59
[packages/apache.git] / apache.spec
index 1050596735fbf52a308e998aaf92b6fa7c183e7b..e964fe5c68636c0e4661233832b0f86f52aa656c 100644 (file)
@@ -1,15 +1,15 @@
 # TODO:
 # - config examples for mod_*
 # - --with-suexec-uidmin=500 or =1000 ?
-# - check those autn modules inner deps
+# - check those authn modules inner deps
 # - for external packages: don't use any apache module name in dep as they
-#  differ for apache 1.3/2.0/2.2!? any better ideas? rpm Suggests: tags?
-# - for mod_auth_* modules require each auth module to require virtual authn so at least *_core
-#  is chosen?
+#   differ for apache 1.3/2.0/2.2!? any better ideas? rpm Suggests: tags?
+# - for mod_auth_* modules require each auth module to require virtual authn so at least *_core is chosen?
 # - same for mod_authz
 # - mod_auth_digest and mod_auth_basic R: apache(authn) ?
 # - drop mod_case_filter* or find summary and description for them
 # - FYI: http://wiki.apache.org/httpd/InternalDummyConnection
+# - consider modules: mod_authnz_fcgi, mod_socache_dc (distcache bcond)
 
 # Conditional build:
 %bcond_without ssl             # build without SSL support
 # this is internal macro, don't change to %%apache_modules_api
 %define                _apache_modules_api 20120211
 
-%define                openssl_ver     1.0.2
-%define                apr_ver         1:1.6.0
-%define                apr_util_ver    1:1.6.0
+%define                openssl_ver     1.1.1
+%define                apr_ver         1:1.7.0
+%define                apr_util_ver    1:1.6.1
 
-%include       /usr/lib/rpm/macros.perl
 Summary:       The most widely used Web server on the Internet
 Summary(de.UTF-8):     Leading World Wide Web-Server
 Summary(es.UTF-8):     Servidor HTTPD para proveer servicios WWW
@@ -35,12 +34,12 @@ Summary(pt_BR.UTF-8):       Servidor HTTPD para prover serviços WWW
 Summary(ru.UTF-8):     Самый популярный веб-сервер
 Summary(tr.UTF-8):     Lider WWW tarayıcı
 Name:          apache
-Version:       2.4.33
+Version:       2.4.59
 Release:       1
 License:       Apache v2.0
 Group:         Networking/Daemons/HTTP
 Source0:       http://www.apache.org/dist/httpd/httpd-%{version}.tar.bz2
-# Source0-md5: 6ef469d3f16fffeb688bc6e0346823e5
+# Source0-md5: 9f77eb01b2fddfb4b32d469af90fb01b
 Source1:       %{name}.init
 Source2:       %{name}.logrotate
 Source3:       %{name}.sysconfig
@@ -99,7 +98,9 @@ BuildRequires:        apr-devel >= %{apr_ver}
 BuildRequires: apr-util-devel >= %{apr_util_ver}
 BuildRequires: autoconf >= 2.50
 BuildRequires: automake
+BuildRequires: curl-devel
 %{?with_distcache:BuildRequires:       distcache-devel}
+BuildRequires: jansson-devel
 BuildRequires: libbrotli-devel >= 0.6.0
 BuildRequires: libtool >= 2:1.5
 BuildRequires: libxml2-devel >= 2
@@ -115,6 +116,7 @@ BuildRequires:      rpm-build >= 4.4.0
 BuildRequires: rpm-perlprov >= 4.1-13
 BuildRequires: rpmbuild(macros) >= 1.647
 BuildRequires: sed >= 4.0
+BuildRequires: systemd-devel
 BuildRequires: zlib-devel
 Requires:      %{name}-errordocs = %{version}-%{release}
 Requires:      %{name}-mod_alias = %{version}-%{release}
@@ -211,13 +213,8 @@ Provides:  apache(modules-api) = %{_apache_modules_api}
 Provides:      group(http)
 Provides:      user(http)
 Provides:      webserver = apache
-Obsoletes:     apache-extra
-Obsoletes:     apache6
-# packaged by mistake. really sample code
-Obsoletes:     apache-mod_optional_fn_export
-Obsoletes:     apache-mod_optional_fn_import
-Obsoletes:     apache-mod_optional_fn_import
-Obsoletes:     apache-mod_optional_hook_import
+Obsoletes:     apache-extra < 1.3.1
+Obsoletes:     apache6 < 1.3.4
 Conflicts:     apache < 2.2.0
 # mod_wsgi >= 3.4 is required for apache 2.4
 Conflicts:     apache-mod_wsgi < 3.4
@@ -270,9 +267,7 @@ Summary(pl.UTF-8):  Pliki Apache index.html*
 Group:         Documentation
 Requires:      %{name}-base = %{version}-%{release}
 Obsoletes:     indexhtml
-%if "%{_rpmversion}" >= "5"
 BuildArch:     noarch
-%endif
 
 %description index
 Apache index.html* files.
@@ -289,9 +284,7 @@ Requires:   %{name}-mod_alias = %{version}-%{release}
 Requires:      %{name}-mod_dir = %{version}-%{release}
 Requires:      %{name}-mod_negotiation = %{version}-%{release}
 Requires:      %{name}-mod_setenvif = %{version}-%{release}
-%if "%{_rpmversion}" >= "5"
 BuildArch:     noarch
-%endif
 
 %description doc
 Apache manual.
@@ -309,9 +302,7 @@ Requires:   %{name}-mod_alias = %{version}-%{release}
 Requires:      %{name}-mod_authz_host = %{version}-%{release}
 Requires:      %{name}-mod_include = %{version}-%{release}
 Requires:      %{name}-mod_negotiation = %{version}-%{release}
-%if "%{_rpmversion}" >= "5"
 BuildArch:     noarch
-%endif
 
 %description errordocs
 Multi-language error messages.
@@ -329,8 +320,8 @@ Summary(ru.UTF-8):  Средства разработки модулей для 
 Group:         Networking/Utilities
 Requires:      apr-util-devel >= %{apr_util_ver}
 Requires:      libtool
-Obsoletes:     apache-apxs
-Obsoletes:     apache-static
+Obsoletes:     apache-apxs < 2.2.6-3
+Obsoletes:     apache-static < 2.0.47-1
 
 %description devel
 The apache-devel package contains header files for Apache.
@@ -634,7 +625,6 @@ URL:                http://httpd.apache.org/docs/2.4/mod/mod_authn_core.html
 Requires:      %{name}-base = %{version}-%{release}
 Provides:      apache(mod_authn_core) = %{version}-%{release}
 Provides:      apache(mod_authn_default) = %{version}-%{release}
-Obsoletes:     apache(mod_authn_alias)
 Obsoletes:     apache-mod_authn_default < %{version}-%{release}
 
 %description mod_authn_core
@@ -1432,7 +1422,7 @@ Group:            Networking/Daemons/HTTP
 URL:           http://httpd.apache.org/docs/2.4/mod/mod_file_cache.html
 Requires:      %{name}-base = %{version}-%{release}
 Provides:      apache(mod_file_cache) = %{version}-%{release}
-Obsoletes:     apache-mmap_static
+Obsoletes:     apache-mod_mmap_static < 2
 
 %description mod_file_cache
 Caches a static list of files in memory.
@@ -1544,7 +1534,7 @@ Summary(pl.UTF-8):        Obsługa HTTP/2 dla serwera HTTP Apache
 Group:         Networking/Daemons/HTTP
 URL:           http://httpd.apache.org/docs/2.4/mod/mod_http2.html
 Requires:      %{name}-base = %{version}-%{release}
-Requires:      nghttp2 >= 1.15.0
+Requires:      nghttp2-libs >= 1.15.0
 Provides:      apache(mod_http2) = %{version}-%{release}
 
 %description mod_http2
@@ -1578,7 +1568,7 @@ URL:              http://httpd.apache.org/docs/2.4/mod/mod_imagemap.html
 Requires:      %{name}-base = %{version}-%{release}
 Provides:      apache(mod_imagemap) = %{version}-%{release}
 Provides:      apache-mod_imap
-Obsoletes:     apache-mod_imap
+Obsoletes:     apache-mod_imap < 2.2.0-1
 
 %description mod_imagemap
 This module processes .map files, thereby replacing the functionality
@@ -2366,6 +2356,25 @@ obiektów, zapewniający tworzenie i dostęp do cache'a zapisywanego w
 systemie memcached - wysoko wydajnym, ozproszonym systemie pamięci
 podręcznej obiektów.
 
+%package mod_socache_redis
+Summary:       Redis based shared object cache provider
+Summary(pl.UTF-8):     Moduł zapewniający współdzieloną pamięć podręczną obiektów w oparciu o Redis
+Group:         Networking/Daemons/HTTP
+URL:           http://httpd.apache.org/docs/2.4/mod/mod_socache_redis.html
+Requires:      %{name}-base = %{version}-%{release}
+Provides:      apache(mod_socache_redis) = %{version}-%{release}
+
+%description mod_socache_redis
+mod_socache_redis is a shared object cache provider which provides
+for creation and access to a cache backed by the redis
+high-performance, distributed memory object caching system.
+
+%description mod_socache_redis -l pl.UTF-8
+mod_socache_dbm to moduł dostarczający współdzieloną pamięć podręczną
+obiektów, zapewniający tworzenie i dostęp do cache'a zapisywanego w
+systemie redis - wysoko wydajnym, rozproszonym systemie pamięci
+podręcznej obiektów.
+
 %package mod_socache_shmcb
 Summary:       shmcb based shared object cache provider
 Summary(pl.UTF-8):     Moduł zapewniający współdzieloną pamięć podręczną obiektów w oparciu o shmcb
@@ -2666,9 +2675,7 @@ Summary(pl.UTF-8):        Programy testowe/przykładowe cgi
 Group:         Networking/Utilities
 Requires:      %{name}-base = %{version}-%{release}
 Requires:      filesystem >= 2.0-1
-%if "%{_rpmversion}" >= "5"
 BuildArch:     noarch
-%endif
 
 %description cgi_test
 Two cgi test/demo programs: test-cgi and print-env.
@@ -2795,6 +2802,7 @@ install -d build; cd build
        --enable-speling \
        %{?with_ssl:--enable-ssl %{?with_distcache:--enable-distcache}} \
        --enable-suexec \
+       --enable-systemd \
        --enable-unique-id \
        --enable-usertrack \
        --enable-vhost-alias \
@@ -2831,11 +2839,11 @@ install -d $RPM_BUILD_ROOT/etc/{logrotate.d,rc.d/init.d,sysconfig,systemd/system
 %{__sed} -i -re '/^(CC|CPP|CXX)/ s/ccache //' $RPM_BUILD_ROOT%{_libdir}/%{name}/build/config_vars.mk
 
 cp -p %{SOURCE31} $RPM_BUILD_ROOT%{systemdunitdir}/httpd.service
-ln -s %{systemdunitdir}/httpd.service $RPM_BUILD_ROOT/etc/systemd/system/httpd.service
-ln -s %{_libexecdir} $RPM_BUILD_ROOT%{_sysconfdir}/modules
-ln -s %{_localstatedir}/run/httpd $RPM_BUILD_ROOT%{_sysconfdir}/run
-ln -s %{_var}/log/httpd $RPM_BUILD_ROOT%{_sysconfdir}/logs
-ln -s %{_var}/lib/httpd/md $RPM_BUILD_ROOT%{_sysconfdir}/md
+ln -sr $RPM_BUILD_ROOT%{systemdunitdir}/httpd.service $RPM_BUILD_ROOT/etc/systemd/system/httpd.service
+ln -sr $RPM_BUILD_ROOT%{_libexecdir} $RPM_BUILD_ROOT%{_sysconfdir}/modules
+ln -sr $RPM_BUILD_ROOT%{_localstatedir}/run/httpd $RPM_BUILD_ROOT%{_sysconfdir}/run
+ln -sr $RPM_BUILD_ROOT%{_var}/log/httpd $RPM_BUILD_ROOT%{_sysconfdir}/logs
+ln -sr $RPM_BUILD_ROOT%{_var}/lib/httpd/md $RPM_BUILD_ROOT%{_sysconfdir}/md
 
 # we have own apache.conf
 rm $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf
@@ -2885,32 +2893,99 @@ cp -a %{SOURCE29} $RPM_BUILD_ROOT%{_sysconfdir}/vhosts.d/example.net.conf
 
 cp -p %{SOURCE30} $RPM_BUILD_ROOT%{systemdtmpfilesdir}/%{name}.conf
 
+modules="
+       %{?with_bucketeer:bucketeer}
+       access_compat
+       actions
+       alias
+       allowmethods
+       asis
+       auth_basic
+       auth_digest
+       auth_form
+       authn_anon
+       authn_core
+       authn_dbd
+       authn_dbm
+       authn_file
+       authn_socache
+       authnz_ldap
+       authz_core
+       authz_dbd
+       authz_dbm
+       authz_groupfile
+       authz_owner
+       authz_user
+       brotli
+       buffer
+       case_filter
+       case_filter_in
+       cern_meta
+       cgi
+       charset_lite
+       data
+       dbd
+       dialup
+       dumpio
+       echo
+       env
+       expires
+       ext_filter
+       file_cache
+       filter
+       headers
+       heartbeat
+       heartmonitor
+       ident
+       imagemap
+       include
+       lbmethod_bybusyness
+       lbmethod_byrequests
+       lbmethod_bytraffic
+       lbmethod_heartbeat
+       ldap
+       log_debug
+       log_forensic
+       logio
+       lua
+       macro
+       md
+       negotiation
+       ratelimit
+       reflector
+       remoteip
+       reqtimeout
+       request
+       rewrite
+       sed
+       session
+       session_cookie
+       session_crypto
+       session_dbd
+       setenvif
+       slotmem_plain
+       slotmem_shm
+       socache_dbm
+       socache_memcache
+       socache_redis
+       socache_shmcb
+       speling
+       substitute
+       systemd
+       unique_id
+       usertrack
+       version
+       watchdog
+       xml2enc
+"
+
 LoadModule() {
        local index=$1 module=$2 conffile
        conffile=${3:-$module}
        echo "LoadModule ${module}_module modules/mod_$module.so" > $CFG/${index}_mod_${conffile}.conf
 }
 
-for module in access_compat actions alias allowmethods asis auth_basic \
-       auth_digest auth_form authn_anon authn_core authn_dbd authn_dbm \
-       authn_file authn_socache authnz_ldap authz_core authz_dbd \
-       authz_dbm authz_groupfile authz_owner authz_user brotli \
-       %{?with_bucketeer:bucketeer} buffer \
-       case_filter_in case_filter cern_meta cgi charset_lite \
-       data dbd dialup dumpio \
-       echo env expires ext_filter \
-       file_cache filter \
-       headers heartbeat heartmonitor \
-       ident imagemap include \
-       lbmethod_bybusyness lbmethod_byrequests lbmethod_bytraffic \
-       lbmethod_heartbeat ldap log_debug log_forensic logio lua \
-       macro md negotiation \
-       ratelimit reflector remoteip reqtimeout request rewrite \
-       sed session_cookie session_crypto session_dbd session setenvif \
-       slotmem_plain slotmem_shm socache_dbm socache_memcache \
-       socache_shmcb speling substitute \
-       unique_id usertrack version watchdog xml2enc; do
-
+for module in $modules; do
        LoadModule 00 $module
 done
 
@@ -2930,7 +3005,7 @@ s/^.*\.\(pt-br\)/%%lang(pt_BR) &/
 cd $cur
 
 # htpasswd goes to %{_bindir}
-ln -sf %{_bindir}/htpasswd $RPM_BUILD_ROOT%{_sbindir}
+ln -sfr $RPM_BUILD_ROOT%{_bindir}/htpasswd $RPM_BUILD_ROOT%{_sbindir}
 
 mv $RPM_BUILD_ROOT{%{_bindir},%{_sbindir}}/apxs
 
@@ -2958,7 +3033,7 @@ rm -rf $RPM_BUILD_ROOT
 %useradd -u 51 -r -d /home/services/httpd -s /bin/false -c "HTTP User" -g http http
 
 %pretrans base
-# handle $HTTPD_MPM from sysconfig
+# upgrade to 2.4: handle $HTTPD_MPM from sysconfig
 if [ -f /etc/sysconfig/httpd ]; then
        MPM=$(grep ^HTTPD_MPM /etc/sysconfig/httpd | sed 's,HTTPD_MPM=,,;s,",,g')
        if [ -n "$MPM" ]; then
@@ -2991,14 +3066,15 @@ if [ "$1" = "0" ]; then
 fi
 %systemd_reload
 
-%triggerpostun base -- %{name}-base < 2.2.22-2
+%triggerpostun base -- %{name}-base < 2.4.0
+#  < 2.2.22-2
 . /etc/sysconfig/httpd
 if [ -z "$HTTPD_CONF" ]; then
        echo 'HTTPD_CONF="/etc/httpd/apache.conf"' >> /etc/sysconfig/httpd
 fi
 %systemd_trigger httpd.service
 
-%triggerpostun base -- %{name}-base < 2.4.0
+# < 2.4.0
 cp -f /etc/httpd/apache.conf{,.rpmsave}
 sed -i -e '
        /^DefaultType/d
@@ -3143,6 +3219,7 @@ fi
 %module_scripts mod_slotmem_shm
 %module_scripts mod_socache_dbm
 %module_scripts mod_socache_memcache
+%module_scripts mod_socache_redis
 %module_scripts mod_socache_shmcb
 %module_scripts mod_speling
 %module_scripts mod_ssl
@@ -3199,6 +3276,7 @@ fi
 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apache.conf
 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/*_common.conf
 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/*_mpm.conf
+%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/*_systemd.conf
 %attr(640,root,root) %config(noreplace,missingok) %verify(not md5 mtime size) %{_sysconfdir}/vhosts.d/example.net.conf
 %attr(640,root,root) %{_sysconfdir}/magic
 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/httpd
@@ -3228,11 +3306,12 @@ fi
 %dir %{_datadir}/cgi-bin
 %dir %{_datadir}/html
 %dir %{_datadir}/vhosts
-# do not adapter here, %{_datadir} != /usr/share here
+# do not adapter here, %%{_datadir} != /usr/share here
 %{_datadir}/icons
 %attr(755,root,root) %{_libexecdir}/mod_mpm_event.so
 %attr(755,root,root) %{_libexecdir}/mod_mpm_prefork.so
 %attr(755,root,root) %{_libexecdir}/mod_mpm_worker.so
+%attr(755,root,root) %{_libexecdir}/mod_systemd.so
 %attr(755,root,root) %{_libexecdir}/mod_unixd.so
 
 %files doc -f manual.files
@@ -3751,6 +3830,11 @@ fi
 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/*_mod_socache_memcache.conf
 %attr(755,root,root) %{_libexecdir}/mod_socache_memcache.so
 
+%files mod_socache_redis
+%defattr(644,root,root,755)
+%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/*_mod_socache_redis.conf
+%attr(755,root,root) %{_libexecdir}/mod_socache_redis.so
+
 %files mod_socache_shmcb
 %defattr(644,root,root,755)
 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/*_mod_socache_shmcb.conf
This page took 0.052183 seconds and 4 git commands to generate.