backend/common/rhnException.py
| 1
backend/server/handlers/app/packages.py
| 2
backend/server/importlib/headerSource.py
| 2
backend/server/rhnChannel.py
| 39
backend/server/rhnServer/server_packages.py
| 3
backend/spacewalk-backend.spec
| 13
backend/upload_server/handlers/package_push/package_push.py
| 2
backend/upload_server/handlers/package_upload/package_upload.py
| 2
client/rhel/rhn-client-tools/etc-conf/up2date.config
| 2
client/rhel/rhn-client-tools/man/en/spacewalk-channel.8
| 106
client/rhel/rhn-client-tools/rhn-client-tools.spec
| 17
client/rhel/rhn-client-tools/src/bin/Makefile
| 2
client/rhel/rhn-client-tools/src/bin/spacewalk-channel.py
| 97
client/rhel/rhn-client-tools/src/up2date_client/hardware.py
| 31
client/rhel/rhn-client-tools/src/up2date_client/rhnPackageInfo.py
| 7
client/rhel/rhn-client-tools/src/up2date_client/rpcServer.py
| 5
client/rhel/rhnlib/rhnlib.spec
| 7
client/rhel/rhnsd/rhnsd.c
| 121
client/rhel/rhnsd/rhnsd.init
| 2
client/rhel/rhnsd/rhnsd.spec
| 9
client/rhel/yum-rhn-plugin/rhnplugin.py
| 91
client/rhel/yum-rhn-plugin/yum-rhn-plugin.spec
| 17
client/solaris/rhnclient/rhnclient.spec
| 6
client/tools/rhn-virtualization/rhn-virtualization.spec
| 9
client/tools/spacewalk-koan/spacewalk-koan.spec
| 7
java/build.xml
| 2
java/code/src/com/redhat/rhn/common/conf/ConfigDefaults.java
| 20
java/code/src/com/redhat/rhn/common/db/datasource/xml/Channel_queries.xml
| 7
java/code/src/com/redhat/rhn/common/db/datasource/xml/Errata_queries.xml
| 21
java/code/src/com/redhat/rhn/common/hibernate/HibernateFactory.java
| 48
java/code/src/com/redhat/rhn/domain/channel/Channel.java
| 6
java/code/src/com/redhat/rhn/domain/errata/ErrataFactory.java
| 12
java/code/src/com/redhat/rhn/domain/errata/impl/PublishedErrata.hbm.xml
| 7
java/code/src/com/redhat/rhn/domain/kickstart/KickstartData.java
| 8
java/code/src/com/redhat/rhn/domain/server/ServerFactory.java
| 33
java/code/src/com/redhat/rhn/frontend/action/channel/manage/ConfirmErrataAction.java
| 5
java/code/src/com/redhat/rhn/frontend/action/channel/manage/EditChannelAction.java
| 7
java/code/src/com/redhat/rhn/frontend/action/channel/manage/PublishErrataHelper.java
| 2
java/code/src/com/redhat/rhn/frontend/action/schedule/test/PackageListSetupActionTest.java
| 67
java/code/src/com/redhat/rhn/frontend/action/systems/ErrataConfirmSetupAction.java
| 73
java/code/src/com/redhat/rhn/frontend/dto/SecurityErrataOverview.java
| 11
java/code/src/com/redhat/rhn/frontend/events/test/NewUserEventTest.java
| 4
java/code/src/com/redhat/rhn/frontend/servlets/AuthFilter.java
| 28
java/code/src/com/redhat/rhn/frontend/xmlrpc/configchannel/ConfigChannelHandler.java
| 5
java/code/src/com/redhat/rhn/frontend/xmlrpc/system/SystemHandler.java
| 8
java/code/src/com/redhat/rhn/manager/action/ActionManager.java
| 3
java/code/src/com/redhat/rhn/manager/system/SystemManager.java
| 21
java/code/src/com/redhat/rhn/taskomatic/task/repomd/RepositoryWriter.java
| 12
java/code/webapp/WEB-INF/nav/sitenav-authenticated.xml
| 6
java/code/webapp/WEB-INF/pages/admin/multiorg/orgsoftwaresubs.jsp
| 4
java/code/webapp/WEB-INF/pages/admin/multiorg/orgtrust.jsp
| 8
java/code/webapp/WEB-INF/pages/channel/manage/errataremove.jsp
| 2
java/code/webapp/WEB-INF/pages/channel/manage/erratasync.jsp
| 2
java/code/webapp/WEB-INF/pages/common/fragments/configuration/channel/create.jspf
| 20
java/code/webapp/WEB-INF/pages/common/fragments/configuration/sdc/configfile_list.jspf
| 3
java/code/webapp/WEB-INF/pages/common/fragments/errata/relevant-errata-list.jspf
| 31
java/code/webapp/WEB-INF/pages/ssm/packageinstall.jsp
| 2
java/code/webapp/WEB-INF/pages/ssm/packageinstallschedule.jsp
| 4
java/code/webapp/WEB-INF/pages/ssm/packageremoveschedule.jsp
| 4
java/code/webapp/WEB-INF/pages/ssm/packageupgradeschedule.jsp
| 4
java/code/webapp/WEB-INF/pages/ssm/packageverifyschedule.jsp
| 4
java/code/webapp/WEB-INF/pages/ssm/view-log.jsp
| 4
java/code/webapp/WEB-INF/pages/systems/errata.jsp
| 2
java/code/webapp/WEB-INF/pages/systems/errataconfirm.jsp
| 8
java/code/webapp/WEB-INF/pages/systems/sdc/channels.jsp
| 2
java/code/webapp/WEB-INF/struts-config.xml
| 8
java/spacewalk-java.spec
| 49
monitoring/SatConfig/cluster/ApacheServer.pm
| 6
monitoring/SatConfig/cluster/ConfigObject.pm
| 2
monitoring/SatConfig/cluster/HostsAccess.pm
| 2
monitoring/SatConfig/cluster/IpAddr.pm
| 18
monitoring/SatConfig/cluster/LocalConfig.pm
| 10
monitoring/SatConfig/cluster/ModJK2.pm
| 8
monitoring/SatConfig/cluster/NetworkFilesystem.pm
| 2
monitoring/SatConfig/cluster/OffnetRoute.pm
| 10
monitoring/SatConfig/cluster/PhysCluster.pm
| 48
monitoring/SatConfig/cluster/PhysNode.pm
| 8
monitoring/SatConfig/cluster/PrivateIpAddr.pm
| 2
monitoring/SatConfig/cluster/RemoteConfig.pm
| 6
monitoring/SatConfig/cluster/SatConfig-cluster.spec
| 5
monitoring/SatConfig/cluster/TomcatBinding.pm
| 6
monitoring/SatConfig/cluster/TomcatServer.pm
| 50
monitoring/SatConfig/cluster/VIP.pm
| 2
monitoring/spacewalk-proxy-monitoring/spacewalk-proxy-monitoring.spec
| 6
projects/perl-Satcon/perl-Satcon.spec
| 5
proxy/installer/spacewalk-proxy-installer.spec
| 5
proxy/proxy/spacewalk-proxy.spec
| 5
rel-eng/git-untagged-commits.pl
| 4
rel-eng/koji-missing-builds.py
| 2
rel-eng/last-package-tag
| 9
rel-eng/packages/SatConfig-cluster
| 2
rel-eng/packages/jabberd-selinux
| 2
rel-eng/packages/oracle-instantclient-selinux
| 2
rel-eng/packages/oracle-selinux
| 2
rel-eng/packages/oracle-xe-selinux
| 2
rel-eng/packages/perl-Satcon
| 2
rel-eng/packages/rhn-client-tools
| 2
rel-eng/packages/rhn-virtualization
| 2
rel-eng/packages/rhnclient
| 2
rel-eng/packages/rhnlib
| 2
rel-eng/packages/rhnsd
| 2
rel-eng/packages/spacewalk
| 2
rel-eng/packages/spacewalk-backend
| 2
rel-eng/packages/spacewalk-config
| 2
rel-eng/packages/spacewalk-doc-indexes
| 2
rel-eng/packages/spacewalk-java
| 2
rel-eng/packages/spacewalk-koan
| 2
rel-eng/packages/spacewalk-monitoring-selinux
| 2
rel-eng/packages/spacewalk-proxy
| 2
rel-eng/packages/spacewalk-proxy-installer
| 2
rel-eng/packages/spacewalk-proxy-monitoring
| 2
rel-eng/packages/spacewalk-repo
| 2
rel-eng/packages/spacewalk-schema
| 2
rel-eng/packages/spacewalk-search
| 2
rel-eng/packages/spacewalk-setup
| 2
rel-eng/packages/spacewalk-utils
| 2
rel-eng/packages/spacewalk-web
| 2
rel-eng/packages/yum-rhn-plugin
| 2
schema/spacewalk/common/tables/rhn_contact_group_members.sql
| 6
schema/spacewalk/common/tables/rhn_ll_netsaint.sql
| 2
schema/spacewalk/common/tables/rhn_probe_param_value.sql
| 4
schema/spacewalk/oracle/procs/lookup_checksum.sql
| 5
schema/spacewalk/postgres/procs/rhn_prepare_install.sql
| 2
schema/spacewalk/spacewalk-schema.spec
| 13
schema/spacewalk/upgrade/spacewalk-schema-0.6-to-spacewalk-schema-0.7/001-numeric-12-columns.sql
| 8
schema/spacewalk/upgrade/spacewalk-schema-0.6-to-spacewalk-schema-0.7/002-rhn_db_environment-rhn_environment-drop.sql
| 5
schema/spacewalk/upgrade/spacewalk-schema-0.6-to-spacewalk-schema-0.7/008-lookup_checksum.sql
| 49
schema/spacewalk/upgrade/spacewalk-schema-0.6-to-spacewalk-schema-0.7/160-rhn_cache.pkb
| 102
schema/spacewalk/upgrade/spacewalk-schema-0.6-to-spacewalk-schema-0.7/160-rhn_cache.pkb.sql
| 103
schema/spacewalk/upgrade/spacewalk-schema-0.6-to-spacewalk-schema-0.7/161-rhn_server.pkb.sql
| 735 +++++
schema/spacewalk/upgrade/spacewalk-schema-0.6-to-spacewalk-schema-0.7/162-rhn_channel.pkb.sql
| 1229 ++++++++++
scripts/channel-to-update-level/create-channel-update
| 2
search-server/spacewalk-doc-indexes/spacewalk-doc-indexes.spec
| 6
search-server/spacewalk-search.spec
| 16
selinux/jabberd-selinux/jabberd-selinux.spec
| 16
selinux/oracle-instantclient-selinux/oracle-instantclient-selinux.spec
| 6
selinux/oracle-selinux/oracle-selinux.spec
| 8
selinux/oracle-selinux/oracle.te
| 5
selinux/oracle-xe-selinux/oracle-xe-selinux-enable
| 2
selinux/oracle-xe-selinux/oracle-xe-selinux.spec
| 10
selinux/oracle-xe-selinux/oracle-xe.te
| 2
selinux/spacewalk-monitoring-selinux/spacewalk-monitoring-selinux.spec
| 6
selinux/spacewalk-monitoring-selinux/spacewalk-monitoring.te
| 1
spacewalk/config/spacewalk-config.spec
| 5
spacewalk/package/spacewalk.spec
| 17
spacewalk/setup/spacewalk-setup.spec
| 5
spec-tree/spacewalk-repo/spacewalk-repo.spec
| 31
utils/spacewalk-utils.spec
| 6
web/conf/rhn_web.conf
| 2
web/modules/rhn/RHN/DB/ErrataEditor.pm
| 11
web/spacewalk-web.spec
| 13
151 files changed, 3342 insertions(+), 545 deletions(-)
New commits:
commit e7a1d61929d563ce50392760a925387aa511e5c3
Merge: 7279c22... 49e5770...
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Thu Dec 3 11:04:19 2009 +0100
Merge branch 'master' into sha256-support3
commit 49e57701b690367f272fc86e973bb6a33fc1f881
Author: Justin Sherrill <jsherril(a)redhat.com>
Date: Wed Dec 2 13:30:12 2009 -0500
updating configchannel.createOrUpdatePath to include documentation about Selinux, and
make it optional
diff --git
a/java/code/src/com/redhat/rhn/frontend/xmlrpc/configchannel/ConfigChannelHandler.java
b/java/code/src/com/redhat/rhn/frontend/xmlrpc/configchannel/ConfigChannelHandler.java
index 2ac091e..1d0357b 100644
---
a/java/code/src/com/redhat/rhn/frontend/xmlrpc/configchannel/ConfigChannelHandler.java
+++
b/java/code/src/com/redhat/rhn/frontend/xmlrpc/configchannel/ConfigChannelHandler.java
@@ -241,6 +241,7 @@ public class ConfigChannelHandler extends BaseHandler {
* #prop_desc("string", "group", "Group name of the
file/directory.")
* #prop_desc("string", "permissions",
* "Octal file/directory permissions (eg:
644)")
+ * #prop_desc("string", "selinux_ctx", "SELinux
Security context (optional)")
* #prop_desc("string", "macro-start-delimiter",
* "Config file macro start delimiter. Use null or empty
* string to accept the default. (ignored if working with a
@@ -270,6 +271,10 @@ public class ConfigChannelHandler extends BaseHandler {
validKeys.add("macro-end-delimiter");
validateMap(validKeys, data);
+ if (data.get("selinux_ctx") == null) {
+ data.put("selinux_ctx", "");
+ }
+
User user = getLoggedInUser(sessionKey);
XmlRpcConfigChannelHelper helper = XmlRpcConfigChannelHelper.getInstance();
ConfigChannel channel = helper.lookupGlobal(user, channelLabel);
commit e4b154990b1f28fd33abc2789c32da12875c1e6a
Author: Justin Sherrill <jsherril(a)redhat.com>
Date: Wed Dec 2 13:28:19 2009 -0500
529483 - adding referer check for HTTP requests to java stack
diff --git a/java/code/src/com/redhat/rhn/common/conf/ConfigDefaults.java
b/java/code/src/com/redhat/rhn/common/conf/ConfigDefaults.java
index 976b902..ff0d156 100644
--- a/java/code/src/com/redhat/rhn/common/conf/ConfigDefaults.java
+++ b/java/code/src/com/redhat/rhn/common/conf/ConfigDefaults.java
@@ -17,6 +17,8 @@ package com.redhat.rhn.common.conf;
import org.apache.commons.lang.StringUtils;
import java.io.File;
+import java.util.ArrayList;
+import java.util.List;
/**
* ConfigDefaults is the place to store application specific Config settings
@@ -147,6 +149,8 @@ public class ConfigDefaults {
public static final String SPACEWALK_REPOSYNC_PATH =
"spacewalk_reposync_path";
public static final String SPACEWALK_REPOSYNC_LOG_PATH =
"spacewalk_reposync_logpath";
+ public static final String NON_REFERER_URLS = "non_referer_urls";
+
private ConfigDefaults() {
}
@@ -394,6 +398,22 @@ public class ConfigDefaults {
}
/**
+ * Get the list of Url paths that we don't do the referer check on
+ * @return The list of strings
+ */
+ public List<String> getNonRefererUrls() {
+ List<String> toRet = Config.get().getList(NON_REFERER_URLS);
+ if (toRet == null) {
+ toRet = new ArrayList<String>();
+ }
+ toRet.add("/Login.do");
+ toRet.add("/ReLogin.do");
+ toRet.add("/index.jsp");
+ toRet.add("/YourRhn.do");
+ return toRet;
+ }
+
+ /**
* Return true if this is a Spacewalk instance. (as opposed to Satellite)
* @return true is this is a Spacewalk instance.
*/
diff --git a/java/code/src/com/redhat/rhn/frontend/servlets/AuthFilter.java
b/java/code/src/com/redhat/rhn/frontend/servlets/AuthFilter.java
index 6d22ced..b03ceff 100644
--- a/java/code/src/com/redhat/rhn/frontend/servlets/AuthFilter.java
+++ b/java/code/src/com/redhat/rhn/frontend/servlets/AuthFilter.java
@@ -15,17 +15,22 @@
package com.redhat.rhn.frontend.servlets;
+import com.redhat.rhn.common.conf.ConfigDefaults;
import com.redhat.rhn.frontend.security.AuthenticationService;
import com.redhat.rhn.frontend.security.AuthenticationServiceFactory;
import org.apache.log4j.Logger;
import java.io.IOException;
+import java.net.URL;
import java.util.Date;
+import java.util.Enumeration;
+import java.util.List;
import javax.servlet.Filter;
import javax.servlet.FilterChain;
import javax.servlet.FilterConfig;
+import javax.servlet.RequestDispatcher;
import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
@@ -61,6 +66,8 @@ public class AuthFilter implements Filter {
public void doFilter(ServletRequest request, ServletResponse response,
FilterChain chain) throws IOException, ServletException {
+
+
if (log.isDebugEnabled()) {
log.debug("ENTER AuthFilter.doFilter: " + request.getRemoteAddr() +
" [" + new Date() + "] (" +
@@ -69,6 +76,27 @@ public class AuthFilter implements Filter {
if (authenticationService.validate((HttpServletRequest)request,
(HttpServletResponse)response)) {
+
+ //Check the referrer and redirect to YourRhn.do if it doesn't match
+ HttpServletRequest hreq = new
+ RhnHttpServletRequest((HttpServletRequest)request);
+ Enumeration em = hreq.getHeaders("referer");
+ if (em.hasMoreElements()) {
+ String urlString = (String) em.nextElement();
+ URL url = new URL(urlString);
+ List goodUrls = ConfigDefaults.get().getNonRefererUrls();
+ if (!goodUrls.contains(hreq.getServletPath()) &&
+ !request.getLocalName().equals(url.getHost())) {
+ log.fatal("Referrer (" + url.getHost() + ") for url
" +
+ hreq.getServletPath() +
+ " does not match. Redirecting to
/rhn/YourRhn.do.");
+ RequestDispatcher dispatcher = request.getRequestDispatcher(
+ "/YourRhn.do");
+ dispatcher.forward(request, response);
+ return;
+ }
+ }
+
chain.doFilter(request, response);
}
commit fcaa4e5e75301f1faa2cf98fdbde1397924370bb
Author: Flavio Leitner <fleitner(a)redhat.com>
Date: Wed Dec 2 17:55:18 2009 +0100
543577 - report permanent hw addr for all slaves in network bonding
Depending on bonding mode, slave devices can have their hwaddr changed,
so it's necessary to read it from /proc/net/bonding/<master> instead of
usual ethtool interface.
diff --git a/client/rhel/rhn-client-tools/src/up2date_client/hardware.py
b/client/rhel/rhn-client-tools/src/up2date_client/hardware.py
index b8aee9b..c898775 100644
--- a/client/rhel/rhn-client-tools/src/up2date_client/hardware.py
+++ b/client/rhel/rhn-client-tools/src/up2date_client/hardware.py
@@ -687,6 +687,27 @@ def findHostByRoute():
hostname = "unknown"
s.close()
return hostname, intf
+
+def get_slave_hwaddr(master, slave):
+ hwaddr = ""
+ try:
+ bonding = open('/proc/net/bonding/%s' % master, "r")
+ except:
+ return hwaddr
+
+ slave_found = False
+ for line in bonding.readlines():
+ if slave_found and string.find(line, "Permanent HW addr: ") != -1:
+ hwaddr = string.split(line)[3]
+ break
+
+ if string.find(line, "Slave Interface: ") != -1:
+ ifname = string.split(line)[2]
+ if ifname == slave:
+ slave_found = True
+
+ bonding.close()
+ return hwaddr
def read_network():
netdict = {}
@@ -721,6 +742,16 @@ def read_network_interfaces():
except:
hwaddr = ""
+ # slave devices can have their hwaddr changed
+ try:
+ master = os.readlink('/sys/class/net/%s/master' % interface)
+ except:
+ master = None
+
+ if master:
+ master_interface = os.path.basename(master)
+ hwaddr = get_slave_hwaddr(master_interface, interface)
+
try:
module = ethtool.get_module(interface)
except:
commit 9b771b57c78367b56bde446888a0b94ed0df1ba3
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Wed Dec 2 16:55:34 2009 +0100
543543 - require latest hal, to get full / correct DMI Info.
diff --git a/client/rhel/rhn-client-tools/rhn-client-tools.spec
b/client/rhel/rhn-client-tools/rhn-client-tools.spec
index a60656e..b39ab44 100644
--- a/client/rhel/rhn-client-tools/rhn-client-tools.spec
+++ b/client/rhel/rhn-client-tools/rhn-client-tools.spec
@@ -20,7 +20,7 @@ Requires: python-ethtool
Requires: gnupg
Requires: sh-utils
Requires: dbus-python
-Requires: hal
+Requires: hal >= 0.5.8.1-52
Requires: newt
Conflicts: up2date < 5.0.0
commit 69fccb5bcffcb341fc347b07ae101f93aaa76e9a
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Wed Dec 2 15:09:38 2009 +0100
Automatic commit of package [spacewalk-java] release [0.7.24-1].
diff --git a/java/spacewalk-java.spec b/java/spacewalk-java.spec
index 0092b18..ac719d1 100644
--- a/java/spacewalk-java.spec
+++ b/java/spacewalk-java.spec
@@ -12,7 +12,7 @@ Name: spacewalk-java
Summary: Spacewalk Java site packages
Group: Applications/Internet
License: GPLv2
-Version: 0.7.23
+Version: 0.7.24
Release: 1%{?dist}
URL:
https://fedorahosted.org/spacewalk
Source0:
https://fedorahosted.org/releases/s/p/spacewalk/%{name}-%{version}.tar.gz
@@ -280,6 +280,16 @@ fi
%{jardir}/postgresql-jdbc.jar
%changelog
+* Wed Dec 02 2009 Tomas Lestach <tlestach(a)redhat.com> 0.7.24-1
+- 537094 - yum list-sec CVE's on cloned channels doesn't work
+ (tlestach(a)redhat.com)
+- fixing checksum empty string in the repo metadata (tlestach(a)redhat.com)
+- checking return value of channel.getChecksum() (tlestach(a)redhat.com)
+- 543347 - Security errata with enhancement advisory icons
+ (tlestach(a)redhat.com)
+- fixing ISE when cloning channel (tlestach(a)redhat.com)
+- fixing ISE when adding Red Hat Errata to custom channel (tlestach(a)redhat.com)
+
* Tue Dec 1 2009 Miroslav Suchý <msuchy(a)redhat.com> 0.7.23-1
- 542830 - fixing three api calls that were using very inefficient queries to use the
same queries that were used in sat 5.2 (jsherril(a)redhat.com)
- converting old hibernate max in clause limit fix to use new fix (jsherril(a)redhat.com)
diff --git a/rel-eng/packages/spacewalk-java b/rel-eng/packages/spacewalk-java
index acd91aa..66cdb71 100644
--- a/rel-eng/packages/spacewalk-java
+++ b/rel-eng/packages/spacewalk-java
@@ -1 +1 @@
-0.7.23-1 java/
+0.7.24-1 java/
commit 92ca81d4eb4d0b1f8f37a65c021adb1def94ab68
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Wed Dec 2 15:08:57 2009 +0100
Automatic commit of package [spacewalk-web] release [0.7.8-1].
diff --git a/rel-eng/packages/spacewalk-web b/rel-eng/packages/spacewalk-web
index 8d36807..cef8719 100644
--- a/rel-eng/packages/spacewalk-web
+++ b/rel-eng/packages/spacewalk-web
@@ -1 +1 @@
-0.7.7-1 web/
+0.7.8-1 web/
diff --git a/web/spacewalk-web.spec b/web/spacewalk-web.spec
index 465a503..6ee6ac4 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: 0.7.7
+Version: 0.7.8
Release: 1%{?dist}
URL:
https://fedorahosted.org/spacewalk
Source0:
https://fedorahosted.org/releases/s/p/spacewalk/%{name}-%{version}.tar.gz
@@ -317,6 +317,10 @@ rm -rf $RPM_BUILD_ROOT
# $Id$
%changelog
+* Wed Dec 02 2009 Tomas Lestach <tlestach(a)redhat.com> 0.7.8-1
+- 537094 - yum list-sec CVE's on cloned channels doesn't work
+ (tlestach(a)redhat.com)
+
* Mon Nov 30 2009 Miroslav Suchý <msuchy(a)redhat.com> 0.7.7-1
- add variable web.chat_enabled to config file
commit 6e11c28ffdb97af10ff255cbd3c15ffda285d2bd
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Wed Dec 2 15:02:14 2009 +0100
checksyle issue
diff --git
a/java/code/src/com/redhat/rhn/frontend/action/channel/manage/ConfirmErrataAction.java
b/java/code/src/com/redhat/rhn/frontend/action/channel/manage/ConfirmErrataAction.java
index 9ec56a4..818c07a 100644
---
a/java/code/src/com/redhat/rhn/frontend/action/channel/manage/ConfirmErrataAction.java
+++
b/java/code/src/com/redhat/rhn/frontend/action/channel/manage/ConfirmErrataAction.java
@@ -94,9 +94,9 @@ public class ConfirmErrataAction extends RhnListAction {
Long sourceCid = null;
Channel srcChan = null;
- String sel_channel = request.getParameter(SELECTED_CHANNEL);
- if ((sel_channel != null) && (sel_channel != "")) {
- sourceCid = Long.parseLong(sel_channel);
+ String selChannel = request.getParameter(SELECTED_CHANNEL);
+ if ((selChannel != null) && (selChannel != "")) {
+ sourceCid = Long.parseLong(selChannel);
srcChan = ChannelFactory.lookupByIdAndUser(sourceCid, user);
}
commit caff25c7259f6244e04c85e45bff5f5d148e1244
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Wed Dec 2 12:01:34 2009 +0100
537094 - yum list-sec CVE's on cloned channels doesn't work
contains perl and java changes
diff --git a/java/code/src/com/redhat/rhn/domain/errata/impl/PublishedErrata.hbm.xml
b/java/code/src/com/redhat/rhn/domain/errata/impl/PublishedErrata.hbm.xml
index ddf7c66..b305f66 100644
--- a/java/code/src/com/redhat/rhn/domain/errata/impl/PublishedErrata.hbm.xml
+++ b/java/code/src/com/redhat/rhn/domain/errata/impl/PublishedErrata.hbm.xml
@@ -46,7 +46,7 @@ PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
<one-to-many
class="com.redhat.rhn.domain.errata.impl.PublishedBug"/>
</set>
- <set name="cves" lazy="true" inverse="true"
cascade="all-delete-orphan" table="rhnErrataCve">
+ <set name="cves" lazy="true"
cascade="all-delete-orphan" table="rhnErrataCve">
<key column="errata_id"/>
<many-to-many column="cve_id"
class="com.redhat.rhn.domain.errata.Cve" />
</set>
diff --git
a/java/code/src/com/redhat/rhn/frontend/action/channel/manage/PublishErrataHelper.java
b/java/code/src/com/redhat/rhn/frontend/action/channel/manage/PublishErrataHelper.java
index 94af7e3..f18f942 100644
---
a/java/code/src/com/redhat/rhn/frontend/action/channel/manage/PublishErrataHelper.java
+++
b/java/code/src/com/redhat/rhn/frontend/action/channel/manage/PublishErrataHelper.java
@@ -85,8 +85,8 @@ public class PublishErrataHelper {
clone.setLocallyModified(original.getLocallyModified());
clone.setLastModified(original.getLastModified());
clone.setOrg(org);
+ clone.getCves().addAll(original.getCves());
-
clone.setPackages(new HashSet(original.getPackages()));
diff --git a/web/modules/rhn/RHN/DB/ErrataEditor.pm
b/web/modules/rhn/RHN/DB/ErrataEditor.pm
index 35f852e..f2ba79a 100644
--- a/web/modules/rhn/RHN/DB/ErrataEditor.pm
+++ b/web/modules/rhn/RHN/DB/ErrataEditor.pm
@@ -166,6 +166,17 @@ EOQ
$sth = $dbh->prepare($query);
$sth->execute_h(temp_eid => $temp_eid);
+ $query =<<EOQ;
+INSERT INTO rhnErrataCve
+ (errata_id, cve_id)
+ (SELECT ECL.id, EC.cve_id
+ FROM rhnErrataCVE EC, rhnErrataCloned ECL
+ WHERE ECL.original_id = EC.errata_id
+ AND ECL.id = :new_eid)
+EOQ
+ $sth = $dbh->prepare($query);
+ $sth->execute_h(new_eid => $new_eid);
+
my $errata = RHN::ErrataTmp->lookup_managed_errata(-id => $new_eid);
$errata->refresh_erratafiles();
commit af1cc6479fd162467a2c9b28858cd2123689b782
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Wed Dec 2 14:58:56 2009 +0100
fixing checksum empty string in the repo metadata
client wasn't able to get repo metada with "Error performing checksum"
+ removing one variable
diff --git a/java/code/src/com/redhat/rhn/taskomatic/task/repomd/RepositoryWriter.java
b/java/code/src/com/redhat/rhn/taskomatic/task/repomd/RepositoryWriter.java
index 5bba05d..22c4f82 100644
--- a/java/code/src/com/redhat/rhn/taskomatic/task/repomd/RepositoryWriter.java
+++ b/java/code/src/com/redhat/rhn/taskomatic/task/repomd/RepositoryWriter.java
@@ -56,7 +56,6 @@ public class RepositoryWriter {
private String pathPrefix;
private String mountPoint;
private String checksumtype;
- private String checksumname = null;
/**
* Constructor takes in pathprefix and mountpoint
@@ -106,9 +105,6 @@ public class RepositoryWriter {
// Get compatible checksumType
this.checksumtype = channel.getChecksumType();
- if (channel.getChecksum() != null) {
- this.checksumname = channel.getChecksum().getDescription();
- }
log.info("Checksum Type Value" + this.checksumtype);
@@ -190,15 +186,15 @@ public class RepositoryWriter {
RepomdIndexData groupsData = loadCompsFile(channel);
//Set the type so yum can read and perform checksum
- primaryData.setType(this.checksumname);
- filelistsData.setType(this.checksumname);
- otherData.setType(this.checksumname);
+ primaryData.setType(this.checksumtype);
+ filelistsData.setType(this.checksumtype);
+ otherData.setType(this.checksumtype);
if (updateinfoData != null) {
- updateinfoData.setType(this.checksumname);
+ updateinfoData.setType(this.checksumtype);
}
if (groupsData != null) {
- groupsData.setType(this.checksumname);
+ groupsData.setType(this.checksumtype);
}
log.info("Primary xml's type" + primaryData.getType());
commit 7c8a5a673b6388c11848a54b7790148a318f288f
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Wed Dec 2 12:19:13 2009 +0100
checking return value of channel.getChecksum()
null as return value caused a NullPointerException in
com.redhat.rhn.taskomatic.task.ChannelRepodata (for cloned channels)
related to c51d755737a75b8e624f9983054f004008fe753e
diff --git a/java/code/src/com/redhat/rhn/domain/channel/Channel.java
b/java/code/src/com/redhat/rhn/domain/channel/Channel.java
index a636567..27267cc 100644
--- a/java/code/src/com/redhat/rhn/domain/channel/Channel.java
+++ b/java/code/src/com/redhat/rhn/domain/channel/Channel.java
@@ -898,9 +898,9 @@ public class Channel extends BaseDomainHelper implements Comparable {
// IF its custom use the one set at channel creation time
if (toConsider.isCustom()) {
- String checksumOut = toConsider.getChecksum().getLabel();
- if (checksumOut != null) {
- return checksumOut;
+ ChecksumType checksumOut = toConsider.getChecksum();
+ if ((checksumOut != null) && (checksumOut.getLabel() != null)) {
+ return checksumOut.getLabel();
}
else {
// default to sha1 if its not available in the db
commit 3ad8386ec640a41a3a2512b90c96c26ed9471008
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Wed Dec 2 10:52:14 2009 +0100
543347 - Security errata with enhancement advisory icons
displaying correct icons for Security Advisories
diff --git a/java/code/webapp/WEB-INF/pages/channel/manage/errataremove.jsp
b/java/code/webapp/WEB-INF/pages/channel/manage/errataremove.jsp
index 8a10eae..e7e801a 100644
--- a/java/code/webapp/WEB-INF/pages/channel/manage/errataremove.jsp
+++ b/java/code/webapp/WEB-INF/pages/channel/manage/errataremove.jsp
@@ -45,7 +45,7 @@
<img src="/img/wrh-product.gif" alt="Product Enhancement
Advisory" title="Product Enhancement Advisory" />
</c:if>
<c:if test="${current.advisoryType == 'Security
Advisory'}">
- <img src="/img/wrh-product.gif" alt="Product Enhancement
Advisory" title="Product Enhancement Advisory" />
+ <img src="/img/wrh-security.gif" alt="Security Advisory"
title="Security Advisory" />
</c:if>
<c:if test="${current.advisoryType == 'Bug Fix
Advisory'}">
<img src="/img/wrh-bug.gif" alt="Bug Fix Advisory"
title="Bug Fix Advisory" />
diff --git a/java/code/webapp/WEB-INF/pages/channel/manage/erratasync.jsp
b/java/code/webapp/WEB-INF/pages/channel/manage/erratasync.jsp
index e0ff796..3f87ca3 100644
--- a/java/code/webapp/WEB-INF/pages/channel/manage/erratasync.jsp
+++ b/java/code/webapp/WEB-INF/pages/channel/manage/erratasync.jsp
@@ -45,7 +45,7 @@
<img src="/img/wrh-product.gif" alt="Product Enhancement
Advisory" title="Product Enhancement Advisory" />
</c:if>
<c:if test="${current.advisoryType == 'Security
Advisory'}">
- <img src="/img/wrh-product.gif" alt="Product Enhancement
Advisory" title="Product Enhancement Advisory" />
+ <img src="/img/wrh-security.gif" alt="Security Advisory"
title="Security Advisory" />
</c:if>
<c:if test="${current.advisoryType == 'Bug Fix
Advisory'}">
<img src="/img/wrh-bug.gif" alt="Bug Fix Advisory"
title="Bug Fix Advisory" />
commit ef410a38c5a1b5196a4a41f5f943558f8fe1a2c5
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Wed Dec 2 10:30:03 2009 +0100
fixing ISE when cloning channel
ISE on page rhn/channels/manage/Edit.do?cid=<cid>
diff --git
a/java/code/src/com/redhat/rhn/frontend/action/channel/manage/EditChannelAction.java
b/java/code/src/com/redhat/rhn/frontend/action/channel/manage/EditChannelAction.java
index 77e96e3..c0aaf2b 100644
--- a/java/code/src/com/redhat/rhn/frontend/action/channel/manage/EditChannelAction.java
+++ b/java/code/src/com/redhat/rhn/frontend/action/channel/manage/EditChannelAction.java
@@ -568,7 +568,12 @@ public class EditChannelAction extends RhnAction implements Listable
{
form.set("maintainer_phone", c.getMaintainerPhone());
form.set("maintainer_email", c.getMaintainerEmail());
form.set("support_policy", c.getSupportPolicy());
- form.set("checksum", c.getChecksum().getLabel());
+ if (c.getChecksum() == null) {
+ form.set("checksum", null);
+ }
+ else {
+ form.set("checksum", c.getChecksum().getLabel());
+ }
if (c.isGloballySubscribable(ctx.getLoggedInUser().getOrg())) {
form.set("per_user_subscriptions", "all");
}
commit a6903f8d6192e1d68a25fcd051e42ce4fb8b7c85
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Wed Dec 2 10:19:35 2009 +0100
fixing ISE when adding Red Hat Errata to custom channel
ISE on page
rhn/channels/manage/errata/ConfirmErrataAdd.do?assoc_checked=on&cid=<cid>
diff --git
a/java/code/src/com/redhat/rhn/frontend/action/channel/manage/ConfirmErrataAction.java
b/java/code/src/com/redhat/rhn/frontend/action/channel/manage/ConfirmErrataAction.java
index fe17f6e..9ec56a4 100644
---
a/java/code/src/com/redhat/rhn/frontend/action/channel/manage/ConfirmErrataAction.java
+++
b/java/code/src/com/redhat/rhn/frontend/action/channel/manage/ConfirmErrataAction.java
@@ -94,8 +94,9 @@ public class ConfirmErrataAction extends RhnListAction {
Long sourceCid = null;
Channel srcChan = null;
- if (request.getParameter(SELECTED_CHANNEL) != "") {
- sourceCid = Long.parseLong(request.getParameter(SELECTED_CHANNEL));
+ String sel_channel = request.getParameter(SELECTED_CHANNEL);
+ if ((sel_channel != null) && (sel_channel != "")) {
+ sourceCid = Long.parseLong(sel_channel);
srcChan = ChannelFactory.lookupByIdAndUser(sourceCid, user);
}
commit 585f7b202ce0cb633ae05ba575d0373bb2ca57ee
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Wed Dec 2 11:13:23 2009 +0100
Automatic commit of package [spacewalk-search] release [0.7.3-1].
diff --git a/rel-eng/packages/spacewalk-search b/rel-eng/packages/spacewalk-search
index 17ff4d1..6149ae1 100644
--- a/rel-eng/packages/spacewalk-search
+++ b/rel-eng/packages/spacewalk-search
@@ -1 +1 @@
-0.7.2-1 search-server/
+0.7.3-1 search-server/
diff --git a/search-server/spacewalk-search.spec b/search-server/spacewalk-search.spec
index 0cae0ad..832197f 100644
--- a/search-server/spacewalk-search.spec
+++ b/search-server/spacewalk-search.spec
@@ -4,7 +4,7 @@ Name: spacewalk-search
Summary: Spacewalk Full Text Search Server
Group: Applications/Internet
License: GPLv2
-Version: 0.7.2
+Version: 0.7.3
Release: 1%{?dist}
# This src.rpm is cannonical upstream
# You can obtain it using this set of commands
@@ -112,7 +112,7 @@ fi
%{_sysconfdir}/logrotate.d/rhn-search
%changelog
-* Tue Dec 1 2009 Miroslav Suchý <msuchy(a)redhat.com> 0.7.2-1
+* Wed Dec 2 2009 Miroslav Suchý <msuchy(a)redhat.com> 0.7.3-1
- 480342 - move init script from /etc/init.d to /etc/rc.d/init.d
* Wed Nov 25 2009 Miroslav Suchý <msuchy(a)redhat.com> 0.7.1-1
commit 8c2af5b790b79fd70d510dda6b4e84b9643c2971
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Wed Dec 2 11:12:26 2009 +0100
add missing %
diff --git a/search-server/spacewalk-search.spec b/search-server/spacewalk-search.spec
index f2504d7..0cae0ad 100644
--- a/search-server/spacewalk-search.spec
+++ b/search-server/spacewalk-search.spec
@@ -67,7 +67,7 @@ install -d -m 755 $RPM_BUILD_ROOT%{_prefix}/share/rhn/search
install -d -m 755 $RPM_BUILD_ROOT%{_prefix}/share/rhn/search/indexes
install -d -m 755 $RPM_BUILD_ROOT%{_prefix}/share/rhn/search/lib
install -d -m 755
$RPM_BUILD_ROOT%{_prefix}/share/rhn/search/classes/com/redhat/satellite/search/db
-install -d -m 755 $RPM_BUILD_ROOT{_initrddir}
+install -d -m 755 $RPM_BUILD_ROOT%{_initrddir}
install -d -m 755 $RPM_BUILD_ROOT%{_bindir}
install -d -m 755 $RPM_BUILD_ROOT%{_var}/log/rhn/search
install -d -m 755 $RPM_BUILD_ROOT%{_prefix}/share/rhn/search/nutch
@@ -78,7 +78,7 @@ cp -d lib/* $RPM_BUILD_ROOT/%{_prefix}/share/rhn/search/lib
install -p -m 644 src/config/log4j.properties
$RPM_BUILD_ROOT/%{_prefix}/share/rhn/search/classes/log4j.properties
install -p -m 644 src/config/etc/logrotate.d/rhn-search
$RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/rhn-search
install -p -m 644 src/config/com/redhat/satellite/search/db/*
$RPM_BUILD_ROOT%{_prefix}/share/rhn/search/classes/com/redhat/satellite/search/db
-install -p -m 755 src/config/rhn-search $RPM_BUILD_ROOT{_initrddir}
+install -p -m 755 src/config/rhn-search $RPM_BUILD_ROOT%{_initrddir}
ln -s -f /usr/sbin/tanukiwrapper $RPM_BUILD_ROOT%{_bindir}/rhnsearchd
install -p -m 644 src/config/search/rhn_search.conf
$RPM_BUILD_ROOT%{_sysconfdir}/rhn/search/rhn_search.conf
install -p -m 644 src/config/search/rhn_search_daemon.conf
$RPM_BUILD_ROOT%{_sysconfdir}/rhn/search/rhn_search_daemon.conf
@@ -104,7 +104,7 @@ fi
%{_prefix}/share/rhn/search/classes/log4j.properties
%{_prefix}/share/rhn/search/classes/com/*
%attr(755, root, root) %{_prefix}/share/rhn/search/indexes
-%attr(755, root, root) {_initrddir}/rhn-search
+%attr(755, root, root) %{_initrddir}/rhn-search
%attr(755, root, root) %{_bindir}/rhnsearchd
%dir %{_sysconfdir}/rhn/search/
%config(noreplace) %{_sysconfdir}/rhn/search/rhn_search.conf
commit 2469d50935c0109db955b9c20398a83e47d07265
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Tue Dec 1 17:03:47 2009 +0100
Automatic commit of package [spacewalk-java] release [0.7.23-1].
diff --git a/java/spacewalk-java.spec b/java/spacewalk-java.spec
index 95e31c7..0092b18 100644
--- a/java/spacewalk-java.spec
+++ b/java/spacewalk-java.spec
@@ -12,7 +12,7 @@ Name: spacewalk-java
Summary: Spacewalk Java site packages
Group: Applications/Internet
License: GPLv2
-Version: 0.7.22
+Version: 0.7.23
Release: 1%{?dist}
URL:
https://fedorahosted.org/spacewalk
Source0:
https://fedorahosted.org/releases/s/p/spacewalk/%{name}-%{version}.tar.gz
@@ -280,11 +280,12 @@ fi
%{jardir}/postgresql-jdbc.jar
%changelog
-* Tue Dec 1 2009 Miroslav Suchý <msuchy(a)redhat.com> 0.7.22-1
+* Tue Dec 1 2009 Miroslav Suchý <msuchy(a)redhat.com> 0.7.23-1
- 542830 - fixing three api calls that were using very inefficient queries to use the
same queries that were used in sat 5.2 (jsherril(a)redhat.com)
- converting old hibernate max in clause limit fix to use new fix (jsherril(a)redhat.com)
- 538559 - fixing issue where about 300 errata could not be applied to a system due to
inefficient hibernate usage (jsherril(a)redhat.com)
- fixing list borders on errata apply confirm page (jsherril(a)redhat.com)
+- Fix creating new config-managed symlinks (joshua.roys(a)gtri.gatech.edu)
* Mon Nov 30 2009 Tomas Lestach <tlestach(a)redhat.com> 0.7.21-1
- checking return value of channel.getChecksum() (tlestach(a)redhat.com)
diff --git a/rel-eng/packages/spacewalk-java b/rel-eng/packages/spacewalk-java
index fa1e4ca..acd91aa 100644
--- a/rel-eng/packages/spacewalk-java
+++ b/rel-eng/packages/spacewalk-java
@@ -1 +1 @@
-0.7.22-1 java/
+0.7.23-1 java/
commit 7936cacc743946a1d18f1926f938e69f9ce4fe3f
Author: Joshua Roys <joshua.roys(a)gtri.gatech.edu>
Date: Tue Dec 1 10:34:52 2009 -0500
Fix creating new config-managed symlinks
diff --git
a/java/code/webapp/WEB-INF/pages/common/fragments/configuration/channel/create.jspf
b/java/code/webapp/WEB-INF/pages/common/fragments/configuration/channel/create.jspf
index f8cf93a..912e105 100644
--- a/java/code/webapp/WEB-INF/pages/common/fragments/configuration/channel/create.jspf
+++ b/java/code/webapp/WEB-INF/pages/common/fragments/configuration/channel/create.jspf
@@ -15,21 +15,21 @@
key="addfiles.jsp.type.symlink" /><br />
<script type="text/javascript">
function enableAllInputs(event) {
- $('cffUid').disabled = "";
- $('cffGid').disabled = "";
- $('cffPermissions').disabled = "";
- $('cffMacroStart').disabled = "";
- $('cffMacroEnd').disabled = "";
+ $('cffUid').readOnly = "";
+ $('cffGid').readOnly = "";
+ $('cffPermissions').readOnly = "";
+ $('cffMacroStart').readOnly = "";
+ $('cffMacroEnd').readOnly = "";
}
Event.observe('file_radio', 'focus', enableAllInputs);
Event.observe('dir_radio', 'focus', enableAllInputs);
Event.observe('symlink_radio', 'focus', function(event) {
- $('cffUid').disabled = "disabled";
- $('cffGid').disabled = "disabled";
- $('cffPermissions').disabled = "disabled";
- $('cffMacroStart').disabled = "disabled";
- $('cffMacroEnd').disabled = "disabled";
+ $('cffUid').readOnly = "readonly";
+ $('cffGid').readOnly = "readonly";
+ $('cffPermissions').readOnly = "readonly";
+ $('cffMacroStart').readOnly = "readonly";
+ $('cffMacroEnd').readOnly = "readonly";
});
</script>
<span class="small-text"><bean:message
key="filedetails.jsp.tip.symlink" /></span>
commit 81c89b0bda4604b47f9eaab5b7490f0227f44946
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Tue Dec 1 14:20:07 2009 +0100
Automatic commit of package [oracle-selinux] minor release [0.1-23.13].
diff --git a/rel-eng/packages/oracle-selinux b/rel-eng/packages/oracle-selinux
index 8799b81..dc73329 100644
--- a/rel-eng/packages/oracle-selinux
+++ b/rel-eng/packages/oracle-selinux
@@ -1 +1 @@
-0.1-23.12 selinux/oracle-selinux/
+0.1-23.13 selinux/oracle-selinux/
diff --git a/selinux/oracle-selinux/oracle-selinux.spec
b/selinux/oracle-selinux/oracle-selinux.spec
index 6c174be..c80748a 100644
--- a/selinux/oracle-selinux/oracle-selinux.spec
+++ b/selinux/oracle-selinux/oracle-selinux.spec
@@ -20,7 +20,7 @@
Name: oracle-selinux
Version: 0.1
-Release: 23.12%{?obtag}%{?dist}%{?repo}
+Release: 23.13%{?obtag}%{?dist}%{?repo}
Summary: SELinux policy module supporting Oracle
Group: System Environment/Base
License: GPLv2+
@@ -205,6 +205,9 @@ fi
%attr(0755,root,root) %{_sbindir}/oracle-nofcontext-selinux-enable
%changelog
+* Tue Dec 01 2009 Jan Pazdziora 0.1-23.13
+- Allow sqlplus to read pipes from unconfined_t
+
* Fri Nov 27 2009 Jan Pazdziora 0.1-23.12
- Use read_files_pattern to get open on Fedora 11
commit 6caf041267093f0ddcd50f72fd5a75dbb8784793
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Tue Dec 1 14:01:52 2009 +0100
Allow sqlplus to read pipes from unconfined_t.
diff --git a/selinux/oracle-selinux/oracle.te b/selinux/oracle-selinux/oracle.te
index 96de268..c9a4937 100644
--- a/selinux/oracle-selinux/oracle.te
+++ b/selinux/oracle-selinux/oracle.te
@@ -173,6 +173,9 @@ allow oracle_db_t oracle_tnslsnr_t:tcp_socket { rw_socket_perms };
# Allow sqlplus to read shell redirects
read_files_pattern(oracle_sqlplus_t, tmp_t, tmp_t)
+# Allow sqlplus to read pipes from unconfined_t
+unconfined_rw_pipes(oracle_sqlplus_t)
+
# sqlplus can run sql scripts
oracle_script(oracle_sqlplus_t)
commit b77fa3f9f410223616f8c0e2b9358f82ea68637b
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Tue Dec 1 11:54:47 2009 +0100
Automatic commit of package [spacewalk-backend] release [0.7.18-1].
diff --git a/backend/spacewalk-backend.spec b/backend/spacewalk-backend.spec
index 5a26583..3ec93e9 100644
--- a/backend/spacewalk-backend.spec
+++ b/backend/spacewalk-backend.spec
@@ -7,7 +7,7 @@ Name: spacewalk-backend
Summary: Common programs needed to be installed on the Spacewalk servers/proxies
Group: Applications/Internet
License: GPLv2
-Version: 0.7.17
+Version: 0.7.18
Release: 1%{?dist}
URL:
https://fedorahosted.org/spacewalk
Source0:
https://fedorahosted.org/releases/s/p/spacewalk/%{name}-%{version}.tar.gz
@@ -580,6 +580,9 @@ rm -f %{rhnconf}/rhnSecret.py*
# $Id$
%changelog
+* Tue Dec 1 2009 Miroslav Suchý <msuchy(a)redhat.com> 0.7.18-1
+- 449167 - time.strptime can not handle None values
+
* Thu Nov 26 2009 Miroslav Suchý <msuchy(a)redhat.com> 0.7.17-1
- fix compilation error
diff --git a/rel-eng/packages/spacewalk-backend b/rel-eng/packages/spacewalk-backend
index 5ae6e79..456a29d 100644
--- a/rel-eng/packages/spacewalk-backend
+++ b/rel-eng/packages/spacewalk-backend
@@ -1 +1 @@
-0.7.17-1 backend/
+0.7.18-1 backend/
commit 34c1aab76cde52d15ee7332b8752acaf4b3fe12b
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Tue Dec 1 11:19:26 2009 +0100
449167 - time.strptime can not handle None values
addresing:
Traceback (most recent call last):
File "/usr/share/rhn/server/apacheRequest.py", line 120, in call_function
response = apply(func, params)
File "/usr/share/rhn/server/handlers/xmlrpc/registration.py", line 957, in
update_packages
server.dispose_packages()
File "/usr/share/rhn/server/rhnServer/server_wrapper.py", line 68, in
dispose_packages
return Packages.dispose_packages(self, self.server["id"])
File "/usr/share/rhn/server/rhnServer/server_packages.py", line 119, in
dispose_packages
self.reload_packages_byid(sysid)
File "/usr/share/rhn/server/rhnServer/server_packages.py", line 258, in
reload_packages_byid
"%Y-%m-%d %H:%M:%S"))
File "/usr/lib/python2.4/_strptime.py", line 291, in strptime
found = format_regex.match(data_string)
TypeError: expected string or buffer
diff --git a/backend/server/rhnServer/server_packages.py
b/backend/server/rhnServer/server_packages.py
index 01afa33..d3eac96 100644
--- a/backend/server/rhnServer/server_packages.py
+++ b/backend/server/rhnServer/server_packages.py
@@ -252,7 +252,8 @@ class Packages:
if not t:
break
t['arch'] = package_arches_hash[t['package_arch_id']]
- t['installtime'] =
time.mktime(time.strptime(t['installtime'],
+ if t.has_key('installtime') and t['installtime'] is not
None:
+ t['installtime'] =
time.mktime(time.strptime(t['installtime'],
"%Y-%m-%d %H:%M:%S"))
p = dbPackage(t, real=1, name_id=t['name_id'],
evr_id=t['evr_id'],
package_arch_id=t['package_arch_id'])
commit 2c121b5a170763fb86afa902159a59a1857bf2df
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Tue Dec 1 09:41:54 2009 +0100
Automatic commit of package [spacewalk-search] release [0.7.2-1].
diff --git a/rel-eng/packages/spacewalk-search b/rel-eng/packages/spacewalk-search
index f905dc0..17ff4d1 100644
--- a/rel-eng/packages/spacewalk-search
+++ b/rel-eng/packages/spacewalk-search
@@ -1 +1 @@
-0.7.1-1 search-server/
+0.7.2-1 search-server/
diff --git a/search-server/spacewalk-search.spec b/search-server/spacewalk-search.spec
index 7849cdf..f2504d7 100644
--- a/search-server/spacewalk-search.spec
+++ b/search-server/spacewalk-search.spec
@@ -4,7 +4,7 @@ Name: spacewalk-search
Summary: Spacewalk Full Text Search Server
Group: Applications/Internet
License: GPLv2
-Version: 0.7.1
+Version: 0.7.2
Release: 1%{?dist}
# This src.rpm is cannonical upstream
# You can obtain it using this set of commands
@@ -112,6 +112,9 @@ fi
%{_sysconfdir}/logrotate.d/rhn-search
%changelog
+* Tue Dec 1 2009 Miroslav Suchý <msuchy(a)redhat.com> 0.7.2-1
+- 480342 - move init script from /etc/init.d to /etc/rc.d/init.d
+
* Wed Nov 25 2009 Miroslav Suchý <msuchy(a)redhat.com> 0.7.1-1
- 516872 - Fixed search server's log properties (paji(a)redhat.com)
- Update doc indexes to reside in "en-US" (jmatthew(a)redhat.com)
commit 9e3577eeed553685abfbcdc89fd3235480e7c0f3
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Tue Dec 1 09:40:57 2009 +0100
480342 - move init script from /etc/init.d to /etc/rc.d/init.d
diff --git a/search-server/spacewalk-search.spec b/search-server/spacewalk-search.spec
index 4802053..7849cdf 100644
--- a/search-server/spacewalk-search.spec
+++ b/search-server/spacewalk-search.spec
@@ -67,7 +67,7 @@ install -d -m 755 $RPM_BUILD_ROOT%{_prefix}/share/rhn/search
install -d -m 755 $RPM_BUILD_ROOT%{_prefix}/share/rhn/search/indexes
install -d -m 755 $RPM_BUILD_ROOT%{_prefix}/share/rhn/search/lib
install -d -m 755
$RPM_BUILD_ROOT%{_prefix}/share/rhn/search/classes/com/redhat/satellite/search/db
-install -d -m 755 $RPM_BUILD_ROOT/etc/init.d
+install -d -m 755 $RPM_BUILD_ROOT{_initrddir}
install -d -m 755 $RPM_BUILD_ROOT%{_bindir}
install -d -m 755 $RPM_BUILD_ROOT%{_var}/log/rhn/search
install -d -m 755 $RPM_BUILD_ROOT%{_prefix}/share/rhn/search/nutch
@@ -78,7 +78,7 @@ cp -d lib/* $RPM_BUILD_ROOT/%{_prefix}/share/rhn/search/lib
install -p -m 644 src/config/log4j.properties
$RPM_BUILD_ROOT/%{_prefix}/share/rhn/search/classes/log4j.properties
install -p -m 644 src/config/etc/logrotate.d/rhn-search
$RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/rhn-search
install -p -m 644 src/config/com/redhat/satellite/search/db/*
$RPM_BUILD_ROOT%{_prefix}/share/rhn/search/classes/com/redhat/satellite/search/db
-install -p -m 755 src/config/rhn-search $RPM_BUILD_ROOT%{_sysconfdir}/init.d
+install -p -m 755 src/config/rhn-search $RPM_BUILD_ROOT{_initrddir}
ln -s -f /usr/sbin/tanukiwrapper $RPM_BUILD_ROOT%{_bindir}/rhnsearchd
install -p -m 644 src/config/search/rhn_search.conf
$RPM_BUILD_ROOT%{_sysconfdir}/rhn/search/rhn_search.conf
install -p -m 644 src/config/search/rhn_search_daemon.conf
$RPM_BUILD_ROOT%{_sysconfdir}/rhn/search/rhn_search_daemon.conf
@@ -104,7 +104,7 @@ fi
%{_prefix}/share/rhn/search/classes/log4j.properties
%{_prefix}/share/rhn/search/classes/com/*
%attr(755, root, root) %{_prefix}/share/rhn/search/indexes
-%attr(755, root, root) %{_sysconfdir}/init.d/rhn-search
+%attr(755, root, root) {_initrddir}/rhn-search
%attr(755, root, root) %{_bindir}/rhnsearchd
%dir %{_sysconfdir}/rhn/search/
%config(noreplace) %{_sysconfdir}/rhn/search/rhn_search.conf
commit cf162ef308f041f4e8bf2a65127277cdd9e3d351
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Tue Dec 1 09:30:28 2009 +0100
Automatic commit of package [rhnsd] release [4.5.16-1].
diff --git a/client/rhel/rhnsd/rhnsd.spec b/client/rhel/rhnsd/rhnsd.spec
index c4b4b65..a74f007 100644
--- a/client/rhel/rhnsd/rhnsd.spec
+++ b/client/rhel/rhnsd/rhnsd.spec
@@ -4,7 +4,7 @@ Group: System Environment/Base
Source0:
https://fedorahosted.org/releases/s/p/spacewalk/%{name}-%{version}.tar.gz
URL:
https://fedorahosted.org/spacewalk
Name: rhnsd
-Version: 4.5.15
+Version: 4.5.16
Release: 1%{?dist}
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@@ -63,6 +63,10 @@ rm -fr $RPM_BUILD_ROOT
%doc LICENSE
%changelog
+* Tue Dec 1 2009 Miroslav Suchý <msuchy(a)redhat.com> 4.5.16-1
+- 502234 - fixing issue where the rhnsd init script would fail to reload the
configuration, a forward port of a patch from rhel 4 (jsherril(a)redhat.com)
+- 541682 - make env. for rhn_check consistent with osad (mzazrivec(a)redhat.com)
+
* Wed Nov 25 2009 Miroslav Suchý <msuchy(a)redhat.com> 4.5.15-1
- hardcode MANPATH
diff --git a/rel-eng/packages/rhnsd b/rel-eng/packages/rhnsd
index edbe653..55b8d65 100644
--- a/rel-eng/packages/rhnsd
+++ b/rel-eng/packages/rhnsd
@@ -1 +1 @@
-4.5.15-1 client/rhel/rhnsd/
+4.5.16-1 client/rhel/rhnsd/
commit 18b8308a5ad299ebbe03f4b5e03b43870232fd2d
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Tue Dec 1 09:28:44 2009 +0100
Automatic commit of package [rhn-client-tools] release [0.7.11-1].
diff --git a/client/rhel/rhn-client-tools/rhn-client-tools.spec
b/client/rhel/rhn-client-tools/rhn-client-tools.spec
index b3c465a..a60656e 100644
--- a/client/rhel/rhn-client-tools/rhn-client-tools.spec
+++ b/client/rhel/rhn-client-tools/rhn-client-tools.spec
@@ -4,7 +4,7 @@ Group: System Environment/Base
Source0:
https://fedorahosted.org/releases/s/p/spacewalk/%{name}-%{version}.tar.gz
URL:
https://fedorahosted.org/spacewalk
Name: rhn-client-tools
-Version: 0.7.10
+Version: 0.7.11
Release: 1%{?dist}
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
%if 0%{?suse_version: %{suse_version} > 1000}
@@ -225,6 +225,9 @@ rm -rf $RPM_BUILD_ROOT
%{_datadir}/applications/rhn_register.desktop
%changelog
+* Tue Dec 1 2009 Miroslav Suchý <msuchy(a)redhat.com> 0.7.11-1
+- 541262 - fix networkRetries logic (mzazrivec(a)redhat.com)
+
* Wed Nov 25 2009 Miroslav Suchý <msuchy(a)redhat.com> 0.7.10-1
- 216808 - add man page to package
- 216808 - create new script spacewalk-channel
diff --git a/rel-eng/packages/rhn-client-tools b/rel-eng/packages/rhn-client-tools
index 81851b6..6c56fc0 100644
--- a/rel-eng/packages/rhn-client-tools
+++ b/rel-eng/packages/rhn-client-tools
@@ -1 +1 @@
-0.7.10-1 client/rhel/rhn-client-tools/
+0.7.11-1 client/rhel/rhn-client-tools/
commit 921be69426ee492ca786adc0d62577df81df5877
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Tue Dec 1 09:27:34 2009 +0100
Automatic commit of package [spacewalk-java] release [0.7.22-1].
diff --git a/java/spacewalk-java.spec b/java/spacewalk-java.spec
index 64e80d8..95e31c7 100644
--- a/java/spacewalk-java.spec
+++ b/java/spacewalk-java.spec
@@ -12,7 +12,7 @@ Name: spacewalk-java
Summary: Spacewalk Java site packages
Group: Applications/Internet
License: GPLv2
-Version: 0.7.21
+Version: 0.7.22
Release: 1%{?dist}
URL:
https://fedorahosted.org/spacewalk
Source0:
https://fedorahosted.org/releases/s/p/spacewalk/%{name}-%{version}.tar.gz
@@ -280,6 +280,12 @@ fi
%{jardir}/postgresql-jdbc.jar
%changelog
+* Tue Dec 1 2009 Miroslav Suchý <msuchy(a)redhat.com> 0.7.22-1
+- 542830 - fixing three api calls that were using very inefficient queries to use the
same queries that were used in sat 5.2 (jsherril(a)redhat.com)
+- converting old hibernate max in clause limit fix to use new fix (jsherril(a)redhat.com)
+- 538559 - fixing issue where about 300 errata could not be applied to a system due to
inefficient hibernate usage (jsherril(a)redhat.com)
+- fixing list borders on errata apply confirm page (jsherril(a)redhat.com)
+
* Mon Nov 30 2009 Tomas Lestach <tlestach(a)redhat.com> 0.7.21-1
- checking return value of channel.getChecksum() (tlestach(a)redhat.com)
- adding checkstyle build dependency (tlestach(a)redhat.com)
diff --git a/rel-eng/packages/spacewalk-java b/rel-eng/packages/spacewalk-java
index 8528de5..fa1e4ca 100644
--- a/rel-eng/packages/spacewalk-java
+++ b/rel-eng/packages/spacewalk-java
@@ -1 +1 @@
-0.7.21-1 java/
+0.7.22-1 java/
commit 0a242c2e8af933ff7a5ced72f01072315e5a3b08
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Tue Dec 1 09:25:46 2009 +0100
Automatic commit of package [yum-rhn-plugin] release [0.7.8-1].
diff --git a/client/rhel/yum-rhn-plugin/yum-rhn-plugin.spec
b/client/rhel/yum-rhn-plugin/yum-rhn-plugin.spec
index 2c13903..467e028 100644
--- a/client/rhel/yum-rhn-plugin/yum-rhn-plugin.spec
+++ b/client/rhel/yum-rhn-plugin/yum-rhn-plugin.spec
@@ -1,6 +1,6 @@
Summary: RHN support for yum
Name: yum-rhn-plugin
-Version: 0.7.7
+Version: 0.7.8
Release: 1%{?dist}
License: GPLv2
Group: System Environment/Base
@@ -53,6 +53,11 @@ rm -rf $RPM_BUILD_ROOT
%doc LICENSE
%changelog
+* Tue Dec 1 2009 Miroslav Suchý <msuchy(a)redhat.com> 0.7.8-1
+- 437822 - python dependecy is not picked up automatically
+- 437822 - when persistent enable/disable of rhn repo is requested, do it in
rhnplugin.conf
+- 514467 - when we say RHN is disabled, we may actually really disable it
+
* Wed Nov 25 2009 Miroslav Suchý <msuchy(a)redhat.com> 0.7.7-1
- 527412 - compute delta and write it to logs only if writeChangesToLog is set to 1
- 527412 - Revert "fixing rhn-plugin to update package profiles through the
updatePackageProfile call instead of manually setting up the delta as it causes stale
package entries in the ui due to epoch being set to 0 for a no epoch packages"
diff --git a/rel-eng/packages/yum-rhn-plugin b/rel-eng/packages/yum-rhn-plugin
index abbd9bb..f4109a2 100644
--- a/rel-eng/packages/yum-rhn-plugin
+++ b/rel-eng/packages/yum-rhn-plugin
@@ -1 +1 @@
-0.7.7-1 client/rhel/yum-rhn-plugin/
+0.7.8-1 client/rhel/yum-rhn-plugin/
commit 941dce7fb5b2c544e2a93de9d63e207038d20f8f
Author: Justin Sherrill <jsherril(a)redhat.com>
Date: Mon Nov 30 17:35:02 2009 -0500
502234 - fixing issue where the rhnsd init script would fail to reload the
configuration, a forward port of a patch from rhel 4
diff --git a/client/rhel/rhnsd/rhnsd.c b/client/rhel/rhnsd/rhnsd.c
index d41f7a0..c2d0583 100644
--- a/client/rhel/rhnsd/rhnsd.c
+++ b/client/rhel/rhnsd/rhnsd.c
@@ -26,10 +26,12 @@
#include <sys/wait.h>
#include <sys/time.h>
#include <time.h>
+#include <limits.h>
#include <regex.h>
#define RHN_CHECK "/usr/sbin/rhn_check" /* XXX: fix me */
#define RHN_UP2DATE "/etc/sysconfig/rhn/up2date"
+#define RHNSD_CONFIG_FILE "/etc/sysconfig/rhn/rhnsd"
#define MAX_PATH_SIZE 512
@@ -64,6 +66,16 @@ static const char doc[] = N_("Red Hat Network Services
Daemon");
#define PROGRAM "rhnsd"
#define VERSION "1.0.2"
+/* Configuration parameters */
+static const char* param_name_interval = "interval";
+
+typedef struct _config_param
+{
+ char *key;
+ char *data;
+} config_param;
+
+
/* Prototype for option handler. */
static error_t parse_opt __P ((int key, char *arg, struct argp_state *state));
@@ -76,10 +88,14 @@ static struct argp argp = {
static void termination_handler (int);
static int rhn_init(void);
static int rhn_do_action(void);
+static void read_configuration();
+static void setInterval(char *arg);
+
static int parse_systemid_path(char* systemid_path, int systemid_path_length);
static void set_signal_handlers (void);
static void unset_signal_handlers (void);
+static void SIGHUP_handler(int);
/* Arguments */
#define MIN_INTERVAL 1 /* minimal sane interval; RHN will blacklist
@@ -109,6 +125,11 @@ int main (int argc, char **argv)
bindtextdomain(PROGRAM, "/usr/share/locale");
textdomain(PROGRAM);
+ /* Read default configuration file and allow command line
+ * options to override initial configuration file entries
+ **/
+ read_configuration();
+
/* Parse and process arguments. */
argp_parse(&argp, argc, argv, 0, &remaining, NULL);
@@ -191,6 +212,8 @@ int main (int argc, char **argv)
}
}
+
+
/* Handle program arguments. */
static error_t
parse_opt (int key, char *arg, struct argp_state *state)
@@ -203,11 +226,7 @@ parse_opt (int key, char *arg, struct argp_state *state)
case 'i':
/* --interval */
- interval = atoi(arg);
- if (interval < MIN_INTERVAL) {
- interval = MIN_INTERVAL;
- syslog(LOG_WARNING, "you cannot specify a minimum interval less than %d, interval
adjusted.", MIN_INTERVAL);
- }
+ setInterval(arg);
break;
case 'v':
@@ -293,6 +312,7 @@ set_signal_handlers (void)
signal (SIGQUIT, termination_handler);
signal (SIGTERM, termination_handler);
signal (SIGPIPE, SIG_IGN);
+ signal (SIGHUP, SIGHUP_handler);
}
static void
@@ -302,6 +322,7 @@ unset_signal_handlers (void)
signal (SIGQUIT, SIG_DFL);
signal (SIGTERM, SIG_DFL);
signal (SIGPIPE, SIG_DFL);
+ signal (SIGHUP, SIG_DFL);
}
/* XXX: fix me up */
@@ -472,6 +493,93 @@ static int rhn_do_action(void)
return 0;
}
+
+
+static void setInterval(char *arg)
+{
+ interval = atoi(arg);
+ if (interval < MIN_INTERVAL) {
+ interval = MIN_INTERVAL;
+ syslog(LOG_WARNING, "you cannot specify a minimum interval less than %d,
interval adjusted.", MIN_INTERVAL);
+ }
+ syslog(LOG_NOTICE, "%s running with check_in interval set to %d seconds.",
doc, interval);
+}
+
+static int skipLine(char *line)
+{
+ if (line == NULL) {
+ return 1;
+ }
+ // Detect a Comment
+ if (line[0] == '#') {
+ return 1;
+ }
+ return 0;
+}
+
+/*
+ * Returns a key/value pair of a configuration item, or NULL.
+ * Expected format of config entries is:
+ * KEY=VALUE
+ */
+static config_param *parseLine(char *line)
+{
+ if (skipLine(line)) {
+ return NULL;
+ }
+
+ config_param *cp = malloc(sizeof(config_param));
+ char delim[] = "=";
+ char *dup = strdup(line);
+ cp->key = strsep(&dup, delim);
+ if (cp->key == NULL) {
+ free(dup);
+ return NULL;
+ }
+ int index;
+ // Cast all keys to lowercase
+ for (index = 0; index < strlen(cp->key); index++) {
+ cp->key[index] = tolower(cp->key[index]);
+ }
+
+ cp->data = strsep(&dup, delim);
+ if (cp->data == NULL) {
+ free(dup);
+ return NULL;
+ }
+ free(dup);
+ return cp;
+}
+
+static void read_configuration()
+{
+ FILE *config = fopen(RHNSD_CONFIG_FILE, "r");
+ if (config == NULL) {
+ syslog(LOG_ERR, "Error reading configuraton file, %s",
RHNSD_CONFIG_FILE);
+ syslog(LOG_ERR, "%s", strerror(errno));
+ return;
+ }
+ char line[LINE_MAX];
+ while (fgets(line, LINE_MAX, config) != NULL) {
+ config_param *cp = parseLine(line);
+ if (cp == NULL) {
+ continue;
+ }
+ if (strncmp(param_name_interval, cp->key, strlen(param_name_interval)) == 0)
{
+ setInterval(cp->data);
+ }
+ free(cp);
+ }
+ fclose(config);
+}
+
+static void SIGHUP_handler(int signum)
+{
+ read_configuration();
+}
+
+
+
#define MAX_CONFIG_LINE_SIZE (2*MAX_PATH_SIZE)
#define SYSTEMID_NMATCH 2
/* parse systemIdPath from the up2date configuration file */
diff --git a/client/rhel/rhnsd/rhnsd.init b/client/rhel/rhnsd/rhnsd.init
index 19dbc7d..31e6d3f 100644
--- a/client/rhel/rhnsd/rhnsd.init
+++ b/client/rhel/rhnsd/rhnsd.init
@@ -91,8 +91,10 @@ case "$1" in
fi
;;
reload)
+ echo -n $"Reloading Red Hat Network Daemon: "
killproc rhnsd -HUP
RETVAL=$?
+ echo
;;
*)
echo $"Usage: $0 {start|stop|status|restart|condrestart|try-restart|reload}"
commit 83f534f7dac8430e19c846cbaa698a49b379e848
Author: Justin Sherrill <jsherril(a)redhat.com>
Date: Mon Nov 30 17:01:21 2009 -0500
542830 - fixing three api calls that were using very inefficient queries to use the
same queries that were used in sat 5.2
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 d8b2ca6..7c15aec 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
@@ -521,7 +521,7 @@ public class SystemHandler extends BaseHandler {
*/
public Object[] listSystems(String sessionKey) throws FaultException {
User loggedInUser = getLoggedInUser(sessionKey);
- DataResult<SystemOverview> dr = SystemManager.systemList(loggedInUser,
null);
+ DataResult<SystemOverview> dr = SystemManager.systemListShort(loggedInUser,
null);
dr.elaborate();
return dr.toArray();
}
@@ -1323,7 +1323,7 @@ public class SystemHandler extends BaseHandler {
// Get the logged in user
User loggedInUser = getLoggedInUser(sessionKey);
User target = XmlRpcUserHelper.getInstance().lookupTargetUser(loggedInUser,
login);
- return getUserSystemsList(target);
+ return SystemManager.systemListShort(target, null);
}
/**
@@ -1341,11 +1341,13 @@ public class SystemHandler extends BaseHandler {
public List listUserSystems(String sessionKey) {
// Get the logged in user
User loggedInUser = getLoggedInUser(sessionKey);
- return getUserSystemsList(loggedInUser);
+ return SystemManager.systemListShort(loggedInUser, null);
}
/**
* Private helper method to get a list of systems for a particular user
+ * The query used is very inefficient. Only use it when you need a lot
+ * of information about the systems.
* @param user The user to lookup
* @return An array of SystemOverview objects representing a system
*/
diff --git a/java/code/src/com/redhat/rhn/manager/system/SystemManager.java
b/java/code/src/com/redhat/rhn/manager/system/SystemManager.java
index 8f2bc99..74a3b2c 100644
--- a/java/code/src/com/redhat/rhn/manager/system/SystemManager.java
+++ b/java/code/src/com/redhat/rhn/manager/system/SystemManager.java
@@ -287,6 +287,23 @@ public class SystemManager extends BaseManager {
Map elabParams = new HashMap();
return makeDataResult(params, elabParams, pc, m);
}
+
+ /**
+ * Returns list of all systems visible to user.
+ * This is meant to be fast and only gets the id, name, and last checkin
+ * @param user Currently logged in user.
+ * @param pc PageControl
+ * @return list of SystemOverviews.
+ */
+ public static DataResult systemListShort(User user, PageControl pc) {
+ SelectMode m = ModeFactory.getMode("System_queries",
"xmlrpc_visible_to_user",
+ SystemOverview.class);
+ Map params = new HashMap();
+ params.put("user_id", user.getId());
+ Map elabParams = new HashMap();
+
+ return makeDataResult(params, elabParams, pc, m);
+ }
/**
* Returns a list of all systems
commit 2e303d0f35bd3dd2b6b7551f79a5bade8ce87e3c
Author: Justin Sherrill <jsherril(a)redhat.com>
Date: Mon Nov 30 13:40:40 2009 -0500
converting old hibernate max in clause limit fix to use new fix
diff --git a/java/code/src/com/redhat/rhn/domain/server/ServerFactory.java
b/java/code/src/com/redhat/rhn/domain/server/ServerFactory.java
index 2e5b87f..efbe49b 100644
--- a/java/code/src/com/redhat/rhn/domain/server/ServerFactory.java
+++ b/java/code/src/com/redhat/rhn/domain/server/ServerFactory.java
@@ -29,8 +29,6 @@ import com.redhat.rhn.frontend.xmlrpc.ChannelSubscriptionException;
import com.redhat.rhn.manager.rhnset.RhnSetDecl;
import com.redhat.rhn.manager.system.UpdateBaseChannelCommand;
-import java.util.LinkedList;
-
import org.apache.commons.lang.StringUtils;
import org.apache.log4j.Logger;
import org.hibernate.Query;
@@ -39,10 +37,10 @@ import org.hibernate.Session;
import java.sql.Types;
import java.util.ArrayList;
import java.util.Collection;
-import java.util.Collections;
import java.util.Date;
import java.util.HashMap;
import java.util.Iterator;
+import java.util.LinkedList;
import java.util.List;
import java.util.Map;
@@ -748,30 +746,8 @@ public class ServerFactory extends HibernateFactory {
* @return list of system ids that are solaris systems
*/
public static List<Long> listSolarisSystems(Collection<Long> systemIds)
{
- return listGenericSystems(systemIds, "Server.listSolarisSystems");
- }
-
-
-
- private static List<Long> listGenericSystems(Collection<Long> systemIds,
String query) {
- //Hibernate can't handle empty lists for in clauses, silly hibernate
- if (systemIds.isEmpty()) {
- return Collections.EMPTY_LIST;
- }
- ArrayList<Long> tmpList = new ArrayList<Long>();
- List<Long> toRet = new ArrayList<Long>();
- tmpList.addAll(systemIds);
-
- for (int i = 0; i < systemIds.size();) {
- int initial = i;
- int fin = i + 500 < systemIds.size() ? i + 500 : systemIds.size();
- List<Long> sublist = tmpList.subList(i, fin);
- toRet.addAll(ServerFactory.getSession().getNamedQuery(query).
- setParameterList("sids", sublist).list());
- i = fin;
- }
-
- return toRet;
+ return singleton.listObjectsByNamedQuery("Server.listSolarisSystems",
+ new HashMap(), systemIds, "sids");
}
/**
@@ -781,7 +757,8 @@ public class ServerFactory extends HibernateFactory {
* @return list of system ids that are linux systems
*/
public static List<Long> listLinuxSystems(Collection<Long> systemIds) {
- return listGenericSystems(systemIds, "Server.listRedHatSystems");
+ return singleton.listObjectsByNamedQuery("Server.listRedHatSystems",
+ new HashMap(), systemIds, "sids");
}
}
commit 9f4dbe3d7e6224218a2cbfe5895fec100840c5e7
Author: Justin Sherrill <jsherril(a)redhat.com>
Date: Mon Nov 30 13:40:01 2009 -0500
538559 - fixing issue where about 300 errata could not be applied to a system due to
inefficient hibernate usage
diff --git a/java/code/src/com/redhat/rhn/common/hibernate/HibernateFactory.java
b/java/code/src/com/redhat/rhn/common/hibernate/HibernateFactory.java
index 71dd50d..4a9b190 100644
--- a/java/code/src/com/redhat/rhn/common/hibernate/HibernateFactory.java
+++ b/java/code/src/com/redhat/rhn/common/hibernate/HibernateFactory.java
@@ -36,6 +36,9 @@ import java.io.Serializable;
import java.io.UnsupportedEncodingException;
import java.sql.Blob;
import java.sql.SQLException;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
@@ -117,8 +120,12 @@ public abstract class HibernateFactory {
Set entrySet = parameters.entrySet();
for (Iterator itr = entrySet.iterator(); itr.hasNext();) {
Map.Entry entry = (Map.Entry) itr.next();
- if (entry.getValue() instanceof List) {
- query.setParameterList((String) entry.getKey(), (List)
entry.getValue());
+ if (entry.getValue() instanceof Collection) {
+ Collection c = (Collection) entry.getValue();
+ if (c.size() > 100) {
+ LOG.error("Query exectued with Collection larger than
1000");
+ }
+ query.setParameterList((String) entry.getKey(), c);
}
else {
query.setParameter((String) entry.getKey(), entry.getValue());
@@ -196,6 +203,43 @@ public abstract class HibernateFactory {
* @param qryName Named query to use to find a list of objects.
* @param qryParams Map of named bind parameters whose keys are Strings. The
* map can also be null.
+ * @param col the collection to use as an inclause
+ * @param colLabel the label the collection will have
+ * @return List of objects returned by named query, or null if nothing
+ * found.
+ */
+ protected List listObjectsByNamedQuery(String qryName, Map qryParams,
+ Collection col, String colLabel) {
+
+ if (col.isEmpty()) {
+ return Collections.EMPTY_LIST;
+ }
+
+ ArrayList<Long> tmpList = new ArrayList<Long>();
+ List<Long> toRet = new ArrayList<Long>();
+ tmpList.addAll(col);
+
+ for (int i = 0; i < col.size();) {
+ int initial = i;
+ int fin = i + 500 < col.size() ? i + 500 : col.size();
+ List<Long> sublist = tmpList.subList(i, fin);
+
+ qryParams.put(colLabel, sublist);
+ toRet.addAll(listObjectsByNamedQuery(qryName, qryParams, false));
+ i = fin;
+ }
+ return toRet;
+ }
+
+
+
+ /**
+ * Using a named query, find all the objects matching the criteria within.
+ * Warning: This can be very expensive if the returned list is large. Use
+ * only for small tables with static data
+ * @param qryName Named query to use to find a list of objects.
+ * @param qryParams Map of named bind parameters whose keys are Strings. The
+ * map can also be null.
* @param cacheable if we should cache the results of this query
* @return List of objects returned by named query, or null if nothing
* found.
diff --git a/java/code/src/com/redhat/rhn/domain/errata/ErrataFactory.java
b/java/code/src/com/redhat/rhn/domain/errata/ErrataFactory.java
index 08136ff..8482beb 100644
--- a/java/code/src/com/redhat/rhn/domain/errata/ErrataFactory.java
+++ b/java/code/src/com/redhat/rhn/domain/errata/ErrataFactory.java
@@ -47,6 +47,7 @@ import org.hibernate.Query;
import org.hibernate.Session;
import java.util.ArrayList;
+import java.util.Collection;
import java.util.Date;
import java.util.HashMap;
import java.util.HashSet;
@@ -1030,5 +1031,16 @@ public class ErrataFactory extends HibernateFactory {
copyDetails(cloned, cloned.getOriginal(), true);
}
+ /**
+ * List errata objects by ID
+ * @param ids list of ids
+ * @return List of Errata Objects
+ */
+ public static List<Errata> listErrata(Collection<Long> ids) {
+ return singleton.listObjectsByNamedQuery("PublishedErrata.listByIds",
+ new HashMap(), ids, "list");
+ }
+
+
}
diff --git a/java/code/src/com/redhat/rhn/domain/errata/impl/PublishedErrata.hbm.xml
b/java/code/src/com/redhat/rhn/domain/errata/impl/PublishedErrata.hbm.xml
index 70ccc7a..ddf7c66 100644
--- a/java/code/src/com/redhat/rhn/domain/errata/impl/PublishedErrata.hbm.xml
+++ b/java/code/src/com/redhat/rhn/domain/errata/impl/PublishedErrata.hbm.xml
@@ -89,6 +89,11 @@ PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
<![CDATA[from com.redhat.rhn.domain.errata.impl.PublishedErrata as e
where e.id = :id]]>
</query>
+ <query name="PublishedErrata.listByIds">
+ <![CDATA[from com.redhat.rhn.domain.errata.impl.PublishedErrata as e
+ where e.id in (:list)]]>
+ </query>
+
<query name="PublishedErrata.findByAdvisoryName">
<![CDATA[from com.redhat.rhn.domain.errata.impl.PublishedErrata as e
where e.advisoryName = :advisory]]>
diff --git
a/java/code/src/com/redhat/rhn/frontend/action/systems/ErrataConfirmSetupAction.java
b/java/code/src/com/redhat/rhn/frontend/action/systems/ErrataConfirmSetupAction.java
index 1c31544..4bf16b9 100644
--- a/java/code/src/com/redhat/rhn/frontend/action/systems/ErrataConfirmSetupAction.java
+++ b/java/code/src/com/redhat/rhn/frontend/action/systems/ErrataConfirmSetupAction.java
@@ -14,22 +14,20 @@
*/
package com.redhat.rhn.frontend.action.systems;
-import com.redhat.rhn.common.db.datasource.DataResult;
import com.redhat.rhn.common.util.DatePicker;
import com.redhat.rhn.domain.action.Action;
+import com.redhat.rhn.domain.errata.Errata;
+import com.redhat.rhn.domain.errata.ErrataFactory;
import com.redhat.rhn.domain.rhnset.RhnSet;
import com.redhat.rhn.domain.server.Server;
import com.redhat.rhn.domain.user.User;
-import com.redhat.rhn.frontend.dto.ErrataOverview;
-import com.redhat.rhn.frontend.listview.PageControl;
import com.redhat.rhn.frontend.struts.RequestContext;
+import com.redhat.rhn.frontend.struts.RhnAction;
import com.redhat.rhn.frontend.struts.RhnHelper;
-import com.redhat.rhn.frontend.struts.RhnListAction;
-import com.redhat.rhn.frontend.struts.RhnListSetHelper;
import com.redhat.rhn.frontend.struts.StrutsDelegate;
-import com.redhat.rhn.frontend.taglibs.list.ListTagHelper;
+import com.redhat.rhn.frontend.taglibs.list.helper.ListRhnSetHelper;
+import com.redhat.rhn.frontend.taglibs.list.helper.Listable;
import com.redhat.rhn.manager.action.ActionManager;
-import com.redhat.rhn.manager.errata.ErrataManager;
import com.redhat.rhn.manager.system.SystemManager;
import org.apache.struts.action.ActionForm;
@@ -39,8 +37,8 @@ import org.apache.struts.action.ActionMessage;
import org.apache.struts.action.ActionMessages;
import org.apache.struts.action.DynaActionForm;
-import java.util.Collections;
import java.util.HashMap;
+import java.util.List;
import java.util.Map;
import javax.servlet.http.HttpServletRequest;
@@ -50,9 +48,8 @@ import javax.servlet.http.HttpServletResponse;
* ErrataConfirmSetupAction
* @version $Rev$
*/
-public class ErrataConfirmSetupAction extends RhnListAction {
- public static final String DISPATCH = "dispatch";
- public static final String LIST_NAME = "errataConfirmList";
+public class ErrataConfirmSetupAction extends RhnAction implements Listable {
+
/** {@inheritDoc} */
public ActionForward execute(ActionMapping mapping,
@@ -62,13 +59,18 @@ public class ErrataConfirmSetupAction extends RhnListAction {
RequestContext requestContext = new RequestContext(request);
User user = requestContext.getLoggedInUser();
- RhnListSetHelper helper = new RhnListSetHelper(request);
+
+
Long sid = requestContext.getRequiredParam("sid");
RhnSet set = ErrataSetupAction.getSetDecl(sid).get(user);
+ Server server = SystemManager.lookupByIdAndUser(sid, user);
+
+ ListRhnSetHelper helper = new ListRhnSetHelper(this, request,
+ ErrataSetupAction.getSetDecl(sid));
+ helper.setWillClearSet(false);
+ helper.execute();
- if (request.getParameter(DISPATCH) != null) {
- // if its one of the Dispatch actions handle it..
- helper.updateSet(set, LIST_NAME);
+ if (helper.isDispatched()) {
if (!set.isEmpty()) {
return confirmErrata(mapping, formIn, request, response);
}
@@ -76,26 +78,12 @@ public class ErrataConfirmSetupAction extends RhnListAction {
RhnHelper.handleEmptySelection(request);
}
}
-
-
-
- PageControl pc = new PageControl();
- clampListBounds(pc, request, user);
- pc.setPageSize(set.size());
-
- Server server = SystemManager.lookupByIdAndUser(sid, user);
- DataResult dr = SystemManager.errataInSet(user,
- ErrataSetupAction.getSetDecl(sid).getLabel(), pc);
- dr.setElaborationParams(Collections.EMPTY_MAP);
//Setup the datepicker widget
DatePicker picker = getStrutsDelegate().prepopulateDatePicker(request,
(DynaActionForm)formIn, "date",
DatePicker.YEAR_RANGE_POSITIVE);
request.setAttribute("date", picker);
-
- request.setAttribute("pageList", dr);
request.setAttribute("system", server);
- request.setAttribute(ListTagHelper.PARENT_URL, request.getRequestURI());
return
getStrutsDelegate().forwardParams(mapping.findForward("default"),
request.getParameterMap());
@@ -125,15 +113,13 @@ public class ErrataConfirmSetupAction extends RhnListAction {
Map hparams = new HashMap();
Server server = SystemManager.lookupByIdAndUser(sid, user);
- DataResult errata = SystemManager.errataInSet(user,
- ErrataSetupAction.getSetDecl(sid) .getLabel(), null);
+ RhnSet set = ErrataSetupAction.getSetDecl(sid).get(user);
+ List<Errata> errataList =
ErrataFactory.listErrata(set.getElementValues());
- if (server != null && !errata.isEmpty()) {
- for (int i = 0; i < errata.size(); i++) {
- Action update = ActionManager.createErrataAction(user, ErrataManager
- .lookupErrata(new Long(((ErrataOverview)errata.get(i))
- .getId().longValue()), user));
+ if (server != null && !errataList.isEmpty()) {
+ for (Errata e : errataList) {
+ Action update = ActionManager.createErrataAction(user, e);
ActionManager.addServerToAction(server.getId(), update);
update.setEarliestAction(getStrutsDelegate().readDatePicker(form,
"date",
DatePicker.YEAR_RANGE_POSITIVE));
@@ -142,12 +128,12 @@ public class ErrataConfirmSetupAction extends RhnListAction {
ActionMessages msg = new ActionMessages();
Object[] args = new Object[3];
- args[0] = new Long(errata.size());
+ args[0] = new Long(errataList.size());
args[1] = server.getName();
args[2] = server.getId().toString();
StringBuffer messageKey = new StringBuffer("errata.schedule");
- if (errata.size() != 1) {
+ if (errataList.size() != 1) {
messageKey = messageKey.append(".plural");
}
@@ -185,5 +171,16 @@ public class ErrataConfirmSetupAction extends RhnListAction {
}
return params;
}
+
+
+ /**
+ *
+ * {@inheritDoc}
+ */
+ public List getResult(RequestContext context) {
+ Long sid = context.getParamAsLong("sid");
+ return SystemManager.errataInSet(context.getLoggedInUser(),
+ ErrataSetupAction.getSetDecl(sid).getLabel(), null);
+ }
}
diff --git a/java/code/src/com/redhat/rhn/manager/system/SystemManager.java
b/java/code/src/com/redhat/rhn/manager/system/SystemManager.java
index 6e1221c..8f2bc99 100644
--- a/java/code/src/com/redhat/rhn/manager/system/SystemManager.java
+++ b/java/code/src/com/redhat/rhn/manager/system/SystemManager.java
@@ -849,7 +849,9 @@ public class SystemManager extends BaseManager {
Map elabParams = new HashMap();
elabParams.put("user_id", user.getId());
- return makeDataResult(params, elabParams, pc, m);
+ DataResult dr = m.execute(params);
+ dr.setElaborationParams(elabParams);
+ return dr;
}
/**
diff --git a/java/code/webapp/WEB-INF/pages/systems/errataconfirm.jsp
b/java/code/webapp/WEB-INF/pages/systems/errataconfirm.jsp
index 91742b4..f6348c7 100644
--- a/java/code/webapp/WEB-INF/pages/systems/errataconfirm.jsp
+++ b/java/code/webapp/WEB-INF/pages/systems/errataconfirm.jsp
@@ -19,13 +19,13 @@
<rl:listset name="erratConfirmListSet">
- <rl:list dataset="pageList"
+ <rl:list
width="100%"
- name="errataConfirmList"
styleclass="list"
emptykey="erratalist.jsp.noerrata">
<rl:decorator name="PageSizeDecorator"/>
+ <rl:decorator name="ElaborationDecorator"/>
<rl:column headerkey="erratalist.jsp.type" styleclass="first-column
text-align: center;">
<c:if test="${current.securityAdvisory}">
commit 2fcc1109fa8d197f8820f6155f722b0381518b78
Author: Justin Sherrill <jsherril(a)redhat.com>
Date: Tue Nov 24 18:57:11 2009 -0500
fixing list borders on errata apply confirm page
diff --git a/java/code/webapp/WEB-INF/pages/systems/errataconfirm.jsp
b/java/code/webapp/WEB-INF/pages/systems/errataconfirm.jsp
index 162a0aa..91742b4 100644
--- a/java/code/webapp/WEB-INF/pages/systems/errataconfirm.jsp
+++ b/java/code/webapp/WEB-INF/pages/systems/errataconfirm.jsp
@@ -27,7 +27,7 @@
<rl:decorator name="PageSizeDecorator"/>
- <rl:column headerkey="erratalist.jsp.type" styleclass="text-align:
center;">
+ <rl:column headerkey="erratalist.jsp.type" styleclass="first-column
text-align: center;">
<c:if test="${current.securityAdvisory}">
<img src="/img/wrh-security.gif"
title="<bean:message
key="erratalist.jsp.securityadvisory"/>" />
@@ -51,7 +51,7 @@
${current.advisorySynopsis}
</rl:column>
- <rl:column headerkey="erratalist.jsp.updated">
+ <rl:column headerkey="erratalist.jsp.updated"
styleclass="last-column">
${current.updateDate}
</rl:column>
</rl:list>
commit 9e170616b0d7da97f5a29313cd8298e24ed41a0d
Author: Justin Sherrill <jsherril(a)redhat.com>
Date: Tue Nov 24 18:52:01 2009 -0500
fixing cluster-storage src channel search
diff --git a/scripts/channel-to-update-level/create-channel-update
b/scripts/channel-to-update-level/create-channel-update
index 9c16ca1..a64c1ca 100755
--- a/scripts/channel-to-update-level/create-channel-update
+++ b/scripts/channel-to-update-level/create-channel-update
@@ -343,6 +343,8 @@ def findSrcChan(version, release, arch, extra = None):
return "rhel-%s-%s-%s" % (arch, low_release, version)
else: #else we do, so lets process that
low_extra = extra.lower()
+ if low_extra == "clusterstorage":
+ low_extra = "cluster-storage"
if low_extra == "extra":
return "rhel-%s-%s-%s-%s" % (arch, low_release, version, low_extra)
else:
commit b3d5dbc873e24b7e2f0fdce8d9c13c3b255f38d8
Author: Milan Zazrivec <mzazrivec(a)redhat.com>
Date: Mon Nov 30 17:22:27 2009 +0100
Automatic commit of package [spacewalk-schema] release [0.7.7-1].
diff --git a/rel-eng/packages/spacewalk-schema b/rel-eng/packages/spacewalk-schema
index 1ad2c7d..84fe8b4 100644
--- a/rel-eng/packages/spacewalk-schema
+++ b/rel-eng/packages/spacewalk-schema
@@ -1 +1 @@
-0.7.6-1 schema/spacewalk/
+0.7.7-1 schema/spacewalk/
diff --git a/schema/spacewalk/spacewalk-schema.spec
b/schema/spacewalk/spacewalk-schema.spec
index c981165..749ce86 100644
--- a/schema/spacewalk/spacewalk-schema.spec
+++ b/schema/spacewalk/spacewalk-schema.spec
@@ -2,7 +2,7 @@ Name: spacewalk-schema
Group: Applications/Internet
Summary: Oracle SQL schema for Spacewalk server
-Version: 0.7.6
+Version: 0.7.7
Release: 1%{?dist}
Source0: %{name}-%{version}.tar.gz
@@ -58,6 +58,9 @@ rm -rf $RPM_BUILD_ROOT
%{_mandir}/man1/spacewalk-schema-upgrade*
%changelog
+* Mon Nov 30 2009 Milan Zazrivec <mzazrivec(a)redhat.com> 0.7.7-1
+- schema upgrade fixes for Spacewalk 0.7
+
* Thu Nov 19 2009 Michael Mraka <michael.mraka(a)redhat.com> 0.7.6-1
- replaced cursors + for loops with already written bulk procedure
- removed cartesian join
commit e0b600c88bfe448868e2a7d5db38ef72b59c7adf
Author: Milan Zazrivec <mzazrivec(a)redhat.com>
Date: Mon Nov 30 16:22:33 2009 +0100
add missing package body upgrade scripts
What we were missing were upgrades for following two package bodies:
- rhn_server
- rhn_channel
diff --git
a/schema/spacewalk/upgrade/spacewalk-schema-0.6-to-spacewalk-schema-0.7/161-rhn_server.pkb.sql
b/schema/spacewalk/upgrade/spacewalk-schema-0.6-to-spacewalk-schema-0.7/161-rhn_server.pkb.sql
new file mode 100644
index 0000000..293bf8b
--- /dev/null
+++
b/schema/spacewalk/upgrade/spacewalk-schema-0.6-to-spacewalk-schema-0.7/161-rhn_server.pkb.sql
@@ -0,0 +1,735 @@
+--
+-- Copyright (c) 2008 Red Hat, Inc.
+--
+-- This software is licensed to you under the GNU General Public License,
+-- version 2 (GPLv2). There is NO WARRANTY for this software, express or
+-- implied, including the implied warranties of MERCHANTABILITY or FITNESS
+-- FOR A PARTICULAR PURPOSE. You should have received a copy of GPLv2
+-- along with this software; if not, see
+--
http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
+--
+-- Red Hat trademarks are not licensed under GPLv2. No permission is
+-- granted to use or replicate Red Hat trademarks that are incorporated
+-- in this software or its documentation.
+--
+--
+--
+--
+
+create or replace
+package body rhn_server
+is
+ function system_service_level(
+ server_id_in in number,
+ service_level_in in varchar2
+ ) return number is
+
+ cursor ents is
+ select label from rhnServerEntitlementView
+ where server_id = server_id_in;
+
+ retval number := 0;
+
+ begin
+ for ent in ents loop
+ retval := rhn_entitlements.entitlement_grants_service (ent.label,
service_level_in);
+ if retval = 1 then
+ return retval;
+ end if;
+ end loop;
+
+ return retval;
+
+ end system_service_level;
+
+
+ function can_change_base_channel(server_id_in IN NUMBER)
+ return number
+ is
+ throwaway number;
+ begin
+ -- the idea: if we get past this query, the server is
+ -- neither sat nor proxy, so base channel is changeable
+
+ select 1 into throwaway
+ from rhnServer S
+ where S.id = server_id_in
+ and not exists (select 1 from rhnSatelliteInfo SI where SI.server_id = S.id)
+ and not exists (select 1 from rhnProxyInfo PI where PI.server_id = S.id);
+
+ return 1;
+ exception
+ when no_data_found
+ then
+ return 0;
+ end can_change_base_channel;
+
+ procedure set_custom_value(
+ server_id_in in number,
+ user_id_in in number,
+ key_label_in in varchar2,
+ value_in in varchar2
+ ) is
+ key_id_val number;
+ begin
+ select CDK.id into key_id_val
+ from rhnCustomDataKey CDK,
+ rhnServer S
+ where S.id = server_id_in
+ and S.org_id = CDK.org_id
+ and CDK.label = key_label_in;
+
+ begin
+ insert into rhnServerCustomDataValue (server_id, key_id, value, created_by,
last_modified_by)
+ values (server_id_in, key_id_val, value_in, user_id_in, user_id_in);
+ exception
+ when DUP_VAL_ON_INDEX
+ then
+ update rhnServerCustomDataValue
+ set value = value_in,
+ last_modified_by = user_id_in
+ where server_id = server_id_in
+ and key_id = key_id_val;
+ end;
+
+ end set_custom_value;
+
+ function bulk_set_custom_value(
+ key_label_in in varchar2,
+ value_in in varchar2,
+ set_label_in in varchar2,
+ set_uid_in in number
+ )
+ return integer
+ is
+ i integer := 0;
+ begin
+ i := 0;
+ for server in rhn_set.set_iterator(set_label_in, set_uid_in)
+ loop
+ if rhn_server.system_service_level(server.element, 'provisioning') = 1 then
+ rhn_server.set_custom_value(server.element, set_uid_in, key_label_in, value_in);
+ i := i + 1;
+ end if;
+ end loop server;
+ return i;
+ end bulk_set_custom_value;
+
+ procedure bulk_snapshot_tag(
+ org_id_in in number,
+ tagname_in in varchar2,
+ set_label_in in varchar2,
+ set_uid_in in number
+ ) is
+ snapshot_id number;
+ begin
+ for server in rhn_set.set_iterator(set_label_in, set_uid_in)
+ loop
+ if rhn_server.system_service_level(server.element, 'provisioning') = 1 then
+ begin
+ select max(id) into snapshot_id
+ from rhnSnapshot
+ where server_id = server.element;
+ exception
+ when NO_DATA_FOUND then
+ rhn_server.snapshot_server(server.element, 'tagging system: ' ||
tagname_in);
+
+ select max(id) into snapshot_id
+ from rhnSnapshot
+ where server_id = server.element;
+ end;
+
+ -- now have a snapshot_id to work with...
+ begin
+ rhn_server.tag_snapshot(snapshot_id, org_id_in, tagname_in);
+ exception
+ when DUP_VAL_ON_INDEX
+ then
+ -- do nothing, be forgiving...
+ null;
+ end;
+ end if;
+ end loop server;
+ end bulk_snapshot_tag;
+
+ procedure tag_delete(
+ server_id_in in number,
+ tag_id_in in number
+ ) is
+ cursor snapshots is
+ select snapshot_id
+ from rhnSnapshotTag
+ where tag_id = tag_id_in;
+ tag_id_tmp number;
+ begin
+ select id into tag_id_tmp
+ from rhnTag
+ where id = tag_id_in
+ for update;
+
+ delete
+ from rhnSnapshotTag
+ where server_id = server_id_in
+ and tag_id = tag_id_in;
+ for snapshot in snapshots loop
+ return;
+ end loop;
+ delete
+ from rhnTag
+ where id = tag_id_in;
+ end tag_delete;
+
+ procedure tag_snapshot(
+ snapshot_id_in in number,
+ org_id_in in number,
+ tagname_in in varchar2
+ ) is
+ begin
+ insert into rhnSnapshotTag (snapshot_id, server_id, tag_id)
+ select snapshot_id_in, server_id, lookup_tag(org_id_in, tagname_in)
+ from rhnSnapshot
+ where id = snapshot_id_in;
+ end tag_snapshot;
+
+ procedure bulk_snapshot(
+ reason_in in varchar2,
+ set_label_in in varchar2,
+ set_uid_in in number
+ ) is
+ begin
+ for server in rhn_set.set_iterator(set_label_in, set_uid_in)
+ loop
+ if rhn_server.system_service_level(server.element, 'provisioning') = 1
then
+ rhn_server.snapshot_server(server.element, reason_in);
+ end if;
+ end loop server;
+ end bulk_snapshot;
+
+ procedure snapshot_server(
+ server_id_in in number,
+ reason_in in varchar2
+ ) is
+ snapshot_id number;
+ cursor revisions is
+ select distinct
+ cr.id
+ from rhnConfigRevision cr,
+ rhnConfigFileName cfn,
+ rhnConfigFile cf,
+ rhnConfigChannel cc,
+ rhnServerConfigChannel scc
+ where 1=1
+ and scc.server_id = server_id_in
+ and scc.config_channel_id = cc.id
+ and cc.id = cf.config_channel_id
+ and cf.id = cr.config_file_id
+ and cr.id = cf.latest_config_revision_id
+ and cf.config_file_name_id = cfn.id
+ and cf.id = lookup_first_matching_cf(scc.server_id, cfn.path);
+ locked integer;
+ begin
+ select rhn_snapshot_id_seq.nextval into snapshot_id from dual;
+
+ insert into rhnSnapshot (id, org_id, server_id, reason) (
+ select snapshot_id,
+ s.org_id,
+ server_id_in,
+ reason_in
+ from rhnServer s
+ where s.id = server_id_in
+ );
+ insert into rhnSnapshotChannel (snapshot_id, channel_id) (
+ select snapshot_id, sc.channel_id
+ from rhnServerChannel sc
+ where sc.server_id = server_id_in
+ );
+ insert into rhnSnapshotServerGroup (snapshot_id, server_group_id) (
+ select snapshot_id, sgm.server_group_id
+ from rhnServerGroupMembers sgm
+ where sgm.server_id = server_id_in
+ );
+ locked := 0;
+ while true loop
+ begin
+ insert into rhnPackageNEVRA (id, name_id, evr_id, package_arch_id)
+ select rhn_pkgnevra_id_seq.nextval, sp.name_id, sp.evr_id,
sp.package_arch_id
+ from rhnServerPackage sp
+ where sp.server_id = server_id_in
+ and not exists
+ (select 1
+ from rhnPackageNEVRA nevra
+ where nevra.name_id = sp.name_id
+ and nevra.evr_id = sp.evr_id
+ and (nevra.package_arch_id = sp.package_arch_id
+ or (nevra.package_arch_id is null
+ and sp.package_arch_id is null)));
+ exit;
+ exception when dup_val_on_index then
+ if locked = 1 then
+ raise;
+ else
+ lock table rhnPackageNEVRA in exclusive mode;
+ locked := 1;
+ end if;
+ end;
+ end loop;
+ insert into rhnSnapshotPackage (snapshot_id, nevra_id) (
+ select distinct snapshot_id, nevra.id
+ from rhnServerPackage sp, rhnPackageNEVRA nevra
+ where sp.server_id = server_id_in
+ and nevra.name_id = sp.name_id
+ and nevra.evr_id = sp.evr_id
+ and (nevra.package_arch_id = sp.package_arch_id
+ or (nevra.package_arch_id is null
+ and sp.package_arch_id is null))
+ );
+
+ insert into rhnSnapshotConfigChannel ( snapshot_id, config_channel_id ) (
+ select snapshot_id, scc.config_channel_id
+ from rhnServerConfigChannel scc
+ where server_id = server_id_in
+ );
+
+ for revision in revisions loop
+ insert into rhnSnapshotConfigRevision (
+ snapshot_id, config_revision_id
+ ) values (
+ snapshot_id, revision.id
+ );
+ end loop;
+ end snapshot_server;
+
+ procedure remove_action(
+ server_id_in in number,
+ action_id_in in number
+ ) is
+ -- this really wants "nulls last", but 8.1.7.3.0 sucks ass.
+ -- instead, we make a local table that holds our
+ -- list of ids with null prereqs. There's surely a better way
+ -- (an array instead of a table maybe? who knows...)
+ -- but I've got code to do this handy that I can look at ;)
+ cursor chained_actions is
+ select id, prerequisite
+ from rhnAction
+ start with id = action_id_in
+ connect by prior id = prerequisite
+ order by prerequisite desc;
+ cursor sessions is
+ select s.id
+ from rhnKickstartSession s
+ where server_id_in in (s.old_server_id, s.new_server_id)
+ and s.action_id = action_id_in
+ and not exists (
+ select 1
+ from rhnKickstartSessionState ss
+ where ss.id = s.state_id
+ and ss.label in ('failed','complete')
+ );
+ type chain_end_type is table of number index by binary_integer;
+ chain_ends chain_end_type;
+ i number;
+ prereq number := 1;
+ begin
+ select prerequisite
+ into prereq
+ from rhnAction
+ where id = action_id_in;
+
+ if prereq is not null then
+ rhn_exception.raise_exception('action_is_child');
+ end if;
+
+ i := 0;
+ for action in chained_actions loop
+ if action.prerequisite is null then
+ chain_ends(i) := action.id;
+ i := i + 1;
+ else
+ delete from rhnServerAction
+ where server_id = server_id_in
+ and action_id = action.id;
+ end if;
+ end loop;
+ i := chain_ends.first;
+ while i is not null loop
+ delete from rhnServerAction
+ where server_id = server_id_in
+ and action_id = chain_ends(i);
+ i := chain_ends.next(i);
+ end loop;
+ for s in sessions loop
+ update rhnKickstartSession
+ set state_id = (
+ select id
+ from rhnKickstartSessionState
+ where label = 'failed'
+ ),
+ action_id = null
+ where id = s.id;
+ set_ks_session_history_message(s.id, 'failed', 'Kickstart cancelled due to
action removal');
+ end loop;
+ end remove_action;
+
+ function check_user_access(server_id_in in number, user_id_in in number)
+ return number
+ is
+ has_access number;
+ begin
+ -- first check; if this returns no rows, then the server/user are in different orgs,
and we bail
+ select 1 into has_access
+ from rhnServer S,
+ web_contact wc
+ where wc.org_id = s.org_id
+ and s.id = server_id_in
+ and wc.id = user_id_in;
+
+ -- okay, so they're in the same org. if we have an org admin, they get a free pass
+ if rhn_user.check_role(user_id_in, 'org_admin') = 1
+ then
+ return 1;
+ end if;
+
+ select 1 into has_access
+ from rhnServerGroupMembers SGM,
+ rhnUserServerGroupPerms USG
+ where SGM.server_group_id = USG.server_group_id
+ and SGM.server_id = server_id_in
+ and USG.user_id = user_id_in
+ and rownum = 1;
+
+ return 1;
+ exception
+ when no_data_found
+ then
+ return 0;
+ end check_user_access;
+
+ -- *******************************************************************
+ -- FUNCTION: can_server_consume_virt_slot
+ -- Returns 1 if the server id is eligible to consume a virtual slot,
+ -- else returns 0.
+ -- Called by: insert_into_servergroup, delete_from_servergroup
+ -- *******************************************************************
+ function can_server_consume_virt_slot(server_id_in in number,
+ group_type_in in
+ rhnServerGroupType.label%TYPE)
+ return number
+ is
+
+ cursor server_virt_slots is
+ select vi.VIRTUAL_SYSTEM_ID
+ from
+ rhnVirtualInstance vi
+ where
+ -- server id is a virtual instance
+ vi.VIRTUAL_SYSTEM_ID = server_id_in
+ -- server id's host is virt entitled
+ and exists ( select 1
+ from rhnServerEntitlementView sev
+ where vi.HOST_SYSTEM_ID = sev.server_id
+ and sev.label in ('virtualization_host',
+ 'virtualization_host_platform') )
+ -- server id's host also has the ent we want
+ and exists ( select 1
+ from rhnServerEntitlementView sev2
+ where vi.HOST_SYSTEM_ID = sev2.server_id
+ and sev2.label = group_type_in );
+
+ begin
+ for server_virt_slot in server_virt_slots loop
+ return 1;
+ end loop;
+ return 0;
+ end can_server_consume_virt_slot;
+
+
+ procedure insert_into_servergroup (
+ server_id_in in number,
+ server_group_id_in in number
+ ) is
+ used_slots number;
+ max_slots number;
+ org_id number;
+ mgmt_available number;
+ mgmt_upgrade number;
+ mgmt_sgid number;
+ prov_available number;
+ prov_upgrade number;
+ prov_sgid number;
+ group_label rhnServerGroupType.label%TYPE;
+ group_type number;
+ begin
+ -- frist, group_type = null, because it's easy...
+
+ -- this will rowlock the servergroup we're trying to change;
+ -- we probably need to lock the other one, but I think the chances
+ -- of it being a real issue are very small for now...
+ select sg.group_type, sg.org_id, sg.current_members, sg.max_members
+ into group_type, org_id, used_slots, max_slots
+ from rhnServerGroup sg
+ where sg.id = server_group_id_in
+ for update of sg.current_members;
+
+ if group_type is null then
+ if used_slots >= max_slots then
+ rhn_exception.raise_exception('servergroup_max_members');
+ end if;
+
+ insert into rhnServerGroupMembers(
+ server_id, server_group_id
+ ) values (
+ server_id_in, server_group_id_in
+ );
+ update rhnServerGroup
+ set current_members = current_members + 1
+ where id = server_group_id_in;
+
+ rhn_cache.update_perms_for_server_group(server_group_id_in);
+ return;
+ end if;
+
+ -- now for group_type != null
+ --
+ select label
+ into group_label
+ from rhnServerGroupType sgt
+ where sgt.id = group_type;
+
+ -- the naive easy path that gets hit most often and has to be quickest.
+ if group_label in ('sw_mgr_entitled',
+ 'enterprise_entitled',
+ 'monitoring_entitled',
+ 'provisioning_entitled',
+ 'virtualization_host',
+ 'virtualization_host_platform') then
+ if used_slots >= max_slots and
+ (can_server_consume_virt_slot(server_id_in, group_label) != 1)
+ then
+ rhn_exception.raise_exception('servergroup_max_members');
+ end if;
+
+ insert into rhnServerGroupMembers(
+ server_id, server_group_id
+ ) values (
+ server_id_in, server_group_id_in
+ );
+
+ -- Only update current members if the system in consuming a
+ -- physical slot.
+ if can_server_consume_virt_slot(server_id_in, group_label) = 0 then
+ update rhnServerGroup
+ set current_members = current_members + 1
+ where id = server_group_id_in;
+ end if;
+
+ return;
+ end if;
+ end;
+
+ function insert_into_servergroup_maybe (
+ server_id_in in number,
+ server_group_id_in in number
+ ) return number is
+ retval number := 0;
+ cursor servergroups is
+ select s.id server_id,
+ sg.id server_group_id
+ from rhnServerGroup sg,
+ rhnServer s
+ where s.id = server_id_in
+ and sg.id = server_group_id_in
+ and s.org_id = sg.org_id
+ and not exists (
+ select 1
+ from rhnServerGroupMembers sgm
+ where sgm.server_id = s.id
+ and sgm.server_group_id = sg.id
+ );
+ begin
+ for sgm in servergroups loop
+ rhn_server.insert_into_servergroup(sgm.server_id, sgm.server_group_id);
+ retval := retval + 1;
+ end loop;
+ return retval;
+ end insert_into_servergroup_maybe;
+
+ procedure insert_set_into_servergroup (
+ server_group_id_in in number,
+ user_id_in in number,
+ set_label_in in varchar2
+ ) is
+ cursor servers is
+ select st.element id
+ from rhnSet st
+ where st.user_id = user_id_in
+ and st.label = set_label_in
+ and exists (
+ select 1
+ from rhnUserManagedServerGroups umsg
+ where umsg.server_group_id = server_group_id_in
+ and umsg.user_id = user_id_in
+ )
+ and not exists (
+ select 1
+ from rhnServerGroupMembers sgm
+ where sgm.server_id = st.element
+ and sgm.server_group_id = server_group_id_in
+ );
+ begin
+ for s in servers loop
+ rhn_server.insert_into_servergroup(s.id, server_group_id_in);
+ end loop;
+ end insert_set_into_servergroup;
+
+ procedure delete_from_servergroup (
+ server_id_in in number,
+ server_group_id_in in number
+ ) is
+ cursor server_virt_groups is
+ select 1
+ from rhnServerEntitlementVirtual sev
+ where sev.server_id = server_id_in
+ and sev.server_group_id = server_group_id_in;
+
+ oid number;
+ mgmt_sgid number;
+ label rhnServerGroupType.label%TYPE;
+ group_type number;
+ begin
+ begin
+ select sg.group_type, sg.org_id
+ into group_type, oid
+ from rhnServerGroupMembers sgm,
+ rhnServerGroup sg
+ where sg.id = server_group_id_in
+ and sg.id = sgm.server_group_id
+ and sgm.server_id = server_id_in
+ for update of sg.current_members;
+ exception
+ when no_data_found then
+ rhn_exception.raise_exception('server_not_in_group');
+ end;
+
+ -- do group_type is null first
+ if group_type is null then
+ delete from rhnServerGroupMembers
+ where server_group_id = server_group_id_in
+ and server_id = server_id_in;
+ update rhnServerGroup
+ set current_members = current_members - 1
+ where id = server_group_id_in;
+ rhn_cache.update_perms_for_server_group(server_group_id_in);
+ return;
+ end if;
+
+ select sgt.label
+ into label
+ from rhnServerGroupType sgt
+ where sgt.id = group_type;
+
+ if label in ('sw_mgr_entitled',
+ 'enterprise_entitled',
+ 'provisioning_entitled',
+ 'monitoring_entitled',
+ 'virtualization_host',
+ 'virtualization_host_platform') then
+
+ -- Only update current members if the system is consuming
+ -- a physical slot.
+ for server_virt_group in server_virt_groups loop
+ delete from rhnServerGroupMembers
+ where server_group_id = server_group_id_in
+ and server_id = server_id_in;
+ return;
+ end loop;
+
+ delete from rhnServerGroupMembers
+ where server_group_id = server_group_id_in
+ and server_id = server_id_in;
+
+ update rhnServerGroup
+ set current_members = current_members - 1
+ where id = server_group_id_in;
+
+ end if;
+ end;
+
+ procedure delete_set_from_servergroup (
+ server_group_id_in in number,
+ user_id_in in number,
+ set_label_in in varchar2
+ ) is
+ cursor servergroups is
+ select sgm.server_id, sgm.server_group_id
+ from rhnSet st,
+ rhnServerGroupMembers sgm
+ where sgm.server_group_id = server_group_id_in
+ and st.user_id = user_id_in
+ and st.label = set_label_in
+ and sgm.server_id = st.element
+ and exists (
+ select 1
+ from rhnUserManagedServerGroups usgp
+ where usgp.server_group_id = server_group_id_in
+ and usgp.user_id = user_id_in
+ );
+ begin
+ for sgm in servergroups loop
+ rhn_server.delete_from_servergroup(sgm.server_id, server_group_id_in);
+ end loop;
+ end delete_set_from_servergroup;
+
+ procedure clear_servergroup (
+ server_group_id_in in number
+ ) is
+ cursor servers is
+ select sgm.server_id id
+ from rhnServerGroupMembers sgm
+ where sgm.server_group_id = server_group_id_in;
+ begin
+ for s in servers loop
+ rhn_server.delete_from_servergroup(s.id, server_group_id_in);
+ end loop;
+ end clear_servergroup;
+
+ procedure delete_from_org_servergroups (
+ server_id_in in number
+ ) is
+ cursor servergroups is
+ select sgm.server_group_id id
+ from rhnServerGroup sg,
+ rhnServerGroupMembers sgm
+ where sgm.server_id = server_id_in
+ and sgm.server_group_id = sg.id
+ and sg.group_type is null;
+ begin
+ for sg in servergroups loop
+ rhn_server.delete_from_servergroup(server_id_in, sg.id);
+ end loop;
+ end delete_from_org_servergroups;
+
+ function get_ip_address (
+ server_id_in in number
+ ) return varchar2 is
+ cursor interfaces is
+ select name, ip_addr
+ from rhnServerNetInterface
+ where server_id = server_id_in
+ and ip_addr != '127.0.0.1';
+ cursor addresses is
+ select ipaddr ip_addr
+ from rhnServerNetwork
+ where server_id = server_id_in
+ and ipaddr != '127.0.0.1';
+ begin
+ for addr in addresses loop
+ return addr.ip_addr;
+ end loop;
+ for iface in interfaces loop
+ return iface.ip_addr;
+ end loop;
+ return NULL;
+ end get_ip_address;
+end rhn_server;
+/
+SHOW ERRORS
diff --git
a/schema/spacewalk/upgrade/spacewalk-schema-0.6-to-spacewalk-schema-0.7/162-rhn_channel.pkb.sql
b/schema/spacewalk/upgrade/spacewalk-schema-0.6-to-spacewalk-schema-0.7/162-rhn_channel.pkb.sql
new file mode 100644
index 0000000..028a8e9
--- /dev/null
+++
b/schema/spacewalk/upgrade/spacewalk-schema-0.6-to-spacewalk-schema-0.7/162-rhn_channel.pkb.sql
@@ -0,0 +1,1229 @@
+--
+-- Copyright (c) 2008 Red Hat, Inc.
+--
+-- This software is licensed to you under the GNU General Public License,
+-- version 2 (GPLv2). There is NO WARRANTY for this software, express or
+-- implied, including the implied warranties of MERCHANTABILITY or FITNESS
+-- FOR A PARTICULAR PURPOSE. You should have received a copy of GPLv2
+-- along with this software; if not, see
+--
http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
+--
+-- Red Hat trademarks are not licensed under GPLv2. No permission is
+-- granted to use or replicate Red Hat trademarks that are incorporated
+-- in this software or its documentation.
+--
+--
+--
+--
+
+CREATE OR REPLACE
+PACKAGE BODY rhn_channel
+IS
+ body_version varchar2(100) := '';
+
+ -- Cursor that fetches all the possible base channels for a
+ -- (server_arch_id, release, org_id) combination
+ cursor base_channel_cursor(
+ release_in in varchar2,
+ server_arch_id_in in number,
+ org_id_in in number
+ ) return rhnChannel%ROWTYPE is
+ select distinct c.*
+ from rhnDistChannelMap dcm,
+ rhnServerChannelArchCompat scac,
+ rhnChannel c,
+ rhnChannelPermissions cp
+ where cp.org_id = org_id_in
+ and cp.channel_id = c.id
+ and c.parent_channel is null
+ and c.id = dcm.channel_id
+ and c.channel_arch_id = dcm.channel_arch_id
+ and dcm.release = release_in
+ and scac.server_arch_id = server_arch_id_in
+ and scac.channel_arch_id = c.channel_arch_id;
+
+ FUNCTION get_license_path(channel_id_in IN NUMBER)
+ RETURN VARCHAR2
+ IS
+ license_val VARCHAR2(1000);
+ BEGIN
+ SELECT CFL.license_path INTO license_val
+ FROM rhnChannelFamilyLicense CFL, rhnChannelFamilyMembers CFM
+ WHERE CFM.channel_id = channel_id_in
+ AND CFM.channel_family_id = CFL.channel_family_id;
+
+ RETURN license_val;
+
+ EXCEPTION
+ WHEN NO_DATA_FOUND
+ THEN
+ RETURN NULL;
+ END get_license_path;
+
+
+ PROCEDURE license_consent(channel_id_in IN NUMBER, user_id_in IN NUMBER, server_id_in
IN NUMBER)
+ IS
+ channel_family_id_val NUMBER;
+ BEGIN
+ channel_family_id_val := rhn_channel.family_for_channel(channel_id_in);
+ IF channel_family_id_val IS NULL
+ THEN
+ rhn_exception.raise_exception('channel_subscribe_no_family');
+ END IF;
+
+ IF rhn_channel.get_license_path(channel_id_in) IS NULL
+ THEN
+ rhn_exception.raise_exception('channel_consent_no_license');
+ END IF;
+
+ INSERT INTO rhnChannelFamilyLicenseConsent (channel_family_id, user_id,
server_id)
+ VALUES (channel_family_id_val, user_id_in, server_id_in);
+ END license_consent;
+
+ PROCEDURE subscribe_server(server_id_in IN NUMBER, channel_id_in NUMBER, immediate_in
NUMBER := 1, user_id_in in number := null, recalcfamily_in NUMBER := 1)
+ IS
+ channel_parent_val rhnChannel.parent_channel%TYPE;
+ parent_subscribed BOOLEAN;
+ server_has_base_chan BOOLEAN;
+ server_already_in_chan BOOLEAN;
+ channel_family_id_val NUMBER;
+ server_org_id_val NUMBER;
+ available_subscriptions NUMBER;
+ consenting_user NUMBER;
+ allowed number := 0;
+ current_members_val number;
+ BEGIN
+ if user_id_in is not null then
+ allowed := rhn_channel.user_role_check(channel_id_in, user_id_in,
'subscribe');
+ else
+ allowed := 1;
+ end if;
+
+ if allowed = 0 then
+ rhn_exception.raise_exception('no_subscribe_permissions');
+ end if;
+
+
+ SELECT parent_channel INTO channel_parent_val FROM rhnChannel WHERE id =
channel_id_in;
+
+ IF channel_parent_val IS NOT NULL
+ THEN
+ -- child channel; if attempting to cross-subscribe a child to the wrong base,
silently ignore
+ parent_subscribed := FALSE;
+
+ FOR check_subscription IN check_server_subscription(server_id_in,
channel_parent_val)
+ LOOP
+ parent_subscribed := TRUE;
+ END LOOP check_subscription;
+
+ IF NOT parent_subscribed
+ THEN
+ RETURN;
+ END IF;
+ ELSE
+ -- base channel
+ server_has_base_chan := FALSE;
+ FOR base IN server_base_subscriptions(server_id_in)
+ LOOP
+ server_has_base_chan := TRUE;
+ END LOOP base;
+
+ IF server_has_base_chan
+ THEN
+ rhn_exception.raise_exception('channel_server_one_base');
+ END IF;
+ END IF;
+
+ FOR check_subscription IN check_server_subscription(server_id_in, channel_id_in)
+ LOOP
+ server_already_in_chan := TRUE;
+ END LOOP check_subscription;
+
+ IF server_already_in_chan
+ THEN
+ RETURN;
+ END IF;
+
+ channel_family_id_val := rhn_channel.family_for_channel(channel_id_in);
+ IF channel_family_id_val IS NULL
+ THEN
+ rhn_exception.raise_exception('channel_subscribe_no_family');
+ END IF;
+
+ --
+ -- Use the org_id of the server only if the org_id of the channel = NULL.
+ -- This is required for subscribing to shared channels.
+ --
+ SELECT NVL(org_id, (SELECT org_id FROM rhnServer WHERE id = server_id_in))
+ INTO server_org_id_val
+ FROM rhnChannel
+ WHERE id = channel_id_in;
+
+ select current_members
+ into current_members_val
+ from rhnPrivateChannelFamily
+ where org_id = server_org_id_val and channel_family_id = channel_family_id_val
+ for update of current_members;
+
+ available_subscriptions :=
rhn_channel.available_family_subscriptions(channel_family_id_val, server_org_id_val);
+
+ IF available_subscriptions IS NULL OR
+ available_subscriptions > 0 or
+ can_server_consume_virt_channl(server_id_in, channel_family_id_val) = 1
+ THEN
+
+ IF rhn_channel.get_license_path(channel_id_in) IS NOT NULL
+ THEN
+ BEGIN
+
+ SELECT user_id INTO consenting_user
+ FROM rhnChannelFamilyLicenseConsent
+ WHERE channel_family_id = channel_family_id_val
+ AND server_id = server_id_in;
+
+ EXCEPTION
+ WHEN NO_DATA_FOUND THEN
+
rhn_exception.raise_exception('channel_subscribe_no_consent');
+ END;
+ END IF;
+
+ insert into rhnServerHistory (id,server_id,summary,details) (
+ select rhn_event_id_seq.nextval,
+ server_id_in,
+ 'subscribed to channel ' || SUBSTR(c.label, 0, 106),
+ c.label
+ from rhnChannel c
+ where c.id = channel_id_in
+ );
+ UPDATE rhnServer SET channels_changed = sysdate WHERE id = server_id_in;
+ INSERT INTO rhnServerChannel (server_id, channel_id) VALUES (server_id_in,
channel_id_in);
+ IF recalcfamily_in > 0
+ THEN
+ rhn_channel.update_family_counts(channel_family_id_val,
server_org_id_val);
+ END IF;
+ queue_server(server_id_in, immediate_in);
+ ELSE
+ rhn_exception.raise_exception('channel_family_no_subscriptions');
+ END IF;
+
+ END subscribe_server;
+
+ function can_server_consume_virt_channl(
+ server_id_in in number,
+ family_id_in in number )
+ return number
+ is
+
+ cursor server_virt_families is
+ select vi.virtual_system_id, cfvsl.channel_family_id
+ from
+ rhnChannelFamilyVirtSubLevel cfvsl,
+ rhnSGTypeVirtSubLevel sgtvsl,
+ rhnVirtualInstance vi
+ where
+ vi.virtual_system_id = server_id_in
+ and sgtvsl.virt_sub_level_id = cfvsl.virt_sub_level_id
+ and cfvsl.channel_family_id = family_id_in
+ and exists (
+ select 1
+ from rhnServerEntitlementView sev
+ where vi.host_system_id = sev.server_id
+ and sev.server_group_type_id = sgtvsl.server_group_type_id );
+ begin
+
+ for server_virt_family in server_virt_families loop
+ return 1;
+ end loop;
+
+ return 0;
+
+ end;
+
+
+ PROCEDURE bulk_subscribe_server(channel_id_in IN NUMBER, set_label_in IN VARCHAR2,
set_uid_in IN NUMBER)
+ IS
+ BEGIN
+ FOR server IN rhn_set.set_iterator(set_label_in, set_uid_in)
+ LOOP
+ rhn_channel.subscribe_server(server.element, channel_id_in, 0, set_uid_in);
+ END LOOP server;
+ END bulk_subscribe_server;
+
+ PROCEDURE bulk_server_base_change(channel_id_in IN NUMBER, set_label_in IN VARCHAR2,
set_uid_in IN NUMBER)
+ IS
+ BEGIN
+ FOR server IN rhn_set.set_iterator(set_label_in, set_uid_in)
+ LOOP
+ IF rhn_server.can_change_base_channel(server.element) = 1
+ THEN
+ rhn_channel.clear_subscriptions(TO_NUMBER(server.element));
+ rhn_channel.subscribe_server(server.element, channel_id_in, 0,
set_uid_in);
+ END IF;
+ END LOOP server;
+ END bulk_server_base_change;
+
+ procedure bulk_server_basechange_from(
+ set_label_in in varchar2,
+ set_uid_in in number,
+ old_channel_id_in in number,
+ new_channel_id_in in number
+ ) is
+ cursor servers is
+ select sc.server_id id
+ from rhnChannel nc,
+ rhnServerChannelArchCompat scac,
+ rhnServer s,
+ rhnChannel oc,
+ rhnServerChannel sc,
+ rhnSet st
+ where 1=1
+ -- first, find the servers we're looking for.
+ and st.label = set_label_in
+ and st.user_id = set_uid_in
+ and st.element = sc.server_id
+ -- now, filter out anything that's not in the
+ -- old base channel.
+ and sc.channel_id = old_channel_id_in
+ and sc.channel_id = oc.id
+ and oc.parent_channel is null
+ -- now, see if it's compatible with the new base channel
+ and nc.id = new_channel_id_in
+ and nc.parent_channel is null
+ and sc.server_id = s.id
+ and s.server_arch_id = scac.server_arch_id
+ and scac.channel_arch_id = nc.channel_arch_id;
+ begin
+ for s in servers loop
+ insert into rhnSet (
+ user_id, label, element
+ ) values (
+ set_uid_in,
+ set_label_in || 'basechange',
+ s.id
+ );
+ end loop channel;
+ bulk_server_base_change(new_channel_id_in,
+ set_label_in || 'basechange',
+ set_uid_in);
+ delete from rhnSet
+ where label = set_label_in||'basechange'
+ and user_id = set_uid_in;
+ end bulk_server_basechange_from;
+
+ procedure bulk_guess_server_base(
+ set_label_in in varchar2,
+ set_uid_in in number
+ ) is
+ channel_id number;
+ begin
+ for server in rhn_set.set_iterator(set_label_in, set_uid_in)
+ loop
+ -- anything that doesn't work, we just ignore
+ begin
+ if rhn_server.can_change_base_channel(server.element) = 1
+ then
+ channel_id := guess_server_base(TO_NUMBER(server.element));
+ rhn_channel.clear_subscriptions(TO_NUMBER(server.element));
+ rhn_channel.subscribe_server(TO_NUMBER(server.element), channel_id,
0, set_uid_in);
+ end if;
+ exception when others then
+ null;
+ end;
+ end loop server;
+ end;
+
+ function guess_server_base(
+ server_id_in in number
+ ) RETURN number is
+ cursor server_cursor is
+ select s.server_arch_id, s.release, s.org_id
+ from rhnServer s
+ where s.id = server_id_in;
+ begin
+ for s in server_cursor loop
+ for channel in base_channel_cursor(s.release,
+ s.server_arch_id, s.org_id)
+ loop
+ return channel.id;
+ end loop base_channel_cursor;
+ end loop server_cursor;
+ -- Server not found, or no base channel applies to it
+ return null;
+ end;
+
+ -- Private function
+ function normalize_server_arch(server_arch_in in varchar2)
+ return varchar2
+ deterministic
+ is
+ suffix VARCHAR2(128) := '-redhat-linux';
+ suffix_len NUMBER := length(suffix);
+ begin
+ if server_arch_in is NULL then
+ return NULL;
+ end if;
+ if instr(server_arch_in, '-') > 0
+ then
+ -- Suffix already present
+ return server_arch_in;
+ end if;
+ return server_arch_in || suffix;
+ end normalize_server_arch;
+
+ --
+ --
+ -- Raises:
+ -- server_arch_not_found
+ -- no_subscribe_permissions
+ function base_channel_for_release_arch(
+ release_in in varchar2,
+ server_arch_in in varchar2,
+ org_id_in in number := -1,
+ user_id_in in number := null
+ ) return number is
+ server_arch varchar2(256) := normalize_server_arch(server_arch_in);
+ server_arch_id number;
+ begin
+ -- Look up the server arch
+ begin
+ select id
+ into server_arch_id
+ from rhnServerArch
+ where label = server_arch;
+ exception
+ when no_data_found then
+ rhn_exception.raise_exception('server_arch_not_found');
+ end;
+ return base_channel_rel_archid(release_in, server_arch_id,
+ org_id_in, user_id_in);
+ end base_channel_for_release_arch;
+
+ function base_channel_rel_archid(
+ release_in in varchar2,
+ server_arch_id_in in number,
+ org_id_in in number := -1,
+ user_id_in in number := null
+ ) return number is
+ denied_channel_id number := null;
+ valid_org_id number := org_id_in;
+ valid_user_id number := user_id_in;
+ channel_subscribable number;
+ begin
+ if org_id_in = -1 and user_id_in is not null then
+ -- Get the org id from the user id
+ begin
+ select org_id
+ into valid_org_id
+ from web_contact
+ where id = user_id_in;
+ exception
+ when no_data_found then
+ -- User doesn't exist
+ -- XXX Only list public stuff for now
+ valid_user_id := null;
+ valid_org_id := -1;
+ end;
+ end if;
+
+ for c in base_channel_cursor(release_in, server_arch_id_in, valid_org_id)
+ loop
+ -- This row is a possible match
+ if valid_user_id is null then
+ -- User ID not specified, so no user to channel permissions to
+ -- check
+ return c.id;
+ end if;
+
+ -- Check user to channel permissions
+ select loose_user_role_check(c.id, user_id_in, 'subscribe')
+ into channel_subscribable
+ from dual;
+
+ if channel_subscribable = 1 then
+ return c.id;
+ end if;
+
+ -- Base channel exists, but is not subscribable; keep trying
+ denied_channel_id := c.id;
+ end loop base_channel_fetch;
+
+ if denied_channel_id is not null then
+ rhn_exception.raise_exception('no_subscribe_permissions');
+ end if;
+ -- No base channel applies
+ return NULL;
+ end base_channel_rel_archid;
+
+ procedure bulk_guess_server_base_from(
+ set_label_in in varchar2,
+ set_uid_in in number,
+ channel_id_in in number
+ ) is
+ cursor channels(server_id_in in number) is
+ select rsc.channel_id
+ from rhnServerChannel rsc,
+ rhnChannel rc
+ where server_id_in = rsc.server_id
+ and rsc.channel_id = rc.id
+ and rc.parent_channel is null;
+ begin
+ for server in rhn_set.set_iterator(set_label_in, set_uid_in)
+ loop
+ for channel in channels(server.element)
+ loop
+ if channel.channel_id = channel_id_in
+ then
+ insert into rhnSet (user_id, label, element) values (set_uid_in,
set_label_in || 'baseguess', server.element);
+ end if;
+ end loop channel;
+ end loop server;
+ bulk_guess_server_base(set_label_in||'baseguess',set_uid_in);
+ delete from rhnSet where label = set_label_in||'baseguess' and user_id =
set_uid_in;
+ end;
+
+
+ PROCEDURE clear_subscriptions(server_id_in IN NUMBER, deleting_server IN NUMBER := 0
)
+ IS
+ cursor server_channels(server_id_in in number) is
+ select s.org_id, sc.channel_id, cfm.channel_family_id
+ from rhnServer s,
+ rhnServerChannel sc,
+ rhnChannelFamilyMembers cfm
+ where s.id = server_id_in
+ and s.id = sc.server_id
+ and sc.channel_id = cfm.channel_id;
+ BEGIN
+ for channel in server_channels(server_id_in)
+ loop
+ unsubscribe_server(server_id_in, channel.channel_id, 1, 1,
deleting_server);
+ rhn_channel.update_family_counts(channel.channel_family_id,
channel.org_id);
+ end loop channel;
+ END clear_subscriptions;
+
+ PROCEDURE unsubscribe_server(server_id_in IN NUMBER, channel_id_in NUMBER,
immediate_in NUMBER := 1, unsubscribe_children_in number := 0,
+ deleting_server IN NUMBER := 0 )
+ IS
+ channel_family_id_val NUMBER;
+ server_org_id_val NUMBER;
+ available_subscriptions NUMBER;
+ server_already_in_chan BOOLEAN;
+ cursor channel_family_is_proxy(channel_family_id_in in number) is
+ select 1
+ from rhnChannelFamily
+ where id = channel_family_id_in
+ and label = 'rhn-proxy';
+ cursor channel_family_is_satellite(channel_family_id_in in number) is
+ select 1
+ from rhnChannelFamily
+ where id = channel_family_id_in
+ and label = 'rhn-satellite';
+ -- this is *EXACTLY* like check_server_parent_membership, but if we recurse
+ -- with the package-level one, we get a "cursor already open", so we
need a
+ -- copy on our call stack instead. GROAN.
+ cursor local_chk_server_parent_memb (
+ server_id_in number,
+ channel_id_in number ) is
+ select c.id
+ from rhnChannel c,
+ rhnServerChannel sc
+ where 1=1
+ and c.parent_channel = channel_id_in
+ and c.id = sc.channel_id
+ and sc.server_id = server_id_in;
+ BEGIN
+ FOR child IN local_chk_server_parent_memb(server_id_in, channel_id_in)
+ LOOP
+ if unsubscribe_children_in = 1 then
+ unsubscribe_server(server_id_in => server_id_in,
+ channel_id_in =>
child.id,
+ immediate_in =>
immediate_in,
+ unsubscribe_children_in
=> unsubscribe_children_in,
+ deleting_server => deleting_server);
+ else
+
rhn_exception.raise_exception('channel_unsubscribe_child_exists');
+ end if;
+ END LOOP child;
+
+ server_already_in_chan := FALSE;
+
+ FOR check_subscription IN check_server_subscription(server_id_in, channel_id_in)
+ LOOP
+ server_already_in_chan := TRUE;
+ END LOOP check_subscription;
+
+ IF NOT server_already_in_chan
+ THEN
+ RETURN;
+ END IF;
+
+ if deleting_server = 0 then
+
+ insert into rhnServerHistory (id,server_id,summary,details) (
+ select rhn_event_id_seq.nextval,
+ server_id_in,
+ 'unsubscribed from channel ' || SUBSTR(c.label, 0, 106),
+ c.label
+ from rhnChannel c
+ where c.id = channel_id_in
+ );
+
+ UPDATE rhnServer SET channels_changed = sysdate WHERE id = server_id_in;
+ end if;
+
+ DELETE FROM rhnServerChannel WHERE server_id = server_id_in AND channel_id =
channel_id_in;
+
+ if deleting_server = 0 then
+ queue_server(server_id_in, immediate_in);
+ end if;
+
+ channel_family_id_val := rhn_channel.family_for_channel(channel_id_in);
+ IF channel_family_id_val IS NULL
+ THEN
+ rhn_exception.raise_exception('channel_unsubscribe_no_family');
+ END IF;
+
+ for ignore in channel_family_is_satellite(channel_family_id_val) loop
+ delete from rhnSatelliteInfo where server_id = server_id_in;
+ delete from rhnSatelliteChannelFamily where server_id = server_id_in;
+ end loop;
+
+ for ignore in channel_family_is_proxy(channel_family_id_val) loop
+ delete from rhnProxyInfo where server_id = server_id_in;
+ end loop;
+
+ DELETE FROM rhnChannelFamilyLicenseConsent
+ WHERE channel_family_id = channel_family_id_val
+ AND server_id = server_id_in;
+
+ SELECT org_id INTO server_org_id_val
+ FROM rhnServer
+ WHERE id = server_id_in;
+
+ rhn_channel.update_family_counts(channel_family_id_val, server_org_id_val);
+ END unsubscribe_server;
+
+ PROCEDURE bulk_unsubscribe_server(channel_id_in IN NUMBER, set_label_in IN VARCHAR2,
set_uid_in IN NUMBER)
+ IS
+ BEGIN
+ FOR server IN rhn_set.set_iterator(set_label_in, set_uid_in)
+ LOOP
+ rhn_channel.unsubscribe_server(server.element, channel_id_in, 0);
+ END LOOP server;
+ END bulk_unsubscribe_server;
+
+ FUNCTION family_for_channel(channel_id_in IN NUMBER)
+ RETURN NUMBER
+ IS
+ channel_family_id_val NUMBER;
+ BEGIN
+ SELECT channel_family_id INTO channel_family_id_val
+ FROM rhnChannelFamilyMembers
+ WHERE channel_id = channel_id_in;
+
+ RETURN channel_family_id_val;
+ EXCEPTION
+ WHEN NO_DATA_FOUND
+ THEN
+ RETURN NULL;
+ END family_for_channel;
+
+ FUNCTION available_family_subscriptions(channel_family_id_in IN NUMBER, org_id_in IN
NUMBER)
+ RETURN NUMBER
+ IS
+ cfp channel_family_perm_cursor%ROWTYPE;
+ current_members_val NUMBER;
+ max_members_val NUMBER;
+ found NUMBER;
+ BEGIN
+ IF NOT channel_family_perm_cursor%ISOPEN
+ THEN
+ OPEN channel_family_perm_cursor(channel_family_id_in, org_id_in);
+ END IF;
+
+ FETCH channel_family_perm_cursor INTO cfp;
+
+ WHILE channel_family_perm_cursor%FOUND
+ LOOP
+ found := 1;
+
+ current_members_val := cfp.current_members;
+ max_members_val := cfp.max_members;
+
+ FETCH channel_family_perm_cursor INTO cfp;
+ END LOOP;
+
+ IF channel_family_perm_cursor%ISOPEN
+ THEN
+ CLOSE channel_family_perm_cursor;
+ END IF;
+
+ -- not found: either the channel fam doesn't have an entry in cfp, or the org
doesn't have access to it.
+ -- either way, there are no available subscriptions
+
+ IF found IS NULL
+ THEN
+ RETURN 0;
+ END IF;
+
+ -- null max members? in that case, pass it on; NULL means infinite
+ IF max_members_val IS NULL
+ THEN
+ RETURN NULL;
+ END IF;
+
+ -- otherwise, return the delta
+ RETURN max_members_val - current_members_val;
+ END available_family_subscriptions;
+
+ -- *******************************************************************
+ -- FUNCTION: channel_family_current_members
+ -- Calculates and returns the actual count of systems consuming
+ -- physical channel subscriptions.
+ -- Called by: update_family_counts
+ -- rhn_entitlements.repoll_virt_guest_entitlements
+ -- *******************************************************************
+ function channel_family_current_members(channel_family_id_in IN NUMBER,
+ org_id_in IN NUMBER)
+ return number
+ is
+ current_members_count number := 0;
+ begin
+ select count(distinct server_id)
+ into current_members_count
+ from rhnChannelFamilyServerPhysical cfsp
+ where cfsp.channel_family_id = channel_family_id_in
+ and cfsp.customer_id = org_id_in;
+ return current_members_count;
+ end;
+
+ PROCEDURE update_family_counts(channel_family_id_in IN NUMBER,
+ org_id_in IN NUMBER)
+ IS
+ BEGIN
+ update rhnPrivateChannelFamily
+ set current_members = (
+ channel_family_current_members(channel_family_id_in, org_id_in)
+ )
+ where org_id = org_id_in
+ and channel_family_id = channel_family_id_in;
+
+ END update_family_counts;
+
+ FUNCTION available_chan_subscriptions(channel_id_in IN NUMBER,
+ org_id_in IN NUMBER)
+ RETURN NUMBER
+ IS
+ channel_family_id_val NUMBER;
+ BEGIN
+ SELECT channel_family_id INTO channel_family_id_val
+ FROM rhnChannelFamilyMembers
+ WHERE channel_id = channel_id_in;
+
+ RETURN rhn_channel.available_family_subscriptions(
+ channel_family_id_val, org_id_in);
+ END available_chan_subscriptions;
+
+ -- *******************************************************************
+ -- PROCEDURE: entitle_customer
+ -- Creates a chan fam bucket, or sets max_members for an existing bucket
+ -- Called by: rhn_ep.poll_customer_internal
+ -- Calls: set_family_maxmembers + update_family_counts if the row
+ -- already exists, else it creates it in rhnPrivateChannelFamily.
+ -- *******************************************************************
+ procedure entitle_customer(customer_id_in in number,
+ channel_family_id_in in number,
+ quantity_in in number)
+ is
+ cursor permissions is
+ select 1
+ from rhnPrivateChannelFamily pcf
+ where pcf.org_id = customer_id_in
+ and pcf.channel_family_id = channel_family_id_in;
+ begin
+ for perm in permissions loop
+ set_family_maxmembers(
+ customer_id_in,
+ channel_family_id_in,
+ quantity_in
+ );
+ rhn_channel.update_family_counts(
+ channel_family_id_in,
+ customer_id_in
+ );
+ return;
+ end loop;
+
+ insert into rhnPrivateChannelFamily pcf (
+ channel_family_id, org_id, max_members, current_members
+ ) values (
+ channel_family_id_in, customer_id_in, quantity_in, 0
+ );
+ end;
+
+ -- *******************************************************************
+ -- PROCEDURE: set_family_maxmembers
+ -- Prunes an existing channel family bucket by unsubscribing the
+ -- necessary servers and sets max_members.
+ -- Called by: rhn_channel.entitle_customer
+ -- Calls: unsubscribe_server_from_family
+ -- *******************************************************************
+ procedure set_family_maxmembers(customer_id_in in number,
+ channel_family_id_in in number,
+ quantity_in in number)
+ is
+ cursor servers is
+ select server_id from (
+ select rownum row_number, server_id, modified from (
+ select rcfsp.server_id,
+ rcfsp.modified
+ from rhnChannelFamilyServerPhysical rcfsp
+ where rcfsp.customer_id = customer_id_in
+ and rcfsp.channel_family_id = channel_family_id_in
+ order by modified
+ )
+ where rownum > quantity_in
+ );
+ begin
+ -- prune subscribed servers
+ for server in servers loop
+ rhn_channel.unsubscribe_server_from_family(server.server_id,
+ channel_family_id_in);
+ end loop;
+
+ update rhnPrivateChannelFamily pcf
+ set pcf.max_members = quantity_in
+ where pcf.org_id = customer_id_in
+ and pcf.channel_family_id = channel_family_id_in;
+ end;
+
+ procedure unsubscribe_server_from_family(server_id_in in number,
+ channel_family_id_in in number)
+ is
+ begin
+ delete
+ from rhnServerChannel rsc
+ where rsc.server_id = server_id_in
+ and channel_id in (
+ select rcfm.channel_id
+ from rhnChannelFamilyMembers rcfm
+ where rcfm.channel_family_id = channel_family_id_in);
+ end;
+
+ function get_org_id(channel_id_in in number)
+ return number
+ is
+ org_id_out number;
+ begin
+ select org_id into org_id_out
+ from rhnChannel
+ where id = channel_id_in;
+
+ return org_id_out;
+ end get_org_id;
+
+ function get_cfam_org_access(cfam_id_in in number, org_id_in in number)
+ return number
+ is
+ cursor families is
+ select 1
+ from rhnOrgChannelFamilyPermissions cfp
+ where cfp.org_id = org_id_in;
+ begin
+ -- the idea: if we get past this query,
+ -- the user has the role, else catch the exception and return 0
+ for family in families loop
+ return 1;
+ end loop;
+ return 0;
+ end;
+
+ function get_org_access(channel_id_in in number, org_id_in in number)
+ return number
+ is
+ throwaway number;
+ begin
+ -- the idea: if we get past this query,
+ -- the org has access to the channel, else catch the exception and return 0
+ select distinct 1 into throwaway
+ from rhnChannelFamilyMembers CFM,
+ rhnOrgChannelFamilyPermissions CFP
+ where cfp.org_id = org_id_in
+ and CFM.channel_family_id = CFP.channel_family_id
+ and CFM.channel_id = channel_id_in
+ and (CFP.max_members > 0 or CFP.max_members is null or CFP.org_id = 1);
+
+ return 1;
+ exception
+ when no_data_found
+ then
+ return 0;
+ end;
+
+ -- check if a user has a given role, or if such a role is inferrable
+ function user_role_check_debug(channel_id_in in number,
+ user_id_in in number,
+ role_in in varchar2,
+ reason_out out varchar2)
+ return number
+ is
+ org_id number;
+ begin
+ org_id := rhn_user.get_org_id(user_id_in);
+
+ -- channel might be shared
+ if role_in = 'subscribe' and
+ rhn_channel.shared_user_role_check(channel_id_in, user_id_in, role_in) = 1
then
+ return 1;
+ end if;
+
+ if role_in = 'manage' and
+ NVL(rhn_channel.get_org_id(channel_id_in), -1) <> org_id then
+ reason_out := 'channel_not_owned';
+ return 0;
+ end if;
+
+ if role_in = 'subscribe' and
+ rhn_channel.get_org_access(channel_id_in, org_id) = 0 then
+ reason_out := 'channel_not_available';
+ return 0;
+ end if;
+
+ -- channel admins have all roles
+ if rhn_user.check_role_implied(user_id_in, 'channel_admin') = 1 then
+ reason_out := 'channel_admin';
+ return 1;
+ end if;
+
+ -- the subscribe permission is inferred
+ -- UNLESS the not_globally_subscribable flag is set
+ if role_in = 'subscribe'
+ then
+ if rhn_channel.org_channel_setting(channel_id_in,
+ org_id,
+ 'not_globally_subscribable') = 0 then
+ reason_out := 'globally_subscribable';
+ return 1;
+ end if;
+ end if;
+
+ -- all other roles (manage right now) are explicitly granted
+ reason_out := 'direct_permission';
+ return rhn_channel.direct_user_role_check(channel_id_in,
+ user_id_in, role_in);
+ end;
+
+ -- same as above, but with no OUT param; useful in views, etc
+ function user_role_check(channel_id_in in number, user_id_in in number, role_in in
varchar2)
+ return number
+ is
+ throwaway varchar2(256);
+ begin
+ return rhn_channel.user_role_check_debug(channel_id_in, user_id_in, role_in,
throwaway);
+ end;
+
+ --
+ -- For multiorg phase II, this function simply checks to see if the user's
+ -- has a trust relationship that includes this channel by id.
+ --
+ function shared_user_role_check(channel_id in number, user_id in number, role in
varchar2)
+ return number
+ is
+ n number;
+ oid number;
+ begin
+ oid := rhn_user.get_org_id(user_id);
+ select 1 into n
+ from rhnSharedChannelView s
+ where s.id = channel_id and s.org_trust_id = oid;
+ return 1;
+ exception
+ when no_data_found then
+ return 0;
+ end;
+
+ -- same as above, but returns 1 if user_id_in is null
+ -- This is useful in queries where user_id is not specified
+ function loose_user_role_check(channel_id_in in number, user_id_in in number, role_in
in varchar2)
+ return number
+ is
+ begin
+ if user_id_in is null then
+ return 1;
+ end if;
+ return user_role_check(channel_id_in, user_id_in, role_in);
+ end loose_user_role_check;
+
+ -- directly checks the table, no inferred permissions
+ function direct_user_role_check(channel_id_in in number, user_id_in in number,
role_in in varchar2)
+ return number
+ is
+ throwaway number;
+ begin
+ -- the idea: if we get past this query, the user has the role, else catch the
exception and return 0
+ select 1 into throwaway
+ from rhnChannelPermissionRole CPR,
+ rhnChannelPermission CP
+ where CP.user_id = user_id_in
+ and CP.channel_id = channel_id_in
+ and CPR.label = role_in
+ and CP.role_id = CPR.id;
+
+ return 1;
+ exception
+ when no_data_found
+ then
+ return 0;
+ end;
+
+ -- check if an org has a certain setting
+ function org_channel_setting(channel_id_in in number, org_id_in in number, setting_in
in varchar2)
+ return number
+ is
+ throwaway number;
+ begin
+ -- the idea: if we get past this query, the org has the setting, else catch the
exception and return 0
+ select 1 into throwaway
+ from rhnOrgChannelSettingsType OCST,
+ rhnOrgChannelSettings OCS
+ where OCS.org_id = org_id_in
+ and OCS.channel_id = channel_id_in
+ and OCST.label = setting_in
+ and OCS.setting_id = OCST.id;
+
+ return 1;
+ exception
+ when no_data_found
+ then
+ return 0;
+ end;
+
+ FUNCTION channel_priority(channel_id_in IN number)
+ RETURN number
+ IS
+ channel_name varchar2(256);
+ priority number;
+ end_of_life_val date;
+ org_id_val number;
+ BEGIN
+
+ select name, end_of_life, org_id
+ into channel_name, end_of_life_val, org_id_val
+ from rhnChannel
+ where id = channel_id_in;
+
+ if end_of_life_val is not null then
+ return -400;
+ end if;
+
+ if channel_name like 'Red Hat Enterprise Linux%' or channel_name like
'RHEL%' then
+ priority := 1000;
+ if channel_name not like '%Beta%' then
+ priority := priority + 1000;
+ end if;
+
+ priority := priority +
+ case
+ when channel_name like '%v. 5%' then 600
+ when channel_name like '%v. 4%' then 500
+ when channel_name like '%v. 3%' then 400
+ when channel_name like '%v. 2%' then 300
+ when channel_name like '%v. 1%' then 200
+ else 0
+ end;
+
+ priority := priority +
+ case
+ when channel_name like 'Red Hat Enterprise Linux (v. 5%' then 60
+ when (channel_name like '%AS%' and channel_name not like
'%Extras%') then 50
+ when (channel_name like '%ES%' and channel_name not like
'%Extras%') then 40
+ when (channel_name like '%WS%' and channel_name not like
'%Extras%') then 30
+ when (channel_name like '%Desktop%' and channel_name not like
'%Extras%') then 20
+ when channel_name like '%Extras%' then 10
+ else 0
+ end;
+
+ priority := priority +
+ case
+ when channel_name like '%)' then 5
+ else 0
+ end;
+
+ priority := priority +
+ case
+ when channel_name like '%32-bit x86%' then 4
+ when channel_name like '%64-bit Intel Itanium%' then 3
+ when channel_name like '%64-bit AMD64/Intel EM64T%' then 2
+ else 0
+ end;
+ elsif channel_name like 'Red Hat Desktop%' then
+ priority := 900;
+
+ if channel_name not like '%Beta%' then
+ priority := priority + 50;
+ end if;
+
+ priority := priority +
+ case
+ when channel_name like '%v. 4%' then 40
+ when channel_name like '%v. 3%' then 30
+ when channel_name like '%v. 2%' then 20
+ when channel_name like '%v. 1%' then 10
+ else 0
+ end;
+
+ priority := priority +
+ case
+ when channel_name like '%32-bit x86%' then 4
+ when channel_name like '%64-bit Intel Itanium%' then 3
+ when channel_name like '%64-bit AMD64/Intel EM64T%' then 2
+ else 0
+ end;
+
+ elsif org_id_val is not null then
+ priority := 600;
+ else
+ priority := 500;
+ end if;
+
+ return -priority;
+
+ end channel_priority;
+
+ -- right now this only does the accounting changes; the cascade
+ -- actually does the rhnServerChannel delete.
+ procedure delete_server_channels(server_id_in in number)
+ is
+ begin
+ update rhnPrivateChannelFamily
+ set current_members = current_members -1
+ where org_id in (
+ select org_id
+ from rhnServer
+ where id = server_id_in
+ )
+ and channel_family_id in (
+ select rcfm.channel_family_id
+ from rhnChannelFamilyMembers rcfm,
+ rhnServerChannel rsc
+ where rsc.server_id = server_id_in
+ and rsc.channel_id = rcfm.channel_id
+ and not exists (
+ select 1
+ from
+ rhnChannelFamilyVirtSubLevel cfvsl,
+ rhnSGTypeVirtSubLevel sgtvsl,
+ rhnServerEntitlementView sev,
+ rhnVirtualInstance vi
+ where
+ -- system is a virtual instance
+ vi.virtual_system_id = server_id_in
+ and vi.host_system_id = sev.server_id
+ -- system's host has a virt ent
+ and sev.label in ('virtualization_host',
+ 'virtualization_host_platform')
+ and sev.server_group_type_id =
+ sgtvsl.server_group_type_id
+ -- the host's virt ent grants a cf virt sub level
+ and sgtvsl.virt_sub_level_id = cfvsl.virt_sub_level_id
+ -- the cf is in that virt sub level
+ and cfvsl.channel_family_id = rcfm.channel_family_id
+ )
+ );
+ end;
+
+ -- this could certainly be optimized to do updates if needs be
+ procedure refresh_newest_package(channel_id_in in number, caller_in in varchar2
:= '(unknown)')
+ is
+ begin
+ delete from rhnChannelNewestPackage where channel_id = channel_id_in;
+ insert into rhnChannelNewestPackage
+ ( channel_id, name_id, evr_id, package_id, package_arch_id )
+ ( select channel_id,
+ name_id, evr_id,
+ package_id, package_arch_id
+ from rhnChannelNewestPackageView
+ where channel_id = channel_id_in
+ );
+ insert into rhnChannelNewestPackageAudit (channel_id, caller)
+ values (channel_id_in, caller_in);
+ update rhnChannel
+ set last_modified = greatest(sysdate, last_modified + 1/86400)
+ where id = channel_id_in;
+ end;
+
+ procedure update_channel ( channel_id_in in number, invalidate_ss in number := 0,
+ date_to_use in date := sysdate )
+ is
+
+ channel_last_modified date;
+ last_modified_value date;
+
+ cursor snapshots is
+ select snapshot_id id
+ from rhnSnapshotChannel
+ where channel_id = channel_id_in;
+
+ begin
+
+ select last_modified
+ into channel_last_modified
+ from rhnChannel
+ where id = channel_id_in;
+
+ last_modified_value := date_to_use;
+
+ if last_modified_value <= channel_last_modified then
+ last_modified_value := last_modified_value + 1/86400;
+ end if;
+
+ update rhnChannel set last_modified = last_modified_value
+ where id = channel_id_in;
+
+ if invalidate_ss = 1 then
+ for snapshot in snapshots loop
+ update rhnSnapshot
+ set invalid = lookup_snapshot_invalid_reason('channel_modified')
+ where id = snapshot.id;
+ end loop;
+ end if;
+
+ end update_channel;
+
+ procedure update_channels_by_package ( package_id_in in number, date_to_use in date :=
sysdate )
+ is
+
+ cursor channels is
+ select channel_id
+ from rhnChannelPackage
+ where package_id = package_id_in
+ order by channel_id;
+
+ begin
+ for channel in channels loop
+ -- we want to invalidate the snapshot assocated with the channel when we
+ -- do this b/c we know we've added or removed or packages
+ rhn_channel.update_channel ( channel.channel_id, 1, date_to_use );
+ end loop;
+ end update_channels_by_package;
+
+
+ procedure update_channels_by_errata ( errata_id_in number, date_to_use in date :=
sysdate )
+ is
+
+ cursor channels is
+ select channel_id
+ from rhnChannelErrata
+ where errata_id = errata_id_in
+ order by channel_id;
+
+ begin
+ for channel in channels loop
+ -- we won't invalidate snapshots, b/c just changing the errata associated
with
+ -- a channel shouldn't invalidate snapshots
+ rhn_channel.update_channel ( channel.channel_id, 0, date_to_use );
+ end loop;
+ end update_channels_by_errata;
+
+END rhn_channel;
+/
+SHOW ERRORS
commit f942de95d9fe259e09ea809f61af9ab95769f015
Author: Milan Zazrivec <mzazrivec(a)redhat.com>
Date: Mon Nov 30 16:19:21 2009 +0100
add missing relationship
From commit 9615725006221e9feb74bf827f7a15c363fe2cc6
diff --git
a/schema/spacewalk/upgrade/spacewalk-schema-0.6-to-spacewalk-schema-0.7/160-rhn_cache.pkb.sql
b/schema/spacewalk/upgrade/spacewalk-schema-0.6-to-spacewalk-schema-0.7/160-rhn_cache.pkb.sql
index 7c895db..9c1dcf1 100644
---
a/schema/spacewalk/upgrade/spacewalk-schema-0.6-to-spacewalk-schema-0.7/160-rhn_cache.pkb.sql
+++
b/schema/spacewalk/upgrade/spacewalk-schema-0.6-to-spacewalk-schema-0.7/160-rhn_cache.pkb.sql
@@ -87,6 +87,7 @@ is
rhnServerGroup sg,
rhnUserGroupType ugt
where ugt.label = 'org_admin'
+ and ugt.id = ug.group_type
and sg.id = server_group_id_in
and ugm.user_id = usgp.user_id
and ug.org_id = sg.org_id
commit c31883ad2159a806c3b6ac27fcb88c94c3fc1737
Author: Milan Zazrivec <mzazrivec(a)redhat.com>
Date: Mon Nov 30 16:16:22 2009 +0100
rename schema upgrade script to use uniform .sql extension
diff --git
a/schema/spacewalk/upgrade/spacewalk-schema-0.6-to-spacewalk-schema-0.7/160-rhn_cache.pkb
b/schema/spacewalk/upgrade/spacewalk-schema-0.6-to-spacewalk-schema-0.7/160-rhn_cache.pkb
deleted file mode 100644
index 7c895db..0000000
---
a/schema/spacewalk/upgrade/spacewalk-schema-0.6-to-spacewalk-schema-0.7/160-rhn_cache.pkb
+++ /dev/null
@@ -1,102 +0,0 @@
---
--- Copyright (c) 2008 Red Hat, Inc.
---
--- This software is licensed to you under the GNU General Public License,
--- version 2 (GPLv2). There is NO WARRANTY for this software, express or
--- implied, including the implied warranties of MERCHANTABILITY or FITNESS
--- FOR A PARTICULAR PURPOSE. You should have received a copy of GPLv2
--- along with this software; if not, see
---
http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
---
--- Red Hat trademarks are not licensed under GPLv2. No permission is
--- granted to use or replicate Red Hat trademarks that are incorporated
--- in this software or its documentation.
---
---
---
---
-
-create or replace package body
-rhn_cache
-is
- body_version varchar2(100) := '';
-
- -- this searches out all users who get perms...
- procedure update_perms_for_server(
- server_id_in in number
- ) is
- begin
- -- delete rows which are no more valid
- delete from rhnUserServerPerms p
- where server_id = server_id_in
- and user_id not in (select user_id
- from rhnUserServerPermsDupes d
- where p.server_id = d.server_id);
- -- insert newly added rows
- insert into rhnUserServerPerms(user_id, server_id) (
- select distinct user_id, server_id_in
- from rhnUserServerPermsDupes d
- where server_id = server_id_in
- and user_id not in (
- select user_id
- from rhnUserServerPerms p
- where p.server_id = d.server_id)
- );
- end update_perms_for_server;
-
- -- update rhnUserServerPerms cache from rhnUserServerPermsDupes
- procedure update_perms_for_user(
- user_id_in in number
- ) is
- begin
- -- first delete rows which are not in rhnUserServerPermsDupes
- delete from rhnUserServerPerms up
- where user_id = user_id_in
- and not exists (
- select 1
- from rhnUserServerPermsDupes uspd
- where uspd.user_id = up.user_id
- and uspd.server_id = up.server_id);
-
- -- then insert rest of rows from rhnUserServerPermsDupes
- insert into rhnUserServerPerms (user_id, server_id)
- select distinct user_id_in, server_id
- from rhnUserServerPermsDupes uspd
- where uspd.user_id = user_id_in
- and not exists (
- select 1
- from rhnUserServerPerms usp
- where usp.user_id = user_id_in
- and usp.server_id = uspd.server_id);
- end update_perms_for_user;
-
- -- this means a server got added or removed, so we
- -- can't key off of a server anywhere.
- procedure update_perms_for_server_group(
- server_group_id_in in number
- ) is
- cursor users is
- -- org admins aren't affected, so don't test for them
- select usgp.user_id id
- from rhnUserServerGroupPerms usgp
- where usgp.server_group_id = server_group_id_in
- and not exists (
- select 1
- from rhnUserGroup ug,
- rhnUserGroupMembers ugm,
- rhnServerGroup sg,
- rhnUserGroupType ugt
- where ugt.label = 'org_admin'
- and sg.id = server_group_id_in
- and ugm.user_id = usgp.user_id
- and ug.org_id = sg.org_id
- and ugm.user_group_id = ug.id
- );
- begin
- for u in users loop
- update_perms_for_user(u.id);
- end loop;
- end update_perms_for_server_group;
-end rhn_cache;
-/
-show errors
diff --git
a/schema/spacewalk/upgrade/spacewalk-schema-0.6-to-spacewalk-schema-0.7/160-rhn_cache.pkb.sql
b/schema/spacewalk/upgrade/spacewalk-schema-0.6-to-spacewalk-schema-0.7/160-rhn_cache.pkb.sql
new file mode 100644
index 0000000..7c895db
--- /dev/null
+++
b/schema/spacewalk/upgrade/spacewalk-schema-0.6-to-spacewalk-schema-0.7/160-rhn_cache.pkb.sql
@@ -0,0 +1,102 @@
+--
+-- Copyright (c) 2008 Red Hat, Inc.
+--
+-- This software is licensed to you under the GNU General Public License,
+-- version 2 (GPLv2). There is NO WARRANTY for this software, express or
+-- implied, including the implied warranties of MERCHANTABILITY or FITNESS
+-- FOR A PARTICULAR PURPOSE. You should have received a copy of GPLv2
+-- along with this software; if not, see
+--
http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
+--
+-- Red Hat trademarks are not licensed under GPLv2. No permission is
+-- granted to use or replicate Red Hat trademarks that are incorporated
+-- in this software or its documentation.
+--
+--
+--
+--
+
+create or replace package body
+rhn_cache
+is
+ body_version varchar2(100) := '';
+
+ -- this searches out all users who get perms...
+ procedure update_perms_for_server(
+ server_id_in in number
+ ) is
+ begin
+ -- delete rows which are no more valid
+ delete from rhnUserServerPerms p
+ where server_id = server_id_in
+ and user_id not in (select user_id
+ from rhnUserServerPermsDupes d
+ where p.server_id = d.server_id);
+ -- insert newly added rows
+ insert into rhnUserServerPerms(user_id, server_id) (
+ select distinct user_id, server_id_in
+ from rhnUserServerPermsDupes d
+ where server_id = server_id_in
+ and user_id not in (
+ select user_id
+ from rhnUserServerPerms p
+ where p.server_id = d.server_id)
+ );
+ end update_perms_for_server;
+
+ -- update rhnUserServerPerms cache from rhnUserServerPermsDupes
+ procedure update_perms_for_user(
+ user_id_in in number
+ ) is
+ begin
+ -- first delete rows which are not in rhnUserServerPermsDupes
+ delete from rhnUserServerPerms up
+ where user_id = user_id_in
+ and not exists (
+ select 1
+ from rhnUserServerPermsDupes uspd
+ where uspd.user_id = up.user_id
+ and uspd.server_id = up.server_id);
+
+ -- then insert rest of rows from rhnUserServerPermsDupes
+ insert into rhnUserServerPerms (user_id, server_id)
+ select distinct user_id_in, server_id
+ from rhnUserServerPermsDupes uspd
+ where uspd.user_id = user_id_in
+ and not exists (
+ select 1
+ from rhnUserServerPerms usp
+ where usp.user_id = user_id_in
+ and usp.server_id = uspd.server_id);
+ end update_perms_for_user;
+
+ -- this means a server got added or removed, so we
+ -- can't key off of a server anywhere.
+ procedure update_perms_for_server_group(
+ server_group_id_in in number
+ ) is
+ cursor users is
+ -- org admins aren't affected, so don't test for them
+ select usgp.user_id id
+ from rhnUserServerGroupPerms usgp
+ where usgp.server_group_id = server_group_id_in
+ and not exists (
+ select 1
+ from rhnUserGroup ug,
+ rhnUserGroupMembers ugm,
+ rhnServerGroup sg,
+ rhnUserGroupType ugt
+ where ugt.label = 'org_admin'
+ and sg.id = server_group_id_in
+ and ugm.user_id = usgp.user_id
+ and ug.org_id = sg.org_id
+ and ugm.user_group_id = ug.id
+ );
+ begin
+ for u in users loop
+ update_perms_for_user(u.id);
+ end loop;
+ end update_perms_for_server_group;
+end rhn_cache;
+/
+show errors
commit cf64dd8d756aa1797618eb6f2c7cd8dade60d96f
Author: Milan Zazrivec <mzazrivec(a)redhat.com>
Date: Mon Nov 30 15:52:13 2009 +0100
476851 - drop unneeded synonyms during schema upgrade
diff --git
a/schema/spacewalk/upgrade/spacewalk-schema-0.6-to-spacewalk-schema-0.7/002-rhn_db_environment-rhn_environment-drop.sql
b/schema/spacewalk/upgrade/spacewalk-schema-0.6-to-spacewalk-schema-0.7/002-rhn_db_environment-rhn_environment-drop.sql
index 489d2f4..54d2952 100644
---
a/schema/spacewalk/upgrade/spacewalk-schema-0.6-to-spacewalk-schema-0.7/002-rhn_db_environment-rhn_environment-drop.sql
+++
b/schema/spacewalk/upgrade/spacewalk-schema-0.6-to-spacewalk-schema-0.7/002-rhn_db_environment-rhn_environment-drop.sql
@@ -11,3 +11,6 @@ alter table rhn_config_macro drop column environment;
drop table rhn_db_environment;
drop table rhn_environment;
+
+drop synonym db_environment;
+drop synonym environment;
commit aee6131d9f6f2a9df2b5ed737e3fbaa04e8690eb
Author: Milan Zazrivec <mzazrivec(a)redhat.com>
Date: Mon Nov 30 14:12:59 2009 +0100
Revert "Fix numeric/smallint incompatible types in PostgreSQL."
This reverts commit 9bfcee416f62ec342d249c51b8edc64d57b67ef6.
There are two reasons for the revert:
1) the schema upgrade script won't work. Oracle will throw
"ORA-01440: column to be modified must be empty to decrease precision or
scale"
in most of the upgrade situations (i.e. with filled tables)
2) it would be more desirable to change the type of referenced columns
from NUMBER(12) to NUMBER to stay consistent. The upgrade script modifying
NUMBER(12) to NUMBER would work without any problems then.
There's bug #542662 tracking efforts leading to an alternative
solution for the problem addressed by the original commit.
diff --git a/schema/spacewalk/common/tables/rhn_contact_group_members.sql
b/schema/spacewalk/common/tables/rhn_contact_group_members.sql
index 952265b..25b67aa 100644
--- a/schema/spacewalk/common/tables/rhn_contact_group_members.sql
+++ b/schema/spacewalk/common/tables/rhn_contact_group_members.sql
@@ -16,16 +16,16 @@
CREATE TABLE rhn_contact_group_members
(
- contact_group_id NUMBER(12) NOT NULL
+ contact_group_id NUMBER NOT NULL
CONSTRAINT rhn_cntgm_cgid_fk
REFERENCES rhn_contact_groups (recid)
ON DELETE CASCADE,
order_number NUMBER NOT NULL,
- member_contact_method_id NUMBER(12)
+ member_contact_method_id NUMBER
CONSTRAINT rhn_cntgm_mcmid_fk
REFERENCES rhn_contact_methods (recid)
ON DELETE CASCADE,
- member_contact_group_id NUMBER(12)
+ member_contact_group_id NUMBER
CONSTRAINT rhn_cntgm_mcgid_fk
REFERENCES rhn_contact_groups (recid)
ON DELETE CASCADE,
diff --git a/schema/spacewalk/common/tables/rhn_ll_netsaint.sql
b/schema/spacewalk/common/tables/rhn_ll_netsaint.sql
index eda6c67..eaf4553 100644
--- a/schema/spacewalk/common/tables/rhn_ll_netsaint.sql
+++ b/schema/spacewalk/common/tables/rhn_ll_netsaint.sql
@@ -16,7 +16,7 @@
CREATE TABLE rhn_ll_netsaint
(
- netsaint_id NUMBER(12) NOT NULL,
+ netsaint_id NUMBER NOT NULL,
city VARCHAR2(255)
)
ENABLE ROW MOVEMENT
diff --git a/schema/spacewalk/common/tables/rhn_probe_param_value.sql
b/schema/spacewalk/common/tables/rhn_probe_param_value.sql
index ded05e1..e2f606b 100644
--- a/schema/spacewalk/common/tables/rhn_probe_param_value.sql
+++ b/schema/spacewalk/common/tables/rhn_probe_param_value.sql
@@ -16,8 +16,8 @@
CREATE TABLE rhn_probe_param_value
(
- probe_id NUMBER(12) NOT NULL,
- command_id NUMBER(12) NOT NULL,
+ probe_id NUMBER NOT NULL,
+ command_id NUMBER NOT NULL,
param_name VARCHAR2(40) NOT NULL,
value VARCHAR2(1024),
last_update_user VARCHAR2(40),
diff --git a/schema/spacewalk/postgres/procs/rhn_prepare_install.sql
b/schema/spacewalk/postgres/procs/rhn_prepare_install.sql
index 5ebb34b..05e51a6 100644
--- a/schema/spacewalk/postgres/procs/rhn_prepare_install.sql
+++ b/schema/spacewalk/postgres/procs/rhn_prepare_install.sql
@@ -26,7 +26,7 @@ rhn_prepare_install
command_instance_id in out rhn_command_queue_instances.recid%type,
install_command in rhn_command_queue_instances.command_id%type
)
-returns smallint
+returns numeric
as $$
declare
/* ignore this command if it has not been run after five minutes */
diff --git
a/schema/spacewalk/upgrade/spacewalk-schema-0.6-to-spacewalk-schema-0.7/001-numeric-12-columns.sql
b/schema/spacewalk/upgrade/spacewalk-schema-0.6-to-spacewalk-schema-0.7/001-numeric-12-columns.sql
deleted file mode 100644
index c5ec175..0000000
---
a/schema/spacewalk/upgrade/spacewalk-schema-0.6-to-spacewalk-schema-0.7/001-numeric-12-columns.sql
+++ /dev/null
@@ -1,8 +0,0 @@
--- Change columns to numeric 12 to match the columns of their foreign keys.
-alter table rhn_contact_group_members modify(contact_group_id NUMBER(12));
-alter table rhn_contact_group_members modify(member_contact_method_id NUMBER(12));
-alter table rhn_contact_group_members modify(member_contact_group_id NUMBER(12));
-alter table rhn_ll_netsaint modify(netsaint_id NUMBER(12));
-alter table rhn_probe_param_value modify(probe_id NUMBER(12));
-alter table rhn_probe_param_value modify(command_id NUMBER(12));
-
commit 662544755c534462b18e5eeaa528b608243b5ad0
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Mon Nov 30 14:43:07 2009 +0100
Automatic commit of package [SatConfig-cluster] release [1.54.8-1].
diff --git a/monitoring/SatConfig/cluster/SatConfig-cluster.spec
b/monitoring/SatConfig/cluster/SatConfig-cluster.spec
index 6fdc5b7..7f2b298 100644
--- a/monitoring/SatConfig/cluster/SatConfig-cluster.spec
+++ b/monitoring/SatConfig/cluster/SatConfig-cluster.spec
@@ -1,6 +1,6 @@
%define sysv_dir %{_sysconfdir}/rc.d/np.d
Name: SatConfig-cluster
-Version: 1.54.7
+Version: 1.54.8
Release: 1%{?dist}
Summary: Satellite Configuration System - cluster information
URL:
https://fedorahosted.org/spacewalk
@@ -57,6 +57,9 @@ install -m 644 SatCluster.pm $RPM_BUILD_ROOT%{perl_vendorlib}/NOCpulse/
rm -rf $RPM_BUILD_ROOT
%changelog
+* Mon Nov 30 2009 Miroslav Suchý <msuchy(a)redhat.com> 1.54.8-1
+- name space Validator conflicts with older version of perl-IO-Compress-Base
+
* Mon Jul 27 2009 John Matthews <jmatthew(a)redhat.com> 1.54.7-1
- remove warning when run as perl -w (msuchy(a)redhat.com)
diff --git a/rel-eng/packages/SatConfig-cluster b/rel-eng/packages/SatConfig-cluster
index ab988af..c4b5e77 100644
--- a/rel-eng/packages/SatConfig-cluster
+++ b/rel-eng/packages/SatConfig-cluster
@@ -1 +1 @@
-1.54.7-1 monitoring/SatConfig/cluster/
+1.54.8-1 monitoring/SatConfig/cluster/
commit 09512ad3f4717c8cc8f1d2a0aa7804334097c241
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Mon Nov 30 14:41:21 2009 +0100
name space Validator conflicts with older version of perl-IO-Compress-Base
See
https://bugzilla.redhat.com/show_bug.cgi?id=542645 for more details
Since Validator:: is quite generic namespace, it is high probability of
such conflict in future. Therefore I changed the namespace to
SatConfig::cluster::Validator
diff --git a/monitoring/SatConfig/cluster/ApacheServer.pm
b/monitoring/SatConfig/cluster/ApacheServer.pm
index b9af38d..35ebd01 100644
--- a/monitoring/SatConfig/cluster/ApacheServer.pm
+++ b/monitoring/SatConfig/cluster/ApacheServer.pm
@@ -18,21 +18,21 @@ sub initialize
my ($self,@params) = @_;
$self->SUPER::initialize(@params);
$self->addValidators(
- Validator->newInitialized(
+ SatConfig::cluster::Validator->newInitialized(
name=>'serverName',
description=>'Fully qualified host+domain name of the server in question',
required=>0,
optional=>1,
format=>'string'
),
- Validator->newInitialized(
+ SatConfig::cluster::Validator->newInitialized(
name=>'serverAlias',
description=>'Short name (i.e. host name) of the server',
required=>0,
optional=>1,
format=>'string'
),
- Validator->newInitialized(
+ SatConfig::cluster::Validator->newInitialized(
name=>'allowedClients',
description=>'Space separated list of IP addresses that clients can connect
from (if none, all are allowed)',
required=>0,
diff --git a/monitoring/SatConfig/cluster/ConfigObject.pm
b/monitoring/SatConfig/cluster/ConfigObject.pm
index 8fa8f59..b395768 100644
--- a/monitoring/SatConfig/cluster/ConfigObject.pm
+++ b/monitoring/SatConfig/cluster/ConfigObject.pm
@@ -200,7 +200,7 @@ sub describe
return $result;
}
-package Validator;
+package SatConfig::cluster::Validator;
use NOCpulse::Object;
@ISA=qw(NOCpulse::Object);
diff --git a/monitoring/SatConfig/cluster/HostsAccess.pm
b/monitoring/SatConfig/cluster/HostsAccess.pm
index 034642a..7759890 100644
--- a/monitoring/SatConfig/cluster/HostsAccess.pm
+++ b/monitoring/SatConfig/cluster/HostsAccess.pm
@@ -16,7 +16,7 @@ sub initialize
my ($self,@params) = @_;
$self->SUPER::initialize(@params);
$self->addValidators(
- Validator->newInitialized(
+ SatConfig::cluster::Validator->newInitialized(
name=>'allow',
description=>'Comma separated list of hosts (per hosts_access(5)) allowed
access to this daemon',
required=>0,
diff --git a/monitoring/SatConfig/cluster/IpAddr.pm
b/monitoring/SatConfig/cluster/IpAddr.pm
index 83edba3..4912b9c 100644
--- a/monitoring/SatConfig/cluster/IpAddr.pm
+++ b/monitoring/SatConfig/cluster/IpAddr.pm
@@ -24,63 +24,63 @@ sub initialize
{
my ($self,@params) = @_;
$self->addValidators(
- Validator->newInitialized(
+ SatConfig::cluster::Validator->newInitialized(
name=>'dev',
description=>'A device name (e.g. eth0)',
required=>1,
optional=>0,
format=>'deviceName'
),
- Validator->newInitialized(
+ SatConfig::cluster::Validator->newInitialized(
name=>'speed',
description=>'Force link speed (100baseT4, 100baseTx, 100baseTx-FD,
100baseTx-HD, 10baseT, 10baseT-FD, 10baseT-HD)',
required=>0,
optional=>1,
format=>'string'
),
- Validator->newInitialized(
+ SatConfig::cluster::Validator->newInitialized(
name=>'mtu',
description=>'Force link mtu size',
required=>0,
optional=>1,
format=>'integer'
),
- Validator->newInitialized(
+ SatConfig::cluster::Validator->newInitialized(
name=>'mac',
description=>'A MAC address (e.g. 00:D0:11:22:33:44)',
required=>0,
optional=>0,
format=>'macAddress'
),
- Validator->newInitialized(
+ SatConfig::cluster::Validator->newInitialized(
name=>'addr',
description=>'An IP address',
required=>1,
optional=>0,
format=>'ipAddress'
),
- Validator->newInitialized(
+ SatConfig::cluster::Validator->newInitialized(
name=>'mask',
description=>'A CIDR netmask (e.g. 24)',
required=>1,
optional=>0,
format=>'cidrMask'
),
- Validator->newInitialized(
+ SatConfig::cluster::Validator->newInitialized(
name=>'gate',
description=>'IP address of gateway',
required=>0,
optional=>1,
format=>'ipAddress'
),
- Validator->newInitialized(
+ SatConfig::cluster::Validator->newInitialized(
name=>'fqdn',
description=>'Fully qualified domain name for this address',
required=>0,
optional=>1,
format=>'string'
),
- Validator->newInitialized(
+ SatConfig::cluster::Validator->newInitialized(
name=>'TomcatBinding',
description=>'Tomcat App Server Binding',
required=>0,
diff --git a/monitoring/SatConfig/cluster/LocalConfig.pm
b/monitoring/SatConfig/cluster/LocalConfig.pm
index 2d2208f..1409710 100644
--- a/monitoring/SatConfig/cluster/LocalConfig.pm
+++ b/monitoring/SatConfig/cluster/LocalConfig.pm
@@ -20,35 +20,35 @@ sub initialize
my ($self,@params) = @_;
$self->SUPER::initialize(@params);
$self->addValidators(
- Validator->newInitialized(
+ SatConfig::cluster::Validator->newInitialized(
name=>'dbd',
description=>'Database driver (usually Oracle)',
required=>1,
optional=>0,
format=>'string'
),
- Validator->newInitialized(
+ SatConfig::cluster::Validator->newInitialized(
name=>'dbname',
description=>'Database name (usually licensed01)',
required=>1,
optional=>0,
format=>'string'
),
- Validator->newInitialized(
+ SatConfig::cluster::Validator->newInitialized(
name=>'orahome',
description=>'Path to Oracle home (/home/oracle/OraHome1)',
required=>1,
optional=>0,
format=>'string'
),
- Validator->newInitialized(
+ SatConfig::cluster::Validator->newInitialized(
name=>'username',
description=>'User to log in to database as (web)',
required=>1,
optional=>0,
format=>'string'
),
- Validator->newInitialized(
+ SatConfig::cluster::Validator->newInitialized(
name=>'username',
description=>'Passwod to log into database with',
required=>1,
diff --git a/monitoring/SatConfig/cluster/ModJK2.pm
b/monitoring/SatConfig/cluster/ModJK2.pm
index 688f5df..2b2f2bf 100644
--- a/monitoring/SatConfig/cluster/ModJK2.pm
+++ b/monitoring/SatConfig/cluster/ModJK2.pm
@@ -21,28 +21,28 @@ sub initialize
my ($self,@params) = @_;
$self->SUPER::initialize(@params);
$self->addValidators(
- Validator->newInitialized(
+ SatConfig::cluster::Validator->newInitialized(
name=>'jkshmSize',
description=>'dykeman fix',
required=>1,
optional=>0,
format=>'integer'
),
- Validator->newInitialized(
+ SatConfig::cluster::Validator->newInitialized(
name=>'webapps',
description=>'dykeman fix',
required=>1,
optional=>0,
format=>'string'
),
- Validator->newInitialized(
+ SatConfig::cluster::Validator->newInitialized(
name=>'serverClusterFilename',
description=>'Configuration filename (on this machine) of the J2K server
cluster',
required=>1,
optional=>0,
format=>'string'
),
- Validator->newInitialized(
+ SatConfig::cluster::Validator->newInitialized(
name=>'debugLevel',
description=>'dykeman fix',
required=>1,
diff --git a/monitoring/SatConfig/cluster/NetworkFilesystem.pm
b/monitoring/SatConfig/cluster/NetworkFilesystem.pm
index f707e45..222fe4d 100644
--- a/monitoring/SatConfig/cluster/NetworkFilesystem.pm
+++ b/monitoring/SatConfig/cluster/NetworkFilesystem.pm
@@ -16,7 +16,7 @@ sub initialize
my ($self,@params) = @_;
$self->SUPER::initialize(@params);
$self->addValidators(
- Validator->newInitialized(
+ SatConfig::cluster::Validator->newInitialized(
name=>'source',
description=>'<servername>:</path/to/mount>',
required=>1,
diff --git a/monitoring/SatConfig/cluster/OffnetRoute.pm
b/monitoring/SatConfig/cluster/OffnetRoute.pm
index 9a71dee..928dddb 100644
--- a/monitoring/SatConfig/cluster/OffnetRoute.pm
+++ b/monitoring/SatConfig/cluster/OffnetRoute.pm
@@ -18,35 +18,35 @@ sub initialize
{
my ($self,@params) = @_;
$self->addValidators(
- Validator->newInitialized(
+ SatConfig::cluster::Validator->newInitialized(
name=>'net',
description=>'A network address',
required=>1,
optional=>0,
format=>'ipAddress'
),
- Validator->newInitialized(
+ SatConfig::cluster::Validator->newInitialized(
name=>'mask',
description=>'A CIDR mask (e.g. 24)',
required=>0,
optional=>0,
format=>'cidrMask'
),
- Validator->newInitialized(
+ SatConfig::cluster::Validator->newInitialized(
name=>'dev',
description=>'A device name (e.g. eth0)',
required=>1,
optional=>0,
format=>'deviceName'
),
- Validator->newInitialized(
+ SatConfig::cluster::Validator->newInitialized(
name=>'gate',
description=>'IP address of a gateway',
required=>1,
optional=>0,
format=>'ipAddress'
),
- Validator->newInitialized(
+ SatConfig::cluster::Validator->newInitialized(
name=>'vip',
description=>'Virtual IP address',
required=>0,
diff --git a/monitoring/SatConfig/cluster/PhysCluster.pm
b/monitoring/SatConfig/cluster/PhysCluster.pm
index 3f59404..e90ec1f 100644
--- a/monitoring/SatConfig/cluster/PhysCluster.pm
+++ b/monitoring/SatConfig/cluster/PhysCluster.pm
@@ -53,168 +53,168 @@ sub initialize
$self->SUPER::initialize();
$self->readFromFile($filename);
$self->addValidators(
- Validator->newInitialized(
+ SatConfig::cluster::Validator->newInitialized(
name=>'satNumber',
description=>'Node number within the cluster (e.g. 1,2)',
required=>1,
optional=>0,
format=>'integer'
),
- Validator->newInitialized(
+ SatConfig::cluster::Validator->newInitialized(
name=>'nameservers',
description=>'List of nameserver ip addresses separated by spaces',
required=>1,
optional=>0,
format=>'string'
),
- Validator->newInitialized(
+ SatConfig::cluster::Validator->newInitialized(
name=>'nssearchpath',
description=>'List of domain names to search separated by spaces',
required=>1,
optional=>0,
format=>'string'
),
- Validator->newInitialized(
+ SatConfig::cluster::Validator->newInitialized(
name=>'smonaddr',
description=>'IP address of smon',
required=>1,
optional=>0,
format=>'ipAddress'
),
- Validator->newInitialized(
+ SatConfig::cluster::Validator->newInitialized(
name=>'smonfqdn',
description=>'Fully qualified domain name of smon',
required=>1,
optional=>0,
format=>'fqdn'
),
- Validator->newInitialized(
+ SatConfig::cluster::Validator->newInitialized(
name=>'smontestaddr',
description=>'IP address of smon-test',
required=>1,
optional=>0,
format=>'ipAddress'
),
- Validator->newInitialized(
+ SatConfig::cluster::Validator->newInitialized(
name=>'smontestfqdn',
description=>'Fully qualified domain name of smon-test',
required=>1,
optional=>0,
format=>'fqdn'
),
- Validator->newInitialized(
+ SatConfig::cluster::Validator->newInitialized(
name=>'sshaddr',
description=>'IP Address of host from which SSH connects will come',
required=>1,
optional=>0,
format=>'ipAddress'
),
- Validator->newInitialized(
+ SatConfig::cluster::Validator->newInitialized(
name=>'sshmask',
description=>'Dotted-quad mask for sshaddr',
required=>1,
optional=>0,
format=>'ipAddress'
),
- Validator->newInitialized(
+ SatConfig::cluster::Validator->newInitialized(
name=>'sshfqdn',
description=>'Fully qualified domain name of host from which ssh connects will
com',
required=>1,
optional=>0,
format=>'fqdn'
),
- Validator->newInitialized(
+ SatConfig::cluster::Validator->newInitialized(
name=>'otherHosts',
description=>'List of static host entries separated by spaces',
required=>0,
optional=>1,
format=>'string'
),
- Validator->newInitialized(
+ SatConfig::cluster::Validator->newInitialized(
name=>'ntpservers',
description=>'List of ntp server IP addresses separated by spaces',
required=>0,
optional=>1,
format=>'string'
),
- Validator->newInitialized(
+ SatConfig::cluster::Validator->newInitialized(
name=>'superSputEnabled',
description=>'1 or 0, depending on whether SuperSput should be enabled or
not',
required=>1,
optional=>0,
format=>'boolean'
),
- Validator->newInitialized(
+ SatConfig::cluster::Validator->newInitialized(
name=>'haFailoverEnabled',
description=>'1 or 0, depending on whether HA should be enabled or not',
required=>1,
optional=>0,
format=>'boolean'
),
- Validator->newInitialized(
+ SatConfig::cluster::Validator->newInitialized(
name=>'portalAddress',
description=>'IP address of the portal/DB machine',
required=>0,
optional=>1,
format=>'ipAddress'
),
- Validator->newInitialized(
+ SatConfig::cluster::Validator->newInitialized(
name=>'VIP',
description=>'Virtual IP Address definition',
required=>0,
optional=>1,
format=>'VIP'
),
- Validator->newInitialized(
+ SatConfig::cluster::Validator->newInitialized(
name=>'OffnetRoute',
description=>'Off net route definition',
required=>0,
optional=>0,
format=>'OffnetRoute'
),
- Validator->newInitialized(
+ SatConfig::cluster::Validator->newInitialized(
name=>'PhysNode',
description=>'Node definition',
required=>1,
optional=>0,
format=>'PhysNode'
),
- Validator->newInitialized(
+ SatConfig::cluster::Validator->newInitialized(
name=>'ApacheServer',
description=>'Apache server definition',
required=>0,
optional=>-1,
format=>'ApacheServer'
),
- Validator->newInitialized(
+ SatConfig::cluster::Validator->newInitialized(
name=>'NetworkFilesystem',
description=>'An NFS mounted filesystem',
required=>0,
optional=>-1,
format=>'NetworkFilesystem'
),
- Validator->newInitialized(
+ SatConfig::cluster::Validator->newInitialized(
name=>'LocalConfig',
description=>'Local configuration server access info',
required=>0,
optional=>1,
format=>'LocalConfig'
),
- Validator->newInitialized(
+ SatConfig::cluster::Validator->newInitialized(
name=>'RemoteConfig',
description=>'Remote configuration server access info',
required=>0,
optional=>1,
format=>'RemoteConfig'
),
- Validator->newInitialized(
+ SatConfig::cluster::Validator->newInitialized(
name=>'TomcatServer',
description=>'System wide parameters for a Tomcat app server',
required=>0,
optional=>1,
format=>'TomcatServer'
),
- Validator->newInitialized(
+ SatConfig::cluster::Validator->newInitialized(
name=>'ModJK2',
description=>'Parameters for JK2 clients under Apache',
required=>0,
diff --git a/monitoring/SatConfig/cluster/PhysNode.pm
b/monitoring/SatConfig/cluster/PhysNode.pm
index 8e0059f..4a633f9 100644
--- a/monitoring/SatConfig/cluster/PhysNode.pm
+++ b/monitoring/SatConfig/cluster/PhysNode.pm
@@ -22,28 +22,28 @@ sub initialize
my ($self,@params) = @_;
$self->SUPER::initialize(@params);
$self->addValidators(
- Validator->newInitialized(
+ SatConfig::cluster::Validator->newInitialized(
name=>'IpAddr',
description=>'An IP Address definition',
required=>1,
optional=>-1,
format=>'IpAddr'
),
- Validator->newInitialized(
+ SatConfig::cluster::Validator->newInitialized(
name=>'PrivateIpAddr',
description=>'A private IP Address definition',
required=>1,
optional=>0,
format=>'PrivateIpAddr'
),
- Validator->newInitialized(
+ SatConfig::cluster::Validator->newInitialized(
name=>'HostsAccess',
description=>'Hosts allowed to access a daemons services',
required=>0,
optional=>-1,
format=>'HostsAccess'
),
- Validator->newInitialized(
+ SatConfig::cluster::Validator->newInitialized(
name=>'hostname',
description=>'Host Name',
required=>0,
diff --git a/monitoring/SatConfig/cluster/PrivateIpAddr.pm
b/monitoring/SatConfig/cluster/PrivateIpAddr.pm
index fdc9435..4dc533d 100644
--- a/monitoring/SatConfig/cluster/PrivateIpAddr.pm
+++ b/monitoring/SatConfig/cluster/PrivateIpAddr.pm
@@ -45,7 +45,7 @@ sub initialize
$self->SUPER::initialize(@params);
$self->set_validators([]);
$self->addValidators(
- Validator->newInitialized(
+ SatConfig::cluster::Validator->newInitialized(
name=>'dev',
description=>'A device name (e.g. eth0 or lo)',
required=>1,
diff --git a/monitoring/SatConfig/cluster/RemoteConfig.pm
b/monitoring/SatConfig/cluster/RemoteConfig.pm
index 765c75c..01d506e 100644
--- a/monitoring/SatConfig/cluster/RemoteConfig.pm
+++ b/monitoring/SatConfig/cluster/RemoteConfig.pm
@@ -18,21 +18,21 @@ sub initialize
my ($self,@params) = @_;
$self->SUPER::initialize(@params);
$self->addValidators(
- Validator->newInitialized(
+ SatConfig::cluster::Validator->newInitialized(
name=>'protocol',
description=>'Protocol to access configuration server with (http/https)',
required=>1,
optional=>0,
format=>'string'
),
- Validator->newInitialized(
+ SatConfig::cluster::Validator->newInitialized(
name=>'host',
description=>'Host to connect to (defaults to smon address)',
required=>0,
optional=>1,
format=>'string'
),
- Validator->newInitialized(
+ SatConfig::cluster::Validator->newInitialized(
name=>'path',
description=>'Path to configuration program
(/cgi-bin/fetch_nocpulse_ini.cgi)',
required=>1,
diff --git a/monitoring/SatConfig/cluster/TomcatBinding.pm
b/monitoring/SatConfig/cluster/TomcatBinding.pm
index 7ea5f1c..dd80bdc 100644
--- a/monitoring/SatConfig/cluster/TomcatBinding.pm
+++ b/monitoring/SatConfig/cluster/TomcatBinding.pm
@@ -18,21 +18,21 @@ sub initialize
my ($self,@params) = @_;
$self->SUPER::initialize(@params);
$self->addValidators(
- Validator->newInitialized(
+ SatConfig::cluster::Validator->newInitialized(
name=>'shutdownPort',
description=>'Port on which Tomcat should listen for a shutdown message',
required=>1,
optional=>0,
format=>'integer'
),
- Validator->newInitialized(
+ SatConfig::cluster::Validator->newInitialized(
name=>'httpPort',
description=>'Server HTTP server port',
required=>1,
optional=>0,
format=>'integer'
),
- Validator->newInitialized(
+ SatConfig::cluster::Validator->newInitialized(
name=>'ajpPort',
description=>'Port on which AJP content is served (a highly-optimized
transaction protocol)',
required=>1,
diff --git a/monitoring/SatConfig/cluster/TomcatServer.pm
b/monitoring/SatConfig/cluster/TomcatServer.pm
index bc4abd5..bb7fce6 100644
--- a/monitoring/SatConfig/cluster/TomcatServer.pm
+++ b/monitoring/SatConfig/cluster/TomcatServer.pm
@@ -41,175 +41,175 @@ sub initialize
my ($self,@params) = @_;
$self->SUPER::initialize(@params);
$self->addValidators(
- Validator->newInitialized(
+ SatConfig::cluster::Validator->newInitialized(
name=>'csdb_connpool_min_limit',
description=>'The Minimum number of physical connections maintained by the
current state connection pool',
required=>1,
optional=>0,
format=>'integer'
),
- Validator->newInitialized(
+ SatConfig::cluster::Validator->newInitialized(
name=>'csdb_connpool_max_limit',
description=>'The Maximum number of physical connections maintained by the
current state connection pool',
required=>1,
optional=>0,
format=>'integer'
),
- Validator->newInitialized(
+ SatConfig::cluster::Validator->newInitialized(
name=>'csdb_connpool_increment',
description=>'Incremental number of physical current state connections to be
opened when all the existing ones are busy and a new connection is requested.',
required=>1,
optional=>0,
format=>'integer'
),
- Validator->newInitialized(
+ SatConfig::cluster::Validator->newInitialized(
name=>'csdb_connpool_active_size',
description=>'kdykeman fix',
required=>1,
optional=>0,
format=>'integer'
),
- Validator->newInitialized(
+ SatConfig::cluster::Validator->newInitialized(
name=>'csdb_connpool_pool_size',
description=>'kdykeman fix',
required=>1,
optional=>0,
format=>'integer'
),
- Validator->newInitialized(
+ SatConfig::cluster::Validator->newInitialized(
name=>'csdb_connpool_timeout',
description=>'Specifies how much time must pass before an idle physical current
state connection is disconnected',
required=>1,
optional=>0,
format=>'integer'
),
- Validator->newInitialized(
+ SatConfig::cluster::Validator->newInitialized(
name=>'csdb_connpool_nowait',
description=>'Specifies whether to wait or return an error if the maximum
number of connections are in the pool and busy.',
required=>1,
optional=>0,
format=>'boolean'
),
- Validator->newInitialized(
+ SatConfig::cluster::Validator->newInitialized(
name=>'cfdb_connpool_min_limit',
description=>'The Minimum number of physical connections maintained by the
configuration connection pool',
required=>1,
optional=>0,
format=>'integer'
),
- Validator->newInitialized(
+ SatConfig::cluster::Validator->newInitialized(
name=>'cfdb_connpool_max_limit',
description=>'The Maximum number of physical connections maintained by the
configuration connection pool',
required=>1,
optional=>0,
format=>'integer'
),
- Validator->newInitialized(
+ SatConfig::cluster::Validator->newInitialized(
name=>'cfdb_connpool_increment',
description=>'Incremental number of physical current state connections to be
opened when all the existing ones are busy and a new connection is requested.',
required=>1,
optional=>0,
format=>'integer'
),
- Validator->newInitialized(
+ SatConfig::cluster::Validator->newInitialized(
name=>'cfdb_connpool_active_size',
description=>'kdykeman fix',
required=>1,
optional=>0,
format=>'integer'
),
- Validator->newInitialized(
+ SatConfig::cluster::Validator->newInitialized(
name=>'cfdb_connpool_pool_size',
description=>'kdykeman fix',
required=>1,
optional=>0,
format=>'integer'
),
- Validator->newInitialized(
+ SatConfig::cluster::Validator->newInitialized(
name=>'cfdb_connpool_timeout',
description=>'Specifies how much time must pass before an idle physical current
state connection is disconnected',
required=>1,
optional=>0,
format=>'integer'
),
- Validator->newInitialized(
+ SatConfig::cluster::Validator->newInitialized(
name=>'cfdb_connpool_nowait',
description=>'Specifies whether to wait or return an error if the maximum
number of connections are in the pool and busy.',
required=>1,
optional=>0,
format=>'boolean'
),
- Validator->newInitialized(
+ SatConfig::cluster::Validator->newInitialized(
name=>'http_minProcessors',
description=>'The number of http request processing threads that will be
created on startup. The default value is 5.',
required=>1,
optional=>0,
format=>'integer'
),
- Validator->newInitialized(
+ SatConfig::cluster::Validator->newInitialized(
name=>'http_maxProcessors',
description=>'The maximum number of simultaneous requests that can be handled
on the http port. The default value is 20.',
required=>1,
optional=>0,
format=>'integer'
),
- Validator->newInitialized(
+ SatConfig::cluster::Validator->newInitialized(
name=>'http_enableLookups',
description=>'Whether or not to perform DNS lookups to return the actual host
name of the remote client',
required=>1,
optional=>0,
format=>'boolean'
),
- Validator->newInitialized(
+ SatConfig::cluster::Validator->newInitialized(
name=>'http_redirectPort',
description=>'The ssl port if being used',
required=>1,
optional=>0,
format=>'integer'
),
- Validator->newInitialized(
+ SatConfig::cluster::Validator->newInitialized(
name=>'http_acceptCount',
description=>'The maximum queue length for incoming http connection requests
when all possible request processing threads are in use. Any requests received when the
queue is full will be refused.',
required=>1,
optional=>0,
format=>'integer'
),
- Validator->newInitialized(
+ SatConfig::cluster::Validator->newInitialized(
name=>'http_connectionTimeout',
description=>'The number of milliseconds to wait, after accepting a connection,
for the request URI line to be presented.',
required=>1,
optional=>0,
format=>'integer'
),
- Validator->newInitialized(
+ SatConfig::cluster::Validator->newInitialized(
name=>'ajp_minProcessors',
description=>'The number of ajp request processing threads that will be created
on startup. The default value is 5.',
required=>1,
optional=>0,
format=>'integer'
),
- Validator->newInitialized(
+ SatConfig::cluster::Validator->newInitialized(
name=>'ajp_maxProcessors',
description=>'The maximum number of simultaneous requests that can be handled
on the ajp port. The default value is 20.',
required=>1,
optional=>0,
format=>'integer'
),
- Validator->newInitialized(
+ SatConfig::cluster::Validator->newInitialized(
name=>'ajp_acceptCount',
description=>'The maximum queue length for incoming ajp connection requests
when all possible request processing threads are in use. Any requests received when the
queue is full will be refused.',
required=>1,
optional=>0,
format=>'integer'
),
- Validator->newInitialized(
+ SatConfig::cluster::Validator->newInitialized(
name=>'debugLevel',
description=>'The debugging detail level of log messages generated, with higher
numbers creating more detailed output.',
required=>1,
optional=>0,
format=>'integer'
),
- Validator->newInitialized(
+ SatConfig::cluster::Validator->newInitialized(
name=>'javaOpts',
description=>'Java runtime options passed on invocation of the java
process',
required=>0,
diff --git a/monitoring/SatConfig/cluster/VIP.pm b/monitoring/SatConfig/cluster/VIP.pm
index ba6306d..9bb3aa7 100644
--- a/monitoring/SatConfig/cluster/VIP.pm
+++ b/monitoring/SatConfig/cluster/VIP.pm
@@ -15,7 +15,7 @@ sub initialize
my ($self,@params) = @_;
$self->SUPER::initialize(@params);
$self->addValidators(
- Validator->newInitialized(
+ SatConfig::cluster::Validator->newInitialized(
name=>'network',
description=>'A network address',
required=>1,
commit 30c9b6740b8200b518d91d562dcabc5b16a8d17b
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Mon Nov 30 14:10:56 2009 +0100
Automatic commit of package [spacewalk-java] release [0.7.21-1].
diff --git a/java/spacewalk-java.spec b/java/spacewalk-java.spec
index 7b714f7..64e80d8 100644
--- a/java/spacewalk-java.spec
+++ b/java/spacewalk-java.spec
@@ -12,7 +12,7 @@ Name: spacewalk-java
Summary: Spacewalk Java site packages
Group: Applications/Internet
License: GPLv2
-Version: 0.7.20
+Version: 0.7.21
Release: 1%{?dist}
URL:
https://fedorahosted.org/spacewalk
Source0:
https://fedorahosted.org/releases/s/p/spacewalk/%{name}-%{version}.tar.gz
@@ -280,7 +280,7 @@ fi
%{jardir}/postgresql-jdbc.jar
%changelog
-* Mon Nov 30 2009 Tomas Lestach <tlestach(a)redhat.com> 0.7.20-1
+* Mon Nov 30 2009 Tomas Lestach <tlestach(a)redhat.com> 0.7.21-1
- checking return value of channel.getChecksum() (tlestach(a)redhat.com)
- adding checkstyle build dependency (tlestach(a)redhat.com)
- updating ant-contrib path (tlestach(a)redhat.com)
diff --git a/rel-eng/packages/spacewalk-java b/rel-eng/packages/spacewalk-java
index b3fcb5e..8528de5 100644
--- a/rel-eng/packages/spacewalk-java
+++ b/rel-eng/packages/spacewalk-java
@@ -1 +1 @@
-0.7.20-1 java/
+0.7.21-1 java/
commit b3ec1a16100870f30fd3a43a837e8b20d8bb2c6d
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Mon Nov 30 13:23:37 2009 +0100
Revert "updating ant-contrib path"
This reverts commit 18a5c54004991d12c360f317b97593e34bf0b2c1.
reverting commit because of koji build failures
ant-contrib-1.0-0.10.b2 (f12) has jars in /usr/share/java/ant/
ant-contrib-1.0-0.8.b2 (koji) has jars in /usr/share/java/
diff --git a/java/buildconf/build-props.xml b/java/buildconf/build-props.xml
index c4971aa..8d6576c 100644
--- a/java/buildconf/build-props.xml
+++ b/java/buildconf/build-props.xml
@@ -82,7 +82,7 @@
regexp tyrex jmock jmock-cglib strutstest gsbase" / -->
<property name="install.build.jar.dependencies"
- value="ant ant/ant-junit ant/ant-contrib antlr
+ value="ant ant/ant-junit ant-contrib antlr
${install.common.jar.dependencies} tanukiwrapper" />
<property name="install.run.jar.dependencies"
commit 9f3104668e5f5e4edd4bdf364e862fefd0fa34a9
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Mon Nov 30 13:22:13 2009 +0100
Automatic commit of package [spacewalk-monitoring-selinux] release [0.7.1-1].
diff --git a/rel-eng/packages/spacewalk-monitoring-selinux
b/rel-eng/packages/spacewalk-monitoring-selinux
index a8c15b6..a3bf77e 100644
--- a/rel-eng/packages/spacewalk-monitoring-selinux
+++ b/rel-eng/packages/spacewalk-monitoring-selinux
@@ -1 +1 @@
-0.6.13-1 selinux/spacewalk-monitoring-selinux/
+0.7.1-1 selinux/spacewalk-monitoring-selinux/
diff --git a/selinux/spacewalk-monitoring-selinux/spacewalk-monitoring-selinux.spec
b/selinux/spacewalk-monitoring-selinux/spacewalk-monitoring-selinux.spec
index 15e8597..90eeb44 100644
--- a/selinux/spacewalk-monitoring-selinux/spacewalk-monitoring-selinux.spec
+++ b/selinux/spacewalk-monitoring-selinux/spacewalk-monitoring-selinux.spec
@@ -7,7 +7,7 @@
%define modulename spacewalk-monitoring
Name: spacewalk-monitoring-selinux
-Version: 0.7.0
+Version: 0.7.1
Release: 1%{?dist}
Summary: SELinux policy module supporting Spacewalk monitoring
@@ -144,6 +144,10 @@ fi
%attr(0755,root,root) %{_sbindir}/%{name}-enable
%changelog
+* Mon Nov 30 2009 Jan Pazdziora 0.7.1-1
+- allow dequeue to utime the log file, to achieve heartbeating
+- bumping Version to 0.7.0 (jmatthew(a)redhat.com)
+
* Mon Aug 10 2009 Jan Pazdziora 0.6.13-1
- 516073 - allow monitoring to setpgid self
commit 1a394954ba61a0990958922e0fe76185feed8b60
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Mon Nov 30 13:18:01 2009 +0100
Allow dequeue to utime the log file, to achieve heartbeating.
On Fedora 12, setattr no longer seems to be in
create_files_pattern/append_files_pattern.
Addressing
avc: denied { setattr } for pid=23391 comm="dequeue"
name="dequeue.log" dev=dm-0 ino=79374
scontext=unconfined_u:system_r:spacewalk_monitoring_t:s0
tcontext=unconfined_u:object_r:spacewalk_monitoring_log_t:s0 tclass=file
diff --git a/selinux/spacewalk-monitoring-selinux/spacewalk-monitoring.te
b/selinux/spacewalk-monitoring-selinux/spacewalk-monitoring.te
index 6de55fd..c344ddd 100644
--- a/selinux/spacewalk-monitoring-selinux/spacewalk-monitoring.te
+++ b/selinux/spacewalk-monitoring-selinux/spacewalk-monitoring.te
@@ -52,6 +52,7 @@ dev_read_urand(spacewalk_monitoring_t)
logging_log_filetrans(spacewalk_monitoring_t, spacewalk_monitoring_log_t, file)
create_files_pattern(spacewalk_monitoring_t, var_log_t, spacewalk_monitoring_log_t)
append_files_pattern(spacewalk_monitoring_t, var_log_t, spacewalk_monitoring_log_t)
+allow spacewalk_monitoring_t spacewalk_monitoring_log_t:file setattr;
files_pid_filetrans(spacewalk_monitoring_t, spacewalk_monitoring_var_run_t, file)
manage_files_pattern(spacewalk_monitoring_t, var_run_t, spacewalk_monitoring_var_run_t)
commit b1ab7272f95ae42c3fb19d214d78e1e596827bc3
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Mon Nov 30 11:57:00 2009 +0100
Automatic commit of package [spacewalk-web] release [0.7.7-1].
diff --git a/rel-eng/packages/spacewalk-web b/rel-eng/packages/spacewalk-web
index befe346..8d36807 100644
--- a/rel-eng/packages/spacewalk-web
+++ b/rel-eng/packages/spacewalk-web
@@ -1 +1 @@
-0.7.6-1 web/
+0.7.7-1 web/
diff --git a/web/spacewalk-web.spec b/web/spacewalk-web.spec
index 6009b1b..465a503 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: 0.7.6
+Version: 0.7.7
Release: 1%{?dist}
URL:
https://fedorahosted.org/spacewalk
Source0:
https://fedorahosted.org/releases/s/p/spacewalk/%{name}-%{version}.tar.gz
@@ -317,6 +317,9 @@ rm -rf $RPM_BUILD_ROOT
# $Id$
%changelog
+* Mon Nov 30 2009 Miroslav Suchý <msuchy(a)redhat.com> 0.7.7-1
+- add variable web.chat_enabled to config file
+
* Thu Nov 19 2009 Michael Mraka <michael.mraka(a)redhat.com> 0.7.6-1
- 531649 - fixed confirmation message after channel merge/compare
- 527881 - fixed set clearing on the channel merge page
commit fddfcbae3505b3286b90425e10a2e174c060a183
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Mon Nov 30 11:49:42 2009 +0100
add variable web.chat_enabled to config file
addressing:
[error] config web.chat_enabled not in master config list in PXT::Config at
/usr/lib/perl5/vendor_perl/5.10.0/PXT/Config.pm line 163.
diff --git a/web/conf/rhn_web.conf b/web/conf/rhn_web.conf
index 1bb5e55..1f05c90 100644
--- a/web/conf/rhn_web.conf
+++ b/web/conf/rhn_web.conf
@@ -331,3 +331,5 @@ web.subscribe_proxy_channel = 0
# and can be used forever. (i.e. kernel,kernel-smp,kernel-xen)
web.non_expirable_package_urls =
+# allow users to chat with spacewalk members on IRC via the web
+web.chat_enabled = 0
commit af087fd1ddbc3457c1f6af79f0537cf084edbfa4
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Mon Nov 30 11:52:09 2009 +0100
Automatic commit of package [spacewalk-java] release [0.7.20-1].
diff --git a/java/spacewalk-java.spec b/java/spacewalk-java.spec
index 081c085..7b714f7 100644
--- a/java/spacewalk-java.spec
+++ b/java/spacewalk-java.spec
@@ -12,7 +12,7 @@ Name: spacewalk-java
Summary: Spacewalk Java site packages
Group: Applications/Internet
License: GPLv2
-Version: 0.7.19
+Version: 0.7.20
Release: 1%{?dist}
URL:
https://fedorahosted.org/spacewalk
Source0:
https://fedorahosted.org/releases/s/p/spacewalk/%{name}-%{version}.tar.gz
@@ -280,6 +280,11 @@ fi
%{jardir}/postgresql-jdbc.jar
%changelog
+* Mon Nov 30 2009 Tomas Lestach <tlestach(a)redhat.com> 0.7.20-1
+- checking return value of channel.getChecksum() (tlestach(a)redhat.com)
+- adding checkstyle build dependency (tlestach(a)redhat.com)
+- updating ant-contrib path (tlestach(a)redhat.com)
+
* Wed Nov 25 2009 Miroslav Suchý <msuchy(a)redhat.com> 0.7.19-1
- improving the system channels page by increasing the base channel selector box size and
having the custom channels sorted by name (jsherril(a)redhat.com)
- another small display issue fix for list (jsherril(a)redhat.com)
diff --git a/rel-eng/packages/spacewalk-java b/rel-eng/packages/spacewalk-java
index 1351249..b3fcb5e 100644
--- a/rel-eng/packages/spacewalk-java
+++ b/rel-eng/packages/spacewalk-java
@@ -1 +1 @@
-0.7.19-1 java/
+0.7.20-1 java/
commit c51d755737a75b8e624f9983054f004008fe753e
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Mon Nov 30 11:45:38 2009 +0100
checking return value of channel.getChecksum()
null as return value caused a NullPointerException in
com.redhat.rhn.taskomatic.task.ChannelRepodata
diff --git a/java/code/src/com/redhat/rhn/taskomatic/task/repomd/RepositoryWriter.java
b/java/code/src/com/redhat/rhn/taskomatic/task/repomd/RepositoryWriter.java
index 37ba643..5bba05d 100644
--- a/java/code/src/com/redhat/rhn/taskomatic/task/repomd/RepositoryWriter.java
+++ b/java/code/src/com/redhat/rhn/taskomatic/task/repomd/RepositoryWriter.java
@@ -56,7 +56,7 @@ public class RepositoryWriter {
private String pathPrefix;
private String mountPoint;
private String checksumtype;
- private String checksumname;
+ private String checksumname = null;
/**
* Constructor takes in pathprefix and mountpoint
@@ -106,7 +106,9 @@ public class RepositoryWriter {
// Get compatible checksumType
this.checksumtype = channel.getChecksumType();
- this.checksumname = channel.getChecksum().getDescription();
+ if (channel.getChecksum() != null) {
+ this.checksumname = channel.getChecksum().getDescription();
+ }
log.info("Checksum Type Value" + this.checksumtype);
commit 031bd4f0c5aaa5079f14bcc48b0a136044b52ef5
Author: Milan Zazrivec <mzazrivec(a)redhat.com>
Date: Mon Nov 30 11:32:15 2009 +0100
Drop tables in correct order
rhn_db_environment references rhn_environment(name). We need to swap
the order in which we drop the tables to avoid following error:
ORA-02449: unique/primary keys in table referenced by foreign keys
diff --git
a/schema/spacewalk/upgrade/spacewalk-schema-0.6-to-spacewalk-schema-0.7/002-rhn_db_environment-rhn_environment-drop.sql
b/schema/spacewalk/upgrade/spacewalk-schema-0.6-to-spacewalk-schema-0.7/002-rhn_db_environment-rhn_environment-drop.sql
index b601a7d..489d2f4 100644
---
a/schema/spacewalk/upgrade/spacewalk-schema-0.6-to-spacewalk-schema-0.7/002-rhn_db_environment-rhn_environment-drop.sql
+++
b/schema/spacewalk/upgrade/spacewalk-schema-0.6-to-spacewalk-schema-0.7/002-rhn_db_environment-rhn_environment-drop.sql
@@ -9,5 +9,5 @@ alter table rhn_config_macro add constraint rhn_confm_name_pk primary key
(name)
alter table rhn_config_macro drop column environment;
-drop table rhn_environment;
drop table rhn_db_environment;
+drop table rhn_environment;
commit 148b1b50d5af4d26b6bad86e130fef41b61187d0
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Fri Nov 27 17:32:13 2009 +0100
Automatic commit of package [oracle-selinux] minor release [0.1-23.12].
diff --git a/rel-eng/packages/oracle-selinux b/rel-eng/packages/oracle-selinux
index 4ee2d27..8799b81 100644
--- a/rel-eng/packages/oracle-selinux
+++ b/rel-eng/packages/oracle-selinux
@@ -1 +1 @@
-0.1-23.11 selinux/oracle-selinux/
+0.1-23.12 selinux/oracle-selinux/
diff --git a/selinux/oracle-selinux/oracle-selinux.spec
b/selinux/oracle-selinux/oracle-selinux.spec
index afde67a..6c174be 100644
--- a/selinux/oracle-selinux/oracle-selinux.spec
+++ b/selinux/oracle-selinux/oracle-selinux.spec
@@ -20,7 +20,7 @@
Name: oracle-selinux
Version: 0.1
-Release: 23.11%{?obtag}%{?dist}%{?repo}
+Release: 23.12%{?obtag}%{?dist}%{?repo}
Summary: SELinux policy module supporting Oracle
Group: System Environment/Base
License: GPLv2+
@@ -205,6 +205,9 @@ fi
%attr(0755,root,root) %{_sbindir}/oracle-nofcontext-selinux-enable
%changelog
+* Fri Nov 27 2009 Jan Pazdziora 0.1-23.12
+- Use read_files_pattern to get open on Fedora 11
+
* Mon Aug 03 2009 Jan Pazdziora 0.1-23.11
- /usr/sbin/oracle-nofcontext-selinux-enable needs semanage, let's add it to
Requires everywhere
commit a4800bfda286d9aabc8b8478f8b4012d60a6374c
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Fri Nov 27 17:27:30 2009 +0100
Use read_files_pattern instead of just listing allows, to get open on Fedora 11.
Addressing
avc: denied { open } for pid=17434 comm="sqlplus"
name="select-from-dual.sql" dev=dm-0 ino=101925
scontext=unconfined_u:unconfined_r:oracle_sqlplus_t:s0-s0:c0.c1023
tcontext=system_u:object_r:tmp_t:s0 tclass=file
diff --git a/selinux/oracle-selinux/oracle.te b/selinux/oracle-selinux/oracle.te
index e1e5b06..96de268 100644
--- a/selinux/oracle-selinux/oracle.te
+++ b/selinux/oracle-selinux/oracle.te
@@ -171,7 +171,7 @@ allow oracle_db_t oracle_tnslsnr_t:fifo_file { rw_file_perms };
allow oracle_db_t oracle_tnslsnr_t:tcp_socket { rw_socket_perms };
# Allow sqlplus to read shell redirects
-allow oracle_sqlplus_t tmp_t:file { read ioctl getattr };
+read_files_pattern(oracle_sqlplus_t, tmp_t, tmp_t)
# sqlplus can run sql scripts
oracle_script(oracle_sqlplus_t)
commit 59820a6d076bd359c63f05ac6e1425abde1af7d0
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Fri Nov 27 16:04:52 2009 +0100
Automatic commit of package [spacewalk] release [0.7.4-1].
diff --git a/rel-eng/packages/spacewalk b/rel-eng/packages/spacewalk
index e80cb1b..dd84064 100644
--- a/rel-eng/packages/spacewalk
+++ b/rel-eng/packages/spacewalk
@@ -1 +1 @@
-0.7.3-1 spacewalk/package/
+0.7.4-1 spacewalk/package/
diff --git a/spacewalk/package/spacewalk.spec b/spacewalk/package/spacewalk.spec
index b9ac400..0294138 100644
--- a/spacewalk/package/spacewalk.spec
+++ b/spacewalk/package/spacewalk.spec
@@ -1,7 +1,7 @@
%define release_name Gemini
Name: spacewalk
-Version: 0.7.3
+Version: 0.7.4
Release: 1%{?dist}
Summary: Spacewalk Systems Management Application
URL:
https://fedorahosted.org/spacewalk
@@ -163,6 +163,9 @@ rm -rf %{buildroot}
%{_datadir}/spacewalk/setup/defaults.d/postgresql-backend.conf
%changelog
+* Fri Nov 27 2009 Jan Pazdziora 0.7.4-1
+- Disable jabberd-selinux for Fedora 11+, enable spacewalk-selinux
+
* Wed Nov 25 2009 Miroslav Suchý <msuchy(a)redhat.com> 0.7.3-1
- Make spacewalk require the editarea RPM (colin.coe(a)gmail.com)
commit b1105badf214684f26480ecd3fe75c863b11e183
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Fri Nov 27 16:04:32 2009 +0100
Disable jabberd-selinux for Fedora 11+, enable spacewalk-selinux.
diff --git a/spacewalk/package/spacewalk.spec b/spacewalk/package/spacewalk.spec
index e175793..b9ac400 100644
--- a/spacewalk/package/spacewalk.spec
+++ b/spacewalk/package/spacewalk.spec
@@ -77,13 +77,12 @@ Requires: spacewalk-monitoring
# SELinux
Requires: osa-dispatcher-selinux
Requires: spacewalk-monitoring-selinux
-%if 0%{?fedora} == 11
+Requires: spacewalk-selinux
+
+%if 0%{?fedora} >= 11
%else
-# Fedora 11 has its own selinux policy for jabberd:
+# Fedoras 11+ have their own selinux policy for jabberd:
Requires: jabberd-selinux
-
-# Replace these for Fedora 11 when possible:
-Requires: spacewalk-selinux
%endif
Requires: editarea
commit 3abf251202aa4431fb3c6d1da5a4c812e8f3cb95
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Fri Nov 27 15:04:13 2009 +0100
Automatic commit of package [spacewalk-repo] minor release [0.7-4].
diff --git a/rel-eng/packages/spacewalk-repo b/rel-eng/packages/spacewalk-repo
index 5ed61d8..e6bb2e9 100644
--- a/rel-eng/packages/spacewalk-repo
+++ b/rel-eng/packages/spacewalk-repo
@@ -1 +1 @@
-0.7-3 spec-tree/spacewalk-repo/
+0.7-4 spec-tree/spacewalk-repo/
diff --git a/spec-tree/spacewalk-repo/spacewalk-repo.spec
b/spec-tree/spacewalk-repo/spacewalk-repo.spec
index e1c406d..3372e86 100644
--- a/spec-tree/spacewalk-repo/spacewalk-repo.spec
+++ b/spec-tree/spacewalk-repo/spacewalk-repo.spec
@@ -1,7 +1,7 @@
Summary: Spacewalk packages yum repository configuration
Name: spacewalk-repo
Version: 0.7
-Release: 3%{?dist}
+Release: 4%{?dist}
License: GPLv2
Group: System Environment/Base
# This src.rpm is cannonical upstream
@@ -67,6 +67,9 @@ rm -rf $RPM_BUILD_ROOT
%config %{_sysconfdir}/yum.repos.d/spacewalk-client.repo
%changelog
+* Fri Nov 27 2009 Miroslav Suchý <msuchy(a)redhat.com> 0.7-4
+- create subpackage spacewalk-client-repo
+
* Fri Oct 16 2009 Michael Mraka <michael.mraka(a)redhat.com> 0.7-3
- fixed version of spacewalk-repo
commit c8cc6c55fb75dbfd88290f1149ed8e1499e35521
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Fri Nov 27 14:52:24 2009 +0100
fix rpmlint warning
addressing:
spacewalk-repo.noarch: W: non-standard-group Development
diff --git a/spec-tree/spacewalk-repo/spacewalk-repo.spec
b/spec-tree/spacewalk-repo/spacewalk-repo.spec
index c38b1be..e1c406d 100644
--- a/spec-tree/spacewalk-repo/spacewalk-repo.spec
+++ b/spec-tree/spacewalk-repo/spacewalk-repo.spec
@@ -3,7 +3,7 @@ Name: spacewalk-repo
Version: 0.7
Release: 3%{?dist}
License: GPLv2
-Group: Development
+Group: System Environment/Base
# This src.rpm is cannonical upstream
# You can obtain it using this set of commands
# git clone
git://git.fedorahosted.org/git/spacewalk.git/
commit 1a00107932c262e5f7d2015b14da56b83f45953d
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Fri Nov 27 14:51:28 2009 +0100
fix rpmlint warning
addressing:
spacewalk-repo.noarch: W: invalid-license GPL
diff --git a/spec-tree/spacewalk-repo/spacewalk-repo.spec
b/spec-tree/spacewalk-repo/spacewalk-repo.spec
index 984d176..c38b1be 100644
--- a/spec-tree/spacewalk-repo/spacewalk-repo.spec
+++ b/spec-tree/spacewalk-repo/spacewalk-repo.spec
@@ -2,7 +2,7 @@ Summary: Spacewalk packages yum repository configuration
Name: spacewalk-repo
Version: 0.7
Release: 3%{?dist}
-License: GPL
+License: GPLv2
Group: Development
# This src.rpm is cannonical upstream
# You can obtain it using this set of commands
commit 68115da6bf5b9135d89b42df57c12b48f2faf95b
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Fri Nov 27 14:50:59 2009 +0100
fix rpmlint warning
addressing:
spacewalk-repo.noarch: W: summary-ended-with-dot Spacewalk packages yum repository
configuration.
diff --git a/spec-tree/spacewalk-repo/spacewalk-repo.spec
b/spec-tree/spacewalk-repo/spacewalk-repo.spec
index 3f487c3..984d176 100644
--- a/spec-tree/spacewalk-repo/spacewalk-repo.spec
+++ b/spec-tree/spacewalk-repo/spacewalk-repo.spec
@@ -1,4 +1,4 @@
-Summary: Spacewalk packages yum repository configuration.
+Summary: Spacewalk packages yum repository configuration
Name: spacewalk-repo
Version: 0.7
Release: 3%{?dist}
commit eb9a84d56f29c13c71dc96076cef53c728e8c0c7
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Fri Nov 27 14:50:21 2009 +0100
create subpackage spacewalk-client-repo
diff --git a/spec-tree/spacewalk-repo/spacewalk-repo.spec
b/spec-tree/spacewalk-repo/spacewalk-repo.spec
index 58db28a..3f487c3 100644
--- a/spec-tree/spacewalk-repo/spacewalk-repo.spec
+++ b/spec-tree/spacewalk-repo/spacewalk-repo.spec
@@ -16,6 +16,13 @@ BuildArch: noarch
%description
This package contains the Spacewalk repository configuration for yum.
+%package -n spacewalk-client-repo
+Summary: Spacewalk client packages yum repository configuration
+Group: System Environment/Base
+
+%description -n spacewalk-client-repo
+This package contains the Spacewalk repository configuration for yum.
+
%prep
mkdir -p $RPM_BUILD_ROOT
@@ -39,6 +46,15 @@ enabled=1
gpgcheck=1
REPO
+cat >>$RPM_BUILD_ROOT%{_sysconfdir}/yum.repos.d/spacewalk-client.repo <<REPO
+[spacewalk-client]
+name=Spacewalk Client Tools
+baseurl=http://spacewalk.redhat.com/yum/%{version}-client/%{reposubdir}/\$basearch/
+gpgkey=http://spacewalk.redhat.com/yum/RPM-GPG-KEY-spacewalk
+enabled=1
+gpgcheck=1
+REPO
+
%clean
rm -rf $RPM_BUILD_ROOT
@@ -46,6 +62,10 @@ rm -rf $RPM_BUILD_ROOT
%defattr(-,root,root,-)
%config %{_sysconfdir}/yum.repos.d/spacewalk.repo
+%files -n spacewalk-client-repo
+%defattr(-,root,root,-)
+%config %{_sysconfdir}/yum.repos.d/spacewalk-client.repo
+
%changelog
* Fri Oct 16 2009 Michael Mraka <michael.mraka(a)redhat.com> 0.7-3
- fixed version of spacewalk-repo
commit 6d4934170bb5848739900505ab777eefd7f11902
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Fri Nov 27 14:22:23 2009 +0100
437822 - python dependecy is not picked up automatically
diff --git a/client/rhel/yum-rhn-plugin/yum-rhn-plugin.spec
b/client/rhel/yum-rhn-plugin/yum-rhn-plugin.spec
index ae9cb2f..2c13903 100644
--- a/client/rhel/yum-rhn-plugin/yum-rhn-plugin.spec
+++ b/client/rhel/yum-rhn-plugin/yum-rhn-plugin.spec
@@ -17,6 +17,7 @@ BuildRequires: gettext
Requires: yum >= 3.2.19-15
Requires: rhn-client-tools >= 0.4.20-2
Requires: m2crypto >= 0.16-6
+Requires: python-iniparse
# Not really, but for upgrades we need these
Requires: rhn-setup
commit 1cdda86fa530edb90bb201cc929d1a74efd0323f
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Fri Nov 27 14:21:19 2009 +0100
Automatic commit of package [oracle-xe-selinux] minor release [10.2-15].
diff --git a/rel-eng/packages/oracle-xe-selinux b/rel-eng/packages/oracle-xe-selinux
index f2e2e2b..15a93f8 100644
--- a/rel-eng/packages/oracle-xe-selinux
+++ b/rel-eng/packages/oracle-xe-selinux
@@ -1 +1 @@
-10.2-14 selinux/oracle-xe-selinux/
+10.2-15 selinux/oracle-xe-selinux/
diff --git a/selinux/oracle-xe-selinux/oracle-xe-selinux.spec
b/selinux/oracle-xe-selinux/oracle-xe-selinux.spec
index e0f1f8e..003d3ed 100644
--- a/selinux/oracle-xe-selinux/oracle-xe-selinux.spec
+++ b/selinux/oracle-xe-selinux/oracle-xe-selinux.spec
@@ -6,7 +6,7 @@
Name: oracle-xe-selinux
Version: 10.2
-Release: 14%{?dist}
+Release: 15%{?dist}
Summary: SELinux policy module supporting Oracle XE
Group: System Environment/Base
License: GPLv2+
@@ -138,6 +138,9 @@ fi
%attr(0755,root,root) %{_sbindir}/%{name}-enable
%changelog
+* Fri Nov 27 2009 Jan Pazdziora 10.2-15
+- Change the port from 9000 to 9055.
+
* Thu Nov 26 2009 Jan Pazdziora 10.2-14
- In RHEL5 one process reading information on another in the /proc directory
caused a ptrace access check, allow
commit f3731464f665997c86594e69cf48f05a039d3c42
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Fri Nov 27 14:19:16 2009 +0100
Due to change in bugzilla 533908, on Fedora 12 the port 9000 is now hardcoded in the
policy. We shall use 9055 now.
diff --git a/selinux/oracle-xe-selinux/oracle-xe-selinux-enable
b/selinux/oracle-xe-selinux/oracle-xe-selinux-enable
index 5e471ce..e2abdf7 100644
--- a/selinux/oracle-xe-selinux/oracle-xe-selinux-enable
+++ b/selinux/oracle-xe-selinux/oracle-xe-selinux-enable
@@ -7,7 +7,7 @@ for selinuxvariant in mls strict targeted
/usr/share/selinux/${selinuxvariant}/oracle-xe.pp &> /dev/null || :
done
-/usr/sbin/semanage port -a -t oracle_port_t -p tcp 9000 || :
+/usr/sbin/semanage port -a -t oracle_port_t -p tcp 9055 || :
# Relabel oracle-xe-univ's files
rpm -ql oracle-xe-univ | xargs -n 100 /sbin/restorecon -Rivv
diff --git a/selinux/oracle-xe-selinux/oracle-xe-selinux.spec
b/selinux/oracle-xe-selinux/oracle-xe-selinux.spec
index aadf6ed..e0f1f8e 100644
--- a/selinux/oracle-xe-selinux/oracle-xe-selinux.spec
+++ b/selinux/oracle-xe-selinux/oracle-xe-selinux.spec
@@ -121,6 +121,7 @@ if [ $1 -eq 0 ]; then
done
/usr/sbin/semanage port -d -t oracle_port_t -p tcp 9000 || :
+ /usr/sbin/semanage port -d -t oracle_port_t -p tcp 9055 || :
# Clean up oracle-xe-univ's files
rpm -ql oracle-xe-univ | xargs -n 100 /sbin/restorecon -Rivv
commit ce560b1c1e1b12161eccf935803539e7b8c312c2
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Fri Nov 27 14:05:00 2009 +0100
437822 - when persistent enable/disable of rhn repo is requested, do it in
rhnplugin.conf
diff --git a/client/rhel/yum-rhn-plugin/rhnplugin.py
b/client/rhel/yum-rhn-plugin/rhnplugin.py
index b38271a..23f4e5d 100644
--- a/client/rhel/yum-rhn-plugin/rhnplugin.py
+++ b/client/rhel/yum-rhn-plugin/rhnplugin.py
@@ -16,7 +16,7 @@ import yum.Errors
from urlgrabber.grabber import URLGrabber
from urlgrabber.grabber import URLGrabError
-
+from iniparse import INIConfig
import gettext
_ = gettext.gettext
@@ -245,6 +245,7 @@ class RhnRepo(YumRepository):
def __init__(self, channel):
YumRepository.__init__(self, channel['label'])
self.name = channel['name']
+ self.label = channel['label']
self._callbacks_changed = False
# support failover urls, #232567
@@ -444,18 +445,31 @@ class RhnRepo(YumRepository):
grabfunc = property(lambda self: self._getgrabfunc())
grab = property(lambda self: self._getgrab())
+ def _setChannelEnable(self, value=1):
+ """ Enable or disable channel in file rhnplugin.conf.
+ channel is label of channel and value should be 1 or 0.
+ """
+ cfg = INIConfig(file('/etc/yum/pluginconf.d/rhnplugin.conf'))
+ # we cannot use directly cfg[channel].['enabled'], because
+ # if that section do not exist it raise error
+ func=getattr(cfg, self.label)
+ func.enabled=value
+ f=open('/etc/yum/pluginconf.d/rhnplugin.conf', 'w')
+ print >>f, cfg
+ f.close()
+
def enablePersistent(self):
"""
- Despite name, this method does not alter persistent data
- It enables the repo temporarily
+ Persistently enable channel in rhnplugin.conf
"""
+ self._setChannelEnable(1)
self.enable()
def disablePersistent(self):
"""
- Despite name, this method does not alter persistent data
- It disables the repo temporarily
+ Persistently disable channel in rhnplugin.conf
"""
+ self._setChannelEnable(0)
self.disable()
def _getRepoXML(self):
commit 116344e5a23cc1fe7da54f3fb07607de03b1b803
Author: Milan Zazrivec <mzazrivec(a)redhat.com>
Date: Thu Nov 26 21:11:54 2009 +0100
541262 - revised networkRetries logic
* treat all values less or equal to zero as: make exactly one connection
attempt
* treat all values greater than zero as: make exactly that many connection
attempts
According to this specifying one or zero will have the same effect
(i.e. exactly one connection attempt).
diff --git a/client/rhel/rhn-client-tools/src/up2date_client/rpcServer.py
b/client/rhel/rhn-client-tools/src/up2date_client/rpcServer.py
index 1a810d9..6e0794e 100644
--- a/client/rhel/rhn-client-tools/src/up2date_client/rpcServer.py
+++ b/client/rhel/rhn-client-tools/src/up2date_client/rpcServer.py
@@ -191,10 +191,10 @@ def doCall(method, *args, **kwargs):
ret = None
attempt_count = 1
- if cfg["networkRetries"]:
- attempts = cfg["networkRetries"] or 5
+ if cfg["networkRetries"] <= 0:
+ attempts = 1
else:
- attempts = 0
+ attempts = cfg["networkRetries"]
while 1:
failure = 0
commit 101cc01226d8d5ad165e21c122733aad1dae4f8c
Author: Milan Zazrivec <mzazrivec(a)redhat.com>
Date: Thu Nov 26 18:53:56 2009 +0100
541682 - make env. for rhn_check consistent with osad
diff --git a/client/rhel/rhnsd/rhnsd.c b/client/rhel/rhnsd/rhnsd.c
index 5a21e70..d41f7a0 100644
--- a/client/rhel/rhnsd/rhnsd.c
+++ b/client/rhel/rhnsd/rhnsd.c
@@ -355,7 +355,6 @@ static int rhn_do_action(void)
if ((child = fork()) == 0) {
/* Okay, maybe we're too paranoid... */
char *args[] = { NULL, NULL };
- char *envp[] = { NULL };
/* close the read end of the pipe */
close(fds[0]);
@@ -374,7 +373,7 @@ static int rhn_do_action(void)
unset_signal_handlers ();
/* exec binary helper */
args[0] = RHN_CHECK;
- execve(RHN_CHECK, args, envp);
+ execv(RHN_CHECK, args);
/* should not get here: exit with error */
set_signal_handlers ();
commit bcb5bf5fe279e12cb3f990dab0bd1305994a0d01
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Thu Nov 26 14:57:22 2009 +0100
Automatic commit of package [oracle-xe-selinux] minor release [10.2-14].
diff --git a/rel-eng/packages/oracle-xe-selinux b/rel-eng/packages/oracle-xe-selinux
index 62c6ea0..f2e2e2b 100644
--- a/rel-eng/packages/oracle-xe-selinux
+++ b/rel-eng/packages/oracle-xe-selinux
@@ -1 +1 @@
-10.2-13 selinux/oracle-xe-selinux/
+10.2-14 selinux/oracle-xe-selinux/
diff --git a/selinux/oracle-xe-selinux/oracle-xe-selinux.spec
b/selinux/oracle-xe-selinux/oracle-xe-selinux.spec
index 4c5ec6a..aadf6ed 100644
--- a/selinux/oracle-xe-selinux/oracle-xe-selinux.spec
+++ b/selinux/oracle-xe-selinux/oracle-xe-selinux.spec
@@ -6,7 +6,7 @@
Name: oracle-xe-selinux
Version: 10.2
-Release: 13%{?dist}
+Release: 14%{?dist}
Summary: SELinux policy module supporting Oracle XE
Group: System Environment/Base
License: GPLv2+
@@ -137,6 +137,10 @@ fi
%attr(0755,root,root) %{_sbindir}/%{name}-enable
%changelog
+* Thu Nov 26 2009 Jan Pazdziora 10.2-14
+- In RHEL5 one process reading information on another in the /proc directory
+ caused a ptrace access check, allow
+
* Mon Aug 03 2009 Jan Pazdziora 10.2-13
- Use rw_files_pattern instead of direct allows, to get open on new Fedoras
commit f73e3d94c589a634a972ac1d86583d5a34635836
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Thu Nov 26 14:50:17 2009 +0100
In RHEL5 one process reading information on another in the /proc directory caused a
ptrace access check.
Addressing
avc: denied { ptrace } for pid=14422 comm="oracle"
scontext=system_u:system_r:oracle_db_t:s0 tcontext=system_u:system_r:oracle_db_t:s0
tclass=process
diff --git a/selinux/oracle-xe-selinux/oracle-xe.te
b/selinux/oracle-xe-selinux/oracle-xe.te
index 7094acf..8647094 100644
--- a/selinux/oracle-xe-selinux/oracle-xe.te
+++ b/selinux/oracle-xe-selinux/oracle-xe.te
@@ -30,3 +30,5 @@ dontaudit oracle_tnslsnr_t http_cache_port_t:tcp_socket name_bind;
allow oracle_db_t initrc_t:fifo_file { read ioctl };
+allow oracle_db_t self:process ptrace;
+
commit 2e45cda027ee65bdec07fe66e7d451dc12118a35
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Thu Nov 26 14:30:06 2009 +0100
fix reference to config dir
diff --git a/rel-eng/koji-missing-builds.py b/rel-eng/koji-missing-builds.py
index 5481380..e311e77 100755
--- a/rel-eng/koji-missing-builds.py
+++ b/rel-eng/koji-missing-builds.py
@@ -11,7 +11,7 @@ from optparse import OptionParser
import ConfigParser
config = ConfigParser.RawConfigParser()
-config.read('global.build.py.props')
+config.read(["tito.props", "rel-eng/tito.props"])
usage = "usage: %prog [options] <tag to check>"
parser = OptionParser(usage, version='%prog 0.0.1')
commit c291df98d2e05f39988fadf732bb5a4fd3511dae
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Thu Nov 26 13:38:16 2009 +0100
Automatic commit of package [oracle-instantclient-selinux] minor release [10.2-17].
diff --git a/rel-eng/packages/oracle-instantclient-selinux
b/rel-eng/packages/oracle-instantclient-selinux
index dcaf6e5..8efbd98 100644
--- a/rel-eng/packages/oracle-instantclient-selinux
+++ b/rel-eng/packages/oracle-instantclient-selinux
@@ -1 +1 @@
-10.2-16 selinux/oracle-instantclient-selinux/
+10.2-17 selinux/oracle-instantclient-selinux/
diff --git a/selinux/oracle-instantclient-selinux/oracle-instantclient-selinux.spec
b/selinux/oracle-instantclient-selinux/oracle-instantclient-selinux.spec
index c7e1cf2..f1241b3 100644
--- a/selinux/oracle-instantclient-selinux/oracle-instantclient-selinux.spec
+++ b/selinux/oracle-instantclient-selinux/oracle-instantclient-selinux.spec
@@ -1,7 +1,7 @@
Name: oracle-instantclient-selinux
Version: 10.2
-Release: 16%{?dist}
+Release: 17%{?dist}
Summary: SELinux support for Oracle Instant Client
Group: System Environment/Base
License: GPLv2+
@@ -111,6 +111,9 @@ fi
%attr(0755,root,root) %{_sbindir}/oracle-instantclient-sqlplus-selinux-enable
%changelog
+* Thu Nov 26 2009 Jan Pazdziora 10.2-17
+- On 64bit platform, the libsqlplusic.so needs textrel_shlib_t
+
* Wed Sep 09 2009 Michael Mraka <michael.mraka(a)redhat.com> 10.2-16
- 506951 - execstack -c moved to instantclient packages
commit 21dcf58b74f58093371e70ae5a25e0f81781aa77
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Thu Nov 26 13:35:36 2009 +0100
On 64bit platform, the libsqlplusic.so needs textrel_shlib_t.
Otherwise, running sqlplus leads to
# sqlplus
Error 6 initializing SQL*Plus
Message file sp1<lang>.msb not found
SP2-0750: You may need to set ORACLE_HOME to your Oracle software directory
under Enforcing even if the system is otherwise configured
properly.
Addressing
avc: denied { execmod } for pid=8809 comm="sqlplus"
path="/usr/lib/oracle/10.2.0.4/client64/lib/libsqlplusic.so" dev=dm-0 ino=97651
scontext=unconfined_u:unconfined_r:oracle_sqlplus_t:s0-s0:c0.c1023
tcontext=system_u:object_r:lib_t:s0 tclass=file
diff --git a/selinux/oracle-instantclient-selinux/oracle-instantclient-selinux.spec
b/selinux/oracle-instantclient-selinux/oracle-instantclient-selinux.spec
index 700ff2a..c7e1cf2 100644
--- a/selinux/oracle-instantclient-selinux/oracle-instantclient-selinux.spec
+++ b/selinux/oracle-instantclient-selinux/oracle-instantclient-selinux.spec
@@ -59,6 +59,7 @@ cat <<'EOS' >
%{buildroot}%{_sbindir}/oracle-instantclient-sqlplus-selinux-enabl
/usr/sbin/semanage fcontext -a -t oracle_sqlplus_exec_t
'/usr/lib/oracle/10\.2\..*/client.*/bin/sqlplus'
/usr/sbin/semanage fcontext -a -t textrel_shlib_t
'/usr/lib/oracle/10\.2\..*/client.*/lib/libsqlplus\.so'
+/usr/sbin/semanage fcontext -a -t textrel_shlib_t
'/usr/lib/oracle/10\.2\..*/client64/lib/libsqlplusic\.so'
/sbin/restorecon -Rvv /usr/lib/oracle/10.2.*/client* || :
EOS
commit 16d247b4ca80fd07eb6d5139adcef44ef90d8542
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Thu Nov 26 11:17:20 2009 +0100
514467 - when we say RHN is disabled, we may actually really disable it
diff --git a/client/rhel/yum-rhn-plugin/rhnplugin.py
b/client/rhel/yum-rhn-plugin/rhnplugin.py
index e7af545..b38271a 100644
--- a/client/rhel/yum-rhn-plugin/rhnplugin.py
+++ b/client/rhel/yum-rhn-plugin/rhnplugin.py
@@ -133,6 +133,7 @@ def init_hook(conduit):
except up2dateErrors.NoSystemIdError:
conduit.error(0, _("This system may not be a registered to RHN. SystemId
could not be acquired.\n") +
RHN_DISABLED)
+ rhn_enabled = False
return
except up2dateErrors.RhnServerException, e:
conduit.error(0, COMMUNICATION_ERROR + "\n" + CHANNELS_DISABLED +
commit 1762792b05696897cf71a95f7bb3f5a47c0a0995
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Thu Nov 26 10:18:46 2009 +0100
Automatic commit of package [jabberd-selinux] release [1.4.7-1].
diff --git a/rel-eng/packages/jabberd-selinux b/rel-eng/packages/jabberd-selinux
index 779ef0c..f597614 100644
--- a/rel-eng/packages/jabberd-selinux
+++ b/rel-eng/packages/jabberd-selinux
@@ -1 +1 @@
-1.4.6-1 selinux/jabberd-selinux/
+1.4.7-1 selinux/jabberd-selinux/
diff --git a/selinux/jabberd-selinux/jabberd-selinux.spec
b/selinux/jabberd-selinux/jabberd-selinux.spec
index 12e0189..ccd5115 100644
--- a/selinux/jabberd-selinux/jabberd-selinux.spec
+++ b/selinux/jabberd-selinux/jabberd-selinux.spec
@@ -6,7 +6,7 @@
%global modulename jabber
Name: jabberd-selinux
-Version: 1.4.6
+Version: 1.4.7
Release: 1%{?dist}
Summary: SELinux policy module supporting jabberd
@@ -107,6 +107,9 @@ rpm -ql jabberd | xargs -n 1 /sbin/restorecon -ri {} || :
%attr(0755,root,root) %{_sbindir}/%{name}-enable
%changelog
+* Thu Nov 26 2009 Miroslav Suchý <msuchy(a)redhat.com> 1.4.7-1
+- use %%global instead of %%define
+
* Thu Jun 18 2009 Jan Pazdziora 1.4.6-1
- 505606 - Require at least selinux-policy 2.4.6-114
commit 9f5c9474a3bfd32ec680a2b367f6d48d5861fb36
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Thu Nov 26 10:16:26 2009 +0100
use %global instead of %define
https://fedoraproject.org/wiki/Packaging:Guidelines#.25global_preferred_o...
diff --git a/selinux/jabberd-selinux/jabberd-selinux.spec
b/selinux/jabberd-selinux/jabberd-selinux.spec
index 0e83b58..12e0189 100644
--- a/selinux/jabberd-selinux/jabberd-selinux.spec
+++ b/selinux/jabberd-selinux/jabberd-selinux.spec
@@ -1,10 +1,9 @@
+%global selinux_variants mls strict targeted
+%global selinux_policyver %(sed -e 's,.*selinux-policy-\\([^/]*\\)/.*,\\1,'
/usr/share/selinux/devel/policyhelp 2> /dev/null)
+%global POLICYCOREUTILSVER 1.33.12-1
-%define selinux_variants mls strict targeted
-%define selinux_policyver %(sed -e 's,.*selinux-policy-\\([^/]*\\)/.*,\\1,'
/usr/share/selinux/devel/policyhelp 2> /dev/null)
-%define POLICYCOREUTILSVER 1.33.12-1
-
-%define moduletype apps
-%define modulename jabber
+%global moduletype apps
+%global modulename jabber
Name: jabberd-selinux
Version: 1.4.6
commit 826da5b7404a1933aee1cd7822771c78d63f1d3b
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Thu Nov 26 09:52:53 2009 +0100
Automatic commit of package [spacewalk-backend] release [0.7.17-1].
diff --git a/backend/spacewalk-backend.spec b/backend/spacewalk-backend.spec
index e52cc00..5a26583 100644
--- a/backend/spacewalk-backend.spec
+++ b/backend/spacewalk-backend.spec
@@ -7,7 +7,7 @@ Name: spacewalk-backend
Summary: Common programs needed to be installed on the Spacewalk servers/proxies
Group: Applications/Internet
License: GPLv2
-Version: 0.7.16
+Version: 0.7.17
Release: 1%{?dist}
URL:
https://fedorahosted.org/spacewalk
Source0:
https://fedorahosted.org/releases/s/p/spacewalk/%{name}-%{version}.tar.gz
@@ -580,6 +580,9 @@ rm -f %{rhnconf}/rhnSecret.py*
# $Id$
%changelog
+* Thu Nov 26 2009 Miroslav Suchý <msuchy(a)redhat.com> 0.7.17-1
+- fix compilation error
+
* Wed Nov 25 2009 Miroslav Suchý <msuchy(a)redhat.com> 0.7.16-1
- 540544 - raise error if channel do not exist or you are not allowed to add or remove
it
- 540544 - fix usage of check_user_password
diff --git a/rel-eng/packages/spacewalk-backend b/rel-eng/packages/spacewalk-backend
index 03e0bce..5ae6e79 100644
--- a/rel-eng/packages/spacewalk-backend
+++ b/rel-eng/packages/spacewalk-backend
@@ -1 +1 @@
-0.7.16-1 backend/
+0.7.17-1 backend/
commit 5414241469e87993d0d74c78a11d642c839c19ee
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Thu Nov 26 09:49:10 2009 +0100
fix compilation error
addressing:
rhnChannel.py: Error compiling
File "rhnChannel.py", line 2193
log_error("Asked to unsubscribe server %s "\
"from non-existent channel %s" % (
server_id, channel))
^
SyntaxError: unexpected character after line continuation character
diff --git a/backend/server/rhnChannel.py b/backend/server/rhnChannel.py
index 96db6a6..335afee 100644
--- a/backend/server/rhnChannel.py
+++ b/backend/server/rhnChannel.py
@@ -2190,7 +2190,8 @@ def unsubscribe_channel(server_id, channel, username, password):
h.execute(channel = channel)
ret = h.fetchone_dict()
if not ret:
- log_error("Asked to unsubscribe server %s "\
"from non-existent channel %s" % (
server_id, channel))
+ log_error("Asked to unsubscribe server %s from non-existent channel %s"
% (
+ server_id, channel))
raise rhnFault(40, "The specified channel '%s' does not exist."
% channel)
if not ret["parent_channel"]:
log_error("Cannot unsubscribe %s from base channel %s" % (
commit 72f658bf991f2b538dd663a1039a814ece512801
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Wed Nov 25 18:13:20 2009 +0100
adding checkstyle build dependency
to be able to run "ant clean && ant checkstyle"
diff --git a/java/build.xml b/java/build.xml
index 2e18d66..42ce7b9 100644
--- a/java/build.xml
+++ b/java/build.xml
@@ -324,7 +324,7 @@
<!-- We may want to break this down so that we can specify directories or
classes to operate on. But, hopefully our checkstyle report will
generally be clean, so we may be able to always check all classes. -->
- <target name="checkstyle" depends="init">
+ <target name="checkstyle" depends="init,do-compile-main">
<mkdir dir="${report.dir}" />
<checkstyle config="buildconf/checkstyle.xml"
failOnViolation="true" >
<property key="javadoc.method.scope" value="public" />
commit 18a5c54004991d12c360f317b97593e34bf0b2c1
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Tue Nov 24 14:57:32 2009 +0100
updating ant-contrib path
addressing /usr/bin/build-jar-repository: error: Could not find ant-contrib Java
extension for this JVM
when building spacewalk-java
diff --git a/java/buildconf/build-props.xml b/java/buildconf/build-props.xml
index 8d6576c..c4971aa 100644
--- a/java/buildconf/build-props.xml
+++ b/java/buildconf/build-props.xml
@@ -82,7 +82,7 @@
regexp tyrex jmock jmock-cglib strutstest gsbase" / -->
<property name="install.build.jar.dependencies"
- value="ant ant/ant-junit ant-contrib antlr
+ value="ant ant/ant-junit ant/ant-contrib antlr
${install.common.jar.dependencies} tanukiwrapper" />
<property name="install.run.jar.dependencies"
commit cd51d99bd934bf858478ab85e256073deb7c97e6
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Wed Nov 25 15:04:37 2009 +0100
add script which tell you when package has been tagged
diff --git a/rel-eng/last-package-tag b/rel-eng/last-package-tag
new file mode 100755
index 0000000..3c3abdc
--- /dev/null
+++ b/rel-eng/last-package-tag
@@ -0,0 +1,9 @@
+#!/bin/bash
+
+# list date when package was last tagged
+# since nightly build pick up every tag and build it,
+# we can assume it is date of package build
+
+for p in `cat rel-eng/packages/* |cut -f2 -d' '`; do
+ echo `git log '--pretty=format:%ci' $p |head -n1` $p
+done |sort
commit dd9ffb1e6bc62bb1c8bb80da110ebeeedb722986
Author: Milan Zazrivec <mzazrivec(a)redhat.com>
Date: Wed Nov 25 14:35:44 2009 +0100
541262 - fix networkRetries logic
diff --git a/client/rhel/rhn-client-tools/src/up2date_client/rpcServer.py
b/client/rhel/rhn-client-tools/src/up2date_client/rpcServer.py
index b54be87..1a810d9 100644
--- a/client/rhel/rhn-client-tools/src/up2date_client/rpcServer.py
+++ b/client/rhel/rhn-client-tools/src/up2date_client/rpcServer.py
@@ -191,7 +191,10 @@ def doCall(method, *args, **kwargs):
ret = None
attempt_count = 1
- attempts = cfg["networkRetries"] or 5
+ if cfg["networkRetries"]:
+ attempts = cfg["networkRetries"] or 5
+ else:
+ attempts = 0
while 1:
failure = 0
commit 4dbb753a76ef8ed0eb1a48dc605e10b0253b0c8e
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Wed Nov 25 14:10:19 2009 +0100
Automatic commit of package [yum-rhn-plugin] release [0.7.7-1].
diff --git a/client/rhel/yum-rhn-plugin/yum-rhn-plugin.spec
b/client/rhel/yum-rhn-plugin/yum-rhn-plugin.spec
index 4ef49b3..ae9cb2f 100644
--- a/client/rhel/yum-rhn-plugin/yum-rhn-plugin.spec
+++ b/client/rhel/yum-rhn-plugin/yum-rhn-plugin.spec
@@ -1,6 +1,6 @@
Summary: RHN support for yum
Name: yum-rhn-plugin
-Version: 0.7.6
+Version: 0.7.7
Release: 1%{?dist}
License: GPLv2
Group: System Environment/Base
@@ -52,6 +52,15 @@ rm -rf $RPM_BUILD_ROOT
%doc LICENSE
%changelog
+* Wed Nov 25 2009 Miroslav Suchý <msuchy(a)redhat.com> 0.7.7-1
+- 527412 - compute delta and write it to logs only if writeChangesToLog is set to 1
+- 527412 - Revert "fixing rhn-plugin to update package profiles through the
updatePackageProfile call instead of manually setting up the delta as it causes stale
package entries in the ui due to epoch being set to 0 for a no epoch packages"
+- 509342 - explicitly say, that this is example
+- 515575 - require recent rhn-client tools
+- remove no.po as Norwegian translation is for some time in nb.po, which is correct
location anyway
+- remove double slash, Mandriva do not likes it
+- fix build under opensuse
+
* Thu Oct 1 2009 Miroslav Suchý <msuchy(a)redhat.com> 0.7.6-1
- change licence in header to correct GPLv2
diff --git a/rel-eng/packages/yum-rhn-plugin b/rel-eng/packages/yum-rhn-plugin
index f78d976..abbd9bb 100644
--- a/rel-eng/packages/yum-rhn-plugin
+++ b/rel-eng/packages/yum-rhn-plugin
@@ -1 +1 @@
-0.7.6-1 client/rhel/yum-rhn-plugin/
+0.7.7-1 client/rhel/yum-rhn-plugin/
commit 7cbce349e042a5390b4beee780eae96db753b890
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Wed Nov 25 14:08:24 2009 +0100
Automatic commit of package [spacewalk-utils] release [0.7.1-1].
diff --git a/rel-eng/packages/spacewalk-utils b/rel-eng/packages/spacewalk-utils
index 00259bf..e83e4ac 100644
--- a/rel-eng/packages/spacewalk-utils
+++ b/rel-eng/packages/spacewalk-utils
@@ -1 +1 @@
-0.6.7-1 utils/
+0.7.1-1 utils/
diff --git a/utils/spacewalk-utils.spec b/utils/spacewalk-utils.spec
index 16d2c8d..f498c27 100644
--- a/utils/spacewalk-utils.spec
+++ b/utils/spacewalk-utils.spec
@@ -1,7 +1,7 @@
%define rhnroot %{_prefix}/share/rhn
Name: spacewalk-utils
-Version: 0.7.0
+Version: 0.7.1
Release: 1%{?dist}
Summary: Utilities that may be run against a Spacewalk server.
@@ -57,6 +57,10 @@ rm -rf $RPM_BUILD_ROOT
%changelog
+* Wed Nov 25 2009 Miroslav Suchý <msuchy(a)redhat.com> 0.7.1-1
+- migration of system profile should be able to run as non root now that it can run on
any client and not just satellite. (pkilambi(a)redhat.com)
+- bumping Version to 0.7.0 (jmatthew(a)redhat.com)
+
* Wed Aug 05 2009 Jan Pazdziora 0.6.7-1
- utils: add python to BuildRequires
commit 2879f157e83a9e2a884d70a6f11e776b8ffa9ac9
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Wed Nov 25 14:05:08 2009 +0100
Automatic commit of package [spacewalk-search] release [0.7.1-1].
diff --git a/rel-eng/packages/spacewalk-search b/rel-eng/packages/spacewalk-search
index dba4dec..f905dc0 100644
--- a/rel-eng/packages/spacewalk-search
+++ b/rel-eng/packages/spacewalk-search
@@ -1 +1 @@
-0.6.11-1 search-server/
+0.7.1-1 search-server/
diff --git a/search-server/spacewalk-search.spec b/search-server/spacewalk-search.spec
index 1a7f821..4802053 100644
--- a/search-server/spacewalk-search.spec
+++ b/search-server/spacewalk-search.spec
@@ -4,7 +4,7 @@ Name: spacewalk-search
Summary: Spacewalk Full Text Search Server
Group: Applications/Internet
License: GPLv2
-Version: 0.7.0
+Version: 0.7.1
Release: 1%{?dist}
# This src.rpm is cannonical upstream
# You can obtain it using this set of commands
@@ -112,6 +112,11 @@ fi
%{_sysconfdir}/logrotate.d/rhn-search
%changelog
+* Wed Nov 25 2009 Miroslav Suchý <msuchy(a)redhat.com> 0.7.1-1
+- 516872 - Fixed search server's log properties (paji(a)redhat.com)
+- Update doc indexes to reside in "en-US" (jmatthew(a)redhat.com)
+- bumping versions to 0.7.0 (jmatthew(a)redhat.com)
+
* Thu Jun 25 2009 John Matthews <jmatthew(a)redhat.com> 0.6.11-1
- 487014 - SystemSearch remove score requirement to redirect to SDC on 1 result
(jmatthew(a)redhat.com)
commit ebb7bd0c0cffeba5e43ed65f23205e166a4efa01
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Wed Nov 25 14:04:05 2009 +0100
Automatic commit of package [spacewalk-proxy-monitoring] release [0.7.1-1].
diff --git a/monitoring/spacewalk-proxy-monitoring/spacewalk-proxy-monitoring.spec
b/monitoring/spacewalk-proxy-monitoring/spacewalk-proxy-monitoring.spec
index 1763f75..8217b21 100644
--- a/monitoring/spacewalk-proxy-monitoring/spacewalk-proxy-monitoring.spec
+++ b/monitoring/spacewalk-proxy-monitoring/spacewalk-proxy-monitoring.spec
@@ -2,7 +2,7 @@
Summary: Meta-package that pulls in all of the Spacewalk monitoring packages
Name: spacewalk-proxy-monitoring
Source0:
https://fedorahosted.org/releases/s/p/spacewalk/%{name}-%{version}.tar.gz
-Version: 0.7.0
+Version: 0.7.1
Release: 1%{?dist}
URL:
https://fedorahosted.org/spacewalk
License: GPLv2
@@ -104,6 +104,10 @@ rm -rf $RPM_BUILD_ROOT
%doc README
%changelog
+* Wed Nov 25 2009 Miroslav Suchý <msuchy(a)redhat.com> 0.7.1-1
+- bumping Version to 0.7.0 (jmatthew(a)redhat.com)
+- 516624 - allow upgrade proxy using CLI to 5.3 from 5.0
+
* Mon May 11 2009 Jan Pazdziora 0.6.4-1
- Move Req of oracle-instantclient-selinux to spacewalk-monitoring-selinux
diff --git a/rel-eng/packages/spacewalk-proxy-monitoring
b/rel-eng/packages/spacewalk-proxy-monitoring
index a95b334..e09b047 100644
--- a/rel-eng/packages/spacewalk-proxy-monitoring
+++ b/rel-eng/packages/spacewalk-proxy-monitoring
@@ -1 +1 @@
-0.6.4-1 monitoring/spacewalk-proxy-monitoring/
+0.7.1-1 monitoring/spacewalk-proxy-monitoring/
commit a9445b2f753ef8287b4c03fb210609d2b19164fe
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Wed Nov 25 14:02:59 2009 +0100
Automatic commit of package [spacewalk-proxy-installer] release [0.7.2-1].
diff --git a/proxy/installer/spacewalk-proxy-installer.spec
b/proxy/installer/spacewalk-proxy-installer.spec
index 6e2e87d..ddd87b2 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: 0.7.1
+Version: 0.7.2
Release: 1%{?dist}
URL:
https://fedorahosted.org/spacewalk
Source0:
https://fedorahosted.org/releases/s/p/spacewalk/%{name}-%{version}.tar.gz
@@ -87,6 +87,9 @@ rm -rf $RPM_BUILD_ROOT
%doc LICENSE answers.txt
%changelog
+* Wed Nov 25 2009 Miroslav Suchý <msuchy(a)redhat.com> 0.7.2-1
+- 516624 - allow upgrade proxy using CLI to 5.3 from 5.0
+
* Wed Aug 12 2009 Miroslav Suchy <msuchy(a)redhat.com> 0.7.1-1
- 503187 - upgrade after activation
diff --git a/rel-eng/packages/spacewalk-proxy-installer
b/rel-eng/packages/spacewalk-proxy-installer
index cd19f23..9a135a7 100644
--- a/rel-eng/packages/spacewalk-proxy-installer
+++ b/rel-eng/packages/spacewalk-proxy-installer
@@ -1 +1 @@
-0.7.1-1 proxy/installer/
+0.7.2-1 proxy/installer/
commit 77d305a72a34b53188ecdbf0e7d2647edf9f9861
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Wed Nov 25 14:01:59 2009 +0100
Automatic commit of package [spacewalk-proxy] release [0.7.2-1].
diff --git a/proxy/proxy/spacewalk-proxy.spec b/proxy/proxy/spacewalk-proxy.spec
index 518fac5..32a1b97 100644
--- a/proxy/proxy/spacewalk-proxy.spec
+++ b/proxy/proxy/spacewalk-proxy.spec
@@ -4,7 +4,7 @@ Group: Applications/Internet
License: GPLv2
URL:
https://fedorahosted.org/spacewalk
Source0:
https://fedorahosted.org/releases/s/p/spacewalk/%{name}-%{version}.tar.gz
-Version: 0.7.1
+Version: 0.7.2
Release: 1%{?dist}
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: python
@@ -293,6 +293,9 @@ fi
%changelog
+* Wed Nov 25 2009 Miroslav Suchý <msuchy(a)redhat.com> 0.7.2-1
+- 499020 - bump up proxy version to 5.3.1 to enable CDN
+
* Thu Aug 20 2009 Miroslav Suchý <msuchy(a)redhat.com> 0.7.1-1
- 503187 - do not automaticaly download rhn_proxy.conf
- 516624 - allow upgrade proxy using CLI to 5.3 from 5.0
diff --git a/rel-eng/packages/spacewalk-proxy b/rel-eng/packages/spacewalk-proxy
index d7add8f..387be88 100644
--- a/rel-eng/packages/spacewalk-proxy
+++ b/rel-eng/packages/spacewalk-proxy
@@ -1 +1 @@
-0.7.1-1 proxy/proxy/
+0.7.2-1 proxy/proxy/
commit 4fdf62438084af6fc56c3f103870ff3dfa6c4fe4
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Wed Nov 25 14:00:56 2009 +0100
Automatic commit of package [spacewalk-koan] release [0.2.3-1].
diff --git a/client/tools/spacewalk-koan/spacewalk-koan.spec
b/client/tools/spacewalk-koan/spacewalk-koan.spec
index 289531d..0dc5ab9 100644
--- a/client/tools/spacewalk-koan/spacewalk-koan.spec
+++ b/client/tools/spacewalk-koan/spacewalk-koan.spec
@@ -3,7 +3,7 @@ Name: spacewalk-koan
Group: System Environment/Kernel
License: GPLv2
Source0:
https://fedorahosted.org/releases/s/p/spacewalk/%{name}-%{version}.tar.gz
-Version: 0.2.2
+Version: 0.2.3
Release: 1%{?dist}
BuildArch : noarch
URL:
https://fedorahosted.org/spacewalk
@@ -49,6 +49,11 @@ rm -rf $RPM_BUILD_ROOT
%{_datadir}/rhn/actions/
%changelog
+* Wed Nov 25 2009 Miroslav Suchý <msuchy(a)redhat.com> 0.2.3-1
+- import virtualization module in kickstart_guest section (mzazrivec(a)redhat.com)
+- 532429 - refresh virt. state after successful guest kickstart (mzazrivec(a)redhat.com)
+- 530553 - wait for virt. domain installation to finish and restart
(mzazrivec(a)redhat.com)
+
* Fri Aug 28 2009 Michael Mraka <michael.mraka(a)redhat.com> 0.2.2-1
- grep | awk is rarely needed
- 517876 - fixing spacewalk-koan so it doesnt require up2date on Fedora 11
diff --git a/rel-eng/packages/spacewalk-koan b/rel-eng/packages/spacewalk-koan
index b135e2e..41eb94e 100644
--- a/rel-eng/packages/spacewalk-koan
+++ b/rel-eng/packages/spacewalk-koan
@@ -1 +1 @@
-0.2.2-1 client/tools/spacewalk-koan/
+0.2.3-1 client/tools/spacewalk-koan/
commit 70a34f1bd7e167d3498f077736febce7679a507c
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Wed Nov 25 13:59:26 2009 +0100
Automatic commit of package [spacewalk-java] release [0.7.19-1].
diff --git a/java/spacewalk-java.spec b/java/spacewalk-java.spec
index 695a41c..081c085 100644
--- a/java/spacewalk-java.spec
+++ b/java/spacewalk-java.spec
@@ -12,7 +12,7 @@ Name: spacewalk-java
Summary: Spacewalk Java site packages
Group: Applications/Internet
License: GPLv2
-Version: 0.7.18
+Version: 0.7.19
Release: 1%{?dist}
URL:
https://fedorahosted.org/spacewalk
Source0:
https://fedorahosted.org/releases/s/p/spacewalk/%{name}-%{version}.tar.gz
@@ -280,6 +280,16 @@ fi
%{jardir}/postgresql-jdbc.jar
%changelog
+* Wed Nov 25 2009 Miroslav Suchý <msuchy(a)redhat.com> 0.7.19-1
+- improving the system channels page by increasing the base channel selector box size and
having the custom channels sorted by name (jsherril(a)redhat.com)
+- another small display issue fix for list (jsherril(a)redhat.com)
+- fixing sort on channel manage page to sort by name and not id (jsherril(a)redhat.com)
+- fixing a bunch of list display issues that have bugged me for a while
(jsherril(a)redhat.com)
+- 519788 - fixing set selection on two config management lists (jsherril(a)redhat.com)
+- checkstyle fix (jsherril(a)redhat.com)
+- unit test fixes (jsherril(a)redhat.com)
+- unit test fix - reloading the "Action" hibernate object seemed to cause
issues with the user object that it was associated with, so instead lets try refreshing
(jsherril(a)redhat.com)
+
* Fri Nov 20 2009 Tomas Lestach <tlestach(a)redhat.com> 0.7.18-1
- some columns not filled on webui for non-cve errata (tlestach(a)redhat.com)
- checkstyle fix (jsherril(a)redhat.com)
diff --git a/rel-eng/packages/spacewalk-java b/rel-eng/packages/spacewalk-java
index f1305e7..1351249 100644
--- a/rel-eng/packages/spacewalk-java
+++ b/rel-eng/packages/spacewalk-java
@@ -1 +1 @@
-0.7.18-1 java/
+0.7.19-1 java/
commit 6aa0ff55b3c6c22325f306a8d8b38754e99a550d
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Wed Nov 25 13:58:12 2009 +0100
Automatic commit of package [spacewalk-doc-indexes] release [0.7.1-1].
diff --git a/rel-eng/packages/spacewalk-doc-indexes
b/rel-eng/packages/spacewalk-doc-indexes
index e909cd6..d0a84aa 100644
--- a/rel-eng/packages/spacewalk-doc-indexes
+++ b/rel-eng/packages/spacewalk-doc-indexes
@@ -1 +1 @@
-0.6.1-1 search-server/spacewalk-doc-indexes/
+0.7.1-1 search-server/spacewalk-doc-indexes/
diff --git a/search-server/spacewalk-doc-indexes/spacewalk-doc-indexes.spec
b/search-server/spacewalk-doc-indexes/spacewalk-doc-indexes.spec
index ed77cb5..ea1668c 100644
--- a/search-server/spacewalk-doc-indexes/spacewalk-doc-indexes.spec
+++ b/search-server/spacewalk-doc-indexes/spacewalk-doc-indexes.spec
@@ -1,5 +1,5 @@
Name: spacewalk-doc-indexes
-Version: 0.7.0
+Version: 0.7.1
Release: 1%{?dist}
Summary: Lucene indexes of help documentation for spacewalk
@@ -45,6 +45,10 @@ rm -rf $RPM_BUILD_ROOT
%changelog
+* Wed Nov 25 2009 Miroslav Suchý <msuchy(a)redhat.com> 0.7.1-1
+- Update doc indexes to reside in "en-US" (jmatthew(a)redhat.com)
+- bumping versions to 0.7.0 (jmatthew(a)redhat.com)
+
* Fri Aug 07 2009 John Matthews <jmatthews(a)redhat.com> 0.7.0
- update indexes to reside in "en-US"
commit 5f77e4e3b73dea77e3c402a374a28246d7597af3
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Wed Nov 25 13:55:56 2009 +0100
Automatic commit of package [spacewalk-config] release [0.7.2-1].
diff --git a/rel-eng/packages/spacewalk-config b/rel-eng/packages/spacewalk-config
index 5dba092..2420d1f 100644
--- a/rel-eng/packages/spacewalk-config
+++ b/rel-eng/packages/spacewalk-config
@@ -1 +1 @@
-0.7.1-1 spacewalk/config/
+0.7.2-1 spacewalk/config/
diff --git a/spacewalk/config/spacewalk-config.spec
b/spacewalk/config/spacewalk-config.spec
index f5af2ad..ed2eda7 100644
--- a/spacewalk/config/spacewalk-config.spec
+++ b/spacewalk/config/spacewalk-config.spec
@@ -2,7 +2,7 @@
Name: spacewalk-config
Summary: Spacewalk Configuration
-Version: 0.7.1
+Version: 0.7.2
Release: 1%{?dist}
URL:
http://fedorahosted.org/spacewalk
Source0:
https://fedorahosted.org/releases/s/p/spacewalk/%{name}-%{version}.tar.gz
@@ -102,6 +102,9 @@ EOF
%changelog
+* Wed Nov 25 2009 Miroslav Suchý <msuchy(a)redhat.com> 0.7.2-1
+- Create the symlinks in .spec, based on .symlink "templates".
(jpazdziora(a)redhat.com)
+
* Fri Aug 28 2009 Milan Zazrivec <mzazrivec(a)redhat.com> 0.7.1-1
- No need to pre-require jabberd (mzazrivec(a)redhat.com)
- removed all jabberd prep config files (mzazrivec(a)redhat.com)
commit 7c6e511041581ff6fcad53ca1dc02ca7e2bcb59f
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Wed Nov 25 13:54:05 2009 +0100
Automatic commit of package [spacewalk-backend] release [0.7.16-1].
diff --git a/backend/spacewalk-backend.spec b/backend/spacewalk-backend.spec
index 5a1e1a6..e52cc00 100644
--- a/backend/spacewalk-backend.spec
+++ b/backend/spacewalk-backend.spec
@@ -7,7 +7,7 @@ Name: spacewalk-backend
Summary: Common programs needed to be installed on the Spacewalk servers/proxies
Group: Applications/Internet
License: GPLv2
-Version: 0.7.15
+Version: 0.7.16
Release: 1%{?dist}
URL:
https://fedorahosted.org/spacewalk
Source0:
https://fedorahosted.org/releases/s/p/spacewalk/%{name}-%{version}.tar.gz
@@ -580,6 +580,11 @@ rm -f %{rhnconf}/rhnSecret.py*
# $Id$
%changelog
+* Wed Nov 25 2009 Miroslav Suchý <msuchy(a)redhat.com> 0.7.16-1
+- 540544 - raise error if channel do not exist or you are not allowed to add or remove
it
+- 540544 - fix usage of check_user_password
+- made conditions more readable (michael.mraka(a)redhat.com)
+
* Thu Nov 19 2009 Jan Pazdziora 0.7.15-1
- 537063 - drop the report-specific options
diff --git a/rel-eng/packages/spacewalk-backend b/rel-eng/packages/spacewalk-backend
index dd4fddd..03e0bce 100644
--- a/rel-eng/packages/spacewalk-backend
+++ b/rel-eng/packages/spacewalk-backend
@@ -1 +1 @@
-0.7.15-1 backend/
+0.7.16-1 backend/
commit b3786937dbaf22aafc34d08c1a9f075babacb554
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Wed Nov 25 13:51:32 2009 +0100
Automatic commit of package [spacewalk] release [0.7.3-1].
diff --git a/rel-eng/packages/spacewalk b/rel-eng/packages/spacewalk
index 7d22077..e80cb1b 100644
--- a/rel-eng/packages/spacewalk
+++ b/rel-eng/packages/spacewalk
@@ -1 +1 @@
-0.7.2-1 spacewalk/package/
+0.7.3-1 spacewalk/package/
diff --git a/spacewalk/package/spacewalk.spec b/spacewalk/package/spacewalk.spec
index cf0604c..e175793 100644
--- a/spacewalk/package/spacewalk.spec
+++ b/spacewalk/package/spacewalk.spec
@@ -1,7 +1,7 @@
%define release_name Gemini
Name: spacewalk
-Version: 0.7.2
+Version: 0.7.3
Release: 1%{?dist}
Summary: Spacewalk Systems Management Application
URL:
https://fedorahosted.org/spacewalk
@@ -164,6 +164,9 @@ rm -rf %{buildroot}
%{_datadir}/spacewalk/setup/defaults.d/postgresql-backend.conf
%changelog
+* Wed Nov 25 2009 Miroslav Suchý <msuchy(a)redhat.com> 0.7.3-1
+- Make spacewalk require the editarea RPM (colin.coe(a)gmail.com)
+
* Wed Sep 02 2009 Michael Mraka <michael.mraka(a)redhat.com> 0.7.2-1
- added database backend to defaults
commit 877fad7cfbbd771e6d9e4510d63b84fc6fb5a8db
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Wed Nov 25 13:48:38 2009 +0100
Automatic commit of package [rhnlib] release [2.5.15-1].
diff --git a/client/rhel/rhnlib/rhnlib.spec b/client/rhel/rhnlib/rhnlib.spec
index 8d5830f..a1792a7 100644
--- a/client/rhel/rhnlib/rhnlib.spec
+++ b/client/rhel/rhnlib/rhnlib.spec
@@ -4,7 +4,7 @@ Summary: Python libraries for the RHN project
Name: rhnlib
URL:
https://fedorahosted.org/spacewalk
Source0:
https://fedorahosted.org/releases/s/p/spacewalk/%{name}-%{version}.tar.gz
-Version: 2.5.14
+Version: 2.5.15
Release: 1%{?dist}
Group: Development/Libraries
@@ -54,6 +54,11 @@ rm -rf $RPM_BUILD_ROOT
%{python_sitelib}/*
%changelog
+* Wed Nov 25 2009 Miroslav Suchý <msuchy(a)redhat.com> 2.5.15-1
+- aamt is not Null in most cases, move it more to right
+- replace len() with ==
+- count length of buffer only once in loop
+
* Thu Nov 5 2009 Miroslav Suchy <msuchy(a)redhat.com> 2.5.14-1
- fix build under opensuse
diff --git a/rel-eng/packages/rhnlib b/rel-eng/packages/rhnlib
index ca1bbb0..66bfa13 100644
--- a/rel-eng/packages/rhnlib
+++ b/rel-eng/packages/rhnlib
@@ -1 +1 @@
-2.5.14-1 client/rhel/rhnlib/
+2.5.15-1 client/rhel/rhnlib/
commit 10ebcac04ae756602d624640aa13c0ab13f5c2bf
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Wed Nov 25 13:46:48 2009 +0100
Automatic commit of package [rhnclient] release [0.7-1].
diff --git a/client/solaris/rhnclient/rhnclient.spec
b/client/solaris/rhnclient/rhnclient.spec
index 3b3afa0..5e59c31 100644
--- a/client/solaris/rhnclient/rhnclient.spec
+++ b/client/solaris/rhnclient/rhnclient.spec
@@ -5,7 +5,7 @@
Summary: Red Hat Network Client Utilities and Libraries
Name: rhnclient
Source0: %{name}-%{version}.tar.gz
-Version: 0.4
+Version: 0.7
Release: 1
License: GPLv2
Group: Development/Libraries
@@ -65,6 +65,10 @@ rm -rf $RPM_BUILD_ROOT
#%doc ChangeLog COPYING README TODO
%changelog
+* Wed Nov 25 2009 Miroslav Suchý <msuchy(a)redhat.com> 0.7-1
+- Reverting the client/solaris/rhnclient/rhnclient.spec part of the patch.
(jpazdziora(a)redhat.com)
+- Log files should be ghosted rather than belonging to a package
(m.d.chappell(a)bath.ac.uk)
+
* Thu Apr 23 2009 jesus m. rodriguez <jesusr(a)redhat.com> 0.4-1
- update copyright and licenses (jesusr(a)redhat.com)
diff --git a/rel-eng/packages/rhnclient b/rel-eng/packages/rhnclient
index 4e6f3c2..599133a 100644
--- a/rel-eng/packages/rhnclient
+++ b/rel-eng/packages/rhnclient
@@ -1 +1 @@
-0.4-1 client/solaris/rhnclient/
+0.7-1 client/solaris/rhnclient/
commit 54cb35ab0f8b15cdec3c22a90471d4d886cd37ca
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Wed Nov 25 13:41:32 2009 +0100
change format of output
use abbreviated commit hash and write author email as well
diff --git a/rel-eng/git-untagged-commits.pl b/rel-eng/git-untagged-commits.pl
index 047ace9..92ef1e0 100755
--- a/rel-eng/git-untagged-commits.pl
+++ b/rel-eng/git-untagged-commits.pl
@@ -34,10 +34,10 @@ for my $file (@files) {
close FILE;
my $name = File::Basename::basename($file);
my ($version, $dir) = split /\s/, $line;
- my @changes = `git log --pretty=oneline $name-$version..HEAD -- $cdup$dir`;
+ my @changes = `git log --pretty=format:'%h %s (%ae)' $name-$version..HEAD --
$cdup$dir`;
if (@changes) {
print "$name-$version..HEAD:\n";
- print @changes;
+ print @changes, "\n";
print "------------------------------------------\n";
}
}
commit 67e3b1409907b46e5a196651519bd507aa962b91
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Wed Nov 25 13:28:30 2009 +0100
Automatic commit of package [rhn-virtualization] release [5.4.7-1].
diff --git a/client/tools/rhn-virtualization/rhn-virtualization.spec
b/client/tools/rhn-virtualization/rhn-virtualization.spec
index 46ef726..110430b 100644
--- a/client/tools/rhn-virtualization/rhn-virtualization.spec
+++ b/client/tools/rhn-virtualization/rhn-virtualization.spec
@@ -10,7 +10,7 @@ License: GPLv2
URL:
https://fedorahosted.org/spacewalk
Source0:
https://fedorahosted.org/releases/s/p/spacewalk/%{name}-%{version}.tar.gz
-Version: 5.4.6
+Version: 5.4.7
Release: 1%{?dist}
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
@@ -165,6 +165,13 @@ rm -rf $RPM_BUILD_ROOT
%doc LICENSE
%changelog
+* Wed Nov 25 2009 Miroslav Suchý <msuchy(a)redhat.com> 5.4.7-1
+- 529688 - correctly detect Xen host
+- 530583 - detect an installing config also with ks= parameter
+- return back pieces still used by rhn-kickstart
+- 529688 - correctly update virtualization profile for KVM guest
+- missing commits from sat.git
+
* Sat Oct 03 2009 Pradeep Kilambi <pkilambi(a)redhat.com> 5.4.6-1
- fixing typo for server initialization for non ssl case in rhev code.
(pkilambi(a)redhat.com)
diff --git a/rel-eng/packages/rhn-virtualization b/rel-eng/packages/rhn-virtualization
index 397b2b9..3f4b2a5 100644
--- a/rel-eng/packages/rhn-virtualization
+++ b/rel-eng/packages/rhn-virtualization
@@ -1 +1 @@
-5.4.6-1 client/tools/rhn-virtualization/
+5.4.7-1 client/tools/rhn-virtualization/
commit 1463147dd5a51dd6e55e6bc56fefb129628323f4
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Wed Nov 25 13:26:16 2009 +0100
Automatic commit of package [rhn-client-tools] release [0.7.10-1].
diff --git a/client/rhel/rhn-client-tools/rhn-client-tools.spec
b/client/rhel/rhn-client-tools/rhn-client-tools.spec
index d1bf438..b3c465a 100644
--- a/client/rhel/rhn-client-tools/rhn-client-tools.spec
+++ b/client/rhel/rhn-client-tools/rhn-client-tools.spec
@@ -4,7 +4,7 @@ Group: System Environment/Base
Source0:
https://fedorahosted.org/releases/s/p/spacewalk/%{name}-%{version}.tar.gz
URL:
https://fedorahosted.org/spacewalk
Name: rhn-client-tools
-Version: 0.7.9
+Version: 0.7.10
Release: 1%{?dist}
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
%if 0%{?suse_version: %{suse_version} > 1000}
@@ -225,6 +225,13 @@ rm -rf $RPM_BUILD_ROOT
%{_datadir}/applications/rhn_register.desktop
%changelog
+* Wed Nov 25 2009 Miroslav Suchý <msuchy(a)redhat.com> 0.7.10-1
+- 216808 - add man page to package
+- 216808 - create new script spacewalk-channel
+- 527412 - compute delta and write it to logs only if writeChangesToLog is set to 1
+- 536789 - remove forgotten lines
+- 536789 - set only necessary network info
+
* Thu Nov 5 2009 Miroslav Suchy <msuchy(a)redhat.com> 0.7.9-1
- suse has its own macro for updating icons
- enable build for suse 10.00 too
diff --git a/rel-eng/packages/rhn-client-tools b/rel-eng/packages/rhn-client-tools
index 1e5d27f..81851b6 100644
--- a/rel-eng/packages/rhn-client-tools
+++ b/rel-eng/packages/rhn-client-tools
@@ -1 +1 @@
-0.7.9-1 client/rhel/rhn-client-tools/
+0.7.10-1 client/rhel/rhn-client-tools/
commit 23edab9e9432525e4c6cb3beaca236ed45be4eae
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Wed Nov 25 13:23:28 2009 +0100
Automatic commit of package [rhnsd] release [4.5.15-1].
diff --git a/client/rhel/rhnsd/rhnsd.spec b/client/rhel/rhnsd/rhnsd.spec
index 0b08ba2..c4b4b65 100644
--- a/client/rhel/rhnsd/rhnsd.spec
+++ b/client/rhel/rhnsd/rhnsd.spec
@@ -4,7 +4,7 @@ Group: System Environment/Base
Source0:
https://fedorahosted.org/releases/s/p/spacewalk/%{name}-%{version}.tar.gz
URL:
https://fedorahosted.org/spacewalk
Name: rhnsd
-Version: 4.5.14
+Version: 4.5.15
Release: 1%{?dist}
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@@ -63,6 +63,9 @@ rm -fr $RPM_BUILD_ROOT
%doc LICENSE
%changelog
+* Wed Nov 25 2009 Miroslav Suchý <msuchy(a)redhat.com> 4.5.15-1
+- hardcode MANPATH
+
* Fri Sep 25 2009 Tomas Lestach <tlestach(a)redhat.com> 4.5.14-1
- removed hardcoded systemid path (tlestach(a)redhat.com)
diff --git a/rel-eng/packages/rhnsd b/rel-eng/packages/rhnsd
index 36cb2bf..edbe653 100644
--- a/rel-eng/packages/rhnsd
+++ b/rel-eng/packages/rhnsd
@@ -1 +1 @@
-4.5.14-1 client/rhel/rhnsd/
+4.5.15-1 client/rhel/rhnsd/
commit 20f9a7814337a6b48958336893b3f97ef62ed36d
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Wed Nov 25 13:21:12 2009 +0100
Automatic commit of package [perl-Satcon] release [1.11-1].
diff --git a/projects/perl-Satcon/perl-Satcon.spec
b/projects/perl-Satcon/perl-Satcon.spec
index 5211653..f0a235b 100644
--- a/projects/perl-Satcon/perl-Satcon.spec
+++ b/projects/perl-Satcon/perl-Satcon.spec
@@ -1,6 +1,6 @@
Name: perl-Satcon
Summary: Framework for configuration files
-Version: 1.10
+Version: 1.11
Release: 1%{?dist}
License: GPLv2
Group: Applications/System
@@ -46,6 +46,9 @@ rm -rf $RPM_BUILD_ROOT
%{_bindir}/*
%changelog
+* Wed Nov 25 2009 Miroslav Suchý <msuchy(a)redhat.com> 1.11-1
+- 520441 - don't apply ExtUtils::MY->fixin(shift) to perl executables
+
* Tue Dec 16 2008 Miroslav Suchý <msuchy(a)redhat.com> 1.10-1
- remove satcon-make-rpm.pl
diff --git a/rel-eng/packages/perl-Satcon b/rel-eng/packages/perl-Satcon
index 64e1c10..65377f1 100644
--- a/rel-eng/packages/perl-Satcon
+++ b/rel-eng/packages/perl-Satcon
@@ -1 +1 @@
-1.10-1 projects/perl-Satcon/
+1.11-1 projects/perl-Satcon/
commit 3162fb6fc3c6d65ea6eb151c2cc89f26faded78e
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Tue Nov 24 17:16:06 2009 +0100
216808 - add man page to package
diff --git a/client/rhel/rhn-client-tools/rhn-client-tools.spec
b/client/rhel/rhn-client-tools/rhn-client-tools.spec
index 176f234..d1bf438 100644
--- a/client/rhel/rhn-client-tools/rhn-client-tools.spec
+++ b/client/rhel/rhn-client-tools/rhn-client-tools.spec
@@ -182,6 +182,7 @@ rm -rf $RPM_BUILD_ROOT
%defattr(-,root,root,-)
%{_mandir}/man8/rhnreg_ks.8*
%{_mandir}/man8/rhn_register.8*
+%{_mandir}/man8/spacewalk-channel.8*
%config(noreplace) %{_sysconfdir}/security/console.apps/rhn_register
%config(noreplace) %{_sysconfdir}/pam.d/rhn_register
commit b10e27cf76498584190a2291779bf779fa8e61ba
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Tue Nov 24 17:05:59 2009 +0100
216808 - create new script spacewalk-channel
This script allows you to subscribe to and unsubscribe from channel from command line
diff --git a/client/rhel/rhn-client-tools/man/en/spacewalk-channel.8
b/client/rhel/rhn-client-tools/man/en/spacewalk-channel.8
new file mode 100644
index 0000000..668c3d6
--- /dev/null
+++ b/client/rhel/rhn-client-tools/man/en/spacewalk-channel.8
@@ -0,0 +1,106 @@
+.\" Copyright 2009 Red Hat, Inc.
+.\"
+.\" This man page is free documentation; you can redistribute it and/or modify
+.\" it under the terms of the GNU General Public License as published by
+.\" the Free Software Foundation; either version 2 of the License, or
+.\" (at your option) any later version.
+.\"
+.\" This program is distributed in the hope that it will be useful,
+.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
+.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+.\" GNU General Public License for more details.
+.\"
+.\" You should have received a copy of the GNU General Public License
+.\" along with this man page; if not, write to the Free Software
+.\" Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+.\"
+.TH SPACEWALK-CHANNEL 8 "2009 November 24" "Linux" "Red Hat,
Inc."
+
+.SH NAME
+spacewalk-channel \- Subscribe to or unsubscribe system from channel.
+
+.SH SYNOPSIS
+
+spacewalk-channel [\fIoptions\fP]
+
+.SH DESCRIPTION
+.PP
+\fVspacewalk-channel\fR enable you to subscribe to and unsubscribe from
+specified channels via the command line so a visit to the Red Hat Network
+(or Spacewalk) website isn't required.
+
+.SH OPTIONS
+
+.IP "\fB-l, --list\fP"
+Print list of channel you are currently subscribed to.
+.br
+.IP "\fB-a, --add\fP"
+You are subscribing system to given channel. You have to specify --user and --password.
+.br
+.IP "\fB-r, --remove\fP"
+You are unsubscribing system to given channel. You have to specify --user and
--password.
+.br
+.IP "\fB-u, --username\fP"
+The username to register the system with under Red Hat Network, RHN Satellite or
Spacewalk.
+.br
+.IP "\fB-p, --password\fP"
+The password associated with the username specified with the \fB--username\fR
+option. This is an unencrypted password.
+.br
+.IP "\fB-c, --channel\fP"
+Label of channel you want to subscribe to or unsubscribe from. Can be specified multiple
+times.
+.br
+.IP "\fB-v, --verbose\fP"
+Print out successfull action.
+.br
+.IP "\fB-h, --help\fP"
+Show a help message and exit.
+
+.SH "EXAMPLES"
+
+Subscribe to two channels:
+
+.RS
+.nf
+spacewalk-channel --add -c rhn-tools-rhel-i386-server-5 -c rhel-i386-server-vt-5 --user
user --password foobar
+.fi
+.RE
+
+Unsubscribe from channel:
+
+.RS
+.nf
+spacewalk-channel --remove -c rhn-tools-rhel-i386-server-5 -c rhel-i386-server-vt-5
--user user --password foobar
+.fi
+.RE
+
+List subscribed channels:
+
+.RS
+.nf
+spacewalk-channel --list
+.fi
+.RE
+
+.SH "SEE ALSO"
+
+.PP
+\fBrhnplugin\fP(8), \fBrhn_register\fP(8), \fBup2date\fP(5).
+
+.SH AUTHORS
+.PP
+Miroslav Suchý <msuchy(a)redhat.com>
+
+.SH "BUGS"
+.PP
+Report bugs to <
http://bugzilla.redhat.com>.
+
+.SH COPYRIGHT
+
+.PP
+Copyright \(co 2009 Red Hat, Inc.
+
+.PP
+This is free software; see the source for copying conditions. There is
+NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
diff --git a/client/rhel/rhn-client-tools/rhn-client-tools.spec
b/client/rhel/rhn-client-tools/rhn-client-tools.spec
index 1f5a71c..176f234 100644
--- a/client/rhel/rhn-client-tools/rhn-client-tools.spec
+++ b/client/rhel/rhn-client-tools/rhn-client-tools.spec
@@ -189,6 +189,8 @@ rm -rf $RPM_BUILD_ROOT
%{_bindir}/rhn_register
%{_sbindir}/rhn_register
%{_sbindir}/rhnreg_ks
+%{_sbindir}/spacewalk-channel
+%{_sbindir}/rhn-channel
%{_datadir}/rhn/up2date_client/rhnreg.*
%{_datadir}/rhn/up2date_client/tui.*
diff --git a/client/rhel/rhn-client-tools/src/bin/Makefile
b/client/rhel/rhn-client-tools/src/bin/Makefile
index 15b8888..7a1e73e 100644
--- a/client/rhel/rhn-client-tools/src/bin/Makefile
+++ b/client/rhel/rhn-client-tools/src/bin/Makefile
@@ -28,8 +28,10 @@ install:: all $(DIRS)
$(INSTALL_BIN) rhn_register.py $(SBIN_DIR)/rhn_register
$(INSTALL_BIN) rhn-profile-sync.py $(SBIN_DIR)/rhn-profile-sync
$(INSTALL_BIN) rhn_check.py $(SBIN_DIR)/rhn_check
+ $(INSTALL_BIN) spacewalk-channel.py $(SBIN_DIR)/spacewalk-channel
ln -sf consolehelper $(BIN_DIR)/rhn_register
+ ln -s spacewalk-channel $(SBIN_DIR)/rhn-channel
# OTHER targets for internal use
pychecker::
diff --git a/client/rhel/rhn-client-tools/src/bin/spacewalk-channel.py
b/client/rhel/rhn-client-tools/src/bin/spacewalk-channel.py
new file mode 100644
index 0000000..da1d082
--- /dev/null
+++ b/client/rhel/rhn-client-tools/src/bin/spacewalk-channel.py
@@ -0,0 +1,97 @@
+#!/usr/bin/python
+#
+# Copyright (c) 2009 Red Hat, Inc.
+#
+# This software is licensed to you under the GNU General Public License,
+# version 2 (GPLv2). There is NO WARRANTY for this software, express or
+# implied, including the implied warranties of MERCHANTABILITY or FITNESS
+# FOR A PARTICULAR PURPOSE. You should have received a copy of GPLv2
+# along with this software; if not, see
+#
http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
+#
+# Red Hat trademarks are not licensed under GPLv2. No permission is
+# granted to use or replicate Red Hat trademarks that are incorporated
+# in this software or its documentation.
+#
+import os
+import socket
+import sys
+from optparse import Option, OptionParser
+
+def systemExit(code, msgs=None):
+ "Exit with a code and optional message(s). Saved a few lines of code."
+ if msgs:
+ if type(msgs) not in [type([]), type(())]:
+ msgs = (msgs, )
+ for msg in msgs:
+ sys.stderr.write(str(msg)+'\n')
+ sys.exit(code)
+
+# quick check to see if you are a super-user.
+if os.getuid() != 0:
+ systemExit(8, 'ERROR: must be root to execute\n')
+
+_LIBPATH = "/usr/share/rhn"
+# add to the path if need be
+if _LIBPATH not in sys.path:
+ sys.path.append(_LIBPATH)
+
+from up2date_client.rhnChannel import subscribeChannels, unsubscribeChannels,
getChannels
+from up2date_client import up2dateAuth, config, up2dateErrors
+
+def processCommandline():
+ "process the commandline, setting the OPTIONS object"
+ optionsTable = [
+ Option('-c', '--channel', action='append',
+ help='name of channel you want to (un)subscribe'),
+ Option('-a', '--add', action='store_true',
+ help='subscribe to channel'),
+ Option('-r', '--remove', action='store_true',
+ help='unsubscribe from channel'),
+ Option('-l', '--list', action='store_true',
+ help='list channels'),
+ Option('-v', '--verbose', action='store_true',
+ help='verbose output'),
+ Option('-u', '--user', action='store',
+ help='your user name'),
+ Option('-p', '--password', action='store',
+ help='your password'),
+ ]
+ optionParser = OptionParser(option_list=optionsTable)
+ global OPTIONS
+ OPTIONS, args = optionParser.parse_args()
+
+ # we take no extra commandline arguments that are not linked to an option
+ if args:
+ systemExit(1, "ERROR: these arguments make no sense in this context (try
--help)")
+ if not OPTIONS.user and not OPTIONS.list:
+ systemExit(2, "ERROR: username is required")
+ if not OPTIONS.password and not OPTIONS.list:
+ systemExit(3, "ERROR: password is required")
+
+def main():
+ if OPTIONS.add:
+ subscribeChannels(OPTIONS.channel, OPTIONS.user, OPTIONS.password)
+ if OPTIONS.verbose:
+ print "Channel(s): %s successfully added" % ',
'.join(OPTIONS.channel)
+ elif OPTIONS.remove:
+ unsubscribeChannels(OPTIONS.channel, OPTIONS.user, OPTIONS.password)
+ if OPTIONS.verbose:
+ print "Channel(s): %s successfully removed" % ',
'.join(OPTIONS.channel)
+ elif OPTIONS.list:
+ channels = map(lambda x: x['label'], getChannels().channels())
+ channels.sort()
+ print '\n'.join(channels)
+ else:
+ s = rhnserver.RhnServer()
+ print s.up2date.listall(up2dateAuth.getSystemId())
+ systemExit(3, "ERROR: you may want to specify --add, --remove or
--list")
+
+try:
+ processCommandline()
+ main()
+except KeyboardInterrupt:
+ systemExit(0, "\nUser interrupted process.")
+except up2dateErrors.RhnServerException, e:
+ # do not print traceback, it will scare people
+ systemExit(1, e)
commit ee4f1d0d44bbf90a1396532c83b9b4a0da646c74
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Tue Nov 24 12:16:36 2009 +0100
540544 - raise error if channel do not exist or you are not allowed to add or remove
it
diff --git a/backend/common/rhnException.py b/backend/common/rhnException.py
index a6a54fc..24b326d 100644
--- a/backend/common/rhnException.py
+++ b/backend/common/rhnException.py
@@ -191,6 +191,7 @@ on this system."),
Please refer to your organization's channel or organization
administrators for further details.
"""),
+ 72: _("""You can not unsubscribe from base
channel."""),
# 80-90: server group errors
80: _("There was an error while trying to join the system to its
groups"),
diff --git a/backend/server/rhnChannel.py b/backend/server/rhnChannel.py
index 8322303..96db6a6 100644
--- a/backend/server/rhnChannel.py
+++ b/backend/server/rhnChannel.py
@@ -1935,7 +1935,7 @@ def subscribe_channel(server_id, channel, username, password):
ret = h.fetchone_dict()
if not ret:
log_error("Channel %s does not exist?" % channel)
- raise rhnFault(39, "Channel %s does not exist?" % channel)
+ raise rhnFault(40, "Channel %s does not exist?" % channel)
channel_id = ret['id']
@@ -2190,14 +2190,13 @@ def unsubscribe_channel(server_id, channel, username, password):
h.execute(channel = channel)
ret = h.fetchone_dict()
if not ret:
- log_error("Asked to unsubscribe server %s "\
- "from non-existent channel %s" % (
- server_id, channel))
- return 0
+ log_error("Asked to unsubscribe server %s "\
"from non-existent channel %s" % (
server_id, channel))
+ raise rhnFault(40, "The specified channel '%s' does not exist."
% channel)
if not ret["parent_channel"]:
log_error("Cannot unsubscribe %s from base channel %s" % (
server_id, channel))
- return 0
+ raise rhnFault(72, "You can not unsubscribe %s from base channel %s." %
(
+ server_id, channel))
# we're fine
return unsubscribe_sql(server_id, ret["id"])
commit 22bddd07e3ba11ee5b70f8e205ab04e729634f05
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Tue Nov 24 11:38:20 2009 +0100
540544 - fix usage of check_user_password
rhnUser.check_user_password check if password is correct
but we want rather call auth_username_password, which return object rhnUser. There is
no need for additional checks.
And they even did not worked, becouse we usually have in db crypted
password, but password given as param is not crypted!
diff --git a/backend/server/rhnChannel.py b/backend/server/rhnChannel.py
index 926402c..8322303 100644
--- a/backend/server/rhnChannel.py
+++ b/backend/server/rhnChannel.py
@@ -1798,37 +1798,20 @@ def list_obsoletes(channel):
rhnCache.set(cache_entry, result, c_info["last_modified"])
return result
-
-# this surely needs to be more complicated, since it needs to check
-# for admins in a org, and not just users with a matching org_id
-# XXX: there is a lot of duplication code with stuff in rhns_user -
-# need to simplify...
def __auth_user(server_id, username, password):
+ """ Auth if user can add/remove channel from given server
"""
log_debug(3, server_id, username)
# check the username and password for compliance
- username, password = rhnUser.check_user_password(username, password)
- # verify the password
- h = rhnSQL.prepare("""
- select w.id, w.password from web_contact w
- where w.login_uc = upper(:username)
- """)
- h.execute(username = username)
- res = h.fetchone_dict()
- if not res: # Login name and password for this server do not match
- raise rhnFault(1)
- # now check the password
- if string.lower(res["password"]) != string.lower(password):
- raise rhnFault(2)
- userid = res['id']
+ user = rhnUser.auth_username_password(username, password)
# The user's password checks, verify that they have perms on that
# server.
h = rhnSQL.prepare("""
- select *
+ select count(*)
from rhnUserServerPerms usp
where usp.user_id = :user_id
and usp.server_id = :server_id
""")
- h.execute(user_id = str(userid), server_id = str(server_id))
+ h.execute(user_id = str(user.getid()), server_id = str(server_id))
res = h.fetchone_dict()
if not res:
# Not allowed to perform administrative tasks on this server
@@ -2202,7 +2185,7 @@ def unsubscribe_channel(server_id, channel, username, password):
# now get the id of the channel
h = rhnSQL.prepare("""
- select c.id, c.parent_channel from rhnChannel where label = :channel
+ select id, parent_channel from rhnChannel where label = :channel
""")
h.execute(channel = channel)
ret = h.fetchone_dict()
@@ -2212,7 +2195,7 @@ def unsubscribe_channel(server_id, channel, username, password):
server_id, channel))
return 0
if not ret["parent_channel"]:
- log_error("Cannot unsubscribe %s from parent channel %s" % (
+ log_error("Cannot unsubscribe %s from base channel %s" % (
server_id, channel))
return 0
# we're fine
commit c94186f09440c7702696957200d6a5db80d71fb5
Author: Justin Sherrill <jsherril(a)redhat.com>
Date: Mon Nov 23 17:42:38 2009 -0500
improving the system channels page by increasing the base channel selector box size
and having the custom channels sorted by name
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 eec9381..80e28cf 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
@@ -778,7 +778,7 @@ SELECT C.id, C.name, C.label, 1 AS IS_CUSTOM
(SELECT S.id, S.org_id
FROM rhnSharedChannelView S
WHERE S.ORG_TRUST_ID = :org_id
- AND S.parent_channel IS NULL)
+ AND S.parent_channel IS NULL) order by UPPER(C.name)
</query>
</mode>
diff --git a/java/code/webapp/WEB-INF/pages/systems/sdc/channels.jsp
b/java/code/webapp/WEB-INF/pages/systems/sdc/channels.jsp
index e9ceb87..37a71aa 100644
--- a/java/code/webapp/WEB-INF/pages/systems/sdc/channels.jsp
+++ b/java/code/webapp/WEB-INF/pages/systems/sdc/channels.jsp
@@ -94,7 +94,7 @@
</p>
</div-->
<p/>
- <select name="new_base_channel_id" size="5">
+ <select name="new_base_channel_id" size="10">
<option value="-1"
<c:if test="${current_base_channel_id == -1}">
selected="selected"
commit 1bfa52fb58273b0ff86bb62b8ae60ca22feff682
Author: Justin Sherrill <jsherril(a)redhat.com>
Date: Mon Nov 23 17:09:01 2009 -0500
another small display issue fix for list
diff --git a/java/code/webapp/WEB-INF/pages/systems/errata.jsp
b/java/code/webapp/WEB-INF/pages/systems/errata.jsp
index c9c986f..0c44841 100644
--- a/java/code/webapp/WEB-INF/pages/systems/errata.jsp
+++ b/java/code/webapp/WEB-INF/pages/systems/errata.jsp
@@ -133,7 +133,7 @@
<rl:column headerkey="erratalist.jsp.updated" bound="false"
sortattr="updateDateObj"
sortable="true"
- defaultsort="desc">
+ defaultsort="desc" styleclass="last-column">
${current.updateDate}
</rl:column>
commit caef5c68d1e335e650cc6da88556072668fd96ad
Author: Justin Sherrill <jsherril(a)redhat.com>
Date: Mon Nov 23 17:00:46 2009 -0500
fixing sort on channel manage page to sort by name and not id
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 a70d6f0..eec9381 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
@@ -729,15 +729,16 @@ SELECT CTV.name, CTV.id, CTV.depth, CTV.channel_arch_id, C.org_id,
FROM rhnchannelpackage cp
WHERE cp.channel_id = CTV.id) AS package_count,
CTV.parent_or_self_label, CTV.label AS channel_label
- FROM rhnchannel C, rhnChannelTreeView CTV
+ FROM rhnchannel C, rhnChannelTreeView CTV, rhnChannel C2
WHERE CTV.id = C.ID
+ AND CTV.parent_or_self_id = C2.id
AND (rhn_channel.user_role_check(C.id, :user_id, 'manage') = 1
OR EXISTS (
SELECT 1
FROM rhnChannel C2
WHERE C2.parent_channel = C.ID
AND rhn_channel.user_role_check(C2.id, :user_id, 'manage') =
1))
-ORDER BY rhn_channel.channel_priority(CTV.parent_or_self_id), CTV.parent_or_self_id,
CTV.depth, UPPER(CTV.name)
+ORDER BY UPPER(C2.name), depth, UPPER(C.name)
</query>
</mode>
commit 1e8370080bc2753a7bbe9fabe39a543884c7d357
Author: Justin Sherrill <jsherril(a)redhat.com>
Date: Mon Nov 23 16:11:13 2009 -0500
fixing a bunch of list display issues that have bugged me for a while
diff --git a/java/code/webapp/WEB-INF/nav/sitenav-authenticated.xml
b/java/code/webapp/WEB-INF/nav/sitenav-authenticated.xml
index 6e7d4b1..1580ba5 100644
--- a/java/code/webapp/WEB-INF/nav/sitenav-authenticated.xml
+++ b/java/code/webapp/WEB-INF/nav/sitenav-authenticated.xml
@@ -46,7 +46,11 @@
</rhn-tab>
<rhn-tab name="System Set Manager"
url="/network/systems/ssm/index.pxt"
acl="org_entitlement(sw_mgr_enterprise)">
<rhn-tab-directory>/rhn/systems/ssm</rhn-tab-directory>
- <rhn-tab name="ssm.nav.status" url="/rhn/ssm/ViewAllLog.do"
acl="org_entitlement(sw_mgr_enterprise)"/>
+ <rhn-tab-directory>/rhn/ssm</rhn-tab-directory>
+ <rhn-tab name="ssm.nav.status" url="/rhn/ssm/ViewAllLog.do"
acl="org_entitlement(sw_mgr_enterprise)">
+ <rhn-tab-url>/rhn/ssm/ViewLog.do</rhn-tab-url>
+ <rhn-tab-url>/rhn/ssm/ViewCompletedLog.do</rhn-tab-url>
+ </rhn-tab>
</rhn-tab>
<rhn-tab name="Advanced Search" url="/rhn/systems/Search.do"
acl="org_entitlement(sw_mgr_enterprise)" />
<rhn-tab name="Activation Keys"
acl="org_entitlement(sw_mgr_enterprise); user_role(activation_key_admin)">
diff --git a/java/code/webapp/WEB-INF/pages/admin/multiorg/orgsoftwaresubs.jsp
b/java/code/webapp/WEB-INF/pages/admin/multiorg/orgsoftwaresubs.jsp
index 7dc2508..58f3ee0 100644
--- a/java/code/webapp/WEB-INF/pages/admin/multiorg/orgsoftwaresubs.jsp
+++ b/java/code/webapp/WEB-INF/pages/admin/multiorg/orgsoftwaresubs.jsp
@@ -57,7 +57,7 @@
<rl:column bound="false"
sortable="false"
- headerkey="entitlements.jsp.channel">
+ headerkey="entitlements.jsp.channel"
styleclass="first-column">
<a
href="/rhn/admin/multiorg/SoftwareEntitlementDetails.do?cfid=${current.id}"><c:out
value="${current.name}" /></a>
</rl:column>
<rl:column bound="false"
@@ -72,7 +72,7 @@
</rl:column>
<rl:column bound="false"
sortable="false"
- headerkey="orgsystemsubs.jsp.proposed_total">
+ headerkey="orgsystemsubs.jsp.proposed_total"
styleclass="last-column">
<c:choose>
<c:when test="${param.oid != 1}">
<input name="${current.id}"
value="${current.maxMembers}" type="text"
diff --git a/java/code/webapp/WEB-INF/pages/admin/multiorg/orgtrust.jsp
b/java/code/webapp/WEB-INF/pages/admin/multiorg/orgtrust.jsp
index be173ae..50570af 100644
--- a/java/code/webapp/WEB-INF/pages/admin/multiorg/orgtrust.jsp
+++ b/java/code/webapp/WEB-INF/pages/admin/multiorg/orgtrust.jsp
@@ -45,9 +45,11 @@
<a href="OrgDetails.do?oid=${current.org.id}">
${current.org.name} </a>
</rl:column>
<rl:column
- bound="false"
- sortable="false"
- headerkey="org.trust.trusts">${current.numTrusted}
+ bound="false"
+ sortable="false"
+ headerkey="org.trust.trusts"
+ styleclass="last-column">
+ ${current.numTrusted}
</rl:column>
</rl:list>
<hr/>
diff --git
a/java/code/webapp/WEB-INF/pages/common/fragments/errata/relevant-errata-list.jspf
b/java/code/webapp/WEB-INF/pages/common/fragments/errata/relevant-errata-list.jspf
index 3086910..18b36de 100644
--- a/java/code/webapp/WEB-INF/pages/common/fragments/errata/relevant-errata-list.jspf
+++ b/java/code/webapp/WEB-INF/pages/common/fragments/errata/relevant-errata-list.jspf
@@ -5,7 +5,7 @@
<rl:decorator name="PageSizeDecorator"/>
<rl:decorator name="ElaborationDecorator"/>
- <rl:column headerkey="erratalist.jsp.type"
styleclass="text-align: left;">
+ <rl:column headerkey="erratalist.jsp.type"
styleclass="first-column text-align: left;">
<c:if test="${current.securityAdvisory}">
<img src="/img/wrh-security.gif"
alt="<bean:message
key="erratalist.jsp.securityadvisory"/>"/>
@@ -32,15 +32,30 @@
styleclass="text-align: center;">
<a
href="/rhn/errata/details/SystemsAffected.do?eid=${current.id}">${current.affectedSystemCount}</a>
</rl:column>
- <rl:column headerkey="erratalist.jsp.updated"
- sortable="true"
- sortattr="updateDateObj"
- styleclass="text-align: center;">
- ${current.updateDate}
- </rl:column>
+
+ <c:if test="${displayCves}">
+ <rl:column headerkey="erratalist.jsp.updated"
+ sortable="true"
+ sortattr="updateDateObj"
+ styleclass="text-align: center;">
+ ${current.updateDate}
+ </rl:column>
+ </c:if>
+ <c:if test="${not displayCves}">
+ <rl:column headerkey="erratalist.jsp.updated"
+ sortable="true"
+ sortattr="updateDateObj"
+ styleclass="last-column text-align: center;">
+ ${current.updateDate}
+ </rl:column>
+ </c:if>
+
+
+
+
<c:if test="${displayCves}">
- <rl:column headerkey="details.jsp.cves">
+ <rl:column headerkey="details.jsp.cves"
styleclass="last-column">
<c:forEach items="${current.cves}" var="cve">
<a
href="http://cve.mitre.org/cgi-bin/cvename.cgi?name=${cve}">
<c:out value="${cve}"/> <br />
diff --git a/java/code/webapp/WEB-INF/pages/ssm/packageinstall.jsp
b/java/code/webapp/WEB-INF/pages/ssm/packageinstall.jsp
index f78c75f..7bd2594 100644
--- a/java/code/webapp/WEB-INF/pages/ssm/packageinstall.jsp
+++ b/java/code/webapp/WEB-INF/pages/ssm/packageinstall.jsp
@@ -25,7 +25,7 @@
emptykey="channels.overview.nochannels">
<rl:column headerkey="channels.overview.name"
bound="false"
- sortattr="name" sortable="true">
+ sortattr="name" sortable="true"
styleclass="first-column last-column">
<c:choose>
<c:when test="${current.depth > 1}">
<img style="margin-left: 4px;"
diff --git a/java/code/webapp/WEB-INF/pages/ssm/packageinstallschedule.jsp
b/java/code/webapp/WEB-INF/pages/ssm/packageinstallschedule.jsp
index add170b..2b47b87 100644
--- a/java/code/webapp/WEB-INF/pages/ssm/packageinstallschedule.jsp
+++ b/java/code/webapp/WEB-INF/pages/ssm/packageinstallschedule.jsp
@@ -26,11 +26,11 @@
<rl:list dataset="pageList"
width="100%"
name="groupList"
- styleclass="list"
+ styleclass="list "
emptykey="systemlist.jsp.nosystems">
<rl:column headerkey="actions.jsp.system" bound="false"
- sortattr="name" sortable="true">
+ sortattr="name" sortable="true"
styleclass="first-column last-column">
${current.name}
</rl:column>
diff --git a/java/code/webapp/WEB-INF/pages/ssm/packageremoveschedule.jsp
b/java/code/webapp/WEB-INF/pages/ssm/packageremoveschedule.jsp
index bc6019b..4eda77e 100644
--- a/java/code/webapp/WEB-INF/pages/ssm/packageremoveschedule.jsp
+++ b/java/code/webapp/WEB-INF/pages/ssm/packageremoveschedule.jsp
@@ -27,12 +27,12 @@
<rl:decorator name="ElaborationDecorator"/>
<rl:column headerkey="actions.jsp.system" bound="false"
- sortattr="name" sortable="true">
+ sortattr="name" sortable="true"
styleclass="first-column">
${current.system_name}
</rl:column>
<rl:column headerkey="ssm.package.remove.schedule.packages"
bound="false"
- sortable="false">
+ sortable="false" styleclass="last-column">
<c:forEach begin="0" end="19"
items="${current.elaborator0}" var="item"
varStatus="status">
<c:out value="${item.nvre}"/><br/>
</c:forEach>
diff --git a/java/code/webapp/WEB-INF/pages/ssm/packageupgradeschedule.jsp
b/java/code/webapp/WEB-INF/pages/ssm/packageupgradeschedule.jsp
index 8ac421e..139f8a5 100644
--- a/java/code/webapp/WEB-INF/pages/ssm/packageupgradeschedule.jsp
+++ b/java/code/webapp/WEB-INF/pages/ssm/packageupgradeschedule.jsp
@@ -32,12 +32,12 @@
<rl:decorator name="ElaborationDecorator"/>
<rl:column headerkey="actions.jsp.system" bound="false"
- sortattr="name" sortable="true">
+ sortattr="name" sortable="true"
styleclass="first-column">
${current.server_name}
</rl:column>
<rl:column headerkey="ssm.package.upgrade.schedule.packages"
bound="false"
- sortable="false">
+ sortable="false" styleclass="last-column">
<c:forEach begin="0" end="19"
items="${current.elaborator0}" var="item"
varStatus="status">
<c:out value="${item.nvre}"/><br/>
</c:forEach>
diff --git a/java/code/webapp/WEB-INF/pages/ssm/packageverifyschedule.jsp
b/java/code/webapp/WEB-INF/pages/ssm/packageverifyschedule.jsp
index 9d9ca72..27cd47a 100644
--- a/java/code/webapp/WEB-INF/pages/ssm/packageverifyschedule.jsp
+++ b/java/code/webapp/WEB-INF/pages/ssm/packageverifyschedule.jsp
@@ -27,12 +27,12 @@
<rl:decorator name="ElaborationDecorator"/>
<rl:column headerkey="actions.jsp.system" bound="false"
- sortattr="name" sortable="true">
+ sortattr="name" sortable="true"
styleclass="first-column">
${current.system_name}
</rl:column>
<rl:column headerkey="ssm.package.verify.schedule.packages"
bound="false"
- sortable="false">
+ sortable="false" styleclass="last-column">
<c:forEach begin="0" end="19"
items="${current.elaborator0}" var="item"
varStatus="status">
<c:out value="${item.nvre}"/><br/>
</c:forEach>
diff --git a/java/code/webapp/WEB-INF/pages/ssm/view-log.jsp
b/java/code/webapp/WEB-INF/pages/ssm/view-log.jsp
index ae04339..eb19833 100644
--- a/java/code/webapp/WEB-INF/pages/ssm/view-log.jsp
+++ b/java/code/webapp/WEB-INF/pages/ssm/view-log.jsp
@@ -35,7 +35,7 @@
<rl:decorator name="PageSizeDecorator"/>
<rl:column headerkey="ssm.operations.viewlog.description"
bound="false"
- sortattr="description" sortable="true">
+ sortattr="description" sortable="true"
styleclass="first-column">
<a
href="/rhn/ssm/ViewLogDetails.do?oid=${current.id}"><c:out
value="${current.description}"/></a>
</rl:column>
@@ -48,7 +48,7 @@
</c:if>
</rl:column>
- <rl:column headerkey="ssm.operations.viewlog.modified"
bound="false">
+ <rl:column headerkey="ssm.operations.viewlog.modified"
bound="false" styleclass="last-column">
<c:out value="${current.modified}"/>
</rl:column>
diff --git a/java/code/webapp/WEB-INF/struts-config.xml
b/java/code/webapp/WEB-INF/struts-config.xml
index 9ba2e2a..2c5d1db 100644
--- a/java/code/webapp/WEB-INF/struts-config.xml
+++ b/java/code/webapp/WEB-INF/struts-config.xml
@@ -6596,7 +6596,7 @@
<forward name="default"
path="/WEB-INF/pages/ssm/packageinstallschedule.jsp" />
<forward name="confirm"
- path="/ssm/ViewLog.do" />
+ path="/ssm/ViewLog.do" redirect="true"/>
</action>
<!-- SSM Package Remove Pages -->
@@ -6618,7 +6618,7 @@
<forward name="default"
path="/WEB-INF/pages/ssm/packageremoveschedule.jsp" />
<forward name="confirm"
- path="/ssm/ViewLog.do"/>
+ path="/ssm/ViewLog.do" redirect="true"/>
</action>
<!-- SSM Package Upgrade Pages -->
@@ -6640,7 +6640,7 @@
<forward name="default"
path="/WEB-INF/pages/ssm/packageupgradeschedule.jsp" />
<forward name="confirm"
- path="/ssm/ViewLog.do"/>
+ path="/ssm/ViewLog.do" redirect="true"/>
</action>
<!-- SSM Package Verify Pages -->
@@ -6662,7 +6662,7 @@
<forward name="default"
path="/WEB-INF/pages/ssm/packageverifyschedule.jsp" />
<forward name="confirm"
- path="/ssm/ViewLog.do"/>
+ path="/ssm/ViewLog.do" redirect="true"/>
</action>
<action path="/admin/TaskStatus"
commit 8d1e431fd21b251d764ec5fe9a775114806b635f
Author: Justin Sherrill <jsherril(a)redhat.com>
Date: Mon Nov 23 14:43:35 2009 -0500
519788 - fixing set selection on two config management lists
diff --git
a/java/code/webapp/WEB-INF/pages/common/fragments/configuration/sdc/configfile_list.jspf
b/java/code/webapp/WEB-INF/pages/common/fragments/configuration/sdc/configfile_list.jspf
index 2a1ac54..f5eab7f 100644
---
a/java/code/webapp/WEB-INF/pages/common/fragments/configuration/sdc/configfile_list.jspf
+++
b/java/code/webapp/WEB-INF/pages/common/fragments/configuration/sdc/configfile_list.jspf
@@ -11,4 +11,5 @@
<rhn:set value="${current.id}"/>
<%@ include
file="/WEB-INF/pages/common/fragments/configuration/sdc/configfile_rows.jspf"
%>
</rhn:listdisplay>
- </rhn:list>
\ No newline at end of file
+ </rhn:list>
+ <rhn:submitted/>
\ No newline at end of file
commit dc44473d1cacef732c0b0c132627fc118ac275e6
Author: Justin Sherrill <jsherril(a)redhat.com>
Date: Fri Nov 20 17:47:28 2009 -0500
checkstyle fix
diff --git
a/java/code/src/com/redhat/rhn/frontend/action/schedule/test/PackageListSetupActionTest.java
b/java/code/src/com/redhat/rhn/frontend/action/schedule/test/PackageListSetupActionTest.java
index 4300bd4..7394009 100644
---
a/java/code/src/com/redhat/rhn/frontend/action/schedule/test/PackageListSetupActionTest.java
+++
b/java/code/src/com/redhat/rhn/frontend/action/schedule/test/PackageListSetupActionTest.java
@@ -14,21 +14,14 @@
*/
package com.redhat.rhn.frontend.action.schedule.test;
-import com.redhat.rhn.common.hibernate.LookupException;
import com.redhat.rhn.domain.action.Action;
import com.redhat.rhn.domain.action.ActionFactory;
import com.redhat.rhn.domain.action.server.test.ServerActionTest;
import com.redhat.rhn.domain.action.test.ActionFactoryTest;
-import com.redhat.rhn.domain.kickstart.KickstartVirtualizationType;
import com.redhat.rhn.domain.role.RoleFactory;
import com.redhat.rhn.domain.server.Server;
import com.redhat.rhn.domain.server.test.ServerFactoryTest;
-import com.redhat.rhn.frontend.action.common.BadParameterException;
-import com.redhat.rhn.frontend.action.kickstart.KickstartDetailsEditAction;
-import com.redhat.rhn.frontend.action.schedule.PackageListSetupAction;
-import com.redhat.rhn.frontend.struts.RequestContext;
import com.redhat.rhn.manager.action.ActionManager;
-import com.redhat.rhn.testing.ActionHelper;
import com.redhat.rhn.testing.RhnMockStrutsTestCase;
/**
commit a24e4f0f95ec214d5dd539346a4b15b4a6bf93d5
Author: Justin Sherrill <jsherril(a)redhat.com>
Date: Fri Nov 20 17:39:19 2009 -0500
unit test fixes
diff --git a/java/code/src/com/redhat/rhn/domain/kickstart/KickstartData.java
b/java/code/src/com/redhat/rhn/domain/kickstart/KickstartData.java
index 631e68f..41363e6 100644
--- a/java/code/src/com/redhat/rhn/domain/kickstart/KickstartData.java
+++ b/java/code/src/com/redhat/rhn/domain/kickstart/KickstartData.java
@@ -73,7 +73,7 @@ public class KickstartData {
private Set childChannels;
private Set defaultRegTokens;
private Set preserveFileLists;
- private Set<KickstartPackage> ksPackages;
+ private Set<KickstartPackage> ksPackages = new
HashSet<KickstartPackage>();
private Collection<KickstartCommand> commands = new
HashSet<KickstartCommand>();
private Set ips; // rhnKickstartIpRange
private Set<KickstartScript> scripts; // rhnKickstartScript
@@ -1238,8 +1238,10 @@ public class KickstartData {
cloned.setKickstartDefaults(this.getKickstartDefaults().deepCopy(cloned));
}
cloned.setOrg(this.getOrg());
- for (KickstartPackage kp : this.getKsPackages()) {
- cloned.getKsPackages().add(kp.deepCopy(cloned));
+ if (this.getKsPackages() != null) {
+ for (KickstartPackage kp : this.getKsPackages()) {
+ cloned.getKsPackages().add(kp.deepCopy(cloned));
+ }
}
if (this.getPreserveFileLists() != null) {
diff --git
a/java/code/src/com/redhat/rhn/frontend/action/schedule/test/PackageListSetupActionTest.java
b/java/code/src/com/redhat/rhn/frontend/action/schedule/test/PackageListSetupActionTest.java
index 1b12b18..4300bd4 100644
---
a/java/code/src/com/redhat/rhn/frontend/action/schedule/test/PackageListSetupActionTest.java
+++
b/java/code/src/com/redhat/rhn/frontend/action/schedule/test/PackageListSetupActionTest.java
@@ -19,61 +19,55 @@ import com.redhat.rhn.domain.action.Action;
import com.redhat.rhn.domain.action.ActionFactory;
import com.redhat.rhn.domain.action.server.test.ServerActionTest;
import com.redhat.rhn.domain.action.test.ActionFactoryTest;
+import com.redhat.rhn.domain.kickstart.KickstartVirtualizationType;
import com.redhat.rhn.domain.role.RoleFactory;
import com.redhat.rhn.domain.server.Server;
import com.redhat.rhn.domain.server.test.ServerFactoryTest;
import com.redhat.rhn.frontend.action.common.BadParameterException;
+import com.redhat.rhn.frontend.action.kickstart.KickstartDetailsEditAction;
import com.redhat.rhn.frontend.action.schedule.PackageListSetupAction;
+import com.redhat.rhn.frontend.struts.RequestContext;
import com.redhat.rhn.manager.action.ActionManager;
import com.redhat.rhn.testing.ActionHelper;
-import com.redhat.rhn.testing.RhnBaseTestCase;
+import com.redhat.rhn.testing.RhnMockStrutsTestCase;
/**
* PackageListSetupActionTest
* @version $Rev$
*/
-public class PackageListSetupActionTest extends RhnBaseTestCase {
+public class PackageListSetupActionTest extends RhnMockStrutsTestCase {
public void testPeformExecute() throws Exception {
- PackageListSetupAction action = new PackageListSetupAction();
- ActionHelper sah = new ActionHelper();
- sah.setUpAction(action);
- sah.getRequest().setupAddParameter("aid", (String)null);
- try {
- sah.executeAction();
- fail();
- }
- catch (BadParameterException e) {
- //no op
- }
-
- sah.setupClampListBounds();
- sah.getRequest().setupAddParameter("aid", "-99999");
- sah.getRequest().setupAddParameter("returnvisit", (String) null);
- try {
- sah.executeAction();
- fail();
- }
- catch (LookupException e) {
- //no op
- }
-
- sah.getUser().addRole(RoleFactory.ORG_ADMIN);
- Action a = ActionFactoryTest.createAction(sah.getUser(),
ActionFactory.TYPE_ERRATA);
- Server server = ServerFactoryTest.createTestServer(sah.getUser(), true);
+ setRequestPathInfo("/schedule/PackageList");
+
+ user.addRole(RoleFactory.ORG_ADMIN);
+ Action a = ActionFactoryTest.createAction(user, ActionFactory.TYPE_ERRATA);
+ Server server = ServerFactoryTest.createTestServer(user, true);
ServerActionTest.createServerAction(server, a);
ActionManager.storeAction(a);
+ addRequestParameter("aid", a.getId().toString());
+ addRequestParameter("newset", (String)null);
+ addRequestParameter("returnvisit", (String) null);
+ actionPerform();
+ assertNotNull(getRequest().getAttribute("dataset"));
+ assertNotNull(getRequest().getAttribute("actionname"));
+ }
- sah.getRequest().setupAddParameter("aid", a.getId().toString());
- sah.setupClampListBounds();
- sah.getRequest().setupAddParameter("newset", (String)null);
- sah.getRequest().setupAddParameter("returnvisit", (String) null);
+ public void testPerformExecuteBad() {
+ setRequestPathInfo("/schedule/PackageList");
- sah.executeAction();
- assertNotNull(sah.getRequest().getAttribute("pageList"));
- assertNotNull(sah.getRequest().getAttribute("actionname"));
- assertNotNull(sah.getRequest().getAttribute("user"));
+ addRequestParameter("aid", (String) null);
+ actionPerform();
+ assertTrue(getActualForward().contains("errors/badparam.jsp"));
+ }
+
+
+ public void testPerformExecuteBad2() {
+ setRequestPathInfo("/schedule/PackageList");
+ addRequestParameter("aid", "-99999");
+ actionPerform();
+ assertTrue(getActualForward().contains("errors/lookup.jsp"));
}
}
diff --git a/java/code/src/com/redhat/rhn/frontend/events/test/NewUserEventTest.java
b/java/code/src/com/redhat/rhn/frontend/events/test/NewUserEventTest.java
index 722f1e2..3afecca 100644
--- a/java/code/src/com/redhat/rhn/frontend/events/test/NewUserEventTest.java
+++ b/java/code/src/com/redhat/rhn/frontend/events/test/NewUserEventTest.java
@@ -73,10 +73,10 @@ public class NewUserEventTest extends RhnBaseTestCase {
"someserver.rhndev.redhat.com/rhn/users/ActiveList.do");
assertTrue(mailer.getBody().contains("Your Spacewalk login:
testUser") ||
- mailer.getBody().contains("Your RHN Satellite login:
testUser"));
+ mailer.getBody().contains("Your RHN login:
testUser"));
assertTrue(mailer.getBody().contains("Your Spacewalk email address: "
+
"redhatJavaTest(a)redhat.com") ||
- mailer.getBody().contains("Your RHN Satellite email address:
" +
+ mailer.getBody().contains("Your RHN email address: " +
"redhatJavaTest(a)redhat.com"));
}
commit 5ed553caf1a3d43bf25ecb96c822b1499f27c180
Author: Justin Sherrill <jsherril(a)redhat.com>
Date: Fri Nov 20 15:28:51 2009 -0500
unit test fix - reloading the "Action" hibernate object seemed to cause
issues with the user object that it was associated with, so instead lets try refreshing
diff --git a/java/code/src/com/redhat/rhn/manager/action/ActionManager.java
b/java/code/src/com/redhat/rhn/manager/action/ActionManager.java
index 2794712..091e2f6 100644
--- a/java/code/src/com/redhat/rhn/manager/action/ActionManager.java
+++ b/java/code/src/com/redhat/rhn/manager/action/ActionManager.java
@@ -1327,7 +1327,8 @@ public class ActionManager extends BaseManager {
type = ActionFactory.lookupActionTypeByLabel(type.getLabel());
Action action = createScheduledAction(scheduler, type, name, earliestAction);
ActionFactory.save(action);
- action = (Action) ActionFactory.reload(action);
+ ActionFactory.getSession().flush();
+ ActionFactory.getSession().refresh(action);
Map params = new HashMap();
commit 6898b5ea1dd655d581fd2a1712a98ea45395e93a
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Fri Nov 20 17:38:31 2009 +0100
527412 - compute delta and write it to logs only if writeChangesToLog is set to 1
diff --git a/client/rhel/rhn-client-tools/etc-conf/up2date.config
b/client/rhel/rhn-client-tools/etc-conf/up2date.config
index e6f6a71..00954e0 100644
--- a/client/rhel/rhn-client-tools/etc-conf/up2date.config
+++ b/client/rhel/rhn-client-tools/etc-conf/up2date.config
@@ -44,3 +44,5 @@ skipNetwork=0
tmpDir[comment]=Use this Directory to place the temporary transport files
tmpDir=/tmp
+writeChangesToLog[comment]=Log to /var/log/up2date which packages has been added and
removed
+writeChangesToLog=0
diff --git a/client/rhel/rhn-client-tools/src/up2date_client/rhnPackageInfo.py
b/client/rhel/rhn-client-tools/src/up2date_client/rhnPackageInfo.py
index 0cb8e8d..5560fdd 100644
--- a/client/rhel/rhn-client-tools/src/up2date_client/rhnPackageInfo.py
+++ b/client/rhel/rhn-client-tools/src/up2date_client/rhnPackageInfo.py
@@ -9,15 +9,12 @@ import rhnserver
import rpmUtils
-def remoteDeltaPackages(pkgs):
+def logDeltaPackages(pkgs):
log = up2dateLog.initLog()
log.log_me("Adding packages to package profile: %s" %
pprint_pkglist(pkgs['added']))
log.log_me("Removing packages from package profile: %s" %
- pprint_pkglist(pkgs['deleted']))
- s = rhnserver.RhnServer()
-
- s.registration.delta_packages(up2dateAuth.getSystemId(), pkgs)
+ pprint_pkglist(pkgs['removed']))
def updatePackageProfile():
""" get a list of installed packages and send it to rhnServer
"""
diff --git a/client/rhel/yum-rhn-plugin/rhnplugin.py
b/client/rhel/yum-rhn-plugin/rhnplugin.py
index e5f2ff2..e7af545 100644
--- a/client/rhel/yum-rhn-plugin/rhnplugin.py
+++ b/client/rhel/yum-rhn-plugin/rhnplugin.py
@@ -196,10 +196,13 @@ def posttrans_hook(conduit):
""" Post rpm transaction hook. We update the RHN profile here.
"""
global rhn_enabled
if rhn_enabled:
- ts_info = conduit.getTsInfo()
- delta = make_package_delta(ts_info)
+ up2date_cfg = config.initUp2dateConfig()
+ if up2date_cfg.has_key('writeChangesToLog') and
up2date_cfg['writeChangesToLog'] == 1:
+ ts_info = conduit.getTsInfo()
+ delta = make_package_delta(ts_info)
+ rhnPackageInfo.logDeltaPackages(delta)
try:
- rhnPackageInfo.remoteDeltaPackages(delta)
+ rhnPackageInfo.updatePackageProfile()
except up2dateErrors.RhnServerException, e:
conduit.error(0, COMMUNICATION_ERROR + "\n" +
_("Package profile information could not be sent.") +
"\n" +
@@ -240,6 +243,7 @@ class RhnRepo(YumRepository):
def __init__(self, channel):
YumRepository.__init__(self, channel['label'])
+ self.name = channel['name']
self._callbacks_changed = False
# support failover urls, #232567
commit 0fec81b0d9c530eaf283522104c7995fb5719cc6
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Thu Nov 19 17:07:43 2009 +0100
527412 - Revert "fixing rhn-plugin to update package profiles through the
updatePackageProfile call instead of manually setting up the delta as it causes stale
package entries in the ui due to epoch being set to 0 for a no epoch packages"
This reverts commit 20566c5ea64527c9159104b7c61bb70b149b6318.
We need to compute delta so we can write what we add and what we remove to logs.
Conflicts:
client/rhel/yum-rhn-plugin/rhnplugin.py
diff --git a/client/rhel/yum-rhn-plugin/rhnplugin.py
b/client/rhel/yum-rhn-plugin/rhnplugin.py
index d9bed15..e5f2ff2 100644
--- a/client/rhel/yum-rhn-plugin/rhnplugin.py
+++ b/client/rhel/yum-rhn-plugin/rhnplugin.py
@@ -196,8 +196,10 @@ def posttrans_hook(conduit):
""" Post rpm transaction hook. We update the RHN profile here.
"""
global rhn_enabled
if rhn_enabled:
+ ts_info = conduit.getTsInfo()
+ delta = make_package_delta(ts_info)
try:
- rhnPackageInfo.updatePackageProfile()
+ rhnPackageInfo.remoteDeltaPackages(delta)
except up2dateErrors.RhnServerException, e:
conduit.error(0, COMMUNICATION_ERROR + "\n" +
_("Package profile information could not be sent.") +
"\n" +
@@ -238,7 +240,6 @@ class RhnRepo(YumRepository):
def __init__(self, channel):
YumRepository.__init__(self, channel['label'])
- self.name = channel['name']
self._callbacks_changed = False
# support failover urls, #232567
@@ -462,6 +463,65 @@ class RhnRepo(YumRepository):
up2dateAuth.updateLoginInfo()
return YumRepository._getRepoXML(self)
+def make_package_delta(ts_info):
+ """
+ Construct an RHN style package delta from a yum TransactionData object.
+
+ Return a hash containing two keys: added and removed.
+ Each key's value is a list of RHN style package tuples.
+ """
+
+ delta = {}
+ delta["added"] = []
+ delta["removed"] = []
+
+ # Make sure the transaction data has the packages in nice lists.
+ ts_info.makelists()
+
+ for ts_member in ts_info.installed:
+ package = ts_member.po
+ pkgtup = __rhn_pkg_tup_from_po(package)
+ delta["added"].append(pkgtup)
+
+ for ts_member in ts_info.depinstalled:
+ package = ts_member.po
+ pkgtup = __rhn_pkg_tup_from_po(package)
+ delta["added"].append(pkgtup)
+
+ for ts_member in ts_info.updated:
+ package = ts_member.po
+ pkgtup = __rhn_pkg_tup_from_po(package)
+ delta["added"].append(pkgtup)
+
+ for ts_member in ts_info.depupdated:
+ package = ts_member.po
+ pkgtup = __rhn_pkg_tup_from_po(package)
+ delta["added"].append(pkgtup)
+
+ for ts_member in ts_info.removed:
+ package = ts_member.po
+ pkgtup = __rhn_pkg_tup_from_po(package)
+ delta["removed"].append(pkgtup)
+
+ for ts_member in ts_info.depremoved:
+ package = ts_member.po
+ pkgtup = __rhn_pkg_tup_from_po(package)
+ delta["removed"].append(pkgtup)
+
+ return delta
+
+def __rhn_pkg_tup_from_po(package):
+ """ Construct an rhn-style package tuple from a yum package object.
"""
+
+ name = package.returnSimple('name')
+ epoch = package.returnSimple('epoch')
+ version = package.returnSimple('version')
+ release = package.returnSimple('release')
+ arch = package.returnSimple('arch')
+
+ return (name, version, release, epoch, arch)
+
+
class BadConfig(Exception):
pass
commit 7279c22dec3bbaf38a8ded0dd3e200ca7eeca5a0
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Fri Nov 20 12:06:36 2009 +0100
fixed lookup_checksum not to ignore checksum type
added lookup_checksum to upgrades
diff --git a/schema/spacewalk/oracle/procs/lookup_checksum.sql
b/schema/spacewalk/oracle/procs/lookup_checksum.sql
index d025b38..5baba4b 100644
--- a/schema/spacewalk/oracle/procs/lookup_checksum.sql
+++ b/schema/spacewalk/oracle/procs/lookup_checksum.sql
@@ -29,10 +29,9 @@ BEGIN
SELECT c.id
INTO checksum_id
- FROM rhnChecksum c,
- rhnChecksumType t
+ FROM rhnChecksumView c
WHERE c.checksum = checksum_in
- AND c.checksum_type_id = t.id;
+ AND c.checksum_type = checksum_type_in;
RETURN checksum_id;
EXCEPTION
diff --git
a/schema/spacewalk/upgrade/spacewalk-schema-0.6-to-spacewalk-schema-0.7/008-lookup_checksum.sql
b/schema/spacewalk/upgrade/spacewalk-schema-0.6-to-spacewalk-schema-0.7/008-lookup_checksum.sql
new file mode 100644
index 0000000..5baba4b
--- /dev/null
+++
b/schema/spacewalk/upgrade/spacewalk-schema-0.6-to-spacewalk-schema-0.7/008-lookup_checksum.sql
@@ -0,0 +1,49 @@
+--
+-- Copyright (c) 2009 Red Hat, Inc.
+--
+-- This software is licensed to you under the GNU General Public License,
+-- version 2 (GPLv2). There is NO WARRANTY for this software, express or
+-- implied, including the implied warranties of MERCHANTABILITY or FITNESS
+-- FOR A PARTICULAR PURPOSE. You should have received a copy of GPLv2
+-- along with this software; if not, see
+--
http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
+--
+-- Red Hat trademarks are not licensed under GPLv2. No permission is
+-- granted to use or replicate Red Hat trademarks that are incorporated
+-- in this software or its documentation.
+--
+--
+--
+--
+
+CREATE OR REPLACE FUNCTION
+LOOKUP_CHECKSUM(checksum_type_in IN VARCHAR2, checksum_in IN VARCHAR2)
+RETURN NUMBER
+IS
+ PRAGMA AUTONOMOUS_TRANSACTION;
+ checksum_id NUMBER;
+BEGIN
+ if checksum_in is null then
+ return null;
+ end if;
+
+ SELECT c.id
+ INTO checksum_id
+ FROM rhnChecksumView c
+ WHERE c.checksum = checksum_in
+ AND c.checksum_type = checksum_type_in;
+
+ RETURN checksum_id;
+EXCEPTION
+ WHEN NO_DATA_FOUND THEN
+ INSERT INTO rhnChecksum (id, checksum_type_id, checksum)
+ VALUES (rhnChecksum_seq.nextval,
+ (select id from rhnChecksumType where label = checksum_type_in),
+ checksum_in)
+ RETURNING id INTO checksum_id;
+ COMMIT;
+ RETURN checksum_id;
+END;
+/
+SHOW ERRORS
+
commit 87b31b546f1b6299c2ceeb019e8e672b3eb28e1a
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Fri Nov 20 11:47:28 2009 +0100
added forgotten rhnLib to imports
diff --git a/backend/server/handlers/app/packages.py
b/backend/server/handlers/app/packages.py
index d77f17c..731c608 100644
--- a/backend/server/handlers/app/packages.py
+++ b/backend/server/handlers/app/packages.py
@@ -22,7 +22,7 @@ import os
import string
import tempfile
-from common import RPC_Base, rhnFault, log_debug, log_error, CFG
+from common import RPC_Base, rhnFault, log_debug, log_error, CFG, rhnLib
from server import rhnSQL, rhnPackageUpload, rhnUser, rhnSession
diff --git a/backend/server/importlib/headerSource.py
b/backend/server/importlib/headerSource.py
index 5bc1d36..fba9224 100644
--- a/backend/server/importlib/headerSource.py
+++ b/backend/server/importlib/headerSource.py
@@ -24,7 +24,7 @@ from importLib import File, Dependency, ChangeLog, Channel, \
IncompletePackage, Package, SourcePackage
from backendLib import gmtime, localtime
from types import ListType, TupleType, IntType
-from common import log_debug
+from common import log_debug, rhnLib
class rpmPackage(IncompletePackage):
# Various mappings
diff --git a/backend/upload_server/handlers/package_push/package_push.py
b/backend/upload_server/handlers/package_push/package_push.py
index 96ba828..3784123 100644
--- a/backend/upload_server/handlers/package_push/package_push.py
+++ b/backend/upload_server/handlers/package_push/package_push.py
@@ -25,7 +25,7 @@ import string
from mod_python import apache
from rhn import rpclib
-from common import CFG, log_debug, log_error, rhnFault, rhnFlags
+from common import CFG, log_debug, log_error, rhnFault, rhnFlags, rhnLib
from server import rhnPackageUpload, rhnSQL, basePackageUpload
class PackagePush(basePackageUpload.BasePackageUpload):
diff --git a/backend/upload_server/handlers/package_upload/package_upload.py
b/backend/upload_server/handlers/package_upload/package_upload.py
index 185c05f..1f221c5 100644
--- a/backend/upload_server/handlers/package_upload/package_upload.py
+++ b/backend/upload_server/handlers/package_upload/package_upload.py
@@ -22,7 +22,7 @@
import os
from mod_python import apache
-from common import CFG, log_debug, log_error, rhnFault, rhnFlags
+from common import CFG, log_debug, log_error, rhnFault, rhnFlags, rhnLib
from server import rhnPackageUpload, basePackageUpload
from server.rhnLib import get_package_path
commit 0518c4332d1ad1cc1853e0ad25c56f8c16bb7c3f
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Fri Nov 20 10:14:02 2009 +0100
Automatic commit of package [spacewalk-java] release [0.7.18-1].
diff --git a/java/spacewalk-java.spec b/java/spacewalk-java.spec
index 4797ea9..695a41c 100644
--- a/java/spacewalk-java.spec
+++ b/java/spacewalk-java.spec
@@ -12,7 +12,7 @@ Name: spacewalk-java
Summary: Spacewalk Java site packages
Group: Applications/Internet
License: GPLv2
-Version: 0.7.17
+Version: 0.7.18
Release: 1%{?dist}
URL:
https://fedorahosted.org/spacewalk
Source0:
https://fedorahosted.org/releases/s/p/spacewalk/%{name}-%{version}.tar.gz
@@ -280,6 +280,21 @@ fi
%{jardir}/postgresql-jdbc.jar
%changelog
+* Fri Nov 20 2009 Tomas Lestach <tlestach(a)redhat.com> 0.7.18-1
+- some columns not filled on webui for non-cve errata (tlestach(a)redhat.com)
+- checkstyle fix (jsherril(a)redhat.com)
+- 512844 - fixing inefficient query in package set clenaup
+ (jsherril(a)redhat.com)
+- unit test fix - we no longer do validation checking on kickstart partitions,
+ so no need to test it (jsherril(a)redhat.com)
+- unit test fix - kickstart compare packages was not working correctly
+ (jsherril(a)redhat.com)
+- 537491 - fixing issue with cloned kickstart profiles losing the package list
+ during cloning (jsherril(a)redhat.com)
+- checkstyle fix (jsherril(a)redhat.com)
+- unit test fix (jsherril(a)redhat.com)
+- unit test fix (jsherril(a)redhat.com)
+
* Thu Nov 12 2009 Tomas Lestach <tlestach(a)redhat.com> 0.7.17-1
- 536825 - storing "@ Base" KickstartPackage into DB (tlestach(a)redhat.com)
- java code enhancements according to jsherrill's comments
diff --git a/rel-eng/packages/spacewalk-java b/rel-eng/packages/spacewalk-java
index 325e013..f1305e7 100644
--- a/rel-eng/packages/spacewalk-java
+++ b/rel-eng/packages/spacewalk-java
@@ -1 +1 @@
-0.7.17-1 java/
+0.7.18-1 java/
commit 3a37c0f219adef0b34c75a008e94d915fecc9471
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Thu Nov 19 15:14:56 2009 +0100
some columns not filled on webui for non-cve errata
errata_cves_elab didn't fill other columns, if no associated cves found
diff --git a/java/code/src/com/redhat/rhn/common/db/datasource/xml/Errata_queries.xml
b/java/code/src/com/redhat/rhn/common/db/datasource/xml/Errata_queries.xml
index 7ab88c0..c17e8aa 100644
--- a/java/code/src/com/redhat/rhn/common/db/datasource/xml/Errata_queries.xml
+++ b/java/code/src/com/redhat/rhn/common/db/datasource/xml/Errata_queries.xml
@@ -66,6 +66,7 @@ SELECT E.id, E.update_date
ORDER BY E.update_date DESC, E.id
</query>
<elaborator name="errata_cves_elab" />
+ <elaborator name="errata_overview" />
</mode>
<mode name="all_errata"
class="com.redhat.rhn.frontend.dto.ErrataOverview">
@@ -103,7 +104,7 @@ SELECT DISTINCT E.id, E.update_date, E.synopsis AS ADVISORY_SYNOPSIS
<mode name="all_errata_by_type_with_cves"
class="com.redhat.rhn.frontend.dto.SecurityErrataOverview">
<query params="org_id, type">
-SELECT DISTINCT E.id, E.update_date, E.synopsis AS ADVISORY_SYNOPSIS
+SELECT DISTINCT E.id, E.update_date
FROM rhnErrata E, rhnChannelErrata CE, rhnChannel C,
rhnChannelFamilyMembers CFM,
rhnOrgChannelFamilyPermissions OCF
@@ -116,6 +117,7 @@ SELECT DISTINCT E.id, E.update_date, E.synopsis AS ADVISORY_SYNOPSIS
ORDER BY E.update_date DESC, E.id
</query>
<elaborator name="errata_cves_elab" />
+ <elaborator name="errata_overview" />
</mode>
<mode name="all_errata_orig"
class="com.redhat.rhn.frontend.dto.ErrataOverview">
@@ -1286,21 +1288,8 @@ SELECT E.id, E.advisory, E.synopsis
</query>
</mode>
-<query name="errata_cves_elab" params="user_id" >
-SELECT E.id, E.advisory_name, E.advisory_type, E.synopsis AS ADVISORY_SYNOPSIS,
- C.name AS CVE,
- (SELECT COUNT(DISTINCT S.id)
- FROM rhnServerNeededErrataCache SNEC,
- rhnServer S, rhnUserServerPerms USP
- WHERE USP.user_id = :user_id
- AND USP.server_id = S.ID
- AND S.id = SNEC.server_id
- AND EXISTS (SELECT 1
- FROM rhnServerFeaturesView SFV
- WHERE SFV.server_id = SNEC.server_id
- AND SFV.label = 'ftr_errata_updates')
- AND SNEC.errata_id = E.id)
- AS AFFECTED_SYSTEM_COUNT
+<query name="errata_cves_elab">
+SELECT E.id, C.name AS CVE
FROM rhnErrata E, rhnCve C, rhnErrataCVE EC
WHERE E.id IN (%s)
AND E.id = EC.errata_id
diff --git a/java/code/src/com/redhat/rhn/frontend/dto/SecurityErrataOverview.java
b/java/code/src/com/redhat/rhn/frontend/dto/SecurityErrataOverview.java
index 5f0e419..34a5eef 100644
--- a/java/code/src/com/redhat/rhn/frontend/dto/SecurityErrataOverview.java
+++ b/java/code/src/com/redhat/rhn/frontend/dto/SecurityErrataOverview.java
@@ -42,9 +42,16 @@ public class SecurityErrataOverview extends ErrataOverview
*/
public void callback(ResultSet rs) throws SQLException {
if (rs != null) {
- String cve = rs.getString("CVE");
- if (cve != null) {
+ // need to use try-catch, because of use of two
+ // elaborators (only one of them elaborates "CVE")
+ try {
+ String cve = rs.getString("CVE");
+ if (cve != null) {
addCve(cve);
+ }
+ }
+ catch (SQLException e) {
+ return;
}
}
}
commit f03b7fcfc74c9f93585feb526a9bdfd45fa2001a
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Thu Nov 19 22:55:38 2009 +0100
Automatic commit of package [spacewalk-setup] release [0.7.7-1].
diff --git a/rel-eng/packages/spacewalk-setup b/rel-eng/packages/spacewalk-setup
index 9d93588..f623722 100644
--- a/rel-eng/packages/spacewalk-setup
+++ b/rel-eng/packages/spacewalk-setup
@@ -1 +1 @@
-0.7.6-1 spacewalk/setup/
+0.7.7-1 spacewalk/setup/
diff --git a/spacewalk/setup/spacewalk-setup.spec b/spacewalk/setup/spacewalk-setup.spec
index 5143cbb..0b8da2b 100644
--- a/spacewalk/setup/spacewalk-setup.spec
+++ b/spacewalk/setup/spacewalk-setup.spec
@@ -1,5 +1,5 @@
Name: spacewalk-setup
-Version: 0.7.6
+Version: 0.7.7
Release: 1%{?dist}
Summary: Initial setup tools for Red Hat Spacewalk
@@ -106,6 +106,9 @@ rm -rf %{buildroot}
%dir %{_sysconfdir}/pki/spacewalk/jabberd
%changelog
+* Thu Nov 19 2009 Michael Mraka <michael.mraka(a)redhat.com> 0.7.7-1
+- make installer look more consistent
+
* Mon Oct 12 2009 Michael Mraka <michael.mraka(a)redhat.com> 0.7.6-1
- added Oracle 11gR2 to allowed versions
- fixed length of db population progress bar
commit efccb38e1ed6398910cd9196c565368c911adb43
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Thu Nov 19 22:55:07 2009 +0100
Automatic commit of package [spacewalk-schema] release [0.7.6-1].
diff --git a/rel-eng/packages/spacewalk-schema b/rel-eng/packages/spacewalk-schema
index e0651bb..1ad2c7d 100644
--- a/rel-eng/packages/spacewalk-schema
+++ b/rel-eng/packages/spacewalk-schema
@@ -1 +1 @@
-0.7.5-1 schema/spacewalk/
+0.7.6-1 schema/spacewalk/
diff --git a/schema/spacewalk/spacewalk-schema.spec
b/schema/spacewalk/spacewalk-schema.spec
index d22e2f4..c981165 100644
--- a/schema/spacewalk/spacewalk-schema.spec
+++ b/schema/spacewalk/spacewalk-schema.spec
@@ -2,7 +2,7 @@ Name: spacewalk-schema
Group: Applications/Internet
Summary: Oracle SQL schema for Spacewalk server
-Version: 0.7.5
+Version: 0.7.6
Release: 1%{?dist}
Source0: %{name}-%{version}.tar.gz
@@ -58,6 +58,14 @@ rm -rf $RPM_BUILD_ROOT
%{_mandir}/man1/spacewalk-schema-upgrade*
%changelog
+* Thu Nov 19 2009 Michael Mraka <michael.mraka(a)redhat.com> 0.7.6-1
+- replaced cursors + for loops with already written bulk procedure
+- removed cartesian join
+- 532683 - removed unnecessary table joins
+- fixed schema upgrades
+- optimized queries in update_perms_for_server
+- 532683 - optimized delete
+
* Thu Oct 22 2009 Miroslav Suchy <msuchy(a)redhat.com> 0.7.5-1
- 449167 - record installation date of rpm package
commit 8303717c0e9d7840dd543a6c7592c9f5127c73cf
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Thu Nov 19 22:52:42 2009 +0100
Automatic commit of package [spacewalk-web] release [0.7.6-1].
diff --git a/rel-eng/packages/spacewalk-web b/rel-eng/packages/spacewalk-web
index 6ed3ce6..befe346 100644
--- a/rel-eng/packages/spacewalk-web
+++ b/rel-eng/packages/spacewalk-web
@@ -1 +1 @@
-0.7.5-1 web/
+0.7.6-1 web/
diff --git a/web/spacewalk-web.spec b/web/spacewalk-web.spec
index b1bb24a..6009b1b 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: 0.7.5
+Version: 0.7.6
Release: 1%{?dist}
URL:
https://fedorahosted.org/spacewalk
Source0:
https://fedorahosted.org/releases/s/p/spacewalk/%{name}-%{version}.tar.gz
@@ -317,6 +317,10 @@ rm -rf $RPM_BUILD_ROOT
# $Id$
%changelog
+* Thu Nov 19 2009 Michael Mraka <michael.mraka(a)redhat.com> 0.7.6-1
+- 531649 - fixed confirmation message after channel merge/compare
+- 527881 - fixed set clearing on the channel merge page
+
* Mon Oct 26 2009 Miroslav Suchý <msuchy(a)redhat.com> 0.7.5-1
- bump up spacewalk version to 0.7
- 449167 - add api call for rpm install date