java/code
by Tomas Lestach
java/code/src/com/redhat/rhn/manager/kickstart/KickstartScheduleCommand.java | 20 +++++-----
1 file changed, 10 insertions(+), 10 deletions(-)
New commits:
commit 67acf7515cc9608b735387349bcad542e0f26180
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Thu Sep 22 11:50:09 2011 +0200
checkstyle issues
no functionality changes
diff --git a/java/code/src/com/redhat/rhn/manager/kickstart/KickstartScheduleCommand.java b/java/code/src/com/redhat/rhn/manager/kickstart/KickstartScheduleCommand.java
index be7c4a3..4278e89 100644
--- a/java/code/src/com/redhat/rhn/manager/kickstart/KickstartScheduleCommand.java
+++ b/java/code/src/com/redhat/rhn/manager/kickstart/KickstartScheduleCommand.java
@@ -63,7 +63,6 @@ import com.redhat.rhn.manager.token.ActivationKeyManager;
import org.apache.commons.lang.StringUtils;
import org.apache.log4j.Logger;
-import org.cobbler.CobblerConnection;
import org.cobbler.SystemRecord;
import java.util.ArrayList;
@@ -577,9 +576,10 @@ public class KickstartScheduleCommand extends BaseSystemOperation {
}
else {
// RegistrationType.DELETION && RegistrationType.NONE
- tokenList = org.cobbler.Profile.lookupById(CobblerXMLRPCHelper.getConnection(
- Config.get().getString(ConfigDefaults.COBBLER_AUTOMATED_USER)),
- ksdata.getCobblerId()).getRedHatManagementKey();
+ tokenList = org.cobbler.Profile.lookupById(
+ CobblerXMLRPCHelper.getConnection(
+ Config.get().getString(ConfigDefaults.COBBLER_AUTOMATED_USER)),
+ ksdata.getCobblerId()).getRedHatManagementKey();
}
CobblerSystemCreateCommand cmd =
@@ -695,12 +695,12 @@ public class KickstartScheduleCommand extends BaseSystemOperation {
if (regType.equals(RegistrationType.REACTIVATION)) {
// Create a new activation key for the target system.
createKickstartActivationKey(this.user,
- this.ksdata,
- RegistrationType.REACTIVATION.equals(regType) ? getTargetServer() : null,
- this.kickstartSession,
- cfgMgmtFlag,
- 1L,
- note);
+ this.ksdata,
+ RegistrationType.REACTIVATION.equals(regType) ? getTargetServer() : null,
+ this.kickstartSession,
+ cfgMgmtFlag,
+ 1L,
+ note);
}
this.createdProfile = processProfileType(this.profileType);
log.debug("** profile created: " + createdProfile);
12 years, 7 months
java/code java/conf
by Milan Zazrivec
java/code/src/com/redhat/rhn/manager/kickstart/KickstartScheduleCommand.java | 33 ++++++----
java/conf/cobbler/snippets/post_delete_system | 4 -
java/conf/cobbler/snippets/post_reactivation_key | 4 -
3 files changed, 27 insertions(+), 14 deletions(-)
New commits:
commit 6b34c33e1cbf3242a86b26917bfe6a9b03ab6f21
Author: Milan Zazrivec <mzazrivec(a)redhat.com>
Date: Wed Sep 21 17:27:43 2011 +0200
740306 - fix delete -> register reprovisioning scenario
For DELETION and NONE RegistrationType, we don't want to create new
reactivation key, but simply do a "bare metal" type of registration.
diff --git a/java/code/src/com/redhat/rhn/manager/kickstart/KickstartScheduleCommand.java b/java/code/src/com/redhat/rhn/manager/kickstart/KickstartScheduleCommand.java
index 773dd26..be7c4a3 100644
--- a/java/code/src/com/redhat/rhn/manager/kickstart/KickstartScheduleCommand.java
+++ b/java/code/src/com/redhat/rhn/manager/kickstart/KickstartScheduleCommand.java
@@ -14,6 +14,7 @@
*/
package com.redhat.rhn.manager.kickstart;
+import com.redhat.rhn.common.conf.Config;
import com.redhat.rhn.common.conf.ConfigDefaults;
import com.redhat.rhn.common.db.datasource.DataResult;
import com.redhat.rhn.common.db.datasource.ModeFactory;
@@ -62,6 +63,7 @@ import com.redhat.rhn.manager.token.ActivationKeyManager;
import org.apache.commons.lang.StringUtils;
import org.apache.log4j.Logger;
+import org.cobbler.CobblerConnection;
import org.cobbler.SystemRecord;
import java.util.ArrayList;
@@ -567,9 +569,18 @@ public class KickstartScheduleCommand extends BaseSystemOperation {
if (!cobblerOnly) {
// Setup Cobbler system profile
KickstartUrlHelper uhelper = new KickstartUrlHelper(ksdata);
- String tokenList =
- KickstartFormatter.generateActivationKeyString(
- ksdata, kickstartSession);
+ String tokenList;
+
+ if (ksdata.getRegistrationType(null).equals(RegistrationType.REACTIVATION)) {
+ tokenList = KickstartFormatter.generateActivationKeyString(
+ ksdata, kickstartSession);
+ }
+ else {
+ // RegistrationType.DELETION && RegistrationType.NONE
+ tokenList = org.cobbler.Profile.lookupById(CobblerXMLRPCHelper.getConnection(
+ Config.get().getString(ConfigDefaults.COBBLER_AUTOMATED_USER)),
+ ksdata.getCobblerId()).getRedHatManagementKey();
+ }
CobblerSystemCreateCommand cmd =
getCobblerSystemCreateCommand(user, server,
@@ -681,14 +692,16 @@ public class KickstartScheduleCommand extends BaseSystemOperation {
RegistrationType regType = getKsdata().getRegistrationType(user);
+ if (regType.equals(RegistrationType.REACTIVATION)) {
// Create a new activation key for the target system.
- createKickstartActivationKey(this.user,
- this.ksdata,
- RegistrationType.NONE.equals(regType) ? null : getTargetServer(),
- this.kickstartSession,
- cfgMgmtFlag,
- 1L,
- note);
+ createKickstartActivationKey(this.user,
+ this.ksdata,
+ RegistrationType.REACTIVATION.equals(regType) ? getTargetServer() : null,
+ this.kickstartSession,
+ cfgMgmtFlag,
+ 1L,
+ note);
+ }
this.createdProfile = processProfileType(this.profileType);
log.debug("** profile created: " + createdProfile);
}
diff --git a/java/conf/cobbler/snippets/post_delete_system b/java/conf/cobbler/snippets/post_delete_system
index f2a79ca..c11f591 100644
--- a/java/conf/cobbler/snippets/post_delete_system
+++ b/java/conf/cobbler/snippets/post_delete_system
@@ -1,7 +1,7 @@
-%post --interpreter /usr/bin/python
+%post --interpreter /usr/bin/python --nochroot
import xmlrpclib
import os.path
-system_id = "/root/systemid.old"
+system_id = "/tmp/rhn/systemid"
try:
if os.path.exists(system_id):
client = xmlrpclib.Server("http://$http_server/rpc/api")
diff --git a/java/conf/cobbler/snippets/post_reactivation_key b/java/conf/cobbler/snippets/post_reactivation_key
index ba471d3..369deab 100644
--- a/java/conf/cobbler/snippets/post_reactivation_key
+++ b/java/conf/cobbler/snippets/post_reactivation_key
@@ -2,7 +2,7 @@
try:
import xmlrpclib
import shutil
- import os
+ import sys
import os.path
old_system_id = "/tmp/rhn/systemid"
new_system_id = "/mnt/sysimage/root/systemid.old"
@@ -10,7 +10,7 @@ try:
new_keys = "$redhat_management_key"
for key in new_keys.split(','):
if key.startswith('re-'):
- os.exit(0)
+ sys.exit(0)
if os.path.exists(old_system_id):
client = xmlrpclib.Server("http://$redhat_management_server/rpc/api")
key = client.system.obtain_reactivation_key(open(old_system_id).read())
12 years, 7 months
Changes to 'refs/tags/spacewalk-proxy-installer-1.6.5-1'
by Miroslav Suchý
Tag 'spacewalk-proxy-installer-1.6.5-1' created by Miroslav Suchý <msuchy(a)redhat.com> at 2011-09-21 08:35 +0000
Tagging package [spacewalk-proxy-installer] version [1.6.5-1] in directory [proxy/installer/].
Changes since spacewalk-backend-1.6.20-1:
Joshua Roys (2):
Fix nvl2/case conversion
Fix `rhncfg-client verify' traceback for missing symlinks
Miroslav Suchý (3):
737853 - do not print output of awk, we care just about exit code
737853 - if rhn-ca-openssl.cnf does not exist, then check should succeed
Automatic commit of package [spacewalk-proxy-installer] release [1.6.5-1].
---
backend/server/rhnServer/server_kickstart.py | 2 +-
client/tools/rhncfg/config_client/rhncfgcli_verify.py | 11 +++++------
proxy/installer/configure-proxy.sh | 5 +++--
proxy/installer/spacewalk-proxy-installer.spec | 6 +++++-
rel-eng/packages/spacewalk-proxy-installer | 2 +-
5 files changed, 15 insertions(+), 11 deletions(-)
---
12 years, 7 months
3 commits - proxy/installer rel-eng/packages
by Miroslav Suchý
proxy/installer/configure-proxy.sh | 5 +++--
proxy/installer/spacewalk-proxy-installer.spec | 6 +++++-
rel-eng/packages/spacewalk-proxy-installer | 2 +-
3 files changed, 9 insertions(+), 4 deletions(-)
New commits:
commit 0319d467259eec17ef4b5582765c99e9e5ba795f
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Wed Sep 21 10:35:45 2011 +0200
Automatic commit of package [spacewalk-proxy-installer] release [1.6.5-1].
diff --git a/proxy/installer/spacewalk-proxy-installer.spec b/proxy/installer/spacewalk-proxy-installer.spec
index bf04231..ae956a1 100644
--- a/proxy/installer/spacewalk-proxy-installer.spec
+++ b/proxy/installer/spacewalk-proxy-installer.spec
@@ -2,7 +2,7 @@ Name: spacewalk-proxy-installer
Summary: Spacewalk Proxy Server Installer
Group: Applications/Internet
License: GPLv2
-Version: 1.6.4
+Version: 1.6.5
Release: 1%{?dist}
URL: https://fedorahosted.org/spacewalk
Source0: https://fedorahosted.org/releases/s/p/spacewalk/%{name}-%{version}.tar.gz
@@ -84,6 +84,10 @@ rm -rf $RPM_BUILD_ROOT
%doc LICENSE answers.txt
%changelog
+* Wed Sep 21 2011 Miroslav Suchý 1.6.5-1
+- 737853 - if rhn-ca-openssl.cnf does not exist, then check should succeed
+- 737853 - do not print output of awk, we care just about exit code
+
* Tue Sep 13 2011 Miroslav Suchý 1.6.4-1
- require rhn-ssl-tool which can handle --set-cname option
diff --git a/rel-eng/packages/spacewalk-proxy-installer b/rel-eng/packages/spacewalk-proxy-installer
index 1ace36c..ca088ae 100644
--- a/rel-eng/packages/spacewalk-proxy-installer
+++ b/rel-eng/packages/spacewalk-proxy-installer
@@ -1 +1 @@
-1.6.4-1 proxy/installer/
+1.6.5-1 proxy/installer/
commit eb2dd65ab2b1f269022e326f69a3245744b0c7c0
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Wed Sep 21 10:32:34 2011 +0200
737853 - if rhn-ca-openssl.cnf does not exist, then check should succeed
this can happen if you force own CA creation, then it is created with from scratch
and will contain the needed copy_extensions line
diff --git a/proxy/installer/configure-proxy.sh b/proxy/installer/configure-proxy.sh
index 3fb27c8..09870ae 100755
--- a/proxy/installer/configure-proxy.sh
+++ b/proxy/installer/configure-proxy.sh
@@ -188,7 +188,8 @@ is_hosted () {
}
check_ca_conf () {
- if awk '/^[[:space:]]*\[[[:space:]]*[_[:alnum:]]*[[:space:]]*]/ {CORRECT_SECTION=0} \
+ if [ -f /root/ssl-build/rhn-ca-openssl.cnf ] \
+ && awk '/^[[:space:]]*\[[[:space:]]*[_[:alnum:]]*[[:space:]]*]/ {CORRECT_SECTION=0} \
/^[[:space:]]*\[[[:space:]]*CA_default[[:space:]]*]/ {CORRECT_SECTION=1} \
/^[[:space:]]*copy_extensions[[:space:]]*=[[:space:]]*copy/ && CORRECT_SECTION==1 {exit 1}' \
/root/ssl-build/rhn-ca-openssl.cnf > /dev/null \
commit 1c8b816114080f96ddb9ba4f77a8f072ddfd50c1
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Wed Sep 21 10:29:40 2011 +0200
737853 - do not print output of awk, we care just about exit code
diff --git a/proxy/installer/configure-proxy.sh b/proxy/installer/configure-proxy.sh
index b686cdf..3fb27c8 100755
--- a/proxy/installer/configure-proxy.sh
+++ b/proxy/installer/configure-proxy.sh
@@ -191,7 +191,7 @@ check_ca_conf () {
if awk '/^[[:space:]]*\[[[:space:]]*[_[:alnum:]]*[[:space:]]*]/ {CORRECT_SECTION=0} \
/^[[:space:]]*\[[[:space:]]*CA_default[[:space:]]*]/ {CORRECT_SECTION=1} \
/^[[:space:]]*copy_extensions[[:space:]]*=[[:space:]]*copy/ && CORRECT_SECTION==1 {exit 1}' \
- /root/ssl-build/rhn-ca-openssl.cnf \
+ /root/ssl-build/rhn-ca-openssl.cnf > /dev/null \
&& [ ${#SSL_CNAME_PARSED[@]} -gt 0 ]; then
cat <<WARNING
It seems you tried to use the --set-cname option. On inspection we noticed that the openssl configuration file we use is missing a critically important option. Without this option, not only will multi host SSL certificates not work, but the planet Earth will implode in a massive rip in the time/space continuum. To avoid this failure, we choose to gracefully exit here and request for you to edit the openssl configuration file
12 years, 7 months
2 commits - backend/server client/tools
by Joshua Roys
backend/server/rhnServer/server_kickstart.py | 2 +-
client/tools/rhncfg/config_client/rhncfgcli_verify.py | 11 +++++------
2 files changed, 6 insertions(+), 7 deletions(-)
New commits:
commit 5b6752d2bb01c1fb6c0aa79d884e6beb5ece423b
Author: Joshua Roys <Joshua.Roys(a)gtri.gatech.edu>
Date: Mon Sep 19 10:35:32 2011 -0400
Fix `rhncfg-client verify' traceback for missing symlinks
Traceback (most recent call last):
File "/usr/bin/rhncfg-client", line 34, in <module>
sys.exit(Main().main() or 0)
File "/usr/share/rhn/config_common/rhn_main.py", line 187, in main
handler.run()
File "/usr/share/rhn/config_client/rhncfgcli_verify.py", line 83, in run
ret_dict = self._process_file(src, dst, file, ftype, file_info)
File "/usr/share/rhn/config_client/rhncfgcli_verify.py", line 251, in _process_file
dst_selinux = lgetfilecon(dst)[1]
OSError: [Errno 2] No such file or directory
diff --git a/client/tools/rhncfg/config_client/rhncfgcli_verify.py b/client/tools/rhncfg/config_client/rhncfgcli_verify.py
index c540b98..a87dc47 100644
--- a/client/tools/rhncfg/config_client/rhncfgcli_verify.py
+++ b/client/tools/rhncfg/config_client/rhncfgcli_verify.py
@@ -176,13 +176,12 @@ class Handler(handler_base.HandlerBase):
status = []
stat_err = 0
+ #Stat the destination file
+ try:
+ dst_stat = os.lstat(dst)
+ except:
+ stat_err = 1
if type != 'symlink':
- #Stat the destination file
- try:
- dst_stat = os.lstat(dst)
- except:
- stat_err = 1
-
src_user = info['username']
if not stat_err:
#check for owner differences
commit 4a1a1b0b94d20e95db9a123821920193484c6d8f
Author: Joshua Roys <Joshua.Roys(a)gtri.gatech.edu>
Date: Mon Sep 19 10:35:19 2011 -0400
Fix nvl2/case conversion
diff --git a/backend/server/rhnServer/server_kickstart.py b/backend/server/rhnServer/server_kickstart.py
index d2b2d7a..1739d3d 100644
--- a/backend/server/rhnServer/server_kickstart.py
+++ b/backend/server/rhnServer/server_kickstart.py
@@ -410,7 +410,7 @@ def schedule_rhncfg_install(server_id, action_id, scheduler,
_query_lookup_subscribed_server_channels = rhnSQL.Statement("""
select sc.channel_id,
- case when c.parent_channel is null then 0 else 1 end is_base_channel
+ case when c.parent_channel is not null then 0 else 1 end is_base_channel
from rhnServerChannel sc, rhnChannel c
where sc.server_id = :server_id
and sc.channel_id = c.id
12 years, 7 months
Changes to 'refs/tags/spacewalk-backend-1.6.20-1'
by Michael Mraka
Tag 'spacewalk-backend-1.6.20-1' created by Michael Mraka <michael.mraka(a)redhat.com> at 2011-09-19 07:23 +0000
Tagging package [spacewalk-backend] version [1.6.20-1] in directory [backend/].
Changes since spacewalk-web-1.6.22-1:
Michael Mraka (2):
732325 - nvl2 replace with ANSI case
Automatic commit of package [spacewalk-backend] release [1.6.20-1].
---
backend/server/rhnServer/server_kickstart.py | 3 ++-
backend/spacewalk-backend.spec | 5 ++++-
rel-eng/packages/spacewalk-backend | 2 +-
3 files changed, 7 insertions(+), 3 deletions(-)
---
12 years, 7 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 b26a521f4e7c639b1c9ef32bbfb0f7dea8235110
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Mon Sep 19 09:23:12 2011 +0200
Automatic commit of package [spacewalk-backend] release [1.6.20-1].
diff --git a/backend/spacewalk-backend.spec b/backend/spacewalk-backend.spec
index cc7f397..2b53703 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.19
+Version: 1.6.20
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
+* Mon Sep 19 2011 Michael Mraka <michael.mraka(a)redhat.com> 1.6.20-1
+- 732325 - nvl2 replace with ANSI case
+
* Mon Sep 19 2011 Michael Mraka <michael.mraka(a)redhat.com> 1.6.19-1
- implemented Database.execute()
diff --git a/rel-eng/packages/spacewalk-backend b/rel-eng/packages/spacewalk-backend
index 6898352..3740626 100644
--- a/rel-eng/packages/spacewalk-backend
+++ b/rel-eng/packages/spacewalk-backend
@@ -1 +1 @@
-1.6.19-1 backend/
+1.6.20-1 backend/
12 years, 7 months
backend/server
by Michael Mraka
backend/server/rhnServer/server_kickstart.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
New commits:
commit 0fac2b9fc95564ea170f7cbe338fe372bb9c32be
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Fri Sep 16 13:23:47 2011 +0200
732325 - nvl2 replace with ANSI case
diff --git a/backend/server/rhnServer/server_kickstart.py b/backend/server/rhnServer/server_kickstart.py
index cc05407..d2b2d7a 100644
--- a/backend/server/rhnServer/server_kickstart.py
+++ b/backend/server/rhnServer/server_kickstart.py
@@ -409,7 +409,8 @@ def schedule_rhncfg_install(server_id, action_id, scheduler,
return new_action_id
_query_lookup_subscribed_server_channels = rhnSQL.Statement("""
- select sc.channel_id, NVL2(c.parent_channel, 0, 1) is_base_channel
+ select sc.channel_id,
+ case when c.parent_channel is null then 0 else 1 end is_base_channel
from rhnServerChannel sc, rhnChannel c
where sc.server_id = :server_id
and sc.channel_id = c.id
12 years, 7 months
Changes to 'refs/tags/spacewalk-web-1.6.22-1'
by Michael Mraka
Tag 'spacewalk-web-1.6.22-1' created by Michael Mraka <michael.mraka(a)redhat.com> at 2011-09-19 07:12 +0000
Tagging package [spacewalk-web] version [1.6.22-1] in directory [web/].
Changes since spacewalk-backend-1.6.19-1:
Michael Mraka (2):
723461 - let emails be sent to localhost by default
Automatic commit of package [spacewalk-web] release [1.6.22-1].
---
rel-eng/packages/spacewalk-web | 2 +-
web/conf/rhn_web.conf | 2 +-
web/spacewalk-web.spec | 5 ++++-
3 files changed, 6 insertions(+), 3 deletions(-)
---
12 years, 7 months
rel-eng/packages web/spacewalk-web.spec
by Michael Mraka
rel-eng/packages/spacewalk-web | 2 +-
web/spacewalk-web.spec | 5 ++++-
2 files changed, 5 insertions(+), 2 deletions(-)
New commits:
commit 1d5389ce7a6b6f75df333bd44c96e01e2cc06d4b
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Mon Sep 19 09:12:05 2011 +0200
Automatic commit of package [spacewalk-web] release [1.6.22-1].
diff --git a/rel-eng/packages/spacewalk-web b/rel-eng/packages/spacewalk-web
index 31f021c..4636813 100644
--- a/rel-eng/packages/spacewalk-web
+++ b/rel-eng/packages/spacewalk-web
@@ -1 +1 @@
-1.6.21-1 web/
+1.6.22-1 web/
diff --git a/web/spacewalk-web.spec b/web/spacewalk-web.spec
index b5c0741..684d842 100644
--- a/web/spacewalk-web.spec
+++ b/web/spacewalk-web.spec
@@ -2,7 +2,7 @@ Name: spacewalk-web
Summary: Spacewalk Web site - Perl modules
Group: Applications/Internet
License: GPLv2
-Version: 1.6.21
+Version: 1.6.22
Release: 1%{?dist}
URL: https://fedorahosted.org/spacewalk/
Source0: https://fedorahosted.org/releases/s/p/spacewalk/%{name}-%{version}.tar.gz
@@ -257,6 +257,9 @@ rm -rf $RPM_BUILD_ROOT
# $Id$
%changelog
+* Mon Sep 19 2011 Michael Mraka <michael.mraka(a)redhat.com> 1.6.22-1
+- 723461 - let emails be sent to localhost by default
+
* Fri Sep 16 2011 Jan Pazdziora 1.6.21-1
- CVE-2011-3344, 731647 - HTML-encode the self-referencing link.
12 years, 7 months