Re: [Spacewalk-devel] [PATCH] SUSE/AutoYaST Support

2011-03-11 Thread Uwe Gansert
on Friday 11 March 2011 Uwe Gansert wrote:

 
 Patch attached.
 

btw, the attached patch replaced the old:
0001-added-support-for-SUSE-autoinstallation.patch

Sorry if I confused you. I did not mention that in my previous mail

-- 
ciao, Uwe Gansert

Uwe Gansert
SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg)
Business: http://www.suse.de/~ug

___
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel


[Spacewalk-devel] [PATCH] SystemManagerTest: missing super.setUp() call added

2013-09-09 Thread Silvio Moioli
See attached patch.

Regards,
-- 
Silvio Moioli
SUSE LINUX Products GmbH
Maxfeldstraße 5, 90409 Nürnberg Germany


From 8377a9ba5f349a661f49a7f0ad9c393f7745f0fc Mon Sep 17 00:00:00 2001
From: Silvio Moioli smoi...@suse.de
Date: Thu, 5 Sep 2013 09:11:37 +0200
Subject: [PATCH] SystemManagerTest: missing super.setUp() call added

---
 .../src/com/redhat/rhn/manager/ssm/test/SsmOperationManagerTest.java | 1 +
 1 file changed, 1 insertion(+)

diff --git a/java/code/src/com/redhat/rhn/manager/ssm/test/SsmOperationManagerTest.java b/java/code/src/com/redhat/rhn/manager/ssm/test/SsmOperationManagerTest.java
index 014c696..f6509c1 100644
--- a/java/code/src/com/redhat/rhn/manager/ssm/test/SsmOperationManagerTest.java
+++ b/java/code/src/com/redhat/rhn/manager/ssm/test/SsmOperationManagerTest.java
@@ -42,6 +42,7 @@ public class SsmOperationManagerTest extends RhnBaseTestCase {
 private String serverSetLabel;
 
 protected void setUp() throws Exception {
+super.setUp();
 ssmUser = UserTestUtils.findNewUser(ssmuser, ssmorg);
 serverSetLabel = populateRhnSet();
 }
-- 
1.8.1.4



___
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel

[Spacewalk-devel] [PATCH] MonitoringManagerTest: missing super.setUp() call added

2013-09-09 Thread Silvio Moioli
See attached patch.

Regards,
-- 
Silvio Moioli
SUSE LINUX Products GmbH
Maxfeldstraße 5, 90409 Nürnberg Germany

From 5865f906d561acb613addd31fa7e6b9e4e05e8af Mon Sep 17 00:00:00 2001
From: Silvio Moioli smoi...@suse.de
Date: Wed, 4 Sep 2013 11:58:10 +0200
Subject: [PATCH] MonitoringManagerTest: missing super.setUp() call added

---
 .../com/redhat/rhn/manager/monitoring/test/MonitoringManagerTest.java| 1 +
 1 file changed, 1 insertion(+)

diff --git a/java/code/src/com/redhat/rhn/manager/monitoring/test/MonitoringManagerTest.java b/java/code/src/com/redhat/rhn/manager/monitoring/test/MonitoringManagerTest.java
index ec22ce8..4a90e8f 100644
--- a/java/code/src/com/redhat/rhn/manager/monitoring/test/MonitoringManagerTest.java
+++ b/java/code/src/com/redhat/rhn/manager/monitoring/test/MonitoringManagerTest.java
@@ -75,6 +75,7 @@ public class MonitoringManagerTest extends RhnBaseTestCase {
  * {@inheritDoc}
  */
 public void setUp() throws Exception {
+super.setUp();
 user = UserTestUtils.findNewUser(testUser,
 testOrg + this.getClass().getSimpleName());
 if (ConfigDefaults.get().isMonitoringBackend()) {
-- 
1.8.1.4


___
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel

Re: [Spacewalk-devel] [PATCH] avoid relying on types returned by Hibernate

2013-07-01 Thread Silvio Moioli
On 07/01/2013 01:12 PM, Tomas Lestach wrote:
 Could you point me to the appropriate bugzilla? I'd like to check the 
 reproducer.

Unfortunately our Bugzilla component is closed for outside view at the
moment, and the bug only affected SUSE-specific code.

If you need any further details, just let me know.

Regards,
-- 
Silvio Moioli
SUSE LINUX Products GmbH
Maxfeldstraße 5, 90409 Nürnberg Germany

___
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel

Re: [Spacewalk-devel] [PATCH] Date/Time picker

2014-02-10 Thread Silvio Moioli
On 02/06/2014 11:12 AM, Duncan Mac-Vicar P. wrote:
 See attached patches. [...]

On a slightly unrelated note, I have just noticed the current date
picker allows incorrect dates to be picked, such as February 31. In the
SSM errata scheduling page, among other things, such values cause a NPE.

Regards,
-- 
Silvio Moioli
SUSE LINUX Products GmbH
Maxfeldstraße 5, 90409 Nürnberg Germany

___
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel


Re: [Spacewalk-devel] [PATCH] Hide the 'delete note' link on creation of system notes

2011-03-01 Thread Johannes Renner
On 03/01/2011 02:29 PM, Jan Pazdziora wrote:
 By the way: will you be submitting the patch for the Has Signed
 Metadata feature as well?

Yes, this one is also going to be submitted, but unfortunately I can't
tell you exactly when. The problem is that this is currently not a
single patch, but rather a set of patches that will need to be collected
and aggregated first. So, as soon as we have done that and tested it
against the master branch it will also be submitted here.

Greetings,
Johannes

-- 
SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg)

___
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel


Re: [Spacewalk-devel] [PATCH] change jabberd default password

2012-08-10 Thread Uwe Gansert

On 10.08.2012 14:25, Milan Zazrivec wrote:


From jabberd's post install script:


ah okay, our jabberd package has no post-script like that.


Are you aware of any scenario when this wouldn't be happenning? Or to put
my question differently -- what is the motivation behind this patch?


I did not know your jabberd package has such a post-script.
I don't think you need the patch then.

--
ciao, Uwe Gansert

SUSE LINUX Products GmbH, HRB 16746 (AG Nürnberg)
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer
Home: http://www.suse.de/~ug - Blog: http://suse.gansert.net

___
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel


Re: [Spacewalk-devel] [PATCH] Proposal to remove filesystem dependencies from ConfigTest

2013-11-06 Thread Silvio Moioli
On 11/06/2013 04:23 PM, Tomas Lestach wrote:
 I am sorry, it took me so long to reply.

No problem.

 Honestly, we do not really like the proposed patch,
 but on the other hand we didn't come with anything better. :-)

Oh, I see :-)

Anyway if you ever come up with a better idea I am always open to hear
it and patch the code again!

Have a nice day,
-- 
Silvio Moioli
SUSE LINUX Products GmbH
Maxfeldstraße 5, 90409 Nürnberg Germany

___
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel

Re: [Spacewalk-devel] [PATCH] perl List port to new css/markup

2014-01-09 Thread Duncan Mac-Vicar P.
On 06/01/14 17:13, Michael Mraka wrote:
 I've reviewed your patch and found couple of issues:

Attached patch with all mentioned issues corrected.

 It's a legacy code and I'm afraid no current spacewalk developer knows
 correct answer.

Ok, I will need to check if this causes some list to be incorrectly styled.


-- 
Duncan Mac-Vicar P. - http://www.suse.com/

SUSE LINUX Products GmbH, GF: Jeff Hawn, Jennifer Guild, Felix
Imendörffer, HRB 16746 (AG Nürnberg)
Maxfeldstraße 5, 90409 Nürnberg, Germany

___
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel


Re: [Spacewalk-devel] [PATCH] Hide the 'delete note' link on creation of system notes

2011-03-01 Thread Jan Pazdziora
On Tue, Mar 01, 2011 at 11:26:57AM +0100, Johannes Renner wrote:

 From ea324e8b7b6907f24d010b7b4439bc1e00e8f8bf Mon Sep 17 00:00:00 2001
 From: Johannes Renner jren...@suse.de
 Date: Thu, 17 Feb 2011 11:20:52 +0100
 Subject: [PATCH] do not show delete link on creation of notes (bnc#672090)

One note here -- we really like the bugzillas to be public when
they are referenced in the git commits.

Is the bnc#672090 going to be flipped to public eventually?

-- 
Jan Pazdziora
Principal Software Engineer, Satellite Engineering, Red Hat

___
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel


Re: [Spacewalk-devel] PATCH - Addesd cobbler import support for SUSE

2011-04-05 Thread Uwe Gansert
on Tuesday 05 April 2011 Cliff Perry wrote:

 Spacewalk uses upstream cobbler versions and does not keep a local
 copy/branch. As such, this patch, which to me looks to be all cobbler
 should be sent to cobbler-devel list.

*ups* 
sorry, that was my actual intention. I wanted to send it to cobbler-devel of 
course.
Sorry for the noise

-- 
ciao, Uwe Gansert

Uwe Gansert
SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg)
Business: http://www.suse.de/~ug

___
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel


Re: [Spacewalk-devel] [PATCH] some patches for monitoring on postgres and pylint findings

2011-11-28 Thread Miroslav Suchy

Dne 28.11.2011 17:33, Michael Calmer napsal(a):

0004-replace-synonyms-with-real-table-names-and-change-sy.patch


 From ab387975796b4b04a4ccab2cd600f01d0b69db2a Mon Sep 17 00:00:00 2001
From: Michael Calmerm...@suse.de
Date: Mon, 28 Nov 2011 16:30:11 +0100
Subject: [PATCH 4/6] replace synonyms with real table names and change sysdate 
to current_timestamp


Hmm I would be happy to apply that part with s/sysdate/current_timestamp/

But I have problem with that alias. Why replacing it only in one file. 
It is presented in other files as well. I would welcome to remove it in 
all files or keep it as is.


Mirek

___
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel


Re: [Spacewalk-devel] Deployment of images built with SUSE Studio

2012-05-18 Thread Johannes Renner
On 05/18/2012 02:45 PM, Miroslav Suchy wrote:
 In patch 0001 - schema db - you are missing upgrades for table 
 suseCredentialsType.
 
 And upgrades for table suseCredentials differs from clean install.

Oh yeah, sorry, I forgot to revise the upgrade files. I can come up with another
patch fixing that, or maybe rather with a new version of 0001.

But in which way it differs from clean install in this case?

Also at what index those files should start, looks like you are currently at
0047-rhnOrgQuota.sql?

Regards,
Johannes

-- 
SUSE LINUX Products GmbH, HRB 16746 (AG Nürnberg)
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer

___
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel


Re: [Spacewalk-devel] [PATCH] rhn.manager tests: do not assume an Org admin exists

2013-09-10 Thread Silvio Moioli
On 09/09/2013 09:34 PM, Grant Gainey wrote:
 I modified the patch somewhat - [...]
 Thanks for your contribution!

I agree with your changes and confirm it works perfectly throughout our
test suite as well.

Thanks a lot for all review and commit work so far, we will be back with
some more patches as soon as we are done running tests from the frontend
package.

Regards,
-- 
Silvio Moioli
SUSE LINUX Products GmbH
Maxfeldstraße 5, 90409 Nürnberg Germany

___
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel

Re: [Spacewalk-devel] ISE when changing user details on /rhn/users/UserDetails.do?uid=2

2013-10-17 Thread Johannes Renner
On 10/17/2013 04:17 PM, Tomáš Kašpárek wrote:
 Hello,
 
 I've merged contents of bootstrap-css branch with current Spacewalk master, 
 built it and applied.
 I've noticed that changing user details as admin produces ISE.
 
 Sending you patch which fixes the problem

Thank you very much for the hint and the patch!
Applied as 8ad61979b5c9b1b2a7e7d5fa954699b32909e7f3.

Regards,
Johannes

-- 
SUSE LINUX Products GmbH, HRB 16746 (AG Nürnberg)
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer

___
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel


[Spacewalk-devel] [PATCH] Checkstyle 4.1 vs. 4.3

2012-03-30 Thread Johannes Renner
Hey,

You are using checkstyle 4.1 it seems, while we use version 4.3.
Our version seems to need the lib directory jars to be contained
in the classpath for finding exception classes the are referenced
by @throws clauses. Otherwise we get a lot of these errors:

./code/src/com/redhat/rhn/common/hibernate/HibernateFactory.java:0: Got an 
exception -
java.lang.RuntimeException: Unable to get class information for @throws tag 
'HibernateException'.

Also 4.3 doesn't like the @{inherit-doc} for methods that are not
actually overrides, like the constructor in ScapActionDetails.java:

./code/src/com/redhat/rhn/domain/action/scap/ScapActionDetails.java:33:5: 
Invalid use of the
{@inheritDoc} tag.

Just in case you are planning to upgrade or want to fix anyways.

Regards,
Johannes

-- 
SUSE LINUX Products GmbH, HRB 16746 (AG Nürnberg)
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer
From 0bcacfc4bbc032c17263198f5bc8dde4ec000aef Mon Sep 17 00:00:00 2001
From: Johannes Renner jren...@suse.de
Date: Fri, 30 Mar 2012 10:26:25 +0200
Subject: [PATCH] Add lib directory to checkstyle classpath

---
 java/spacewalk-java.spec |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/java/spacewalk-java.spec b/java/spacewalk-java.spec
index 2fc7361..7ae7c45 100644
--- a/java/spacewalk-java.spec
+++ b/java/spacewalk-java.spec
@@ -327,7 +327,7 @@ ant -Dprefix=$RPM_BUILD_ROOT init-install compile
 
 %if 0%{?run_checkstyle}
 echo Running checkstyle on java main sources
-export CLASSPATH=build/classes
+export CLASSPATH=build/classes:build/build-lib/*
 export BASE_OPTIONS=-Djavadoc.method.scope=public \
 -Djavadoc.type.scope=package \
 -Djavadoc.var.scope=package \
-- 
1.7.7

From 2b57a83dd3346dcaeff55586cacc13e5728e3d38 Mon Sep 17 00:00:00 2001
From: Johannes Renner jren...@suse.de
Date: Thu, 29 Mar 2012 16:10:13 +0200
Subject: [PATCH] Fix checkstyle error (invalid use of the {@inheritDoc} tag)

---
 .../rhn/domain/action/scap/ScapActionDetails.java  |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/java/code/src/com/redhat/rhn/domain/action/scap/ScapActionDetails.java b/java/code/src/com/redhat/rhn/domain/action/scap/ScapActionDetails.java
index 7c34c49..885da51 100644
--- a/java/code/src/com/redhat/rhn/domain/action/scap/ScapActionDetails.java
+++ b/java/code/src/com/redhat/rhn/domain/action/scap/ScapActionDetails.java
@@ -28,7 +28,7 @@ public class ScapActionDetails extends ActionChild {
 private byte[] parameters;
 
 /**
- * {@inheritDoc}
+ * Default constructor.
  */
 public ScapActionDetails() {
 super();
-- 
1.7.7

___
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel

Re: [Spacewalk-devel] [PATCH] VirtualizationEntitlementsManagerTest fixes

2013-09-09 Thread Silvio Moioli
On 09/09/2013 08:29 AM, Silvio Moioli wrote:
 I attached two patches:

Patches updated to apply cleanly after Grant's commits.

I apologize for the double post.

Regards,
-- 
Silvio Moioli
SUSE LINUX Products GmbH
Maxfeldstraße 5, 90409 Nürnberg Germany

From 8b9f6060b5db94e49edb9fb804562a89bc188580 Mon Sep 17 00:00:00 2001
From: Silvio Moioli smoi...@suse.de
Date: Mon, 9 Sep 2013 08:52:14 +0200
Subject: [PATCH 2/2] VirtualizationEntitlementsManagerTest: do not fail after
 rollback

---
 .../rhn/manager/system/test/VirtualizationEntitlementsManagerTest.java  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/java/code/src/com/redhat/rhn/manager/system/test/VirtualizationEntitlementsManagerTest.java b/java/code/src/com/redhat/rhn/manager/system/test/VirtualizationEntitlementsManagerTest.java
index 7824512..6f65e85 100644
--- a/java/code/src/com/redhat/rhn/manager/system/test/VirtualizationEntitlementsManagerTest.java
+++ b/java/code/src/com/redhat/rhn/manager/system/test/VirtualizationEntitlementsManagerTest.java
@@ -161,7 +161,7 @@ public class VirtualizationEntitlementsManagerTest extends BaseTestCaseWithUser
 }
 assertEquals(1, VirtualizationEntitlementsManager.getInstance().
 convertToFlex(sids, group.getId(), user).size());
-HibernateFactory.getSession().clear();
+HibernateFactory.getSession().disconnect();
 l = VirtualizationEntitlementsManager.getInstance().listFlexGuests(user);
 assertTrue(!l.isEmpty());
 assertEquals(1, l.size());
-- 
1.8.1.4


From e25b01758da24d955b0c41e87a61d31f8448947c Mon Sep 17 00:00:00 2001
From: Silvio Moioli smoi...@suse.de
Date: Thu, 5 Sep 2013 11:52:58 +0200
Subject: [PATCH 1/2] VirtualizationEntitlementsManagerTest: do not assume a
 virtualization channel exists

---
 .../rhn/manager/system/test/VirtualizationEntitlementsManagerTest.java  | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/java/code/src/com/redhat/rhn/manager/system/test/VirtualizationEntitlementsManagerTest.java b/java/code/src/com/redhat/rhn/manager/system/test/VirtualizationEntitlementsManagerTest.java
index d8f0845..7824512 100644
--- a/java/code/src/com/redhat/rhn/manager/system/test/VirtualizationEntitlementsManagerTest.java
+++ b/java/code/src/com/redhat/rhn/manager/system/test/VirtualizationEntitlementsManagerTest.java
@@ -40,6 +40,7 @@ import com.redhat.rhn.manager.system.ServerGroupManager;
 import com.redhat.rhn.manager.system.SystemManager;
 import com.redhat.rhn.manager.system.VirtualizationEntitlementsManager;
 import com.redhat.rhn.testing.BaseTestCaseWithUser;
+import com.redhat.rhn.testing.ChannelTestUtils;
 
 import java.util.Collection;
 import java.util.LinkedList;
@@ -76,6 +77,7 @@ public class VirtualizationEntitlementsManagerTest extends BaseTestCaseWithUser
 Server host = s.getVirtualInstance().getHostSystem();
 Long hostId = host.getId();
 assertNotNull(host);
+ChannelTestUtils.setupBaseChannelForVirtualization(user, host.getBaseChannel());
 SystemManager.entitleServer(host, EntitlementManager.VIRTUALIZATION);
 
 l = VirtualizationEntitlementsManager.getInstance().
-- 
1.8.1.4


___
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel

Re: [Spacewalk-devel] [Patch] fix size of kernel_options field for autoinstallation

2012-04-25 Thread Uwe Gansert

On 25.04.2012 16:24, Tomas Lestach wrote:


  - I believe cobbler cannot handle more than 255 long kernel options


I'm not aware of such a limit and a quick test showed that at least 320 
chars work :)



  - the change is done on one place only , what about the other occurences,
f.e. java/code/webapp/WEB-INF/pages/kickstart/kickstartdetails.jsp ?


that's already on 1024 in your git since 2009

--
ciao, Uwe Gansert

SUSE LINUX Products GmbH, HRB 16746 (AG Nürnberg)
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer
Home: http://www.suse.de/~ug - Blog: http://suse.gansert.net
listening to: Lucid by God Module

___
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel


Re: [Spacewalk-devel] [PATCH] Script contents not properly displayed

2012-08-14 Thread Johannes Renner
On 08/14/2012 03:36 PM, Stephen Herr wrote:
 Johannes,
 
 Could you ensure in /usr/share/pgsql/postgresql.conf that bytea_output = 
 'escape', and if not see if
 that corrects your problem?
 
 -Stephen

Thanks, setting this option fixes the problem on the postgres 9.1 database we 
are using.

We also set standard_conforming_strings = 'off', do you think it makes still 
sense in
combination with bytea_output = 'escape'?

Thanks,
Johannes

-- 
SUSE LINUX Products GmbH, HRB 16746 (AG Nürnberg)
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer

___
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel


Re: [Spacewalk-devel] [PATCH] SSH Push Feature Proposal

2013-04-30 Thread Duncan Mac-Vicar P.
On 24/04/13 14:38, Johannes Renner wrote:
 Can the logic you propose to be put to taskomatic be put to
 osa-dispatcher, to throttle the number of clients which get invited
 to rhn_check?

Doesn't osad work by having the clients connect via XMPP _to_ the server?

-- 
Duncan Mac-Vicar P. - http://www.suse.com/

SUSE LINUX Products GmbH, GF: Jeff Hawn, Jennifer Guild, Felix
Imendörffer, HRB 16746 (AG Nürnberg)
Maxfeldstraße 5, 90409 Nürnberg, Germany

___
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel


Re: [Spacewalk-devel] [PATCH] UpdateErrataCacheCommand: log an error when orgId is incorrect

2013-09-09 Thread Silvio Moioli
On 09/09/2013 10:03 AM, Tomas Lestach wrote:
 So, what is the motivation of this change?
 (The only scenario I can imagine is, that the errata cache event will be 
 queued and its organization gets deleted before the background errata cache 
 action gets executed.)

I think that is exactly the case, as we see many such NPEs in the unit
tests' standard output. AFAIU this happens since BaseTestCaseWithUser
sets up and deletes a new Org for every testsuite, so any pending
operation on the errata cache can fail depending on timing.

Regards,
-- 
Silvio Moioli
SUSE LINUX Products GmbH
Maxfeldstraße 5, 90409 Nürnberg Germany

___
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel

Re: [Spacewalk-devel] Patch proposal: try-wrapping XMLRPC serialization code

2013-10-02 Thread Silvio Moioli
On 10/01/2013 10:58 PM, Grant Gainey wrote:
 I decided there *had to* be a better way to do this - and I found one!

Great!

 More Eyes would be great. 

Actually, Taskomatic classes were left out (probably overlooked). I
added them in commit c29e22.

Apart from that, changes look good and also all tests pass tests here
as well.

Thanks a lot!
-- 
Silvio Moioli
SUSE LINUX Products GmbH
Maxfeldstraße 5, 90409 Nürnberg Germany

___
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel

Re: [Spacewalk-devel] editarea and apache 2.4

2014-02-13 Thread Duncan Mac-Vicar P.
On 13/02/14 10:10, Michael Mraka wrote:
 Duncan Mac-Vicar P. wrote:
 Hello Duncan,

 Thanks for the patch. Currently we focus on Spacewalk 2.1 release so we will
 take a look on it after the release.

Makes sense.

I plan to push it for our release. If you see something totally wrong
with it, it would be nice to know now, even if it is not applied for
2.1. I am fine with doing more corrections after the release but I would
like to avoid something completely different.

Duncan

___
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel


Re: [Spacewalk-devel] [PATCH] Date/Time picker

2014-02-14 Thread Duncan Mac-Vicar P.

Thanks for the review and fixes!. Most of it looks good except for the
self-closing tag as Silvio explained.

There are other changes that I would like to understand:

- The css part where you override some styles (and use !important, which
basically means SUSE Manager can't override it again in its css)
- setting of the input size to 15

-- 
Duncan Mac-Vicar P. - http://www.suse.com/

SUSE LINUX Products GmbH, GF: Jeff Hawn, Jennifer Guild, Felix
Imendörffer, HRB 16746 (AG Nürnberg)
Maxfeldstraße 5, 90409 Nürnberg, Germany

___
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel

Re: [Spacewalk-devel] [PATCH] build spacewalk-koan on openSUSE

2011-04-15 Thread Michael Calmer
Hi,

Am Freitag, 8. April 2011, 15:12:19 schrieb Michael Calmer:
 Hi,
 
 here is the patch to build spacewalk-koan on openSUSE.
 
 0011-build-spacewalk-koan-on-SUSE.patch:
 - modify the specfile
 - require virtualization packages
   It seems, that code of spacewalk-koan import modules from 
   rhn-virtualization. So I added these requires to the specfile.
 
   Is there a special reason why it is not there, or simply forgot to add
   this requirement?

Attached is a new versoin of this patch, but without the Requires: rhn-
virtualization.

-- 
MFG

Michael Calmer

--
Michael Calmer
SUSE LINUX Products GmbH, Maxfeldstr. 5, D-90409 Nuernberg
T: +49 (0) 911 74053 0
F: +49 (0) 911 74053575  - e-mail: michael.cal...@suse.com
--
SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg)
From 31124cc61c32c66f71f1842e212349936cbfac14 Mon Sep 17 00:00:00 2001
From: Michael Calmer m...@suse.de
Date: Fri, 15 Apr 2011 11:50:44 +0200
Subject: [PATCH 10/13] build spacewalk-koan on SUSE

- BuildRequire rhn-client-tools to provide directories
  for filelist check in OBS
---
 client/tools/spacewalk-koan/spacewalk-koan.spec |5 -
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/client/tools/spacewalk-koan/spacewalk-koan.spec b/client/tools/spacewalk-koan/spacewalk-koan.spec
index 4af05c1..6bc2241 100644
--- a/client/tools/spacewalk-koan/spacewalk-koan.spec
+++ b/client/tools/spacewalk-koan/spacewalk-koan.spec
@@ -12,7 +12,10 @@ BuildArch:  noarch
 BuildRequires:  python
 Requires:   python = 1.5
 Requires:   koan = 1.4.3
-
+%if 0%{?suse_version}
+# provide directories for filelist check in OBS
+BuildRequires: rhn-client-tools
+%endif
 Conflicts: rhn-kickstart
 Conflicts: rhn-kickstart-common
 Conflicts: rhn-kickstart-virtualization
-- 
1.7.3.4

___
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel

Re: [Spacewalk-devel] [PATCH] build spacewalk-remote-utils on openSUSE

2011-04-15 Thread Michael Calmer
Hi,

Am Freitag, 8. April 2011, 15:14:25 schrieb Michael Calmer:
 Hi,
 
 here is the patch to build spacewalk-remote-utils on openSUSE.
 
 0012-build-spacewalk-remote-utils-on-SUSE.patch
 - adding only one little dir to the filelist of the specfile

Attached is a new version of this patch. It now buildrequires rhn-client-tools 
to get the directories.

-- 
MFG

Michael Calmer

--
Michael Calmer
SUSE LINUX Products GmbH, Maxfeldstr. 5, D-90409 Nuernberg
T: +49 (0) 911 74053 0
F: +49 (0) 911 74053575  - e-mail: michael.cal...@suse.com
--
SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg)
From 960aada71c92b06445868e62ef76b34f94df4ad7 Mon Sep 17 00:00:00 2001
From: Michael Calmer m...@suse.de
Date: Fri, 15 Apr 2011 11:57:15 +0200
Subject: [PATCH 11/13] build spacewalk-remote-utils on SUSE

