5 commits - spacewalk/certs-tools
by Miroslav Suchý
spacewalk/certs-tools/sslToolLib.py | 17 --
spacewalk/certs-tools/timeLib.py | 263 ------------------------------------
2 files changed, 5 insertions(+), 275 deletions(-)
New commits:
commit a9efe2116fe3dcf6022e00f6cbfab811f876888a
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Fri Aug 19 10:44:38 2011 +0200
code cleanup - remove unused code from timeLib.py
diff --git a/spacewalk/certs-tools/timeLib.py b/spacewalk/certs-tools/timeLib.py
index 3e0339e..23c64f3 100644
--- a/spacewalk/certs-tools/timeLib.py
+++ b/spacewalk/certs-tools/timeLib.py
@@ -42,168 +42,17 @@ DAY = 24 * HOUR
WEEK = 7 * DAY
YEAR = 365 * DAY
-MAXINT, MININT = int(2L**31 - 1), int(-2L**31)
-
-class LeapYearException(Exception):
- "exception for leap year related things"
-
-def isLeapYearYN(year):
- yn4 = year/4.0
- if round(yn4) == yn4:
- # so far, yes
- yn100 = year/100.0
- if round(yn100) == yn100:
- yn400 = year/400.0
- return round(yn400) == yn400
- return 1
- return 0
-
-def checkLeapDay(tup):
- "raises an exception if a leap day but not valid"
- if not isLeapYearYN(tup[0]) and tup[1] == 2 and tup[2] == 29:
- raise LeapYearException(repr(tup))
-
-
def now():
return round(time())
def secs2str(format, secs):
assert type(secs) in (type(1), type(1.0))
return strftime(format, gmtime(round(secs)))
-str2tup = strptime
- # str2tup(s, format)
-def tup2secs(tup):
- assert isinstance(tup, struct_time)
- return mktime(tup) - timezone
-def secs2tup(secs):
- assert type(secs) in (type(1), type(1L), type(1.0))
- return gmtime(round(secs))
-def tup2str(format, tup):
- return secs2str(format, tup2secs(tup))
def str2secs(s, format):
- return tup2secs(str2tup(s, format))
-
-def str2str(s, formatIn, formatOut):
- return tup2str(formatOut, str2tup(s, formatIn))
-
-
-def checkTuple(tup, ignoreLeapYear=0):
- """ checks validity of a time tuple. Raises ValueError or LeapYearException
- Time tuple is: (YYYY, MM, DD, hh, mm, ss, wkday, day, dst)
- ( 0, 1, 2, 3, 4, 5, 6, 7 8)
- YYYY = 1901 - 1938 (for 32-bit boxes)
- MM = 01 - 12
- DD = 01 - 31
- hh, mm, ss = the obvious
- wkday = 0 - 6
- day = 1 - 366
- dst = -1, 0, 1 (-1=no-info, 0=not-dst, 1=dst)
- """
-
- if 0 in tup[0:3]:
- raise ValueError("Year, month, and day must be a non-negative, positive number: %s" % tup)
-
- # month
- if tup[1] not in range(1, 13):
- raise ValueError("Month value is calculated to within a range of 1-12: %s" % tup)
-
- # day
- if tup[2] not in range(1, 32):
- raise ValueError("Day value is calculated to within a range of 1-31: %s" % tup)
-
- # days
- if tup[7] not in range(1, 367):
- raise ValueError("Days value is calculated to within a range of 1-367: %s" % tup)
-
- # leapyear check
- if not ignoreLeapYear:
- # can raise LeapYearException
- checkLeapDay(tup)
-
- # 31-day month check
- if tup[2] == 31:
- if tup[1] not in (1, 3, 5, 7, 8, 10, 12):
- raise ValueError("Day value can't exceed 31 for months (2, 4, 6, 9, 11): %s" % tup)
-
- # epoch rollunder check
- t = secs2tup(MININT)
- underYN = 0
- if tup[0] < t[0]:
- underYN = 1
- elif tup[0] == t[0]:
- if tup[1] < t[1]:
- underYN = 1
- elif tup[1] == t[1]:
- if tup[2] < t[2]:
- underYN = 1
- elif tup[2] == t[2]:
- if tup[3] < t[3]:
- underYN = 1
- elif tup[3] == t[3]:
- if tup[4] < t[4]:
- underYN = 1
- elif tup[4] == t[4]:
- if tup[5] < t[5]:
- underYN = 1
- if underYN:
- raise ValueError('Tuple "under"flows the POSIX Epoch: %s' % tup)
-
- # epoch rollover check
- t = secs2tup(MAXINT)
- overYN = 0
- if tup[0] > t[0]:
- overYN = 1
- elif tup[0] == t[0]:
- if tup[1] > t[1]:
- overYN = 1
- elif tup[1] == t[1]:
- if tup[2] > t[2]:
- overYN = 1
- elif tup[2] == t[2]:
- if tup[3] > t[3]:
- overYN = 1
- elif tup[3] == t[3]:
- if tup[4] > t[4]:
- overYN = 1
- elif tup[4] == t[4]:
- if tup[5] > t[5]:
- overYN = 1
- if overYN:
- raise ValueError("Tuple overlows the POSIX Epoch: %s" % tup)
-
+ return mktime(strptime(s, format)) - timezone
-def tup_addYMD(tup, years=0, months=0, days=0, ignoreLeapYear=0):
- """ add years, months, days to a time tuple, checking for leap year
- sensibilities. Can throw a LeapYearException or ValueError.
- """
- tup = list(tup)
- tup[0], tup[1], tup[2], tup[7] = tup[0]+years, tup[1]+months, tup[2]+days, tup[7]+days
- tup = struct_time(tup)
- checkTuple(tup)
- return tup
-
-
-def years2secs(years):
- "an approximation"
- return years*YEAR
-def weeks2secs(weeks):
- return weeks*WEEK
-def days2secs(days):
- return days*DAY
-def hours2secs(hours):
- return hours*HOUR
-def mins2secs(mins):
- return mins*MIN
-
-
-def secs2mins(secs):
- return round(secs/MIN)
-def secs2hours(secs):
- return round(secs/HOUR)
def secs2days(secs):
return round(secs/DAY)
-def secs2weeks(secs):
- return round(secs/WEEK)
def secs2years(secs):
"an approximation"
return round(secs/YEAR)
@@ -216,111 +65,10 @@ def _test():
print 'Right now, in seconds (epoch): ', nowS
print 'Right now, stringified: ', secs2str(F, nowS)
- print 'One year from now, in seconds: ', nowS+YEAR
- print 'One year from now, secs2tup: ', secs2tup(nowS+YEAR)
- print '(1)...secs2str(F, ...): ',\
- secs2str(F, nowS+YEAR)
- print '(2)...str2tup(secs2str(F, ...), F): ',\
- str2tup(secs2str(F, nowS+YEAR), F)
- print '(3)...tup2secs(str2tup(secs2str(F, ...), F)): ',\
- tup2secs(str2tup(secs2str(F, nowS+YEAR), F))
- print '(4)...secs2tup(tup2secs(str2tup(secs2str(F, ...), F))): ',\
- secs2tup(tup2secs(str2tup(secs2str(F, nowS+YEAR), F)))
- print '(5)...tup2str(F, secs2tup(tup2secs(str2tup(secs2str(F, ...), F)))): ',\
- tup2str(F, secs2tup(tup2secs(str2tup(secs2str(F, nowS+YEAR), F))))
- print '(6)...str2secs(tup2str(F, secs2tup(tup2secs(str2tup(secs2str(F, ...), F)))), F):',\
- str2secs(tup2str(F, secs2tup(tup2secs(str2tup(secs2str(F, nowS+YEAR), F)))), F)
- print "%s --> %s" % (secs2str(F, nowS+YEAR),
- str2str(secs2str(F, nowS+YEAR), F,
- "%Y-%m-%d %H:%M:%S"))
-
-
print 'YEAR, WEEK, DAY, HOUR, MIN: ', YEAR, WEEK, DAY, HOUR, MIN
- print 'years2secs(1): ', years2secs(1)
- print 'weeks2secs(1): ', weeks2secs(1)
- print 'days2secs(1): ', days2secs(1)
- print 'hours2secs(1): ', hours2secs(1)
- print 'mins2secs(1): ', mins2secs(1)
- print 'secs2mins(MIN): ', secs2mins(MIN)
- print 'secs2hours(HOUR):', secs2hours(HOUR)
print 'secs2days(DAY): ', secs2days(DAY)
- print 'secs2weeks(WEEK):', secs2weeks(WEEK)
print 'secs2years(YEAR):', secs2years(YEAR)
- print
- print 'Now (reminder) now: %s, %s' % (nowS, secs2tup(nowS))
- print ('TRULY one year, one month, one day from now:\n'
- '- in seconds: %s'
- % str(tup2secs(tup_addYMD(secs2tup(nowS),
- 1,1,1, ignoreLeapYear=1))))
- print ('- as a tuple: %s'
- % str(tup_addYMD(secs2tup(nowS), 1,1,1, ignoreLeapYear=1)))
-
- try:
- tup = struct_time((2004, 02, 28, 6, 35, 14, 0, 285, 1))
- print 'This is a good leap day: %s' % str(tup_addYMD(tup, 0,0,1))
- except LeapYearException, e:
- print 'Verified correctly bad! - %s' % e
- else:
- print 'Verified good!'
-
- try:
- tup = struct_time((2005, 02, 28, 6, 35, 14, 0, 285, 1))
- # for printing
- print 'This is a bad leap day: %s' % str(tup_addYMD(tup, 0,0,1, ignoreLeapYear=1))
- # for breaking
- tup_addYMD(tup, 0,0,1)
- except LeapYearException, e:
- print 'Verified correctly bad! - %s' % e
- else:
- print 'Verified good!'
-
- print "Tuple sanity checks"
- t = secs2tup(MAXINT)
- t = list(t)
- t[5] = t[5] + 1
- t = struct_time(t)
- print "One second over the POSIX Epoch max: %s" % t
- try:
- print "checkTuple(t)..."; checkTuple(t)
- except Exception, e:
- print e
- t = secs2tup(MININT)
- t = list(t)
- t[5] = t[5] - 1
- t = struct_time(t)
- print "One second under the POSIX Epoch min: %s" % t
- try:
- print "checkTuple(t)..."; checkTuple(t)
- except Exception, e:
- print e
-
- print "Not testing all checkTuple checks."
-
- print "April does not have 31 days..."
- t = secs2tup(0)
- t = list(t)
- t[1] = 4 # april
- t[2] = 31
- t = struct_time(t)
- try:
- print "checkTuple(t)..."; checkTuple(t)
- except Exception, e:
- print e
-
- print "March does have 31 days..."
- t = secs2tup(0)
- t = list(t)
- t[1] = 3 # march
- t[2] = 31
- t = struct_time(t)
- try:
- print "checkTuple(t)..."; checkTuple(t)
- except Exception, e:
- print e
-
-
-
if __name__ == '__main__':
_test()
commit 0beb9ccdb1482f7d14eb92f04b8289556e95ad86
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Fri Aug 19 09:56:29 2011 +0200
struct_time is in python since 2.2
diff --git a/spacewalk/certs-tools/timeLib.py b/spacewalk/certs-tools/timeLib.py
index 2454f4d..3e0339e 100644
--- a/spacewalk/certs-tools/timeLib.py
+++ b/spacewalk/certs-tools/timeLib.py
@@ -33,14 +33,7 @@
#
-from time import strftime, strptime, mktime, gmtime, timezone
-_struct_time = type(())
-try:
- # struct_time not in python 1.5.2
- from time import struct_time
- _struct_time = struct_time
-except ImportError:
- pass
+from time import strftime, strptime, mktime, gmtime, timezone, struct_time
from time import time
MIN = 60.0
@@ -80,7 +73,7 @@ def secs2str(format, secs):
str2tup = strptime
# str2tup(s, format)
def tup2secs(tup):
- assert isinstance(tup, _struct_time)
+ assert isinstance(tup, struct_time)
return mktime(tup) - timezone
def secs2tup(secs):
assert type(secs) in (type(1), type(1L), type(1.0))
@@ -185,7 +178,7 @@ def tup_addYMD(tup, years=0, months=0, days=0, ignoreLeapYear=0):
"""
tup = list(tup)
tup[0], tup[1], tup[2], tup[7] = tup[0]+years, tup[1]+months, tup[2]+days, tup[7]+days
- tup = _struct_time(tup)
+ tup = struct_time(tup)
checkTuple(tup)
return tup
@@ -264,7 +257,7 @@ def _test():
% str(tup_addYMD(secs2tup(nowS), 1,1,1, ignoreLeapYear=1)))
try:
- tup = _struct_time((2004, 02, 28, 6, 35, 14, 0, 285, 1))
+ tup = struct_time((2004, 02, 28, 6, 35, 14, 0, 285, 1))
print 'This is a good leap day: %s' % str(tup_addYMD(tup, 0,0,1))
except LeapYearException, e:
print 'Verified correctly bad! - %s' % e
@@ -272,7 +265,7 @@ def _test():
print 'Verified good!'
try:
- tup = _struct_time((2005, 02, 28, 6, 35, 14, 0, 285, 1))
+ tup = struct_time((2005, 02, 28, 6, 35, 14, 0, 285, 1))
# for printing
print 'This is a bad leap day: %s' % str(tup_addYMD(tup, 0,0,1, ignoreLeapYear=1))
# for breaking
@@ -286,7 +279,7 @@ def _test():
t = secs2tup(MAXINT)
t = list(t)
t[5] = t[5] + 1
- t = _struct_time(t)
+ t = struct_time(t)
print "One second over the POSIX Epoch max: %s" % t
try:
print "checkTuple(t)..."; checkTuple(t)
@@ -295,7 +288,7 @@ def _test():
t = secs2tup(MININT)
t = list(t)
t[5] = t[5] - 1
- t = _struct_time(t)
+ t = struct_time(t)
print "One second under the POSIX Epoch min: %s" % t
try:
print "checkTuple(t)..."; checkTuple(t)
@@ -309,7 +302,7 @@ def _test():
t = list(t)
t[1] = 4 # april
t[2] = 31
- t = _struct_time(t)
+ t = struct_time(t)
try:
print "checkTuple(t)..."; checkTuple(t)
except Exception, e:
@@ -320,7 +313,7 @@ def _test():
t = list(t)
t[1] = 3 # march
t[2] = 31
- t = _struct_time(t)
+ t = struct_time(t)
try:
print "checkTuple(t)..."; checkTuple(t)
except Exception, e:
commit ab414bd4d4ba52d47831463e9550bad1b5f73a1f
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Fri Aug 19 09:50:39 2011 +0200
simplify code - utilize os.urandom()
new in python 2.4
diff --git a/spacewalk/certs-tools/sslToolLib.py b/spacewalk/certs-tools/sslToolLib.py
index 93634c5..9cd4fb0 100644
--- a/spacewalk/certs-tools/sslToolLib.py
+++ b/spacewalk/certs-tools/sslToolLib.py
@@ -195,10 +195,8 @@ class TempDir:
# add some quick and dirty randomness to the tempfilename
s = ''
- x = open('/dev/urandom', 'rb')
while len(s) < 10:
- s = s + str(ord(x.read(1)))
- x.close()
+ s = s + str(ord(os.urandom(1)))
self.path = tempfile.mkdtemp(suffix='-'+s+suffix)
def getdir(self):
commit a7e27aab08ca9cace6a9dc016b2291c90e4b8650
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Fri Aug 19 09:45:44 2011 +0200
remove rant about python 1.5
diff --git a/spacewalk/certs-tools/sslToolLib.py b/spacewalk/certs-tools/sslToolLib.py
index 04abd54..93634c5 100644
--- a/spacewalk/certs-tools/sslToolLib.py
+++ b/spacewalk/certs-tools/sslToolLib.py
@@ -206,7 +206,7 @@ class TempDir:
getpath = getdir
def __del__(self):
- "a destructor that may never be called because python 1.5.2 sucks"
+ """ delete temporary directory when done with it """
self._shutil.rmtree(self.path)
close = __del__
commit 9c43c82126599eb0c6553f5bc48d9a34696eb490
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Fri Aug 19 09:43:58 2011 +0200
simplify code
this was due tempfile confusion prior python 2.3
diff --git a/spacewalk/certs-tools/sslToolLib.py b/spacewalk/certs-tools/sslToolLib.py
index d972d35..04abd54 100644
--- a/spacewalk/certs-tools/sslToolLib.py
+++ b/spacewalk/certs-tools/sslToolLib.py
@@ -199,16 +199,7 @@ class TempDir:
while len(s) < 10:
s = s + str(ord(x.read(1)))
x.close()
- self.path = self._getTempPath(suffix='-'+s+suffix)
- # tempfile.mkdtemp actaully *creates* the directory
- if not os.path.exists(self.path):
- os.makedirs(self.path, 0700)
-
- def _getTempPath(self, suffix):
- """ fetch the temporary directory path using the most "correct"
- mk*temp function for this python version
- """
- return tempfile.mkdtemp(suffix=suffix)
+ self.path = tempfile.mkdtemp(suffix='-'+s+suffix)
def getdir(self):
return self.path
12 years, 8 months
Changes to 'refs/tags/spacewalk-backend-1.6.12-1'
by Michael Mraka
Tag 'spacewalk-backend-1.6.12-1' created by Michael Mraka <michael.mraka(a)redhat.com> at 2011-08-19 08:11 +0000
Tagging package [spacewalk-backend] version [1.6.12-1] in directory [backend/].
Changes since spacewalk-java-1.6.24-1:
Michael Mraka (2):
593402 - cobbler-web is known to break our configuration
Automatic commit of package [spacewalk-backend] release [1.6.12-1].
Miroslav Suchý (4):
code cleanup - gen_signature() is not used
code cleanup - Satellite 3.4 is burried in history
code cleanup - remove AS2 options and md5 crypto (already commented out)
code style - More than one statement on a single line
---
backend/spacewalk-backend.spec | 7 ++++++-
rel-eng/packages/spacewalk-backend | 2 +-
spacewalk/certs-tools/sslToolConfig.py | 26 ++++----------------------
3 files changed, 11 insertions(+), 24 deletions(-)
---
12 years, 8 months
backend/spacewalk-backend.spec rel-eng/packages
by Michael Mraka
backend/spacewalk-backend.spec | 5 ++++-
rel-eng/packages/spacewalk-backend | 2 +-
2 files changed, 5 insertions(+), 2 deletions(-)
New commits:
commit f41ed1a95379152aad546644e6737bdf6f7b8dd7
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Fri Aug 19 10:11:37 2011 +0200
Automatic commit of package [spacewalk-backend] release [1.6.12-1].
diff --git a/backend/spacewalk-backend.spec b/backend/spacewalk-backend.spec
index a58ef49..90cda5f 100644
--- a/backend/spacewalk-backend.spec
+++ b/backend/spacewalk-backend.spec
@@ -11,7 +11,7 @@ Name: spacewalk-backend
Summary: Common programs needed to be installed on the Spacewalk servers/proxies
Group: Applications/Internet
License: GPLv2 and Python
-Version: 1.6.11
+Version: 1.6.12
Release: 1%{?dist}
URL: https://fedorahosted.org/spacewalk
Source0: https://fedorahosted.org/releases/s/p/spacewalk/%{name}-%{version}.tar.gz
@@ -674,6 +674,9 @@ rm -f %{rhnconf}/rhnSecret.py*
# $Id$
%changelog
+* Fri Aug 19 2011 Michael Mraka <michael.mraka(a)redhat.com> 1.6.12-1
+- 593402 - cobbler-web is known to break our configuration
+
* Thu Aug 18 2011 Miroslav Suchý 1.6.11-1
- 723856 - remove unused variable
- if we use 1024 as base, we should use kiB, MiB, GiB
diff --git a/rel-eng/packages/spacewalk-backend b/rel-eng/packages/spacewalk-backend
index 0c411a1..80d2f8b 100644
--- a/rel-eng/packages/spacewalk-backend
+++ b/rel-eng/packages/spacewalk-backend
@@ -1 +1 @@
-1.6.11-1 backend/
+1.6.12-1 backend/
12 years, 8 months
backend/spacewalk-backend.spec
by Michael Mraka
backend/spacewalk-backend.spec | 2 ++
1 file changed, 2 insertions(+)
New commits:
commit fe6d334ff5bc86608b944fdc3300f115e78da54d
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Fri Aug 19 10:09:06 2011 +0200
593402 - cobbler-web is known to break our configuration
diff --git a/backend/spacewalk-backend.spec b/backend/spacewalk-backend.spec
index f5b145a..a58ef49 100644
--- a/backend/spacewalk-backend.spec
+++ b/backend/spacewalk-backend.spec
@@ -86,6 +86,8 @@ Provides: rhns-server = 1:%{version}-%{release}
#this exists only on rhel5 and rhel6
Conflicts: python-sgmlop
+# cobbler-web is known to break our configuration
+Conflicts: cobbler-web
%if 0%{?rhel} && 0%{?rhel} < 6
Requires: mod_python
12 years, 8 months
4 commits - spacewalk/certs-tools
by Miroslav Suchý
spacewalk/certs-tools/sslToolConfig.py | 26 ++++----------------------
1 file changed, 4 insertions(+), 22 deletions(-)
New commits:
commit 30a36b3161fe481c21633e13d912c04c2a76b91b
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Fri Aug 19 09:25:13 2011 +0200
code style - More than one statement on a single line
C:458:figureSerial: More than one statement on a single line
C:459:figureSerial: More than one statement on a single line
diff --git a/spacewalk/certs-tools/sslToolConfig.py b/spacewalk/certs-tools/sslToolConfig.py
index 2f8c641..1d3f806 100644
--- a/spacewalk/certs-tools/sslToolConfig.py
+++ b/spacewalk/certs-tools/sslToolConfig.py
@@ -455,8 +455,10 @@ def figureSerial(caCertFilename, serialFilename, indexFilename):
# what serial # is the ca cert using (we need to increment from that)
ret, outstream, errstream = rhn_popen(['/usr/bin/openssl', 'x509', '-noout',
'-serial', '-in', caCertFilename])
- out = outstream.read(); outstream.close()
- errstream.read(); errstream.close()
+ out = outstream.read()
+ outstream.close()
+ errstream.read()
+ errstream.close()
assert not ret
caSerial = string.split(string.strip(out), '=')
assert len(caSerial) > 1
commit bca811c374516e64bb6091dfd362f7a206c0bb6d
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Fri Aug 19 09:22:34 2011 +0200
code cleanup - remove AS2 options and md5 crypto (already commented out)
diff --git a/spacewalk/certs-tools/sslToolConfig.py b/spacewalk/certs-tools/sslToolConfig.py
index 4e9092b..2f8c641 100644
--- a/spacewalk/certs-tools/sslToolConfig.py
+++ b/spacewalk/certs-tools/sslToolConfig.py
@@ -55,9 +55,6 @@ CA_OPENSSL_CNF_NAME = 'rhn-ca-openssl.cnf'
SERVER_OPENSSL_CNF_NAME = 'rhn-server-openssl.cnf'
MD = 'sha1'
-#MD = 'md5'
-
-#CRYPTO = '-aes256' # openssl on AS2.1 (< v0.9.7a) can't understand aes256
CRYPTO = '-des3'
commit 6274870c6c21eb410652ddeaff1b7812e6765094
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Fri Aug 19 09:20:50 2011 +0200
code cleanup - Satellite 3.4 is burried in history
diff --git a/spacewalk/certs-tools/sslToolConfig.py b/spacewalk/certs-tools/sslToolConfig.py
index a966cce..4e9092b 100644
--- a/spacewalk/certs-tools/sslToolConfig.py
+++ b/spacewalk/certs-tools/sslToolConfig.py
@@ -34,9 +34,6 @@ from sslToolLib import getMachineName, daysTil18Jan2038, incSerial, fixSerial
# defaults where we can see them (NOTE: directory is figured at write time)
CERT_PATH = '/usr/share/rhn/certs/'
-if not os.path.exists(CERT_PATH):
- # v3.4.0 and older
- CERT_PATH = '/var/www/rhns/certs/'
BUILD_DIR = cleanupNormPath('./ssl-build', dotYN=1)
HOSTNAME = socket.gethostname()
MACHINENAME = getMachineName(HOSTNAME)
commit 5ac5cf9f5e8c7c300c2168260500510426ec0fec
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Fri Aug 19 09:19:00 2011 +0200
code cleanup - gen_signature() is not used
diff --git a/spacewalk/certs-tools/sslToolConfig.py b/spacewalk/certs-tools/sslToolConfig.py
index 1d0ac25..a966cce 100644
--- a/spacewalk/certs-tools/sslToolConfig.py
+++ b/spacewalk/certs-tools/sslToolConfig.py
@@ -449,20 +449,6 @@ def gen_req_distinguished_name(d):
return s
-def gen_signature(d):
- """ generate a signature such as:
- /C=US/ST=North Carolina/L=....
-
- XXX NOT USED CURRENTLY
- """
- s = ""
- keys = ('C', 'ST', 'L', 'O', 'OU', 'CN', 'emailAddress')
- for key in keys:
- if d.has_key(key) and string.strip(d[key]):
- s = s + '/%s=%s' % (key, string.strip(d[key]))
- return s
-
-
def figureSerial(caCertFilename, serialFilename, indexFilename):
""" for our purposes we allow the same serial number for server certs
BUT WE DO NOT ALLOW server certs and CA certs to share the same
12 years, 8 months
Changes to 'refs/tags/spacewalk-java-1.6.24-1'
by Tomas Lestach
Tag 'spacewalk-java-1.6.24-1' created by Tomas Lestach <tlestach(a)redhat.com> at 2011-08-18 16:57 +0000
Tagging package [spacewalk-java] version [1.6.24-1] in directory [java/].
Changes since spacewalk-backend-1.6.11-1:
Tomas Lestach (3):
663697 - enable csv export of System Currency Report
658533 - unify score computing for WebUI and API
Automatic commit of package [spacewalk-java] release [1.6.24-1].
---
java/code/src/com/redhat/rhn/frontend/dto/SystemCurrency.java | 7 ++
java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_en_US.xml | 24 ++++++++++
java/code/src/com/redhat/rhn/frontend/xmlrpc/system/SystemHandler.java | 7 --
java/code/webapp/WEB-INF/pages/systems/systemcurrency.jsp | 2
java/spacewalk-java.spec | 8 ++-
rel-eng/packages/spacewalk-java | 2
6 files changed, 42 insertions(+), 8 deletions(-)
---
12 years, 8 months
java/spacewalk-java.spec rel-eng/packages
by Tomas Lestach
java/spacewalk-java.spec | 8 +++++++-
rel-eng/packages/spacewalk-java | 2 +-
2 files changed, 8 insertions(+), 2 deletions(-)
New commits:
commit e8a2780d05e398a87bd4afd74f84206b4c436176
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Thu Aug 18 18:57:53 2011 +0200
Automatic commit of package [spacewalk-java] release [1.6.24-1].
diff --git a/java/spacewalk-java.spec b/java/spacewalk-java.spec
index 0fecffd..87e3645 100644
--- a/java/spacewalk-java.spec
+++ b/java/spacewalk-java.spec
@@ -17,7 +17,7 @@ Name: spacewalk-java
Summary: Spacewalk Java site packages
Group: Applications/Internet
License: GPLv2
-Version: 1.6.23
+Version: 1.6.24
Release: 1%{?dist}
URL: https://fedorahosted.org/spacewalk
Source0: https://fedorahosted.org/releases/s/p/spacewalk/%{name}-%{version}.tar.gz
@@ -546,6 +546,12 @@ fi
%{jardir}/postgresql-jdbc.jar
%changelog
+* Thu Aug 18 2011 Tomas Lestach <tlestach(a)redhat.com> 1.6.24-1
+- 658533 - unify score computing for WebUI and API (tlestach(a)redhat.com)
+- 663697 - enable csv export of System Currency Report (tlestach(a)redhat.com)
+- removing eclipse.libsrc.dirs since the directory was removed
+ (tlestach(a)redhat.com)
+
* Thu Aug 18 2011 Tomas Lestach <tlestach(a)redhat.com> 1.6.23-1
- 658533 - remove default currency from backend part of rhn.conf
(tlestach(a)redhat.com)
diff --git a/rel-eng/packages/spacewalk-java b/rel-eng/packages/spacewalk-java
index 2a3de77..b427197 100644
--- a/rel-eng/packages/spacewalk-java
+++ b/rel-eng/packages/spacewalk-java
@@ -1 +1 @@
-1.6.23-1 java/
+1.6.24-1 java/
12 years, 8 months
2 commits - java/code
by Tomas Lestach
java/code/src/com/redhat/rhn/frontend/dto/SystemCurrency.java | 7 ++
java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_en_US.xml | 24 ++++++++++
java/code/src/com/redhat/rhn/frontend/xmlrpc/system/SystemHandler.java | 7 --
java/code/webapp/WEB-INF/pages/systems/systemcurrency.jsp | 2
4 files changed, 34 insertions(+), 6 deletions(-)
New commits:
commit 99c7184cd60344651e44e01f9be89b4bd974212e
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Thu Aug 18 18:42:49 2011 +0200
658533 - unify score computing for WebUI and API
this commit shall not change any functionality, just unifies score calculation
diff --git a/java/code/src/com/redhat/rhn/frontend/xmlrpc/system/SystemHandler.java b/java/code/src/com/redhat/rhn/frontend/xmlrpc/system/SystemHandler.java
index 445adff..f941310 100644
--- a/java/code/src/com/redhat/rhn/frontend/xmlrpc/system/SystemHandler.java
+++ b/java/code/src/com/redhat/rhn/frontend/xmlrpc/system/SystemHandler.java
@@ -4754,12 +4754,7 @@ public class SystemHandler extends BaseHandler {
m.put("low", s.getLow());
m.put("bug", s.getBug());
m.put("enh", s.getEnhancement());
- m.put("score", s.getCritical() * ConfigDefaults.get().getSCCrit() +
- s.getImportant() * ConfigDefaults.get().getSCImp() +
- s.getModerate() * ConfigDefaults.get().getSCMod() +
- s.getLow() * ConfigDefaults.get().getSCLow() +
- s.getBug() * ConfigDefaults.get().getSCBug() +
- s.getEnhancement() * ConfigDefaults.get().getSCEnh());
+ m.put("score", s.getScore());
l.add(m);
}
commit 403d99934538acccfa805c14a78acf94043256b7
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Thu Aug 18 16:59:39 2011 +0200
663697 - enable csv export of System Currency Report
diff --git a/java/code/src/com/redhat/rhn/frontend/dto/SystemCurrency.java b/java/code/src/com/redhat/rhn/frontend/dto/SystemCurrency.java
index 5bd7cd2..ba5071f 100644
--- a/java/code/src/com/redhat/rhn/frontend/dto/SystemCurrency.java
+++ b/java/code/src/com/redhat/rhn/frontend/dto/SystemCurrency.java
@@ -150,6 +150,13 @@ public class SystemCurrency extends BaseDto implements Serializable {
return name;
}
/**
+ * another getter for name attribute
+ * @return Returns the name.
+ */
+ public String getServerName() {
+ return getName();
+ }
+ /**
* @param nameIn The name to set.
*/
public void setName(String nameIn) {
diff --git a/java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_en_US.xml b/java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_en_US.xml
index cce43fd..df5889f 100644
--- a/java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_en_US.xml
+++ b/java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_en_US.xml
@@ -18685,6 +18685,30 @@ performing a kickstart or creating a new kickstart distribution.</strong>
<trans-unit id="exportcolumn.issueDate">
<source>Issue Date</source>
</trans-unit>
+ <trans-unit id="exportcolumn.serverName">
+ <source>System</source>
+ </trans-unit>
+ <trans-unit id="exportcolumn.critical">
+ <source>Security (Critical)</source>
+ </trans-unit>
+ <trans-unit id="exportcolumn.important">
+ <source>Security (Important)</source>
+ </trans-unit>
+ <trans-unit id="exportcolumn.moderate">
+ <source>Security (Moderate)</source>
+ </trans-unit>
+ <trans-unit id="exportcolumn.low">
+ <source>Security (Low)</source>
+ </trans-unit>
+ <trans-unit id="exportcolumn.bug">
+ <source>Bugfixes</source>
+ </trans-unit>
+ <trans-unit id="exportcolumn.enhancement">
+ <source>Enhancements</source>
+ </trans-unit>
+ <trans-unit id="exportcolumn.score">
+ <source>Score</source>
+ </trans-unit>
</group>
<trans-unit id="virtualization.provision.first.jsp.no.profiles">
diff --git a/java/code/webapp/WEB-INF/pages/systems/systemcurrency.jsp b/java/code/webapp/WEB-INF/pages/systems/systemcurrency.jsp
index 5e094ed..b7b2cdf 100644
--- a/java/code/webapp/WEB-INF/pages/systems/systemcurrency.jsp
+++ b/java/code/webapp/WEB-INF/pages/systems/systemcurrency.jsp
@@ -176,6 +176,8 @@
<c:out value="${current.score}" />
</rl:column>
</rl:list>
+ <rl:csv dataset="pageList" name="systemCurrencyList"
+ exportColumns="serverName, critical, important, moderate, low, bug, enhancement, score" />
</rl:listset>
</body>
</html>
12 years, 8 months
Changes to 'refs/tags/spacewalk-backend-1.6.11-1'
by Miroslav Suchý
Tag 'spacewalk-backend-1.6.11-1' created by Miroslav Suchý <msuchy(a)redhat.com> at 2011-08-18 14:06 +0000
Tagging package [spacewalk-backend] version [1.6.11-1] in directory [backend/].
Changes since spacewalk-backend-1.6.10-1:
Miroslav Suchý (4):
731692 - correct output of number beyond decimal point in sat-sync
if we use 1024 as base, we should use kiB, MiB, GiB
723856 - remove unused variable
Automatic commit of package [spacewalk-backend] release [1.6.11-1].
Tomas Lestach (1):
removing eclipse.libsrc.dirs since the directory was removed
---
backend/satellite_tools/messages.py | 4 ++--
backend/satellite_tools/satsync.py | 10 +++++-----
backend/spacewalk-backend.spec | 7 ++++++-
java/build.xml | 1 -
java/buildconf/build-props.xml | 1 -
rel-eng/packages/spacewalk-backend | 2 +-
6 files changed, 14 insertions(+), 11 deletions(-)
---
12 years, 8 months
4 commits - backend/satellite_tools backend/spacewalk-backend.spec rel-eng/packages
by Miroslav Suchý
backend/satellite_tools/messages.py | 4 ++--
backend/satellite_tools/satsync.py | 10 +++++-----
backend/spacewalk-backend.spec | 7 ++++++-
rel-eng/packages/spacewalk-backend | 2 +-
4 files changed, 14 insertions(+), 9 deletions(-)
New commits:
commit 58993fac77440eb3dadb3d835df9e6960b0b8841
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Thu Aug 18 16:06:24 2011 +0200
Automatic commit of package [spacewalk-backend] release [1.6.11-1].
diff --git a/backend/spacewalk-backend.spec b/backend/spacewalk-backend.spec
index ac4d3d6..f5b145a 100644
--- a/backend/spacewalk-backend.spec
+++ b/backend/spacewalk-backend.spec
@@ -11,7 +11,7 @@ Name: spacewalk-backend
Summary: Common programs needed to be installed on the Spacewalk servers/proxies
Group: Applications/Internet
License: GPLv2 and Python
-Version: 1.6.10
+Version: 1.6.11
Release: 1%{?dist}
URL: https://fedorahosted.org/spacewalk
Source0: https://fedorahosted.org/releases/s/p/spacewalk/%{name}-%{version}.tar.gz
@@ -672,6 +672,11 @@ rm -f %{rhnconf}/rhnSecret.py*
# $Id$
%changelog
+* Thu Aug 18 2011 Miroslav Suchý 1.6.11-1
+- 723856 - remove unused variable
+- if we use 1024 as base, we should use kiB, MiB, GiB
+- 731692 - correct output of number beyond decimal point in sat-sync
+
* Thu Aug 18 2011 Tomas Lestach <tlestach(a)redhat.com> 1.6.10-1
- 658533 - remove default currency from backend part of rhn.conf
(tlestach(a)redhat.com)
diff --git a/rel-eng/packages/spacewalk-backend b/rel-eng/packages/spacewalk-backend
index 75cd5c0..0c411a1 100644
--- a/rel-eng/packages/spacewalk-backend
+++ b/rel-eng/packages/spacewalk-backend
@@ -1 +1 @@
-1.6.10-1 backend/
+1.6.11-1 backend/
commit 1df106a56a98959b2b3fbb65fb9774115c85781c
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Thu Aug 18 15:42:24 2011 +0200
723856 - remove unused variable
after moving code to Threading class, get number of current is much harder
and we really do not need it -> purge
diff --git a/backend/satellite_tools/messages.py b/backend/satellite_tools/messages.py
index a8fe7e8..ea5ca0d 100644
--- a/backend/satellite_tools/messages.py
+++ b/backend/satellite_tools/messages.py
@@ -64,10 +64,10 @@ Please contact your sales rep or RHN contact
not_enough_diskspace = _(" ERROR: not enough free space (%s KB) on device.")
package_fetch_successful = _(" %3d/%s Fetch successful: %s (%s bytes)")
-package_fetch_extinct = _(" %3d/%s Extinct package: %s")
+package_fetch_extinct = _(" Extinct package: %s")
package_fetch_total_size = _(" Total size: %s")
package_fetch_remain_size_time = _(" Downloaded %s of %s. Estimated remaining time: %s")
-package_fetch_failed = _(" %3d/%s Fetch unsuccessful: %s")
+package_fetch_failed = _(" Fetch unsuccessful: %s")
package_fetch_summary = _(" RPM fetch summary: %s")
package_fetch_summary_success = _(" success: %d")
package_fetch_summary_failed = _(" failed: %d")
diff --git a/backend/satellite_tools/satsync.py b/backend/satellite_tools/satsync.py
index 326ce30..cfc57f6 100644
--- a/backend/satellite_tools/satsync.py
+++ b/backend/satellite_tools/satsync.py
@@ -1908,7 +1908,7 @@ class ThreadDownload(threading.Thread):
# Mark the package as extinct
self.extinct_packages.put(package_id)
log(1, messages.package_fetch_extinct %
- (pkg_current, pkgs_total, os.path.basename(path)))
+ (os.path.basename(path)))
break # inner for
try:
@@ -1926,7 +1926,7 @@ class ThreadDownload(threading.Thread):
# Mark the package as failed and move on
self.failed_fs_packages.put(package_id)
log(1, messages.package_fetch_failed %
- (pkg_current, pkgs_total, os.path.basename(path)))
+ (os.path.basename(path)))
# Move to the next package
try:
self.queue.task_done()
commit 061d90567aadd89541764ac8a97068e893113c81
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Thu Aug 18 16:02:39 2011 +0200
if we use 1024 as base, we should use kiB, MiB, GiB
diff --git a/backend/satellite_tools/satsync.py b/backend/satellite_tools/satsync.py
index ad33def..326ce30 100644
--- a/backend/satellite_tools/satsync.py
+++ b/backend/satellite_tools/satsync.py
@@ -1812,13 +1812,13 @@ Please contact your RHN representative""") % (generation, sat_cert.generation))
if (bytes/kilo == 0):
return "%d bytes" %(bytes)
elif (bytes/mega == 0):
- return "%d kB" %(bytes / 1024)
+ return "%d kiB" %(bytes / 1024)
elif (bytes/giga == 0):
mega_value=bytes / mega
- return "%d.%03d MB" %(mega_value, (bytes % mega) / kilo)
+ return "%d.%03d MiB" %(mega_value, (bytes % mega) / kilo)
else:
giga_value=bytes / giga
- return "%d.%03d GB" %(giga_value, (bytes % giga) / mega)
+ return "%d.%03d GiB" %(giga_value, (bytes % giga) / mega)
def _get_package_stream(self, channel, package_id, nvrea, sources):
""" returns (filepath, stream), so in the case of a "wire source",
commit b59ac75ba462262a33e18a63d1486ef56376af89
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Thu Aug 18 16:00:26 2011 +0200
731692 - correct output of number beyond decimal point in sat-sync
diff --git a/backend/satellite_tools/satsync.py b/backend/satellite_tools/satsync.py
index d6ba3a7..ad33def 100644
--- a/backend/satellite_tools/satsync.py
+++ b/backend/satellite_tools/satsync.py
@@ -1815,10 +1815,10 @@ Please contact your RHN representative""") % (generation, sat_cert.generation))
return "%d kB" %(bytes / 1024)
elif (bytes/giga == 0):
mega_value=bytes / mega
- return "%d.%d MB" %(mega_value, (bytes % mega) / kilo)
+ return "%d.%03d MB" %(mega_value, (bytes % mega) / kilo)
else:
giga_value=bytes / giga
- return "%d.%d GB" %(giga_value, (bytes % giga) / mega)
+ return "%d.%03d GB" %(giga_value, (bytes % giga) / mega)
def _get_package_stream(self, channel, package_id, nvrea, sources):
""" returns (filepath, stream), so in the case of a "wire source",
12 years, 8 months