rpms/smolt/F-8 scan.patch,NONE,1.1 smolt.spec,1.45,1.46

Mike McGrath mmcgrath at fedoraproject.org
Tue Nov 11 21:33:39 UTC 2008


Author: mmcgrath

Update of /cvs/pkgs/rpms/smolt/F-8
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv22613/F-8

Modified Files:
	smolt.spec 
Added Files:
	scan.patch 
Log Message:
updated for a proper scan

scan.patch:

--- NEW FILE scan.patch ---
--- client/scan.py.orig	2008-03-08 11:57:57.000000000 -0600
+++ client/scan.py	2008-11-11 09:22:30.000000000 -0600
@@ -17,7 +17,7 @@
 # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
 
 import smolt
-import simplejson, urllib
+import simplejson, urllib, httplib
 from i18n import _
 import config
 
@@ -60,21 +60,27 @@
     devices.append('System/%s/%s' % ( urllib.quote(h.host.systemVendor), urllib.quote(h.host.systemModel) ))
     for dev in devices:
         searchDevices = "%s|%s" % (searchDevices, dev)
-    scanURL='%s/w/api.php?action=query&titles=%s&format=json' % (smoonURL, searchDevices)
+    scanURL='%s/smolt-w/api.php?action=query&titles=%s&format=json' % (smoonURL, searchDevices)
+    params='action=query&format=json&titles=%s' % searchDevices
     try:
-        r = simplejson.load(urllib.urlopen(scanURL))
+        #r = simplejson.load(urllib.urlopen(scanURL))
+        headers = {"Content-type": "application/x-www-form-urlencoded",
+            "Accept": "text/plain"}
+        conn = httplib.HTTPConnection("smolts.org:80")
+        conn.request("POST", '/smolt-w/api.php', params, headers)
+        r = simplejson.load(conn.getresponse())
     except ValueError:
         print "Could not wiki for errata!"
         return
     found = []
     for page in r['query']['pages']:
         try:
-            r['query']['pages'][page]['id']
-            found.append('\t%swiki/%s' % (smoonURL, r['query']['pages'][page]['title']))
+            if int(page) > 0:
+                found.append('\t%swiki/%s' % (smoonURL, r['query']['pages'][page]['title']))
         except KeyError:
             pass
     if found:
-        print _("\tErrata Found!")
+        print _("\tErrata Found!  Please visit: ")
         for f in found: print "\t%s" % f
     else:
         print _("\tNo errata found, if this machine is having issues please go to")


Index: smolt.spec
===================================================================
RCS file: /cvs/pkgs/rpms/smolt/F-8/smolt.spec,v
retrieving revision 1.45
retrieving revision 1.46
diff -u -r1.45 -r1.46
--- smolt.spec	22 Mar 2008 22:01:34 -0000	1.45
+++ smolt.spec	11 Nov 2008 21:33:08 -0000	1.46
@@ -1,20 +1,16 @@
 Name: smolt
 Summary: Fedora hardware profiler
 Version: 1.1.1.1
-Release: 3%{?dist}
-License: GPL
+Release: 8%{?dist}
+License: GPLv2+
 Group: Applications/Internet
 URL: http://hosted.fedoraproject.org/projects/smolt
-
-# Note: This is a link to the gzip, you can't download it directly
-# This will get fixed as soon as hosted can create attachments directly
-
 Source: https://fedorahosted.org/releases/s/m/%{name}/%{name}-%{version}.tar.gz
-Source1: smolt.py
+Patch0: scan.patch
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
 BuildArch: noarch
-Requires: dbus-python, python-crypto, python-urlgrabber, gawk, python-genshi, python-paste
+Requires: dbus-python, python-urlgrabber, gawk, python-paste
 BuildRequires: gettext
 BuildRequires: desktop-file-utils
 
@@ -37,7 +33,10 @@
 Summary: Fedora hardware profiler server
 Group: Applications/Internet
 Requires: smolt = %{version}-%{release}
+Requires: python-genshi
+Requires: python-crypto
 Requires: TurboGears mx
+Requires: python-turboflot
 
 %description server
 The Fedora hardware profiler is a server-client system that does a hardware
@@ -67,6 +66,7 @@
 
 %prep
 %setup -q
+%patch0 -p0
 
 %build
 cd client/
@@ -88,8 +88,7 @@
 %{__mkdir} -p %{buildroot}/%{_sysconfdir}/sysconfig/
 %{__mkdir} -p %{buildroot}/%{_datadir}/firstboot/modules/
 %{__mkdir} -p %{buildroot}/%{_initrddir}
-#%{__mv} client/smoltFirstBoot.py %{buildroot}/%{_datadir}/firstboot/modules/smolt.py
-%{__mv} %{SOURCE1} %{buildroot}/%{_datadir}/firstboot/modules/smolt.py
+%{__mv} client/smoltFirstBoot.py %{buildroot}/%{_datadir}/firstboot/modules/smolt.py
 %{__mv} client/smolt-init %{buildroot}/%{_initrddir}/smolt
 
 touch %{buildroot}/%{_sysconfdir}/sysconfig/hw-uuid
@@ -112,6 +111,7 @@
 ln -s %{_datadir}/%{name}/client/sendProfile.py %{buildroot}/%{_bindir}/smoltSendProfile
 ln -s %{_datadir}/%{name}/client/deleteProfile.py %{buildroot}/%{_bindir}/smoltDeleteProfile
 ln -s %{_datadir}/%{name}/client/smoltGui.py %{buildroot}/%{_bindir}/smoltGui
+
 ln -s %{_sysconfdir}/%{name}/config.py %{buildroot}/%{_datadir}/%{name}/client/config.py
 
 desktop-file-install --vendor='fedora' --dir=%{buildroot}/%{_datadir}/applications client/smolt.desktop
@@ -150,6 +150,8 @@
 %dir %{_datadir}/%{name}
 %dir %{_sysconfdir}/%{name}/
 %{_datadir}/%{name}/client
+%ghost %{_datadir}/%{name}/client/scan.pyc
+%ghost %{_datadir}/%{name}/client/scan.pyo
 %{_datadir}/%{name}/doc
 %{_bindir}/smoltSendProfile
 %{_bindir}/smoltDeleteProfile
@@ -175,6 +177,21 @@
 %{_bindir}/smoltGui
 
 %changelog
+* Tue Nov 11 2008 Mike McGrath <mmcgrath at redhat.com> 1.1.1.1-8
+- Added patch for fixed scanner
+
+* Wed Oct 1 2008 Mike McGrath <mmcgrath at redhat.com> 1.1.1.1-7
+- Fix for 439496
+
+* Sun Sep  7 2008 Mike McGrath <mmcgrath at redhat.com> 1.1.1.1-6
+- Added turboflot to server, removed from firstboot
+
+* Thu Sep  4 2008 Tom "spot" Callaway <tcallawa at redhat.com> 1.1.1.1-5
+- fix license tag
+
+* Thu Apr 03 2008 Mike McGrath <mmcgrath at redhat.com> - 1.1.1.1-4
+- One revert for rawhide
+
 * Sat Mar 08 2008 Mike McGrath <mmcgrath at redhat.com> - 1.1.1.1-3
 - Fixing firstboot again for 437708, 437765
 




More information about the fedora-extras-commits mailing list