Re: [Spacewalk-devel] Re: 487621 - applying jbowe's patch to fix seg faults rhnpush has been causing server...

2009-03-23 Thread Pradeep Kilambi

James Bowes wrote:

On Mon, Mar 23, 2009 at 01:15:01PM -0400, Pradeep Kilambi wrote:
  

Mike McCune wrote:


noticed here:

  
 
  
http://git.fedorahosted.org/git/?p=spacewalk.git;a=commitdiff;h=3e1bc16744a3d816dbedd7d91939ab75618c5de1 




that it showed up with prad doing the commit.   Did you use git am?

https://fedorahosted.org/spacewalk/wiki/GitGuide

Applying Patches ¶

Applying patches is as simple as:

  git am 0001-incoming.patch   # apply the patch in your current  
branch


"Note that if you examine the git log, both the git identity of the  
patch author and the patch committer are tracked. "


Just double checking.  Easier to track submissions if we give the  
submitter the real credit.


Mike
  
yea I tried that.. but the patch added was not formatted for git, it  
gave me,


$ git am ~/0001-rhnpush.patch
Patch does not have a valid e-mail address.



fwiw, you need to save the entire email including headers and apply
that, rather than just the body.
  


Ah dint know I had to save the entire email. Will remember that for 
future patches.



If you'd prefer, I can send any future patches as full-on attachments,
but since there was no preference listed on the wiki that I could see, I
went with the method that comes most naturally to me.
  


yea this is what I thought would work with git am. But np, which ever is 
easier for you.


~ Prad

  
so instead of giving more work to jbowes, I jus committed it with his  
name in the commit msg.


~ Prad

--
--
Pradeep Kilambi
RHN Satellite Engineering
pkila...@redhat.com
Phone: +1 919 754 4285
RHCE # 805008680430554


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



-James
  



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



--
--
Pradeep Kilambi
RHN Satellite Engineering
pkila...@redhat.com
Phone: +1 919 754 4285
RHCE # 805008680430554


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


Re: [Spacewalk-devel] Re: 487621 - applying jbowe's patch to fix seg faults rhnpush has been causing server...

2009-03-23 Thread James Bowes
On Mon, Mar 23, 2009 at 01:15:01PM -0400, Pradeep Kilambi wrote:
> Mike McCune wrote:
>> noticed here:
>>
 
>> http://git.fedorahosted.org/git/?p=spacewalk.git;a=commitdiff;h=3e1bc16744a3d816dbedd7d91939ab75618c5de1
>>  
>> 
>>
>>
>> that it showed up with prad doing the commit.   Did you use git am?
>>
>> https://fedorahosted.org/spacewalk/wiki/GitGuide
>>
>> Applying Patches ¶
>>
>> Applying patches is as simple as:
>>
>>   git am 0001-incoming.patch   # apply the patch in your current  
>> branch
>>
>> "Note that if you examine the git log, both the git identity of the  
>> patch author and the patch committer are tracked. "
>>
>> Just double checking.  Easier to track submissions if we give the  
>> submitter the real credit.
>>
>> Mike
>
>
> yea I tried that.. but the patch added was not formatted for git, it  
> gave me,
>
> $ git am ~/0001-rhnpush.patch
> Patch does not have a valid e-mail address.

fwiw, you need to save the entire email including headers and apply
that, rather than just the body.

If you'd prefer, I can send any future patches as full-on attachments,
but since there was no preference listed on the wiki that I could see, I
went with the method that comes most naturally to me.

>
> so instead of giving more work to jbowes, I jus committed it with his  
> name in the commit msg.
>
> ~ Prad
>
> -- 
> --
> Pradeep Kilambi
> RHN Satellite Engineering
> pkila...@redhat.com
> Phone: +1 919 754 4285
> RHCE # 805008680430554
>
>
> ___
> Spacewalk-devel mailing list
> Spacewalk-devel@redhat.com
> https://www.redhat.com/mailman/listinfo/spacewalk-devel

-James


pgp0AiBwMNXdT.pgp
Description: PGP signature
___
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel

