This commit is contained in:
parent
3f28751d8a
commit
bfa2531332
@ -1,170 +0,0 @@
|
||||
#
|
||||
# spec file for package apache-rex-check
|
||||
#
|
||||
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
# upon. The license for this file, and modifications and additions to the
|
||||
# file, is the same license as for the pristine package itself (unless the
|
||||
# license for the pristine package is not an Open Source License, in which
|
||||
# case the license is the MIT License). An "Open Source License" is a
|
||||
# license that conforms to the Open Source Definition (Version 1.9)
|
||||
# published by the Open Source Initiative.
|
||||
|
||||
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
||||
#
|
||||
|
||||
Name: apache-rex-check
|
||||
Version: 20170912
|
||||
Release: 0
|
||||
Summary: Apache HTTPD Runnable Examples
|
||||
License: Apache-2.0
|
||||
Group: Productivity/Networking/Web/Servers
|
||||
Url: https://github.com/pgajdos/apache-rex
|
||||
# in case we would want to drop this dependency:
|
||||
# needed just for %%{apache_version}
|
||||
BuildRequires: apache-rpm-macros
|
||||
BuildRequires: apache-rex
|
||||
BuildRequires: gdb
|
||||
BuildRequires: libapr-util1-dbd-sqlite3
|
||||
%if %{?suse_version} > 1320 || (0%{?is_opensuse} == 1 && 0%{?suse_version} == 1315)
|
||||
# it should also work for 12sp2, but how I can specify it?
|
||||
BuildRequires: nghttp2
|
||||
%endif
|
||||
%if 0%{?suse_version} > 1110
|
||||
BuildRequires: perl-FastCGI
|
||||
%endif
|
||||
%if 0%{?suse_version} > 1110
|
||||
BuildRequires: php-fpm
|
||||
%endif
|
||||
BuildRequires: ps
|
||||
BuildRequires: python
|
||||
%if 0%{?is_opensuse} == 1 || 0%{?suse_version} == 1110
|
||||
BuildRequires: python-scgi
|
||||
%endif
|
||||
%if 0%{?suse_version} > 1110
|
||||
BuildRequires: python-tornado
|
||||
%endif
|
||||
%if 0%{?suse_version} >= 1315 && 0%{?suse_version} != 1320
|
||||
BuildRequires: python-websocket-client
|
||||
%endif
|
||||
BuildRequires: sqlite3
|
||||
%if 0%{?suse_version} > 1110
|
||||
BuildRequires: spawn-fcgi
|
||||
%endif
|
||||
BuildRequires: vsftpd
|
||||
%if 0%{?suse_version} > 1320
|
||||
# for vsftpd; otherwise I get in error_log for mod_proxy_ftp-basic:
|
||||
# [Mon May 22 14:20:11.099478 2017] [proxy:error] [pid 2194] [client 127.0.0.1:42608] AH00898: OOPS: vsftpd: cannot locate user specified in 'ftp_username':ftp returned by /
|
||||
# [Mon May 22 14:20:11.151552 2017] [proxy:error] [pid 2195] [client 127.0.0.1:42612] AH00898: OOPS: vsftpd: cannot locate user specified in 'ftp_username':ftp returned by /welcome
|
||||
Requires(pre): user(ftp)
|
||||
Requires(pre): group(ftp)
|
||||
%endif
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
BuildArch: noarch
|
||||
|
||||
%description
|
||||
Package that checks all runnable examples from apache-rex
|
||||
run properly.
|
||||
|
||||
%prep
|
||||
|
||||
%build
|
||||
|
||||
%install
|
||||
|
||||
%check
|
||||
exit_code=0
|
||||
#
|
||||
# expected failed runs
|
||||
#
|
||||
XFAIL_RUNS=""
|
||||
# on changeroot, currently on tumbleweed, dumping the core does not
|
||||
# seem to work:
|
||||
# :/ # cat sigsegv.c
|
||||
#int main(void)
|
||||
#{
|
||||
#char *s = "hello world";
|
||||
#*s = 'H';
|
||||
#}
|
||||
#
|
||||
#:/ # gcc -o sigsegv sigsegv.c
|
||||
#:/ # ./sigsegv
|
||||
#Segmentation fault (core dumped)
|
||||
#:/ # coredumpctl list
|
||||
#No coredumps found.
|
||||
#:/ # cat /proc/sys/kernel/core_pattern
|
||||
#|/usr/lib/systemd/systemd-coredump %P %u %g %s %t %c %e
|
||||
#:/ #
|
||||
%if 0%{?suse_version} > 1320
|
||||
XFAIL_RUNS="$XFAIL_RUNS debug-coredump"
|
||||
%endif
|
||||
# curl seem to have some issues with http2 protocol in 42.2 (12sp2) run
|
||||
# this way (newer curl works on the same server):
|
||||
#
|
||||
# ex. on the same 42.2 (12sp2) server, with
|
||||
# -> 42.2 (12sp2) curl:
|
||||
# $ curl -s -v --http2 -k https://localhost:60081/vh1/
|
||||
# $
|
||||
#
|
||||
# -> tumblweed curl:
|
||||
# $ curl -s -v --http2 -k https://localhost:60081/vh1/ 2>&1 | grep 'Using HTTP2'
|
||||
# * Using HTTP2, server supports multi-use
|
||||
# $
|
||||
%if 0%{?sle_version} == 120200
|
||||
XFAIL_RUNS="mod_http2-basic"
|
||||
%endif
|
||||
%if 0%{apache_version} <= 20420
|
||||
# mod_proxy_express have a bug https://bz.apache.org/bugzilla/show_bug.cgi?id=59230, fixed in 2.4.20
|
||||
# not backported
|
||||
XFAIL_RUNS="$XFAIL_RUNS mod_proxy_express-basic"
|
||||
%endif
|
||||
%if 0%{?suse_version} == 1320
|
||||
# mod_proxy_balancer have a bug https://bz.apache.org/bugzilla/show_bug.cgi?id=56925, fixed in 2.4.13
|
||||
# will be backported to sle12 trough bsc#951692
|
||||
XFAIL_RUNS="$XFAIL_RUNS mod_proxy_balancer-abz56925"
|
||||
%endif
|
||||
%if 0%{?suse_version} < 1315
|
||||
# HTTPOXY vulnerability, https://bugzilla.suse.com/show_bug.cgi?id=988488
|
||||
# SLE11: we do not have updates in obs
|
||||
XFAIL_RUNS="$XFAIL_RUNS mod_cgi-httpoxy"
|
||||
%endif
|
||||
%if 0%{?suse_version} == 1110
|
||||
# probably CVE-2003-1418 fix is not propagated from 11sp3 to OBS
|
||||
# on 11sp4 this test would succed, I can not distinguish between
|
||||
# 11sp4 and 11sp3 though; therefore, this following can be removed
|
||||
# as soon as 11sp3 build is turned off
|
||||
XFAIL_RUNS="$XFAIL_RUNS core-FileETag-basic"
|
||||
%endif
|
||||
# behaviour of logging to script_log changed in time*), it is debug
|
||||
# only, so test only for recent versions
|
||||
# *) e. g. http://svn.apache.org/viewvc?view=revision&revision=1626978
|
||||
%if 0%{apache_version} < 20416
|
||||
XFAIL_RUNS="$XFAIL_RUNS mod_cgi-ScriptLog"
|
||||
%endif
|
||||
# I guess stderr won't work for 2.2 this way, needs to be investigated
|
||||
%if 0%{apache_version} < 20300
|
||||
XFAIL_RUNS="$XFAIL_RUNS mod_cgi-stderr"
|
||||
%endif
|
||||
#
|
||||
echo "Expected FAILURES: $XFAIL_RUNS"
|
||||
#
|
||||
# run examples
|
||||
#
|
||||
cd %{_docdir}/apache-rex
|
||||
VERBOSITY=2 run-rex contents | tee run_log
|
||||
#
|
||||
# check failed ones against expected failures
|
||||
#
|
||||
failed_examples=$(grep 'FAILED RUNS:' run_log | sed 's/^FAILED RUNS://')
|
||||
for dir in $failed_examples; do
|
||||
test_name=$(echo $dir | sed 's:^[0-9]*-::')
|
||||
if [[ ! "$XFAIL_RUNS" =~ "$test_name" ]]; then
|
||||
echo $test_name SHOULD NOT FAIL
|
||||
exit_code=1
|
||||
fi
|
||||
done
|
||||
exit $exit_code
|
||||
|
||||
%changelog
|
Loading…
Reference in New Issue
Block a user