[rt3] Rewrite *-tests package (Don't use tests macros).
by corsepiu
commit f177ee58367b3ad4279a60b4fcd5723f73ce4c5e
Author: Ralf Corsépius <corsepiu(a)fedoraproject.org>
Date: Tue Jan 31 10:01:27 2012 +0100
Rewrite *-tests package (Don't use tests macros).
rt3.spec | 53 +++++++++++++++++++++++++++++++++++------------------
1 files changed, 35 insertions(+), 18 deletions(-)
---
diff --git a/rt3.spec b/rt3.spec
index d1ca3de..5918564 100644
--- a/rt3.spec
+++ b/rt3.spec
@@ -41,7 +41,7 @@
Name: rt3
Version: 3.8.11
-Release: 4%{?dist}
+Release: 5%{?dist}
Summary: Request tracker 3
Group: Applications/Internet
@@ -216,19 +216,6 @@ Requires: rt3-mailgate
%global __provides_exclude %{?__provides_exclude:%__provides_exclude|}^perl\\(HTML::Mason
%global __provides_exclude %{?__provides_exclude:%__provides_exclude|}^perl\\(IO::Handle::CRLF\\)$
-%tests_req perl(HTML::Mason::Compiler)
-%tests_req perl(HTML::Mason::Compiler::ToObject)
-%tests_req perl(RT::Test)
-%tests_req perl(Test::HTTP::Server::Simple::StashWarnings)
-%tests_req perl(DBD::SQLite)
-%tests_req perl(Test::Deep)
-# Required by the testsuite, but test doesn't work outside of source-tree: %%tests_req perl(Test::Pod) >= 1.14
-%tests_req perl(Test::Expect)
-%tests_req perl(Test::MockTime)
-%tests_req perl(Test::Warn)
-%tests_req perl(GnuPG::Interface) perl(PerlIO::eol)
-
-%{?perl_subpackage_tests:%perl_subpackage_tests t/ README.tests}
%description
RT is an enterprise-grade ticketing system which enables a group of people
@@ -246,6 +233,26 @@ Requires: perl(HTML::FormatText)
%description mailgate
%{summary}
+%package tests
+Summary: Test suite for package rt3
+Group: Development/Debug
+Requires: %{name} = %{version}-%{release}
+Requires: /usr/bin/prove
+Requires: perl(DBD::SQLite)
+Requires: perl(HTML::Mason::Compiler)
+Requires: perl(HTML::Mason::Compiler::ToObject)
+Requires: perl(GnuPG::Interface) perl(PerlIO::eol)
+Requires: perl(RT::Test)
+Requires: perl(Test::HTTP::Server::Simple::StashWarnings)
+Requires: perl(Test::Deep)
+# Required by the testsuite, but test doesn't work outside of source-tree: Requires: perl(Test::Pod) >= 1.14
+Requires: perl(Test::Expect)
+Requires: perl(Test::MockTime)
+Requires: perl(Test::Warn)
+
+%description tests
+%{summary}
+
%if %{with devel_mode}
%package -n perl-RT-Test
Summary: rt3's test utility module
@@ -313,9 +320,6 @@ sed -i \
-e 's,-o $(BIN_OWNER) -g $(RTGROUP),,g' \
Makefile.in
-# Copy README.tests into '.', such that %%perl_subpackage_tests picks it up.
-cp %{SOURCE1} .
-
%build
%configure \
--with-apachectl=/usr/sbin/apachectl \
@@ -389,10 +393,16 @@ install -d -m755 ${RPM_BUILD_ROOT}%{_sysconfdir}/rt3/upgrade
cp -R etc/upgrade/* ${RPM_BUILD_ROOT}%{_sysconfdir}/rt3/upgrade
rm -f ${RPM_BUILD_ROOT}%{_sysconfdir}/rt3/upgrade/*.in
-install -d m755 ${RPM_BUILD_ROOT}%{_datadir}/rt3/fonts
+install -d -m755 ${RPM_BUILD_ROOT}%{_datadir}/rt3/fonts
ln -s /usr/share/fonts/google-droid/DroidSans.ttf ${RPM_BUILD_ROOT}%{_datadir}/rt3/fonts
ln -s /usr/share/fonts/google-droid/DroidSansFallback.ttf ${RPM_BUILD_ROOT}%{_datadir}/rt3/fonts
+install -d -m755 ${RPM_BUILD_ROOT}%{perl_testdir}/%{name}
+cp -R t ${RPM_BUILD_ROOT}%{perl_testdir}/%{name}
+cp %{SOURCE1} ${RPM_BUILD_ROOT}%{perl_testdir}/%{name}
+# pod.t can't be run outside of the source-tree
+rm -rf ${RPM_BUILD_ROOT}%{perl_testdir}/%{name}/pod.t
+
# Fix permissions
find ${RPM_BUILD_ROOT}%{RT3_WWWDIR} \
-type f -exec chmod a-x {} \;
@@ -457,6 +467,10 @@ fi
%{_sbindir}/rt-mailgate
%{_mandir}/man1/rt-mailgate*
+%files tests
+%defattr(-,root,root,-)
+%{perl_testdir}/%{name}
+
%if %{with devel_mode}
%files -n perl-RT-Test
%defattr(-,root,root,-)
@@ -465,6 +479,9 @@ fi
%endif
%changelog
+* Tue Jan 30 2012 Ralf Corsépius <corsepiu(a)fedoraproject.org> - 3.8.11-5
+- Rewrite *-tests package (Don't use tests macros).
+
* Mon Jan 30 2012 Ralf Corsépius <corsepiu(a)fedoraproject.org> - 3.8.11-4
- Rename rpmbuild option with_tests into with_runtests.
- Add rt3-tests subpackage.
12 years, 3 months
[rt3/f16] (4 commits) ...Rename rpmbuild option with_tests into with_runtests.
by corsepiu
Summary of changes:
9c99e50... Upstream update. (*)
e345589... Remove redundant R: config(rt3), Remove P: config(rt3). Rew (*)
2b1b581... Fix typo in filter rules. Add lexdir, manualdir, RT3_LEXDIR (*)
3917e42... Rename rpmbuild option with_tests into with_runtests. (*)
(*) This commit already existed in another branch; no separate mail sent
12 years, 3 months
[rt3] Rename rpmbuild option with_tests into with_runtests.
by corsepiu
commit 3917e42e74ddf6902dc3bbad3e7437a1b89917e3
Author: Ralf Corsépius <corsepiu(a)fedoraproject.org>
Date: Tue Jan 31 05:05:01 2012 +0100
Rename rpmbuild option with_tests into with_runtests.
- Add rt3-tests subpackage.
- Add README.tests.
- Remove removal of ${RT3_LIBDIR}/t (Fixed by upstream).
- Rework R:/BR:.
- Use %{__rm} instead of /bin/rm.
- Misc minor spec file cleanup.
README.tests | 11 +++++++++
rt3.spec | 69 ++++++++++++++++++++++++++++++++++++++++++---------------
2 files changed, 62 insertions(+), 18 deletions(-)
---
diff --git a/README.tests b/README.tests
new file mode 100644
index 0000000..78b6c76
--- /dev/null
+++ b/README.tests
@@ -0,0 +1,11 @@
+Run these tests with a command similar to this:
+
+RT_DBA_USER=root RT_DBA_PASSWORD=<mysql-passwd> /usr/bin/prove t/*.t t/*/*.t
+
+Notes:
+- Most (all?) tests require to be run as "root".
+- Some of these tests were not designed to work outside of rt3's source
+ tree and do not work when being used as a separate test package.
+- Some of these tests are quite "chatty".
+- Failing tests my leave stray files on the filesystem, which will not be
+ automatically deinstalled upon package deinstallation.
diff --git a/rt3.spec b/rt3.spec
index 1a87e6b..d1ca3de 100644
--- a/rt3.spec
+++ b/rt3.spec
@@ -26,10 +26,10 @@
# Default: --without
%bcond_with gpg
-# --with tests
+# --with runtests
# run testsuite when building the rpm
# Default: without (doesn't work in chroots.)
-%bcond_with tests
+%bcond_with runtests
%global RT3_BINDIR %{_sbindir}
%global RT3_LIBDIR %{perl_vendorlib}
@@ -41,13 +41,14 @@
Name: rt3
Version: 3.8.11
-Release: 3%{?dist}
+Release: 4%{?dist}
Summary: Request tracker 3
Group: Applications/Internet
License: GPLv2+
URL: http://www.bestpractical.com/rt
Source0: http://www.bestpractical.com/pub/rt/release/rt-%{version}.tar.gz
+Source1: README.tests
Source3: rt3.conf.in
Source4: README.fedora.in
Source5: rt3.logrotate.in
@@ -149,9 +150,12 @@ BuildRequires: perl(UNIVERSAL::require)
BuildRequires: perl(XML::RSS) >= 1.05
%{?with_devel_mode:BuildRequires: perl(XML::Simple)}
-%{?with_tests:BuildRequires: perl(DBD::SQLite)}
-%{?with_tests:BuildRequires: perl(DBD::mysql)}
-%{?with_tests:BuildRequires: perl(DBD::Pg)}
+%{?with_runtests:BuildRequires: perl(DBD::SQLite)}
+%{?with_runtests:BuildRequires: perl(DBD::mysql)}
+%{?with_runtests:BuildRequires: perl(DBD::Pg)}
+%{?with_runtests:BuildRequires: perl(Log::Dispatch::Perl)}
+%{?with_runtests:BuildRequires: perl(Test::WWW::Mechanize)}
+%{?with_runtests:BuildRequires: perl(Test::Expect)}
BuildRequires: /usr/bin/pod2man
BuildRequires: /usr/sbin/apachectl
@@ -165,16 +169,19 @@ BuildRequires: /usr/share/fonts/google-droid/DroidSans.ttf
Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
-Requires(postun): /bin/rm
+Requires(postun): %{__rm}
# rpm doesn't catch these:
Requires: perl(Apache::Session)
Requires: perl(Calendar::Simple)
Requires: perl(Data::ICal)
Requires: perl(Data::ICal::Entry::Event)
+Requires: perl(Email::Address)
+Requires: perl(File::Find)
%{?with_gd:Requires: perl(GD::Text)}
%{?with_gd:Requires: perl(GD::Graph::bars)}
%{?with_gd:Requires: perl(GD::Graph::pie)}
+%{?with_gpg: Requires: perl(GnuPG::Interface)}
Requires: perl(I18N::LangTags::List)
Requires: perl(Locale::Maketext::Fuzzy)
Requires: perl(LWP::MediaTypes)
@@ -182,7 +189,6 @@ Requires: perl(mod_perl2)
Requires: perl(Module::Versions::Report)
Requires: perl(Text::Quoted)
Requires: perl(Text::WikiFormat)
-Requires: perl(Tree::Simple)
Requires: perl(URI::URL)
Requires: perl(XML::RSS)
@@ -210,6 +216,20 @@ Requires: rt3-mailgate
%global __provides_exclude %{?__provides_exclude:%__provides_exclude|}^perl\\(HTML::Mason
%global __provides_exclude %{?__provides_exclude:%__provides_exclude|}^perl\\(IO::Handle::CRLF\\)$
+%tests_req perl(HTML::Mason::Compiler)
+%tests_req perl(HTML::Mason::Compiler::ToObject)
+%tests_req perl(RT::Test)
+%tests_req perl(Test::HTTP::Server::Simple::StashWarnings)
+%tests_req perl(DBD::SQLite)
+%tests_req perl(Test::Deep)
+# Required by the testsuite, but test doesn't work outside of source-tree: %%tests_req perl(Test::Pod) >= 1.14
+%tests_req perl(Test::Expect)
+%tests_req perl(Test::MockTime)
+%tests_req perl(Test::Warn)
+%tests_req perl(GnuPG::Interface) perl(PerlIO::eol)
+
+%{?perl_subpackage_tests:%perl_subpackage_tests t/ README.tests}
+
%description
RT is an enterprise-grade ticketing system which enables a group of people
to intelligently and efficiently manage tasks, issues, and requests submitted
@@ -228,10 +248,11 @@ Requires: perl(HTML::FormatText)
%if %{with devel_mode}
%package -n perl-RT-Test
-Summary: rt3's test utility.
+Summary: rt3's test utility module
Group: Applications/Internet
Requires: rt3 = %{version}-%{release}
Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
+Requires: perl(Log::Dispatch::Perl)
%description -n perl-RT-Test
%{summary}
@@ -249,10 +270,10 @@ sed -e 's,@RT3_LOGDIR@,%{RT3_LOGDIR},' %{SOURCE5} \
find \( -type f -a -executable \) -exec chmod a-x {} \;
chmod +x configure install-sh
-# Upstream tarball contains temporary autotools-files.
+# Upstream tarball contains temporary autotools-files
rm -rf autom4te.cache config.log config.status
-# Fixup the tarball containing generated files
+# Upstream tarball contains configure-time generated files
find bin sbin etc -name '*.in' | while read a; do d=$(echo "$a" | sed 's,\.in$,,'); rm "$d"; done
%patch0 -p1
@@ -292,6 +313,9 @@ sed -i \
-e 's,-o $(BIN_OWNER) -g $(RTGROUP),,g' \
Makefile.in
+# Copy README.tests into '.', such that %%perl_subpackage_tests picks it up.
+cp %{SOURCE1} .
+
%build
%configure \
--with-apachectl=/usr/sbin/apachectl \
@@ -325,9 +349,6 @@ rm -f ${RPM_BUILD_ROOT}%{RT3_BINDIR}/mason_handler.svc
# We don't want CPAN
rm -f ${RPM_BUILD_ROOT}%{_sbindir}/rt-test-dependencies
-# An installed testsuite without infrastructure
-rm -rf ${RPM_BUILD_ROOT}%{RT3_LIBDIR}/t
-
# Bogus
rm -f ${RPM_BUILD_ROOT}%{RT3_LIBDIR}/RT.pm.in
@@ -380,14 +401,17 @@ find ${RPM_BUILD_ROOT}%{RT3_WWWDIR} \
# The tests don't work:
# - Require to be run as root
# - Require an operational rt3 system
-# - Require packages which are n/a in Fedora
-%{?with_tests:make test}
+%{?with_runtests:make test}
%postun
if [ $1 -eq 0 ]; then
- /bin/rm -rf %{RT3_CACHEDIR}
+ %{__rm} -rf %{RT3_CACHEDIR}
fi
+%postun tests
+if [ $1 -eq 0 ]; then
+ %{__rm} -rf %{perl_testdir}/%{cpan_dist_name}
+fi
%files
%defattr(-,root,root,-)
@@ -441,6 +465,15 @@ fi
%endif
%changelog
+* Mon Jan 30 2012 Ralf Corsépius <corsepiu(a)fedoraproject.org> - 3.8.11-4
+- Rename rpmbuild option with_tests into with_runtests.
+- Add rt3-tests subpackage.
+- Add README.tests.
+- Remove removal of ${RT3_LIBDIR}/t (Fixed by upstream).
+- Rework R:/BR:.
+- Use %%{__rm} instead of /bin/rm.
+- Misc minor spec file cleanup.
+
* Wed Jan 18 2012 Ralf Corsépius <corsepiu(a)fedoraproject.org> - 3.8.11-3
- Fix typo in filter rules.
- Add lexdir, manualdir, RT3_LEXDIR.
@@ -489,7 +522,7 @@ fi
* Fri May 07 2010 Ralf Corsépius <corsepiu(a)fedoraproject.org> - 3.8.8-1
- Upstream update.
-- Add %{_datadir}/rt3/fonts
+- Add %%{_datadir}/rt3/fonts
- Use system-wide google-droid-fonts instead of bundled
Droid fonts.
- Add rt-3.8.8-Makefile.diff.
12 years, 3 months
[perl-Gnome2-Vte] Initial import after review (rhbz #785767)
by Daniel P. Berrange
commit ee232f0febbdcf5a9d4b653b5a38bc831bd75c84
Author: Daniel P. Berrange <berrange(a)redhat.com>
Date: Mon Jan 30 18:07:19 2012 +0000
Initial import after review (rhbz #785767)
.gitignore | 4 ++
Gnome2-Vte-0.09-pty-fileno.patch | 12 +++++++
perl-Gnome2-Vte.spec | 68 ++++++++++++++++++++++++++++++++++++++
sources | 1 +
4 files changed, 85 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e69de29..41643e5 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1,4 @@
+Gnome2-Vte-*.tar.gz
+.build*.log
+*.src.rpm
+x86_64/
diff --git a/Gnome2-Vte-0.09-pty-fileno.patch b/Gnome2-Vte-0.09-pty-fileno.patch
new file mode 100644
index 0000000..ec4887c
--- /dev/null
+++ b/Gnome2-Vte-0.09-pty-fileno.patch
@@ -0,0 +1,12 @@
+diff -rup Gnome2-Vte-0.09/t/VteTerminal.t Gnome2-Vte-0.09.new/t/VteTerminal.t
+--- Gnome2-Vte-0.09/t/VteTerminal.t 2008-10-22 20:49:41.000000000 +0100
++++ Gnome2-Vte-0.09.new/t/VteTerminal.t 2012-01-30 14:33:57.973235431 +0000
+@@ -232,7 +232,7 @@ SKIP: {
+ skip "set_pty", 0
+ unless Gnome2::Vte -> CHECK_VERSION(0, 12, 1);
+
+- $terminal -> set_pty(fileno STDIN);
++ $terminal -> set_pty(fileno STDOUT);
+ }
+
+ $terminal -> reset(1, 1);
diff --git a/perl-Gnome2-Vte.spec b/perl-Gnome2-Vte.spec
new file mode 100644
index 0000000..dfab888
--- /dev/null
+++ b/perl-Gnome2-Vte.spec
@@ -0,0 +1,68 @@
+%global use_x11_tests 1
+
+Name: perl-Gnome2-Vte
+Version: 0.09
+Release: 1%{?dist}
+Summary: Gnome2::Vte Perl module
+License: LGPLv2+
+Group: Development/Libraries
+URL: http://search.cpan.org/dist/Gnome2-Vte/
+Source0: http://www.cpan.org/modules/by-module/Gnome2/Gnome2-Vte-%{version}.tar.gz
+Patch1: Gnome2-Vte-%{version}-pty-fileno.patch
+BuildRequires: perl(ExtUtils::Depends) >= 0.20
+BuildRequires: perl(ExtUtils::MakeMaker)
+BuildRequires: perl(ExtUtils::PkgConfig) >= 1.03
+BuildRequires: perl(Glib) >= 1.01
+BuildRequires: perl(Gtk2) >= 1.00
+BuildRequires: perl(Glib::MakeHelper)
+BuildRequires: perl(Test::More)
+BuildRequires: vte-devel
+%if %{use_x11_tests}
+# X11 tests:
+BuildRequires: xorg-x11-server-Xvfb
+BuildRequires: xorg-x11-xinit
+BuildRequires: font(:lang=en)
+%endif
+Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
+
+%{?perl_default_filter}
+
+%description
+Gnome2::Vte exposes the GNOME Virtual Terminal Emulator APIs to
+Perl applications
+
+%prep
+%setup -q -n Gnome2-Vte-%{version}
+%patch1 -p1
+
+%build
+%{__perl} Makefile.PL INSTALLDIRS=vendor OPTIMIZE="$RPM_OPT_FLAGS"
+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 -type f -name '*.bs' -size 0 -exec rm -f {} \;
+find $RPM_BUILD_ROOT -depth -type d -exec rmdir {} 2>/dev/null \;
+
+%{_fixperms} $RPM_BUILD_ROOT/*
+
+%check
+%if %{use_x11_tests}
+ xinit /bin/sh -c 'rm -f ok; make test && touch ok' -- /usr/bin/Xvfb :666
+ test -e ok
+%else
+ make test
+%endif
+
+%files
+%defattr(-,root,root,-)
+%doc ChangeLog LICENSE maps NEWS README
+%{perl_vendorarch}/auto/*
+%{perl_vendorarch}/Gnome2*
+%{_mandir}/man3/*
+
+%changelog
+* Tue Dec 13 2011 Daniel Berrange <berrange(a)redhat.com> 0.09-1
+- Specfile autogenerated by cpanspec 1.78.
diff --git a/sources b/sources
index e69de29..c1c43cc 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+2827329bf463ebc01c3e1a1726a43bbb Gnome2-Vte-0.09.tar.gz
12 years, 3 months
[perl-Module-Install-ExtraTests] Cache 0.007 sources
by Petr Pisar
commit c9cfe819a84760132722dfd06ab2225eed8c5d53
Author: Petr Písař <ppisar(a)redhat.com>
Date: Mon Jan 30 16:57:20 2012 +0100
Cache 0.007 sources
.gitignore | 1 +
sources | 2 +-
2 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 40e5895..0abafb3 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,2 @@
Module-Install-ExtraTests-0.006.tar.gz
+/Module-Install-ExtraTests-0.007.tar.gz
diff --git a/sources b/sources
index daed32c..a618cfd 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-1fddf04657c120762e950b18347b3eed Module-Install-ExtraTests-0.006.tar.gz
+66b27bf0c30386910f879fd8e8cc5b46 Module-Install-ExtraTests-0.007.tar.gz
12 years, 3 months