diff --git a/apache2-mod_http2-issue-167.patch b/apache2-mod_http2-issue-167.patch new file mode 100644 index 0000000..fb75313 --- /dev/null +++ b/apache2-mod_http2-issue-167.patch @@ -0,0 +1,39 @@ +Index: httpd-2.4.34/modules/http2/h2_from_h1.c +=================================================================== +--- httpd-2.4.34.orig/modules/http2/h2_from_h1.c 2018-05-29 23:16:29.000000000 +0200 ++++ httpd-2.4.34/modules/http2/h2_from_h1.c 2019-02-27 12:39:19.503285243 +0100 +@@ -22,6 +22,8 @@ + #include + + #include ++#define AP_STATUS_IS_HEADER_ONLY(x) ((x) == HTTP_NO_CONTENT || \ ++ (x) == HTTP_NOT_MODIFIED) + #include + #include + #include +@@ -586,18 +588,20 @@ apr_status_t h2_filter_headers_out(ap_fi + } + } + +- if (r->header_only) { ++ if (r->header_only || AP_STATUS_IS_HEADER_ONLY(r->status)) { + ap_log_cerror(APLOG_MARK, APLOG_TRACE1, 0, f->c, +- "h2_task(%s): header_only, cleanup output brigade", ++ "h2_task(%s): headers only, cleanup output brigade", + task->id); + b = body_bucket? body_bucket : APR_BRIGADE_FIRST(bb); + while (b != APR_BRIGADE_SENTINEL(bb)) { + next = APR_BUCKET_NEXT(b); + if (APR_BUCKET_IS_EOS(b) || AP_BUCKET_IS_EOR(b)) { + break; +- } +- APR_BUCKET_REMOVE(b); +- apr_bucket_destroy(b); ++ } ++ if (!H2_BUCKET_IS_HEADERS(b)) { ++ APR_BUCKET_REMOVE(b); ++ apr_bucket_destroy(b); ++ } + b = next; + } + } diff --git a/apache2.changes b/apache2.changes index 97cdfb0..7729e02 100644 --- a/apache2.changes +++ b/apache2.changes @@ -1,3 +1,16 @@ +------------------------------------------------------------------- +Wed Feb 27 14:15:52 UTC 2019 - pgajdos@suse.com + +- added patches + fix https://github.com/icing/mod_h2/issues/167 [bsc#1125965] + + apache2-mod_http2-issue-167.patch + +------------------------------------------------------------------- +Fri Feb 8 01:58:37 UTC 2019 - Jan Engelhardt + +- Replace old $RPM_* shell vars. Avoid old tar syntax. +- Tag scriptlets as explicitly requiring bash. + ------------------------------------------------------------------- Fri Jan 18 15:12:08 UTC 2019 - Manu Maier diff --git a/apache2.spec b/apache2.spec index 2fa1c27..f7cf0af 100644 --- a/apache2.spec +++ b/apache2.spec @@ -145,6 +145,8 @@ Patch111: httpd-visibility.patch # PATCH-FEATURE-UPSTREAM kstreitova@suse.com -- backport of HttpContentLengthHeadZero and HttpExpectStrict Patch115: httpd-2.4.x-fate317766-config-control-two-protocol-options.diff Patch116: deprecated-scripts-arch.patch +# fix https://github.com/icing/mod_h2/issues/167 [bsc#1125965] +Patch117: apache2-mod_http2-issue-167.patch BuildRequires: apache-rpm-macros-control BuildRequires: apr-util-devel #Since 2.4.7 the event MPM requires apr 1.5.0 or later. @@ -334,7 +336,8 @@ to administrators of web servers in general. %if 0%{?suse_version} == 1110 %patch116 -p1 %endif -cat $RPM_SOURCE_DIR/SUSE-NOTICE >> NOTICE +%patch117 -p1 +cat %{_sourcedir}/SUSE-NOTICE >> NOTICE # install READMEs a=$(basename %{SOURCE22}) cp %{SOURCE22} ./${a##%{name}-} @@ -454,8 +457,8 @@ for mpm in %{mpms_to_build}; do #mv %{buildroot}/%{sysconfdir}/httpd2-prefork.conf %{buildroot}/%{sysconfdir}/httpd-std.conf$mpm_suffix # fix up and rename config_vars file: remove references to the RPM build dir; # remove references to RPM build root; fix apr/apu includedir - sed -e "/^EXTRA_INCLUDES/s|-I$RPM_BUILD_DIR[^ ]* ||g" \ - -e "/^AP._INCLUDEDIR/s|$RPM_BUILD_DIR.*$|%{includedir}$mpm_suffix|" \ + sed -e "/^EXTRA_INCLUDES/s|-I%{_builddir}[^ ]* ||g" \ + -e "/^AP._INCLUDEDIR/s|%{builddir}.*$|%{includedir}$mpm_suffix|" \ -e "/abs_srcdir/d" \ -e "/AP_LIBS/d" \ < %{buildroot}/%{installbuilddir}/config_vars.mk \ @@ -544,33 +547,33 @@ install -m 755 support/log_server_status %{buildroot}/%{_bindir}/ install -m 755 support/split-logfile %{buildroot}/%{_bindir}/ install -m 755 support/logresolve.pl %{buildroot}/%{_sbindir}/ mkdir -p %{buildroot}%{_sysconfdir}/logrotate.d -install -m 644 $RPM_SOURCE_DIR/%{name}.logrotate %{buildroot}%{_sysconfdir}/logrotate.d/%{name} +install -m 644 %{_sourcedir}/%{name}.logrotate %{buildroot}/%{_sysconfdir}/logrotate.d/%{name} %if 0%{?suse_version} == 1110 -install -m 644 $RPM_SOURCE_DIR/%{name}-init.logrotate %{buildroot}%{_sysconfdir}/logrotate.d/%{name} +install -m 644 %{_sourcedir}/%{name}-init.logrotate %{buildroot}/%{_sysconfdir}/logrotate.d/%{name} %endif -install -m 755 $RPM_SOURCE_DIR/apache2-check_forensic %{buildroot}/%{_bindir}/check_forensic -install -m 755 $RPM_SOURCE_DIR/apache2-find-directives %{buildroot}/%{_bindir}/ +install -m 755 %{_sourcedir}/apache2-check_forensic %{buildroot}/%{_bindir}/check_forensic +install -m 755 %{_sourcedir}/apache2-find-directives %{buildroot}/%{_bindir}/ # # ssl stuff install -m 755 %{SOURCE25} %{buildroot}/%{_bindir}/ -tar xjf %{SOURCE29} -C %{buildroot}/%{sysconfdir} +tar -xjf %{SOURCE29} -C %{buildroot}/%{sysconfdir} # # init script and friends -install -m 644 $RPM_SOURCE_DIR/apache2-script-helpers %{buildroot}/%{_datadir}/%{name}/script-helpers -install -m 744 $RPM_SOURCE_DIR/start_apache2 %{buildroot}%{_sbindir}/ +install -m 644 %{_sourcedir}/apache2-script-helpers %{buildroot}/%{_datadir}/%{name}/script-helpers +install -m 744 %{_sourcedir}/start_apache2 %{buildroot}/%{_sbindir}/ cp -r deprecated-scripts %{buildroot}/%{_datadir}/%{name}/ %if 0%{?suse_version} >= 1210 mkdir -p %{buildroot}%{_unitdir}/ -install -m 700 $RPM_SOURCE_DIR/apache2-systemd-ask-pass %{buildroot}%{_sbindir}/ -install -m 644 $RPM_SOURCE_DIR/apache2.service %{buildroot}%{_unitdir}/ -install -m 644 $RPM_SOURCE_DIR/apache2@.service %{buildroot}%{_unitdir}/ -install -m 644 $RPM_SOURCE_DIR/apache2.target %{buildroot}%{_unitdir}/ +install -m 700 %{_sourcedir}/apache2-systemd-ask-pass %{buildroot}/%{_sbindir}/ +install -m 644 %{_sourcedir}/apache2.service %{buildroot}/%{_unitdir}/ +install -m 644 %{_sourcedir}/apache2@.service %{buildroot}/%{_unitdir}/ +install -m 644 %{_sourcedir}/apache2.target %{buildroot}/%{_unitdir}/ ln -sf service %{buildroot}/%{_sbindir}/rcapache2 %else mkdir -p %{buildroot}%{_sysconfdir}/init.d mkdir -p %{buildroot}%{_sysconfdir}/%{name}/sysconfig.d -install -m 744 $RPM_SOURCE_DIR/rc.%{name} %{buildroot}%{_initddir}/%{name} +install -m 744 %{_sourcedir}/rc.%{name} %{buildroot}/%{_initddir}/%{name} ln -sf ../..%{_initddir}/%{name} %{buildroot}/%{_sbindir}/rcapache2 for file in find_mpm \ get_includes \ @@ -581,17 +584,17 @@ do chmod +x %{buildroot}/%{_datadir}/%{name}/$file done %endif -install -m 755 $RPM_SOURCE_DIR/sysconf_addword %{buildroot}/%{_datadir}/%{name}/ -install -m 755 $RPM_SOURCE_DIR/a2enflag %{buildroot}/%{_sbindir} +install -m 755 %{_sourcedir}/sysconf_addword %{buildroot}/%{_datadir}/%{name}/ +install -m 755 %{_sourcedir}/a2enflag %{buildroot}/%{_sbindir} ln -s a2enflag %{buildroot}/%{_sbindir}/a2disflag -install -m 755 $RPM_SOURCE_DIR/a2enmod %{buildroot}/%{_sbindir} +install -m 755 %{_sourcedir}/a2enmod %{buildroot}/%{_sbindir} ln -s a2enmod %{buildroot}/%{_sbindir}/a2dismod # # directories for files from other packages and other configuration mkdir -p %{buildroot}/%{sysconfdir}/vhosts.d # # install sysconfig template -install -m 644 $RPM_SOURCE_DIR/sysconfig.%{name} \ +install -m 644 %{_sourcedir}/sysconfig.%{name} \ %{buildroot}/%{_fillupdir}/sysconfig.%{name} # # install configuration files: @@ -616,7 +619,7 @@ for i in default-server.conf \ ssl-global.conf \ protocols.conf do - install -m 644 $RPM_SOURCE_DIR/apache2-$i %{buildroot}/%{sysconfdir}/$i + install -m 644 %{_sourcedir}/apache2-$i %{buildroot}/%{sysconfdir}/$i done cat > %{buildroot}/%{sysconfdir}/uid.conf <<-EOF User %{httpduser} @@ -647,8 +650,8 @@ install -m 644 %{SOURCE104} %{buildroot}/%{sysconfdir}/conf.d/manual.conf # for mod_auth_ldap install -m 644 docs/conf/charset.conv %{buildroot}/%{sysconfdir}/ -cp -p $RPM_SOURCE_DIR/robots.txt . -cp -p $RPM_SOURCE_DIR/favicon.ico %{buildroot}/%{htdocsdir}/ +cp -p %{_sourcedir}/robots.txt . +cp -p %{_sourcedir}/favicon.ico %{buildroot}/%{htdocsdir}/ cat > %{buildroot}/%{htdocsdir}/robots.txt <<-EOF User-Agent: * Disallow: / @@ -1343,12 +1346,12 @@ rm %{buildroot}/%{sysconfdir}/*.test fi \ ) -%post prefork +%post prefork -p /bin/bash %install_httpd_link exit 0 -%postun prefork -if [ $1 -eq 1 ]; then +%postun prefork -p /bin/bash +if [ "$1" = 1 ]; then %apache_request_restart fi %install_httpd_link @@ -1358,12 +1361,12 @@ exit 0 %apache_restart_if_needed exit 0 -%post worker +%post worker -p /bin/bash %install_httpd_link exit 0 -%postun worker -if [ $1 -eq 1 ]; then +%postun worker -p /bin/bash +if [ "$1" = 1 ]; then %apache_request_restart fi %install_httpd_link @@ -1373,12 +1376,12 @@ exit 0 %apache_restart_if_needed exit 0 -%post event +%post event -p /bin/bash %install_httpd_link exit 0 -%postun event -if [ $1 -eq 1 ]; then +%postun event -p /bin/bash +if [ "$1" = 1 ]; then %apache_request_restart fi %install_httpd_link @@ -1398,7 +1401,7 @@ exit 0 %service_del_preun apache2.target %endif # removing the symlink in case of uninstall (not upgrade) [bsc#1041830] -if [ $1 -eq 0 ]; then +if [ "$1" = 0 ]; then for i in %{_sbindir}/httpd \ %{installbuilddir}/config_vars.mk do @@ -1411,7 +1414,7 @@ exit 0 %if 0%{?suse_version} >= 1210 DISABLE_RESTART_ON_UPDATE='yes' %service_del_postun apache2.target -if [ $1 -eq 1 ]; then +if [ "$1" = 1 ]; then %apache_request_restart fi %else