| |
@@ -1,10 +1,10 @@
|
| |
%bcond_without RRD
|
| |
|
| |
Name: perl-Log-Log4perl
|
| |
- Version: 1.55
|
| |
- Release: 2%{?dist}
|
| |
+ Version: 1.56
|
| |
+ Release: 1%{?dist}
|
| |
Summary: Log4j implementation for Perl
|
| |
- License: GPL+ or Artistic
|
| |
+ License: GPL-1.0-or-later OR Artistic-1.0-Perl
|
| |
URL: https://metacpan.org/release/Log-Log4perl
|
| |
Source0: https://cpan.metacpan.org/authors/id/E/ET/ETJ/Log-Log4perl-%{version}.tar.gz
|
| |
BuildArch: noarch
|
| |
@@ -75,6 +75,11 @@
|
| |
Requires: perl(Sys::Hostname)
|
| |
Requires: perl(Time::HiRes)
|
| |
|
| |
+ # Filter modules bundled for tests
|
| |
+ %global __provides_exclude_from %{?__provides_exclude_from:%__provides_exclude_from|}^%{_libexecdir}
|
| |
+ %global __requires_exclude %{?__requires_exclude:%__requires_exclude|}^perl\\(Log4perlInternalTest\\)
|
| |
+ %global __requires_exclude %{__requires_exclude}|^perl\\(L4pResurrectable\\)
|
| |
+
|
| |
%description
|
| |
Log::Log4perl lets you remote-control and fine-tune the logging
|
| |
behavior of your system from the outside. It implements the widely
|
| |
@@ -118,6 +123,23 @@
|
| |
Log::Log4perl::Config::DOMConfigurator adds support for log4j XML
|
| |
configuration files to Log::Log4perl Perl logging system.
|
| |
|
| |
+ %package tests
|
| |
+ Summary: Tests for %{name}
|
| |
+ Requires: %{name} = %{?epoch:%{epoch}:}%{version}-%{release}
|
| |
+ Requires: perl-Test-Harness
|
| |
+ Requires: perl(Filter::Util::Call)
|
| |
+ # Optional tests
|
| |
+ %if ! (0%{?rhel} >= 7)
|
| |
+ Requires: perl(DBD::CSV) >= 0.33
|
| |
+ Requires: perl(DBI) >= 1.607
|
| |
+ Requires: perl(Log::Dispatch)
|
| |
+ Requires: perl(SQL::Statement) >= 1.20
|
| |
+ Requires: perl(Sys::Syslog)
|
| |
+ %endif
|
| |
+
|
| |
+ %description tests
|
| |
+ Tests from %{name}. Execute them
|
| |
+ with "%{_libexecdir}/%{name}/test".
|
| |
|
| |
%prep
|
| |
%setup -q -n Log-Log4perl-%{version}
|
| |
@@ -125,6 +147,12 @@
|
| |
perl -MConfig -pi -e 's|^#!/usr/local/bin/perl|$Config{startperl}|' \
|
| |
eg/newsyslog-test eg/benchmarks/simple
|
| |
|
| |
+ # Help generators to recognize Perl scripts
|
| |
+ for F in t/*.t t/*.pl; do
|
| |
+ perl -i -MConfig -ple 'print $Config{startperl} if $. == 1 && !s{\A#!.*perl\b}{$Config{startperl}}' "$F"
|
| |
+ chmod +x "$F"
|
| |
+ done
|
| |
+
|
| |
%build
|
| |
perl Makefile.PL INSTALLDIRS=vendor NO_PACKLIST=1 NO_PERLLOCAL=1
|
| |
%{make_build}
|
| |
@@ -133,6 +161,23 @@
|
| |
%{make_install}
|
| |
%{_fixperms} %{buildroot}/*
|
| |
|
| |
+ # Install tests
|
| |
+ mkdir -p %{buildroot}%{_libexecdir}/%{name}
|
| |
+ cp -a eg t %{buildroot}%{_libexecdir}/%{name}
|
| |
+ cat > %{buildroot}%{_libexecdir}/%{name}/test << 'EOF'
|
| |
+ #!/bin/bash
|
| |
+ set -e
|
| |
+ # Some tests write into temporary files/directories. The easiest solution
|
| |
+ # is to copy the tests into a writable directory and execute them from there.
|
| |
+ DIR=$(mktemp -d)
|
| |
+ pushd "$DIR"
|
| |
+ cp -a %{_libexecdir}/%{name}/* ./
|
| |
+ prove -I . -j "$(getconf _NPROCESSORS_ONLN)"
|
| |
+ popd
|
| |
+ rm -rf "$DIR"
|
| |
+ EOF
|
| |
+ chmod +x %{buildroot}%{_libexecdir}/%{name}/test
|
| |
+
|
| |
%check
|
| |
# Shared memory tests guarded with L4P_ALL_TESTS fail in mock.
|
| |
make test
|
| |
@@ -169,7 +214,14 @@
|
| |
%{perl_vendorlib}/Log/Log4perl/Config/DOMConfigurator.pm
|
| |
%{_mandir}/man3/Log::Log4perl::Config::DOMConfigurator.*
|
| |
|
| |
+ %files tests
|
| |
+ %{_libexecdir}/%{name}
|
| |
+
|
| |
%changelog
|
| |
+ * Mon Sep 05 2022 Jitka Plesnikova <jplesnik@redhat.com> - 1.56-1
|
| |
+ - 1.56 bump
|
| |
+ - Package tests
|
| |
+
|
| |
* Fri Jul 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.55-2
|
| |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
|
| |
|
| |