Compare commits

...

No commits in common. "c8s" and "c10s" have entirely different histories.
c8s ... c10s

9 changed files with 247 additions and 32 deletions

1
.fmf/version Normal file
View File

@ -0,0 +1 @@
1

19
.gitignore vendored
View File

@ -1,2 +1,19 @@
SOURCES/File-MimeInfo-0.28.tar.gz
File-MimeInfo-0.15.tar.gz
/File-MimeInfo-0.16.tar.gz
/File-MimeInfo-0.17.tar.gz
/File-MimeInfo-0.18.tar.gz
/File-MimeInfo-0.19.tar.gz
/File-MimeInfo-0.20.tar.gz
/File-MimeInfo-0.21.tar.gz
/File-MimeInfo-0.22.tar.gz
/File-MimeInfo-0.24.tar.gz
/File-MimeInfo-0.25.tar.gz
/File-MimeInfo-0.26.tar.gz
/File-MimeInfo-0.27.tar.gz
/File-MimeInfo-0.28.tar.gz
/File-MimeInfo-0.29.tar.gz
/File-MimeInfo-0.30.tar.gz
/File-MimeInfo-0.31.tar.gz
/File-MimeInfo-0.32.tar.gz
/File-MimeInfo-0.33.tar.gz
/File-MimeInfo-0.34.tar.gz

23
gating.yaml Normal file
View File

@ -0,0 +1,23 @@
--- !Policy
product_versions:
- fedora-*
decision_context: bodhi_update_push_testing
subject_type: koji_build
rules:
- !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.tier0.functional}
# Rawhide
--- !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}
--- !Policy
product_versions:
- rhel-*
decision_context: osci_compose_gate
rules:
- !PassingTestCaseRule {test_case_name: osci.brew-build.tier0.functional}

View File

@ -0,0 +1,2 @@
from Config import *
addFilter("-tests.noarch: W: no-documentation");

View File

