- maybe make spec acceptable for factory bot

- modified sources
  % _multibuild

OBS-URL: https://build.opensuse.org/package/show/Apache/apache2?expand=0&rev=629
This commit is contained in:
Petr Gajdos 2020-12-01 13:16:34 +00:00 committed by Git OBS Bridge
parent f6465726fb
commit c948dcfbad
3 changed files with 33 additions and 26 deletions

View File

@ -1,13 +1,13 @@
<multibuild>
<package>mpm_event</package>
<package>mpm_worker</package>
<package>mpm_prefork</package>
<package>event</package>
<package>worker</package>
<package>prefork</package>
<package>utils</package>
<package>devel</package>
<package>manual</package>
<package>test_mpm_event</package>
<package>test_mpm_worker</package>
<package>test_mpm_prefork</package>
<package>test_event</package>
<package>test_worker</package>
<package>test_prefork</package>
<package>test_devel</package>
<package>test_main</package>
</multibuild>

View File

@ -1,3 +1,10 @@
-------------------------------------------------------------------
Tue Dec 1 13:14:29 UTC 2020 - pgajdos@suse.com
- maybe make spec acceptable for factory bot
- modified sources
% _multibuild
-------------------------------------------------------------------
Tue Dec 1 09:44:08 UTC 2020 - pgajdos@suse.com

View File

@ -20,19 +20,23 @@
%global testsuite_name %{upstream_name}-framework
%global tversion svn1878849
%global flavor @BUILD_FLAVOR@%{nil}
%global mpm %(echo "%{flavor}" | grep -q "mpm" && { echo "%{flavor}" | sed 's:\\(test_\\|\\)mpm_::'; })
# test installed packages
%global test %(echo "%{flavor}" | grep -q "test_" && echo 1 || echo 0)
# way how to translate _multibuild flavor (like for %%{test}) to BuildRequires conditional not found
%if "%{flavor}" == "test_mpm_prefork" || "%{flavor}" == "test_mpm_worker" || "%{flavor}" == "test_mpm_event" || "%{flavor}" == "test_devel" || "%{flavor}" == "test_main"
%bcond_without test_build_requires
%if "%{flavor}" == "test_mpm_prefork" || "%{flavor}" == "test_mpm_worker" || "%{flavor}" == "test_mpm_event"
%bcond_without unittest_build_requires
%else
%bcond_with unittest_build_requires
%define mpm %{nil}
%if "%{flavor}" == "prefork" || "%{flavor}" == "test_prefork"
%define mpm prefork
%endif
%if "%{flavor}" == "worker" || "%{flavor}" == "test_worker"
%define mpm worker
%endif
%if "%{flavor}" == "event" || "%{flavor}" == "test_event"
%define mpm event
%endif
%define test 0
%define unittest 0
%if "%{flavor}" == "test_prefork" || "%{flavor}" == "test_worker" || "%{flavor}" == "test_event" || "%{flavor}" == "test_devel" || "%{flavor}" == "test_main"
%define test 1
%if "%{flavor}" == "test_prefork" || "%{flavor}" == "test_worker" || "%{flavor}" == "test_event"
%define unittest 1
%endif
%else
%bcond_with test_build_requires
%endif
%if "%{mpm}" == "prefork"
%define mpm_alt_prio 10
@ -81,13 +85,9 @@
%define suexec_safepath %{_prefix}/local/bin:%{_prefix}/bin:/bin
%define psuffix %{nil}
%if "%{mpm}" != ""
%define psuffix -%{mpm}
%else
%if "%{flavor}" != ""
%define psuffix -%{flavor}
%endif
%endif
%if 0%{?suse_version} >= 1500
%define use_firewalld 1
@ -213,7 +213,7 @@ BuildRequires: zlib-devel
BuildRequires: pkgconfig(libsystemd)
BuildRequires: pkgconfig(systemd)
# SECTION test requirements
%if %{with test_build_requires}
%if %{test}
BuildRequires: apache-rpm-macros
BuildRequires: apache2
BuildRequires: apache2-devel
@ -222,7 +222,8 @@ BuildRequires: apache2-manual
BuildRequires: apache2-prefork
BuildRequires: apache2-utils
BuildRequires: apache2-worker
%if %{with unittest_build_requires}
%endif
%if %{unittest}
BuildRequires: mod_php_any
# perl-doc is assumed by t/filter/case.t (/usr/lib/perl5/*/pod/perlsub.pod)
BuildRequires: perl-doc
@ -246,7 +247,6 @@ BuildRequires: perl(Protocol::HTTP2::Client)
%endif
BuildRequires: netcfg
%endif
%endif
# /SECTION
%if "%{mpm}" != ""
Provides: apache2-MPM
@ -734,7 +734,7 @@ sleep 1
exit $exit_code
%endif
# unittest run in test_mpm_* flavors
# unittest run in test_$MPM flavors
echo "Run httpd-framework unittests"
cd httpd-framework
perl Makefile.PL -apxs %{apache_apxs}