client/rhel/rhn-client-tools/src/up2date_client/rhnreg.py | 6 - rel-eng/packages/spacewalk-web | 2 web/modules/rhn/RHN/AppInstall/Process.pm | 18 ++++ web/modules/rhn/RHN/AppInstall/Process/Step/Redirect.pm | 15 +++ web/modules/rhn/RHN/AppInstall/Process/Step/Requirements.pm | 19 ++++ web/modules/rhn/RHN/DB/AppInstall/Session.pm | 54 ++++++++++++ web/modules/rhn/RHN/DB/ConfigRevision.pm | 11 +- web/spacewalk-web.spec | 5 - 8 files changed, 119 insertions(+), 11 deletions(-)
New commits: commit 8f9fa0d641807c48088d8724598d44ab2ddc3916 Author: Miroslav Suchý msuchy@redhat.com Date: Fri Sep 10 12:00:40 2010 +0200
Automatic commit of package [spacewalk-web] release [1.2.6-1].
diff --git a/rel-eng/packages/spacewalk-web b/rel-eng/packages/spacewalk-web index aa1759d..83528b8 100644 --- a/rel-eng/packages/spacewalk-web +++ b/rel-eng/packages/spacewalk-web @@ -1 +1 @@ -1.2.5-1 web/ +1.2.6-1 web/ diff --git a/web/spacewalk-web.spec b/web/spacewalk-web.spec index 736d0ea..9ff86c8 100644 --- a/web/spacewalk-web.spec +++ b/web/spacewalk-web.spec @@ -2,7 +2,7 @@ Name: spacewalk-web Summary: Spacewalk Web site packages Group: Applications/Internet License: GPLv2 -Version: 1.2.5 +Version: 1.2.6 Release: 1%{?dist} URL: https://fedorahosted.org/spacewalk Source0: https://fedorahosted.org/releases/s/p/spacewalk/%%7Bname%7D-%%7Bversion%7D.t... @@ -256,6 +256,9 @@ rm -rf $RPM_BUILD_ROOT
# $Id$ %changelog +* Fri Sep 10 2010 Miroslav Suchý msuchy@redhat.com 1.2.6-1 +- 630950 - fix ISE in proxy webUI installer + * Thu Sep 09 2010 Miroslav Suchý msuchy@redhat.com 1.2.5-1 - 580080 - fix link to Proxy Guide
commit 32fd3d27b6e2766bbf0668d064e5f520915d85f9 Author: Miroslav Suchý msuchy@redhat.com Date: Thu Sep 9 23:40:08 2010 +0200
632203 - fix comment to corespond with code, decoding unicode to unicode produce traceback
diff --git a/client/rhel/rhn-client-tools/src/up2date_client/rhnreg.py b/client/rhel/rhn-client-tools/src/up2date_client/rhnreg.py index 359e1c0..d436452 100644 --- a/client/rhel/rhn-client-tools/src/up2date_client/rhnreg.py +++ b/client/rhel/rhn-client-tools/src/up2date_client/rhnreg.py @@ -541,13 +541,13 @@ class ActivationResult: return self._systemSlots
def _encode_characters(*args): - """ All the data we gathered from dmi, bios, gudev are in latin-1, + """ All the data we gathered from dmi, bios, gudev are in utf-8, we need to convert characters beyond ord(127) - e.g \xae to unicode. """ result=[] for item in args: item_type = type(item) - if item_type == StringType or item_type == UnicodeType: + if item_type == StringType: item = unicode(item, 'utf-8') elif item_type == TupleType: item = tuple(map(_encode_characters, item)) @@ -555,7 +555,7 @@ def _encode_characters(*args): item = map(_encode_characters, item) elif item_type == DictType or item_type == DictionaryType: item = dict([(_encode_characters(name, val)) for name, val in item.iteritems()]) - # else: numbers - are safe + # else: numbers or UnicodeType - are safe result.append(item) if len(result) == 1: return result[0]
commit 596759a675e87d854402eb066beefea13dd8b84c Author: Miroslav Suchý msuchy@redhat.com Date: Thu Sep 9 16:53:41 2010 +0200
630950 - remove delim_start and delim_end from proxy installer
This values has been removed rhn_config.insert_revision in commit 592b5c8619abd9094fd7cd9f8b7b10e5ceca608a. We actually do not need delim_start, delim_end - this code is now only used by proxy webUI installer and it do not use macros. addressing: RHN::Exception: DBD::Oracle::st execute failed: ORA-06550: line 3, column 12: PLS-00306: wrong number or types of arguments in call to 'INSERT_REVISION' ORA-06550: line 3, column 3: PL/SQL: Statement ignored (DBD ERROR: error possibly near <*> indicator at char 25 in 'DECLARE BEGIN :crid := <*>rhn_config.insert_revision(:revision, :cfid, :ccid, :ciid, :delim_start, :delim_end, :filetype); END; ') [for Statement "DECLARE BEGIN :crid := rhn_config.insert_revision(:revision, :cfid, :ccid, :ciid, :delim_start, :delim_end, :filetype); END; " with ParamValues: :ccid='5', :crid=undef, :ciid='2', :cfid='7', :filetype="1", :revision=1, :delim_start='{|', :delim_end='|}'] RHN::DB /usr/lib/perl5/vendor_perl/5.8.8/RHN/DB.pm 219 RHN::Exception::DB::throw RHN::DB::st /usr/lib/perl5/vendor_perl/5.8.8/RHN/DB.pm 537 RHN::DB::handle_error RHN::DB::ConfigRevision /usr/lib/perl5/vendor_perl/5.8.8/RHN/DB/ConfigRevision.pm 178 RHN::DB::st::execute_h RHN::ProxyInstall /usr/lib/perl5/vendor_perl/5.8.8/RHN/ProxyInstall.pm 400 RHN::DB::ConfigRevision::commit RHN::ProxyInstall /usr/lib/perl5/vendor_perl/5.8.8/RHN/ProxyInstall.pm 287 RHN::ProxyInstall::import_file RHN::ProxyInstall /usr/lib/perl5/vendor_perl/5.8.8/RHN/ProxyInstall.pm 286 (eval) main /usr/bin/rhn-load-ssl-cert.pl 72 RHN::ProxyInstall::extract_ssl_cert
diff --git a/web/modules/rhn/RHN/DB/ConfigRevision.pm b/web/modules/rhn/RHN/DB/ConfigRevision.pm index 031814c..9cf3f0e 100644 --- a/web/modules/rhn/RHN/DB/ConfigRevision.pm +++ b/web/modules/rhn/RHN/DB/ConfigRevision.pm @@ -169,15 +169,14 @@ sub commit { my $sth = $dbh->prepare(<<EOS); DECLARE BEGIN - :crid := rhn_config.insert_revision(:revision, :cfid, :ccid, :ciid, :delim_start, :delim_end, :filetype); + :crid := rhn_config.insert_revision(:revision, :cfid, :ccid, :ciid, :filetype); END; EOS my $crid;
$self->revision($self->next_revision); $sth->execute_h(cfid => $self->config_file_id, ccid => $ccid, ciid => $ciid, crid => $crid, - revision => $self->revision, delim_start => $self->delim_start, delim_end => $self->delim_end, - filetype => $cftid); + revision => $self->revision, filetype => $cftid);
$dbh->do_h("UPDATE rhnConfigFile SET latest_config_revision_id = :crid WHERE id = :cfid", crid => $crid, cfid => $self->config_file_id);
commit 6e564bae796dc5f5130c0a53b867a7c26dc266c4 Author: Miroslav Suchý msuchy@redhat.com Date: Thu Sep 9 16:48:58 2010 +0200
630950 - delim_start and delim_end could not be null
since commit 7c0e6037df55ebeb9797e1e3200e0095ae418e85, it could not be null empty string are converted by oracle to null, so put there some value we usually use this will does not matter since in proxy config we do not use macros
diff --git a/web/modules/rhn/RHN/DB/ConfigRevision.pm b/web/modules/rhn/RHN/DB/ConfigRevision.pm index a37a6c8..031814c 100644 --- a/web/modules/rhn/RHN/DB/ConfigRevision.pm +++ b/web/modules/rhn/RHN/DB/ConfigRevision.pm @@ -103,9 +103,9 @@ sub create_config_contents { my $sth; $sth = $dbh->prepare(<<EOS); INSERT INTO rhnConfigContent - (id, checksum_id, file_size, contents) + (id, checksum_id, file_size, contents, delim_start, delim_end) VALUES - (rhn_confcontent_id_seq.nextval, lookup_checksum('md5', :md5sum), :file_size, :contents) + (rhn_confcontent_id_seq.nextval, lookup_checksum('md5', :md5sum), :file_size, :contents, '{|', '|}') RETURNING id INTO :ccid EOS
commit 34b14a6bbf613e3e308778e2cabec8d7068eaee4 Author: Miroslav Suchý msuchy@redhat.com Date: Thu Sep 9 16:10:57 2010 +0200
630950 - lookup_config_info need additional parameter
addressing: RHN::Exception: DBD::Oracle::st execute failed: ORA-06550: line 2, column 11: PLS-00306: wrong number or types of arguments in call to 'LOOKUP_CONFIG_INFO' ORA-06550: line 2, column 3: PL/SQL: Statement ignored (DBD ERROR: error possibly near <*> indicator at char 16 in 'BEGIN :ret := <*>lookup_config_info(:p1, :p2, :p3, :p4); END;') [for Statement "BEGIN :ret := lookup_config_info(:p1, :p2, :p3, :p4); END;" with ParamValues: :p3='644', :ret=undef, :p1='root', :p4='', :p2='root'] RHN::DB /usr/lib/perl5/vendor_perl/5.8.8/RHN/DB.pm 219 RHN::Exception::DB::throw RHN::DB::db /usr/lib/perl5/vendor_perl/5.8.8/RHN/DB.pm 467 RHN::DB::handle_error RHN::DB::ConfigRevision /usr/lib/perl5/vendor_perl/5.8.8/RHN/DB/ConfigRevision.pm 160 RHN::DB::db::call_function RHN::ProxyInstall /usr/lib/perl5/vendor_perl/5.8.8/RHN/ProxyInstall.pm 400 RHN::DB::ConfigRevision::commit RHN::ProxyInstall /usr/lib/perl5/vendor_perl/5.8.8/RHN/ProxyInstall.pm 287 RHN::ProxyInstall::import_file RHN::ProxyInstall /usr/lib/perl5/vendor_perl/5.8.8/RHN/ProxyInstall.pm 286 (eval) main /usr/bin/rhn-load-ssl-cert.pl 72 RHN::ProxyInstall::extract_ssl_cert
diff --git a/web/modules/rhn/RHN/DB/ConfigRevision.pm b/web/modules/rhn/RHN/DB/ConfigRevision.pm index 5a914d5..a37a6c8 100644 --- a/web/modules/rhn/RHN/DB/ConfigRevision.pm +++ b/web/modules/rhn/RHN/DB/ConfigRevision.pm @@ -157,7 +157,7 @@ sub commit { }
my $dbh = RHN::DB->connect; - my $ciid = $dbh->call_function('lookup_config_info', $self->username, $self->groupname, $self->filemode, $self->selinux_ctx); + my $ciid = $dbh->call_function('lookup_config_info', $self->username, $self->groupname, $self->filemode, $self->selinux_ctx, undef); my $ccid = $self->config_content_id; my $cftid = getFileTypeId($self->filetype);
commit 19f3e97049e5613685c762d46ab869dcda588a91 Author: Miroslav Suchý msuchy@redhat.com Date: Thu Sep 9 15:54:21 2010 +0200
Revert "get_instance_id and set_instance_id are not referenced, removing."
This reverts commit a2592029f62bb769856df2379b22386472c86fd3. This is used in WebUI proxy install. Addressing: Error message: Can't locate object method "get_instance_id" via package "RHN::AppInstall::Session" at /usr/lib/perl5/vendor_perl/5.8.8/RHN/DB/AppInstall/Session.pm line 273.
diff --git a/web/modules/rhn/RHN/DB/AppInstall/Session.pm b/web/modules/rhn/RHN/DB/AppInstall/Session.pm index eb63e5b..67fda7c 100644 --- a/web/modules/rhn/RHN/DB/AppInstall/Session.pm +++ b/web/modules/rhn/RHN/DB/AppInstall/Session.pm @@ -470,6 +470,24 @@ foreach my $field (keys %valid_fields) { } }
+sub get_instance_id { + my $self = shift; + + return $self->get_app_instance->get_id() +} + +sub set_instance_id { + my $self = shift; + my $id = shift; + + my $app = RHN::AppInstall::Instance->lookup(-id => $id); + + $self->set_app_instance($app); + $self->{":modified:"}->{instance_id} = 1; + + return; +} + sub get_user_id { my $self = shift;
commit 5d47d5e803ee517c3c36b594ffc618d77e3e53f4 Author: Miroslav Suchý msuchy@redhat.com Date: Thu Sep 9 15:50:50 2010 +0200
Revert "get_user_id, set_user_id, get_server_id, and set_server_id do not seem to be used, removing."
This reverts commit 2c50ade1507bf5c06e4630da66e7ca3acd8714f0. This is used in webUI proxy installer. Addressing: Error message: Can't locate object method "get_server_id" via package "RHN::AppInstall::Session" at /usr/lib/perl5/vendor_perl/5.8.8/RHN/DB/AppInstall/Session.pm line 273.
diff --git a/web/modules/rhn/RHN/DB/AppInstall/Session.pm b/web/modules/rhn/RHN/DB/AppInstall/Session.pm index 07d032a..eb63e5b 100644 --- a/web/modules/rhn/RHN/DB/AppInstall/Session.pm +++ b/web/modules/rhn/RHN/DB/AppInstall/Session.pm @@ -470,4 +470,40 @@ foreach my $field (keys %valid_fields) { } }
+sub get_user_id { + my $self = shift; + + return $self->get_user->id() +} + +sub set_user_id { + my $self = shift; + my $id = shift; + + my $user = RHN::User->lookup(-id => $id); + + $self->set_user($user); + $self->{":modified:"}->{user_id} = 1; + + return; +} + +sub get_server_id { + my $self = shift; + + return $self->get_server->id() +} + +sub set_server_id { + my $self = shift; + my $id = shift; + + my $server = RHN::Server->lookup(-id => $id); + + $self->set_server($server); + $self->{":modified:"}->{server_id} = 1; + + return; +} + 1;
commit 031e5812c2d5709fb1a9e5a9132a9c229adb6397 Author: Miroslav Suchý msuchy@redhat.com Date: Thu Sep 9 15:44:41 2010 +0200
630950 - Revert "set_url and get_save_session do not appear elsewhere, removing."
This reverts commit 89892bd09bf0ace1d47daec040f7139b255fefc3. This is used in webUI proxy installer. Addressing: Error message: RHN::Exception: Invalid function: set_url RHN::AppInstall::Process::Step /usr/lib/perl5/vendor_perl/5.8.8/RHN/AppInstall/Process/Step.pm 42 RHN::Exception::throw RHN::AppInstall::Parser /usr/lib/perl5/vendor_perl/5.8.8/RHN/AppInstall/Parser.pm 332 RHN::AppInstall::Process::Step::new RHN::AppInstall::Parser /usr/lib/perl5/vendor_perl/5.8.8/RHN/AppInstall/Parser.pm 259 RHN::AppInstall::Parser::parse_redirect_step RHN::AppInstall::Parser /usr/lib/perl5/vendor_perl/5.8.8/RHN/AppInstall/Parser.pm 179 RHN::AppInstall::Parser::parse_step RHN::AppInstall::Parser /usr/lib/perl5/vendor_perl/5.8.8/RHN/AppInstall/Parser.pm 85 RHN::AppInstall::Parser::parse_install_section RHN::AppInstall::Parser /usr/lib/perl5/vendor_perl/5.8.8/RHN/AppInstall/Parser.pm 57 RHN::AppInstall::Parser::parse_tree Sniglets::AppInstall /usr/lib/perl5/vendor_perl/5.8.8/Sniglets/AppInstall.pm 450 RHN::AppInstall::Parser::parse_file Sniglets::AppInstall /usr/lib/perl5/vendor_perl/5.8.8/Sniglets/AppInstall.pm 61 Sniglets::AppInstall::load_appinstall_instance PXT::Parser /usr/lib/perl5/vendor_perl/5.8.8/PXT/Parser.pm 160 Sniglets::AppInstall::appinstall_start PXT::Parser /usr/lib/perl5/vendor_perl/5.8.8/PXT/Parser.pm 72 PXT::Parser::expand_tag PXT::ApacheHandler /usr/lib/perl5/vendor_perl/5.8.8/PXT/ApacheHandler.pm 522 PXT::Parser::expand_tags PXT::ApacheHandler /usr/lib/perl5/vendor_perl/5.8.8/PXT/ApacheHandler.pm 117 PXT::ApacheHandler::pxt_parse_data PXT::ApacheHandler /usr/lib/perl5/vendor_perl/5.8.8/PXT/ApacheHandler.pm 117 (eval) main -e 0 PXT::ApacheHandler::handler main -e 0 (eval)
diff --git a/web/modules/rhn/RHN/AppInstall/Process/Step/Redirect.pm b/web/modules/rhn/RHN/AppInstall/Process/Step/Redirect.pm index 8e04289..8197e82 100644 --- a/web/modules/rhn/RHN/AppInstall/Process/Step/Redirect.pm +++ b/web/modules/rhn/RHN/AppInstall/Process/Step/Redirect.pm @@ -41,6 +41,21 @@ sub get_url { return $self->{url}; }
+sub set_url { + my $self = shift; + my $url = shift; + + $self->{url} = $url; + + return; +} + +sub get_save_session { + my $self = shift; + + return $self->{save_session}; +} + sub set_save_session { my $self = shift; my $save_session = shift;
commit 3ddbd1e5ea33002326ed35bd007c81479817d9c0 Author: Miroslav Suchý msuchy@redhat.com Date: Thu Sep 9 15:42:22 2010 +0200
630950 - Revert "get_requirements and set_requirements do not appear elsewhere, removing."
This reverts commit 431fd7788853528e25e6ea6d3ca1056af20b9df7. This is used in WebUI installer addressing: Error message: RHN::Exception: Invalid function: set_requirements RHN::AppInstall::Process::Step /usr/lib/perl5/vendor_perl/5.8.8/RHN/AppInstall/Process/Step.pm 42 RHN::Exception::throw RHN::AppInstall::Parser /usr/lib/perl5/vendor_perl/5.8.8/RHN/AppInstall/Parser.pm 510 RHN::AppInstall::Process::Step::new RHN::AppInstall::Parser /usr/lib/perl5/vendor_perl/5.8.8/RHN/AppInstall/Parser.pm 259 RHN::AppInstall::Parser::parse_requirements_step RHN::AppInstall::Parser /usr/lib/perl5/vendor_perl/5.8.8/RHN/AppInstall/Parser.pm 179 RHN::AppInstall::Parser::parse_step RHN::AppInstall::Parser /usr/lib/perl5/vendor_perl/5.8.8/RHN/AppInstall/Parser.pm 85 RHN::AppInstall::Parser::parse_install_section RHN::AppInstall::Parser /usr/lib/perl5/vendor_perl/5.8.8/RHN/AppInstall/Parser.pm 57 RHN::AppInstall::Parser::parse_tree Sniglets::AppInstall /usr/lib/perl5/vendor_perl/5.8.8/Sniglets/AppInstall.pm 450 RHN::AppInstall::Parser::parse_file Sniglets::AppInstall /usr/lib/perl5/vendor_perl/5.8.8/Sniglets/AppInstall.pm 61 Sniglets::AppInstall::load_appinstall_instance PXT::Parser /usr/lib/perl5/vendor_perl/5.8.8/PXT/Parser.pm 160 Sniglets::AppInstall::appinstall_start PXT::Parser /usr/lib/perl5/vendor_perl/5.8.8/PXT/Parser.pm 72 PXT::Parser::expand_tag PXT::ApacheHandler /usr/lib/perl5/vendor_perl/5.8.8/PXT/ApacheHandler.pm 522 PXT::Parser::expand_tags PXT::ApacheHandler /usr/lib/perl5/vendor_perl/5.8.8/PXT/ApacheHandler.pm 117 PXT::ApacheHandler::pxt_parse_data PXT::ApacheHandler /usr/lib/perl5/vendor_perl/5.8.8/PXT/ApacheHandler.pm 117 (eval) main -e 0 PXT::ApacheHandler::handler main -e 0 (eval)
diff --git a/web/modules/rhn/RHN/AppInstall/Process/Step/Requirements.pm b/web/modules/rhn/RHN/AppInstall/Process/Step/Requirements.pm index 33070e9..45e0d49 100644 --- a/web/modules/rhn/RHN/AppInstall/Process/Step/Requirements.pm +++ b/web/modules/rhn/RHN/AppInstall/Process/Step/Requirements.pm @@ -34,6 +34,25 @@ sub valid_fields { return ($class->SUPER::valid_fields(), %valid_fields); }
+sub get_requirements { + my $self = shift; + + return @{$self->{requirements} || []}; +} + +sub set_requirements { + my $self = shift; + my @requirements = @_; + + if (ref $requirements[0] eq 'ARRAY') { + @requirements = @{$requirements[0]}; + } + + $self->push_requirement(@requirements); + + return; +} + sub push_requirement { my $self = shift; my @requirements = @_;
commit f1a228296711ed38a1ef61eb84cbe558c76e19ac Author: Miroslav Suchý msuchy@redhat.com Date: Thu Sep 9 15:40:40 2010 +0200
630950 - Revert "get_steps and set_steps are not called anywhere, removing."
This reverts commit 2efacec52aac4b889c2efe83137e1eeaa96299bc. This procedures are used during proxy webUI installer.
diff --git a/web/modules/rhn/RHN/AppInstall/Process.pm b/web/modules/rhn/RHN/AppInstall/Process.pm index 8a6fc70..788144a 100644 --- a/web/modules/rhn/RHN/AppInstall/Process.pm +++ b/web/modules/rhn/RHN/AppInstall/Process.pm @@ -63,6 +63,24 @@ sub lookup_step { return $step; }
+sub get_steps { + my $self = shift; + return @{$self->{steps} || []}; +} + +sub set_steps { + my $self = shift; + my @steps = @_; + + if (ref $steps[0] eq 'ARRAY') { + @steps = @{$steps[0]}; + } + + $self->push_step(@steps); + + return; +} + sub push_step { my $self = shift; my @steps = @_;
spacewalk-commits@lists.fedorahosted.org