satellite/install/install.pl | 14 ++++++++++---- spacewalk/setup/bin/spacewalk-setup | 6 +++--- spacewalk/setup/lib/Spacewalk/Setup.pm | 3 +++ web/modules/dobby/Dobby/CLI/BackupCommands.pm | 4 ++-- web/modules/dobby/Dobby/DB.pm | 7 ++++--- web/modules/dobby/Dobby/Files.pm | 9 +++++++-- web/modules/dobby/Dobby/Reporting.pm | 2 +- web/modules/dobby/scripts/db-control | 5 +++++ 8 files changed, 35 insertions(+), 15 deletions(-)
New commits: commit dc4d978b0d87b918db9959b7441b32e54cbbce08 Author: Milan Zazrivec mzazrivec@redhat.com Date: Mon Oct 22 17:04:51 2012 +0200
859955 - remove spacewalk-slf4j-1.6.1-4.el5sat for RHEL-5 upgrades (cherry picked from commit 111e5edb3502a5433a995a8cc0bc5e6d003e9689)
diff --git a/satellite/install/install.pl b/satellite/install/install.pl index 90b455f..eed2288 100755 --- a/satellite/install/install.pl +++ b/satellite/install/install.pl @@ -500,6 +500,7 @@ sub remove_obsoleted_packages { if (`rpm -q --qf='%{VERSION}' redhat-release 2>/dev/null` =~ /^5.+$/) { push @pkgs, 'xml-commons'; push @pkgs, 'rhn-java-sat'; + push @pkgs, 'spacewalk-slf4j-1.6.1-4.el5sat'; }
if (Spacewalk::Setup::is_db_migration()) {
commit 9be83b0124b4c3288d41a53d22d1e2c1917cbacf Author: Stephen Herr sherr@redhat.com Date: Mon Oct 22 17:03:57 2012 +0200
852039 - get rid of useless error messages when verifying backup with db-control
diff --git a/web/modules/dobby/Dobby/Files.pm b/web/modules/dobby/Dobby/Files.pm index 10afd37..0a14e3f 100644 --- a/web/modules/dobby/Dobby/Files.pm +++ b/web/modules/dobby/Dobby/Files.pm @@ -91,8 +91,13 @@ sub gunzip_copy {
$gz->gzclose; close OUT if $write; - chown $uid, $gid, $dst; - chmod 0640, $dst; + if (defined($dst)) { + # if not defined set it to -1 i.e. no change + $uid = -1 if not defined $uid; + $gid = -1 if not defined $gid; + chown $uid, $gid, $dst; + chmod 0640, $dst; + }
return $ctx->hexdigest; }
commit 288256a5becfc6e6d963b52e40c8b8e54d384398 Author: Tomas Lestach tlestach@redhat.com Date: Mon Oct 22 17:03:06 2012 +0200
562287 - pass proxy configuration to spacewalk-setup to store it into rhn.conf file
diff --git a/satellite/install/install.pl b/satellite/install/install.pl index dce49b1..90b455f 100755 --- a/satellite/install/install.pl +++ b/satellite/install/install.pl @@ -46,6 +46,7 @@ my %opts = Spacewalk::Setup::parse_options();
my %up2dateOptions = (); my %rhnOptions = (); +my @additionalOptions = (); # read existing confgiuration Spacewalk::Setup::read_config(DEFAULT_UP2DATE_CONF_LOCATION, %up2dateOptions);
@@ -66,7 +67,7 @@ do_precondition_checks(%opts, %answers); print loc("* Pre-install checks complete. Beginning installation.\n");
print loc("* RHN Registration.\n"); -rhn_register(%opts, %answers, %up2dateOptions, %rhnOptions); +rhn_register(%opts, %answers, %up2dateOptions, %rhnOptions, @additionalOptions);
Spacewalk::Setup::upgrade_stop_services(%opts); remove_obsoleted_packages(%opts); @@ -124,7 +125,7 @@ if (@not_installed_rpms) {
# Call spacewalk-setup: print loc("* Now running spacewalk-setup.\n"); -system(SPACEWALK_SETUP_SCRIPT, @ARGV_ORIG, '--skip-logfile-init'); +system(SPACEWALK_SETUP_SCRIPT, @ARGV_ORIG, '--skip-logfile-init', @additionalOptions);
exit;
@@ -285,6 +286,8 @@ sub rhn_register { my $opts = shift; my $answers = shift; my $up2dateopts = shift; + my $rhnOptions = shift; + my $proxyOptionsRef = shift; my $proxyAccept;
if ($opts->{disconnected}) { @@ -362,6 +365,8 @@ Import values to be used by Satellite [y/n]", } }
+ push @$proxyOptionsRef, map { "--$_=" . $answers{$_} } grep { defined $answers{$_} } grep /^rhn-http-proxy/, keys %answers; + my $sys_hostname = $answers->{hostname};
ask(-question => "RHN Profile Name", diff --git a/spacewalk/setup/bin/spacewalk-setup b/spacewalk/setup/bin/spacewalk-setup index 0d7e694..876cada 100755 --- a/spacewalk/setup/bin/spacewalk-setup +++ b/spacewalk/setup/bin/spacewalk-setup @@ -1064,9 +1064,9 @@ sub populate_initial_configs { ( mount_point => $answers->{'mount-point'} || '/var/satellite', kickstart_mount_point => $answers->{'kickstart-mount-point'} || $answers->{'mount-point'} || '/var/satellite', - serverDOTsatelliteDOThttp_proxy => $answers->{'rhn-http-proxy'} || '', - serverDOTsatelliteDOThttp_proxy_username => $answers->{'rhn-http-proxy-username'} || '', - serverDOTsatelliteDOThttp_proxy_password => $answers->{'rhn-http-proxy-password'} || '', + serverDOTsatelliteDOThttp_proxy => ($opts->{'rhn-http-proxy'} ? $opts->{'rhn-http-proxy'} : $answers->{'rhn-http-proxy'}) || '', + serverDOTsatelliteDOThttp_proxy_username => ($opts->{'rhn-http-proxy'} ? $opts->{'rhn-http-proxy-username'} : $answers->{'rhn-http-proxy-username'}) || '', + serverDOTsatelliteDOThttp_proxy_password => ($opts->{'rhn-http-proxy'} ? $opts->{'rhn-http-proxy-password'} :$answers->{'rhn-http-proxy-password'}) || '', webDOTis_monitoring_backend => 0, webDOTis_monitoring_scout => 0, webDOTenable_solaris_support => 0, diff --git a/spacewalk/setup/lib/Spacewalk/Setup.pm b/spacewalk/setup/lib/Spacewalk/Setup.pm index 770e27f..693a34c 100644 --- a/spacewalk/setup/lib/Spacewalk/Setup.pm +++ b/spacewalk/setup/lib/Spacewalk/Setup.pm @@ -120,6 +120,9 @@ sub parse_options { "enable-tftp:s", "external-db", "db-only", + "rhn-http-proxy:s", + "rhn-http-proxy-username:s", + "rhn-http-proxy-password:s", );
my $usage = loc("usage: %s %s\n",
commit 5daea56fc09f79a045b6e15803a9315620cf91b7 Author: Michael Mraka michael.mraka@redhat.com Date: Mon Oct 22 17:02:26 2012 +0200
552628 - added reset-password to man page
diff --git a/web/modules/dobby/scripts/db-control b/web/modules/dobby/scripts/db-control index 689c5e5..7e14ff0 100755 --- a/web/modules/dobby/scripts/db-control +++ b/web/modules/dobby/scripts/db-control @@ -65,6 +65,7 @@ B<db-control> [B<report>] [B<report-stats>] [B<restore DIRNAME>] +[B<reset-password>] [B<set-optimizer>] [B<shrink-segments>] [B<start>] @@ -119,6 +120,10 @@ Reports on current usage of database space.
Reports tables with stale or empty statistics. On Oracle DAYS are ignored. On PostgreSQL shows tables, which has not been ANALYZED (gather-stats do that) for DAYS days. Default is one day.
+=item B<reset-password> + +Resets database password according to value in /etc/rhn/rhn.conf. + =item B<restore DIRNAME>
Restores the database from backup kept in DIRNAME. Database must be stopped for this command to run successfully.
commit 2b02d80403d143eceef2ae6d7eef3f229babc2f8 Author: Michael Mraka michael.mraka@redhat.com Date: Mon Oct 22 17:01:30 2012 +0200
552628 - alter command can't use bind variables
diff --git a/web/modules/dobby/Dobby/DB.pm b/web/modules/dobby/Dobby/DB.pm index b5c696a..8dff2f7 100644 --- a/web/modules/dobby/Dobby/DB.pm +++ b/web/modules/dobby/Dobby/DB.pm @@ -490,9 +490,10 @@ sub password_reset { my $backend = PXT::Config->get('db_backend'); my $dsn = "dbi:Pg:dbname=".PXT::Config->get("db_name"); my $dbh = ($backend eq 'postgresql') ? RHN::DB->direct_connect($dsn) : $self->sysdba_connect; - my $query = ($backend eq 'postgresql') ? qq|ALTER USER $user WITH ENCRYPTED PASSWORD ?| - : qq{ALTER USER $user IDENTIFIED BY ? ACCOUNT UNLOCK}; - if ($dbh->do($query, undef, $password)) { + my $query = ($backend eq 'postgresql') ? + qq{ALTER USER $user WITH ENCRYPTED PASSWORD '$password'}: + qq{ALTER USER $user IDENTIFIED BY "$password" ACCOUNT UNLOCK}; + if ($dbh->do($query)) { return $user; } return 0;
commit 45ae87217daf1283428a06c6e0acb5833aa6726b Author: Tomas Kasparek tkasparek@redhat.com Date: Mon Oct 22 17:01:15 2012 +0200
852038 - Using fetchall_arrayref instead of fullfetch_arrayref.
diff --git a/web/modules/dobby/Dobby/Reporting.pm b/web/modules/dobby/Dobby/Reporting.pm index 32e4a85..41501a1 100644 --- a/web/modules/dobby/Dobby/Reporting.pm +++ b/web/modules/dobby/Dobby/Reporting.pm @@ -131,7 +131,7 @@ SELECT tbs.segment_space_management, rec.* EOQ my $sth = $dbh->prepare($query); $sth->execute; - return $sth->fullfetch_hashref; + return @{$sth->fetchall_arrayref({ })}; }
1;
commit 5bd53373ec6b127a5f02c95e3ad6c0dcdff332d3 Author: Tomas Lestach tlestach@redhat.com Date: Mon Oct 22 17:00:33 2012 +0200
850714 - do not push strings into an array, when array is expected
diff --git a/web/modules/dobby/Dobby/CLI/BackupCommands.pm b/web/modules/dobby/Dobby/CLI/BackupCommands.pm index d60c697..0a9a43b 100644 --- a/web/modules/dobby/Dobby/CLI/BackupCommands.pm +++ b/web/modules/dobby/Dobby/CLI/BackupCommands.pm @@ -114,8 +114,8 @@ sub command_backup { my @files;
if ($backend eq 'oracle') { - push @files, $d->lk_file; - push @files, $d->sp_file; + push @files, [$d->lk_file, '/']; + push @files, [$d->sp_file, '/']; }
for my $dir ($d->data_dir, $d->archive_log_dir) {
commit e275e126df612da4d79c00871a475d942ceeb63a Author: Milan Zazrivec mzazrivec@redhat.com Date: Mon Oct 22 16:59:59 2012 +0200
correct regexp
diff --git a/satellite/install/install.pl b/satellite/install/install.pl index be3f7d7..dce49b1 100755 --- a/satellite/install/install.pl +++ b/satellite/install/install.pl @@ -545,7 +545,7 @@ sub remove_rhn_cache_and_kickstarts { } }
- if ($schema_version and $schema_version =~ /5.[01234].?/) { + if ($schema_version and $schema_version =~ /^5.[01234]./) { system('rm -rf /var/cache/rhn/* > /dev/null 2>&1');
if (-d '/var/lib/rhn/kickstarts/wizard') {
commit 944e343c193c36aa3450c7a933de2dc27524dbef Author: Milan Zazrivec mzazrivec@redhat.com Date: Mon Oct 22 16:59:53 2012 +0200
remove /var/cache/rhn also for upgrades from Satellite 5.4
diff --git a/satellite/install/install.pl b/satellite/install/install.pl index 0e85c45..be3f7d7 100755 --- a/satellite/install/install.pl +++ b/satellite/install/install.pl @@ -545,7 +545,7 @@ sub remove_rhn_cache_and_kickstarts { } }
- if ($schema_version and $schema_version =~ /5.[0123].?/) { + if ($schema_version and $schema_version =~ /5.[01234].?/) { system('rm -rf /var/cache/rhn/* > /dev/null 2>&1');
if (-d '/var/lib/rhn/kickstarts/wizard') {
commit a0839950dd167f61abefed092b46b3c7fd66d9e4 Author: Milan Zazrivec mzazrivec@redhat.com Date: Mon Oct 22 16:59:37 2012 +0200
rename router-users.xml as well
diff --git a/satellite/install/install.pl b/satellite/install/install.pl index e1b5dd5..0e85c45 100755 --- a/satellite/install/install.pl +++ b/satellite/install/install.pl @@ -523,7 +523,7 @@ sub remove_jabberd_configs { return if (`rpm -qp --qf='%{VERSION}-%{RELEASE}' Satellite/jabberd-2*.rpm` eq `rpm -q --qf='%{VERSION}-%{RELEASE}' jabberd`);
- foreach my $cf ('c2s', 's2s', 'sm', 'router') { + foreach my $cf ('c2s', 's2s', 'sm', 'router', 'router-users') { my $cf_path = "/etc/jabberd/$cf.xml"; if (-f $cf_path) { system("mv -f $cf_path $cf_path.old");
spacewalk-commits@lists.fedorahosted.org