- BuildRequires rhn-client-tools to provide directories
  for filelist check in OBS
---
 .../spacewalk-remote-utils.spec|4 
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/client/tools/spacewalk-remote-utils/spacewalk-remote-utils.spec b/client/tools/spacewalk-remote-utils/spacewalk-remote-utils.spec
index 8b0f770..cb76ac9 100644
--- a/client/tools/spacewalk-remote-utils/spacewalk-remote-utils.spec
+++ b/client/tools/spacewalk-remote-utils/spacewalk-remote-utils.spec
@@ -18,6 +18,10 @@ BuildArch:   noarch
 Requires:rhnlib = 2.5.38
 BuildRequires: python-devel
 BuildRequires: docbook-utils
+%if 0%{?suse_version}
+# provide directories for filelist check in OBS
+BuildRequires: rhn-client-tools
+%endif
 
 %description
 Utilities to interact with a RHN Satellite or Spacewalk server remotely over XMLRPC.
-- 
1.7.3.4

___
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel

[Spacewalk-devel] [PATCH] Password with less than minlength characters accepted

2011-01-27 Thread Johannes Renner
Hello,

There seems to be a bug in the Spacewalk Java code that allows a user
to set whatever password regardless of any errors (e.g. length 
minlength), as long as the desired and confirm password are equal. It
is even possible to set a user's password to the empty string, which
results in not being able to login anymore after sign out! Attached is
a patch that fixes the problem.

Greetings,
Johannes Renner

-- 
SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg)


From 57bac09f19795e5fc4c21514da4ac20bef9cc79d Mon Sep 17 00:00:00 2001
From: Johannes Renner jren...@suse.de
Date: Tue, 18 Jan 2011 15:58:23 +0100
Subject: [PATCH] Password with less than minlength characters accepted

---
 .../frontend/action/user/UserEditActionHelper.java |   11 ++-
 1 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/java/code/src/com/redhat/rhn/frontend/action/user/UserEditActionHelper.java b/java/code/src/com/redhat/rhn/frontend/action/user/UserEditActionHelper.java
index 79529b4..68f6ce0 100644
--- a/java/code/src/com/redhat/rhn/frontend/action/user/UserEditActionHelper.java
+++ b/java/code/src/com/redhat/rhn/frontend/action/user/UserEditActionHelper.java
@@ -45,12 +45,13 @@ public abstract class UserEditActionHelper extends RhnAction {
 form.get(UserActionHelper.DESIRED_PASS))) {
 String pw = (String)form.get(UserActionHelper.DESIRED_PASS);
 String conf = (String)form.get(UserActionHelper.DESIRED_PASS_CONFIRM);
-if (pw.equals(conf)) {
-targetUser.setPassword(pw);
-}
-else {
+if (!pw.equals(conf)) {
 errors.add(ActionMessages.GLOBAL_MESSAGE,
-   new ActionMessage(error.password_mismatch));
+new ActionMessage(error.password_mismatch));
+}
+else if (errors.isEmpty()) {
+//Set the password only if there are no errors at all
+targetUser.setPassword(pw);
 }
 }
 
-- 
1.7.1



___
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel

[Spacewalk-devel] [PATCH] rhn-custom-info

2011-04-07 Thread Michael Calmer
Hi,

during some tests of the master branch I realized some issues with rhn-custom-
info. It seems that some reorganization of the code introduced some bugs in 
this package.

I have created a patch which is attached.

-- 
Regards,

Michael Calmer

--
Michael Calmer
SUSE LINUX Products GmbH, Maxfeldstr. 5, D-90409 Nuernberg
T: +49 (0) 911 74053 0
F: +49 (0) 911 74053575  - e-mail: michael.cal...@suse.com
--
SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg)
From c8c5bd99efdd0188464b1d9de2fd9f8ba6d6331a Mon Sep 17 00:00:00 2001
From: Michael Calmer m...@suse.de
Date: Thu, 7 Apr 2011 12:00:52 +0200
Subject: [PATCH] fix rhn-custom-info

- getServerURL() return now an array. Use the first value
- sslCACert is now from type unicode and not string
- initUp2dateConfig is in module config
---
 client/tools/rhncustominfo/rhn-custom-info.py |6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/client/tools/rhncustominfo/rhn-custom-info.py b/client/tools/rhncustominfo/rhn-custom-info.py
index 7f886ed..73d91e9 100755
--- a/client/tools/rhncustominfo/rhn-custom-info.py
+++ b/client/tools/rhncustominfo/rhn-custom-info.py
@@ -32,7 +32,7 @@ from up2date_client import up2dateAuth
 
 def create_server_obj(server_url):
 
-cfg = initUp2dateConfig()
+cfg = config.initUp2dateConfig()
 
 enable_proxy = cfg['enableProxy']
 proxy_host = None
@@ -48,7 +48,7 @@ def create_server_obj(server_url):

 ca = cfg['sslCACert']
 
-if type(ca) == type():
+if isinstance(ca, str) or isinstance(ca, unicode):
 ca = [ca]
  
 ca_certs = ca or [/usr/share/rhn/RHNS-CA-CERT]
@@ -184,7 +184,7 @@ def main():
 if options.url:
 url = options.url
 else:
-url = munge_server_url(config.getServerlURL())
+url = munge_server_url(config.getServerlURL()[0])
 
 s = create_server_obj(url)
 
-- 
1.7.3.4

___
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel

[Spacewalk-devel] [PATCH] build rhn-custom-info on openSUSE

2011-04-08 Thread Michael Calmer
Hi,

here is the patch to build rhn-custom-info on openSUSE.

0008-build-rhn-custom-info-on-SUSE.patch:
- only some specfile modifications

-- 
Regards,

Michael Calmer

--
Michael Calmer
SUSE LINUX Products GmbH, Maxfeldstr. 5, D-90409 Nuernberg
T: +49 (0) 911 74053 0
F: +49 (0) 911 74053575  - e-mail: michael.cal...@suse.com
--
SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg)
From f6aab93e04de6dbcb18bc27b2b75cc1f8b0cb1a7 Mon Sep 17 00:00:00 2001
From: Michael Calmer m...@suse.de
Date: Mon, 4 Apr 2011 16:13:39 +0200
Subject: [PATCH 08/17] build rhn-custom-info on SUSE

- modify the specfile
---
 client/tools/rhncustominfo/rhn-custom-info.spec |5 +
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/client/tools/rhncustominfo/rhn-custom-info.spec b/client/tools/rhncustominfo/rhn-custom-info.spec
index e6adbf5..f1638e5 100644
--- a/client/tools/rhncustominfo/rhn-custom-info.spec
+++ b/client/tools/rhncustominfo/rhn-custom-info.spec
@@ -21,8 +21,12 @@ Requires: rhnlib
 %if 0%{?rhel} = 5 || 0%{?fedora} = 1
 Requires: yum-rhn-plugin
 %else
+%if 0%{?suse_version}
+Requires: zypp-plugin-spacewalk
+%else
 Requires: up2date
 %endif
+%endif
 
 %description 
 Allows for the setting and listing of custom key/value pairs for 
@@ -46,6 +50,7 @@ rm -rf $RPM_BUILD_ROOT
 
 %files
 %defattr(-,root,root,-)
+%dir %{_datadir}/rhn
 %{_bindir}/rhn-custom-info
 %dir %{_datadir}/rhn/custominfo
 %{_datadir}/rhn/custominfo/rhn-custom-info.py*
-- 
1.7.3.4

___
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel

[Spacewalk-devel] [PATCH] build rhnpush on openSUSE

2011-04-08 Thread Michael Calmer
Hi,

here is the patch to build rhnpush on openSUSE.

0009-build-rhnpush-on-SUSE.patch:
- only some specfile modifications

-- 
Regards,

Michael Calmer

--
Michael Calmer
SUSE LINUX Products GmbH, Maxfeldstr. 5, D-90409 Nuernberg
T: +49 (0) 911 74053 0
F: +49 (0) 911 74053575  - e-mail: michael.cal...@suse.com
--
SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg)
From ae5b4c241c5937c0560f7cca3b190e4b1b32e00f Mon Sep 17 00:00:00 2001
From: Michael Calmer m...@suse.de
Date: Mon, 4 Apr 2011 16:26:21 +0200
Subject: [PATCH 09/17] build rhnpush on SUSE

- modify the specfile
---
 client/tools/rhnpush/rhnpush.spec |3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/client/tools/rhnpush/rhnpush.spec b/client/tools/rhnpush/rhnpush.spec
index 43f0008..b81784e 100644
--- a/client/tools/rhnpush/rhnpush.spec
+++ b/client/tools/rhnpush/rhnpush.spec
@@ -19,6 +19,7 @@ Requires:  up2date
 Requires:  rhn-client-tools
 %endif
 BuildRequires: docbook-utils, gettext
+BuildRequires: python-devel
 
 Summary: Package uploader for the Red Hat Network Satellite Server
 
@@ -46,6 +47,8 @@ rm -rf $RPM_BUILD_ROOT
 
 %files
 %defattr(-,root,root)
