Branch 'VADER' - java/code
by Pradeep Kilambi
java/code/src/com/redhat/rhn/frontend/action/rhnpackage/PackageDetailsAction.java | 11 ++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
New commits:
commit 98def69def128c3a95da895950822692da7e7ef2
Author: Pradeep Kilambi <pkilambi(a)redhat.com>
Date: Mon Aug 3 13:08:04 2009 -0400
515219 - We can have a channel with null description. In the packagedetailsaction we call replace on description without checking if its a valid string resulting in Null Pointer Exception.
diff --git a/java/code/src/com/redhat/rhn/frontend/action/rhnpackage/PackageDetailsAction.java b/java/code/src/com/redhat/rhn/frontend/action/rhnpackage/PackageDetailsAction.java
index 078fcb2..9bd7cb0 100644
--- a/java/code/src/com/redhat/rhn/frontend/action/rhnpackage/PackageDetailsAction.java
+++ b/java/code/src/com/redhat/rhn/frontend/action/rhnpackage/PackageDetailsAction.java
@@ -100,8 +100,15 @@ public class PackageDetailsAction extends RhnAction {
}
request.setAttribute("pack", pkg);
- request.setAttribute("description",
- pkg.getDescription().replace("\n", "<BR>\n"));
+ // description can be null.
+ if (pkg.getDescription() != null) {
+ request.setAttribute("description",
+ pkg.getDescription().replace("\n", "<BR>\n"));
+ }
+ else {
+ request.setAttribute("description",
+ pkg.getDescription());
+ }
request.setAttribute("packArches",
PackageFactory.findPackagesWithDifferentArch(pkg));
request.setAttribute("pid", pid);
14 years, 8 months
Branch 'repo-sync' - backend/satellite_tools
by Justin Sherrill
backend/satellite_tools/reposync.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit 50bd93570a4840063d2d42ef92097d4685fb4827
Author: Justin Sherrill <jsherril(a)redhat.com>
Date: Mon Aug 3 13:02:33 2009 -0400
adding newline to error message output
diff --git a/backend/satellite_tools/reposync.py b/backend/satellite_tools/reposync.py
index 37d01bb..80f830e 100644
--- a/backend/satellite_tools/reposync.py
+++ b/backend/satellite_tools/reposync.py
@@ -210,7 +210,7 @@ class RepoSync:
def error_msg(self, message):
rhnLog.log_clean(0, message)
- sys.stderr.write(message)
+ sys.stderr.write(str(message) + "\n")
def log_msg(self, message):
rhnLog.log_clean(0, message)
14 years, 8 months
Branch 'repo-sync' - 4 commits - backend/Makefile.backend backend/satellite_tools backend/spacewalk-backend.spec
by Justin Sherrill
backend/Makefile.backend | 2 -
backend/satellite_tools/reposync.py | 43 +++++++++++++++++++-----------------
backend/spacewalk-backend.spec | 1
3 files changed, 25 insertions(+), 21 deletions(-)
New commits:
commit c4f32e97c88e5d175f365ed65d24b76391d669a2
Author: Justin Sherrill <jsherril(a)redhat.com>
Date: Mon Aug 3 12:54:57 2009 -0400
fixing small method call in reposync
diff --git a/backend/satellite_tools/reposync.py b/backend/satellite_tools/reposync.py
index 97ec97e..37d01bb 100644
--- a/backend/satellite_tools/reposync.py
+++ b/backend/satellite_tools/reposync.py
@@ -56,7 +56,7 @@ class RepoSync:
self.error_msg("--url must be specified")
if not options.type:
quit = True
- self.error_message("--type must be specified")
+ self.error_msg("--type must be specified")
if not options.channel_label:
quit = True
self.error_msg("--channel must be specified")
commit 10c32328e6ac2f63b93f5e815179a57a10439be4
Author: Justin Sherrill <jsherril(a)redhat.com>
Date: Mon Aug 3 12:49:11 2009 -0400
fixing specfile to create directory for reposync
diff --git a/backend/Makefile.backend b/backend/Makefile.backend
index 73ca5c7..378723e 100644
--- a/backend/Makefile.backend
+++ b/backend/Makefile.backend
@@ -7,7 +7,7 @@ CONF_DIRS = apache-conf httpd-conf rhn-conf logrotate
# We look for config files in "well known" locations (rhn-conf,
# httpd-conf, logrotate)
-EXTRA_DIRS = /var/log/rhn /var/cache/rhn
+EXTRA_DIRS = /var/log/rhn /var/log/rhn/reposync /var/cache/rhn
all :: all-code all-conf
commit b2066fa2460ae2ec32a8a24958e155ce8420d4e0
Author: Justin Sherrill <jsherril(a)redhat.com>
Date: Mon Aug 3 12:43:11 2009 -0400
fixing small whitespace error with reposync
diff --git a/backend/satellite_tools/reposync.py b/backend/satellite_tools/reposync.py
index 6d03b60..97ec97e 100644
--- a/backend/satellite_tools/reposync.py
+++ b/backend/satellite_tools/reposync.py
@@ -76,8 +76,7 @@ class RepoSync:
self.repo_label = options.label
self.channel = self.load_channel()
- if not self.channel or not \
- rhnChannel.isCustomChannel(self.channel['id']):
+ if not self.channel or not rhnChannel.isCustomChannel(self.channel['id']):
print "Channel does not exist or is not custom"
sys.exit(1)
commit c03775d9bcb4e6387e6f04e1398c05f0128252c9
Author: Justin Sherrill <jsherril(a)redhat.com>
Date: Mon Aug 3 12:41:00 2009 -0400
adding better logging for spacewalk-repo-sync
diff --git a/backend/satellite_tools/reposync.py b/backend/satellite_tools/reposync.py
index 9418a78..6d03b60 100644
--- a/backend/satellite_tools/reposync.py
+++ b/backend/satellite_tools/reposync.py
@@ -13,7 +13,7 @@
# granted to use or replicate Red Hat trademarks that are incorporated
# in this software or its documentation.
#
-import sys, os
+import sys, os, time
from optparse import OptionParser
from common import rhnLib
from server import rhnPackage, rhnSQL, rhnChannel, rhnPackageUpload
@@ -23,6 +23,9 @@ from server.importlib.importLib import IncompletePackage
from server.importlib.backendOracle import OracleBackend
from server.importlib.packageImport import ChannelPackageSubscription
+
+default_log_location = '/var/log/rhn/reposync/'
+
class RepoSync:
parser = None
type = None
@@ -39,30 +42,32 @@ class RepoSync:
rhnSQL.initDB(db_string)
(options, args) = self.process_args()
+ log_filename = 'reposync.log'
+ if options.channel_label and options.label:
+ date = time.localtime()
+ datestr = '%s.%s.%s-%s:%s:%s' % (date.tm_year, date.tm_mon, date.tm_mday, date.tm_hour, date.tm_min, date.tm_sec)
+ log_filename = options.channel_label + '-' + options.label + '-' + datestr + '.log'
+
+ rhnLog.initLOG(default_log_location + log_filename)
quit = False
if not options.url:
quit = True
- print("--url must be specified")
+ self.error_msg("--url must be specified")
if not options.type:
quit = True
- print("--type must be specified")
+ self.error_message("--type must be specified")
if not options.channel_label:
quit = True
- print("--channel must be specified")
+ self.error_msg("--channel must be specified")
if not options.label:
quit = True
- print("--label must be specified")
-
- self.log_file = options.logfile
- if self.log_file:
- rhnLog.initLOG(self.log_file)
-
- self.error_msg(str(sys.argv))
+ self.error_msg("--label must be specified")
if quit:
sys.exit(1)
+ self.log_msg(str(sys.argv))
self.type = options.type
self.url = options.url
@@ -70,9 +75,8 @@ class RepoSync:
self.fail = options.fail
self.repo_label = options.label
self.channel = self.load_channel()
- self.log_file = options.logfile
- if not self.channel or not \
+ if not self.channel or not \
rhnChannel.isCustomChannel(self.channel['id']):
print "Channel does not exist or is not custom"
sys.exit(1)
@@ -89,7 +93,6 @@ class RepoSync:
self.parser.add_option('-t', '--type', action='store', dest='type', help='The type of repo, currently only "yum" is supported')
self.parser.add_option('-l', '--label', action='store', dest='label', help='A friendly label to refer to the repo')
self.parser.add_option('-f', '--fail', action='store_true', dest='fail', default=False , help="If a package import fails, fail the entire operation")
- self.parser.add_option('-g', '--logfile', action='store', dest='logfile', help="The log file to log to. Default is to stderr and stdout.")
return self.parser.parse_args()
def load_plugin(self):
@@ -101,7 +104,7 @@ class RepoSync:
def import_packages(self, packages):
to_link = []
to_download = []
- self.print_msg("Repo " + self.url + " has " + str(len(packages)) + ".")
+ self.print_msg("Repo " + self.url + " has " + str(len(packages)) + " packages.")
for pack in packages:
pid = None
if pack.checksums.has_key('md5sum'):
@@ -202,16 +205,17 @@ class RepoSync:
def print_msg(self, message):
- if self.log_file:
- rhnLog.log_clean(0, message)
+ rhnLog.log_clean(0, message)
print message
def error_msg(self, message):
- if self.log_file:
- rhnLog.log_clean(0, message)
+ rhnLog.log_clean(0, message)
sys.stderr.write(message)
+ def log_msg(self, message):
+ rhnLog.log_clean(0, message)
+
class ContentPackage:
#map of checksums. Valid keys are 'md5sum' & 'sha256'
diff --git a/backend/spacewalk-backend.spec b/backend/spacewalk-backend.spec
index 1fe9866..d9d77c6 100644
--- a/backend/spacewalk-backend.spec
+++ b/backend/spacewalk-backend.spec
@@ -538,6 +538,7 @@ rm -f %{rhnconf}/rhnSecret.py*
%{rhnroot}/satellite_tools/disk_dumper/dumper.py*
%{rhnroot}/satellite_tools/disk_dumper/string_buffer.py*
%dir %{rhnroot}/satellite_tools/repo_plugins
+%attr(770,root,apache) %dir %{_var}/log/rhn/reposync
%{rhnroot}/satellite_tools/repo_plugins/__init__.py*
%{rhnroot}/satellite_tools/repo_plugins/yum_src.py*
%config %attr(644,root,apache) %{rhnconf}/default/rhn_server_iss.conf
14 years, 8 months
java/code
by Justin Sherrill
java/code/src/com/redhat/rhn/common/db/datasource/xml/Channel_queries.xml | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
New commits:
commit a98d58387151826a01f3a489b00f1c5e7b79ad2e
Author: Justin Sherrill <jsherril(a)redhat.com>
Date: Mon Aug 3 12:30:52 2009 -0400
496080 - fixing issue where if the rhn tools beta channel was synced, you would get an ISE when trying to give the virt entitlement within an org that did not have access to that channel
the query was basically using the wrong view and doing some incorrect logic
diff --git a/java/code/src/com/redhat/rhn/common/db/datasource/xml/Channel_queries.xml b/java/code/src/com/redhat/rhn/common/db/datasource/xml/Channel_queries.xml
index 6dc72be..59a1538 100644
--- a/java/code/src/com/redhat/rhn/common/db/datasource/xml/Channel_queries.xml
+++ b/java/code/src/com/redhat/rhn/common/db/datasource/xml/Channel_queries.xml
@@ -1040,9 +1040,9 @@ SELECT DISTINCT C.id
AND CP.package_id = P.id
AND P.name_id = PN.id
AND PN.name = :package
- AND (C.org_id = :org_id OR C.org_id IS NULL OR EXISTS (
- SELECT 1 FROM rhnSharedChannelView SCV
- WHERE SCV.id = C.id AND SCV.org_trust_id = :org_id))
+ AND EXISTS (
+ SELECT 1 FROM rhnAvailableChannels AC
+ WHERE AC.channel_id = C.id AND AC.org_id = :org_id)
</query>
</mode>
14 years, 8 months
Branch 'VADER' - java/code
by Justin Sherrill
java/code/src/com/redhat/rhn/common/db/datasource/xml/Channel_queries.xml | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
New commits:
commit 1b07b1262b084a2f7c988ec9549283d78973bba2
Author: Justin Sherrill <jsherril(a)redhat.com>
Date: Mon Aug 3 12:30:52 2009 -0400
496080 - fixing issue where if the rhn tools beta channel was synced, you would get an ISE when trying to give the virt entitlement within an org that did not have access to that channel
the query was basically using the wrong view and doing some incorrect logic
diff --git a/java/code/src/com/redhat/rhn/common/db/datasource/xml/Channel_queries.xml b/java/code/src/com/redhat/rhn/common/db/datasource/xml/Channel_queries.xml
index 6dc72be..59a1538 100644
--- a/java/code/src/com/redhat/rhn/common/db/datasource/xml/Channel_queries.xml
+++ b/java/code/src/com/redhat/rhn/common/db/datasource/xml/Channel_queries.xml
@@ -1040,9 +1040,9 @@ SELECT DISTINCT C.id
AND CP.package_id = P.id
AND P.name_id = PN.id
AND PN.name = :package
- AND (C.org_id = :org_id OR C.org_id IS NULL OR EXISTS (
- SELECT 1 FROM rhnSharedChannelView SCV
- WHERE SCV.id = C.id AND SCV.org_trust_id = :org_id))
+ AND EXISTS (
+ SELECT 1 FROM rhnAvailableChannels AC
+ WHERE AC.channel_id = C.id AND AC.org_id = :org_id)
</query>
</mode>
14 years, 8 months
web/conf
by Jan Pazdziora
web/conf/rhn_web.conf | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit a5727269400d6f4f076dd7f298d22a56588ea374
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Mon Aug 3 17:34:39 2009 +0200
Bump up the version to 0.6, in preparation for Spacewalk 0.6.
diff --git a/web/conf/rhn_web.conf b/web/conf/rhn_web.conf
index e2bfde3..e612b9c 100644
--- a/web/conf/rhn_web.conf
+++ b/web/conf/rhn_web.conf
@@ -233,7 +233,7 @@ web.config_delim_start = {|
web.config_delim_end = |}
# the version of this RHN install as a whole
-web.version = 0.5
+web.version = 0.6
# the version of API
web.apiversion = 10.9
14 years, 8 months
client/tools
by Jan Pazdziora
client/tools/osad/src/jabber_lib.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit b5495e93327076e60a7667e6491ead05d6528673
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Mon Aug 3 15:46:49 2009 +0200
514320 - on F10, write_files_pattern does not give us write.
The pid file does not need O_RDWR anyway, so let's just make it
O_APPEND.
Addressing:
avc: denied { read } for pid=3169 comm="osa-dispatcher" name="osa-dispatcher.pid" dev=dm-0 ino=516358 scontext=unconfined_u:system_r:osa_dispatcher_t:s0 tcontext=unconfined_u:object_r:osa_dispatcher_var_run_t:s0 tclass=file
diff --git a/client/tools/osad/src/jabber_lib.py b/client/tools/osad/src/jabber_lib.py
index a5b2ae9..5c615ae 100644
--- a/client/tools/osad/src/jabber_lib.py
+++ b/client/tools/osad/src/jabber_lib.py
@@ -217,7 +217,7 @@ class Runner:
raise
try:
# Make sure we don't create the file world-writable (#162619)
- fd = os.open(pid_file, os.O_RDWR | os.O_CREAT, 0644)
+ fd = os.open(pid_file, os.O_WRONLY| os.O_APPEND | os.O_CREAT, 0644)
os.write(fd, str(os.getpid()))
os.write(fd, "\n")
os.close(fd)
14 years, 8 months
Changes to 'refs/tags/spacewalk-setup-0.6.17-1'
by Jan Pazdziora
Tag 'spacewalk-setup-0.6.17-1' created by Jan Pazdziora <jpazdziora(a)redhat.com> at 2009-08-03 10:08 +0000
Tagging package [spacewalk-setup] version [0.6.17-1] in directory [spacewalk/setup/].
Changes since oracle-selinux-0.1-23.11:
Jan Pazdziora (1):
Automatic commit of package [spacewalk-setup] release [0.6.17-1].
---
rel-eng/packages/spacewalk-setup | 2 +-
spacewalk/setup/spacewalk-setup.spec | 6 +++++-
2 files changed, 6 insertions(+), 2 deletions(-)
---
14 years, 8 months
rel-eng/packages spacewalk/setup
by Jan Pazdziora
rel-eng/packages/spacewalk-setup | 2 +-
spacewalk/setup/spacewalk-setup.spec | 6 +++++-
2 files changed, 6 insertions(+), 2 deletions(-)
New commits:
commit de50bb634fea17eeced792d5e2428223f6fd9937
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Mon Aug 3 12:08:08 2009 +0200
Automatic commit of package [spacewalk-setup] release [0.6.17-1].
diff --git a/rel-eng/packages/spacewalk-setup b/rel-eng/packages/spacewalk-setup
index 27c1349..c85585b 100644
--- a/rel-eng/packages/spacewalk-setup
+++ b/rel-eng/packages/spacewalk-setup
@@ -1 +1 @@
-0.6.16-1 spacewalk/setup/
+0.6.17-1 spacewalk/setup/
diff --git a/spacewalk/setup/spacewalk-setup.spec b/spacewalk/setup/spacewalk-setup.spec
index fe015c4..2a92fd7 100644
--- a/spacewalk/setup/spacewalk-setup.spec
+++ b/spacewalk/setup/spacewalk-setup.spec
@@ -1,5 +1,5 @@
Name: spacewalk-setup
-Version: 0.6.16
+Version: 0.6.17
Release: 1%{?dist}
Summary: Initial setup tools for Red Hat Spacewalk
@@ -101,6 +101,10 @@ rm -rf %{buildroot}
%dir %{_sysconfdir}/pki/spacewalk/jabberd
%changelog
+* Mon Aug 03 2009 Jan Pazdziora 0.6.17-1
+- No --log option, print_progress does logging for us, sqlplus should print to
+ STDOUT/STDERR
+
* Thu Jul 30 2009 Devan Goodwin <dgoodwin(a)redhat.com> 0.6.16-1
- Fix spacewalk-setup sudoers setup SHARED_DIR problem.
(dgoodwin(a)redhat.com)
14 years, 8 months
Changes to 'refs/tags/oracle-selinux-0.1-23.11'
by Jan Pazdziora
Tag 'oracle-selinux-0.1-23.11' created by Jan Pazdziora <jpazdziora(a)redhat.com> at 2009-08-03 10:07 +0000
Tagging package [oracle-selinux] version [0.1-23.11] in directory [selinux/oracle-selinux/].
Changes since oracle-xe-selinux-10.2-13:
Jan Pazdziora (1):
Automatic commit of package [oracle-selinux] minor release [0.1-23.11].
---
rel-eng/packages/oracle-selinux | 2 +-
selinux/oracle-selinux/oracle-selinux.spec | 6 +++++-
2 files changed, 6 insertions(+), 2 deletions(-)
---
14 years, 8 months