Re: [Spacewalk-devel] Spacewalk-devel Digest, Vol 43, Issue 1

2011-12-01 Thread Parsons, Aron
Definitely, I just didn't want to duplicate efforts.  It likely won't be until 
mid-late next week as I'll be on vacation for a few days.

/aron

-Original Message-
Date: Thu, 01 Dec 2011 10:05:57 +0100
From: Miroslav Suchy 
To: spacewalk-devel@redhat.com
Subject: Re: [Spacewalk-devel] Cobbler 2.2 support in 1.6
Message-ID: <4ed74375.30...@redhat.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

Dne 30.11.2011 19:19, Parsons, Aron napsal(a):
> Am I missing any other changes?  Is anyone else already working on this?

Nope.

We are aware of drastic changes in 2.2, but no one had time to check cobbler 
2.2. It is presented only in "testing" so it should not break your Spacewalk 
right now.

If you are willing to investigate it and make it work, I would be happy.

Mirek

___
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

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 @@
 
 
 
-   			${data}
+   			""

 
 
___
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 Jan Pazdziora
On Thu, Dec 01, 2011 at 04:50:40PM +0100, Uwe Gansert wrote:
> On 01.12.2011 13:54, Jan Pazdziora wrote:
> >On Thu, Dec 01, 2011 at 01:44:25PM +0100, Uwe Gansert 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
> 
> in the jsp?

Nod.

-- 
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] fix display of static snippets

2011-12-01 Thread Uwe Gansert

On 01.12.2011 13:54, Jan Pazdziora wrote:

On Thu, Dec 01, 2011 at 01:44:25PM +0100, Uwe Gansert 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

in the jsp?
That should work too I guess.
I just had the impression all "work" is done in the java files and so I 
did it directly there.

jsp is fine with me


--
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] fix display of static snippets

2011-12-01 Thread Jan Pazdziora
On Thu, Dec 01, 2011 at 01:44:25PM +0100, Uwe Gansert 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?

-- 
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


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

2011-12-01 Thread Uwe Gansert

Hi,

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


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/src/com/redhat/rhn/domain/kickstart/cobbler/CobblerSnippet.java b/java/code/src/com/redhat/rhn/domain/kickstart/cobbler/CobblerSnippet.java
index fbb44b6..3d93642 100644
--- a/java/code/src/com/redhat/rhn/domain/kickstart/cobbler/CobblerSnippet.java
+++ b/java/code/src/com/redhat/rhn/domain/kickstart/cobbler/CobblerSnippet.java
@@ -196,10 +196,22 @@ public class CobblerSnippet implements Comparable {
  * @return String to get
 */
 public String getContents() {
+	String result = null;
+
 if (path.exists()) {
-return FileUtils.readStringFromFile(path.getAbsolutePath());
+	result = FileUtils.readStringFromFile(path.getAbsolutePath());
+	if (!isEditable()) {
+		/* 
+		 * HTML escape Snippets
+		 * only needed for the read-only display in the web ui
+		 */
+		result = result.replace("&", "&");
+		result = result.replace("<", "<");
+		result = result.replace(">", ">");
+
+	}
 }
-return null;
+return result;
 }
 
 /**
___
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel

Re: [Spacewalk-devel] client/rhel

2011-12-01 Thread Jan Pazdziora
On Wed, Nov 30, 2011 at 06:42:54PM +0100, Miroslav Suchy wrote:
> >
> >in the hostname. You should really check (and test) various scenarios,
> >not overwrite the hostname if it already is set from the IPv4 pass,
> >and not set it if you get IP address back.
> 
> How should I decide which hostname is correct?

The current behaviour is to take the IPv4-related hostname. You should
not change the behaviour too much.

> And what should I do with machine with IPv4 address 123.45.56.67
> which resolves to machine1.broken.dns and IPv6 address
> 2620:52:0:2223:20c:29ff:fe0e:d05b which resolves
> machine2.broken.dns?

Use machine1.broken.dns because that's what the code did so far
anyway.

> If you are unable to resolve the hostname using gethostbyaddr()
> (getfqdn() is essentially wrapper around this one function), then
> you do not deserve sane data. If user has broken networking, he
> should fix it in first place.

Why should a person be forced to have a valid IPv6 DNS?

> Hmm what I can do is:
> hostname_tmp = socket.getfqdn(intf_tmp)
> if hostname_tmp != intf_tmp:
>hostname = hostname_tmp
> 
> But you can admit, that user can be so ugly, that machine with
> hostname 123.45.56.67 will have IPv4 address 123.45.56.67.
> 
> I do not think we can catch all possibilities here.

We should not regress.

-- 
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] Cobbler 2.2 support in 1.6

2011-12-01 Thread Miroslav Suchy

Dne 30.11.2011 19:19, Parsons, Aron napsal(a):

Am I missing any other changes?  Is anyone else already working on this?


Nope.

We are aware of drastic changes in 2.2, but no one had time to check 
cobbler 2.2. It is presented only in "testing" so it should not break 
your Spacewalk right now.


If you are willing to investigate it and make it work, I would be happy.

Mirek

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