Hello community,

here is the log from the commit of package apache2-mod_fcgid for 
openSUSE:Factory checked in at 2017-03-24 02:21:57
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/apache2-mod_fcgid (Old)
 and      /work/SRC/openSUSE:Factory/.apache2-mod_fcgid.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "apache2-mod_fcgid"

Fri Mar 24 02:21:57 2017 rev:29 rq:481666 version:2.3.9

Changes:
--------
--- /work/SRC/openSUSE:Factory/apache2-mod_fcgid/apache2-mod_fcgid.changes      
2016-07-30 00:28:27.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.apache2-mod_fcgid.new/apache2-mod_fcgid.changes 
2017-03-24 02:21:58.577333270 +0100
@@ -1,0 +2,5 @@
+Mon Mar 13 11:01:22 UTC 2017 - [email protected]
+
+- add a true example to %check
+
+-------------------------------------------------------------------

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ apache2-mod_fcgid.spec ++++++
--- /var/tmp/diff_new_pack.ffQtws/_old  2017-03-24 02:21:59.145252913 +0100
+++ /var/tmp/diff_new_pack.ffQtws/_new  2017-03-24 02:21:59.149252347 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package apache2-mod_fcgid
 #
-# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2017 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
@@ -30,6 +30,9 @@
 Patch1:         mod_fcgid-2.3.9-CVE-2016-1000104.patch
 BuildRequires:  apache-rpm-macros
 BuildRequires:  apache2-devel
+# for testing
+BuildRequires:  curl
+BuildRequires:  perl-FastCGI
 Requires:       %{apache_mmn}
 Requires:       %{apache_suse_maintenance_mmn}
 Requires:       apache2
@@ -66,11 +69,57 @@
 %check
 set +x
 mkdir -p %{apache_test_module_dir}
+# create test configuration
 cp %{SOURCE1} %{apache_test_module_dir}/mod_fcgid-test.conf
+cat << EOF > %{apache_test_module_dir}/mod_fcgid-test-access.conf
+LogLevel debug
+<Directory %{apache_test_module_dir}/htdocs/fcgi-bin/>
+  SetHandler fcgid-script
+  Options +ExecCGI
+%if 0%{?apache_access_syntax_version} >= 24
+  Require local
+%else
+  Allow from localhost
+%endif
+</Directory>
+EOF
 mkdir -p "%{apache_test_module_dir}%{_localstatedir}/lib/apache2/fcgid/"
 sed -i 
"s:%{_localstatedir}/lib:%{apache_test_module_dir}%{_localstatedir}/lib:" 
%{apache_test_module_dir}/mod_fcgid-test.conf
-%apache_test_module_load -m fcgid -i mod_fcgid-test.conf
+mkdir -p %{apache_test_module_dir}/htdocs/fcgi-bin/
+# create a fcgi script
+cat << 'EOF' > %{apache_test_module_dir}/htdocs/fcgi-bin/showenv.pl
+#!/usr/bin/perl
+use FCGI;
+my $request = FCGI::Request();
+while ($request->Accept() >= 0) {
+  print "Content-Type: text/plain\r\n\r\n";
+  foreach my $env (keys %ENV) { 
+    print "env $env = $ENV{$env}\n";
+  }
+}
+EOF
+chmod 755 %{apache_test_module_dir}/htdocs/fcgi-bin/showenv.pl
+# start apache
+%apache_test_module_start_apache -m fcgid -i 
mod_fcgid-test.conf:mod_fcgid-test-access.conf
+# get the document
+%apache_test_module_curl -d /fcgi-bin/showenv.pl -o 
%{apache_test_module_dir}/output.txt
+# check the output
+echo
+echo 'Testing /fcgi-bin/showenv.pl output'
+exit_code=0
+grep 'HTTP_ACCEPT'    %{apache_test_module_dir}/output.txt || exit_code=1
+grep 'REQUEST_METHOD' %{apache_test_module_dir}/output.txt || exit_code=1
+if [ $exit_code -eq 0 ]; then
+  echo 'SUCCESS'
+else
+  echo 'FAILED, error_log:'
+  cat %{apache_test_module_dir}/error_log
+fi
+echo
+# stop apache
+%apache_test_module_stop_apache
 set -x
+exit $exit_code
 
 %files
 %defattr(-,root,root)


Reply via email to