From 760a39a53eb54496b47d93ba02d077b313a9baa4 Mon Sep 17 00:00:00 2001 From: Ben Harper Date: Mon, 9 Oct 2017 15:58:04 +0000 Subject: [PATCH] 2.4.28 and Remove Patch57, fixed upsteam Update Source29 from Fedora: https://src.fedoraproject.org/rpms/httpd/c/adcaa3428979e75ed3cc4e3a942842be7b16cfa2 use https for URL and Source0 from Fedora: https://src.fedoraproject.org/rpms/httpd/c/ddabcffa42aeee042fbe2af37931158ec539cb80 move service.d and socket.d folders to -filesystem from Fedora: https://src.fedoraproject.org/rpms/httpd/c/a7a88382f7efa6154d762b7a7a22fc7e4d057adb update Source32 from Fedora: https://src.fedoraproject.org/rpms/httpd/c/870b71c4f0c8e363d0e46c365f5d85fa76b62803 --- SOURCES/httpd-2.4.17-socket-activation.patch | 19 +++++---- ...stemd.patch => httpd-2.4.27-systemd.patch} | 40 +++++++++++++------ SOURCES/httpd.service.xml | 5 +++ SPECS/httpd24u.spec | 30 +++++++++----- 4 files changed, 63 insertions(+), 31 deletions(-) rename SOURCES/{httpd-2.4.10-mod_systemd.patch => httpd-2.4.27-systemd.patch} (79%) diff --git a/SOURCES/httpd-2.4.17-socket-activation.patch b/SOURCES/httpd-2.4.17-socket-activation.patch index d5cbdf2..dbdd80c 100644 --- a/SOURCES/httpd-2.4.17-socket-activation.patch +++ b/SOURCES/httpd-2.4.17-socket-activation.patch @@ -1,5 +1,5 @@ diff --git a/server/listen.c b/server/listen.c -index 1d9be83..f5f7754 100644 +index a8e9e6f..1a6c1d3 100644 --- a/server/listen.c +++ b/server/listen.c @@ -34,6 +34,10 @@ @@ -100,11 +100,10 @@ index 1d9be83..f5f7754 100644 } #ifdef WIN32 -@@ -277,6 +286,124 @@ static apr_status_t close_listeners_on_exec(void *v) - return APR_SUCCESS; +@@ -315,6 +324,123 @@ static int find_listeners(ap_listen_rec **from, ap_listen_rec **to, + return found; } -+ +#ifdef HAVE_SYSTEMD + +static int find_systemd_socket(process_rec * process, apr_port_t port) { @@ -222,10 +221,10 @@ index 1d9be83..f5f7754 100644 + +#endif /* HAVE_SYSTEMD */ + - static const char *alloc_listener(process_rec *process, char *addr, + static const char *alloc_listener(process_rec *process, const char *addr, apr_port_t port, const char* proto, void *slave) -@@ -479,7 +606,7 @@ static int open_listeners(apr_pool_t *pool) +@@ -495,7 +621,7 @@ static int open_listeners(apr_pool_t *pool) } } #endif @@ -234,7 +233,7 @@ index 1d9be83..f5f7754 100644 ++num_open; } else { -@@ -591,8 +718,28 @@ AP_DECLARE(int) ap_setup_listeners(server_rec *s) +@@ -607,8 +733,28 @@ AP_DECLARE(int) ap_setup_listeners(server_rec *s) } } @@ -265,7 +264,7 @@ index 1d9be83..f5f7754 100644 } for (lr = ap_listeners; lr; lr = lr->next) { -@@ -682,7 +829,7 @@ AP_DECLARE(apr_status_t) ap_duplicate_listeners(apr_pool_t *p, server_rec *s, +@@ -698,7 +844,7 @@ AP_DECLARE(apr_status_t) ap_duplicate_listeners(apr_pool_t *p, server_rec *s, duplr->bind_addr); return stat; } @@ -274,7 +273,7 @@ index 1d9be83..f5f7754 100644 #if AP_NONBLOCK_WHEN_MULTI_LISTEN use_nonblock = (ap_listeners && ap_listeners->next); stat = apr_socket_opt_set(duplr->sd, APR_SO_NONBLOCK, use_nonblock); -@@ -809,6 +956,11 @@ AP_DECLARE_NONSTD(const char *) ap_set_listener(cmd_parms *cmd, void *dummy, +@@ -825,6 +971,11 @@ AP_DECLARE_NONSTD(const char *) ap_set_listener(cmd_parms *cmd, void *dummy, if (argc < 1 || argc > 2) { return "Listen requires 1 or 2 arguments."; } @@ -286,7 +285,7 @@ index 1d9be83..f5f7754 100644 rv = apr_parse_addr_port(&host, &scope_id, &port, argv[0], cmd->pool); if (rv != APR_SUCCESS) { -@@ -840,6 +992,12 @@ AP_DECLARE_NONSTD(const char *) ap_set_listener(cmd_parms *cmd, void *dummy, +@@ -856,6 +1007,12 @@ AP_DECLARE_NONSTD(const char *) ap_set_listener(cmd_parms *cmd, void *dummy, ap_str_tolower(proto); } diff --git a/SOURCES/httpd-2.4.10-mod_systemd.patch b/SOURCES/httpd-2.4.27-systemd.patch similarity index 79% rename from SOURCES/httpd-2.4.10-mod_systemd.patch rename to SOURCES/httpd-2.4.27-systemd.patch index 88d76ac..26aac48 100644 --- a/SOURCES/httpd-2.4.10-mod_systemd.patch +++ b/SOURCES/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/SOURCES/httpd.service.xml b/SOURCES/httpd.service.xml index d03e133..8f82e59 100644 --- a/SOURCES/httpd.service.xml +++ b/SOURCES/httpd.service.xml @@ -143,6 +143,11 @@ Wants=network-online.target which terminates the server only once active connections have been processed. + To "ungracefully" stop the server without waiting for + requests to complete, use systemctl kill + --kill-who=main httpd; similarly to "ungracefully" + reload the configuration, use systemctl kill + --kill-who=main --signal=HUP httpd. diff --git a/SPECS/httpd24u.spec b/SPECS/httpd24u.spec index 5435b5e..fde1f7a 100644 --- a/SPECS/httpd24u.spec +++ b/SPECS/httpd24u.spec @@ -42,10 +42,10 @@ Summary: Apache HTTP Server Name: %{real_name}%{ius_suffix} -Version: 2.4.27 -Release: 2.ius%{?dist} -URL: http://httpd.apache.org/ -Source0: http://www.apache.org/dist/httpd/httpd-%{version}.tar.bz2 +Version: 2.4.28 +Release: 1.ius%{?dist} +URL: https://httpd.apache.org/ +Source0: https://www.apache.org/dist/httpd/httpd-%{version}.tar.bz2 Source2: httpd.logrotate Source3: httpd.sysconf Source4: httpd-ssl-pass-dialog @@ -97,13 +97,12 @@ Patch25: httpd-2.4.25-selinux.patch Patch26: httpd-2.4.4-r1337344+.patch Patch27: httpd-2.4.2-icons.patch Patch28: httpd-2.4.6-r1332643+.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 # Bug fixes Patch56: httpd-2.4.4-mod_unique_id.patch -Patch57: httpd-2.4.10-sigint.patch # Security fixes License: ASL 2.0 @@ -313,7 +312,6 @@ interface for storing and accessing per-user session data. %{?with_systemd:%patch34 -p1 -b .socketactivation} %patch56 -p1 -b .uniqueid -%patch57 -p1 -b .sigint # Patch in the vendor string sed -i '/^#define PLATFORM/s/Unix/%{vstring}/' os/unix/os.h @@ -769,8 +767,6 @@ exit $rv %if %{with systemd} %{_unitdir}/*.service %{_unitdir}/*.socket -%attr(755,root,root) %dir %{_unitdir}/httpd.service.d -%attr(755,root,root) %dir %{_unitdir}/httpd.socket.d %else # sysvinit %{_sysconfdir}/rc.d/init.d/httpd @@ -786,6 +782,10 @@ exit $rv %dir %{docroot}/html %dir %{contentdir} %dir %{contentdir}/icons +%if %{with systemd} +%attr(755,root,root) %dir %{_unitdir}/httpd.service.d +%attr(755,root,root) %dir %{_unitdir}/httpd.socket.d +%endif %files tools %{_bindir}/* @@ -831,6 +831,18 @@ exit $rv %changelog +* Wed Oct 04 2017 Ben Harper - 2.4.28-1.ius +- Latest upstream +- Remove Patch57, fixed upsteam +- Update Source29 from Fedora: + https://src.fedoraproject.org/rpms/httpd/c/adcaa3428979e75ed3cc4e3a942842be7b16cfa2 +- use https for URL and Source0 from Fedora: + https://src.fedoraproject.org/rpms/httpd/c/ddabcffa42aeee042fbe2af37931158ec539cb80 +- move service.d and socket.d folders to -filesystem from Fedora: + https://src.fedoraproject.org/rpms/httpd/c/a7a88382f7efa6154d762b7a7a22fc7e4d057adb +- update Source32 from Fedora: + https://src.fedoraproject.org/rpms/httpd/c/870b71c4f0c8e363d0e46c365f5d85fa76b62803 + * Mon Aug 07 2017 Carl George - 2.4.27-2.ius - Rebuild for EL7.4's openssl-1.0.2k