backend/server
by Justin Sherrill
backend/server/handlers/xmlrpc/queue.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit da8fbebeaf26f2875dcfc0ce7d8d758b3a6ff578
Author: Justin Sherrill <jsherril(a)redhat.com>
Date: Thu Mar 11 10:54:08 2010 -0500
558502 - fixing ordering issue with fetching items from the queue which would result in reprovisioning not correctly ordering actions such that config deployment would suceede if the files required that a package be installed from the activation key due to ownership (example: a file owned by apache needing the httpd package installed)
diff --git a/backend/server/handlers/xmlrpc/queue.py b/backend/server/handlers/xmlrpc/queue.py
index 381e956..e25cf6d 100644
--- a/backend/server/handlers/xmlrpc/queue.py
+++ b/backend/server/handlers/xmlrpc/queue.py
@@ -205,7 +205,7 @@ class Queue(rhnHandler):
and sap.action_id = a.prerequisite
and sap.status != 2 -- completed
)
- order by a.prerequisite nulls last, a.id
+ order by a.earliest_action, a.prerequisite nulls first
""")
14 years, 2 months
Changes to 'refs/tags/spacewalk-schema-0.9.3-1'
by Michael Mraka
Tag 'spacewalk-schema-0.9.3-1' created by Michael Mraka <michael.mraka(a)redhat.com> at 2010-03-11 10:06 +0000
Tagging package [spacewalk-schema] version [0.9.3-1] in directory [schema/spacewalk/].
Changes since spacewalk-backend-0.9.8-1:
Michael Mraka (2):
there is no key_id column here
Automatic commit of package [spacewalk-schema] release [0.9.3-1].
Partha Aji (2):
Fixed a checkstyle error
Fixed a Unit test failure
Tomas Lestach (1):
572277 - several issues fixed for the package profile sync
---
java/code/src/com/redhat/rhn/domain/server/Server.java | 23 +-
java/code/src/com/redhat/rhn/domain/server/test/ServerFactoryVirtualizationTest.java | 2
java/code/src/com/redhat/rhn/frontend/action/rhnpackage/profile/MissingPackageAction.java | 53 +----
java/code/src/com/redhat/rhn/frontend/action/rhnpackage/profile/MissingPackageSetupAction.java | 101 +++-------
java/code/src/com/redhat/rhn/frontend/action/rhnpackage/profile/SyncProfilesAction.java | 19 -
java/code/src/com/redhat/rhn/frontend/action/rhnpackage/profile/SyncProfilesSetupAction.java | 51 ++---
java/code/src/com/redhat/rhn/frontend/action/rhnpackage/profile/SyncSystemsProfilesAction.java | 15 -
java/code/src/com/redhat/rhn/frontend/action/rhnpackage/profile/SyncSystemsSetupAction.java | 11 -
java/code/webapp/WEB-INF/pages/systems/details/packages/profiles/missingpkgs.jsp | 10
java/code/webapp/WEB-INF/pages/systems/details/packages/profiles/syncprofile.jsp | 8
java/code/webapp/WEB-INF/struts-config.xml | 15 -
rel-eng/packages/spacewalk-schema | 2
schema/spacewalk/common/tables/rhnPackageRepoData.sql | 6
schema/spacewalk/spacewalk-schema.spec | 5
14 files changed, 138 insertions(+), 183 deletions(-)
---
14 years, 2 months
2 commits - rel-eng/packages schema/spacewalk
by Michael Mraka
rel-eng/packages/spacewalk-schema | 2 +-
schema/spacewalk/common/tables/rhnPackageRepoData.sql | 6 ++----
schema/spacewalk/spacewalk-schema.spec | 5 ++++-
3 files changed, 7 insertions(+), 6 deletions(-)
New commits:
commit f960dfa353d674e897bdb3c03527a676bf8ea759
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Thu Mar 11 11:06:31 2010 +0100
Automatic commit of package [spacewalk-schema] release [0.9.3-1].
diff --git a/rel-eng/packages/spacewalk-schema b/rel-eng/packages/spacewalk-schema
index 4b7521d..9f45ec9 100644
--- a/rel-eng/packages/spacewalk-schema
+++ b/rel-eng/packages/spacewalk-schema
@@ -1 +1 @@
-0.9.2-1 schema/spacewalk/
+0.9.3-1 schema/spacewalk/
diff --git a/schema/spacewalk/spacewalk-schema.spec b/schema/spacewalk/spacewalk-schema.spec
index f15b3ee..19680f4 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.9.2
+Version: 0.9.3
Release: 1%{?dist}
Source0: %{name}-%{version}.tar.gz
@@ -58,6 +58,9 @@ rm -rf $RPM_BUILD_ROOT
%{_mandir}/man1/spacewalk-schema-upgrade*
%changelog
+* Thu Mar 11 2010 Michael Mraka <michael.mraka(a)redhat.com> 0.9.3-1
+- fixed misplaced column in index
+
* Tue Mar 09 2010 Michael Mraka <michael.mraka(a)redhat.com> 0.9.2-1
- 568293 - don't allow duplicated rows in rhnChecksum
- added constraints to rhnReleaseChannelMap
commit c910e3040da9e7d766151e5b865f32c81a92dbc3
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Thu Mar 11 11:03:17 2010 +0100
there is no key_id column here
fixes schema population failure
SQL> CREATE UNIQUE INDEX rhn_pkey_rd_pk_uq
2 ON rhnPackageKeyAssociation (package_id, key_id)
3 TABLESPACE DATA_TBS;
ON rhnPackageKeyAssociation (package_id, key_id)
*
ERROR at line 2:
ORA-01408: such column list already indexed
diff --git a/schema/spacewalk/common/tables/rhnPackageRepoData.sql b/schema/spacewalk/common/tables/rhnPackageRepoData.sql
index a2a6ca5..4f662c4 100644
--- a/schema/spacewalk/common/tables/rhnPackageRepoData.sql
+++ b/schema/spacewalk/common/tables/rhnPackageRepoData.sql
@@ -17,6 +17,8 @@
CREATE TABLE rhnPackageRepodata
(
package_id NUMBER NOT NULL
+ CONSTRAINT rhnPackageRepodata_pk
+ PRIMARY KEY
CONSTRAINT rhn_pkey_rd_pid_fk
REFERENCES rhnPackage (id)
ON DELETE CASCADE,
@@ -30,7 +32,3 @@ CREATE TABLE rhnPackageRepodata
)
;
-CREATE UNIQUE INDEX rhn_pkey_rd_pk_uq
- ON rhnPackageKeyAssociation (package_id, key_id)
- TABLESPACE [[64k_tbs]];
-
14 years, 2 months
java/code
by Partha Aji
java/code/src/com/redhat/rhn/domain/server/Server.java | 22 +++++++---
java/code/src/com/redhat/rhn/domain/server/test/ServerFactoryVirtualizationTest.java | 2
2 files changed, 18 insertions(+), 6 deletions(-)
New commits:
commit c2e6288f6a91c70c121fd80ea95456bd7f51d08c
Author: Partha Aji <paji(a)redhat.com>
Date: Wed Mar 10 17:07:28 2010 -0500
Fixed a Unit test failure
Basically had to make the Server ensure that it was deleting a guest
system that it owned...
diff --git a/java/code/src/com/redhat/rhn/domain/server/Server.java b/java/code/src/com/redhat/rhn/domain/server/Server.java
index a857f58..11c8aab 100644
--- a/java/code/src/com/redhat/rhn/domain/server/Server.java
+++ b/java/code/src/com/redhat/rhn/domain/server/Server.java
@@ -1362,8 +1362,20 @@ public class Server extends BaseDomainHelper implements Identifiable {
* @return <code>true</code> if the guest is deleted, <code>false</code> otherwise.
*/
public boolean deleteGuest(VirtualInstance guest) {
- guest.deleteGuestSystem();
- return removeGuest(guest);
+ if (canDeleteGuest(guest)) {
+ guest.deleteGuestSystem();
+ return removeGuest(guest);
+ }
+ return false;
+ }
+
+ private boolean canDeleteGuest(VirtualInstance guest) {
+ for (VirtualInstance g : guests) {
+ if (g.getId().equals(guest.getId())) {
+ return true;
+ }
+ }
+ return false;
}
/**
@@ -1374,10 +1386,9 @@ public class Server extends BaseDomainHelper implements Identifiable {
* @return <code>true</code> if the guest is deleted, <code>false</code> otherwise.
*/
public boolean removeGuest(VirtualInstance guest) {
-
boolean deleted = false;
- for (Iterator it = guests.iterator(); it.hasNext();) {
- VirtualInstance g = (VirtualInstance)it.next();
+ for (Iterator<VirtualInstance> it = guests.iterator(); it.hasNext();) {
+ VirtualInstance g = it.next();
if (g.getId().equals(guest.getId())) {
guest.setHostSystem(null);
@@ -1389,6 +1400,7 @@ public class Server extends BaseDomainHelper implements Identifiable {
return deleted;
}
+
/**
* Return the virtual instance that owns this server when the server is a virtual guest.
diff --git a/java/code/src/com/redhat/rhn/domain/server/test/ServerFactoryVirtualizationTest.java b/java/code/src/com/redhat/rhn/domain/server/test/ServerFactoryVirtualizationTest.java
index 9016e3f..55b7f6d 100644
--- a/java/code/src/com/redhat/rhn/domain/server/test/ServerFactoryVirtualizationTest.java
+++ b/java/code/src/com/redhat/rhn/domain/server/test/ServerFactoryVirtualizationTest.java
@@ -95,7 +95,7 @@ public class ServerFactoryVirtualizationTest extends RhnBaseTestCase {
virtualInstanceFactory.newRegisteredGuestWithHost();
Server otherHost = ServerFactory.createServer();
-
+
assertFalse(otherHost.deleteGuest(virtualInstance));
assertNotNull("guest system should not have been deleted",
virtualInstance.getGuestSystem());
14 years, 2 months
java/code
by Tomas Lestach
java/code/src/com/redhat/rhn/frontend/action/rhnpackage/profile/MissingPackageAction.java | 53 +----
java/code/src/com/redhat/rhn/frontend/action/rhnpackage/profile/MissingPackageSetupAction.java | 101 +++-------
java/code/src/com/redhat/rhn/frontend/action/rhnpackage/profile/SyncProfilesAction.java | 19 -
java/code/src/com/redhat/rhn/frontend/action/rhnpackage/profile/SyncProfilesSetupAction.java | 51 ++---
java/code/src/com/redhat/rhn/frontend/action/rhnpackage/profile/SyncSystemsProfilesAction.java | 15 -
java/code/src/com/redhat/rhn/frontend/action/rhnpackage/profile/SyncSystemsSetupAction.java | 11 -
java/code/webapp/WEB-INF/pages/systems/details/packages/profiles/missingpkgs.jsp | 10
java/code/webapp/WEB-INF/pages/systems/details/packages/profiles/syncprofile.jsp | 8
java/code/webapp/WEB-INF/struts-config.xml | 15 -
9 files changed, 113 insertions(+), 170 deletions(-)
New commits:
commit 84d12a3dd96d67b38e8b30465673a404fa0e33cc
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Fri Mar 5 14:21:59 2010 +0100
572277 - several issues fixed for the package profile sync
- ISE on MissingPackages.do
- use date if set for package sync schedule
- make use out of buttons "Remove listed packages from sync" and "Subscribe to
channels if available" on MissingPackages.do
diff --git a/java/code/src/com/redhat/rhn/frontend/action/rhnpackage/profile/MissingPackageAction.java b/java/code/src/com/redhat/rhn/frontend/action/rhnpackage/profile/MissingPackageAction.java
index e02b9b8..fe844a2 100644
--- a/java/code/src/com/redhat/rhn/frontend/action/rhnpackage/profile/MissingPackageAction.java
+++ b/java/code/src/com/redhat/rhn/frontend/action/rhnpackage/profile/MissingPackageAction.java
@@ -16,7 +16,6 @@ package com.redhat.rhn.frontend.action.rhnpackage.profile;
import com.redhat.rhn.common.db.datasource.DataResult;
import com.redhat.rhn.domain.action.rhnpackage.PackageAction;
-import com.redhat.rhn.domain.rhnpackage.MissingPackagesException;
import com.redhat.rhn.domain.user.User;
import com.redhat.rhn.frontend.struts.RequestContext;
import com.redhat.rhn.frontend.struts.SessionSetHelper;
@@ -60,20 +59,13 @@ public class MissingPackageAction extends BaseProfilesAction {
Set pkgIdCombos, String option) {
PackageAction pa = null;
- Long time = requestContext.getParamAsLong("date");
- Date earliest;
- if (time == null) {
- earliest = new Date();
- }
- else {
- earliest = new Date(time.longValue());
- }
+ Date time = new Date(requestContext.getParamAsLong("time"));
if (isProfileSync(requestContext)) {
Long prid = requestContext.getRequiredParam("prid");
pa = ProfileManager.syncToProfile(requestContext.getCurrentUser(), sid,
- prid, pkgIdCombos, option, earliest);
+ prid, pkgIdCombos, option, time);
if (pa == null) {
createMessage(requestContext.getRequest(), "message.nopackagestosync");
@@ -92,7 +84,7 @@ public class MissingPackageAction extends BaseProfilesAction {
else if (isSystemSync(requestContext)) {
Long sid1 = requestContext.getRequiredParam("sid_1");
pa = ProfileManager.syncToSystem(requestContext.getCurrentUser(), sid,
- sid1, pkgIdCombos, option, earliest);
+ sid1, pkgIdCombos, option, time);
if (pa == null) {
createMessage(requestContext.getRequest(), "message.nopackagestosync");
@@ -131,7 +123,7 @@ public class MissingPackageAction extends BaseProfilesAction {
Long sid = new RequestContext(request).getRequiredParam("sid");
Map params = new HashMap();
params.put("sid", sid);
- return getStrutsDelegate().forwardParams(mapping.findForward("newprofile"),
+ return getStrutsDelegate().forwardParams(mapping.findForward("showprofile"),
params);
}
@@ -148,24 +140,16 @@ public class MissingPackageAction extends BaseProfilesAction {
ActionForm formIn,
HttpServletRequest request,
HttpServletResponse response) {
- RequestContext rctx = new RequestContext(request);
- Long sid = new RequestContext(request).getRequiredParam("sid");
- //Long prid = RhnHelper.getParamAsLong(request, "prid", true);
+ RequestContext context = new RequestContext(request);
+ Long sid = context.getRequiredParam("sid");
Set <String> pkgIdCombos = SessionSetHelper.lookupAndBind(request,
getDecl(sid));
Map params = new HashMap();
params.put("sid", sid);
-
- try {
- syncToVictim(rctx, sid, pkgIdCombos, ProfileManager.OPTION_REMOVE);
-
- return getStrutsDelegate().forwardParams(mapping.findForward("newprofile"),
- params);
- }
- catch (MissingPackagesException mpe) {
- return getStrutsDelegate().forwardParams(mapping.findForward("newprofile"),
- params);
- }
+
+ syncToVictim(context, sid, pkgIdCombos, ProfileManager.OPTION_REMOVE);
+ return getStrutsDelegate().forwardParams(mapping.findForward("showprofile"),
+ params);
}
/**
@@ -183,22 +167,15 @@ public class MissingPackageAction extends BaseProfilesAction {
HttpServletResponse response) {
RequestContext requestContext = new RequestContext(request);
Long sid = requestContext.getRequiredParam("sid");
- Set <String> pkgIdCombos = SessionSetHelper.lookupAndBind(request,
+ Set <String> pkgIdCombos = SessionSetHelper.lookupAndBind(request,
getDecl(sid));
Map params = new HashMap();
params.put("sid", sid);
- try {
- syncToVictim(requestContext, sid, pkgIdCombos,
- ProfileManager.OPTION_SUBSCRIBE);
-
- return getStrutsDelegate().forwardParams(mapping.findForward("newprofile"),
- params);
- }
- catch (MissingPackagesException mpe) {
- return getStrutsDelegate().forwardParams(mapping.findForward("newprofile"),
- params);
- }
+ syncToVictim(requestContext, sid, pkgIdCombos,
+ ProfileManager.OPTION_SUBSCRIBE);
+ return getStrutsDelegate().forwardParams(
+ mapping.findForward("showprofile"), params);
}
/**
diff --git a/java/code/src/com/redhat/rhn/frontend/action/rhnpackage/profile/MissingPackageSetupAction.java b/java/code/src/com/redhat/rhn/frontend/action/rhnpackage/profile/MissingPackageSetupAction.java
index 0d12d27..4e77a71 100644
--- a/java/code/src/com/redhat/rhn/frontend/action/rhnpackage/profile/MissingPackageSetupAction.java
+++ b/java/code/src/com/redhat/rhn/frontend/action/rhnpackage/profile/MissingPackageSetupAction.java
@@ -14,21 +14,21 @@
*/
package com.redhat.rhn.frontend.action.rhnpackage.profile;
-import com.redhat.rhn.common.db.datasource.DataResult;
-import com.redhat.rhn.domain.rhnpackage.profile.Profile;
-import com.redhat.rhn.domain.server.Server;
import com.redhat.rhn.frontend.action.common.BadParameterException;
import com.redhat.rhn.frontend.struts.RequestContext;
import com.redhat.rhn.frontend.struts.RhnAction;
import com.redhat.rhn.frontend.struts.SessionSetHelper;
-import com.redhat.rhn.frontend.taglibs.list.ListTagHelper;
+import com.redhat.rhn.frontend.taglibs.list.helper.ListHelper;
+import com.redhat.rhn.frontend.taglibs.list.helper.Listable;
import com.redhat.rhn.manager.profile.ProfileManager;
-import com.redhat.rhn.manager.system.SystemManager;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
import java.util.Set;
import javax.servlet.http.HttpServletRequest;
@@ -38,9 +38,8 @@ import javax.servlet.http.HttpServletResponse;
* MissingPackageSetupAction
* @version $Rev$
*/
-public class MissingPackageSetupAction extends RhnAction {
+public class MissingPackageSetupAction extends RhnAction implements Listable {
- private static final String DATA_SET = "pageList";
private static final CompareProfileSetupAction DECL_PROFILE_ACTION =
new CompareProfileSetupAction();
private static final CompareSystemSetupAction DECL_SYSTEM_ACTION =
@@ -53,88 +52,62 @@ public class MissingPackageSetupAction extends RhnAction {
HttpServletResponse response) {
RequestContext requestContext = new RequestContext(request);
- processRequestAttributes(requestContext);
Long sid = requestContext.getRequiredParam(RequestContext.SID);
- String type = requestContext.getParam("sync", true);
- if ("system".equals(type)) {
- Long sid1 = requestContext.getRequiredParam(RequestContext.SID1);
- request.setAttribute(ListTagHelper.PARENT_URL,
- request.getRequestURI() + "?sid=" + sid + "&sid_1=" + sid1);
- }
- else if ("profile".equals(type)) {
- Long prid = requestContext.getRequiredParam(RequestContext.PRID);
- request.setAttribute(ListTagHelper.PARENT_URL,
- request.getRequestURI() + "?sid=" + sid + "&prid=" + prid);
+ Long sid1 = requestContext.getParamAsLong(RequestContext.SID1);
+ Long prid = requestContext.getParamAsLong(RequestContext.PRID);
+ String sync = requestContext.getParam("sync", Boolean.FALSE);
+ Long time = requestContext.getRequiredParam("time");
+
+ ListHelper helper = new ListHelper(this, request);
+ helper.execute();
+
+ if (request.getParameter(RequestContext.DISPATCH) != null) {
+ Map param = new HashMap();
+ param.put(RequestContext.SID, sid);
+ param.put(RequestContext.SID1, sid1);
+ param.put(RequestContext.PRID, prid);
+ param.put(RequestContext.DISPATCH,
+ request.getParameter(RequestContext.DISPATCH));
+ param.put("sync", sync);
+ param.put("time", time);
+ return getStrutsDelegate().forwardParams(mapping.findForward("submit"),
+ param);
}
+ requestContext.lookupAndBindServer();
- DataResult dr = getDataResult(request);
- request.setAttribute(DATA_SET, dr);
-
- return getStrutsDelegate().forwardParams(mapping.findForward("default"),
- request.getParameterMap());
+ requestContext.copyParamToAttributes("time");
+ return mapping.findForward("default");
}
/**
* {@inheritDoc}
*/
- protected DataResult getDataResult(HttpServletRequest request) {
-
- RequestContext requestContext = new RequestContext(request);
-
- Long sid = requestContext.getRequiredParam(RequestContext.SID);
- String type = requestContext.getParam("sync", true);
+ public List getResult(RequestContext context) {
+ Long sid = context.getRequiredParam(RequestContext.SID);
+ String type = context.getParam("sync", true);
if ("system".equals(type)) {
- Long sid1 = requestContext.getRequiredParam(RequestContext.SID1);
+ Long sid1 = context.getRequiredParam(RequestContext.SID1);
- Set <String> pkgIdCombos = SessionSetHelper.lookupAndBind(request,
+ Set <String> pkgIdCombos = SessionSetHelper.lookupAndBind(context.getRequest(),
DECL_SYSTEM_ACTION.getDecl(sid));
return ProfileManager.getMissingSystemPackages(
- requestContext.getCurrentUser(), sid, sid1, pkgIdCombos, null);
+ context.getCurrentUser(), sid, sid1, pkgIdCombos, null);
}
else if ("profile".equals(type)) {
- Long prid = requestContext.getRequiredParam(RequestContext.PRID);
+ Long prid = context.getRequiredParam(RequestContext.PRID);
- Set <String> pkgIdCombos = SessionSetHelper.lookupAndBind(request,
+ Set <String> pkgIdCombos = SessionSetHelper.lookupAndBind(context.getRequest(),
DECL_PROFILE_ACTION.getDecl(sid));
return ProfileManager.getMissingProfilePackages(
- requestContext.getCurrentUser(), sid, prid, pkgIdCombos, null);
+ context.getCurrentUser(), sid, prid, pkgIdCombos, null);
}
// if we get here we're screwed.
throw new BadParameterException(
"Missing one or more of the required paramters [sync,sid,sid_1,prid]");
}
-
- /**
- * {@inheritDoc}
- */
- protected void processRequestAttributes(RequestContext requestContext) {
- requestContext.lookupAndBindServer();
-
- requestContext.copyParamToAttributes(RequestContext.SID);
- requestContext.copyParamToAttributes(RequestContext.PRID);
-
- Long time = requestContext.getParamAsLong("date");
- if (time != null) {
- requestContext.getRequest().setAttribute("time", time);
- }
-
- String type = requestContext.getParam("sync", true);
- if ("system".equals(type)) {
- Long sid1 = requestContext.getRequiredParam(RequestContext.SID1);
- Server server1 = SystemManager.lookupByIdAndUser(sid1,
- requestContext.getCurrentUser());
- requestContext.getRequest().setAttribute("system1", server1);
- }
- else if ("profile".equals(type)) {
- Long prid = requestContext.getRequiredParam(RequestContext.PRID);
- Profile profile = ProfileManager.lookupByIdAndOrg(prid,
- requestContext.getCurrentUser().getOrg());
- requestContext.getRequest().setAttribute("profilename", profile.getName());
- }
- }
}
diff --git a/java/code/src/com/redhat/rhn/frontend/action/rhnpackage/profile/SyncProfilesAction.java b/java/code/src/com/redhat/rhn/frontend/action/rhnpackage/profile/SyncProfilesAction.java
index 9a2c0f7..5ef54b2 100644
--- a/java/code/src/com/redhat/rhn/frontend/action/rhnpackage/profile/SyncProfilesAction.java
+++ b/java/code/src/com/redhat/rhn/frontend/action/rhnpackage/profile/SyncProfilesAction.java
@@ -14,7 +14,6 @@
*/
package com.redhat.rhn.frontend.action.rhnpackage.profile;
-import com.redhat.rhn.common.util.DatePicker;
import com.redhat.rhn.domain.action.rhnpackage.PackageAction;
import com.redhat.rhn.domain.rhnpackage.MissingPackagesException;
import com.redhat.rhn.domain.user.User;
@@ -26,7 +25,6 @@ import org.apache.log4j.Logger;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
-import org.apache.struts.action.DynaActionForm;
import java.util.ArrayList;
import java.util.Date;
@@ -45,7 +43,6 @@ import javax.servlet.http.HttpServletResponse;
public class SyncProfilesAction extends BaseProfilesAction {
private static Logger log = Logger.getLogger(SyncProfilesAction.class);
- private static final String DATA_SET = "pageList";
private static final CompareProfileSetupAction DECL_ACTION =
new CompareProfileSetupAction();
@@ -67,11 +64,7 @@ public class SyncProfilesAction extends BaseProfilesAction {
User user = requestContext.getCurrentUser();
Long sid = requestContext.getRequiredParam(RequestContext.SID);
Long prid = requestContext.getRequiredParam(RequestContext.PRID);
-
- //get the earliest time this action should be performed from the form
- DynaActionForm form = (DynaActionForm) formIn;
- Date earliest = getStrutsDelegate().readDatePicker(form, "date",
- DatePicker.YEAR_RANGE_POSITIVE);
+ Date time = new Date(requestContext.getRequiredParam("time"));
if (log.isDebugEnabled()) {
log.debug("Calling syncToProfile");
@@ -82,7 +75,7 @@ public class SyncProfilesAction extends BaseProfilesAction {
getDecl(sid));
PackageAction pa = ProfileManager.syncToProfile(user, sid, prid,
- pkgIdCombos, null, earliest);
+ pkgIdCombos, null, time);
if (pa != null) {
@@ -108,6 +101,7 @@ public class SyncProfilesAction extends BaseProfilesAction {
Map params = new HashMap();
params.put(RequestContext.SID, sid);
params.put(RequestContext.PRID, prid);
+ params.put("time", new Long(time.getTime()));
return getStrutsDelegate().forwardParams(mapping.findForward("success"),
params);
}
@@ -116,7 +110,7 @@ public class SyncProfilesAction extends BaseProfilesAction {
params.put(RequestContext.SID, sid);
params.put(RequestContext.PRID, prid);
params.put("sync", "profile");
- params.put("date", new Long(earliest.getTime()));
+ params.put("time", new Long(time.getTime()));
return getStrutsDelegate().forwardParams(mapping.findForward("missing"),
params);
}
@@ -130,7 +124,10 @@ public class SyncProfilesAction extends BaseProfilesAction {
map.put("schedulesync.jsp.schedulesync", "scheduleSync");
return map;
}
-
+
+ /**
+ * {@inheritDoc}
+ */
protected String getDecl(Long sid) {
return DECL_ACTION.getDecl(sid);
}
diff --git a/java/code/src/com/redhat/rhn/frontend/action/rhnpackage/profile/SyncProfilesSetupAction.java b/java/code/src/com/redhat/rhn/frontend/action/rhnpackage/profile/SyncProfilesSetupAction.java
index 82b29f0..89b2e1f 100644
--- a/java/code/src/com/redhat/rhn/frontend/action/rhnpackage/profile/SyncProfilesSetupAction.java
+++ b/java/code/src/com/redhat/rhn/frontend/action/rhnpackage/profile/SyncProfilesSetupAction.java
@@ -22,7 +22,8 @@ import com.redhat.rhn.domain.user.User;
import com.redhat.rhn.frontend.struts.RequestContext;
import com.redhat.rhn.frontend.struts.RhnAction;
import com.redhat.rhn.frontend.struts.SessionSetHelper;
-import com.redhat.rhn.frontend.taglibs.list.ListTagHelper;
+import com.redhat.rhn.frontend.taglibs.list.helper.ListHelper;
+import com.redhat.rhn.frontend.taglibs.list.helper.Listable;
import com.redhat.rhn.manager.profile.ProfileManager;
import com.redhat.rhn.manager.system.SystemManager;
@@ -31,6 +32,10 @@ import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.action.DynaActionForm;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
import java.util.Set;
import javax.servlet.http.HttpServletRequest;
@@ -40,9 +45,8 @@ import javax.servlet.http.HttpServletResponse;
* SyncProfilesSetupAction
* @version $Rev$
*/
-public class SyncProfilesSetupAction extends RhnAction {
+public class SyncProfilesSetupAction extends RhnAction implements Listable {
- private static final String DATA_SET = "pageList";
private static final CompareProfileSetupAction DECL_ACTION =
new CompareProfileSetupAction();
@@ -61,40 +65,43 @@ public class SyncProfilesSetupAction extends RhnAction {
Server server = SystemManager.lookupByIdAndUser(sid, user);
Profile profile = ProfileManager.lookupByIdAndOrg(prid, user.getOrg());
- DataResult itemsToBeSynced = getDataResult(request, user);
+ ListHelper helper = new ListHelper(this, request);
+ helper.execute();
DynaActionForm dynaForm = (DynaActionForm) formIn;
- DatePicker picker = getStrutsDelegate().prepopulateDatePicker(request, dynaForm,
+ getStrutsDelegate().prepopulateDatePicker(request, dynaForm,
"date", DatePicker.YEAR_RANGE_POSITIVE);
- request.setAttribute("date", picker);
+ if (requestContext.wasDispatched("schedulesync.jsp.schedulesync")) {
+ Date time = getStrutsDelegate().readDatePicker(dynaForm, "date",
+ DatePicker.YEAR_RANGE_POSITIVE);
+ Map syncParam = new HashMap();
+ syncParam.put(RequestContext.SID, sid);
+ syncParam.put(RequestContext.PRID, prid);
+ syncParam.put(RequestContext.DISPATCH,
+ request.getParameter(RequestContext.DISPATCH));
+ syncParam.put("time", time.getTime());
+ return getStrutsDelegate().forwardParams(mapping.findForward("sync"),
+ syncParam);
+ }
+
request.setAttribute("system", server);
request.setAttribute("profilename", profile.getName());
- requestContext.copyParamToAttributes(RequestContext.SID);
- requestContext.copyParamToAttributes(RequestContext.PRID);
- request.setAttribute(ListTagHelper.PARENT_URL,
- request.getRequestURI() + "?sid=" + sid + "&prid=" + prid);
- request.setAttribute(DATA_SET, itemsToBeSynced);
-
return getStrutsDelegate().forwardParams(mapping.findForward("default"),
request.getParameterMap());
}
/**
* Get the page list for this action
- * @param request HttpServletRequest
- * @param user Logged in user
- * @param pc PageControl
+ * @param context RequestContext
* @return list of packages prepared for synchronization
*/
- protected DataResult getDataResult(HttpServletRequest request, User user) {
-
- RequestContext requestContext = new RequestContext(request);
-
- Long sid = requestContext.getRequiredParam("sid");
- Long prid = requestContext.getRequiredParam("prid");
+ public List getResult(RequestContext context) {
+ Long sid = context.getRequiredParam("sid");
+ Long prid = context.getRequiredParam("prid");
+ User user = context.getLoggedInUser();
- Set <String> pkgIdCombos = SessionSetHelper.lookupAndBind(request,
+ Set <String> pkgIdCombos = SessionSetHelper.lookupAndBind(context.getRequest(),
getDecl(sid));
DataResult dr = ProfileManager.prepareSyncToProfile(sid, prid,
diff --git a/java/code/src/com/redhat/rhn/frontend/action/rhnpackage/profile/SyncSystemsProfilesAction.java b/java/code/src/com/redhat/rhn/frontend/action/rhnpackage/profile/SyncSystemsProfilesAction.java
index 1f58ee9..e4e4d82 100644
--- a/java/code/src/com/redhat/rhn/frontend/action/rhnpackage/profile/SyncSystemsProfilesAction.java
+++ b/java/code/src/com/redhat/rhn/frontend/action/rhnpackage/profile/SyncSystemsProfilesAction.java
@@ -14,7 +14,6 @@
*/
package com.redhat.rhn.frontend.action.rhnpackage.profile;
-import com.redhat.rhn.common.util.DatePicker;
import com.redhat.rhn.domain.action.rhnpackage.PackageAction;
import com.redhat.rhn.domain.rhnpackage.MissingPackagesException;
import com.redhat.rhn.domain.user.User;
@@ -27,7 +26,6 @@ import org.apache.log4j.Logger;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
-import org.apache.struts.action.DynaActionForm;
import java.util.ArrayList;
import java.util.Date;
@@ -46,7 +44,6 @@ import javax.servlet.http.HttpServletResponse;
public class SyncSystemsProfilesAction extends BaseProfilesAction {
private static Logger log = Logger.getLogger(SyncSystemsProfilesAction.class);
- private static final String DATA_SET = "pageList";
private static final CompareSystemSetupAction DECL_ACTION =
new CompareSystemSetupAction();
@@ -67,12 +64,8 @@ public class SyncSystemsProfilesAction extends BaseProfilesAction {
User user = requestContext.getCurrentUser();
Long sid = requestContext.getRequiredParam("sid");
Long sid1 = requestContext.getRequiredParam("sid_1");
+ Date time = new Date(requestContext.getRequiredParam("time"));
- //get the earliest time this action should be performed from the form
- DynaActionForm form = (DynaActionForm) formIn;
- Date earliest = getStrutsDelegate().readDatePicker(form, "date",
- DatePicker.YEAR_RANGE_POSITIVE);
-
if (log.isDebugEnabled()) {
log.debug("Calling syncToSystem");
}
@@ -82,9 +75,10 @@ public class SyncSystemsProfilesAction extends BaseProfilesAction {
getDecl(sid));
PackageAction pa = ProfileManager.syncToSystem(user, sid, sid1,
- pkgIdCombos, null, earliest);
+ pkgIdCombos, null, time);
if (pa != null) {
+
addHardwareMessage(pa, requestContext);
// sid, actionid, servername, profilename
@@ -107,6 +101,7 @@ public class SyncSystemsProfilesAction extends BaseProfilesAction {
Map params = new HashMap();
params.put(RequestContext.SID, sid);
params.put(RequestContext.SID1, sid1);
+ params.put("time", new Long(time.getTime()));
return getStrutsDelegate().forwardParams(mapping.findForward("success"),
params);
}
@@ -115,7 +110,7 @@ public class SyncSystemsProfilesAction extends BaseProfilesAction {
params.put(RequestContext.SID, sid);
params.put(RequestContext.SID1, sid1);
params.put("sync", "system");
- params.put("date", new Long(earliest.getTime()));
+ params.put("time", new Long(time.getTime()));
return getStrutsDelegate().forwardParams(mapping.findForward("missing"),
params);
}
diff --git a/java/code/src/com/redhat/rhn/frontend/action/rhnpackage/profile/SyncSystemsSetupAction.java b/java/code/src/com/redhat/rhn/frontend/action/rhnpackage/profile/SyncSystemsSetupAction.java
index cddd5f7..a29828d 100644
--- a/java/code/src/com/redhat/rhn/frontend/action/rhnpackage/profile/SyncSystemsSetupAction.java
+++ b/java/code/src/com/redhat/rhn/frontend/action/rhnpackage/profile/SyncSystemsSetupAction.java
@@ -31,6 +31,7 @@ import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.action.DynaActionForm;
+import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@@ -45,7 +46,6 @@ import javax.servlet.http.HttpServletResponse;
*/
public class SyncSystemsSetupAction extends RhnAction implements Listable {
- private static final String DATA_SET = "pageList";
private static final CompareSystemSetupAction DECL_ACTION =
new CompareSystemSetupAction();
@@ -67,25 +67,26 @@ public class SyncSystemsSetupAction extends RhnAction implements Listable {
helper.execute();
DynaActionForm dynaForm = (DynaActionForm) formIn;
- DatePicker picker = getStrutsDelegate().prepopulateDatePicker(request, dynaForm,
+ getStrutsDelegate().prepopulateDatePicker(request, dynaForm,
"date", DatePicker.YEAR_RANGE_POSITIVE);
if (requestContext.wasDispatched("schedulesync.jsp.schedulesync")) {
+ Date time = getStrutsDelegate().readDatePicker(dynaForm, "date",
+ DatePicker.YEAR_RANGE_POSITIVE);
Map syncParam = new HashMap();
syncParam.put(RequestContext.SID, sid);
syncParam.put(RequestContext.SID1, sid1);
syncParam.put(RequestContext.DISPATCH,
request.getParameter(RequestContext.DISPATCH));
+ syncParam.put("time", time.getTime());
return getStrutsDelegate().forwardParams(mapping.findForward("sync"),
syncParam);
}
- request.setAttribute("date", picker);
request.setAttribute("system", server);
request.setAttribute("system1", server1);
- return getStrutsDelegate().forwardParams(mapping.findForward("default"),
- request.getParameterMap());
+ return mapping.findForward("default");
}
/**
diff --git a/java/code/webapp/WEB-INF/pages/systems/details/packages/profiles/missingpkgs.jsp b/java/code/webapp/WEB-INF/pages/systems/details/packages/profiles/missingpkgs.jsp
index f301c1a..3f1d5e5 100644
--- a/java/code/webapp/WEB-INF/pages/systems/details/packages/profiles/missingpkgs.jsp
+++ b/java/code/webapp/WEB-INF/pages/systems/details/packages/profiles/missingpkgs.jsp
@@ -15,16 +15,12 @@
<bean:message key="missingpkgs.jsp.missingpackages" />
</h2>
-<form name="rhn_list" method="POST"
- action="/rhn/systems/details/packages/profiles/MissingPackageSubmit.do?date=${time}">
-
+<rl:listset name="compareListSet">
<div class="page-summary">
<bean:message key="missingpkgs.jsp.pagesummary" />
</div>
-<rl:listset name="compareListSet">
- <rl:list dataset="pageList"
- width="100%"
+ <rl:list width="100%"
name="compareList"
styleclass="list">
@@ -65,9 +61,9 @@
<html:hidden property="prid" value="${param.prid}" />
<html:hidden property="sync" value="${param.sync}" />
<html:hidden property="set_label" value="packages_for_system_sync" />
+ <html:hidden property="time" value="${time}" />
</rl:listset>
-</form>
</body>
</html>
diff --git a/java/code/webapp/WEB-INF/pages/systems/details/packages/profiles/syncprofile.jsp b/java/code/webapp/WEB-INF/pages/systems/details/packages/profiles/syncprofile.jsp
index 121b43c..953c4d8 100644
--- a/java/code/webapp/WEB-INF/pages/systems/details/packages/profiles/syncprofile.jsp
+++ b/java/code/webapp/WEB-INF/pages/systems/details/packages/profiles/syncprofile.jsp
@@ -21,8 +21,7 @@
</div>
<rl:listset name="compareListSet">
- <rl:list dataset="pageList"
- width="100%"
+ <rl:list width="100%"
name="compareList"
styleclass="list"
emptykey="schedulesync.jsp.nopackagesselected">
@@ -61,20 +60,17 @@
<html:hidden property="sid" value="${param.sid}" />
<html:hidden property="prid" value="${param.prid}" />
<html:hidden property="set_label" value="packages_for_system_sync" />
-
-</rl:listset>
<rhn:require acl="system_feature(ftr_delta_action)"
mixins="com.redhat.rhn.common.security.acl.SystemAclHandler">
<rhn:submitted/>
- <html:form method="POST" action="/systems/details/packages/profiles/SyncProfilesSubmit?sid=${param.sid}&prid=${param.prid}">
<div align="right">
<hr />
<html:submit property="dispatch">
<bean:message key="schedulesync.jsp.schedulesync"/>"
</html:submit>
</div>
- </html:form>
</rhn:require>
+</rl:listset>
</body>
</html>
diff --git a/java/code/webapp/WEB-INF/struts-config.xml b/java/code/webapp/WEB-INF/struts-config.xml
index daa5925..17a2cf1 100644
--- a/java/code/webapp/WEB-INF/struts-config.xml
+++ b/java/code/webapp/WEB-INF/struts-config.xml
@@ -3772,6 +3772,9 @@
type="com.redhat.rhn.frontend.action.rhnpackage.profile.SyncProfilesSetupAction">
<forward name="default"
path="/WEB-INF/pages/systems/details/packages/profiles/syncprofile.jsp"/>
+ <forward name="sync"
+ path="/systems/details/packages/profiles/SyncProfilesSubmit.do"
+ redirect="true"/>
</action>
<action path="/systems/details/packages/profiles/SyncProfilesSubmit"
@@ -3832,6 +3835,9 @@
type="com.redhat.rhn.frontend.action.rhnpackage.profile.MissingPackageSetupAction">
<forward name="default"
path="/WEB-INF/pages/systems/details/packages/profiles/missingpkgs.jsp"/>
+ <forward name="submit"
+ path="/systems/details/packages/profiles/MissingPackageSubmit.do"
+ redirect="true" />
</action>
<action path="/systems/details/packages/profiles/MissingPackageSubmit"
@@ -3840,15 +3846,10 @@
type="com.redhat.rhn.frontend.action.rhnpackage.profile.MissingPackageAction"
parameter="dispatch">
<forward name="default"
- path="/systems/details/packages/profiles/MissingPackages"
- redirect="true" />
- <forward name="newprofile"
+ path="/WEB-INF/pages/systems/details/packages/profiles/missingpkgs.jsp" />
+ <forward name="showprofile"
path="/systems/details/packages/profiles/ShowProfiles.do"
redirect="true" />
- <forward name="removepackages"
- path="/systems/details/packages/profiles/SyncProfilesSubmit.do" />
- <forward name="subscribechannels"
- path="/systems/details/packages/profiles/SyncProfilesSubmit.do" />
</action>
14 years, 2 months
java/code
by Partha Aji
java/code/src/com/redhat/rhn/domain/server/Server.java | 1 -
1 file changed, 1 deletion(-)
New commits:
commit a18d4dc4044f3cf57f4e83e369c4b8236f002326
Author: Partha Aji <paji(a)redhat.com>
Date: Wed Mar 10 12:30:17 2010 -0500
Fixed a checkstyle error
diff --git a/java/code/src/com/redhat/rhn/domain/server/Server.java b/java/code/src/com/redhat/rhn/domain/server/Server.java
index 2a6f0cd..a857f58 100644
--- a/java/code/src/com/redhat/rhn/domain/server/Server.java
+++ b/java/code/src/com/redhat/rhn/domain/server/Server.java
@@ -16,7 +16,6 @@ package com.redhat.rhn.domain.server;
import com.redhat.rhn.common.conf.Config;
import com.redhat.rhn.common.conf.ConfigDefaults;
-import com.redhat.rhn.common.hibernate.HibernateFactory;
import com.redhat.rhn.domain.BaseDomainHelper;
import com.redhat.rhn.domain.Identifiable;
import com.redhat.rhn.domain.channel.Channel;
14 years, 2 months
Changes to 'refs/tags/spacewalk-backend-0.9.8-1'
by Michael Mraka
Tag 'spacewalk-backend-0.9.8-1' created by Michael Mraka <michael.mraka(a)redhat.com> at 2010-03-10 13:58 +0000
Tagging package [spacewalk-backend] version [0.9.8-1] in directory [backend/].
Changes since spacewalk-web-0.9.4-1:
Michael Mraka (2):
571365 - solaris packages don't contain an internal checksum
Automatic commit of package [spacewalk-backend] release [0.9.8-1].
---
backend/server/importlib/packageImport.py | 4 ----
backend/spacewalk-backend.spec | 6 +++++-
rel-eng/packages/spacewalk-backend | 2 +-
3 files changed, 6 insertions(+), 6 deletions(-)
---
14 years, 2 months
2 commits - backend/server backend/spacewalk-backend.spec rel-eng/packages
by Michael Mraka
backend/server/importlib/packageImport.py | 4 ----
backend/spacewalk-backend.spec | 6 +++++-
rel-eng/packages/spacewalk-backend | 2 +-
3 files changed, 6 insertions(+), 6 deletions(-)
New commits:
commit 9e66f3dd8fbf24eab51d64d968f06bc4f3a5c90e
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Wed Mar 10 14:58:12 2010 +0100
Automatic commit of package [spacewalk-backend] release [0.9.8-1].
diff --git a/backend/spacewalk-backend.spec b/backend/spacewalk-backend.spec
index 57de0e5..c48961f 100644
--- a/backend/spacewalk-backend.spec
+++ b/backend/spacewalk-backend.spec
@@ -8,7 +8,7 @@ Name: spacewalk-backend
Summary: Common programs needed to be installed on the Spacewalk servers/proxies
Group: Applications/Internet
License: GPLv2
-Version: 0.9.7
+Version: 0.9.8
Release: 1%{?dist}
URL: https://fedorahosted.org/spacewalk
Source0: https://fedorahosted.org/releases/s/p/spacewalk/%{name}-%{version}.tar.gz
@@ -622,6 +622,10 @@ rm -f %{rhnconf}/rhnSecret.py*
# $Id$
%changelog
+* Wed Mar 10 2010 Michael Mraka <michael.mraka(a)redhat.com> 0.9.8-1
+- 571365 - fixed solaris mpm packages import
+- spacewalk-remove-channel improvements
+
* Mon Mar 08 2010 Michael Mraka <michael.mraka(a)redhat.com> 0.9.7-1
- fixed import to work with satellites running older versions of rhnLib
- 568371 - fix an ORA-00918 on config file import
diff --git a/rel-eng/packages/spacewalk-backend b/rel-eng/packages/spacewalk-backend
index b3a1f91..6751828 100644
--- a/rel-eng/packages/spacewalk-backend
+++ b/rel-eng/packages/spacewalk-backend
@@ -1 +1 @@
-0.9.7-1 backend/
+0.9.8-1 backend/
commit d49fc9fe3668112dd27c0cf2810e838974dac219
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Wed Mar 10 14:28:25 2010 +0100
571365 - solaris packages don't contain an internal checksum
diff --git a/backend/server/importlib/packageImport.py b/backend/server/importlib/packageImport.py
index 492cc25..393a899 100644
--- a/backend/server/importlib/packageImport.py
+++ b/backend/server/importlib/packageImport.py
@@ -397,12 +397,10 @@ class PackageImport(ChannelPackageSubscription):
pkgDict['evr'] = evr
evrs[evr] = None
- checksums[(pkgDict['checksum_type'], pkgDict['checksum'])] = None
names[pkgDict['name']] = None
archs[pkgDict['arch']] = None
self.backend.lookupEVRs(evrs)
- self.backend.lookupChecksums(checksums)
self.backend.lookupPackageNames(names)
self.backend.lookupPackageArches(archs)
@@ -446,11 +444,9 @@ class PackageImport(ChannelPackageSubscription):
patchDict['evr'] = evr
evrs[evr] = None
- checksums[(patchDict['checksum_type'], patchDict['checksum'])] = None
names[patchDict['name']] = None
self.backend.lookupEVRs(evrs)
- self.backend.lookupChecksums(self.checksums)
self.backend.lookupPackageNames(names)
nevras = {}
14 years, 2 months
Changes to 'refs/tags/spacewalk-web-0.9.4-1'
by Michael Mraka
Tag 'spacewalk-web-0.9.4-1' created by Michael Mraka <michael.mraka(a)redhat.com> at 2010-03-10 11:16 +0000
Tagging package [spacewalk-web] version [0.9.4-1] in directory [web/].
Changes since spacewalk-schema-0.9.2-1:
Joshua Roys (1):
Add an API function: errata.listUnpublishedErrata
Justin Sherrill (3):
removing warning since hibernate uses this
fixing string comparison to resolve error checksumming message on rhel5 clients
fixing a few typos in spacewalk-remove-channel
Michael Mraka (3):
571365 - compute checksum from payload not from package
571365 - defined checksum type we use for mpm packages
Automatic commit of package [spacewalk-web] release [0.9.4-1].
Miroslav Suchý (2):
564352 - move hal specific code to separate module
564352 - use python-gudev if possible - empty stub for now
---
backend/rhn-conf/rhn_server.conf | 2
backend/satellite_tools/spacewalk-remove-channel | 4
backend/server/handlers/app/packages.py | 2
backend/server/importlib/headerSource.py | 2
backend/spacewalk/common/rhn_mpm.py | 6
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/rhn-client-tools.spec | 4
client/rhel/rhn-client-tools/src/up2date_client/Makefile | 2
client/rhel/rhn-client-tools/src/up2date_client/hardware.py | 387 ----------
client/rhel/rhn-client-tools/src/up2date_client/hardware_gudev.py | 37
client/rhel/rhn-client-tools/src/up2date_client/hardware_hal.py | 350 +++++++++
java/code/src/com/redhat/rhn/domain/channel/Channel.java | 1
java/code/src/com/redhat/rhn/frontend/xmlrpc/errata/ErrataHandler.java | 41 +
java/code/src/com/redhat/rhn/manager/errata/ErrataManager.java | 32
java/code/src/com/redhat/rhn/taskomatic/task/repomd/RepositoryWriter.java | 2
rel-eng/packages/spacewalk-web | 2
web/spacewalk-web.spec | 5
18 files changed, 515 insertions(+), 368 deletions(-)
---
14 years, 2 months
3 commits - backend/rhn-conf backend/server backend/spacewalk backend/upload_server rel-eng/packages web/spacewalk-web.spec
by Michael Mraka
backend/rhn-conf/rhn_server.conf | 2 ++
backend/server/handlers/app/packages.py | 2 +-
backend/server/importlib/headerSource.py | 2 +-
backend/spacewalk/common/rhn_mpm.py | 6 ++++++
backend/upload_server/handlers/package_push/package_push.py | 2 +-
backend/upload_server/handlers/package_upload/package_upload.py | 2 +-
rel-eng/packages/spacewalk-web | 2 +-
web/spacewalk-web.spec | 5 ++++-
8 files changed, 17 insertions(+), 6 deletions(-)
New commits:
commit 734cd1ed9ab167d2c223a64e41e15ea73fe49340
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Wed Mar 10 12:16:11 2010 +0100
Automatic commit of package [spacewalk-web] release [0.9.4-1].
diff --git a/rel-eng/packages/spacewalk-web b/rel-eng/packages/spacewalk-web
index 6574475..42b98d9 100644
--- a/rel-eng/packages/spacewalk-web
+++ b/rel-eng/packages/spacewalk-web
@@ -1 +1 @@
-0.9.3-1 web/
+0.9.4-1 web/
diff --git a/web/spacewalk-web.spec b/web/spacewalk-web.spec
index 2d5a81f..1138814 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.9.3
+Version: 0.9.4
Release: 1%{?dist}
URL: https://fedorahosted.org/spacewalk
Source0: https://fedorahosted.org/releases/s/p/spacewalk/%{name}-%{version}.tar.gz
@@ -256,6 +256,9 @@ rm -rf $RPM_BUILD_ROOT
# $Id$
%changelog
+* Wed Mar 10 2010 Michael Mraka <michael.mraka(a)redhat.com> 0.9.4-1
+- fixed typos
+
* Mon Mar 08 2010 Michael Mraka <michael.mraka(a)redhat.com> 0.9.3-1
- 529371 - fixed missing code from gpg migration
- 528170 - fixing cloning on an already cloned channel
commit f2555d3467704c94a43ca0c69d507ffb7b2f2227
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Tue Mar 9 17:07:06 2010 +0100
571365 - defined checksum type we use for mpm packages
diff --git a/backend/rhn-conf/rhn_server.conf b/backend/rhn-conf/rhn_server.conf
index 8a5c3fa..b109ce6 100644
--- a/backend/rhn-conf/rhn_server.conf
+++ b/backend/rhn-conf/rhn_server.conf
@@ -131,3 +131,5 @@ repomd_path_prefix = rhn/repodata
# Default to not using taskomatic for repomd
use_taskomatic_repomd = 1
+# default checksums
+mpm_checksum_type = sha256
diff --git a/backend/spacewalk/common/rhn_mpm.py b/backend/spacewalk/common/rhn_mpm.py
index 23b0f74..2920a1b 100644
--- a/backend/spacewalk/common/rhn_mpm.py
+++ b/backend/spacewalk/common/rhn_mpm.py
@@ -22,6 +22,9 @@ from rhn.rpclib import xmlrpclib
import struct
from types import ListType, TupleType, DictType
+from rhnConfig import CFG
+
+MPM_CHECKSUM_TYPE = CFG.MPM_CHECKSUM_TYPE
def labelCompare(l1, l2):
try:
@@ -108,6 +111,9 @@ class MPM_Header:
def is_signed(self):
return 0
+ def checksum_type(self):
+ return MPM_CHECKSUM_TYPE
+
class InvalidPackageError(Exception):
pass
commit 0f52d37bcd9ec33b06e61aad3cffbe2a82fe7e0c
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Tue Mar 9 15:01:11 2010 +0100
571365 - compute checksum from payload not from package
well, in rpm world package = payload but for mpm payload = zip_file_inside
fixed regression from:
commit 1e0dfb3d27f9c821e2418ff5c36be460193d623d
moved getFileMD5 outside of rhnPackageUpload.load_package
diff --git a/backend/server/handlers/app/packages.py b/backend/server/handlers/app/packages.py
index 2f3ba6f..a59d0ae 100644
--- a/backend/server/handlers/app/packages.py
+++ b/backend/server/handlers/app/packages.py
@@ -290,7 +290,7 @@ class Packages(RPC_Base):
header, org_id=org_id)
checksum_type = header.checksum_type()
- checksum = getFileChecksum(header.checksum_type(), file=package_stream)
+ checksum = getFileChecksum(header.checksum_type(), file=payload_stream)
package_dict, diff_level = rhnPackageUpload.push_package(
header, payload_stream, checksum_type, checksum, org_id=org_id, force=force,
header_start=header_start, header_end=header_end,
diff --git a/backend/server/importlib/headerSource.py b/backend/server/importlib/headerSource.py
index ce4f71c..d88a182 100644
--- a/backend/server/importlib/headerSource.py
+++ b/backend/server/importlib/headerSource.py
@@ -108,7 +108,7 @@ class rpmPackage(IncompletePackage):
# Strip trailing slashes
path = "%s/%s" % (sanitizePath(relpath), os.path.basename(f_path))
checksum_type = header.checksum_type()
- checksum = getFileChecksum(header.checksum_type(), file=f_obj)
+ checksum = getFileChecksum(header.checksum_type(), file=payload_stream)
self.populate(header, size, checksum_type, checksum, path, org_id,
header_start, header_end, channels)
diff --git a/backend/upload_server/handlers/package_push/package_push.py b/backend/upload_server/handlers/package_push/package_push.py
index 07e265a..e9b8269 100644
--- a/backend/upload_server/handlers/package_push/package_push.py
+++ b/backend/upload_server/handlers/package_push/package_push.py
@@ -116,7 +116,7 @@ class PackagePush(basePackageUpload.BasePackageUpload):
# Sanity check - removed, the package path can no longer be determined
# without the header
checksum_type = header.checksum_type()
- checksum = getFileChecksum(checksum_type, file=temp_stream)
+ checksum = getFileChecksum(checksum_type, file=payload_stream)
self.rel_package_path = rhnPackageUpload.relative_path_from_header(
header, org_id=self.org_id, checksum_type=checksum_type, checksum=checksum)
self.package_path = os.path.join(CFG.MOUNT_POINT,
diff --git a/backend/upload_server/handlers/package_upload/package_upload.py b/backend/upload_server/handlers/package_upload/package_upload.py
index 8736c64..be7dd5d 100644
--- a/backend/upload_server/handlers/package_upload/package_upload.py
+++ b/backend/upload_server/handlers/package_upload/package_upload.py
@@ -75,7 +75,7 @@ class PackageUpload(basePackageUpload.BasePackageUpload):
header, payload_stream, header_start, header_end = \
rhnPackageUpload.load_package(temp_stream)
checksum_type = header.checksum_type()
- checksum = getFileChecksum(checksum_type, file=temp_stream)
+ checksum = getFileChecksum(checksum_type, file=payload_stream)
temp_stream.close()
if not (self.file_checksum_type == checksum_type
14 years, 2 months