#11876 closed defect (fixed)
Trac 1.0.2 RPM build failure in tests - git_fs.py
Reported by: | Owned by: | Jun Omae | |
---|---|---|---|
Priority: | normal | Milestone: | 1.0.3 |
Component: | plugin/git | Version: | 1.0.2 |
Severity: | normal | Keywords: | unicode rpm |
Cc: | felix.schwarz@… | Branch: | |
Release Notes: |
Fix failures of unit tests for |
||
API Changes: | |||
Internal Changes: |
Description
I am currently running Trac 1.0.1 on a Red Hat RHEL 6.5 system with Python 2.6.6.
I built it from a Fedora Core 19 SRPM (trac-1.0.1-1.fc19.src.rpm) which I found on the Internet via "rpmfind":
I am now able to find Trac 1.0.2 source RPMs for Fedora Core 19; either trac-1.0.2-1.fc19.src.rpm or trac-1.0.2-2.fc19.src.rpm:
http://ftp.uninett.no/fedora/updates/testing/19/SRPMS/trac-1.0.2-1.fc19.src.rpm
If I try to upgrade Trac using either of the trac-1.0.2-1 or trac-1.0.2-2 SRPMs from Fedora Core 19, the RPM build fails the same single test in both cases - and the RPM isn't built. Here is what happens:
[root@stride2 tests]# printenv LANG en_US.UTF-8 [root@stride2 SRPMS]# rpmbuild --rebuild trac-1.0.2-2.fc19.src.rpm Installing trac-1.0.2-2.fc19.src.rpm [...] ====================================================================== ERROR: test_get_node (tracopt.versioncontrol.git.tests.git_fs.GitNormalTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/root/rpmbuild/BUILD/Trac-1.0.2/tracopt/versioncontrol/git/tests/git_fs.py", line 267, in test_get_node self._git('branch', u'tïckét10605', 'master') File "/root/rpmbuild/BUILD/Trac-1.0.2/tracopt/versioncontrol/git/tests/git_fs.py", line 53, in _git cwd=self.repos_path, **kwargs) File "/usr/lib64/python2.6/subprocess.py", line 642, in __init__ errread, errwrite) File "/usr/lib64/python2.6/subprocess.py", line 1234, in _execute_child raise child_exception TypeError: execv() arg 2 must contain only strings ----------------------------------------------------------------------
I get the same results from the build attempts whether the LANG/locale is en_US.UTF-8 or C.
I also tried it on a Red Hat RHEL 7.0 system with Python 2.7.5 and, unsurprisingly, got the same exact result for both LANG=en_US.UTF-8 and C locales.
The git_fs.py code snippet is
[root@miplvm-rh7 SRPMS]# cat -n /root/rpmbuild/BUILD/Trac-1.0.2/tracopt/versioncontrol/git/tests/git_fs.py | sed -n '264,272p' 264 265 # git_fs doesn't support non-ANSI strings on Windows 266 if os.name != 'nt': 267 self._git('branch', u'tïckét10605', 'master') 268 repos.sync() 269 self.assertEqual(rev, repos.get_node('/', u'tïckét10605').rev) 270 self.assertEqual(rev, repos.get_node('/.gitignore', 271 u'tïckét10605').rev) 272
Attachments (0)
Change History (5)
follow-up: 3 comment:1 by , 10 years ago
Component: | i18n → plugin/git |
---|---|
Keywords: | unicode rpm added; git_fs.py Unicode LANG removed |
Milestone: | next-stable-1.0.x → 1.0.3 |
Owner: | set to |
Status: | new → assigned |
comment:2 by , 10 years ago
Release Notes: | modified (diff) |
---|---|
Resolution: | → fixed |
Status: | assigned → closed |
follow-up: 4 comment:3 by , 10 years ago
Replying to jomae:
It seems the 'rpmbuild' command drops locale environments while processing
%build
and%check
, etc….
Hi … just out of curiosity, by "drops locale environments" did you mean "overrides $LANG setting and resets it to 'C'"?
This comes from the RPM macros file in Red Hat:
[root@stride2 SRPMS]# sed -n '133,154p' /usr/lib/rpm/redhat/macros # Bad hack to set $LANG to C during all RPM builds %prep \ %%prep\ LANG=C\ export LANG\ unset DISPLAY\ %{nil} %build %%build\ LANG=C\ export LANG\ unset DISPLAY\ %{nil} %install %{?_enable_debug_packages:%{?buildsubdir:%{debug_package}}}\ %%install\ LANG=C\ export LANG\ unset DISPLAY\ %{nil}
What is weird to me is how this Fedora Core 19 SRPM could be built into a binary RPM without failing, given this macros file.
Maybe this segment of the macros file is different in Fedora Core 19 and newer, but somehow I doubt it … yet here we have the final RPM existing despite this issue:
Does your fix in [13495] make it possible to pass this test in the "C" locale?
comment:4 by , 10 years ago
Replying to Riot.Nrrrd.mail@…:
Does your fix in [13495] make it possible to pass this test in the "C" locale?
Oh, duh, never mind :-)
comment:5 by , 10 years ago
Cc: | added |
---|
Just to solve the "Fedora 19" mystery: The package is built in mock (essentially a very minimal chroot) and we didn't install optional packages during build time so a lot of optional tests (i.e. the git tests mentioned in this ticket) were just skipped). I'll try to ensure that most (all?) of the optional tests will be run during our builds in the future.
Thanks for the reporting. It seems the
rpmbuild
command drops locale environments while processing%build
and%check
, etc….