[trac] add BuildRequires so most Trac tests are run during %check

Felix Schwarz fschwarz at fedoraproject.org
Mon Dec 15 08:53:04 UTC 2014


commit b6effbdf6e793d3d3f038271ef5b644dad4af5ca
Author: Felix Schwarz <fschwarz at fedoraproject.org>
Date:   Mon Dec 15 09:40:35 2014 +0100

    add BuildRequires so most Trac tests are run during %check

 trac-1.0.2-issue-11876.patch |   35 +++++++++++++++++++++++++++++++++++
 trac.spec                    |   24 +++++++++++++++++++++++-
 2 files changed, 58 insertions(+), 1 deletions(-)
---
diff --git a/trac-1.0.2-issue-11876.patch b/trac-1.0.2-issue-11876.patch
new file mode 100644
index 0000000..3ed753c
--- /dev/null
+++ b/trac-1.0.2-issue-11876.patch
@@ -0,0 +1,35 @@
+From 3c5c7b6d638a0fe58ea0e8d1a111402e099dce21 Mon Sep 17 00:00:00 2001
+From: jomae <jomae at af82e41b-90c4-0310-8c96-b1721e28e2e2>
+Date: Fri, 12 Dec 2014 12:51:37 +0000
+Subject: [PATCH] 1.0.3dev: fixed test failures in `git_fs.py` with C/POSIX
+ locale (closes #11876)
+
+git-svn-id: http://trac.edgewall.org/intertrac/log:/branches/1.0-stable@13495 af82e41b-90c4-0310-8c96-b1721e28e2e2
+---
+ tracopt/versioncontrol/git/tests/git_fs.py | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/tracopt/versioncontrol/git/tests/git_fs.py b/tracopt/versioncontrol/git/tests/git_fs.py
+index d813fa3..a6ad614 100644
+--- a/tracopt/versioncontrol/git/tests/git_fs.py
++++ b/tracopt/versioncontrol/git/tests/git_fs.py
+@@ -23,6 +23,7 @@ from trac.tests.compat import rmtree
+ from trac.util import create_file
+ from trac.util.compat import close_fds
+ from trac.util.datefmt import to_timestamp, utc
++from trac.util.text import to_utf8
+ from trac.versioncontrol.api import Changeset, DbRepositoryProvider, \
+                                     NoSuchChangeset, NoSuchNode, \
+                                     RepositoryManager
+@@ -48,7 +49,7 @@ class GitCommandMixin(object):
+         return self._git(*args, **kwargs)
+ 
+     def _git(self, *args, **kwargs):
+-        args = (git_bin,) + args
++        args = map(to_utf8, (git_bin,) + args)
+         proc = Popen(args, stdout=PIPE, stderr=PIPE, close_fds=close_fds,
+                      cwd=self.repos_path, **kwargs)
+         stdout, stderr = proc.communicate()
+-- 
+2.1.0
+
diff --git a/trac.spec b/trac.spec
index de168a2..d27e3b2 100644
--- a/trac.spec
+++ b/trac.spec
@@ -2,7 +2,7 @@
 
 Name:           trac
 Version:        1.0.2
-Release:        2%{?dist}
+Release:        3%{?dist}
 Summary:        Enhanced wiki and issue tracking system
 Group:          Applications/Internet
 License:        BSD
@@ -17,6 +17,8 @@ Source5:        trac.wsgi
 # http://trac.edgewall.org/ticket/11805
 # http://subversion.tigris.org/issues/show_bug.cgi?id=4526
 Patch1:         trac-1.0.2-issue-11805.patch
+# fix git tests
+Patch2:         trac-1.0.2-issue-11876.patch
 BuildArch:      noarch
 BuildRequires:  python-devel
 BuildRequires:  python-setuptools
@@ -24,6 +26,21 @@ BuildRequires:  python-genshi >= 0.6
 Requires:       python-setuptools
 Requires:       python-genshi >= 0.6
 
+# optional packages to ensure we run all Trac tests (if one of these are not
+# installed the test would be skipped)
+BuildRequires:  git
+BuildRequires:  php
+BuildRequires:  python-configobj
+BuildRequires:  python-docutils
+BuildRequires:  python-lxml
+# running the functional tests with twill doesn't work presumably because
+# Fedora's twill behaves differently due to unbundled libraries.
+# twill 1.8 is incompatible with Trac: http://trac.edgewall.org/ticket/11642
+# BuildRequires:  python-twill < 1.8
+# pygments 2.0 is not yet supported: http://trac.edgewall.org/ticket/11796
+BuildRequires:  python-pygments < 2.0
+BuildRequires:  subversion-python
+
 %description
 Trac is an integrated system for managing software projects, an
 enhanced wiki, a flexible web-based issue tracker, and an interface to
@@ -37,6 +54,7 @@ development more streamlined and effective.
 %prep
 %setup -q -n Trac-%{version}
 %patch1 -p1
+%patch2 -p1
 
 find contrib -type f -exec chmod -x '{}' \;
 # don't package windows specific files
@@ -83,6 +101,10 @@ mv $RPM_BUILD_ROOT{%{_bindir}/tracd,%{_sbindir}/tracd}
 #%{_var}/www/cgi-bin/trac.wsgi
 
 %changelog
+* Sat Dec 13 2014 Felix Schwarz <fschwarz at fedoraproject.org> - 1.0.2-3
+- add BuildRequires so most Trac tests are run during %check
+- add patch so git tests pass (upstream issue 11876)
+
 * Sat Nov 08 2014 Felix Schwarz <fschwarz at fedoraproject.org> - 1.0.2-2
 - add patch for upstream issue 11805
 


More information about the scm-commits mailing list