public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
To: git-commits@fedoraproject.org
Subject: [rpms/perl-Net-UPnP] f45: Package the tests
Date: Mon, 09 Nov 2026 17:41:02 GMT [thread overview]
Message-ID: <179424606242.1.6783174323175668750.rpms-perl-Net-UPnP-95ebdd2477d2@fedoraproject.org> (raw)
A new commit has been pushed.
Repo : rpms/perl-Net-UPnP
Branch : f45
Commit : 95ebdd2477d270cb4f7ab1df2cfa2692ede8b0a2
Author : Petr Písař <ppisar@redhat.com>
Date : 2026-11-09T18:36:07+01:00
Stats : +37/-5 in 2 file(s)
URL : https://src.fedoraproject.org/rpms/perl-Net-UPnP/c/95ebdd2477d270cb4f7ab1df2cfa2692ede8b0a2?branch=f45
Log:
Package the tests
---
diff --git a/perl-Net-UPnP.rpmlintrc b/perl-Net-UPnP.rpmlintrc
new file mode 100644
index 0000000..a5d5f5e
--- /dev/null
+++ b/perl-Net-UPnP.rpmlintrc
@@ -0,0 +1 @@
+addFilter('-tests\.noarch: W: no-documentation')
diff --git a/perl-Net-UPnP.spec b/perl-Net-UPnP.spec
index d9c8fa3..6f13204 100644
--- a/perl-Net-UPnP.spec
+++ b/perl-Net-UPnP.spec
@@ -32,25 +32,42 @@ BuildRequires: perl(version)
BuildRequires: perl(Cwd)
BuildRequires: perl(File::Temp)
BuildRequires: perl(IO::Socket::INET)
+# Shell is a private module generated by t/media-safety.t
BuildRequires: perl(Test::More)
BuildRequires: perl(utf8)
# Optional test:
BuildRequires: perl(XML::Parser)
+# Hide private modules
+%global __requires_exclude %{?__requires_exclude:%{__requires_exclude}|}^perl\\(Shell\\)
+
%description
This package provides some functions to control UPnP devices.
+%package tests
+Summary: Tests for %{name}
+Requires: %{name} = %{?epoch:%{epoch}:}%{version}-%{release}
+Requires: perl-Test-Harness
+Requires: perl(XML::Parser)
+
+%description tests
+Tests from %{name}. Execute them
+with "%{_libexecdir}/%{name}/test".
+
%prep
%setup -q -n Net-UPnP-%{version}
# Fix file attributes
find -name '*.pm' -exec chmod a-x '{}' +
# Fix shebangs
-for file in examples/*.pl; do
- sed '1 s|^#!/usr/bin/env perl|%(perl -MConfig -e 'print $Config{startperl}')|g' \
- "$file" > "${file}.mod" && \
- touch -r "$file" "${file}.mod" && \
- mv "${file}.mod" "$file"
+for F in examples/*.pl; do
+ perl -i -MConfig -ple 'print $Config{startperl} if $. == 1 && !s{\A#!\s*perl}{$Config{startperl}}' "$F"
+done
+
+# 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
@@ -60,6 +77,16 @@ perl Makefile.PL INSTALLDIRS=vendor NO_PACKLIST=1 NO_PERLLOCAL=1
%install
%{make_install}
%{_fixperms} %{buildroot}/*
+# Install tests
+mkdir -p %{buildroot}%{_libexecdir}/%{name}
+cp -a t %{buildroot}%{_libexecdir}/%{name}
+mkdir -p %{buildroot}%{_libexecdir}/%{name}/examples
+cp -a examples/dms2vodcast.pl %{buildroot}%{_libexecdir}/%{name}/examples
+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
export HARNESS_OPTIONS=j$(perl -e 'if ($ARGV[0] =~ /.*-j([0-9][0-9]*).*/) {print $1} else {print 1}' -- '%{?_smp_mflags}')
@@ -75,9 +102,13 @@ make test
%{_mandir}/man3/Net::UPnP.*
%{_mandir}/man3/Net::UPnP::*
+%files tests
+%{_libexecdir}/%{name}
+
%changelog
* Mon Nov 09 2026 Petr Pisar <ppisar@redhat.com> - 1:1.4.7-1
- 1.4.7 bump
+- Package the tests
* Thu Jul 16 2026 Fedora Release Engineering <releng@fedoraproject.org> - 1:1.4.6-23
- Rebuilt for https://fedoraproject.org/wiki/Fedora_45_Mass_Rebuild
reply other threads:[~2026-11-09 17:41 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=179424606242.1.6783174323175668750.rpms-perl-Net-UPnP-95ebdd2477d2@fedoraproject.org \
--to=git-commits@fedoraproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox