# Perform optional tests %bcond_without perl_Sys_Detect_Virtualization_enables_optional_test Name: perl-Sys-Detect-Virtualization Version: 0.107 Release: 32%{?dist} Summary: Library to detect if a UNIX system is running as a virtual machine License: GPL+ or Artistic URL: https://metacpan.org/release/Sys-Detect-Virtualization Source0: https://cpan.metacpan.org/modules/by-module/Sys/Sys-Detect-Virtualization-%{version}.tar.gz # Included from https://rt.cpan.org/Public/Bug/Display.html?id=86673 to allow building on archs that do not have Parse::DMIDecode Patch1: sys_detect_virt_dmidecode.patch # Included from https://rt.cpan.org/Public/Bug/Display.html?id=95536 to pass POD tests Patch2: sys_detect_virt_perldoc.patch BuildRequires: coreutils BuildRequires: make BuildRequires: perl-interpreter BuildRequires: perl-generators BuildRequires: perl(inc::Module::Install) BuildRequires: perl(Module::Install::Metadata) BuildRequires: perl(Module::Install::Scripts) BuildRequires: perl(Module::Install::WriteAll) # Run-time: BuildRequires: perl(:VERSION) >= 5.8 BuildRequires: perl(base) BuildRequires: perl(constant) # Getopt::Long not used at tests # The dmidecode package (and perl-Parse-DMIDecode) are only available on the # following architectures %ifarch %{ix86} x86_64 ia64 BuildRequires: perl(Parse::DMIDecode) >= 0.03 %endif # Pod::Usage not used at tests # POSIX not used at tests BuildRequires: perl(strict) BuildRequires: perl(warnings) # Tests: BuildRequires: perl(File::Spec) BuildRequires: perl(IO::File) BuildRequires: perl(lib) BuildRequires: perl(Test::Deep) BuildRequires: perl(Test::Exception) BuildRequires: perl(Test::More) >= 0.82 %if %{with perl_Sys_Detect_Virtualization_enables_optional_test} # Optional tests: BuildRequires: perl(Pod::Coverage) >= 0.18 # Test::CheckManifest not used BuildRequires: perl(Test::Pod) >= 1.22 BuildRequires: perl(Test::Pod::Coverage) >= 1.08 %endif %ifarch %{ix86} x86_64 ia64 Requires: perl(Parse::DMIDecode) >= 0.03 %endif # There is no need for a debug package. The only reason an arch is important # is because of the BuildRequires not available everywhere. %global debug_package %{nil} %description This module attempts to detect whether or not a system is running as a guest under virtualization, using various heuristics. %package -n virtdetect Summary: Detect if a UNIX system is running as a virtual machine # The BuildArch is now irrelevant, Sys::Detect::Virtualization hides the dependency on dmidecode BuildArch: noarch %description -n virtdetect This script attempts to detect whether or not a system is running as a guest under virtualization, using various heuristics. %prep %setup -q -n Sys-Detect-Virtualization-%{version} %patch1 -p1 %patch2 -p1 # Remove bundled modules rm -rf ./inc perl -i -ne 'print $_ unless m{^inc/}' MANIFEST %if !%{with perl_Sys_Detect_Virtualization_enables_optional_test} rm t/pod.t t/pod-coverage.t perl -i -ne 'print $_ unless m{^t/pod.*\.t}' MANIFEST %endif %build perl Makefile.PL INSTALLDIRS=vendor NO_PACKLIST=1 NO_PERLLOCAL=1 %{make_build} %install %{make_install} %{_fixperms} $RPM_BUILD_ROOT/* %check unset RELEASE_TESTING make test %files %doc Changes README %{perl_vendorlib}/* %{_mandir}/man3/* %files -n virtdetect %doc README %{_mandir}/man1/* %{_bindir}/* %changelog * Thu Jan 25 2024 Fedora Release Engineering - 0.107-32 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild * Sun Jan 21 2024 Fedora Release Engineering - 0.107-31 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild * Fri Jul 21 2023 Fedora Release Engineering - 0.107-30 - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild * Fri Jan 20 2023 Fedora Release Engineering - 0.107-29 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild * Fri Jul 22 2022 Fedora Release Engineering - 0.107-28 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild * Wed Jun 01 2022 Jitka Plesnikova - 0.107-27 - Perl 5.36 rebuild * Fri Jan 21 2022 Fedora Release Engineering - 0.107-26 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild * Thu Jul 22 2021 Fedora Release Engineering - 0.107-25 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild * Fri May 21 2021 Jitka Plesnikova - 0.107-24 - Perl 5.34 rebuild * Wed Jan 27 2021 Fedora Release Engineering - 0.107-23 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild * Tue Jul 28 2020 Fedora Release Engineering - 0.107-22 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild * Tue Jun 23 2020 Jitka Plesnikova - 0.107-21 - Perl 5.32 rebuild * Tue Mar 10 2020 Petr Pisar - 0.107-20 - Modernize a spec file * Thu Jan 30 2020 Fedora Release Engineering - 0.107-19 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild * Fri Jul 26 2019 Fedora Release Engineering - 0.107-18 - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild * Fri May 31 2019 Jitka Plesnikova - 0.107-17 - Perl 5.30 rebuild * Sat Feb 02 2019 Fedora Release Engineering - 0.107-16 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild * Fri Jul 13 2018 Fedora Release Engineering - 0.107-15 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild * Thu Jun 28 2018 Jitka Plesnikova - 0.107-14 - Perl 5.28 rebuild * Fri Feb 09 2018 Fedora Release Engineering - 0.107-13 - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild * Thu Aug 03 2017 Fedora Release Engineering - 0.107-12 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild * Thu Jul 27 2017 Fedora Release Engineering - 0.107-11 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild * Mon Jun 05 2017 Jitka Plesnikova - 0.107-10 - Perl 5.26 rebuild * Wed May 17 2017 Petr Pisar - 0.107-9 - Fix building on Perl without "." in @INC (CPAN RT#121721) * Sat Feb 11 2017 Fedora Release Engineering - 0.107-8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild * Sun May 15 2016 Jitka Plesnikova - 0.107-7 - Perl 5.24 rebuild * Thu Feb 04 2016 Fedora Release Engineering - 0.107-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild * Thu Jun 18 2015 Fedora Release Engineering - 0.107-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild * Fri Jun 05 2015 Jitka Plesnikova - 0.107-4 - Perl 5.22 rebuild * Thu Aug 28 2014 Jitka Plesnikova - 0.107-3 - Perl 5.20 rebuild * Sun Aug 17 2014 Fedora Release Engineering - 0.107-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild * Sun Jun 22 2014 David Dick - 0.107-1 - Update to 0.107-1 * Sat Jun 07 2014 Fedora Release Engineering - 0.106-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild * Sun May 11 2014 David Dick - 0.106-1 - Initial release