From: Arkadiusz Miśkiewicz Date: Tue, 16 May 2017 12:04:27 +0000 (+0200) Subject: - rel 2; don't set SO_REUSEPORT when not needed; fix conf files generation X-Git-Tag: auto/th/apache-2.4.25-2 X-Git-Url: http://git.pld-linux.org/gitweb.cgi?a=commitdiff_plain;h=6fa3e3d963f8090757df38141a3a8d740c24a2f3;p=packages%2Fapache.git - rel 2; don't set SO_REUSEPORT when not needed; fix conf files generation --- diff --git a/apache-reuseport.patch b/apache-reuseport.patch new file mode 100644 index 0000000..039ce5d --- /dev/null +++ b/apache-reuseport.patch @@ -0,0 +1,30 @@ +commit 20270f8b9d72c39ac8ddd9386c5126fe6cfe3f31 +Author: jorton +Date: Fri Mar 17 08:30:16 2017 +0000 + + Merge r1777923 from trunk: + + avoid SO_REUSEPORT w/o ListenCoresBucketsRatio + + Can lead to unintended/confusing sharing between + multiple servers started by the same ID. + + Submitted by: covener + Reviewed by: jorton, covener, wrowe + + + git-svn-id: http://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1787301 13f79535-47bb-0310-9956-ffa450edef68 + +diff --git a/server/listen.c b/server/listen.c +index 98cd117c..d44c7c9f 100644 +--- a/server/listen.c ++++ b/server/listen.c +@@ -153,7 +153,7 @@ static apr_status_t make_sock(apr_pool_t *p, ap_listen_rec *server) + #endif + + #if defined(SO_REUSEPORT) +- if (ap_have_so_reuseport) { ++ if (ap_have_so_reuseport && ap_listencbratio > 0) { + int thesock; + apr_os_sock_get(&thesock, s); + if (setsockopt(thesock, SOL_SOCKET, SO_REUSEPORT, diff --git a/apache.spec b/apache.spec index 2d48724..1d6d5e9 100644 --- a/apache.spec +++ b/apache.spec @@ -35,7 +35,7 @@ Summary(ru.UTF-8): Самый популярный веб-сервер Summary(tr.UTF-8): Lider WWW tarayıcı Name: apache Version: 2.4.25 -Release: 1 +Release: 2 License: Apache v2.0 Group: Networking/Daemons/HTTP Source0: http://www.apache.org/dist/httpd/httpd-%{version}.tar.bz2 @@ -77,6 +77,7 @@ Patch1: %{name}-layout.patch Patch2: %{name}-suexec.patch Patch3: %{name}-branding.patch Patch4: %{name}-apr.patch +Patch5: apache-reuseport.patch Patch7: %{name}-syslibs.patch @@ -2644,6 +2645,7 @@ Dwa programy testowe/przykładowe cgi: test-cgi and print-env. %patch2 -p1 %patch3 -p1 %patch4 -p1 +%patch5 -p1 %patch7 -p1 @@ -2843,7 +2845,7 @@ cp -p %{SOURCE30} $RPM_BUILD_ROOT%{systemdtmpfilesdir}/%{name}.conf LoadModule() { local index=$1 module=$2 conffile conffile=${3:-$module} - echo "LoadModule ${module}_module modules/mod_$module.so" > $CFG/$index-mod_$conffile.conf + echo "LoadModule ${module}_module modules/mod_$module.so" > $CFG/${index}_mod_${conffile}.conf } for module in access_compat actions alias allowmethods asis auth_basic \