commit 08a46afba35e4ff3203dc0bfb37734a573de6d49 Author: Petr PÃsaÅ <ppisar@xxxxxxxxxx> Date: Mon May 30 09:46:51 2011 +0200 Import .gitignore | 1 + ...est-to-confinded-Fedora-Koji-build-system.patch | 47 ++++++++++++++++++++ perl-Proc-SyncExec.spec | 47 ++++++++++++++++++++ sources | 1 + 4 files changed, 96 insertions(+), 0 deletions(-) --- diff --git a/.gitignore b/.gitignore index e69de29..55e055f 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +/Proc-SyncExec-1.01.tar.gz diff --git a/perl-Proc-SyncExec-1.01-Adjust-test-to-confinded-Fedora-Koji-build-system.patch b/perl-Proc-SyncExec-1.01-Adjust-test-to-confinded-Fedora-Koji-build-system.patch new file mode 100644 index 0000000..3450330 --- /dev/null +++ b/perl-Proc-SyncExec-1.01-Adjust-test-to-confinded-Fedora-Koji-build-system.patch @@ -0,0 +1,47 @@ +From 7e93df5a4458413895a48a8cd6cfcb773ed1fa90 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@xxxxxxxxxx> +Date: Wed, 25 May 2011 17:17:17 +0200 +Subject: [PATCH] Adjust test to confinded Fedora Koji build system + +Koji glibc returns EACCES instead of ENOENT while executing +non-existent command. + +Reported to upstream: https://rt.cpan.org/Public/Bug/Display.html?id=68476 +--- + test.t | 6 +++--- + 1 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/test.t b/test.t +index c8fd833..d9810de 100644 +--- a/test.t ++++ b/test.t +@@ -41,7 +41,7 @@ END { + } + + use Proc::SyncExec qw(fork_retry sync_exec sync_open); +-use POSIX qw(EACCES ENOENT); ++use POSIX qw(EACCES ENOENT EACCES); + + my ($fh, $pid, $s, $r, @l); + +@@ -50,7 +50,7 @@ ok $@ eq '', $@; + + $pid = sync_exec 'this better not exist', 23; + ok !defined $pid, $pid; +-ok $! == ENOENT, $!; ++ok $! == ENOENT || $! == EACCES, $!; + + $pid = sync_exec '/'; + ok !defined $pid, $pid; +@@ -65,7 +65,7 @@ ok $? == 23 * 256, $?; + close READ; # squelch used only once warning + $pid = sync_open *READ, 'this-better-not-exist-either foo|'; + ok !defined $pid, $pid; +-ok $! == ENOENT, $!; ++ok $! == ENOENT || $! == EACCES, $!; + + $pid = sync_open *WRITE, "|$^X -we 'exit <STDIN>'"; + ok $pid, $!; +-- +1.7.4.4 + diff --git a/perl-Proc-SyncExec.spec b/perl-Proc-SyncExec.spec new file mode 100644 index 0000000..c5b55fe --- /dev/null +++ b/perl-Proc-SyncExec.spec @@ -0,0 +1,47 @@ +#This file is licensed under the terms of GNU GPLv2+. +Name: perl-Proc-SyncExec +Version: 1.01 +Release: 1%{?dist} +Summary: Spawn processes but report exec() errors +License: GPL+ or Artistic +Group: Development/Libraries +URL: http://search.cpan.org/dist/Proc-SyncExec/ +Source0: http://www.cpan.org/authors/id/R/RO/ROSCH/Proc-SyncExec-%{version}.tar.gz +Patch0: %{name}-1.01-Adjust-test-to-confinded-Fedora-Koji-build-system.patch +BuildArch: noarch +BuildRequires: perl(Exporter) +BuildRequires: perl(ExtUtils::MakeMaker) +Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version)) + +%description +This module contains functions for synchronized process spawning with full +error return. If the child's exec() call fails the reason for the failure +is reported back to the parent. + +%prep +%setup -q -n Proc-SyncExec-%{version} +%patch0 -p1 -b .koji + +%build +%{__perl} Makefile.PL INSTALLDIRS=vendor +make %{?_smp_mflags} + +%install +make pure_install PERL_INSTALL_ROOT=$RPM_BUILD_ROOT +find $RPM_BUILD_ROOT -type f -name .packlist -exec rm -f {} \; +find $RPM_BUILD_ROOT -depth -type d -exec rmdir {} 2>/dev/null \; +%{_fixperms} $RPM_BUILD_ROOT/* + +%check +make test + +%files +%doc Changes README +%{perl_vendorlib}/* +%{_mandir}/man3/* + +%changelog +* Tue May 17 2011 Petr Pisar <ppisar@xxxxxxxxxx> 1.01-1 +- Specfile autogenerated by cpanspec 1.78. +- Remove BuildRoot and defattr stuff +- Adjusts tests to accept EPERM instead of ENOENT diff --git a/sources b/sources index e69de29..09e3d7f 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +38dd51ed78504d73bf6520a044744cb8 Proc-SyncExec-1.01.tar.gz -- Fedora Extras Perl SIG http://www.fedoraproject.org/wiki/Extras/SIGs/Perl perl-devel mailing list perl-devel@xxxxxxxxxxxxxxxxxxxxxxx https://admin.fedoraproject.org/mailman/listinfo/perl-devel