[Python-apps-commits] r9880 - in packages/nagstamon/trunk/debian (3 files)
chaica-guest at users.alioth.debian.org
chaica-guest at users.alioth.debian.org
Sat Jul 13 22:51:09 UTC 2013
Date: Saturday, July 13, 2013 @ 22:51:07
Author: chaica-guest
Revision: 9880
[ Carl Chenet ]
* debian/patches
- add fix-system-checking.patch
* debian/patches/series
- add fix-system-checking.patch
Added:
packages/nagstamon/trunk/debian/patches/fix-update-checking.patch
Modified:
packages/nagstamon/trunk/debian/changelog
packages/nagstamon/trunk/debian/patches/series
Modified: packages/nagstamon/trunk/debian/changelog
===================================================================
--- packages/nagstamon/trunk/debian/changelog 2013-07-13 05:39:03 UTC (rev 9879)
+++ packages/nagstamon/trunk/debian/changelog 2013-07-13 22:51:07 UTC (rev 9880)
@@ -1,9 +1,16 @@
-nagstamon (0.9.9-2) UNRELEASED; urgency=low
+nagstamon (0.9.9-2) unstable; urgency=high
+ [ Jakub Wilk ]
* Use canonical URIs for Vcs-* fields.
- -- Jakub Wilk <jwilk at debian.org> Sun, 05 May 2013 18:05:20 +0200
+ [ Carl Chenet ]
+ * debian/patches
+ - add fix-system-checking.patch
+ * debian/patches/series
+ - add fix-system-checking.patch
+ -- Carl Chenet <chaica at debian.org> Wed, 10 Jul 2013 23:58:16 +0200
+
nagstamon (0.9.9-1) unstable; urgency=low
* New upstream release
@@ -44,7 +51,7 @@
- Removed two recently unnecessary dependencies messing some images
-- Carl Chenet <chaica at ohmytux.com> Wed, 18 May 2011 03:33:02 +0200
-
+
nagstamon (0.9.6.1-1) unstable; urgency=low
* New upstream version (Closes: #585963,#591875)
Added: packages/nagstamon/trunk/debian/patches/fix-update-checking.patch
===================================================================
--- packages/nagstamon/trunk/debian/patches/fix-update-checking.patch (rev 0)
+++ packages/nagstamon/trunk/debian/patches/fix-update-checking.patch 2013-07-13 22:51:07 UTC (rev 9880)
@@ -0,0 +1,57 @@
+Description: fix the update-checking system
+Author: Henri Wahl <h.wahl at ifw-dresden.de>
+
+Index: nagstamon_0.9.9/Nagstamon/Actions.py
+===================================================================
+--- nagstamon_0.9.9/Nagstamon/Actions.py
++++ nagstamon_0.9.9/Nagstamon/Actions.py
+@@ -402,8 +402,10 @@ class CheckForNewVersion(threading.Thread):
+ if s.CheckingForNewVersion == False:
+ # set the flag to lock that connection
+ s.CheckingForNewVersion = True
++ # use IFW server to speed up request and secure via https
++ result = s.FetchURL("https://nagstamon.ifw-dresden.de/files-nagstamon/latest_version_" +\
++ self.output.version, giveback="raw", no_auth=True)
+ # remove newline
+- result = s.FetchURL("http://nagstamon.sourceforge.net/latest_version_" + self.output.version, giveback="raw")
+ version, error = result.result.split("\n")[0], result.error
+
+ # debug
+
+Index: nagstamon_0.9.9/Nagstamon/Server/Generic.py
+===================================================================
+--- nagstamon_0.9.9/Nagstamon/Server/Generic.py
++++ nagstamon_0.9.9/Nagstamon/Server/Generic.py
+@@ -946,7 +946,7 @@ class GenericServer(object):
+ return Result()
+
+
+- def FetchURL(self, url, giveback="obj", cgi_data=None):
++ def FetchURL(self, url, giveback="obj", cgi_data=None, no_auth=False):
+ """
+ get content of given url, cgi_data only used if present
+ "obj" FetchURL gives back a dict full of miserable hosts/services,
+@@ -957,14 +957,21 @@ class GenericServer(object):
+ """
+
+ # run this method which checks itself if there is some action to take for initializing connection
+- self.init_HTTP()
++ # if no_auth is true do not use Auth headers, used by Actions.CheckForNewVersion()
++ if no_auth == False:
++ self.init_HTTP()
++ # to avoid race condition and credentials leak use local HTTPheaders
++ HTTPheaders = self.HTTPheaders
++ else:
++ HTTPheaders = dict()
++ HTTPheaders["raw"] = HTTPheaders["obj"] = HTTPheaders["obj"] = dict()
+
+ try:
+ try:
+ # debug
+ if str(self.conf.debug_mode) == "True":
+ self.Debug(server=self.get_name(), debug="FetchURL: " + url + " CGI Data: " + str(cgi_data))
+- request = urllib2.Request(url, cgi_data, self.HTTPheaders[giveback])
++ request = urllib2.Request(url, cgi_data, HTTPheaders[giveback])
+ # use opener - if cgi_data is not empty urllib uses a POST request
+ urlcontent = self.urlopener.open(request)
+ del url, cgi_data, request
Modified: packages/nagstamon/trunk/debian/patches/series
===================================================================
--- packages/nagstamon/trunk/debian/patches/series 2013-07-13 05:39:03 UTC (rev 9879)
+++ packages/nagstamon/trunk/debian/patches/series 2013-07-13 22:51:07 UTC (rev 9880)
@@ -1 +1,2 @@
check-for-new-version.patch
+fix-update-checking.patch
More information about the Python-apps-commits
mailing list