Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mock build rpm fails for 0.15.0 #4912

Closed
herlo opened this issue May 7, 2013 · 2 comments
Closed

Mock build rpm fails for 0.15.0 #4912

herlo opened this issue May 7, 2013 · 2 comments
Milestone

Comments

@herlo
Copy link
Contributor

herlo commented May 7, 2013

When attempting a mock build for epel-6-i386, I get errors during the tests. The error stems from one test. Here's the traceback:

-> unit.states.gem_test.TestGemState.test_removed -> mock python module is unavailable


-------- Tests with Errors --------------------------------------------------
-> unit.stateconf_test.StateConfigRendererTestCase.test_implicit_require_with_goal_state
Traceback (most recent call last):
File "/builddir/build/BUILD/salt-0.15.0/tests/unit/stateconf_test.py", line 229, in test_implicit_require_with_goal_state
''', sls='test', argline='-o yaml . jinja')
File "/builddir/build/BUILD/salt-0.15.0/tests/unit/stateconf_test.py", line 23, in render_sls
**kws
File "/builddir/build/BUILD/salt-0.15.0/salt/renderers/stateconf.py", line 229, in render
data = process_sls_data(sls_templ, tmplctx)
File "/builddir/build/BUILD/salt-0.15.0/salt/renderers/stateconf.py", line 117, in process_sls_data
return process_high_data(high, extract)
File "/builddir/build/BUILD/salt-0.15.0/salt/renderers/stateconf.py", line 137, in process_high_data
add_implicit_requires(data)
File "/builddir/build/BUILD/salt-0.15.0/salt/renderers/stateconf.py", line 436, in add_implicit_requires
'after it!'.format(tag, T(rsid, rstate))
SaltRenderError: State(G:cmd) can't require/watch a state(F:cmd) defined after it!
.............................................................................


-------- Failed Tests -------------------------------------------------------
-> unit.pydsl_test.PyDSLRendererTestCase.test_rendering_includes ...........
Traceback (most recent call last):
File "/builddir/build/BUILD/salt-0.15.0/tests/unit/pydsl_test.py", line 363, in test_rendering_includes
self.assertEqual(f.read(), expected)
AssertionError: 'X1\nX3\nX2\nY1 extended\nY2 extended\nY3\nhello red 1\nhello green 2\nhello blue 3\n' != 'X1\nX2\nX3\nY1 extended\nY2 extended\nY3\nhello red 1\nhello green 2\nhello blue 3\n'
.............................................................................



============================ Overall Tests Report ============================
running test
error: Bad exit status from /var/tmp/rpm-tmp.8qHj2Z (%check)
Bad exit status from /var/tmp/rpm-tmp.8qHj2Z (%check)
RPM build errors:
Child return code was: 1
EXCEPTION: Command failed. See logs for output.

['bash', '--login', '-c', 'rpmbuild -bb --target i686 --nodeps builddir/build/SPECS/salt.spec']

Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/mockbuild/trace_decorator.py", line 70, in trace
result = func(_args, *_kw)
File "/usr/lib/python2.7/site-packages/mockbuild/util.py", line 359, in do
raise mockbuild.exception.Error, ("Command failed. See logs for output.\n # %s" % (command,), child.returncode)
Error: Command failed. See logs for output.

['bash', '--login', '-c', 'rpmbuild -bb --target i686 --nodeps builddir/build/SPECS/salt.spec']

LEAVE do --> EXCEPTION RAISED

When I build the 0.15.0 package without the mock chroot, things work just fine. Here's the commands I run to get the following errors:

$ /usr/bin/rpmbuild -bs /home/herlo/rpmbuild/SPECS/salt.spec

The salt.spec can be found at herlo@076a3a6

$ mock -r epel-6-i386 -D 'salt run' --rebuild /home/herlo/rpmbuild/SRPMS/salt-0.15.0-1.fc18.src.rpm

As you know, you must be a member of the mock group to run that second command.

Thanks,

herlo

thatch45 added a commit that referenced this issue May 8, 2013
Clint, this fixes it for me and still logicaly verifies the test
let me know if this works on your end
@herlo
Copy link
Contributor Author

herlo commented May 29, 2013

This still happens with 0.15.2 in a mock buildroot.

-------- Tests with Errors --------------------------------------------------
-> unit.stateconf_test.StateConfigRendererTestCase.test_implicit_require_with_goal_state
Traceback (most recent call last):
File "/builddir/build/BUILD/salt-0.15.1/tests/unit/stateconf_test.py", line 229, in test_implicit_require_with_goal_state
''', sls='test', argline='-o yaml . jinja')
File "/builddir/build/BUILD/salt-0.15.1/tests/unit/stateconf_test.py", line 23, in render_sls
**kws
File "/builddir/build/BUILD/salt-0.15.1/salt/renderers/stateconf.py", line 228, in render
data = process_sls_data(sls_templ, tmplctx)
File "/builddir/build/BUILD/salt-0.15.1/salt/renderers/stateconf.py", line 117, in process_sls_data
return process_high_data(high, extract)
File "/builddir/build/BUILD/salt-0.15.1/salt/renderers/stateconf.py", line 137, in process_high_data
add_implicit_requires(data)
File "/builddir/build/BUILD/salt-0.15.1/salt/renderers/stateconf.py", line 435, in add_implicit_requires
'after it!'.format(tag, T(rsid, rstate))
SaltRenderError: State(G:cmd) can't require/watch a state(F:cmd) defined after it!

@herlo herlo reopened this May 29, 2013
thatch45 added a commit that referenced this issue May 30, 2013
Switched to a fixed and more complete `OrderedDict` recipe. Fixes #4912.
@s0undt3ch
Copy link
Collaborator

@herlo: Proper and upstream compliant fix: cc437e7
Quick & Hacky Fix: https://gist.github.com/s0undt3ch/5679271

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants