[Spice-devel] [vdagent-win PATCH] RFC spec: run tests during RPM build if possible

Frediano Ziglio fziglio at redhat.com
Thu Jul 20 15:47:01 UTC 2017


> 
> On Thu, Jul 20, 2017 at 11:15:04AM +0100, Frediano Ziglio wrote:
> > Currently to run checks we need Wine for both 32 and 64 bit.
> > Some distros (like RHEL 7) don't seem to allow installing
> > both 32 and 64 bit versions so turn on these checks only
> > on recent Fedora versions.
> > 
> > Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
> > ---
> >  mingw-spice-vdagent.spec.in | 13 +++++++++++++
> >  1 file changed, 13 insertions(+)
> > 
> > This patch apply on top of PNG patches.
> > Is there a better way to test if is possible to installe both
> > Wine 32 and 64? Can we say try to install both but if it can
> > install only one (probably x64) use only this?
> 
> You should be able to change your checks to "if we are on el7 then
> install only one wine version, otherwise install both". Or are you
> asking something different?
> Imo the current patch is good enough already.
> 
> Christophe
> 

Just tried. If I install only wine-core(x86-64) on el7 the line

%mingw_make check

fails trying to execute the test for 32 bit.

> 
> > 
> > diff --git a/mingw-spice-vdagent.spec.in b/mingw-spice-vdagent.spec.in
> > index f874e66..6e62b10 100644
> > --- a/mingw-spice-vdagent.spec.in
> > +++ b/mingw-spice-vdagent.spec.in
> > @@ -2,6 +2,12 @@
> >  
> >  #define _version_suffix -e198
> >  
> > +%if "%{_build_arch}" == "x86_64" && (0%{?fedora} && 0%{?fedora} >= 24)
> > +    %define can_do_check 1
> > +%else
> > +    %define can_do_check 0
> > +%endif
> > +
> >  Name:           mingw-spice-vdagent
> >  Version:        @VERSION@
> >  Release:        1%{?dist}%{?extra_release}
> > @@ -22,6 +28,9 @@ BuildRequires:  mingw64-zlib-static
> >  BuildRequires:  mingw32-winpthreads-static
> >  BuildRequires:  mingw64-winpthreads-static
> >  BuildRequires:  pkgconfig
> > +%if %{can_do_check}
> > +BuildRequires:  ImageMagick wine-core(x86-32) wine-core(x86-64)
> > +%endif
> >  
> >  BuildArch:      noarch
> >  
> > @@ -73,6 +82,10 @@ Features:
> >  %mingw_configure --enable-debug
> >  %mingw_make %{?_smp_mflags} V=1
> >  
> > +%if %{can_do_check}
> > +%check
> > +%mingw_make check
> > +%endif
> >  
> >  %install
> >  %mingw_make_install DESTDIR=$RPM_BUILD_ROOT

Frediano


More information about the Spice-devel mailing list