Merged update from upstream sources
This is an automated DistroBaker update from upstream sources. If you do not know what this is about or would like to opt out, contact the OSCI team. Source: https://src.fedoraproject.org/rpms/perl-Sys-Virt.git#ae3524c5e72cfe2a48d8b2f20d7066bebc583800
This commit is contained in:
parent
b5f37cf885
commit
11ed210153
1
.fmf/version
Normal file
1
.fmf/version
Normal file
@ -0,0 +1 @@
|
||||
1
|
7
gating.yaml
Normal file
7
gating.yaml
Normal file
@ -0,0 +1,7 @@
|
||||
--- !Policy
|
||||
product_versions:
|
||||
- fedora-*
|
||||
decision_context: bodhi_update_push_stable
|
||||
subject_type: koji_build
|
||||
rules:
|
||||
- !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.tier0.functional}
|
@ -1,6 +1,6 @@
|
||||
Name: perl-Sys-Virt
|
||||
Version: 7.0.0
|
||||
Release: 2%{?dist}
|
||||
Release: 3%{?dist}
|
||||
Summary: Represent and manage a libvirt hypervisor connection
|
||||
License: GPLv2+ or Artistic
|
||||
URL: https://metacpan.org/release/Sys-Virt
|
||||
@ -9,6 +9,7 @@ Source0: https://cpan.metacpan.org/authors/id/D/DA/DANBERR/Sys-Virt-v%{ve
|
||||
BuildRequires: coreutils
|
||||
BuildRequires: findutils
|
||||
BuildRequires: gcc
|
||||
BuildRequires: git
|
||||
BuildRequires: libvirt-devel >= %{version}
|
||||
BuildRequires: perl-devel
|
||||
%if 0%{?fedora} || 0%{?rhel} > 7
|
||||
@ -30,11 +31,10 @@ BuildRequires: perl(Test::More)
|
||||
BuildRequires: perl(Time::HiRes)
|
||||
BuildRequires: perl(XML::XPath)
|
||||
BuildRequires: perl(XML::XPath::XMLParser)
|
||||
# Optional tests only
|
||||
BuildRequires: perl(Test::CPAN::Changes)
|
||||
BuildRequires: perl(Test::Pod) >= 1.00
|
||||
BuildRequires: perl(Test::Pod::Coverage) >= 1.00
|
||||
BuildRequires: git
|
||||
# Optional tests are not executed
|
||||
#BuildRequires: perl(Test::CPAN::Changes)
|
||||
#BuildRequires: perl(Test::Pod) >= 1.00
|
||||
#BuildRequires: perl(Test::Pod::Coverage) >= 1.00
|
||||
Requires: perl(:MODULE_COMPAT_%(eval "$(perl -V:version)"; echo $version))
|
||||
|
||||
%description
|
||||
@ -42,9 +42,33 @@ The Sys::Virt module provides a Perl XS binding to the libvirt virtual
|
||||
machine management APIs. This allows machines running within arbitrary
|
||||
virtualization containers to be managed with a consistent API.
|
||||
|
||||
%package tests
|
||||
Summary: Tests for %{name}
|
||||
Requires: %{name} = %{?epoch:%{epoch}:}%{version}-%{release}
|
||||
Requires: perl-Test-Harness
|
||||
|
||||
%description tests
|
||||
Tests from %{name}-%{version}. Execute them
|
||||
with "%{_libexecdir}/%{name}/test".
|
||||
|
||||
%prep
|
||||
%autosetup -S git -n Sys-Virt-v%{version}
|
||||
|
||||
# Help file to recognise the Perl scripts and normalize shebangs
|
||||
for F in t/*.t; do
|
||||
if head -1 "$F" | grep -q -e '^#!.*perl' ; then
|
||||
perl -MConfig -pi -e 's|^#!.*perl\b|$Config{startperl}|' "$F"
|
||||
else
|
||||
perl -i -MConfig -ple 'print $Config{startperl} if $. == 1' "$F"
|
||||
fi
|
||||
chmod +x "$F"
|
||||
done
|
||||
|
||||
# Remove release tests
|
||||
for F in t/005-pod.t t/010-pod-coverage.t t/015-changes.t; do
|
||||
rm "$F"
|
||||
perl -i -ne 'print $_ unless m{^\Q'"$F"'\E}' MANIFEST
|
||||
done
|
||||
|
||||
%build
|
||||
perl Build.PL installdirs=vendor
|
||||
@ -53,9 +77,20 @@ perl Build.PL installdirs=vendor
|
||||
%install
|
||||
./Build install destdir=$RPM_BUILD_ROOT create_packlist=0
|
||||
find $RPM_BUILD_ROOT -type f -name '*.bs' -size 0 -delete
|
||||
|
||||
# Install tests
|
||||
mkdir -p %{buildroot}/%{_libexecdir}/%{name}
|
||||
cp -a t %{buildroot}/%{_libexecdir}/%{name}
|
||||
cat > %{buildroot}/%{_libexecdir}/%{name}/test << 'EOF'
|
||||
#!/bin/sh
|
||||
cd %{_libexecdir}/%{name} && exec prove -I . -j "$(getconf _NPROCESSORS_ONLN)"
|
||||
EOF
|
||||
chmod +x %{buildroot}/%{_libexecdir}/%{name}/test
|
||||
|
||||
%{_fixperms} $RPM_BUILD_ROOT/*
|
||||
|
||||
%check
|
||||
export HARNESS_OPTIONS=j$(perl -e 'if ($ARGV[0] =~ /.*-j([0-9][0-9]*).*/) {print $1} else {print 1}' -- '%{?_smp_mflags}')
|
||||
./Build test
|
||||
|
||||
%files
|
||||
@ -65,8 +100,13 @@ find $RPM_BUILD_ROOT -type f -name '*.bs' -size 0 -delete
|
||||
%{perl_vendorarch}/Sys*
|
||||
%{_mandir}/man3/*
|
||||
|
||||
%files tests
|
||||
%{_libexecdir}/%{name}
|
||||
|
||||
%changelog
|
||||
* Tue Mar 02 2021 Jitka Plesnikova <jplesnik@redhat.com> - 7.0.0-3
|
||||
- Package tests
|
||||
|
||||
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 7.0.0-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
|
||||
|
||||
|
5
plans/sanity.fmf
Normal file
5
plans/sanity.fmf
Normal file
@ -0,0 +1,5 @@
|
||||
summary: Sanity tests
|
||||
discover:
|
||||
how: fmf
|
||||
execute:
|
||||
how: tmt
|
4
tests/upstream-tests.fmf
Normal file
4
tests/upstream-tests.fmf
Normal file
@ -0,0 +1,4 @@
|
||||
summary: Upstream tests
|
||||
component: perl-Sys-Virt
|
||||
require: perl-Sys-Virt-tests
|
||||
test: /usr/libexec/perl-Sys-Virt/test
|
Loading…
Reference in New Issue
Block a user