Re: [Spacewalk-devel] Re: 487621 - applying jbowe's patch to fix seg faults rhnpush has been causing server...

2009-03-23 Thread Pradeep Kilambi

Mike McCune wrote:

noticed here:

http://git.fedorahosted.org/git/?p=spacewalk.git;a=commitdiff;h=3e1bc16744a3d816dbedd7d91939ab75618c5de1 



that it showed up with prad doing the commit.   Did you use git am?

https://fedorahosted.org/spacewalk/wiki/GitGuide

Applying Patches ¶

Applying patches is as simple as:

  git am 0001-incoming.patch   # apply the patch in your current 
branch


"Note that if you examine the git log, both the git identity of the 
patch author and the patch committer are tracked. "


Just double checking.  Easier to track submissions if we give the 
submitter the real credit.


Mike



yea I tried that.. but the patch added was not formatted for git, it 
gave me,


$ git am ~/0001-rhnpush.patch
Patch does not have a valid e-mail address.

so instead of giving more work to jbowes, I jus committed it with his 
name in the commit msg.


~ Prad

--
--
Pradeep Kilambi
RHN Satellite Engineering
pkila...@redhat.com
Phone: +1 919 754 4285
RHCE # 805008680430554


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


[Spacewalk-devel] Re: 487621 - applying jbowe's patch to fix seg faults rhnpush has been causing server...

2009-03-23 Thread Mike McCune

noticed here:

http://git.fedorahosted.org/git/?p=spacewalk.git;a=commitdiff;h=3e1bc16744a3d816dbedd7d91939ab75618c5de1

that it showed up with prad doing the commit.   Did you use git am?

https://fedorahosted.org/spacewalk/wiki/GitGuide

Applying Patches ¶

Applying patches is as simple as:

  git am 0001-incoming.patch   # apply the patch in your current branch

"Note that if you examine the git log, both the git identity of the 
patch author and the patch committer are tracked. "


Just double checking.  Easier to track submissions if we give the 
submitter the real credit.


Mike
--
Mike McCune
mmccune AT redhat.com
Engineering   | Portland, OR
RHN Satellite | 650.567.9039x79248

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


Re: [Spacewalk-devel] [PATCH] package-push: Avoid opening the system rpmdb

2009-03-23 Thread Pradeep Kilambi

James Bowes wrote:

On Sun, Mar 22, 2009 at 01:52:15PM -0400, Pradeep Kilambi wrote:
  
Ah nice timing.  We hit this recently and were investigating the same as  
stated boiled down to rpm and httpd's db4. See this bug#491119. Panu was  
going to spend sometime and see if he could get rpm to upgrade to db4.7,  
which apparently has number of advantages and he wanted to do it anyway  
irrespective of this issue. Of course if we have a patch then even  
better, we dont have to wait for his efforts to get spacewalk on f10  
out. I'll test the attached patch and apply if all is well.


Thanks for the patch.



Yeah, I saw some discussion of it in the spacewalk irc channel, and
after looking at the bug it sounded pretty crazy/fun, so I gave it a go
:)

  


Patch tested and applied. Thank you!

~ Prad


-James
  



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



--
--
Pradeep Kilambi
RHN Satellite Engineering
pkila...@redhat.com
Phone: +1 919 754 4285
RHCE # 805008680430554


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


Re: [Spacewalk-devel] Re: 489590 - Updated query to retrieve configuration managed systems to check that the...

2009-03-23 Thread Jason Dobies

Michael Mraka wrote:

% 489590 - Updated query to retrieve configuration managed systems to check 
that the systems returned have provisioning entitlements.
% 
%   • [DH] java/code/src/com/redhat/rhn/common/db/datasource/xml/

% config_queries.xml
% 
% URL: http://git.fedoraproject.org/git/?p=spacewalk.git;a=commitdiff;h=

% fb66c0dcc377f8d789a31e829a7de97b7120