+%dir %{rhnroot}
+%dir %{_sysconfdir}/sysconfig/rhn
 %dir %{rhnroot}/rhnpush
 %{rhnroot}/rhnpush/*
 %attr(755,root,root) %{_bindir}/rhnpush
-- 
1.7.3.4

___
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel

[Spacewalk-devel] [PATCH] build spacewalk-koan on openSUSE

2011-04-08 Thread Michael Calmer
Hi,

here is the patch to build spacewalk-koan on openSUSE.

0011-build-spacewalk-koan-on-SUSE.patch:
- modify the specfile
- require virtualization packages
  It seems, that code of spacewalk-koan import modules from 
  rhn-virtualization. So I added these requires to the specfile.

  Is there a special reason why it is not there, or simply forgot to add this
  requirement?

-- 
Regards,

Michael Calmer

--
Michael Calmer
SUSE LINUX Products GmbH, Maxfeldstr. 5, D-90409 Nuernberg
T: +49 (0) 911 74053 0
F: +49 (0) 911 74053575  - e-mail: michael.cal...@suse.com
--
SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg)
From 30054d1b13c57c4693f565d99437c2466838e635 Mon Sep 17 00:00:00 2001
From: Michael Calmer m...@suse.de
Date: Tue, 5 Apr 2011 11:00:39 +0200
Subject: [PATCH 11/17] build spacewalk-koan on SUSE

- modify the specfile
- require virtualization packages
---
 client/tools/spacewalk-koan/spacewalk-koan.spec |5 +
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/client/tools/spacewalk-koan/spacewalk-koan.spec b/client/tools/spacewalk-koan/spacewalk-koan.spec
index d184849..0124dec 100644
--- a/client/tools/spacewalk-koan/spacewalk-koan.spec
+++ b/client/tools/spacewalk-koan/spacewalk-koan.spec
@@ -12,6 +12,8 @@ BuildArch:  noarch
 BuildRequires:  python
 Requires:   python = 1.5
 Requires:   koan = 1.4.3
+Requires:   rhn-virtualization-common
+Requires:   rhn-virtualization-host
 
 Conflicts: rhn-kickstart
 Conflicts: rhn-kickstart-common
@@ -47,6 +49,9 @@ rm -rf $RPM_BUILD_ROOT
 %{_sbindir}/*
 %{_datadir}/rhn/spacewalkkoan/
 %{_datadir}/rhn/actions/
+%dir %{_datadir}/rhn
+%dir %{_sysconfdir}/sysconfig/rhn
+%dir %{_sysconfdir}/sysconfig/rhn/clientCaps.d
 
 %changelog
 * Wed Feb 02 2011 Tomas Lestach tlest...@redhat.com 0.2.16-1
-- 
1.7.3.4

___
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel

[Spacewalk-devel] [PATCH] build spacewalk-remote-utils on openSUSE

2011-04-08 Thread Michael Calmer
Hi,

here is the patch to build spacewalk-remote-utils on openSUSE.

0012-build-spacewalk-remote-utils-on-SUSE.patch
- adding only one little dir to the filelist of the specfile

-- 
Regards,

Michael Calmer

--
Michael Calmer
SUSE LINUX Products GmbH, Maxfeldstr. 5, D-90409 Nuernberg
T: +49 (0) 911 74053 0
F: +49 (0) 911 74053575  - e-mail: michael.cal...@suse.com
--
SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg)
From be0b18e181d32a2d20a586f1f07304d73ee3ad01 Mon Sep 17 00:00:00 2001
From: Michael Calmer m...@suse.de
Date: Tue, 5 Apr 2011 11:00:52 +0200
Subject: [PATCH 12/17] build spacewalk-remote-utils on SUSE

- modify the specfile
---
 .../spacewalk-remote-utils.spec|1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/client/tools/spacewalk-remote-utils/spacewalk-remote-utils.spec b/client/tools/spacewalk-remote-utils/spacewalk-remote-utils.spec
index 1057a89..451038b 100644
--- a/client/tools/spacewalk-remote-utils/spacewalk-remote-utils.spec
+++ b/client/tools/spacewalk-remote-utils/spacewalk-remote-utils.spec
@@ -45,6 +45,7 @@ docbook2man ./spacewalk-create-channel/doc/spacewalk-create-channel.sgml -o ./sp
 
 %files
 %defattr(-,root,root,-)
+%dir %{_datadir}/rhn
 %{_bindir}/spacewalk-create-channel
 #%{python_sitelib}/spacecmd/
 %{_datadir}/rhn/channel-data/
-- 
1.7.3.4

___
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel

[Spacewalk-devel] [PATCH] Error message when successfully toggling user roles

2011-09-06 Thread Johannes Renner
Hey,

Here is a (very) small thing I stumbled upon: There is an error message
sent to the client even in case of success while toggling administrator
roles of single users. Please see the attached patch for a fix to send
a success message instead. There is further no bugzilla item about this,
since it was probably never an issue..

(The URI of the respective page is /rhn/admin/multiorg/Users.do)

Greetings,
Johannes

-- 
SUSE LINUX Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 16746 (AG Nürnberg)
From 9138ab493776b334005c8ab63f635284b913da6e Mon Sep 17 00:00:00 2001
From: Johannes Renner jren...@suse.de
Date: Tue, 6 Sep 2011 10:03:55 +0200
Subject: [PATCH] Do not send error message in case of success

---
 .../frontend/action/multiorg/SatAdminAction.java   |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/java/code/src/com/redhat/rhn/frontend/action/multiorg/SatAdminAction.java b/java/code/src/com/redhat/rhn/frontend/action/multiorg/SatAdminAction.java
index 479a7ad..3fe048c 100644
--- a/java/code/src/com/redhat/rhn/frontend/action/multiorg/SatAdminAction.java
+++ b/java/code/src/com/redhat/rhn/frontend/action/multiorg/SatAdminAction.java
@@ -76,12 +76,12 @@ public class SatAdminAction extends RhnAction {
 // check role and toggle
 if (u.hasRole(RoleFactory.SAT_ADMIN)) {
 u.removeRole(RoleFactory.SAT_ADMIN);
-createErrorMessage(request, user.satadmin.remove,
+createSuccessMessage(request, user.satadmin.remove,
 u.getLogin());
 }
 else {
 u.addRole(RoleFactory.SAT_ADMIN);
-createErrorMessage(request, user.satadmin.add,
+createSuccessMessage(request, user.satadmin.add,
 u.getLogin());
 }
 
-- 
1.7.3.4


___
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel

[Spacewalk-devel] [PATCH] fix for wrong transaction name

2012-06-05 Thread Michael Calmer
Hi,

please have a look at the attached patch. I think this was a copy and paste 
bug, or is there a reason, why a transaction with a different name is rolled 
back than started?

-- 
Regards

Michael Calmer

--
Michael Calmer
SUSE LINUX Products GmbH, Maxfeldstr. 5, D-90409 Nuernberg
T: +49 (0) 911 74053 0
F: +49 (0) 911 74053575  - e-mail: michael.cal...@suse.com
--
SUSE LINUX Products GmbH, GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer
HRB 16746 (AG Nürnberg)
From 6a1fcba3370deb52c6e12c1cdc08b75c7a1b7ede Mon Sep 17 00:00:00 2001
From: Michael Calmer m...@suse.de
Date: Tue, 5 Jun 2012 11:47:33 +0200
Subject: [PATCH] fix wrong transaction name in unsubscribe_channels

---
 backend/server/rhnChannel.py |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/backend/server/rhnChannel.py b/backend/server/rhnChannel.py
index 2c9aad7..a48bbf2 100644
--- a/backend/server/rhnChannel.py
+++ b/backend/server/rhnChannel.py
@@ -1846,7 +1846,7 @@ def unsubscribe_channels(server_id, channels):
 for channel in child_channels + base_channels:
 ret = unsubscribe_sql(server_id, channel[id], 0)
 if not ret:
-rhnSQL.rollback(unsub_all_channels)
+rhnSQL.rollback(unsub_channels)
 raise rhnFault(36, Could not unsubscribe server %s \
from channel %s % (server_id, channel[label]))
 
-- 
1.7.3.4

___
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel

[Spacewalk-devel] [PATCH] CVEs missing in the security patches listing (on Oracle 11)

2012-08-17 Thread Johannes Renner
Hey,

apparently the method getColumnLabel() of class ResultSetMetaData returns the 
column
label in uppercase with Oracle 11 (using ojdbc5.jar). Therefore an 
equals(cve) in
SecurityErrataOverview.java is not sufficient anymore and leads to an empty 
CVEs
column in the listing of relevant security errata:

https://hostname/rhn/errata/RelevantSecurityErrata.do

The attached patch fixes the problem by replacing equals with 
equalsIgnoreCase().

Regards,
Johannes

-- 
SUSE LINUX Products GmbH, HRB 16746 (AG Nürnberg)
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer
From dd9bf777412f470c7a8fee58408b495036f0d55b Mon Sep 17 00:00:00 2001
From: Johannes Renner jren...@suse.de
Date: Fri, 17 Aug 2012 12:06:49 +0200
Subject: [PATCH] Fix missing CVEs in patches listing with Oracle 11

---
 .../rhn/frontend/dto/SecurityErrataOverview.java   |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

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 070d561..62a0db1 100644
--- a/java/code/src/com/redhat/rhn/frontend/dto/SecurityErrataOverview.java
+++ b/java/code/src/com/redhat/rhn/frontend/dto/SecurityErrataOverview.java
@@ -52,7 +52,7 @@ public class SecurityErrataOverview extends ErrataOverview
 // expected errata_cves_elab returns 2 columns
 if (columnCount  3) {
 for (int i = 1; i = columnCount; i++) {
-if (meta.getColumnLabel(i).equals(cve)) {
+if (meta.getColumnLabel(i).equalsIgnoreCase(cve)) {
 String cve = rs.getString(cve);
 if (cve != null) {
 addCve(cve);
-- 
1.7.7

___
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel

Re: [Spacewalk-devel] [PATCH] Kickstartable channels should contain the anaconda package

2013-03-14 Thread Johannes Renner
On 03/13/2013 05:33 PM, Johannes Renner wrote:
 attached is a patch that should take care that only kickstartable channels 
 are actually
 returned by the getKickstartableChannels() method in the ChannelFactory class.

Argh, this fixes ConcurrentModificationException, sorry!

-- 
SUSE LINUX Products GmbH, HRB 16746 (AG Nürnberg)
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer
From acaadc6ee2a54f2e803f33ff5d401559b2e35359 Mon Sep 17 00:00:00 2001
From: Johannes Renner jren...@suse.de
Date: Thu, 14 Mar 2013 17:52:15 +0100
Subject: [PATCH] Prevent from concurrent modification

---
 .../code/src/com/redhat/rhn/domain/channel/ChannelFactory.java |8 +---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/java/code/src/com/redhat/rhn/domain/channel/ChannelFactory.java b/java/code/src/com/redhat/rhn/domain/channel/ChannelFactory.java
index 5509f2b..f60cfb4 100644
--- a/java/code/src/com/redhat/rhn/domain/channel/ChannelFactory.java
+++ b/java/code/src/com/redhat/rhn/domain/channel/ChannelFactory.java
@@ -35,6 +35,7 @@ import org.hibernate.criterion.CriteriaSpecification;
 import org.hibernate.criterion.Projections;
 import org.hibernate.criterion.Restrictions;
 
+import java.util.ArrayList;
 import java.util.Collection;
 import java.util.Collections;
 import java.util.HashMap;
@@ -631,6 +632,7 @@ public class ChannelFactory extends HibernateFactory {
  * @return List of Channel objects
  */
 public static ListChannel getKickstartableChannels(Org org) {
+ListChannel ret = new ArrayListChannel();
 Map params = new HashMap();
 params.put(org_id, org.getId());
 ListChannel channels = singleton.listObjectsByNamedQuery(
@@ -639,11 +641,11 @@ public class ChannelFactory extends HibernateFactory {
 for (Channel c : channels) {
 List packages = ChannelManager.listLatestPackagesEqual(c.getId(),
 ConfigDefaults.DEFAULT_ANACONDA_PACKAGE_NAME);
-if (packages.size() = 0) {
-channels.remove(c);
+if (packages.size()  0) {
+ret.add(c);
 }
 }
-return channels;
+return ret;
 }
 
 /**
-- 
1.7.10.4

___
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel

[Spacewalk-devel] [PATCH] avoid link-jars task when executing make-eclipse-project

2013-05-08 Thread Silvio Moioli
Hi,
  I noticed that the make-eclipse-project Ant task in build.xml depends
on link-jars, which as far as I understand should not be needed. This
could result in errors when a developer wants to produce the Eclipse
project files even if he/she doesn't have all dependencies set up
correctly (eg. because they are available, but in other locations).

I attached a simple patch that removes the dependency.

Regards,

Silvio Moioli
From 541498264598781c2c8656bf03abe63a8bc04277 Mon Sep 17 00:00:00 2001
From: Silvio Moioli smoi...@suse.de
Date: Tue, 7 May 2013 09:50:52 +0200
Subject: [PATCH] Removed an unnecessary task dependency

Avoids an error in make-eclipse-project when the developer does not
have JPackage dependencies installed.

---
 java/build.xml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/java/build.xml b/java/build.xml
index 1431394..948d243 100644
--- a/java/build.xml
+++ b/java/build.xml
@@ -62,8 +62,8 @@
 /target
 
   !-- Generates Eclipse classpath   --
-  target name=gen-eclipse depends=link-jars
-  description = Generates eclipse .classpath file
+  target name=gen-eclipse depends=resolve
+ description = Generates eclipse .classpath file
   exec executable=${basedir}/scripts/gen-eclipse.py
 output=${basedir}/.classpath 
 arg value=${eclipse.lib.dirs}:${rhn-home}/buildconf/tempjars:${env.JAVA_HOME}/lib/tools.jar /
-- 
1.8.1.4

___
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel

[Spacewalk-devel] [PATCH] Fix indentation on user preferences page

2013-07-12 Thread Johannes Renner
Hello,

the small patch in the attachment fixes the indentation on the user
preferences page (https://hostname/rhn/account/UserPreferences.do).

More specifically this should indent the checkboxes in the Overview
Start Page section, just to make it look more similar to the other
subsections.

Thanks and regards,
Johannes

-- 
SUSE LINUX Products GmbH, HRB 16746 (AG Nürnberg)
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer
From b687d7444374ca60fdc6a8387e70013e3acb8f12 Mon Sep 17 00:00:00 2001
From: Johannes Renner jren...@suse.de
Date: Fri, 12 Jul 2013 11:33:30 +0200
Subject: [PATCH] Fix indentation on user preferences page

---
 java/code/webapp/WEB-INF/pages/common/fragments/user/preferences.jspf | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/java/code/webapp/WEB-INF/pages/common/fragments/user/preferences.jspf b/java/code/webapp/WEB-INF/pages/common/fragments/user/preferences.jspf
index 0d5a099..a1bcddb 100644
--- a/java/code/webapp/WEB-INF/pages/common/fragments/user/preferences.jspf
+++ b/java/code/webapp/WEB-INF/pages/common/fragments/user/preferences.jspf
@@ -21,11 +21,13 @@
 h2bean:message key=preferences.jsp.startpagetitle//h2
 pbean:message key=preferences.jsp.startpagedesc//p
 
+div class=preference
 c:forEach items=${userPrefForm.map.possiblePanes} var=item
 html:multibox property=selectedPanes value=${item.value} disabled=${item.disabled} styleId=type_${item.value}/
 	label for=type_${item.value}${item.label}/label
 br /
 /c:forEach
+/div
 
 input type=hidden name=pxt:trap value=rhn:user_prefs_edit_cb /
 html:hidden property=uid /
-- 
1.8.1.4

___
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel

[Spacewalk-devel] [PATCH] Fix ISE when UUID and host ID is null

2013-07-19 Thread Johannes Renner
Hello,

I found an error navigating to:

https://hostname/rhn/systems/VirtualSystemsList.do

In my setup there is only one registered system that does not have a UUID and 
also
the virtual host system is unknown to the Spacewalk server in this case:

- current.getUuid() == null
- current.getHostSystemId() == null

So I think we should not actually do 
current.setSystemId(current.getHostSystemId());
here. The attached patch fixes the problem for me (in [1]) and also makes sense 
IMO.

Thank you and regards,
Johannes

[1] VirtualSystemsListSetupAction.java

-- 
SUSE LINUX Products GmbH, HRB 16746 (AG Nürnberg)
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer
From 1e0f80e4b6f43ade890dd3dae2a71bb4544dff01 Mon Sep 17 00:00:00 2001
From: Johannes Renner jren...@suse.de
Date: Fri, 19 Jul 2013 13:39:51 +0200
Subject: [PATCH] Fix ISE when UUID and host ID is null

---
 .../rhn/frontend/action/systems/VirtualSystemsListSetupAction.java  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/java/code/src/com/redhat/rhn/frontend/action/systems/VirtualSystemsListSetupAction.java b/java/code/src/com/redhat/rhn/frontend/action/systems/VirtualSystemsListSetupAction.java
index b6252ad..5e8a0fe 100644
--- a/java/code/src/com/redhat/rhn/frontend/action/systems/VirtualSystemsListSetupAction.java
+++ b/java/code/src/com/redhat/rhn/frontend/action/systems/VirtualSystemsListSetupAction.java
@@ -63,7 +63,7 @@ public class VirtualSystemsListSetupAction extends BaseSystemListSetupAction {
 if (current.isFakeNode()) {
 continue;
 }
-else if (current.getUuid() == null) {
+else if (current.getUuid() == null  current.getHostSystemId() != null) {
 current.setSystemId(current.getHostSystemId());
 }
 else {
-- 
1.8.1.4

___
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel

[Spacewalk-devel] [PATCH] Fix html not being escaped in package information

2013-08-05 Thread Johannes Renner
Hello,

here is another small bugfix patch fixing HTML not being properly escaped
in package description on this page:

https://hostname/rhn/software/packages/Details.do?pid=pid

Found that with a package where there was an email address in ...
notation that didn't show up.

Thanks and regards,
Johannes

-- 
SUSE LINUX Products GmbH, HRB 16746 (AG Nürnberg)
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer
From 63be1b2d99b4a594e3cd198565ea5a13197aae87 Mon Sep 17 00:00:00 2001
From: Johannes Renner jren...@suse.de
Date: Mon, 5 Aug 2013 15:42:53 +0200
Subject: [PATCH] Fix HTML not being escaped in package information

---
 .../redhat/rhn/frontend/action/rhnpackage/PackageDetailsAction.java  | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/java/code/src/com/redhat/rhn/frontend/action/rhnpackage/PackageDetailsAction.java b/java/code/src/com/redhat/rhn/frontend/action/rhnpackage/PackageDetailsAction.java
index b94830c..cf9f7f8 100644
--- a/java/code/src/com/redhat/rhn/frontend/action/rhnpackage/PackageDetailsAction.java
+++ b/java/code/src/com/redhat/rhn/frontend/action/rhnpackage/PackageDetailsAction.java
@@ -30,6 +30,7 @@ import com.redhat.rhn.frontend.xmlrpc.NoSuchPackageException;
 import com.redhat.rhn.manager.download.DownloadManager;
 import com.redhat.rhn.manager.rhnpackage.PackageManager;
 
+import org.apache.commons.lang.StringEscapeUtils;
 import org.apache.struts.action.ActionForm;
 import org.apache.struts.action.ActionForward;
 import org.apache.struts.action.ActionMapping;
@@ -125,8 +126,8 @@ public class PackageDetailsAction extends RhnAction {
 request.setAttribute(pack, pkg);
 // description can be null.
 if (pkg.getDescription() != null) {
-request.setAttribute(description,
-pkg.getDescription().replace(\n, BR\n));
+String description = StringEscapeUtils.escapeHtml(pkg.getDescription());
+request.setAttribute(description, description.replace(\n, BR\n));
 }
 else {
 request.setAttribute(description,
-- 
1.8.1.4

___
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel

[Spacewalk-devel] Patch: adapt LocalizationServiceTest to run on all JDKs

2013-08-14 Thread Silvio Moioli
Hi,
after bug 6609737[1] was fixed LocalizationServiceTest was updated to
expect MEZ instead of CET as timezone for the German-locale
timestamp format assertion. This is correct in those JDKs that contain a
fix, but the test actually fails when run on some older JDKs.

As we use IBM j9 downstream, we propose the attached patch to let the
test to pass in any case.

[1] http://bugs.sun.com/view_bug.do?bug_id=6609737

Regards,
-- 
Silvio Moioli
SUSE LINUX Products GmbH
Maxfeldstraße 5, 90409 Nürnberg Germany
From 77ebde681a357f44499d90e015c5cb94e2172a4d Mon Sep 17 00:00:00 2001
From: Silvio Moioli smoi...@suse.de
Date: Wed, 14 Aug 2013 16:14:30 +0200
Subject: [PATCH] LocalizationServiceTest: run on JDKs without fix for bug
 6609737

---
 .../redhat/rhn/common/localization/test/LocalizationServiceTest.java  | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/java/code/src/com/redhat/rhn/common/localization/test/LocalizationServiceTest.java b/java/code/src/com/redhat/rhn/common/localization/test/LocalizationServiceTest.java
index a4c2631..2c91228 100644
--- a/java/code/src/com/redhat/rhn/common/localization/test/LocalizationServiceTest.java
+++ b/java/code/src/com/redhat/rhn/common/localization/test/LocalizationServiceTest.java
@@ -206,8 +206,8 @@ public class LocalizationServiceTest extends RhnBaseTestCase {
 // Now test formatting it to German format in a DE TimeZone.
 ctx.setTimezone(TimeZone.getTimeZone(Europe/Paris));
 String deDate = ls.formatDate(dt, Locale.GERMAN);
-expected = 10.12.04 22:20:00 MEZ;
-assertEquals(expected, deDate);
+expected = 10\\.12\\.04 22:20:00 (CET|MEZ);
+assertTrue(deDate.matches(expected));
 
 String shortDeDate = ls.formatShortDate(dt, Locale.GERMAN);
 expected = 10.12.04;
-- 
1.8.1.4

___
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel

[Spacewalk-devel] [PATCH] UserManagerTest: don't rely on hardcoded default time zone

2013-09-09 Thread Silvio Moioli
UserManagerTest relied on a default America/New_York time zone, I
removed the hardcoded string replacing it with
UserFactory.getDefaultTimeZone().

See attached patch.

Regards,
-- 
Silvio Moioli
SUSE LINUX Products GmbH
Maxfeldstraße 5, 90409 Nürnberg Germany

From 6b807ef7be31c1e4fc2a08a77cf8944a634234ee Mon Sep 17 00:00:00 2001
From: Silvio Moioli smoi...@suse.de
Date: Thu, 5 Sep 2013 15:16:40 +0200
Subject: [PATCH] UserManagerTest: don't rely on hardcoded default time zone

---
 java/code/src/com/redhat/rhn/manager/user/test/UserManagerTest.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/java/code/src/com/redhat/rhn/manager/user/test/UserManagerTest.java b/java/code/src/com/redhat/rhn/manager/user/test/UserManagerTest.java
index 6fccbca..6b35881 100644
--- a/java/code/src/com/redhat/rhn/manager/user/test/UserManagerTest.java
+++ b/java/code/src/com/redhat/rhn/manager/user/test/UserManagerTest.java
@@ -383,8 +383,8 @@ public class UserManagerTest extends RhnBaseTestCase {
 public void testGetTimeZoneDefault() {
 RhnTimeZone tz = UserManager.getDefaultTimeZone();
 assertNotNull(tz);
-assertTrue(tz.getTimeZone().getRawOffset() ==
-UserFactory.getTimeZone(America/New_York).getTimeZone().getRawOffset());
+assertTrue(tz.getTimeZone().getRawOffset() == UserFactory.getDefaultTimeZone()
+.getTimeZone().getRawOffset());
 }
 
 public void testLookupTimeZoneAll() {
-- 
1.8.1.4


___
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel

[Spacewalk-devel] [PATCH] ConfigureSatelliteCommandTest: do not rely on HashMap key ordering

2013-09-09 Thread Silvio Moioli
I noticed that ConfigureSatelliteCommandTest makes an assertion that
depends on a HashMap key ordering, it was changed it to a SortedMap to
guarantee repeatability.

See attached patch.

Regards,
-- 
Silvio Moioli
SUSE LINUX Products GmbH
Maxfeldstraße 5, 90409 Nürnberg Germany

From 005e216a8cba6ace617750dfb09dc170fbd60ac9 Mon Sep 17 00:00:00 2001
From: Silvio Moioli smoi...@suse.de
Date: Fri, 6 Sep 2013 08:23:06 +0200
Subject: [PATCH] ConfigureSatelliteCommandTest: do not rely on HashMap key
 ordering

---
 .../rhn/manager/satellite/test/ConfigureSatelliteCommandTest.java   | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/java/code/src/com/redhat/rhn/manager/satellite/test/ConfigureSatelliteCommandTest.java b/java/code/src/com/redhat/rhn/manager/satellite/test/ConfigureSatelliteCommandTest.java
index 28904d0..95e5cb9 100644
--- a/java/code/src/com/redhat/rhn/manager/satellite/test/ConfigureSatelliteCommandTest.java
+++ b/java/code/src/com/redhat/rhn/manager/satellite/test/ConfigureSatelliteCommandTest.java
@@ -28,10 +28,10 @@ import com.redhat.rhn.manager.satellite.Executor;
 import com.redhat.rhn.testing.BaseTestCaseWithUser;
 import com.redhat.rhn.testing.TestUtils;
 
-import java.util.HashMap;
 import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
+import java.util.TreeMap;
 
 /**
  * ConfigureSatelliteCommandTest - test for ConfigureSatelliteCommand
@@ -73,7 +73,7 @@ public class ConfigureSatelliteCommandTest extends BaseTestCaseWithUser {
 assertTrue(cmd.getKeysToBeUpdated().contains(TEST_CONFIG_STRING));
 assertTrue(cmd.getKeysToBeUpdated().contains(TEST_CONFIG_NULL));
 
-Map optionMap = new HashMap();
+Map optionMap = new TreeMap();
 Iterator i = cmd.getKeysToBeUpdated().iterator();
 while (i.hasNext()) {
 String key = (String) i.next();
@@ -82,7 +82,7 @@ public class ConfigureSatelliteCommandTest extends BaseTestCaseWithUser {
 String[] cmdargs = cmd.getCommandArguments(Config.getDefaultConfigFilePath(),
 optionMap);
 
-assertEquals(--option=test.null_config.config_sat_test=, cmdargs[5]);
+assertEquals(--option=test.null_config.config_sat_test=, cmdargs[4]);
 assertEquals(9, cmdargs.length);
 assertNull(cmd.storeConfiguration());
 assertTrue(cmd.getKeysToBeUpdated().size() == 0);
-- 
1.8.1.4


___
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel

[Spacewalk-devel] [PATCH] UpdateErrataCacheCommand: log an error when orgId is incorrect

2013-09-09 Thread Silvio Moioli
See attached patch.

Previously a NPE would be generated, but since the stack trace is not
very useful as it can only go back until run(), it only polluted test
outputs. I think that logging the error makes more sense in this case.

Regards,
-- 
Silvio Moioli
SUSE LINUX Products GmbH
Maxfeldstraße 5, 90409 Nürnberg Germany


From 5a061de30a4c26acb841a65cfe8314f712b9f967 Mon Sep 17 00:00:00 2001
From: Silvio Moioli smoi...@suse.de
Date: Wed, 4 Sep 2013 13:34:31 +0200
Subject: [PATCH] UpdateErrataCacheCommand: log an error when orgId is
 incorrect

---
 .../redhat/rhn/manager/errata/cache/UpdateErrataCacheCommand.java| 5 +
 1 file changed, 5 insertions(+)

diff --git a/java/code/src/com/redhat/rhn/manager/errata/cache/UpdateErrataCacheCommand.java b/java/code/src/com/redhat/rhn/manager/errata/cache/UpdateErrataCacheCommand.java
index 1697aad..0b2612b 100644
--- a/java/code/src/com/redhat/rhn/manager/errata/cache/UpdateErrataCacheCommand.java
+++ b/java/code/src/com/redhat/rhn/manager/errata/cache/UpdateErrataCacheCommand.java
@@ -68,6 +68,11 @@ public class UpdateErrataCacheCommand extends BaseTransactionCommand {
 
 Org org = OrgFactory.lookupById(orgId);
 
+if (org == null) {
+log.error(Org with id  + orgId +  was not found);
+return;
+}
+
 int count = ErrataCacheManager.countServersInQueue(org);
 
 if (log.isDebugEnabled()) {
-- 
1.8.1.4


___
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel

[Spacewalk-devel] [PATCH] MasterHandlerTest: handle getDefaultMaster exceptions

2013-09-12 Thread Silvio Moioli
Hi,

If I understand  code correctly MasterHandlerTest is about testing that
some methods can or cannot be called by administrators and regular
users. IssMaster objects are created ad-hoc for testing, and one of them
is flagged and unflagged as default during the tests themselves. The
only problem is the very first call to getDefaultMaster(): since none of
the test IssMaster objects has been flagged as default yet, the call may
or may not throw exceptions depending on the previous state.

The attached patch simply ignores such exception for the very first call.

Regards,
-- 
Silvio Moioli
SUSE LINUX Products GmbH
Maxfeldstraße 5, 90409 Nürnberg Germany


From 463c0da101a290bbee3449d6c77bfce415cad696 Mon Sep 17 00:00:00 2001
From: Silvio Moioli smoi...@suse.de
Date: Mon, 9 Sep 2013 13:48:27 +0200
Subject: [PATCH 06/22] MasterHandlerTest: handle getDefaultMaster exceptions
 correctly

---
 .../rhn/frontend/xmlrpc/sync/master/test/MasterHandlerTest.java   | 8 +++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/java/code/src/com/redhat/rhn/frontend/xmlrpc/sync/master/test/MasterHandlerTest.java b/java/code/src/com/redhat/rhn/frontend/xmlrpc/sync/master/test/MasterHandlerTest.java
index 5bff49b..eb1035b 100644
--- a/java/code/src/com/redhat/rhn/frontend/xmlrpc/sync/master/test/MasterHandlerTest.java
+++ b/java/code/src/com/redhat/rhn/frontend/xmlrpc/sync/master/test/MasterHandlerTest.java
@@ -148,7 +148,13 @@ public class MasterHandlerTest extends BaseHandlerTestCase {
 
 // Make sure satellite-admin can
 try {
-IssMaster defaultMaster = handler.getDefaultMaster(adminKey);
+IssMaster defaultMaster = null;
+try {
+defaultMaster = handler.getDefaultMaster(adminKey);
+}
+catch (LookupException e) {
+// master not found, leave null
+}
 
 int rc = handler.makeDefault(adminKey, master1.getId().intValue());
 assertEquals(1, rc);
-- 
1.8.1.4



___
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel

[Spacewalk-devel] [PATCH] SystemHandlerTest: do not rely on hardcoded sequence ids

2013-09-12 Thread Silvio Moioli
SystemHandlerTest was failing in our environment and, AFAIU, it expects
that the underlying database will always return 1 as the id of a
persisted test object. This is normally not the case, as the value is
taken from a sequence and there is no code to ensure it is reset before
the test, so I simply relaxed that condition accordingly.

See attached patch.

Regards,
-- 
Silvio Moioli
SUSE LINUX Products GmbH
Maxfeldstraße 5, 90409 Nürnberg Germany

From ec1b4e81c7e82005293bb50623aa6bef8bdcc92c Mon Sep 17 00:00:00 2001
From: Silvio Moioli smoi...@suse.de
Date: Wed, 11 Sep 2013 15:00:56 +0200
Subject: [PATCH 20/22] SystemHandlerTest: do not rely on hardcoded sequence
 ids

---
 .../com/redhat/rhn/frontend/xmlrpc/system/test/SystemHandlerTest.java   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/java/code/src/com/redhat/rhn/frontend/xmlrpc/system/test/SystemHandlerTest.java b/java/code/src/com/redhat/rhn/frontend/xmlrpc/system/test/SystemHandlerTest.java
index 2bdf677..e885711 100644
--- a/java/code/src/com/redhat/rhn/frontend/xmlrpc/system/test/SystemHandlerTest.java
+++ b/java/code/src/com/redhat/rhn/frontend/xmlrpc/system/test/SystemHandlerTest.java
@@ -1858,7 +1858,7 @@ public class SystemHandlerTest extends BaseHandlerTestCase {
 
 Long returnInt = handler.scheduleReboot(adminKey,
 new Integer(testServer.getId().intValue()), new Date());
-assertEquals(returnInt, new Integer(1));
+assertNotNull(returnInt);
 
 dr = ActionManager.recentlyScheduledActions(admin, null, 30);
 assertEquals(1, dr.size() - preScheduleSize);
-- 
1.8.1.4


___
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel

[Spacewalk-devel] [PATCH] DownloadActionTest: do not assume file to be downloaded exists

2013-09-12 Thread Silvio Moioli
See attached patch.

Regards,
-- 
Silvio Moioli
SUSE LINUX Products GmbH
Maxfeldstraße 5, 90409 Nürnberg Germany


From 67eef48cbd7a10d9451501ade7d6df9c01a6f430 Mon Sep 17 00:00:00 2001
From: Silvio Moioli smoi...@suse.de
Date: Mon, 9 Sep 2013 08:25:23 +0200
Subject: [PATCH 04/22] DownloadActionTest: do not assume file to be downloaded
 exists

---
 .../redhat/rhn/frontend/action/common/test/DownloadActionTest.java| 4 
 1 file changed, 4 insertions(+)

diff --git a/java/code/src/com/redhat/rhn/frontend/action/common/test/DownloadActionTest.java b/java/code/src/com/redhat/rhn/frontend/action/common/test/DownloadActionTest.java
index 8961f24..cdc767d 100644
--- a/java/code/src/com/redhat/rhn/frontend/action/common/test/DownloadActionTest.java
+++ b/java/code/src/com/redhat/rhn/frontend/action/common/test/DownloadActionTest.java
@@ -28,6 +28,8 @@ import com.redhat.rhn.testing.TestUtils;
 import java.io.File;
 import java.util.Map;
 
+import org.apache.commons.io.FileUtils;
+
 /**
  * TinyUrlActionTest
  * @version $Rev$
@@ -121,6 +123,8 @@ public class DownloadActionTest extends RhnMockStrutsTestCase {
 fileName);
 TestUtils.saveAndFlush(p);
 
+FileUtils.touch(new File(/tmp/Server/ + fileName));
+
 KickstartSession ksession =
 KickstartSessionTest.createKickstartSession(ksdata, user);
 ksession.setKstree(tree);
-- 
1.8.1.4



___
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel

[Spacewalk-devel] [PATCH] AuthFilterTest: mocked request object updated

2013-09-12 Thread Silvio Moioli
AuthFilterTest was failing in our setup, apparently because the mocked
request object was missing some methods that were added after the test
itself was written. I added those methods and now it passes.

See attached patch.

Regards,
-- 
Silvio Moioli
SUSE LINUX Products GmbH
Maxfeldstraße 5, 90409 Nürnberg Germany


From 50ee6b949de7574f92ed87862ad35f8d6b4c7be5 Mon Sep 17 00:00:00 2001
From: Silvio Moioli smoi...@suse.de
Date: Tue, 10 Sep 2013 16:53:47 +0200
Subject: [PATCH 12/22] AuthFilterTest: mocked request object updated

---
 .../src/com/redhat/rhn/frontend/servlets/test/AuthFilterTest.java   | 6 ++
 1 file changed, 6 insertions(+)

diff --git a/java/code/src/com/redhat/rhn/frontend/servlets/test/AuthFilterTest.java b/java/code/src/com/redhat/rhn/frontend/servlets/test/AuthFilterTest.java
index 84e26e6..b33cfd0 100644
--- a/java/code/src/com/redhat/rhn/frontend/servlets/test/AuthFilterTest.java
+++ b/java/code/src/com/redhat/rhn/frontend/servlets/test/AuthFilterTest.java
@@ -88,6 +88,12 @@ public class AuthFilterTest extends MockObjectTestCase {
 mockRequest.stubs().method(getMethod)
 .will(returnValue(new String(GET)));
 
+mockRequest.stubs().method(getAttribute).with(eq(session))
+.will(returnValue(null));
+mockRequest.stubs().method(setAttribute).withAnyArguments();
+mockRequest.stubs().method(getCookies)
+.will(returnValue(null));
+
 filter.setAuthenticationService((AuthenticationService)mockAuthService.proxy());
 }
 
-- 
1.8.1.4



___
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel

[Spacewalk-devel] [PATCH] ActivationKeyHandlerTest: expect correct exceptions

2013-09-12 Thread Silvio Moioli
ActivationKeyHandlerTest expected InvalidEntitlementException where
actually FaultException gets thrown. I updated the testcase.

See attached patch.

Regards,
-- 
Silvio Moioli
SUSE LINUX Products GmbH
Maxfeldstraße 5, 90409 Nürnberg Germany


From 72b582c013959eb7efc45c57b05c76e7ff4bb654 Mon Sep 17 00:00:00 2001
From: Silvio Moioli smoi...@suse.de
Date: Tue, 10 Sep 2013 17:09:03 +0200
Subject: [PATCH 13/22] ActivationKeyHandlerTest: expect correct exceptions

---
 .../frontend/xmlrpc/activationkey/test/ActivationKeyHandlerTest.java | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/java/code/src/com/redhat/rhn/frontend/xmlrpc/activationkey/test/ActivationKeyHandlerTest.java b/java/code/src/com/redhat/rhn/frontend/xmlrpc/activationkey/test/ActivationKeyHandlerTest.java
index 4c72908..d663666 100644
--- a/java/code/src/com/redhat/rhn/frontend/xmlrpc/activationkey/test/ActivationKeyHandlerTest.java
+++ b/java/code/src/com/redhat/rhn/frontend/xmlrpc/activationkey/test/ActivationKeyHandlerTest.java
@@ -41,7 +41,6 @@ import com.redhat.rhn.domain.token.ActivationKey;
 import com.redhat.rhn.domain.token.TokenPackage;
 import com.redhat.rhn.domain.token.test.ActivationKeyTest;
 import com.redhat.rhn.frontend.xmlrpc.InvalidChannelException;
-import com.redhat.rhn.frontend.xmlrpc.InvalidEntitlementException;
 import com.redhat.rhn.frontend.xmlrpc.MissingEntitlementException;
 import com.redhat.rhn.frontend.xmlrpc.activationkey.ActivationKeyHandler;
 import com.redhat.rhn.frontend.xmlrpc.serializer.ActivationKeySerializer;
@@ -174,7 +173,7 @@ public class ActivationKeyHandlerTest extends BaseHandlerTestCase {
 new Integer(0), badEntitlements, Boolean.FALSE);
 fail();
 }
-catch (InvalidEntitlementException iee) {
+catch (FaultException fe) {
 // expected
 }
 }
@@ -187,7 +186,7 @@ public class ActivationKeyHandlerTest extends BaseHandlerTestCase {
 new Integer(0), badEntitlements, Boolean.FALSE);
 fail();
 }
-catch (InvalidEntitlementException iee) {
+catch (FaultException fe) {
 // expected
 }
 }
-- 
1.8.1.4



___
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel

[Spacewalk-devel] [PATCH] SystemEntitlementsSetupActionTest: do not assume Org has virtualization entitlement

2013-09-13 Thread Silvio Moioli
SystemEntitlementsSetupActionTest was failing in our environment, as the
tested Org missed a virtualization entitlement.

The proposed attached patch fixes the problem.

Regards,
-- 
Silvio Moioli
SUSE LINUX Products GmbH
Maxfeldstraße 5, 90409 Nürnberg Germany


From ae8640bdd4d15e16efdcb2fce7790fc676ab3f8a Mon Sep 17 00:00:00 2001
From: Silvio Moioli smoi...@suse.de
Date: Tue, 10 Sep 2013 13:18:03 +0200
Subject: [PATCH 10/22] SystemEntitlementsSetupActionTest: do not assume Org
 has virtualization entitlement

---
 .../systems/entitlements/test/SystemEntitlementsSetupActionTest.java | 1 +
 1 file changed, 1 insertion(+)

diff --git a/java/code/src/com/redhat/rhn/frontend/action/systems/entitlements/test/SystemEntitlementsSetupActionTest.java b/java/code/src/com/redhat/rhn/frontend/action/systems/entitlements/test/SystemEntitlementsSetupActionTest.java
index 8a8a7df..91b991e 100644
--- a/java/code/src/com/redhat/rhn/frontend/action/systems/entitlements/test/SystemEntitlementsSetupActionTest.java
+++ b/java/code/src/com/redhat/rhn/frontend/action/systems/entitlements/test/SystemEntitlementsSetupActionTest.java
@@ -52,6 +52,7 @@ public class SystemEntitlementsSetupActionTest extends RhnMockStrutsTestCase {
 setRequestPathInfo(/systems/SystemEntitlements);
 UserTestUtils.addManagement(user.getOrg());
 UserTestUtils.addMonitoring(user.getOrg());
+UserTestUtils.addVirtualization(user.getOrg());
 }
 /**
  *
-- 
1.8.1.4



___
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel

[Spacewalk-devel] [PATCH] MethodsSetupActionTest: do not assume that method command exists

2013-09-13 Thread Silvio Moioli
See attached patch.

Regards,
-- 
Silvio Moioli
SUSE LINUX Products GmbH
Maxfeldstraße 5, 90409 Nürnberg Germany


From d49e62923f34a64e5c2caac619d751d9e6010ac4 Mon Sep 17 00:00:00 2001
From: Silvio Moioli smoi...@suse.de
Date: Mon, 9 Sep 2013 10:56:06 +0200
Subject: [PATCH 05/22] MethodsSetupActionTest: do not assume that methods
 exist

---
 .../action/monitoring/notification/test/MethodsSetupActionTest.java  | 5 +
 1 file changed, 5 insertions(+)

diff --git a/java/code/src/com/redhat/rhn/frontend/action/monitoring/notification/test/MethodsSetupActionTest.java b/java/code/src/com/redhat/rhn/frontend/action/monitoring/notification/test/MethodsSetupActionTest.java
index bb06c9e..92bfc22 100644
--- a/java/code/src/com/redhat/rhn/frontend/action/monitoring/notification/test/MethodsSetupActionTest.java
+++ b/java/code/src/com/redhat/rhn/frontend/action/monitoring/notification/test/MethodsSetupActionTest.java
@@ -15,6 +15,7 @@
 package com.redhat.rhn.frontend.action.monitoring.notification.test;
 
 import com.redhat.rhn.common.db.datasource.DataResult;
+import com.redhat.rhn.domain.monitoring.notification.test.MethodTest;
 import com.redhat.rhn.frontend.action.monitoring.notification.MethodsSetupAction;
 import com.redhat.rhn.frontend.dto.monitoring.MethodDto;
 import com.redhat.rhn.frontend.struts.RequestContext;
@@ -37,6 +38,10 @@ public class MethodsSetupActionTest extends RhnBaseTestCase {
 sah.getRequest().setupAddParameter(newset, (String)null);
 sah.getRequest().setupAddParameter(returnvisit, (String) null);
 sah.getRequest().setupAddParameter(submitted, false);
+
+// ensure a Method exists
+MethodTest.createTestMethodCommand(sah.getUser());
+
 sah.executeAction();
 
 // Remove if not a List SetupAction
-- 
1.8.1.4



___
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel

[Spacewalk-devel] [PATCH] License of spacewalk-branding needs to be changed

2013-11-21 Thread Johannes Renner
Hello,

The license of the spacewalk-branding package needs to be changed since from 
now on
the following css frameworks, fonts and icons will be included with the package:

- Twitter Bootstrap (Apache-2.0)
- Font Awesome (MIT and OFL-1.1)
- Roboto Font (Apache-2.0)

See this bug for tracking the issue:

https://bugzilla.redhat.com/show_bug.cgi?id=1033062

Please see also the attached patch changing the license using the spdx specs 
[1].

Regards,
Johannes

[1] http://spdx.org/licenses/

-- 
SUSE LINUX Products GmbH, HRB 16746 (AG Nürnberg)
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer
From 633c050f3a068aa8a52a217c5f6ea55cd15a3937 Mon Sep 17 00:00:00 2001
From: Johannes Renner jren...@suse.de
Date: Thu, 21 Nov 2013 15:00:27 +0100
Subject: [PATCH] Fix the License of spacewalk-branding package

---
 branding/spacewalk-branding.spec | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/branding/spacewalk-branding.spec b/branding/spacewalk-branding.spec
index 5194fdd..d4646f1 100644
--- a/branding/spacewalk-branding.spec
+++ b/branding/spacewalk-branding.spec
@@ -28,7 +28,7 @@ Release:1%{?dist}
 Summary:Spacewalk branding data
 
 Group:  Applications/Internet
-License:GPLv2
+License:Apache-2.0 and GPL-2.0 and MIT and OFL-1.1
 URL:https://fedorahosted.org/spacewalk/
 Source0:https://fedorahosted.org/releases/s/p/spacewalk/%{name}-%{version}.tar.gz
 BuildRoot:  %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
-- 
1.8.1.4

___
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel

[Spacewalk-devel] [PATCH] Fix NPE when uploading kickstart profile

2013-12-18 Thread Johannes Renner
Hey,

we found that one of your recent bugfixes (see 009fab0) causes a NPE when trying
to upload a kickstart profile with Virtualization Type set to None.

Consider to apply the attached patch after review to fix the problem.

Thank you,
Johannes

-- 
SUSE LINUX Products GmbH, HRB 16746 (AG Nürnberg)
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer
From dbe021e76741e7f8a503ad37021e78deeeb13c3f Mon Sep 17 00:00:00 2001
From: Johannes Renner jren...@suse.de
Date: Wed, 18 Dec 2013 11:32:26 +0100
Subject: [PATCH] Fix NPE when uploading kickstart profile with virt type none

---
 .../frontend/action/kickstart/KickstartDetailsEditAction.java  | 10 ++
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/java/code/src/com/redhat/rhn/frontend/action/kickstart/KickstartDetailsEditAction.java b/java/code/src/com/redhat/rhn/frontend/action/kickstart/KickstartDetailsEditAction.java
index 850dba5..0dfda3d 100644
--- a/java/code/src/com/redhat/rhn/frontend/action/kickstart/KickstartDetailsEditAction.java
+++ b/java/code/src/com/redhat/rhn/frontend/action/kickstart/KickstartDetailsEditAction.java
@@ -290,9 +290,11 @@ public class KickstartDetailsEditAction extends BaseKickstartEditAction {
  */
 public static void processCobblerFormValues(KickstartData ksdata, DynaActionForm form,
 User user) throws ValidatorException {
-int virtMemory = (Integer) form.get(VIRT_MEMORY);
-if (ksdata.isRhel7OrGreater()  virtMemory  768) {
-ValidatorException.raiseException(kickstart.cobbler.profile.notenoughmemory);
+if (KickstartDetailsEditAction.canSaveVirtOptions(ksdata, form)) {
+int virtMemory = (Integer) form.get(VIRT_MEMORY);
+if (ksdata.isRhel7OrGreater()  virtMemory  768) {
+ValidatorException.raiseException(kickstart.cobbler.profile.notenoughmemory);
+}
 }
 
 CobblerProfileEditCommand cmd = new CobblerProfileEditCommand(ksdata, user);
@@ -309,7 +311,7 @@ public class KickstartDetailsEditAction extends BaseKickstartEditAction {
 }
 
 if (KickstartDetailsEditAction.canSaveVirtOptions(ksdata, form)) {
-prof.setVirtRam(virtMemory);
+prof.setVirtRam((Integer) form.get(VIRT_MEMORY));
 prof.setVirtCpus((Integer) form.get(VIRT_CPU));
 prof.setVirtFileSize((Integer) form.get(VIRT_DISK_SIZE));
 prof.setVirtBridge(form.getString(VIRT_BRIDGE));
-- 
1.8.1.4

___
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel

[Spacewalk-devel] [PATCH] SUSE Studio API will stop working via unencrypted HTTP

2014-01-22 Thread Johannes Renner
Hello,

The SUSE Studio API will no longer process requests via unencrypted HTTP after
Jan 2014, see here:

http://blog.susestudio.com/2013/12/coming-soon-https-only-on-suse-studio.html

Therefore attached is a patch to change the default endpoint to use SSL.

Thank you,
Johannes

-- 
SUSE LINUX Products GmbH, HRB 16746 (AG Nürnberg)
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer
From f523f1d0188c4094888513026478435db169ce3c Mon Sep 17 00:00:00 2001
From: Johannes Renner jren...@suse.de
Date: Wed, 22 Jan 2014 10:41:08 +0100
Subject: [PATCH] SUSE Studio API will stop working via unencrypted HTTP

---
 .../com/redhat/rhn/frontend/action/user/UserCredentialsEditAction.java  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/java/code/src/com/redhat/rhn/frontend/action/user/UserCredentialsEditAction.java b/java/code/src/com/redhat/rhn/frontend/action/user/UserCredentialsEditAction.java
index 66efc89..72395f3 100644
--- a/java/code/src/com/redhat/rhn/frontend/action/user/UserCredentialsEditAction.java
+++ b/java/code/src/com/redhat/rhn/frontend/action/user/UserCredentialsEditAction.java
@@ -40,7 +40,7 @@ public class UserCredentialsEditAction extends RhnAction {
 private static final String PARAM_USER = studio_user;
 private static final String PARAM_KEY = studio_key;
 private static final String PARAM_URL = studio_url;
-private static final String DEFAULT_URL = http://susestudio.com;;
+private static final String DEFAULT_URL = https://susestudio.com;;
 
 /** {@inheritDoc} */
 @Override
-- 
1.8.4

___
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel

Re: [Spacewalk-devel] devel repo: sync channels from dump

2015-10-26 Thread Silvio Moioli

On 15/10/2015 11:45, Pavel Studeník wrote:

Hello,

I think that syncing channels from devel repo is broken. [...]

satellite-sync -m dumps -c rhel-i386-server-5 -c rhel-i386-server-vt-5


I am attaching a patch which should help - unfortunately we are not able to 
access the channels you mention so it's difficult for us to test that.

Please give the patch a try and report back if it works.

Thanks!
--
Silvio Moioli
SUSE Manager Development Team


--
Silvio Moioli
SUSE Manager Development Team
>From 76694b63d50f7c79d9cf5a6a3de88675976f1120 Mon Sep 17 00:00:00 2001
From: Michael Calmer <m...@suse.de>
Date: Thu, 22 Oct 2015 11:54:22 +0200
Subject: [PATCH] ignore all not any longer supported entitlements

---
 backend/server/importlib/archImport.py | 9 ++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/backend/server/importlib/archImport.py b/backend/server/importlib/archImport.py
index d5199fa..21105b7 100644
--- a/backend/server/importlib/archImport.py
+++ b/backend/server/importlib/archImport.py
@@ -144,9 +144,12 @@ class ServerGroupServerArchCompatImport(BaseArchCompatImport):
 arches2_field_name = 'server_group_type'
 submit_method_name = 'processServerGroupServerArchCompatMap'
 
-# monitoring is no longer supported, ignore any monitoring info for
+# some entitlements are no longer supported, ignore any of them for
 # backwards compatibility
 def _postprocess(self):
-self.batch[:] = [entry for entry in self.batch if not
- entry[self.arches2_name] == 'monitoring_entitled']
+self.batch[:] = [entry for entry in self.batch if
+ entry[self.arches2_name] not in [
+ 'monitoring_entitled', 'sw_mgr_entitled',
+ 'provisioning_entitled', 'nonlinux_entitled',
+ 'virtualization_host_platform']]
 BaseArchCompatImport._postprocess(self)
-- 
2.1.4


___
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel

Re: [Spacewalk-devel] [PATCH] updateinfo to Errata import in?spacewalk-repo-sync

2011-03-11 Thread Michael Calmer
Hi,

Am Freitag, 11. März 2011, 11:23:09 schrieb Jan Pazdziora:
 On Fri, Mar 11, 2011 at 10:31:45AM +0100, Michael Calmer wrote:
   
   is at fault -- at least in that Fedora 7 updateinfo, the version
   is not integer. When I've changed the line to
   
 e['advisory_rel'] = 1
   
   things went much better.
  
  Yes, this is the version appended to advisory_name. Here is an example
  from openSUSE which shows the unique problem
  
  updates
  !--PATCHINFO id=898568de8313f62fc290e303946cfe11!--
  update status=stable from=maint-co...@suse.de type=recommended 
  version=1596
idflash-player/id
issued date=1256155647/
  [...]
  update status=stable from=maint-co...@suse.de type=security 
  version=1707
idflash-player/id
issued date=1260492724/
  
  Same id used but with a different version. I think we need to find a way
  to deal with all these differences in how updateinfo is used.
 
 Right. I've checked
 
   
http://download.englab.brq.redhat.com/pub/fedora/linux/updates/14/i386/repodata/updateinfo.xml.gz
 
 and it still has version=1.4 there, so it looks like Fedora uses
 that attribute to mean the version of the data structure (it's 1.4
 both on Fedora 7 and Fedora 14), not version of the errata.
 
 Can you come up with some proposal? From top of my head, we could add
 a type of updatesinfo to the repository definition in the database
 and use that, or use some heuristics, either checking that the id
 does not end with /-\d+-\d+$/ or checking something else specific to
 Fedora / *SuSE.

yes. I will try to look into it next week.
 
  About the channel label added to the advisory_name.
  
  I think the correct way would be to search in DB if the errata already
  exist.
  If so, create the errata object from the DB and add the new packages and 
  channels to it.
  Than update the errata in the database.
 
 Exactly.

Fine.
 
  Doing this, we do not need to append the channel label to advisory_name.
  
  Is there already a method to create an Erratum object from the database?
 
 There has to be, as satellite-sync does exactly that. Unfortunately,
 I won't be able to dig into it for the next week as I will be away
 -- if you could investigate, that would be great.

I think I will find this. Thanks for the hint.

-- 
Regards,

Michael Calmer

--
Michael Calmer
SUSE LINUX Products GmbH, Maxfeldstr. 5, D-90409 Nuernberg
T: +49 (0) 911 74053 0
F: +49 (0) 911 74053575  - e-mail: michael.cal...@suse.com
--
SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg)

___
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel


Re: [Spacewalk-devel] [PATCH] Fix html not being escaped in package information

2013-08-06 Thread Tomas Lestach
Hello Johannes,

I committed you patch as:
https://git.fedorahosted.org/cgit/spacewalk.git/commit/?id=55405e0c57e34c35cd13a482cf95e867661c0829

Thank you!
--
Tomas Lestach
Red Hat Satellite Engineering, Red Hat


- Original Message -
 From: Johannes Renner jren...@suse.de
 To: spacewalk-devel@redhat.com
 Sent: Monday, August 5, 2013 4:13:21 PM
 Subject: [Spacewalk-devel] [PATCH] Fix html not being escaped in package  
 information
 
 Hello,
 
 here is another small bugfix patch fixing HTML not being properly
 escaped
 in package description on this page:
 
 https://hostname/rhn/software/packages/Details.do?pid=pid
 
 Found that with a package where there was an email address in ...
 notation that didn't show up.
 
 Thanks and regards,
 Johannes
 
 --
 SUSE LINUX Products GmbH, HRB 16746 (AG Nürnberg)
 GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer
 
 ___
 Spacewalk-devel mailing list
 Spacewalk-devel@redhat.com
 https://www.redhat.com/mailman/listinfo/spacewalk-devel

___
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel

Re: [Spacewalk-devel] Patch: adapt LocalizationServiceTest to run on all JDKs

2013-08-15 Thread Tomas Lestach
Hello Silvio,

I committed your patch as:
https://git.fedorahosted.org/cgit/spacewalk.git/commit/?id=ec5abc7162569df9c4fc037a855905145a756d48

Thank you,
--
Tomas Lestach
Red Hat Satellite Engineering, Red Hat


- Original Message -
 From: Silvio Moioli smoi...@suse.de
 To: spacewalk-devel@redhat.com
 Sent: Wednesday, August 14, 2013 4:36:28 PM
 Subject: [Spacewalk-devel] Patch: adapt LocalizationServiceTest to run on 
 all JDKs
 
 Hi,
   after bug 6609737[1] was fixed LocalizationServiceTest was updated
   to
 expect MEZ instead of CET as timezone for the German-locale
 timestamp format assertion. This is correct in those JDKs that
 contain a
 fix, but the test actually fails when run on some older JDKs.
 
 As we use IBM j9 downstream, we propose the attached patch to let the
 test to pass in any case.
 
 [1] http://bugs.sun.com/view_bug.do?bug_id=6609737
 
 Regards,
 --
 Silvio Moioli
 SUSE LINUX Products GmbH
 Maxfeldstraße 5, 90409 Nürnberg Germany
 
 ___
 Spacewalk-devel mailing list
 Spacewalk-devel@redhat.com
 https://www.redhat.com/mailman/listinfo/spacewalk-devel

___
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel

[Spacewalk-devel] [PATCH] small fix for spacewalk-backend

2011-04-08 Thread Michael Calmer
Hi,

and now the last one :-)

I found a small issue in spacewalk-backend, where the locale files are 
installed in duplicate buildroot environment.

In backend/po/Makefile, localedir is defined as $(PREFIX)/usr/share/locale
and in the install section files are installed to $(PREFIX)/$(localedir) .

-- 
Regards,

Michael Calmer

--
Michael Calmer
SUSE LINUX Products GmbH, Maxfeldstr. 5, D-90409 Nuernberg
T: +49 (0) 911 74053 0
F: +49 (0) 911 74053575  - e-mail: michael.cal...@suse.com
--
SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg)
From 20cb8563e6e1359aae1b97109cdb8bb51f418b74 Mon Sep 17 00:00:00 2001
From: Michael Calmer m...@suse.de
Date: Fri, 8 Apr 2011 10:33:32 +0200
Subject: [PATCH 15/17] remove duplicate PREFIX for locale installation

---
 backend/po/Makefile |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/backend/po/Makefile b/backend/po/Makefile
index 728e908..f5c3c82 100644
--- a/backend/po/Makefile
+++ b/backend/po/Makefile
@@ -4,7 +4,7 @@
 
 TOP	= ..
 SUBDIR	= locale
-localedir = $(PREFIX)/usr/share/locale
+localedir = /usr/share/locale
 
 include $(TOP)/Makefile.defs
 
-- 
1.7.3.4

___
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel

[Spacewalk-devel] [PATCH] fix virtual guest state indicator

2011-10-28 Thread Uwe Gansert
Hi,

there is a bug in spacewalk, that the state of your virtual guests is not 
shown correctly if all machines are in state stopped.
As long as at least one guest is running, the indicatior on the webpage:

Systems-[MACHINE]-Virtualization-Details

is correct but if you turn off the last machine, the state will still be 
running for that guest. Spacewalk will never notice the shutdown.

That's because of a bug in poller.py on the client (virtual host) side. There 
is an optimization to exit the program if the domain_list from 
poll_hypervisor() is empty.
That list is empty when all virtual guests are stopped, so if you shutdown the 
last running virtual guest, the poller.py will exit early and will return an 
empty result to the Spacewalk server who thinks now that nothing has happened.

I have attached a patch that removes that optimization as a suggestion for a 
fix.


-- 
ciao, Uwe Gansert

SUSE LINUX Products GmbH, HRB 16746 (AG Nürnberg)
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer
Home: http://www.suse.de/~ug - Blog: http://suse.gansert.net
commit b5caa1cacff077d0c2dbb361e2c4bb7b5d54d554
Author: Uwe Gansert u...@suse.de
Date:   Fri Oct 28 10:56:08 2011 +0200

fix vm-state poller

diff --git a/client/tools/rhn-virtualization/virtualization/poller.py 
b/client/tools/rhn-virtualization/virtualization/poller.py
index f94e122..cb8e3ae 100644
--- a/client/tools/rhn-virtualization/virtualization/poller.py
+++ b/client/tools/rhn-virtualization/virtualization/poller.py
@@ -294,10 +294,6 @@ if __name__ == __main__:
 # useless.  Just exit.
 sys.exit(0)
 
-if not domain_list:
-# No domains returned, nothing to do, exit polling
-sys.exit(0)
-
 # create the unkonwn domain config files (for libvirt only)
 if libvirt and not vdsm_enabled:
 uuid_list = domain_list.keys()
___
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel

[Spacewalk-devel] [Patch] fix size of kernel_options field for autoinstallation

2012-04-25 Thread Uwe Gansert

Hi,

the field in the web UI for the kernel_options is limited to 64 
characters. In practice that's not needed.

The attached patch solves that by increasing it to 1024


--
ciao, Uwe Gansert

SUSE LINUX Products GmbH, HRB 16746 (AG Nürnberg)
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer
Home: http://www.suse.de/~ug - Blog: http://suse.gansert.net
listening to: Snuff Machinery 2007 by Sitd
commit a1c929ae44fd80b6cd77d5bf55286873df11dc11
Author: Uwe Gansert u...@suse.de
Date:   Mon Jul 18 13:48:52 2011 +0200

changed kernel-params field to 1024 chars in size (bnc#698166)

diff --git a/java/code/webapp/WEB-INF/pages/common/fragments/kickstart/advanced/details.jspf b/java/code/webapp/WEB-INF/pages/common/fragments/kickstart/advanced/details.jspf
index be94c2b..7e2e5c8 100644
--- a/java/code/webapp/WEB-INF/pages/common/fragments/kickstart/advanced/details.jspf
+++ b/java/code/webapp/WEB-INF/pages/common/fragments/kickstart/advanced/details.jspf
@@ -56,12 +56,12 @@
 
   tr
 thbean:message key=kickstartdetails.jsp.kernel_options//th
-tdhtml:text property=kernel_options maxlength=64 size=32 //td
+tdhtml:text property=kernel_options maxlength=1024 size=32 //td
   /tr
 
  tr
 thbean:message key=kickstartdetails.jsp.post_kernel_options//th
-tdhtml:text property=post_kernel_options maxlength=64 size=32 //td
+tdhtml:text property=post_kernel_options maxlength=1024 size=32 //td
   /tr
 
   tr
___
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel

[Spacewalk-devel] [PATCH] Fix the Java package of DeleteGroupAction class

2013-12-18 Thread Johannes Renner
Hello,

here is another micropatch fixing up a recent commit in master. The Java
package needs to correspond with the filesystem path in any case.

Thanks,
Johannes

-- 
SUSE LINUX Products GmbH, HRB 16746 (AG Nürnberg)
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer
From 8e0a0192c54255e50a760887e1349d55492ab813 Mon Sep 17 00:00:00 2001
From: Johannes Renner jren...@suse.de
Date: Wed, 18 Dec 2013 14:57:00 +0100
Subject: [PATCH] Fix the java package of DeleteGroupAction class

---
 .../src/com/redhat/rhn/frontend/action/groups/DeleteGroupAction.java| 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/java/code/src/com/redhat/rhn/frontend/action/groups/DeleteGroupAction.java b/java/code/src/com/redhat/rhn/frontend/action/groups/DeleteGroupAction.java
index 1bbc4ad..41161c4 100644
--- a/java/code/src/com/redhat/rhn/frontend/action/groups/DeleteGroupAction.java
+++ b/java/code/src/com/redhat/rhn/frontend/action/groups/DeleteGroupAction.java
@@ -12,7 +12,7 @@
  * granted to use or replicate Red Hat trademarks that are incorporated
  * in this software or its documentation.
  */
-package com.redhat.rhn.frontend.action.token;
+package com.redhat.rhn.frontend.action.groups;
 
 import com.redhat.rhn.domain.server.ManagedServerGroup;
 import com.redhat.rhn.frontend.struts.RequestContext;
-- 
1.8.1.4

___
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel

Re: [Spacewalk-devel] [PATCH] SUSE/AutoYaST Support

2011-03-10 Thread Uwe Gansert
on Tuesday 08 March 2011 Miroslav Suchý wrote:

  0002-update-database-to-support-SUSE-distributions.patch
  update the database with a SUSE breed to make SUSE an option for a
  kickstartable tree
 
 You need to add this INSERT to
 schema/spacewalk/common/data/rhnKSInstallType.sql
 as well.

yes, you are right. I forgot to attach the patch. here it comes

  0004-bnc-664915-rhnreg_ks-help-failed-if-LANG-de_DE.UTF-8.patch
  nothing kickstart related but rhnreg_ks crashed with LANG=de_DE.UTF8 when
  you called it with --help
 
 BNC is not public. Can you please either
 - clone it to bugzilla.redhat.com Other-Spacewalk and refer to this bz
 number
 - or make BNC 664915

okay, I created a red hat bugzilla entry and changed the patch.
https://bugzilla.redhat.com/show_bug.cgi?id=683546
New version of the patch is attached.

 Honestly I'm confused from this one. I do not know what is root of
 cause? And what is wrong on
 _ = gettext.gettext
 We use it on a lot of places. So if there is some problem we may want to
 change it everywhere in code as well.

to be honest, I'm not a python expert. I extracted that patch from another bug 
that has exactly the same failure (nothing spacewalk related) and was fixed 
like that.

 BTW, when our commit address some traceback we put the traceback to
 description as it very often explain everything. For example commit
 3612ebb308e43497ab380464f2d197e591579396
 
 It will be fine, if you can do it as well.

sure, okay.

-- 
ciao, Uwe Gansert

Uwe Gansert
SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg)
Business: http://www.suse.de/~ug
commit 843146b2de77899ebb44b39725a50666c30c3835
Author: Uwe Gansert u...@suse.de
Date:   Fri Nov 5 15:34:10 2010 +0100

suse breed added to ksinstalltype

diff --git a/schema/spacewalk/common/data/rhnKSInstallType.sql b/schema/spacewalk/common/data/rhnKSInstallType.sql
index 6657e20..5394521 100644
--- a/schema/spacewalk/common/data/rhnKSInstallType.sql
+++ b/schema/spacewalk/common/data/rhnKSInstallType.sql
@@ -46,4 +46,8 @@ insert into rhnKSInstallType (id, label, name)
 values (sequence_nextval('rhn_ksinstalltype_id_seq'),
 'generic_rpm','Generic RPM'
 );
+insert into rhnKSInstallType (id, label, name)
+values (sequence_nextval('rhn_ksinstalltype_id_seq'),
+'suse','SUSE Linux'
+);
 commit;
From 52dc10f83aa3c5e3d27a9cb8dad5df15ac67b562 Mon Sep 17 00:00:00 2001
From: Uwe Gansert u...@suse.de
Date: Tue, 18 Jan 2011 11:46:57 +0100
Subject: [PATCH 4/5] bnc#664915 rhnreg_ks --help failed if LANG = de_DE.UTF-8

---
 client/rhel/rhn-client-tools/src/bin/rhnreg_ks.py |7 ++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/client/rhel/rhn-client-tools/src/bin/rhnreg_ks.py b/client/rhel/rhn-client-tools/src/bin/rhnreg_ks.py
index e1b6c4d..e713b93 100755
--- a/client/rhel/rhn-client-tools/src/bin/rhnreg_ks.py
+++ b/client/rhel/rhn-client-tools/src/bin/rhnreg_ks.py
@@ -24,7 +24,12 @@ import sys
 import os
 
 import gettext
-_ = gettext.gettext
+
+# bnc#664915 / red hat bugzilla #683546 rhnreg_ks --help failed if LANG = de_DE.UTF-8
+#_ = gettext.gettext
+t = gettext.translation('rhn-client-tools', '/usr/share/locale/', fallback=True)
+def _(str):
+return unicode(t.gettext(str), 'UTF-8')
 
 sys.path.append(/usr/share/rhn/)
 
-- 
1.6.4.2

___
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel

Re: [Spacewalk-devel] [PATCH] Patch synchronization issue

2013-08-21 Thread Silvio Moioli
On 08/21/2013 01:57 PM, Tomas Lestach wrote:
 Does this mean the reproducer is wrong? Shall I take two packages of same
 name, arch and evr? xulrunner-devel-17.0.5-1.el6_4-x86_64 and
 xulrunner-devel-17.0.5-1.el6_4-x86_64 (let's say signed with another gpg key)?

Exactly - the problem arises when both a new package in an updated
errata and a package already present in a less recent, cloned errata
have identical (name, evr, arch). I apologize for my first explanation
and examples not being clear enough.

 Actually it should not be possible to change the content of RHEL channels,
 so if you found a way how, please, let me know.

In our case, the vendor simply changed a patch, adding packages. Custom
channels/patches could also run in the same issue.

Thanks, regards,
-- 
Silvio Moioli
SUSE LINUX Products GmbH
Maxfeldstraße 5, 90409 Nürnberg Germany

___
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel


[Spacewalk-devel] [PATCH] Patch synchronization issue

2013-08-21 Thread Silvio Moioli
Hello,

We recently stumbled upon an issue with patch synchronization, which
turned out to be a bug in Hibernate handling of Package objects, which
in turn was caused by a strange definition of hashCode() in that class.
Steps to reproduce the problem and a proposed patch follow.

Reproducing the problem:
 - clone a channel (eg. RHEL x86_64 Server 6);
 - update the original channel so that some of the patches are updated,
and in particular, so that at least one patch gets some new packages
added. Furthermore, at least one of those added packages should have a
(name, arch, EVR) triple that is already present among the original
patch's (name, arch, EVR) triples. An example is CL-SA-2013:0696, that
adds multiple packages for xulrunner-devel-17.0.5-1.el6_4-x86_64 and
xulrunner-devel-17.0.5-1.el6_4-i686;
 - pick such a patch and attempt to sync it (Channels - Manage
Software Channels - your cloned channel name - Patches - Sync
- select your patch - Sync Patches - Confirm);
 - those packages which were added to the patch with a (name, arch, EVR)
triple already in the patch will NOT be added to the updated (synced) patch.

Cause:
Among other things, ErrataFactory.syncErrataDetails() will copy packages
from the original patch to the cloned patch with the line


Justin Sherrill 2008

a85006389d436719240b49f8eea37f7550edf974
-- 
Silvio Moioli
SUSE LINUX Products GmbH
Maxfeldstraße 5, 90409 Nürnberg Germany

___
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel


Re: [Spacewalk-devel] [PATCH] Naming of cloned errata

2012-03-07 Thread Johannes Renner
On 03/06/2012 05:42 PM, Johannes Renner wrote:
 Hey,
 
 I want to propose a change concerning the names of cloned errata.
 Currently, names of cloned errata are generated like this:
 
 String clonedAdvisoryName = CL + published.getAdvisoryName().substring(3);
 String clonedAdvisory = CL + published.getAdvisory().substring(3);
 
 The reason for doing it like this might have been a small sized field in the
 database, but AFAIK we already upstreamed a patch to enlarge the respective
 field. Since cloned errata currently end up with rather strange names, I
 would like to propose to do the naming like this instead:
 
 String clonedAdvisoryName = CL- + published.getAdvisoryName();
 String clonedAdvisory = CL- + published.getAdvisory();
 
 Even the classification used for the Red Hat patches (E, S and B) gets lost
 when removing the first 3 characters, since names start with RH(E|S|B). So
 please tell me if I am missing any reason to keep the old naming scheme.
 
 Attached please find my proposed patch for spacewalk master.

Of course this algorithm is duplicated in the perl parts of Spacewalk ;-)
Patch is attached.

-- 
SUSE LINUX Products GmbH, HRB 16746 (AG Nürnberg)
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer
From 1397508621edc9e7a4804c3aee46a74a23421bb4 Mon Sep 17 00:00:00 2001
From: Michael Calmer m...@suse.de
Date: Wed, 7 Mar 2012 11:13:43 +0100
Subject: [PATCH] Fix naming of cloned patches to not remove the first 3 chars

---
 web/modules/rhn/RHN/DB/ErrataEditor.pm |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/web/modules/rhn/RHN/DB/ErrataEditor.pm b/web/modules/rhn/RHN/DB/ErrataEditor.pm
index 8c19fa5..249ef8d 100644
--- a/web/modules/rhn/RHN/DB/ErrataEditor.pm
+++ b/web/modules/rhn/RHN/DB/ErrataEditor.pm
@@ -159,8 +159,8 @@ sub find_next_advisory {
   my $suffix = '';
   my $i = 1;
 
-  $adv = 'CL' . substr($adv, 3);
-  $adv_name = 'CL' . substr($adv_name, 3);
+  $adv = 'CL-' . $adv;
+  $adv_name = 'CL-' . $adv_name;
 
   if (advisory_exists($adv) || advisory_name_exists($adv_name)) {
 $suffix = sprintf(-%u, $i++);
-- 
1.7.7

___
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel

Re: [Spacewalk-devel] [PATCH] Show systems that need reboot because of an errata

2012-04-19 Thread Michael Calmer
Hi,

Am Mittwoch, 18. April 2012, 15:00:01 schrieb Tomas Lestach:
  Attached patch, rebased against master. It contains all suggestions and
  fixed some formatting issues not relevant to the patch. Additionally
  changed to_timestamp() to something that works in both databases.
  
  Duncan
 
 Thanks Duncan,
 
 I committed your patch as: 433bd3a310f38577ff3066414a2f035e4c310e47

It seems that one query is not able to run on oracle and on postgres
it does not do what it should :-)

A possible fix is attached.

-- 
Regards

Michael Calmer

--
Michael Calmer
SUSE LINUX Products GmbH, Maxfeldstr. 5, D-90409 Nuernberg
T: +49 (0) 911 74053 0
F: +49 (0) 911 74053575  - e-mail: michael.cal...@suse.com
--
SUSE LINUX Products GmbH, GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer
HRB 16746 (AG Nürnberg)
From dfb7e3e922eee62b615ba1c1294560e85341dd78 Mon Sep 17 00:00:00 2001
From: Michael Calmer m...@suse.de
Date: Thu, 19 Apr 2012 11:47:24 +0200
Subject: [PATCH] fix has_errata_with_keyword_applied_since_last_reboot query

Fixes:
com.redhat.rhn.common.db.WrappedSQLException: ORA-00936: missing expression
---
 .../common/db/datasource/xml/System_queries.xml|2 --
 1 files changed, 0 insertions(+), 2 deletions(-)

diff --git a/java/code/src/com/redhat/rhn/common/db/datasource/xml/System_queries.xml b/java/code/src/com/redhat/rhn/common/db/datasource/xml/System_queries.xml
index ace71cb..c05c98f 100644
--- a/java/code/src/com/redhat/rhn/common/db/datasource/xml/System_queries.xml
+++ b/java/code/src/com/redhat/rhn/common/db/datasource/xml/System_queries.xml
@@ -790,7 +790,6 @@ SELECT DISTINCT S.id, S.NAME,
 
 mode name=has_errata_with_keyword_applied_since_last_reboot
   query params=org_id, user_id, keyword, sid
-  SELECT EXISTS (
 	SELECT 1
 	FROM rhnServer S,
 	  rhnErrata E,
@@ -808,7 +807,6 @@ SELECT DISTINCT S.id, S.NAME,
 	  AND EP.errata_id = E.id AND EP.package_id = P.id
 	  AND (to_date('1970-01-01', '-MM-DD') + numtodsinterval(S.last_boot, 'second')) lt; SP.installtime
 	  AND E.id IN (SELECT EK.errata_id FROM rhnErrataKeyword EK WHERE EK.keyword = :keyword)
-)
 /query
 /mode
 
-- 
1.7.3.4

___
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel

[Spacewalk-devel] [PATCH] junit tests: do not rely on Cobbler

2013-09-12 Thread Silvio Moioli
Hi,

We propose some patches to avoid the junit testsuite to depend on
Cobbler. With those, we are able to run all the tests using only a
database instance seeded with the latest schema version. Details:

- patch 17 calls setupTestConfiguration() on KickstartDataTest before
calling other members of the same class which, as far as I understand,
is the correct approach here;
- patch 18 does the same in SystemHandlerTest, which also used other
methods from KickstartDataTest;
- patch 19 adds code to mock the Cobbler connection in SystemManagerTest.

About patch 19: we noticed that most tests where Cobbler was required
were failing because they called SystemManager.deleteServer(). That
method used to remove a system from the database only, but later (in
2011) a patch was added to call Cobbler to delete the system from there
as well. Test code was never updated for Cobbler so it only checks
database and objects, so I think it makes sense to just use a mocked
connection to avoid the Cobbler exception on a test system that will
never be in Cobbler anyway.

Comments welcome!

Regards,
-- 
Silvio Moioli
SUSE LINUX Products GmbH
Maxfeldstraße 5, 90409 Nürnberg Germany


From 0351959bb8c0398b1243fa045caa2eb580b8ad4a Mon Sep 17 00:00:00 2001
From: Silvio Moioli smoi...@suse.de
Date: Wed, 11 Sep 2013 14:28:05 +0200
Subject: [PATCH 17/22] ActionManagerTest: do not rely on Cobbler, mock the
 connection

---
 java/code/src/com/redhat/rhn/manager/action/test/ActionManagerTest.java | 1 +
 1 file changed, 1 insertion(+)

diff --git a/java/code/src/com/redhat/rhn/manager/action/test/ActionManagerTest.java b/java/code/src/com/redhat/rhn/manager/action/test/ActionManagerTest.java
index c80b5c3..e0094c3 100644
--- a/java/code/src/com/redhat/rhn/manager/action/test/ActionManagerTest.java
+++ b/java/code/src/com/redhat/rhn/manager/action/test/ActionManagerTest.java
@@ -332,6 +332,7 @@ public class ActionManagerTest extends RhnBaseTestCase {
 .getServer();
 ActionFactory.save(parentAction);
 
+KickstartDataTest.setupTestConfiguration(user);
 KickstartData ksData = KickstartDataTest.createKickstartWithOptions(user.getOrg());
 KickstartSession ksSession = KickstartSessionTest.createKickstartSession(server,
 ksData, user, parentAction);
-- 
1.8.1.4



From df48d9e1b93a028c91ac4537ac26518857d630b7 Mon Sep 17 00:00:00 2001
From: Silvio Moioli smoi...@suse.de
Date: Wed, 11 Sep 2013 14:39:44 +0200
Subject: [PATCH 18/22] SystemHandlerTest: do not rely on Cobbler, use mock the
 connection

---
 .../com/redhat/rhn/frontend/xmlrpc/system/test/SystemHandlerTest.java   | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/java/code/src/com/redhat/rhn/frontend/xmlrpc/system/test/SystemHandlerTest.java b/java/code/src/com/redhat/rhn/frontend/xmlrpc/system/test/SystemHandlerTest.java
index 69d199a..2bdf677 100644
--- a/java/code/src/com/redhat/rhn/frontend/xmlrpc/system/test/SystemHandlerTest.java
+++ b/java/code/src/com/redhat/rhn/frontend/xmlrpc/system/test/SystemHandlerTest.java
@@ -718,6 +718,7 @@ public class SystemHandlerTest extends BaseHandlerTestCase {
 Long sid = server.getId();
 ClientCertificate cert = SystemManager.createClientCertificate(server);
 cert.validate(server.getSecret());
+KickstartDataTest.setupTestConfiguration(admin);
 assertEquals(1, handler.deleteSystem(cert.toString()));
 assertNull(ServerFactory.lookupById(sid));
 }
@@ -753,6 +754,7 @@ public class SystemHandlerTest extends BaseHandlerTestCase {
 server.setBaseEntitlement(EntitlementManager.MANAGEMENT);
 TestUtils.saveAndFlush(server);
 server = (Server) reload(server);
+KickstartDataTest.setupTestConfiguration(admin);
 KickstartData k = KickstartDataTest.createKickstartWithProfile(admin);
 KickstartDataTest.addCommand(admin, k, url, --url http://cascade.sfbay.redhat.; +
 com/rhn/kickstart/ks-rhel-i386-server-5);
-- 
1.8.1.4


From a2d6170e1d9692b81a9eaba3fa6bbb5e46cb9021 Mon Sep 17 00:00:00 2001
From: Silvio Moioli smoi...@suse.de
Date: Wed, 11 Sep 2013 15:12:42 +0200
Subject: [PATCH 19/22] SystemManagerTest: do not rely on Cobbler, mock the
 connection

---
 .../redhat/rhn/manager/system/test/SystemManagerTest.java| 12 
 1 file changed, 12 insertions(+)

diff --git a/java/code/src/com/redhat/rhn/manager/system/test/SystemManagerTest.java b/java/code/src/com/redhat/rhn/manager/system/test/SystemManagerTest.java
index 956d77e..ea745ec 100644
--- a/java/code/src/com/redhat/rhn/manager/system/test/SystemManagerTest.java
+++ b/java/code/src/com/redhat/rhn/manager/system/test/SystemManagerTest.java
@@ -14,6 +14,7 @@
  */
 package com.redhat.rhn.manager.system.test;
 
+import com.redhat.rhn.common.conf.Config;
 import com.redhat.rhn.common.conf.ConfigDefaults;
 import com.redhat.rhn.common.db.datasource.DataResult;
 import com.redhat.rhn.common.db.datasource.ModeFactory;
@@ -66,6 +67,8

Re: [Spacewalk-devel] [PATCH] build rhncfg on openSUSE

2011-04-15 Thread Michael Calmer
Hi,

Am Freitag, 8. April 2011, 14:57:56 schrieb Michael Calmer:
 Hi,
 
 here is the patch for rhncfg.
 
 0007-build-rhncfg-on-SUSE.patch:
 - only some specfile modifications

I splitted this into seperate patches. One SUSE specific and one general one
like you suggested. 

-- 
Regards,

Michael Calmer

--
Michael Calmer
SUSE LINUX Products GmbH, Maxfeldstr. 5, D-90409 Nuernberg
T: +49 (0) 911 74053 0
F: +49 (0) 911 74053575  - e-mail: michael.cal...@suse.com
--
SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg)
From b31b81520f06693b299f962eb20bec4c4bd7d01a Mon Sep 17 00:00:00 2001
From: Michael Calmer m...@suse.de
Date: Thu, 14 Apr 2011 18:13:25 +0200
Subject: [PATCH 05/13] build rhncfg build on SUSE

- provide on SUSE missing directories
---
 client/tools/rhncfg/rhncfg.spec |8 
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/client/tools/rhncfg/rhncfg.spec b/client/tools/rhncfg/rhncfg.spec
index 43384e6..f760038 100644
--- a/client/tools/rhncfg/rhncfg.spec
+++ b/client/tools/rhncfg/rhncfg.spec
@@ -17,7 +17,12 @@ BuildRequires: python
 Requires: python
 Requires: rhnlib = 2.5.32
 Requires: rhn-client-tools
+%if 0%{?suse_version}
+# provide rhn directories and no selinux on suse
+BuildRequires: rhn-client-tools
+%else
 Requires: libselinux-python
+%endif
 
 %description 
 The base libraries and functions needed by all rhncfg-* packages.
@@ -68,6 +73,9 @@ rm -rf $RPM_BUILD_ROOT
 
 %files
 %defattr(-,root,root,-)
+%if 0%{?suse_version}
+%dir %{_sharedstatedir}
+%endif
 %{rhnroot}/config_common
 %{_sharedstatedir}/rhncfg/backups
 %doc LICENSE PYTHON-LICENSES.txt
-- 
1.7.3.4

From 73cb7d7a4d15ddf533d537f3ec3bcfe016a88d3d Mon Sep 17 00:00:00 2001
From: Michael Calmer m...@suse.de
Date: Thu, 14 Apr 2011 18:24:47 +0200
Subject: [PATCH 06/13] add missing directories to filelist

---
 client/tools/rhncfg/rhncfg.spec |3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/client/tools/rhncfg/rhncfg.spec b/client/tools/rhncfg/rhncfg.spec
index f760038..0d55a8b 100644
--- a/client/tools/rhncfg/rhncfg.spec
+++ b/client/tools/rhncfg/rhncfg.spec
@@ -76,6 +76,7 @@ rm -rf $RPM_BUILD_ROOT
 %if 0%{?suse_version}
 %dir %{_sharedstatedir}
 %endif
+%dir %{_sharedstatedir}/rhncfg
 %{rhnroot}/config_common
 %{_sharedstatedir}/rhncfg/backups
 %doc LICENSE PYTHON-LICENSES.txt
@@ -96,7 +97,7 @@ rm -rf $RPM_BUILD_ROOT
 
 %files actions
 %defattr(-,root,root,-)
-%{rhnroot}/actions/*
+%{rhnroot}/actions
 %{_bindir}/rhn-actions-control
 %config(noreplace) %{client_caps_dir}/*
 %{_mandir}/man8/rhn-actions-control.8*
-- 
1.7.3.4

___
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel

Re: [Spacewalk-devel] [PATCH] updateinfo to Errata import in spacewalk-repo-sync

2011-03-10 Thread Michael Calmer
Hi,

Am Mittwoch, 9. März 2011, 11:29:45 schrieb Jan Pazdziora:
 On Mon, Mar 07, 2011 at 02:28:48PM +0100, Michael Calmer wrote:
[...] 
 when running git am, I get the following whitespace-related warnings.
 Could you please polish the patch to get rid of them?

Sure, I will work on all the issues as soon as time permits. May take some 
days. 

-- 
Regards,

Michael Calmer

--
Michael Calmer
SUSE LINUX Products GmbH, Maxfeldstr. 5, D-90409 Nuernberg
T: +49 (0) 911 74053 0
F: +49 (0) 911 74053575  - e-mail: michael.cal...@suse.com
--
SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg)

___
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel


Re: [Spacewalk-devel] [PATCH] SUSE/AutoYaST Support

2011-03-10 Thread Uwe Gansert
on Thursday 10 March 2011 Jan Pazdziora wrote:

 we hit the
 
   You are not authorized to access bug #674344.
 
 for bnc#674344 here.
 
 As the patch is trivial, I'm leaning towards dropping the bnc number
 from the commit message, so that you don't have to go through the
 trouble of creating Red Hat bugzilla for three line code addition.
 
 Is that OKay?

yes, of course that's okay

 Or do you expect the bnc#674344 to go public any
 time soon, so we should wait and commit with the bnc#674344 in the
 commit message?

I hope we have that public in the future but I would not suggest to wait for 
it.
It's okay to simply drop the bnc#

-- 
ciao, Uwe Gansert

Uwe Gansert
SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg)
Business: http://www.suse.de/~ug

___
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel


Re: [Spacewalk-devel] [PATCH] Synchronization to Software Profiles

2011-07-29 Thread Johannes Renner
On 07/29/2011 04:33 PM, Cliff Perry wrote:
 On 07/29/2011 09:55 AM, Johannes Renner wrote:
 Hello,

 I fixed a subtle bug in the spacewalk web UI that caused the scheduling
 of a system's synchronization to a software profile to not work anymore.
 The patch in the attachment should fix the problem.
 
 Good catch. Do you know if there is a bugzilla (Satellite or Spacewalk or 
 Manager) which reported
 this issue?
 
 Thanks,
 Cliff

I do not know about a bugzilla item on the redhat bugzilla and I couldn't find
any during a quick search. There is one on the bugzilla at novell, but this is
unfortunately not open to the public. Shall I create one on redhat.bugzilla.com?

Greetings,
Johannes


 For reproducing the problem first go to Systems and select a system. Then
 go to Software -  Packages -  Profiles, create a profile, compare to it
 and try to sync.

 Thank you,
 Johannes

-- 
SUSE LINUX Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 16746 (AG Nürnberg)

___
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel


Re: [Spacewalk-devel] [PATCH] fix display of static snippets

2011-12-01 Thread Uwe Gansert

On 01.12.2011 17:08, Jan Pazdziora wrote:


the read only snippets in the web ui need HTML/XML escaping.
Especially AutoYaST XML snippets tend to be displayed wrong in the
UI without escaping


Shouldn't we rather do this in the .jsp?



you mean
c:out value=${data} escapeXml=true/
in the jsp?


patch attached


--
ciao, Uwe Gansert

SUSE LINUX Products GmbH, HRB 16746 (AG Nürnberg)
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer
Home: http://www.suse.de/~ug - Blog: http://suse.gansert.net
diff --git a/java/code/webapp/WEB-INF/pages/kickstart/cobbler/snippetview.jsp b/java/code/webapp/WEB-INF/pages/kickstart/cobbler/snippetview.jsp
index c10c393..abe3293 100644
--- a/java/code/webapp/WEB-INF/pages/kickstart/cobbler/snippetview.jsp
+++ b/java/code/webapp/WEB-INF/pages/kickstart/cobbler/snippetview.jsp
@@ -54,7 +54,7 @@
 bean:message key=snippetcreate.jsp.contents/
 /th
 td
-   			pre  class=file-display${data}/pre
+   			pre  class=file-displayc:out value=${data} escapeXml=true//pre
/td
 /tr
 /table
___
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel

Re: [Spacewalk-devel] [PATCH] Fix query to determine available config channels in SSM

2011-12-06 Thread Johannes Renner
On 12/05/2011 06:53 PM, Michael Mraka wrote:
 Hi Johannes,
 
 although Tomas commited your patch neither original version nor yours
 are correct.
 
 a) Select from rhnSet was not restricted to user so it might interfere
 with other users SSM servers.
 
 b) Two servers in SSM and three channels:
  server1 subscribed to config1 and config2
  server2 is subscribed only to config1
  (no server subscribed to config3)
 query returns only config3 while it should have return config2, config3. 
 
 So I went ahead and rewrote queries completely, please check whether
 they work for you. (Commits a0ac26914ef0c80202dc0d707966ec34f523053e and
 d50e60bc201b11c7b23c7f7eb06f6a58ee593fb0)

Yes, that's right, thanks for the investigation. I tested your new queries
and they seem to do the right thing now, finally.

Thank you,
Johannes

-- 
SUSE LINUX Products GmbH, HRB 16746 (AG Nürnberg)
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer

___
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel

Re: [Spacewalk-devel] [PATCH] WebUI HTTP proxy validator doesn't check for special characters

2012-11-14 Thread Johannes Renner
On 11/14/2012 04:21 PM, Tomas Lestach wrote:
 On Wednesday 14 of November 2012 15:06:44 Johannes Renner wrote:
 Hello,

 I just extended the HostPortValidator class to check proxy hostnames against
 a regex defining a valid character set. It should allow letters (all
 languages), numbers, '.' and '-', but no whitespace or any special
 characters.

 See my attached patch.

 Greetings,
 Johannes
 
 Applied as: ebc61c00
 I just needed to commit 2 checkstyle fixes. :-)

Ah, sorry, I forgot to check (the style).
Thanks for pushing the commits!

-- 
SUSE LINUX Products GmbH, HRB 16746 (AG Nürnberg)
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer

___
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel


Re: [Spacewalk-devel] [PATCH] Avoid a possible concurrency issue on RhnSet update

2013-09-05 Thread Silvio Moioli
On 09/05/2013 02:26 AM, Jan Pazdziora wrote:
 Please note that this will not work -- the fact that you check content
 of some table in your session and your transaction and based on that
 run the insert operation does not mean that the other session cannot
 do exactly the same, both will find the record not there, and you will
 get the ORA-1 anyway.

Good point: actually I was thinking about that statement being the only
one in its transaction, but that's actually not the case.

I think I will do as Thomas suggested, handling exceptions better in
order to be as safe as possible when ignoring them, yet accepting
failures in this specific case. I will be back with a patch as soon as I
have tested it.

Thanks for the discussion by the way, as problems in this topic are
traditionally difficult to handle!

Regards,
-- 
Silvio Moioli
SUSE LINUX Products GmbH
Maxfeldstraße 5, 90409 Nürnberg Germany

___
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel


Re: [Spacewalk-devel] [PATCH] build rhn-custom-info on openSUSE

2011-04-15 Thread Michael Calmer
Hi,

Am Montag, 11. April 2011, 16:58:21 schrieb Miroslav Suchý:
 On 04/08/2011 02:59 PM, Michael Calmer wrote:
  Hi,
  
  here is the patch to build rhn-custom-info on openSUSE.
  
  0008-build-rhn-custom-info-on-SUSE.patch:
  - only some specfile modifications
 
  %else
 +%if 0%{?suse_version}
 +Requires: zypp-plugin-spacewalk
 +%else
 
 I would much rather prefer usage of %elif here.

Hmm, rpm do not support %elif. It does not in OBS and we looked in the 
upstream code and also there is elif not implemented.
 
 +%dir %{_datadir}/rhn
 
 Again. rhn-custom-info requires yum-rhn-plugin, which requires
 rhn-client-tools, which own this directory. So this should not be there.

Ok, here is a modified version of the patch.

-- 
Regards,

Michael Calmer

--
Michael Calmer
SUSE LINUX Products GmbH, Maxfeldstr. 5, D-90409 Nuernberg
T: +49 (0) 911 74053 0
F: +49 (0) 911 74053575  - e-mail: michael.cal...@suse.com
--
SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg)
From 9fb215881dd38f79382a889e5dfdb02b244be1ff Mon Sep 17 00:00:00 2001
From: Michael Calmer m...@suse.de
Date: Fri, 15 Apr 2011 10:24:18 +0200
Subject: [PATCH 07/13] build rhn-custom-info on SUSE

- require zypp-plugin-spacewalk
- BuildRequire rhn-client-tools for the filelist check in OBS
---
 client/tools/rhncustominfo/rhn-custom-info.spec |7 +++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/client/tools/rhncustominfo/rhn-custom-info.spec b/client/tools/rhncustominfo/rhn-custom-info.spec
index 7d2e7813..da410d8 100644
--- a/client/tools/rhncustominfo/rhn-custom-info.spec
+++ b/client/tools/rhncustominfo/rhn-custom-info.spec
@@ -21,8 +21,15 @@ Requires: rhnlib
 %if 0%{?rhel} = 5 || 0%{?fedora} = 1
 Requires: yum-rhn-plugin
 %else
+# rpm do not support elif
+%if 0%{?suse_version}
+Requires: zypp-plugin-spacewalk
+# provide rhn directories for filelist check
+BuildRequires: rhn-client-tools
+%else
 Requires: up2date
 %endif
+%endif
 
 %description 
 Allows for the setting and listing of custom key/value pairs for 
-- 
1.7.3.4

___
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel

Re: [Spacewalk-devel] [PATCH] build rhnpush on openSUSE

2011-04-15 Thread Michael Calmer
Hi,

Am Montag, 11. April 2011, 17:18:13 schrieb Miroslav Suchý:
 On 04/08/2011 03:01 PM, Michael Calmer wrote:
  Hi,
  
  here is the patch to build rhnpush on openSUSE.
  
  0009-build-rhnpush-on-SUSE.patch:
  - only some specfile modifications
 
 Applied only first part. And next time I would to see instead of
 - modify the specfile
 some better explanation why this is done. Well I from first line I know
 that it is because Suse build, but why? Do you receive some error in
 OBS. Do you get some Traceback. Or is it some kind of policy (link)?...
 
 The rest is as in previous commits. Directories are already owned by
 rhn-client-tools.

Here is the patch for the missing filelist issue with a short explanation
why we BuildRequire rhn-client-tools

-- 
Regards,

Michael Calmer

--
Michael Calmer
SUSE LINUX Products GmbH, Maxfeldstr. 5, D-90409 Nuernberg
T: +49 (0) 911 74053 0
F: +49 (0) 911 74053575  - e-mail: michael.cal...@suse.com
--
SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg)
From 7377dc046ff4a1bb2ad4eb480e5f0ba8ff40ccb6 Mon Sep 17 00:00:00 2001
From: Michael Calmer m...@suse.de
Date: Fri, 15 Apr 2011 10:30:07 +0200
Subject: [PATCH 08/13] build rhnpush on SUSE

- BuildRequire rhn-client-tools to provide rhn directories for the
  filelist check in OBS
---
 client/tools/rhnpush/rhnpush.spec |4 
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/client/tools/rhnpush/rhnpush.spec b/client/tools/rhnpush/rhnpush.spec
index 3d68847..220608c 100644
--- a/client/tools/rhnpush/rhnpush.spec
+++ b/client/tools/rhnpush/rhnpush.spec
@@ -18,6 +18,10 @@ Requires:  up2date
 %else
 Requires:  rhn-client-tools
 %endif
+%if 0%{?suse_version}
+# provides rhn directories for filelist check in OBS
+BuildRequires:  rhn-client-tools
+%endif
 BuildRequires: docbook-utils, gettext
 BuildRequires: python-devel
 
-- 
1.7.3.4

___
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel

[Spacewalk-devel] [PATCH] VirtualizationEntitlementsManagerTest fixes

2013-09-09 Thread Silvio Moioli
I attached two patches:

 0001 - avoid failure if virtualization channels/packages are not present;
 0002 - use Session.disconnect() instead of session.clear() after an
expected ROLLBACK to properly resume Hibernate work in the test method,
as clear() was not enough, at least in our environment, to keep Postgres
from failing on subsequent statements.

Regards,
-- 
Silvio Moioli
SUSE LINUX Products GmbH
Maxfeldstraße 5, 90409 Nürnberg Germany

From f0b8fd871e09bf4300b2d2a7f5166965b77ea7cf Mon Sep 17 00:00:00 2001
From: Silvio Moioli smoi...@suse.de
Date: Thu, 5 Sep 2013 11:58:35 +0200
Subject: [PATCH 2/2] VirtualizationEntitlementsManagerTest: do not fail after
 rollback

Tests on Postgres failed because it did not accept statements after an expected ROLLBACK. Now connection is disposed properly.
---
 .../rhn/manager/system/test/VirtualizationEntitlementsManagerTest.java  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/java/code/src/com/redhat/rhn/manager/system/test/VirtualizationEntitlementsManagerTest.java b/java/code/src/com/redhat/rhn/manager/system/test/VirtualizationEntitlementsManagerTest.java
index 6a02efe..031deed 100644
--- a/java/code/src/com/redhat/rhn/manager/system/test/VirtualizationEntitlementsManagerTest.java
+++ b/java/code/src/com/redhat/rhn/manager/system/test/VirtualizationEntitlementsManagerTest.java
@@ -162,7 +162,7 @@ public class VirtualizationEntitlementsManagerTest extends BaseTestCaseWithUser
 }
 assertEquals(1, VirtualizationEntitlementsManager.getInstance().
 convertToFlex(sids, group.getId(), user).size());
-HibernateFactory.getSession().clear();
+HibernateFactory.getSession().disconnect();
 l = VirtualizationEntitlementsManager.getInstance().listFlexGuests(user);
 assertTrue(!l.isEmpty());
 assertEquals(1, l.size());
-- 
1.8.1.4


From 7b7b2a28ed9bf4181e74d2768d981ce1a34f320d Mon Sep 17 00:00:00 2001
From: Silvio Moioli smoi...@suse.de
Date: Thu, 5 Sep 2013 11:52:58 +0200
Subject: [PATCH 1/2] VirtualizationEntitlementsManagerTest: do not assume a
 virtualization channel exists

---
 .../rhn/manager/system/test/VirtualizationEntitlementsManagerTest.java  | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/java/code/src/com/redhat/rhn/manager/system/test/VirtualizationEntitlementsManagerTest.java b/java/code/src/com/redhat/rhn/manager/system/test/VirtualizationEntitlementsManagerTest.java
index f12bbde..6a02efe 100644
--- a/java/code/src/com/redhat/rhn/manager/system/test/VirtualizationEntitlementsManagerTest.java
+++ b/java/code/src/com/redhat/rhn/manager/system/test/VirtualizationEntitlementsManagerTest.java
@@ -40,6 +40,7 @@ import com.redhat.rhn.manager.system.ServerGroupManager;
 import com.redhat.rhn.manager.system.SystemManager;
 import com.redhat.rhn.manager.system.VirtualizationEntitlementsManager;
 import com.redhat.rhn.testing.BaseTestCaseWithUser;
+import com.redhat.rhn.testing.ChannelTestUtils;
 import com.redhat.rhn.testing.UserTestUtils;
 
 import java.util.Collection;
@@ -77,6 +78,7 @@ public class VirtualizationEntitlementsManagerTest extends BaseTestCaseWithUser
 Server host = s.getVirtualInstance().getHostSystem();
 Long hostId = host.getId();
 assertNotNull(host);
+ChannelTestUtils.setupBaseChannelForVirtualization(user, host.getBaseChannel());
 SystemManager.entitleServer(host, EntitlementManager.VIRTUALIZATION);
 
 l = VirtualizationEntitlementsManager.getInstance().
-- 
1.8.1.4


___
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel

[Spacewalk-devel] [PATCH] Hide the 'delete note' link on creation of system notes

2011-03-01 Thread Johannes Renner
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hello,

Attached is a small patch for the jsp page that is used for editing
system notes. It hides the delete note link when a system note is
currently being created. This is done by including the toolbar within
the c:choose element. Clicking this link during the creation of a
new note will otherwise lead to internal server error (NPE), because
(of course) the nid is still null.

Regards,
Johannes Renner

- -- 
SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg)
-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.15 (GNU/Linux)
Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org/

iQEcBAEBAgAGBQJNbMnuAAoJEGYafiwbDR5pQVAH/i2Wrx2jaO3ZvQBTWKSqxVkX
rlCIJrAXEXrYyBF/IkPgBCZ9BZ26A4sQo494Sb8stTAZZ+WdLsERgVqOoa3bSxBw
5+qOnogY581FPuEn/3OnP0hQ+JV8tktUb33L4qw7pJCtz0TTEEs3uwZt8XZ5/a/I
nH66i/Yil4DebmytXDZrvcwFmWCdCeIcDSxpERXHzwT64OcAfCIM/Aes4Lwq/J8l
KgXyqpV3y2zgA+ID1m2gsSQ7waKWVfLDdZt90nB0Fv1GpScmFBHB6d4yCkY31ER/
xJ9vDuID3c/Fq8St1ffh3sReCWTZzIeFX5E9FNBlvJfXAJCcJPzZHa31avTsDu4=
=MqUC
-END PGP SIGNATURE-
From ea324e8b7b6907f24d010b7b4439bc1e00e8f8bf Mon Sep 17 00:00:00 2001
From: Johannes Renner jren...@suse.de
Date: Thu, 17 Feb 2011 11:20:52 +0100
Subject: [PATCH] do not show delete link on creation of notes (bnc#672090)

---
 .../webapp/WEB-INF/pages/systems/sdc/note_edit.jsp |   15 ---
 1 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/java/code/webapp/WEB-INF/pages/systems/sdc/note_edit.jsp b/java/code/webapp/WEB-INF/pages/systems/sdc/note_edit.jsp
index 408780d..87d60f4 100644
--- a/java/code/webapp/WEB-INF/pages/systems/sdc/note_edit.jsp
+++ b/java/code/webapp/WEB-INF/pages/systems/sdc/note_edit.jsp
@@ -9,18 +9,19 @@
 
 %@ include file=/WEB-INF/pages/common/fragments/systems/system-header.jspf %
 
-rhn:toolbar base=h2 img=/img/rhn-icon-note.gif
-   deletionUrl=/rhn/systems/details/DeleteNote.do?sid=${system.id}nid=${n.id}
-   deletionType=note
-  
-  bean:message key=sdc.details.notes.header/
-/rhn:toolbar
-
 c:choose
   c:when test=${empty param.nid}
+rhn:toolbar base=h2 img=/img/rhn-icon-note.gif
+  bean:message key=sdc.details.notes.header/
+/rhn:toolbar
 c:set var=urlParam scope=request value=sid=${system.id}/
   /c:when
   c:otherwise
+rhn:toolbar base=h2 img=/img/rhn-icon-note.gif
+deletionUrl=/rhn/systems/details/DeleteNote.do?sid=${system.id}nid=${n.id}
+deletionType=note
+  bean:message key=sdc.details.notes.header/
+/rhn:toolbar
 c:set var=urlParam scope=request value=sid=${system.id}nid=${n.id}/
   /c:otherwise
 /c:choose
-- 
1.7.1



hide-delete-link-on-creation-of-notes.patch.sig
Description: PGP signature
___
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel

[Spacewalk-devel] [PATCH] Do not show success message when passwords don't match

2011-03-28 Thread Johannes Renner
Hello,

I found it to be confusing, that if you go to the account preferences
page of a user (/rhn/account/UserDetails.do) and change the user's
confirm password only (e.g. remove one of the dots), the message when
you hit the 'Update' button states:

'User information updated'

I'm not 100% sure about the expected behavior there, but I think if
both passwords don't match we actually shouldn't display a success
message (even if one of the passwords is the placeholder). The attached
patch refines the class UserEditActionHelper and adds the password
mismatch error as soon as both passwords don't match.

Greetings,
Johannes

-- 
SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg)
From 5c07c2b9824ff125a0d5f66426b3fe996d94a213 Mon Sep 17 00:00:00 2001
From: Johannes Renner jren...@suse.de
Date: Mon, 28 Mar 2011 13:45:25 +0200
Subject: [PATCH] Do not show success message when passwords don't match

---
 .../frontend/action/user/UserEditActionHelper.java |   18 ++
 1 files changed, 10 insertions(+), 8 deletions(-)

diff --git a/java/code/src/com/redhat/rhn/frontend/action/user/UserEditActionHelper.java b/java/code/src/com/redhat/rhn/frontend/action/user/UserEditActionHelper.java
index 68f6ce0..c455642 100644
--- a/java/code/src/com/redhat/rhn/frontend/action/user/UserEditActionHelper.java
+++ b/java/code/src/com/redhat/rhn/frontend/action/user/UserEditActionHelper.java
@@ -40,16 +40,18 @@ public abstract class UserEditActionHelper extends RhnAction {
 //get validation errors
 ActionErrors errors = RhnValidationHelper.validateDynaActionForm(this, form);
 
-//Make sure password and passwordConfirm are equal
+//Add an error in case of password mismatch
+String pw = (String)form.get(UserActionHelper.DESIRED_PASS);
+String conf = (String)form.get(UserActionHelper.DESIRED_PASS_CONFIRM);
+if (!pw.equals(conf)) {
+errors.add(ActionMessages.GLOBAL_MESSAGE,
+new ActionMessage(error.password_mismatch));
+}
+
+//Make sure password is not the placeholder
 if (!UserActionHelper.PLACEHOLDER_PASSWORD.equals(
 form.get(UserActionHelper.DESIRED_PASS))) {
-String pw = (String)form.get(UserActionHelper.DESIRED_PASS);
-String conf = (String)form.get(UserActionHelper.DESIRED_PASS_CONFIRM);
-if (!pw.equals(conf)) {
-errors.add(ActionMessages.GLOBAL_MESSAGE,
-new ActionMessage(error.password_mismatch));
-}
-else if (errors.isEmpty()) {
+if (errors.isEmpty()) {
 //Set the password only if there are no errors at all
 targetUser.setPassword(pw);
 }
-- 
1.7.3.4

___
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel

[Spacewalk-devel] [PATCH] build rhncfg on openSUSE

2011-04-08 Thread Michael Calmer
Hi,

here is the patch for rhncfg.

0007-build-rhncfg-on-SUSE.patch:
- only some specfile modifications

-- 
Regards,

Michael Calmer

--
Michael Calmer
SUSE LINUX Products GmbH, Maxfeldstr. 5, D-90409 Nuernberg
T: +49 (0) 911 74053 0
F: +49 (0) 911 74053575  - e-mail: michael.cal...@suse.com
--
SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg)
From e121739043aef3810620b7a5a3d0c8d4206e7bea Mon Sep 17 00:00:00 2001
From: Michael Calmer m...@suse.de
Date: Mon, 4 Apr 2011 15:53:50 +0200
Subject: [PATCH 07/17] build rhncfg on SUSE

- modify specfile
---
 client/tools/rhncfg/rhncfg.spec |   12 +++-
 1 files changed, 11 insertions(+), 1 deletions(-)

diff --git a/client/tools/rhncfg/rhncfg.spec b/client/tools/rhncfg/rhncfg.spec
index cd92e13..4965430 100644
--- a/client/tools/rhncfg/rhncfg.spec
+++ b/client/tools/rhncfg/rhncfg.spec
@@ -21,8 +21,10 @@ Requires: rhnlib = 2.5.32
 Requires: up2date
 %else
 Requires: rhn-client-tools
+%if 0%{?rhel}
 Requires: libselinux-python
 %endif
+%endif
 
 %description 
 The base libraries and functions needed by all rhncfg-* packages.
@@ -73,12 +75,17 @@ rm -rf $RPM_BUILD_ROOT
 
 %files
 %defattr(-,root,root,-)
+%dir %{rhnroot}
+%dir %{_sharedstatedir}
+%dir %{_sharedstatedir}/rhncfg
+%dir %{_sharedstatedir}/rhncfg/backups
 %{rhnroot}/config_common
 %{_sharedstatedir}/rhncfg/backups
 %doc LICENSE PYTHON-LICENSES.txt
 
 %files client
 %defattr(-,root,root,-)
+%dir %{rhnconf}
 %{rhnroot}/config_client
 %{_bindir}/rhncfg-client
 %attr(644,root,root) %config(noreplace) %{rhnconf}/rhncfg-client.conf
@@ -86,6 +93,7 @@ rm -rf $RPM_BUILD_ROOT
 
 %files management
 %defattr(-,root,root,-)
+%dir %{rhnconf}
 %{rhnroot}/config_management
 %{_bindir}/rhncfg-manager
 %attr(644,root,root) %config(noreplace) %{rhnconf}/rhncfg-manager.conf
@@ -93,7 +101,9 @@ rm -rf $RPM_BUILD_ROOT
 
 %files actions
 %defattr(-,root,root,-)
-%{rhnroot}/actions/*
+%dir %{rhnconf}
+%dir %{client_caps_dir}
+%{rhnroot}/actions
 %{_bindir}/rhn-actions-control
 %config(noreplace) %{client_caps_dir}/*
 %{_mandir}/man8/rhn-actions-control.8*
-- 
1.7.3.4

___
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel

Re: [Spacewalk-devel] [PATCH] build rhn-client-tools on openSUSE

2011-04-08 Thread Michael Calmer
Hi,

Am Freitag, 8. April 2011, 14:49:30 schrieb Michael Calmer:
 Hi,
 
 
 0002-enhance-getOSVersionAndRelease-to-find-SUSE-distribu.patch:
 Add code to make _getOSVerionAndRelease work on SUSE

This patch has a little typo. I have attached a fixed version.
Sorry :-)

-- 
Regards,

Michael Calmer

--
Michael Calmer
SUSE LINUX Products GmbH, Maxfeldstr. 5, D-90409 Nuernberg
T: +49 (0) 911 74053 0
F: +49 (0) 911 74053575  - e-mail: michael.cal...@suse.com
--
SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg)
From 4ea53dfc537e92fd870cd414fc901edb83f7d288 Mon Sep 17 00:00:00 2001
From: Michael Calmer m...@suse.de
Date: Mon, 4 Apr 2011 11:12:04 +0200
Subject: [PATCH 02/17] enhance getOSVersionAndRelease to find SUSE distributions

---
 .../src/up2date_client/up2dateUtils.py |   16 +++-
 1 files changed, 11 insertions(+), 5 deletions(-)

diff --git a/client/rhel/rhn-client-tools/src/up2date_client/up2dateUtils.py b/client/rhel/rhn-client-tools/src/up2date_client/up2dateUtils.py
index fc33ad1..f7d064f 100644
--- a/client/rhel/rhn-client-tools/src/up2date_client/up2dateUtils.py
+++ b/client/rhel/rhn-client-tools/src/up2date_client/up2dateUtils.py
@@ -32,11 +32,17 @@ else:
 osVersionRelease = (h['name'], h['version'], h['release'])
 return osVersionRelease
 else:
-raise up2dateErrors.RpmError(
-Could not determine what version of Red Hat Linux you \
-are running.\nIf you get this error, try running \n\n\
-\t\trpm --rebuilddb\n\n)
-
+for h in ts.dbMatch('Providename', distribution-release):
+osVersionRelease = (h['name'], h['version'], h['release'])
+# zypper requires a exclusive lock on the rpmdb. So we need
+# to close it here.
+ts.ts.closeDB()
+return osVersionRelease
+else:
+raise up2dateErrors.RpmError(
+Could not determine what version of Red Hat Linux you \
+are running.\nIf you get this error, try running \n\n\
+\t\trpm --rebuilddb\n\n)
 
 def getVersion():
 '''
-- 
1.7.3.4

___
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel

[Spacewalk-devel] [PATCH] parse V4 RSA/SHA gpg signature keyids correctly from RPM

2011-11-02 Thread Michael Calmer
Hi,

It seems that packages from packman are signed with V4 RSA/SHA which result in 
wrong keyids while importing packages.

Example RPM:

  http://packman.links2linux.de/download/yad/1024510/yad-0.15.0-1.1.x86_64.rpm

spacewalk/common/rhn_rpm.py _extract_signatures() find keyid:

 05024ea4a264000a

rpm -qpi ... say:
 warning: yad-0.15.0-1.1.x86_64.rpm: Header V4 RSA/SHA1 signature: NOKEY, 
  key ID 1abd1afb
 [...]
 Signature   : RSA/SHA1, Mo 24 Okt 2011 01:25:24 CEST, Key ID 45a1d0671abd1afb

A patch is attached

-- 
Regards

Michael Calmer

--
Michael Calmer
SUSE LINUX Products GmbH, Maxfeldstr. 5, D-90409 Nuernberg
T: +49 (0) 911 74053 0
F: +49 (0) 911 74053575  - e-mail: michael.cal...@suse.com
--
SUSE LINUX Products GmbH, GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer
HRB 16746 (AG Nürnberg)
From c74ee56448aace7ed8be8ae2a00c8f27ed901622 Mon Sep 17 00:00:00 2001
From: Michael Calmer m...@suse.de
Date: Wed, 26 Oct 2011 17:19:27 +0200
Subject: [PATCH] support V4 RSA signatures

---
 backend/common/rhn_rpm.py |4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/backend/common/rhn_rpm.py b/backend/common/rhn_rpm.py
index 42483f3..de11246 100644
--- a/backend/common/rhn_rpm.py
+++ b/backend/common/rhn_rpm.py
@@ -112,8 +112,10 @@ class RPM_Header:
 key_id = ret[9:17]
 elif ret_len = 72: # V4 DSA signature
 key_id = ret[18:26]
-else: # ret_len = 536 # V3 RSA/SHA256 signature
+elif ret_len = 536: # V3 RSA/SHA256 signature
 key_id = ret[10:18]
+else: # ret_len = 543 # V4 RSA/SHA signature
+key_id = ret[19:27]
 
 key_id_len = len(key_id)
 format = %dB % key_id_len
-- 
1.7.3.4

___
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel

[Spacewalk-devel] [PATCH] Fix query to determine available config channels in SSM

2011-11-29 Thread Johannes Renner
Hello,

It looks like that the following query is not actually doing what it should do:

config_queries.xml: ssm_channels_for_subscribe_choose

How to see that: Put two systems in the SSM where only one of those is 
subscribed
to a certain config channel. This config channel should appear in the SSM as an
option to subscribe to, because not ALL of the systems in SSM are already 
subscribed.
What happens is, that as soon as one of the systems in SSM is subscribed to a 
certain
channel, this channel does not appear as an available config channel in SSM 
anymore.

I found that the attached patch fixes the issue: While replacing = with is 
is
obviously correct, I also found, that as soon as SCC.server_id is null (in the 
last
subquery) the SCC.config_channel_id is also null. Therefore the proposed fix.
Further, since the next query in that file is just the negation of this one, it 
would
probably also need a fix.

Thanks,
Johannes

-- 
SUSE LINUX Products GmbH, HRB 16746 (AG Nürnberg)
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer
From 8493f940c7b6fb27e4f25f211865890fcf71f0a3 Mon Sep 17 00:00:00 2001
From: Johannes Renner jren...@suse.de
Date: Tue, 29 Nov 2011 16:17:34 +0100
Subject: [PATCH] Fix query to determine config channels in SSM

---
 .../common/db/datasource/xml/config_queries.xml|6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/java/code/src/com/redhat/rhn/common/db/datasource/xml/config_queries.xml b/java/code/src/com/redhat/rhn/common/db/datasource/xml/config_queries.xml
index 1484317..d11bd22 100644
--- a/java/code/src/com/redhat/rhn/common/db/datasource/xml/config_queries.xml
+++ b/java/code/src/com/redhat/rhn/common/db/datasource/xml/config_queries.xml
@@ -2096,8 +2096,8 @@ SELECT  CC.id, CC.name
  FROM rhnSet RS LEFT OUTER JOIN rhnServerConfigChannel SCC
  ON RS.element = SCC.server_id
 WHERE RS.label = 'system_list'
-AND SCC.config_channel_id = XXX.config_channel_id
-AND SCC.server_id = null) )
+AND SCC.config_channel_id is null
+AND SCC.server_id is null) )
 ORDER BY UPPER(CC.name)
   /query
   elaborator name=ssm_channel_elab /
@@ -2126,7 +2126,7 @@ SELECT  CC.id, CC.name
 FROM rhnSet RS LEFT OUTER JOIN rhnServerConfigChannel SCC
 ON RS.element = SCC.server_id
WHERE RS.label = 'system_list'
-   AND SCC.config_channel_id = XXX.config_channel_id
+   AND SCC.config_channel_id is null
AND SCC.server_id is null) )
 ORDER BY UPPER(CC.name)
   /query
-- 
1.7.3.4

___
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel

[Spacewalk-devel] [PATCH] Bug about cloned channels and errata

2012-02-29 Thread Johannes Renner
Hello,

I am investigating into a bug about cloned channels and errata. This is how to
reproduce it on the UI:

1. Clone a channel that contains errata, but select clone without errata
2. Go to Channels - Manage Software Channels - Errata - Add - Add Custom 
Errata
   (or Add RedHat Errata) - Unmark the checkbox Package Assoc. if necessary
3. Choose an Erratum, clone it and confirm

Result: The cloned erratum can be found in the cloned channel as CLxxx

5. Now subscribe a system to the newly cloned channel only
6. Go to this System - Software - Errata

Result: There is two errata listed, xxx and CLxxx, but only CLxxx should 
be.
Also the table 'RhnServerNeededCache' shows even more entries where errata_id 
== null?

I found a lot of open bugs about this topic, but not exactly this one. If one 
of you
can reproduce it I could create a bug report for spacewalk, or are you aware of 
such
misbehavior already?

To me it looks like the used statement ('insert_new_cache_entries_by_packages' 
in
ErrataCache_queries.xml) is not doing the right thing. There even seems to be an
easy fix that I attached as a patch for master, which just calls a stored 
procedure
('update_needed_cache_for_channel', ErrataCache_queries.xml) instead.

Maybe someone of you who knows about this code could have a look at the issue,
I might be missing something ..

Thank you,
Johannes

-- 
SUSE LINUX Products GmbH, HRB 16746 (AG Nürnberg)
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer
From 25cac35e2f20c249dd18ba522fe112ab058acd08 Mon Sep 17 00:00:00 2001
From: Johannes Renner jren...@suse.de
Date: Wed, 29 Feb 2012 16:52:43 +0100
Subject: [PATCH] Fix bug about cloned channels and errata

---
 .../action/channel/manage/PublishErrataAction.java |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/java/code/src/com/redhat/rhn/frontend/action/channel/manage/PublishErrataAction.java b/java/code/src/com/redhat/rhn/frontend/action/channel/manage/PublishErrataAction.java
index 7a24554..226bb8a 100644
--- a/java/code/src/com/redhat/rhn/frontend/action/channel/manage/PublishErrataAction.java
+++ b/java/code/src/com/redhat/rhn/frontend/action/channel/manage/PublishErrataAction.java
@@ -97,7 +97,7 @@ public class PublishErrataAction extends RhnListAction {
 //update the errata info
 List chanList = new ArrayList();
 chanList.add(currentChan.getId());
-ErrataCacheManager.insertCacheForChannelPackagesAsync(chanList, pidList);
+ErrataCacheManager.updateCacheForChannelsAsync(chanList);
 ChannelManager.refreshWithNewestPackages(currentChan, web.errata_push);
 request.setAttribute(cid, cid);
 
-- 
1.7.7

___
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel

[Spacewalk-devel] [PATCH] fixing dead links in list

2012-04-13 Thread Michael Calmer
Hi,

I found a page with links to not existing pages.

Overview = Subscription Management = Software Channel Entitlements =
 click on a number in Systems Subscribed column

You see a page with a list of all Systems which uses this entitlement, but
if you click on the Errata or Package Number you end up in a not existing 
page.

The attached patch should bring you to the java pages.

-- 
Regards

Michael Calmer

--
Michael Calmer
SUSE LINUX Products GmbH, Maxfeldstr. 5, D-90409 Nuernberg
T: +49 (0) 911 74053 0
F: +49 (0) 911 74053575  - e-mail: michael.cal...@suse.com
--
SUSE LINUX Products GmbH, GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer
HRB 16746 (AG Nürnberg)
From d247d08ec753d7eac5ba38f8fe8bc472c4161974 Mon Sep 17 00:00:00 2001
From: Michael Calmer m...@suse.de
Date: Fri, 13 Apr 2012 16:13:28 +0200
Subject: [PATCH] change links to existing pages

---
 web/html/network/systems/system_list |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/web/html/network/systems/system_list b/web/html/network/systems/system_list
index 2e36da1..368cb9f 100644
--- a/web/html/network/systems/system_list
+++ b/web/html/network/systems/system_list
@@ -30,10 +30,10 @@
   /rhn-require
 
   column name=Errata label=total_errata align=center width=5%
-url/network/systems/details/errata_list.pxt?sid={column:id}/url
+url/rhn/systems/details/ErrataList.do?sid={column:id}/url
   /column
   column name=Packages label=outdated_packages align=center width=5%
-url/network/systems/details/packages/upgrade.pxt?sid={column:id}/url
+url/rhn/systems/details/packages/UpgradableList.do?sid={column:id}/url
   /column
   column name=System label=server_name sort_by=1 align=left width=35%
 url/rhn/systems/details/Overview.do?sid={column:id}/url
-- 
1.7.3.4



signature.asc
Description: This is a digitally signed message part.
___
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel

[Spacewalk-devel] [PATCH] Script contents not properly displayed

2012-08-14 Thread Johannes Renner
Hello,

we found out that script contents are not properly displayed in the web UI
in Systems - Events - History (it's a perl page ...).

To reproduce:

- choose a system and go to Remote Command
- type in some script contents, e.g. a b c d e f g h
- schedule the command
- go to Events and click on the one just scheduled
- in the Details you will see (for the example above):

x23212f62696e2f73680a0a61206220632064206520662020672068

which is the ASCII code for


#!/bin/sh
a b c d e f g h


The attached patch fixes the problem by converting the ASCII codes into
a string using the pack() function.

Regards,
Johannes

-- 
SUSE LINUX Products GmbH, HRB 16746 (AG Nürnberg)
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer
From b00d36ff71783dd870e67cc969a9de2f55df4221 Mon Sep 17 00:00:00 2001
From: Johannes Renner jren...@suse.de
Date: Tue, 14 Aug 2012 11:46:43 +0200
Subject: [PATCH] Convert script contents from hex to string

---
 web/modules/rhn/RHN/Server.pm |3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/web/modules/rhn/RHN/Server.pm b/web/modules/rhn/RHN/Server.pm
index 3022a09..6c12939 100644
--- a/web/modules/rhn/RHN/Server.pm
+++ b/web/modules/rhn/RHN/Server.pm
@@ -491,8 +491,9 @@ sub render {
   # sigh.  there has to be an easier way to filter out ansi control codes...
   $output-{OUTPUT} =~ s{\x1B\[(\d+[ABCDG]|[suK]|2J|(\d+;)*\d+m|=\d+[hl])}{}gism;
 
+  my $script = pack((H2)*, (substr($action-script_script, 1) =~ m/../g));
   $ret-{server_event_details} .=
-sprintf(EOQ, $run_as, $action-script_timeout || 0, PXT::HTML-htmlify_text($action-script_script));
+sprintf(EOQ, $run_as, $action-script_timeout || 0, PXT::HTML-htmlify_text($script));
 br/br/
 Run as: strong%s/strongbr/
 Timeout: strong%d/strong secondsbr/br/
-- 
1.7.7

___
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel

[Spacewalk-devel] [PATCH] Use braces for accessing composite types in PG

2012-10-31 Thread Johannes Renner
Hey,

Ok, here is the patch to make the rewritten query work with PG as well (API call
'system.listLatestUpgradablePackages'). It's actually a follow up to this 
commit:

4823565b2e634bc73010d366ff82c432630bca85

It was strange though when testing it: for most of my systems it returned really
quick (with 0 results though), but I also had one system, where the query did 
not
return at all, even after 1 hour! You might want to do some additional 
performance
testing here. There was nothing special about this specific host though, it was
even subscribed to a base channel only..

Regards,
Johannes

-- 
SUSE LINUX Products GmbH, HRB 16746 (AG Nürnberg)
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer
From f48143d211baeb4161814ae5deb537aa57642c70 Mon Sep 17 00:00:00 2001
From: Johannes Renner jren...@suse.de
Date: Wed, 31 Oct 2012 12:18:02 +0100
Subject: [PATCH] Use braces for accessing composite types in PG

---
 .../rhn/common/db/datasource/xml/Package_queries.xml   |   12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/java/code/src/com/redhat/rhn/common/db/datasource/xml/Package_queries.xml b/java/code/src/com/redhat/rhn/common/db/datasource/xml/Package_queries.xml
index 1198cef..29ab2cb 100644
--- a/java/code/src/com/redhat/rhn/common/db/datasource/xml/Package_queries.xml
+++ b/java/code/src/com/redhat/rhn/common/db/datasource/xml/Package_queries.xml
@@ -806,14 +806,14 @@ ORDER BY  UPPER(PN.name)
 mode name=system_upgradable_package_list_no_errata_info
   query params=sid
 SELECT  n.name,
-NVL(sp.evr.epoch, ' ') as from_epoch,
-NVL(sp.evr.version, ' ') as from_version,
-NVL(sp.evr.release, ' ') as from_release,
+NVL((sp.evr).epoch, ' ') as from_epoch,
+NVL((sp.evr).version, ' ') as from_version,
+NVL((sp.evr).release, ' ') as from_release,
 spa.label as from_arch,
 spa.label as arch,
-NVL(up.evr.epoch, ' ') as to_epoch,
-NVL(up.evr.version, ' ') as to_version,
-NVL(up.evr.release, ' ') as to_release,
+NVL((up.evr).epoch, ' ') as to_epoch,
+NVL((up.evr).version, ' ') as to_version,
+NVL((up.evr).release, ' ') as to_release,
 up.arch_label as to_arch,
 up.id as to_package_id
   FROM
-- 
1.7.10.4

___
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel

[Spacewalk-devel] [PATCH] Quartz SimpleTrigger mis-fire situations

2012-11-12 Thread Johannes Renner
Hello,

When scheduling many repo syncs at a time (as 'mgr-ncc-sync' does it), we 
experienced
that not all of the channels were actually getting a refresh, try it with e.g. 
~ 30.
After some research we found that this is due to the 'repeat count' parameter 
given to
the SimpleTrigger constructor in TaskoQuartzHelper. This parameter seems to 
control the
so-called 'mis-fire' behavior in case there is e.g. no threads available at the 
actual
schedule time. There is usually not many threads available in this use case, 
since repo
sync tasks trigger the generation of new repository metadata as well.

Please see [1] or [2] for more details about handling of mis-fire situations in 
quartz.
The proposal is to use default values for repeat count and repeat interval, 
which will
lead to a more reasonable behavior (MISFIRE_INSTRUCTION_FIRE_NOW).

See the attached patch for a fix.

Regards,
Johannes

[1]
http://quartz-scheduler.org/api/1.8.5/org/quartz/SimpleTrigger.html#updateAfterMisfire%28org.quartz.Calendar%29
[2] http://java.dzone.com/articles/quartz-scheduler-misfire

-- 
SUSE LINUX Products GmbH, HRB 16746 (AG Nürnberg)
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer
From e6172072966a2a7824770a48a033b064c787ac8b Mon Sep 17 00:00:00 2001
From: Johannes Renner jren...@suse.de
Date: Fri, 9 Nov 2012 11:22:50 +0100
Subject: [PATCH] Fix quartz trigger initialization repeat count

---
 java/code/src/com/redhat/rhn/taskomatic/TaskoQuartzHelper.java |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/java/code/src/com/redhat/rhn/taskomatic/TaskoQuartzHelper.java b/java/code/src/com/redhat/rhn/taskomatic/TaskoQuartzHelper.java
index 191a5a9..864a7b8 100644
--- a/java/code/src/com/redhat/rhn/taskomatic/TaskoQuartzHelper.java
+++ b/java/code/src/com/redhat/rhn/taskomatic/TaskoQuartzHelper.java
@@ -67,7 +67,7 @@ public class TaskoQuartzHelper {
 Trigger trigger = null;
 if (isCronExpressionEmpty(schedule.getCronExpr())) {
 trigger = new SimpleTrigger(schedule.getJobLabel(),
-getGroupName(schedule.getOrgId()), 1, 1);
+getGroupName(schedule.getOrgId()));
 }
 else {
 try {
-- 
1.7.10.4

___
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel

[Spacewalk-devel] [PATCH] TestUtils: use the same temporary filename for the same file

2013-09-12 Thread Silvio Moioli
Hi,

The attached patch fixes a previous contribution of mine to
transparently get resources either from the filesystem or from a jar
file. When accessing a file from a jar that files gets decompressed in a
temporary location which name was generated at random for each call.
This however did not work with all the tests - NavTest.testCache(), for
example, expected a file name not to change between calls. The proposed
implementation will stick to the same temporary file name as long as the
requested file name (and path) stays the same, thereby fixing NavTest
when run from a jar.

Regards,
-- 
Silvio Moioli
SUSE LINUX Products GmbH
Maxfeldstraße 5, 90409 Nürnberg Germany


From cc7e859551be0997f7d45ff6ad3257d91a15d4a6 Mon Sep 17 00:00:00 2001
From: Silvio Moioli smoi...@suse.de
Date: Wed, 11 Sep 2013 15:48:57 +0200
Subject: [PATCH 21/22] TestUtils: use the same temporary filename when the
 same file is requested

Fixes NavTest.testCache() when running from a jar.
---
 java/code/src/com/redhat/rhn/testing/TestUtils.java | 6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/java/code/src/com/redhat/rhn/testing/TestUtils.java b/java/code/src/com/redhat/rhn/testing/TestUtils.java
index 24a8250..0d83f40 100644
--- a/java/code/src/com/redhat/rhn/testing/TestUtils.java
+++ b/java/code/src/com/redhat/rhn/testing/TestUtils.java
@@ -68,6 +68,9 @@ import java.util.Map;
 
 public class TestUtils {
 
+/** Prefix for temporary file names created by this class. */
+private static String filePrefix = TestUtils.randomString();
+
 // static class
 private TestUtils() { }
 
@@ -93,8 +96,7 @@ public class TestUtils {
 URL ret = clazz.getResource(path);
 
 if (ret.toString().contains(!)) { // file is from an archive
-String tempPath =
-/tmp/ + System.currentTimeMillis() + TestUtils.randomString();
+String tempPath = /tmp/ + filePrefix + ret.hashCode();
 InputStream input = clazz.getResourceAsStream(path);
 
 OutputStream output = new FileOutputStream(tempPath);
-- 
1.8.1.4



___
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel

[Spacewalk-devel] [PATCH] Proposal to remove filesystem dependencies from ConfigTest

2013-10-01 Thread Silvio Moioli
Hi,

ConfigTest at the moment relies on some config files to be in a fixed
filesystem path (/usr/share/rhn/unit-tests/conf). This can be
inconvenient because, among other things, writing to /usr requires root
access.

The attached patch proposes a self-contained solution where those files
are taken from either the classes directory or the jar file, copied in
/tmp and read from there.

As there are other possible solutions  I wanted to submit this for
review here before pushing it.

Thanks,
-- 
Silvio Moioli
SUSE LINUX Products GmbH
Maxfeldstraße 5, 90409 Nürnberg Germany
From f027ba5978cb78f786d344d686172fd0756c835b Mon Sep 17 00:00:00 2001
From: Silvio Moioli smoi...@suse.de
Date: Mon, 30 Sep 2013 16:29:29 +0200
Subject: [PATCH] ConfigTest: do not rely on hardcoded paths, preexisting files

---
 .../redhat/rhn/common/conf/test/ConfigTest.java| 25 +++---
 1 file changed, 22 insertions(+), 3 deletions(-)

diff --git a/java/code/src/com/redhat/rhn/common/conf/test/ConfigTest.java b/java/code/src/com/redhat/rhn/common/conf/test/ConfigTest.java
index 310964d..ab461a9 100644
--- a/java/code/src/com/redhat/rhn/common/conf/test/ConfigTest.java
+++ b/java/code/src/com/redhat/rhn/common/conf/test/ConfigTest.java
@@ -19,19 +19,38 @@ import com.redhat.rhn.common.conf.Config;
 import com.redhat.rhn.testing.RhnBaseTestCase;
 import com.redhat.rhn.testing.TestUtils;
 
+import java.io.File;
 import java.util.Iterator;
 import java.util.Properties;
 
+import org.apache.commons.io.FileUtils;
+
 public class ConfigTest extends RhnBaseTestCase {
 static final String TEST_KEY = user;
 static final String TEST_VALUE = newval;
-static final String TEST_CONF_LOCATION = /usr/share/rhn/unit-tests/conf;
 private Config c;
 
 public void setUp() throws Exception {
 c = new Config();
-c.addPath(TEST_CONF_LOCATION + /default);
-c.addPath(TEST_CONF_LOCATION);
+
+// create test config path
+String confPath = /tmp/ + TestUtils.randomString() + /conf;
+String defaultPath = confPath + /default;
+new File(defaultPath).mkdirs();
+
+// copy test configuration files over
+FileUtils.copyURLToFile(TestUtils.findTestData(conf/rhn.conf), new File(confPath,
+rhn.conf));
+FileUtils.copyURLToFile(TestUtils.findTestData(conf/default/rhn_web.conf),
+new File(defaultPath, rhn_web.conf));
+FileUtils.copyURLToFile(TestUtils.findTestData(conf/default/rhn_prefix.conf),
+new File(defaultPath, rhn_prefix.conf));
+FileUtils.copyURLToFile(TestUtils
+.findTestData(conf/default/bug154517.conf.rpmsave),
+new File(defaultPath, bug154517.conf.rpmsave));
+
+c.addPath(confPath);
+c.addPath(defaultPath);
 c.parseFiles();
 }
 
-- 
1.8.1.4

___
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel

Re: [Spacewalk-devel] [PATCH] build rhn-client-tools on openSUSE

2011-04-15 Thread Michael Calmer
Hi,

Am Donnerstag, 14. April 2011, 11:05:09 schrieb Miroslav Suchý:
 On 04/14/2011 10:27 AM, Michael Calmer wrote:

[...]

  When do you need to know the project name for 
  the announcement?
 
 It will be nice if you can provide me with url and project name soon
 (read as tomorrow, or at Monday) and you can build the packages later
 there. I will let you know at least one day before release.

I have created  systemsmanagement:spacewalk:1.4 project in OBS

The repository URL is:

for openSUSE 11.4 (i586 and x86_64):
http://download.opensuse.org/repositories/systemsmanagement:/spacewalk:/1.4/openSUSE_11.4/

for openSUSE Factory(i586 and x86_64):
http://download.opensuse.org/repositories/systemsmanagement:/spacewalk:/1.4/openSUSE_Factory/

-- 
Regards,

Michael Calmer

--
Michael Calmer
SUSE LINUX Products GmbH, Maxfeldstr. 5, D-90409 Nuernberg
T: +49 (0) 911 74053 0
F: +49 (0) 911 74053575  - e-mail: michael.cal...@suse.com
--
SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg)

___
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel


[Spacewalk-devel] rhn-prefix check when creating new channel

2012-03-02 Thread Duncan Mac-Vicar P.


Hi Astronauts

The create channel page does a check for a prefix rhn-*. As we replaced 
some errror messages Redhat with a configurable vendor string

we now get the error message as

SUSE channels creation need admin privileges (or something like that)

We are discussing how to remove that check in the best 
upstream-friendly way possible:


- remove the restriction completely
 (btw, the regex is duplicated, I guess CreateChannelCommand could use 
 the one in NewChannelHelper instead)

- Allow to disable the check
- Or its generic version: make it a vendor restriction and the regex 
configurable


What do you think?

In any case we need to get rid of the check, we are trying to avoid a 
patch in our tree that would live forever.


cheers

--
Duncan Mac-Vicar P. - http://www.suse.com/

SUSE LINUX Products GmbH, GF: Jeff Hawn, Jennifer Guild, Felix 
Imendörffer, HRB 16746 (AG Nürnberg)

Maxfeldstraße 5, 90409 Nürnberg, Germany

___
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel


Re: [Spacewalk-devel] rhn-prefix check when creating new channel

2012-03-05 Thread Duncan Mac-Vicar P.

On 03/02/2012 04:20 PM, Miroslav Suchý wrote:

On 03/02/2012 02:57 PM, Duncan Mac-Vicar P. wrote:

 As we replaced
some errror messages Redhat with a configurable vendor string
we now get the error message as


Did I miss this patch?


- Or its generic version: make it a vendor restriction and the regex
configurable


Hmm, this one sounds best to me.


For channel validation there seems to be a bunch of duplicated code: 
NewChannelHelper and CreateChannelCommand both perform very similar 
validations.


If I make the regexp rhn independent, configurable and 
switchable/optional it would be easier if the validations are refactored 
in one place.


I think the right place for the validations is the helper, and the 
command class should consume the validations from the helper. Is that fine?


Duncan






___
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel


Re: [Spacewalk-devel] Policy for collections and generics?

2012-04-02 Thread Duncan Mac-Vicar P.

On 04/02/2012 02:37 PM, Stephen Herr wrote:

On 04/02/2012 05:17 AM, Duncan Mac-Vicar P. wrote:


Hi,

I see that in lot of places collections are used without generics
(1000+ warnings).

What is the view on this? are patches in the direction of using
generics for compile-time errors wanted? if yes, can this be a bit of
a flood of patches for review?



Hi Duncan,

I personally would love to see patches for the generics warnings. I
would be happy to review these patches, no matter how many of them there
are.

-Stephen


Great to hear. I think is equally hard in the developers end, as you 
don't sit to fix just generics, but fix them as you go over code, and 
that mixes changes in the same patch. But I will keep in mind :-)


--
Duncan Mac-Vicar P. - http://www.suse.com/

SUSE LINUX Products GmbH, GF: Jeff Hawn, Jennifer Guild, Felix 
Imendörffer, HRB 16746 (AG Nürnberg)

Maxfeldstraße 5, 90409 Nürnberg, Germany

___
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel


Re: [Spacewalk-devel] Bootstrap image feature

2012-08-08 Thread Uwe Gansert

On 02.08.2012 11:15, Jan Pazdziora wrote:


* inventing a new architecture bootstrap-linux that automatically
gets the new entitlement during registration.


Could you please explain some more why new architecture is needed?
Won't we actually need to know what architecture (the physical one)
the machine is?


I wanted to clean up the patch today and noticed, that we still need the 
architecture.
The architecture is directly connected to the new bootstrap-entitlement 
in the database via rhnServerServerGroupArchCompat table:



insert into rhnServerServerGroupArchCompat ( server_arch_id, 
server_group_type)

values (lookup_server_arch('bootstrap-linux'),
lookup_sg_type('bootstrap_entitled'));

insert into rhnServerServerGroupArchCompat ( server_arch_id, 
server_group_type)

values (lookup_server_arch('bootstrap-linux'),
lookup_sg_type('provisioning_entitled'));

if a machine registers with that arch, it'll get the 
bootstrap-entitlement automatically.
Please correct me if I'm wrong or misunderstood something but I'm 
afraid, we still need the arch.



--
ciao, Uwe Gansert

SUSE LINUX Products GmbH, HRB 16746 (AG Nürnberg)
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer
Home: http://www.suse.de/~ug - Blog: http://suse.gansert.net

___
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel


Re: [Spacewalk-devel] [PATCH] 'es improve channel status display

2013-02-25 Thread Duncan Mac-Vicar P.


While it is easy to calculate the status of the repo-sync, -- as every 
channel sync has _one_ taskomatic job which has a result --, the status 
of the metadata generation is in _one_ Taskomatic job which creates 
workers for every channel. However the status is lost one it runs. The 
items in the worker table are basically the scheduled and running.


If we want to improve here, I see 2 alternatives:

- Improve this table (workers) to keep the failed and successful workers 
for a channel metadata generation run.


- Keep it like it is, but make some assumptions:
  - If the metadata directory does not exists, it has not run yet (so 
it is not completed, but unknown).
  - If the metadata dir is there, but there is a FAILED file (written 
when the worker throws) then it is failed
- Michael also suggested looking for .new files to detect failed 
state.

  - If the metadata dir is there but not the above, then it is completed.

What do you think?

Duncan

___
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel


[Spacewalk-devel] application-wide caching facility?

2013-03-22 Thread Duncan Mac-Vicar P.


Hi guys.

I gave it a second round to my patch that improves the channel status. 
Right now part of the status is calculated with queries to the job 
history, but the metadata generation leaves no traces on the queue. I 
could enhance the schema to insert a flag when an exception is thrown, 
but this is overkill, as I don't need this data to survive reboots. If 
the latest status is lost is harmless.


In other stacks I would use something like redis for this. A key/value 
store that can be configured in-memory or with very basic persistence, 
and accessible from all the components (webapp, taskomatic, python, etc).


Do we have something like this already? Any other way of achieving the same?
Would adding something like redis to the infrastructure would be desired?

Cheers

--
Duncan Mac-Vicar P. - http://www.suse.com/

SUSE LINUX Products GmbH, GF: Jeff Hawn, Jennifer Guild, Felix 
Imendörffer, HRB 16746 (AG Nürnberg)

Maxfeldstraße 5, 90409 Nürnberg, Germany

___
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel


Re: [Spacewalk-devel] [PATCH] Kickstartable channels should contain the anaconda package

2013-04-05 Thread Johannes Renner
On 04/05/2013 08:52 AM, Jan Pazdziora wrote:
 Hmm, I wonder if the current logic is actually correct. It feel that
 a kickstartable channel (for the purpose of creating kickstart profile,
 for example) would be channel that has at least one kickstartable
 tree, or channel cloned from one that has the tree. Which is not
 a logic I can see in Channel.kickstartableChannels.
 
 If we changed the logic this way, that would work for SUSE as well,
 right? I'd much prefer to do it this way than hardcoding yet another
 name of package to the code base.
 
 Of course, creating new distribution should basically be allowed for
 any parent channel, it would seem.

Yes, this should work for SUSE as well. In this case we would need to
consider the install type of the tree (equals distribution?) though,
and make sure that it's != 'suse'. Agreed that such a solution would
be better than hardcoding the package name.

The original query should be suitable for creating new distributions.

-- 
SUSE LINUX Products GmbH, HRB 16746 (AG Nürnberg)
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer

___
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel


  1   2   3   >