Bug 530458 - Using define with shellcommands in cfengine breaks allclasses variable
Summary: Using define with shellcommands in cfengine breaks allclasses variable
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: cfengine
Version: 12
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Jeff Sheltren
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-10-22 21:29 UTC by Garrett Holmstrom
Modified: 2010-01-28 01:00 UTC (History)
2 users (show)

Fixed In Version: 2.2.10-5.fc12
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-01-28 01:00:04 UTC
Type: ---


Attachments (Terms of Use)
Patch for broken allclasses variable (upstream svn commit 629) (6.46 KB, patch)
2009-12-04 21:50 UTC, Garrett Holmstrom
no flags Details | Diff

Description Garrett Holmstrom 2009-10-22 21:29:21 UTC
Could one of the bugfix patches from cfengine's svn be applied to Fedora's build?

Description of problem:
When you do a shellcommand and set classes for on success and failure
(define/elsedefine), it copies those classes into the all classes
buffer[1] which is the same one used for $(allclasses). It seems quite
unnecessary, though, as the classes are defined as they should be, based
on return value, later[2].

Clearly broken.

[1] HandleDefine (install.c:6036) and HandleElseDefine (install.c:6072),
called by HandleOptionalScriptAttribute (install.c:1532), called by
HandleOptional (parse.c:979).

[2] cfpclose_def (popen_def.c:122) called by Scripts (do.c:1461)

Version-Release number of selected component (if applicable):
2.2.10-3

How reproducible:
See Description
  
Actual results:
See Description

Additional info:
This has been patched upstream in svn commit 629:  http://svn.iu.hio.no/viewvc?view=rev&root=Cfengine-2&revision=629

Comment 1 Bug Zapper 2009-11-16 14:05:22 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 12 development cycle.
Changing version to '12'.

More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 2 Garrett Holmstrom 2009-12-04 21:50:21 UTC
Created attachment 376215 [details]
Patch for broken allclasses variable (upstream svn commit 629)

This patch fixes the allclasses breakage for us.  It's in upstream svn, so it should make it into the next release.

Comment 3 Jeff Sheltren 2009-12-12 17:47:12 UTC
Garrett, thanks for the bug report.  I've created update RPMs for F12, however with the Fedora infrastructure down this week, I can't currently build in koji.  Can you test out the RPMs located at
http://staff.osuosl.org/~jeff/cfengine/

Here are the sha1sums for them:

e224271c0d882c58e95e07898c07210e3d58e2bd  ./x86_64/cfengine-debuginfo-2.2.10-4.fc12.x86_64.rpm
fa2e9f9d7869819618ad78696ad73c4484bb65b6  ./x86_64/cfengine-2.2.10-4.fc12.src.rpm
8818a9b52bdd4030ce504b5d645cc2aabb330be1  ./x86_64/cfengine-2.2.10-4.fc12.x86_64.rpm
200baa71e81a5e48a0573680a53f144edabcd6ff  ./i386/cfengine-debuginfo-2.2.10-4.fc12.i686.rpm
0ba12d5e2e1452295121f5245952d40dbb6420d0  ./i386/cfengine-2.2.10-4.fc12.src.rpm
3f587bfd60d70c1acedc6e1f3f176839df28321b  ./i386/cfengine-2.2.10-4.fc12.i686.rpm

Comment 4 Garrett Holmstrom 2009-12-15 20:17:27 UTC
It works for me as far as I can tell.  Or at least it does for x86_64; I don't have any i386 installs to test it with.

It looks like bodhi should be back up soon.

Comment 5 Jeff Sheltren 2009-12-15 20:23:10 UTC
Good enough for me.  Thanks for testing.  I have another bug or two to fix, but I'll include this in the next fedora build to go out soon.

Comment 6 Fedora Update System 2009-12-29 21:13:58 UTC
cfengine-2.2.10-5.fc12 has been submitted as an update for Fedora 12.
http://admin.fedoraproject.org/updates/cfengine-2.2.10-5.fc12

Comment 7 Fedora Update System 2010-01-02 03:34:31 UTC
cfengine-2.2.10-5.fc12 has been pushed to the Fedora 12 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update cfengine'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F12/FEDORA-2010-0040

Comment 8 Fedora Update System 2010-01-28 00:59:55 UTC
cfengine-2.2.10-5.fc12 has been pushed to the Fedora 12 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.