+SELECT DISTINCT S.id,
+S.name
+  FROM rhnServer S
+INNER JOIN rhnUserServerPerms USP on S.id = USP.server_id
+INNER JOIN rhnClientCapability CC on S.id = CC.server_id 
+INNER JOIN rhnClientCapabilityName CCN on CC.capability_name_id = CCN.id

+ WHERE USP.user_id = :user_id
+   AND CCN.name LIKE 'configfiles%'
+   AND S.id in (
+   SELECT SS.id
+ FROM rhnServer SS,
+  rhnServerGroupMembers MM,
+  rhnServerGroup GG,
+  rhnServerGroupType TT
+WHERE SS.id = MM.server_id
+  AND MM.server_group_id = GG.id
+  AND GG.group_type = TT.id
+  AND TT.label = 'provisioning_entitled'
+)
+  ORDER BY UPPER(NVL(S.name, '(none)')), S.id

The 'rhnServer SS' table in subselect is redundant :). As I can see the only
reason to have it there is join SS.id = MM.server_id and then return SS.id,
so why not return MM.server_id directly? It will save us one table scan
(well, its primary key index in fact) and one table join...

So modified version could be
SELECT DISTINCT S.id,
S.name
  FROM rhnServer S
INNER JOIN rhnUserServerPerms USP on S.id = USP.server_id
INNER JOIN rhnClientCapability CC on S.id = CC.server_id 
INNER JOIN rhnClientCapabilityName CCN on CC.capability_name_id = CCN.id

 WHERE USP.user_id = :user_id
   AND CCN.name LIKE 'configfiles%'
   AND S.id in (
   SELECT MM.server_id
  rhnServerGroupMembers MM,
  rhnServerGroup GG,
  rhnServerGroupType TT
WHERE MM.server_group_id = GG.id
  AND GG.group_type = TT.id
  AND TT.label = 'provisioning_entitled'
)
  ORDER BY UPPER(NVL(S.name, '(none)')), S.id


--
Michael Mráka
Satellite Engineering, Red Hat

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


This is why these sorts of quick informal reviews rock, it's amazing 
what a fresh pair of eyes can see.


Thanks, will incorporate shortly  :)

--
Jason Dobies
RHN Satellite / Spacewalk
RHCE# 805008743336126
Freenode: jdob @ #spacewalk #spacewalk-devel

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


Re: [Spacewalk-devel] Re: 250134:Added code to do a check on multibyte chars for max lenght in the validation...

2009-03-23 Thread Partha Aji

Excellent point .. Will change that :).. Thanks..

Partha

Michael Mraka wrote:

Fedora Hosted Git Repositories - spacewalk.git/rss log, Partha Aji <> wrote:
% 250134:Added code to do a check on multibyte chars for max lenght in the
% validation...
% 
% 250134:Added code to do a check on multibyte chars for max lenght in the validation rhnvalidationhelper...
% 
%   • [DH] java/code/src/com/redhat/rhn/common/validator/StringConstraint.java

%   • [DH] java/code/src/com/redhat/rhn/frontend/strings/jsp/
% StringResource_en_US.xml
% 
% URL: http://git.fedoraproject.org/git/?p=spacewalk.git;a=commitdiff;h=

% 376e0035e09003a9918db3f1aa8e542bf639f605

+private boolean lengthLessThan(String str, Number length) {
...
+return str.getBytes("UTF8").length < length.intValue();
...

+private boolean lengthGreaterThan(String str, Number length) {
...
+return str.getBytes("UTF8").length >= length.intValue(); 


Why lengthLessThan have different semantic than lengthGreaterThan?
I mean < vs. >=. Should not lengthGreaterThan be lengthGreaterOrEqualThan?

And why the whole procedure code is duplicated and not simply

private boolean lengthGreaterOrEqualThan(String str, Number length) {
return ! (lengthLessThan(str, length));
}
?

--
Michael Mráka
Satellite Engineering, Red Hat

___
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] package-push: Avoid opening the system rpmdb

2009-03-23 Thread James Bowes
On Sun, Mar 22, 2009 at 01:52:15PM -0400, Pradeep Kilambi wrote:
> Ah nice timing.  We hit this recently and were investigating the same as  
> stated boiled down to rpm and httpd's db4. See this bug#491119. Panu was  
> going to spend sometime and see if he could get rpm to upgrade to db4.7,  
> which apparently has number of advantages and he wanted to do it anyway  
> irrespective of this issue. Of course if we have a patch then even  
> better, we dont have to wait for his efforts to get spacewalk on f10  
> out. I'll test the attached patch and apply if all is well.
>
> Thanks for the patch.

Yeah, I saw some discussion of it in the spacewalk irc channel, and
after looking at the bug it sounded pretty crazy/fun, so I gave it a go
:)


