Bug 166322 - sysutils/salt - critical patch - loss of functionality
Summary: sysutils/salt - critical patch - loss of functionality
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Michael Scheidell
Depends on:
Reported: 2012-03-22 18:30 UTC by Christer Edwards
Modified: 2012-03-27 13:30 UTC (History)
0 users

See Also:

file.diff (1.95 KB, patch)
2012-03-22 18:30 UTC, Christer Edwards
no flags Details | Diff
patch-setup.py (1.22 KB, text/x-python; charset=US-ASCII)
2012-03-24 20:11 UTC, Christer Edwards
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Christer Edwards 2012-03-22 18:30:01 UTC
A critical bug was missed in testing the sysutils/salt 0.9.8 release. The current port is critically broken. The attached diff suggests two patches to regain functionality and address a python warning message.

Fix: In the even the attached .diff is not clear, a file needs to be created at files/patch-kvm_hyper.py to address a FreeBSD specific issue:

--- salt-0.9.8/kvm_hyper.py     2012-03-22 10:57:13.019199302 -0600
+++ salt/modules/kvm_hyper.py        2012-03-22 10:57:45.441204588 -0600
@@ -46,6 +46,8 @@
         return False
     if __grains__['virtual'] != 'physical':
         return False
+    if __grains__['kernel'] != 'Linux': 
+        return False
     if 'kvm_' not in open('/proc/modules').read():
         return False
     if not has_libvirt:

Without this addition the FreeBSD salt minion chokes trying to read '/proc/modules' and exits. This means salt is essentially non-functioning on FreeBSD at this time.

The second part of the attached diff is a minor update to the Python setup.py, which simply bypasses a warning message during build. It is non-critical.

Patch attached with submission follows:
Comment 1 Michael Scheidell freebsd_committer 2012-03-24 19:32:09 UTC
Responsible Changed
From-To: freebsd-ports-bugs->scheidell

I'll take it.
Comment 2 Michael Scheidell freebsd_committer 2012-03-24 19:35:21 UTC
State Changed
From-To: open->feedback

I had a patch failure on the second patch. 
Can you take a look at this?  I won't want to guess at this. 

|diff -ruN salt-0.9.8/files/patch-setup.py salt-0.9.8_1/files/patch-setup.py 
|--- salt-0.9.8/files/patch-setup.py     2012-01-25 00:16:18.000000000 -0700 
|+++ salt-0.9.8_1/files/patch-setup.py   2012-03-22 12:09:05.477195875 -0600 
File to patch: files/patch-setup.py 
Patching file files/patch-setup.py using Plan A... 
Hunk #1 succeeded at 1. 
Hunk #2 failed at 9. 
Hunk #3 succeeded at 23. 
Hunk #4 succeeded at 32. 
1 out of 4 hunks failed--saving rejects to files/patch-setup.py.rej 

more *.reg 
more: No match. 
%more *.rej 
*** 9,15 **** 

libraries = ['ws2_32'] if sys.platform == 'win32' else [] 

- @@ -91,10 +91,10 @@ 
data_files=[(os.path.join(etc_path, 'salt'), 
--- 9,15 ---- 

libraries = ['ws2_32'] if sys.platform == 'win32' else [] 

+ @@ -98,10 +98,10 @@ 
data_files=[(os.path.join(etc_path, 'salt'), 

patch applied with patch -EuN
Comment 3 Christer Edwards 2012-03-24 20:11:30 UTC
I've attached an updated patch-setup.py. This, along with the the
patch-kvm_hyper.py submitted previously should both apply cleanly now.

Comment 4 dfilter service freebsd_committer 2012-03-24 22:02:49 UTC
scheidell    2012-03-24 22:02:35 UTC

  FreeBSD ports repository

  Modified files:
    sysutils/salt        Makefile 
    sysutils/salt/files  patch-setup.py 
  Added files:
    sysutils/salt/files  patch-kvm_hyper.py 
  - Fixes broken read of '/proc/modules' [1]
  - Silence warning from setup.py during build [1]
  - Reorder _DEPENDS lines
  PR:             ports/166322 [1]
  Submitted by:   Christer Edwards <christer.edwards@gmail.com> (maintainer)
  Approved by:    Christer Edwards <christer.edwards@gmail.com> (maintainer)
  Feature safe:   yes
  Revision  Changes    Path
  1.8       +8 -9      ports/sysutils/salt/Makefile
  1.1       +11 -0     ports/sysutils/salt/files/patch-kvm_hyper.py (new)
  1.3       +9 -7      ports/sysutils/salt/files/patch-setup.py
cvs-all@freebsd.org mailing list
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
Comment 5 Michael Scheidell freebsd_committer 2012-03-24 22:03:23 UTC
State Changed
From-To: feedback->patched

Patched and Committed. 
Please check.  I reordered _DEPENDS lines to be more standard. 
Make sure there was no special reason you needed the BUILD_DEPENDS+= in the original Makefile. 
PR will remain open until you confirm this fixes all the issues.
Comment 6 Michael Scheidell freebsd_committer 2012-03-27 13:30:18 UTC
State Changed
From-To: patched->closed

Committed, with minor changes. Thanks!