@ -1,58 +1,77 @@
# Run optional tests
%if ! (0%{?rhel})
%{bcond_without perl_File_MimeInfo_enables_optional_test}
# Require shared-mime-info to suppress warnings about missing
# /usr/share/mime/globs
%{bcond_without perl_File_MimeInfo_enables_shared_mime_info}
%else
%{bcond_with perl_File_MimeInfo_enables_optional_test}
%endif
# Use IO::Scalar to support processing a standard input in a mimetype tool
%{bcond_without perl_File_MimeInfo_enables_stdin}
# Use Pod::Usage to support printing a usage text by a mimetype tool
%{bcond_without perl_File_MimeInfo_enables_usage}
Name: perl-File-MimeInfo
Version: 0.28
Release: 7%{?dist}
Version: 0.34
Release: 5%{?dist}
Summary: Determine file type and open application
License: GPL+ or Artistic
Group: Development/Libraries
URL: http://search.cpan.org/dist/File-MimeInfo/
Source0: http://www.cpan.org/authors/id/M/MI/MICHIELB/File-MimeInfo-%{version}.tar.gz
License: GPL-1.0-or-later OR Artistic-1.0-Perl
URL: https://metacpan.org/release/File-MimeInfo
Source0: https://cpan.metacpan.org/authors/id/M/MI/MICHIELB/File-MimeInfo-%{version}.tar.gz
BuildArch: noarch
BuildRequires: findutils
BuildRequires: coreutils
BuildRequires: make
BuildRequires: perl-interpreter
BuildRequires: perl-generators
BuildRequires: perl(ExtUtils::MakeMaker)
BuildRequires: perl-interpreter
BuildRequires: perl(ExtUtils::MakeMaker) >= 6.76
BuildRequires: perl(strict)
BuildRequires: perl(warnings)
# Run-time:
BuildRequires: perl(bytes)
BuildRequires: perl(Carp)
BuildRequires: perl(Encode)
BuildRequires: perl(Encode::Locale)
BuildRequires: perl(Exporter)
BuildRequires: perl(Fcntl)
BuildRequires: perl(File::BaseDir) >= 0.03
BuildRequires: perl(File::DesktopEntry) >= 0.04
BuildRequires: perl(File::Spec)
# Optional run-time:
%if %{with perl_File_MimeInfo_enables_stdin}
BuildRequires: perl(IO::Scalar)
%endif
%if %{with perl_File_MimeInfo_enables_usage}
BuildRequires: perl(Pod::Usage)
%endif
# Tests:
BuildRequires: perl(Test::More)
BuildRequires: perl(FindBin)
BuildRequires: perl(File::Temp)
BuildRequires: perl(Test::More) >= 0.88
# Needed for creating of mimeinfo.cache in tests
BuildRequires: desktop-file-utils
# t/11mimeinfo.t executes ./mimetype that returns an unexpected MIME type
# without shared-mime-info database
BuildRequires: shared-mime-info
%if %{with perl_File_MimeInfo_enables_optional_test}
# Optional tests:
%if !%{defined perl_bootstrap}
# Break build cycle: perl-Path-Tiny → perl-Unicode-UTF8 →
# perl-Module-Install-ReademFromPod → perl-IO-All → perl-File-MimeInfo
# perl-Module-Install-ReadmeFromPod → perl-IO-All → perl-File-MimeInfo
BuildRequires: perl(Path::Tiny)
%endif
BuildRequires: perl(Test::Pod) >= 1.00
BuildRequires: perl(Test::Pod::Coverage) >= 1.00
%if %{with perl_File_MimeInfo_enables_shared_mime_info}
# needed for some tests otherwise there are warnings
BuildRequires: shared-mime-info
# Test::Pod::No404s not used
%endif
%endif
%if %{with perl_File_MimeInfo_enables_shared_mime_info}
# there is also a mimeinfo.cache file created by desktop-file-utils
# needed. It won't be there if building in a chroot, even if
# desktop-file-utils is installed if desktop-file-utils was never run.
Requires: shared-mime-info
%endif
Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))
Requires: perl(File::BaseDir) >= 0.03
Requires: perl(File::DesktopEntry) >= 0.04
%if %{with perl_File_MimeInfo_enables_stdin}
Recommends: perl(IO::Scalar)
%endif
%if %{with perl_File_MimeInfo_enables_usage}
Recommends: perl(Pod::Usage)
%endif
# It's optional, but without it File::MimeInfo produces an annoying warning
# about a missing /usr/share/mime/globs and returns inaccurate results.
Recommends: shared-mime-info
# Filter under-specified dependencies
%global __requires_exclude %{?__requires_exclude:%__requires_exclude|}^perl\\((File::BaseDir|File::DesktopEntry)\\)$
@ -61,19 +80,48 @@ Requires: perl(File::DesktopEntry) >= 0.04
This module can be used to determine the mime type of a file. It tries to
implement the freedesktop specification for a shared MIME database.
%package tests
Summary: Tests for %{name}
Requires: %{name} = %{?epoch:%{epoch}:}%{version}-%{release}
Requires: desktop-file-utils
Requires: perl-Test-Harness
Requires: shared-mime-info
%description tests
Tests from %{name}. Execute them
with "%{_libexecdir}/%{name}/test".
%prep
%setup -q -n File-MimeInfo-%{version}
# Remove test, which tests tool app in different place.
rm -f t/11mimeinfo.t
# Fix permissions
chmod -x t/default/binary_file
chmod -x t/magic/application_x-executable
# Help generators to recognize Perl scripts
for F in t/*.t; do
perl -i -MConfig -ple 'print $Config{startperl} if $. == 1 && !s{\A#!\s*perl}{$Config{startperl}}' "$F"
chmod +x "$F"
done
%build
perl Makefile.PL INSTALLDIRS=vendor
make %{?_smp_mflags}
perl Makefile.PL INSTALLDIRS=vendor NO_PACKLIST=1 NO_PERLLOCAL=1
%{make_build}
%install
make pure_install DESTDIR=$RPM_BUILD_ROOT
find $RPM_BUILD_ROOT -type f -name .packlist -delete
%{_fixperms} $RPM_BUILD_ROOT/*
%{make_install}
%{_fixperms} %{buildroot}/*
# 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
%check
unset EXTENDED_TESTING
make test
%files
@ -84,7 +132,108 @@ make test
%{_mandir}/man1/*
%{_mandir}/man3/*
%files tests
%{_libexecdir}/%{name}
%changelog
* Tue Oct 29 2024 Troy Dawson <tdawson@redhat.com> - 0.34-5
- Bump release for October 2024 mass rebuild:
Resolves: RHEL-64018
* Mon Jun 24 2024 Troy Dawson <tdawson@redhat.com> - 0.34-4
- Bump release for June 2024 mass rebuild
* Thu Jan 25 2024 Fedora Release Engineering <releng@fedoraproject.org> - 0.34-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Sun Jan 21 2024 Fedora Release Engineering <releng@fedoraproject.org> - 0.34-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Mon Dec 04 2023 Jitka Plesnikova <jplesnik@redhat.com> - 0.34-1
- 0.34 bump (rhbz#2252645)
* Thu Jul 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.33-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
* Fri Jan 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.33-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
* Fri Jul 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.33-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
* Wed Jul 13 2022 Jitka Plesnikova <jplesnik@redhat.com> - 0.33-1
- 0.33 bump
* Fri Jun 03 2022 Jitka Plesnikova <jplesnik@redhat.com> - 0.32-3
- Perl 5.36 re-rebuild of bootstrapped packages
* Wed Jun 01 2022 Jitka Plesnikova <jplesnik@redhat.com> - 0.32-2
- Perl 5.36 rebuild
* Mon Mar 07 2022 Michal Josef Špaček <mspacek@redhat.com> - 0.32-1
- 0.32 bump
- Package tests
* Fri Jan 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.31-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
* Thu Jan 06 2022 Jitka Plesnikova <jplesnik@redhat.com> - 0.31-1
- 0.31 bump
* Thu Jul 22 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.30-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
* Mon May 24 2021 Jitka Plesnikova <jplesnik@redhat.com> - 0.30-4
- Perl 5.34 re-rebuild of bootstrapped packages
* Fri May 21 2021 Jitka Plesnikova <jplesnik@redhat.com> - 0.30-3
- Perl 5.34 rebuild
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.30-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Tue Oct 27 2020 Jitka Plesnikova <jplesnik@redhat.com> - 0.30-1
- 0.30 bump
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.29-10
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Fri Jun 26 2020 Jitka Plesnikova <jplesnik@redhat.com> - 0.29-9
- Perl 5.32 re-rebuild of bootstrapped packages
* Tue Jun 23 2020 Jitka Plesnikova <jplesnik@redhat.com> - 0.29-8
- Perl 5.32 rebuild
* Tue Jun 23 2020 Petr Pisar <ppisar@redhat.com> - 0.29-7
- Specify all dependencies
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.29-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.29-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Sun Jun 02 2019 Jitka Plesnikova <jplesnik@redhat.com> - 0.29-4
- Perl 5.30 re-rebuild of bootstrapped packages
* Fri May 31 2019 Jitka Plesnikova <jplesnik@redhat.com> - 0.29-3
- Perl 5.30 rebuild
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.29-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
* Mon Aug 06 2018 Jitka Plesnikova <jplesnik@redhat.com> - 0.29-1
- 0.29 bump
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.28-10
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
* Sat Jun 30 2018 Jitka Plesnikova <jplesnik@redhat.com> - 0.28-9
- Perl 5.28 re-rebuild of bootstrapped packages
* Thu Jun 28 2018 Jitka Plesnikova <jplesnik@redhat.com> - 0.28-8
- Perl 5.28 rebuild
* Thu Feb 08 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.28-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild

5
plans/sanity.fmf Normal file
View File

@ -0,0 +1,5 @@
summary: Sanity tests
discover:
how: fmf
execute:
how: tmt

3
rpminspect.yaml Normal file
View File

@ -0,0 +1,3 @@
---
annocheck:
- rhel-policy: --skip-pie --ignore-unknown --verbose

View File

@ -1 +1 @@
SHA512 (File-MimeInfo-0.28.tar.gz) = 894bf234cb5ff01d6bc995f857549e854457cd3eb8df17ce55bb63348def2c63e818d1add8617ad1ace20d9024e68cce954984328707ab51afcc818d47a9d5c0
SHA512 (File-MimeInfo-0.34.tar.gz) = 5ce15976aa5ed59563ae64339aeefed426e97aa22448005e0dd50b8fee32237faafc59308cdad9d7eea6c3e3b58c41032d1f4fa670bc17d4ad58ca07743d015f

15
tests/upstream-tests.fmf Normal file
View File

@ -0,0 +1,15 @@
summary: Upstream tests
contact: Jitka Plesnikova <jplesnik@redhat.com>
component: perl-File-MimeInfo
require: perl-File-MimeInfo-tests
test: /usr/libexec/perl-File-MimeInfo/test
enabled: true
tag:
- rhel-buildroot
- TestCaseCopy
- Tier1
tier: '1'
adjust:
- enabled: false
when: distro < rhel-10 or distro < centos-stream-10
continue: false