-James


pgpPk2ahhph9J.pgp
Description: PGP signature
___
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel

Re: [Spacewalk-devel] Do you know setup.py/distutils? Please fine tune it.

2009-03-23 Thread Devan Goodwin
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Mon, 23 Mar 2009 12:12:12 +0100
Jan Pazdziora  wrote:

> 
> Hello,
> 
> in client/solaris/ subdirectory of the Spacewalk repository there are
> directories
> 
>   rhnclient
> and
>   smartpm
> 
> I'd need smartpm built but I get
> 
>   $ ../../../rel-eng/bin/tito build --test --srpm
>   ERROR: Unable to lookup latest package info.
>   ERROR: Perhaps you need to tag first?
> 
> and
> 
>   $ make test-srpm
>   make: *** No rule to make target `test-srpm'.  Stop.
> 
> The package seems to be using setup.py which uses distutils --
> something I believe others are much more fluent than me.
> 
> Could you please build smartpm, and rhnclient?
> 
> Thank you,
> 

Well the srpms should now be buildable, just needed version file
dependence removed from the spec files, but I'm guessing that's not the
problem you hit as the --rpm is busted but it looks like normal
packaging issues.

First error is in the spec file removing a locale directory that no
longer seems to exist: 

%{__rm} -r %{buildroot}/opt/redhat/rhn/solaris/share/locale

I removed this locally and moved further only to fail on unpackaged
files but I think at least one of the two was because I'm running it on
Fedora. The other was a .po file in /usr/share/locale which is probably
the root of the problem.

Not sure enough of what I'm doing or how this thing is to be built and
tested so I won't commit that but hopefully this is of some help.

Also the version files both indicated a version of 0.1, which seems
totally wrong according to the changelogs. I left it as such when
removing and doing the initial tag but you probably want to re-version
to something else.

Devan



- -- 
  Devan Goodwin 
  Software Engineer Spacewalk / RHN Satellite
  Halifax, Canada   650.567.9039x79267
-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.9 (GNU/Linux)

iEYEARECAAYFAknHiaIACgkQAyHWaPV9my55hQCdHw1FriD/hYGLkUwPhMUxPX3o
xBEAoLZXlU1YvUpxYIYXQHlZF+4ZYtwg
=/0wN
-END PGP SIGNATURE-

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


[Spacewalk-devel] Do you know setup.py/distutils? Please fine tune it.

2009-03-23 Thread Jan Pazdziora

Hello,

in client/solaris/ subdirectory of the Spacewalk repository there are
directories

rhnclient
and
smartpm

I'd need smartpm built but I get

$ ../../../rel-eng/bin/tito build --test --srpm
ERROR: Unable to lookup latest package info.
ERROR: Perhaps you need to tag first?

and

$ make test-srpm
make: *** No rule to make target `test-srpm'.  Stop.

The package seems to be using setup.py which uses distutils --
something I believe others are much more fluent than me.

Could you please build smartpm, and rhnclient?

Thank you,

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

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


[Spacewalk-devel] Re: 250134:Added code to do a check on multibyte chars for max lenght in the validation...

