diff --git a/httpd-2.4.26-r1800306.patch b/httpd-2.4.26-r1800306.patch deleted file mode 100644 index 4a8bc2d..0000000 --- a/httpd-2.4.26-r1800306.patch +++ /dev/null @@ -1,86 +0,0 @@ -# ./pullrev.sh 1800306 - -http://svn.apache.org/viewvc?view=revision&revision=1800306 - -diff -uap httpd-2.4.26/modules/mappers/mod_actions.c.r1800306 httpd-2.4.26/modules/mappers/mod_actions.c ---- httpd-2.4.26/modules/mappers/mod_actions.c.r1800306 -+++ httpd-2.4.26/modules/mappers/mod_actions.c -@@ -186,8 +186,7 @@ - ap_field_noparam(r->pool, r->content_type); - - if (action && (t = apr_table_get(conf->action_types, action))) { -- int virtual = (*t++ == '0' ? 0 : 1); -- if (!virtual && r->finfo.filetype == APR_NOFILE) { -+ if (*t++ == '0' && r->finfo.filetype == APR_NOFILE) { - ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, r, APLOGNO(00652) - "File does not exist: %s", r->filename); - return HTTP_NOT_FOUND; -@@ -198,9 +197,6 @@ - * (will be REDIRECT_HANDLER there) - */ - apr_table_setn(r->subprocess_env, "HANDLER", action); -- if (virtual) { -- apr_table_setn(r->notes, "virtual_script", "1"); -- } - } - - if (script == NULL) -diff -uap httpd-2.4.26/modules/proxy/mod_proxy_fcgi.c.r1800306 httpd-2.4.26/modules/proxy/mod_proxy_fcgi.c ---- httpd-2.4.26/modules/proxy/mod_proxy_fcgi.c.r1800306 -+++ httpd-2.4.26/modules/proxy/mod_proxy_fcgi.c -@@ -321,7 +321,6 @@ - apr_status_t rv; - apr_size_t avail_len, len, required_len; - int next_elem, starting_elem; -- int fpm = 0; - fcgi_req_config_t *rconf = ap_get_module_config(r->request_config, &proxy_fcgi_module); - fcgi_dirconf_t *dconf = ap_get_module_config(r->per_dir_config, &proxy_fcgi_module); - -@@ -354,8 +353,6 @@ - *qs = '\0'; - } - } -- } else { -- fpm = 1; - } - - if (newfname) { -@@ -364,38 +361,9 @@ - } - } - --#if 0 -- ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(09999) -- "r->filename: %s", (r->filename ? r->filename : "nil")); -- ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(09999) -- "r->uri: %s", (r->uri ? r->uri : "nil")); -- ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(09999) -- "r->path_info: %s", (r->path_info ? r->path_info : "nil")); --#endif -- - ap_add_common_vars(r); - ap_add_cgi_vars(r); - -- if (fpm || apr_table_get(r->notes, "virtual_script")) { -- /* -- * Adjust SCRIPT_NAME, PATH_INFO and PATH_TRANSLATED for PHP-FPM -- * TODO: Right now, PATH_INFO and PATH_TRANSLATED look OK... -- */ -- const char *pend; -- const char *script_name = apr_table_get(r->subprocess_env, "SCRIPT_NAME"); -- pend = script_name + strlen(script_name); -- if (r->path_info && *r->path_info) { -- pend = script_name + ap_find_path_info(script_name, r->path_info) - 1; -- } -- while (pend != script_name && *pend != '/') { -- pend--; -- } -- apr_table_setn(r->subprocess_env, "SCRIPT_NAME", pend); -- ap_log_rerror(APLOG_MARK, APLOG_TRACE4, 0, r, -- "fpm:virtual_script: Modified SCRIPT_NAME to: %s", -- pend); -- } -- - /* XXX are there any FastCGI specific env vars we need to send? */ - - /* Give admins final option to fine-tune env vars */ diff --git a/httpd-2.4.10-mod_systemd.patch b/httpd-2.4.27-systemd.patch similarity index 79% rename from httpd-2.4.10-mod_systemd.patch rename to httpd-2.4.27-systemd.patch index 88d76ac..26aac48 100644 --- a/httpd-2.4.10-mod_systemd.patch +++ b/httpd-2.4.27-systemd.patch @@ -1,8 +1,10 @@ -diff --git a/modules/arch/unix/config5.m4 b/modules/arch/unix/config5.m4 -index 77027a8..7a13d5a 100644 ---- a/modules/arch/unix/config5.m4 -+++ b/modules/arch/unix/config5.m4 -@@ -18,6 +18,16 @@ APACHE_MODULE(privileges, Per-virtualhost Unix UserIDs and enhanced security for +diff -uap httpd-2.4.27/modules/arch/unix/config5.m4.systemd httpd-2.4.27/modules/arch/unix/config5.m4 +diff -uap httpd-2.4.27/modules/arch/unix/config5.m4.systemd httpd-2.4.27/modules/arch/unix/config5.m4 +diff -uap httpd-2.4.27/modules/arch/unix/config5.m4.systemd httpd-2.4.27/modules/arch/unix/config5.m4 +diff -uap httpd-2.4.27/modules/arch/unix/config5.m4.systemd httpd-2.4.27/modules/arch/unix/config5.m4 +--- httpd-2.4.27/modules/arch/unix/config5.m4.systemd ++++ httpd-2.4.27/modules/arch/unix/config5.m4 +@@ -18,6 +18,16 @@ fi ]) @@ -19,12 +21,10 @@ index 77027a8..7a13d5a 100644 APR_ADDTO(INCLUDES, [-I\$(top_srcdir)/$modpath_current]) APACHE_MODPATH_FINISH -diff --git a/modules/arch/unix/mod_systemd.c b/modules/arch/unix/mod_systemd.c -new file mode 100644 -index 0000000..5381c98 ---- /dev/null -+++ b/modules/arch/unix/mod_systemd.c -@@ -0,0 +1,145 @@ +diff -uap httpd-2.4.27/modules/arch/unix/mod_systemd.c.systemd httpd-2.4.27/modules/arch/unix/mod_systemd.c +--- httpd-2.4.27/modules/arch/unix/mod_systemd.c.systemd ++++ httpd-2.4.27/modules/arch/unix/mod_systemd.c +@@ -0,0 +1,161 @@ +/* Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. @@ -66,11 +66,20 @@ index 0000000..5381c98 +static unsigned long bytes_served; +static pid_t mainpid; + ++static int systemd_pre_config(apr_pool_t *pconf, apr_pool_t *plog, ++ apr_pool_t *ptemp) ++{ ++ sd_notify(0, ++ "RELOADING=1\n" ++ "STATUS=Reading configuration...\n"); ++ ap_extended_status = 1; ++ return OK; ++} ++ +static int systemd_pre_mpm(apr_pool_t *p, ap_scoreboard_e sb_type) +{ + int rv; + -+ ap_extended_status = 1; + mainpid = getpid(); + + rv = sd_notifyf(0, "READY=1\n" @@ -91,6 +100,11 @@ index 0000000..5381c98 + char bps[5]; + int rv; + ++ if (!ap_extended_status) { ++ /* Nothing useful to report if ExtendedStatus disabled. */ ++ return DECLINED; ++ } ++ + ap_get_sload(&sload); + /* up_time in seconds */ + up_time = (apr_uint32_t) apr_time_sec(apr_time_now() - @@ -136,6 +150,8 @@ index 0000000..5381c98 + +static void systemd_register_hooks(apr_pool_t *p) +{ ++ /* Enable ap_extended_status. */ ++ ap_hook_pre_config(systemd_pre_config, NULL, NULL, APR_HOOK_LAST); + /* We know the PID in this hook ... */ + ap_hook_pre_mpm(systemd_pre_mpm, NULL, NULL, APR_HOOK_LAST); + /* Used to update httpd's status line using sd_notifyf */ diff --git a/httpd.spec b/httpd.spec index 5ae1891..4fd787a 100644 --- a/httpd.spec +++ b/httpd.spec @@ -13,7 +13,7 @@ Summary: Apache HTTP Server Name: httpd Version: 2.4.27 -Release: 3%{?dist} +Release: 4%{?dist} URL: http://httpd.apache.org/ Source0: http://www.apache.org/dist/httpd/httpd-%{version}.tar.bz2 Source1: index.html @@ -62,7 +62,7 @@ Patch24: httpd-2.4.1-corelimit.patch Patch25: httpd-2.4.25-selinux.patch Patch26: httpd-2.4.4-r1337344+.patch Patch27: httpd-2.4.2-icons.patch -Patch29: httpd-2.4.10-mod_systemd.patch +Patch29: httpd-2.4.27-systemd.patch Patch30: httpd-2.4.4-cachehardmax.patch Patch31: httpd-2.4.18-sslmultiproxy.patch Patch34: httpd-2.4.17-socket-activation.patch @@ -703,6 +703,9 @@ rm -rf $RPM_BUILD_ROOT %{_rpmconfigdir}/macros.d/macros.httpd %changelog +* Tue Jul 18 2017 Joe Orton - 2.4.27-4 +- update mod_systemd (r1802251) + * Mon Jul 17 2017 Joe Orton - 2.4.27-3 - switch to event by default for Fedora 27 and later (#1471708)