2009-03-23 Thread Michael Mraka
Fedora Hosted Git Repositories - spacewalk.git/rss log, Partha Aji <> wrote:
% 250134:Added code to do a check on multibyte chars for max lenght in the
% validation...
% 
% 250134:Added code to do a check on multibyte chars for max lenght in the 
validation rhnvalidationhelper...
% 
%   • [DH] java/code/src/com/redhat/rhn/common/validator/StringConstraint.java
%   • [DH] java/code/src/com/redhat/rhn/frontend/strings/jsp/
% StringResource_en_US.xml
% 
% URL: http://git.fedoraproject.org/git/?p=spacewalk.git;a=commitdiff;h=
% 376e0035e09003a9918db3f1aa8e542bf639f605

+private boolean lengthLessThan(String str, Number length) {
...
+return str.getBytes("UTF8").length < length.intValue();
...
+private boolean lengthGreaterThan(String str, Number length) {
...
+return str.getBytes("UTF8").length >= length.intValue(); 

Why lengthLessThan have different semantic than lengthGreaterThan?
I mean < vs. >=. Should not lengthGreaterThan be lengthGreaterOrEqualThan?

And why the whole procedure code is duplicated and not simply

private boolean lengthGreaterOrEqualThan(String str, Number length) {
return ! (lengthLessThan(str, length));
}
?

--
Michael Mráka
Satellite Engineering, Red Hat

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


[Spacewalk-devel] Automatic commit of package [spacewalk-java] release [0.5.36-1]

2009-03-23 Thread Miroslav Suchý

Commit 65c8964a14bd176a9141df0af0d86e654f73e690
I do not see tag attached to this commit. Jesus did you forget git push 
--tags, or it is my problem?

--
Miroslav Suchy
RHN Satellite Engineering, Red Hat

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


[Spacewalk-devel] Re: 489590 - Updated query to retrieve configuration managed systems to check that the...

2009-03-23 Thread Michael Mraka
% 489590 - Updated query to retrieve configuration managed systems to check 
that the systems returned have provisioning entitlements.
% 
%   • [DH] java/code/src/com/redhat/rhn/common/db/datasource/xml/
% config_queries.xml
% 
% URL: http://git.fedoraproject.org/git/?p=spacewalk.git;a=commitdiff;h=
% fb66c0dcc377f8d789a31e829a7de97b7120

+SELECT DISTINCT S.id,
+S.name
+  FROM rhnServer S
+INNER JOIN rhnUserServerPerms USP on S.id = USP.server_id
+INNER JOIN rhnClientCapability CC on S.id = CC.server_id 
+INNER JOIN rhnClientCapabilityName CCN on CC.capability_name_id = CCN.id
+ WHERE USP.user_id = :user_id
+   AND CCN.name LIKE 'configfiles%'
+   AND S.id in (
+   SELECT SS.id
+ FROM rhnServer SS,
+  rhnServerGroupMembers MM,
+  rhnServerGroup GG,
+  rhnServerGroupType TT
+WHERE SS.id = MM.server_id
+  AND MM.server_group_id = GG.id
+  AND GG.group_type = TT.id
+  AND TT.label = 'provisioning_entitled'
+)
+  ORDER BY UPPER(NVL(S.name, '(none)')), S.id

The 'rhnServer SS' table in subselect is redundant :). As I can see the only
reason to have it there is join SS.id = MM.server_id and then return SS.id,
so why not return MM.server_id directly? It will save us one table scan
(well, its primary key index in fact) and one table join...

So modified version could be
SELECT DISTINCT S.id,
S.name
  FROM rhnServer S
INNER JOIN rhnUserServerPerms USP on S.id = USP.server_id
INNER JOIN rhnClientCapability CC on S.id = CC.server_id 
INNER JOIN rhnClientCapabilityName CCN on CC.capability_name_id = CCN.id
 WHERE USP.user_id = :user_id
   AND CCN.name LIKE 'configfiles%'
   AND S.id in (
   SELECT MM.server_id
  rhnServerGroupMembers MM,
  rhnServerGroup GG,
  rhnServerGroupType TT
WHERE MM.server_group_id = GG.id
  AND GG.group_type = TT.id
  AND TT.label = 'provisioning_entitled'
)
  ORDER BY UPPER(NVL(S.name, '(none)')), S.id


--
Michael Mráka
Satellite Engineering, Red Hat

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