Re: [Spacewalk-devel] [PATCH] Added Oracle GPG key used to sign Oracle Linux 6 packages.

2013-09-17 Thread Avi Miller

On 17/09/2013, at 7:09 PM, Michael Mraka  wrote:

> Well, I've commited your patches and built packages. Could you check whether
> current spacewalk nightly will work for you?


Ok, I've tested Spacewalk Nightly on CentOS6 and Oracle Linux 6 and it's 
working just fine. You can go ahead and commit this change, please! :)

Thanks again for the help, btw.

Cheers,
Avi

--
Oracle 
Avi Miller | Principal Program Manager | +61 (412) 229 687
Oracle Linux and Virtualization
417 St Kilda Road, Melbourne, Victoria 3004 Australia


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


Re: [Spacewalk-devel] [PATCH] Added Oracle GPG key used to sign Oracle Linux 6 packages.

2013-09-17 Thread Michael Mraka
Avi Miller wrote:
% > So, I've now tried this on Oracle Linux 6 (x86_64) with both Oracle 
Database 11.2.0.4 and PostgreSQL (embedded) and both times, with the following 
changes:
% 
% 
% As a test, I downloaded the -release RPMs from OL4, OL5, OL6, CenOS and 
Fedora and used rhnpush to push them into a single channel. Results:
% 
% 1. Packages are listed in Channels -> Manage Software Channels -> Manage 
Software Packages -> (channel) but with "Content Provider" as "Unknown" for the 
OL6 package only. The other four packages are listed with the correct content 
provider.
% 
% 2. 4 Packages are listed in Channels -> Software Channels -> (channel) -> 
Packages. The OL6 package is missing in the package list.
% 
% However, if I query the table using the packages_in_channel query, I get the 
right results with all 5 packages listed:
% 
% IDPACKAGE_NAMESUMMARY NVREA   PROVIDER
% 90enterprise-release  Enterprise Linux release file   
enterprise-release-4-3.7.18:6.x86_64Oracle Inc.
% 91enterprise-release  Enterprise Linux release file   
enterprise-release-5-9.0.6:6.x86_64 Oracle Inc.
% 92fedora-release  Fedora release filesfedora-release-19-2.noarch  
Fedora
% 93oraclelinux-release Oracle Linux 6 release file 
oraclelinux-release-6Server-4.0.4:6.x86_64  Oracle Inc.
% 94centos-release  CentOS release file 
centos-release-6-4.el6.centos.10.x86_64 CentOS
% 
% So, something is happening in the Java to filter out the oraclelinux-release 
package in both my Oracle and PostgreSQL installs on Oracle Linux 6. I have no 
idea where to look now. :)

This is really strange. When I  push the same *-release packages to my
spacewalk (nightly) patched with your changes it correctly shows:

PackageSummary   
Content Provider
centos-release-6-4.el6.centos.10.x86_64CentOS release file   CentOS 
enterprise-release-4-3.7.18:6.x86_64   Enterprise Linux release file Oracle 
Inc. 
enterprise-release-5-9.0.6:6.x86_64Enterprise Linux release file Oracle 
Inc. 
fedora-release-19-2.noarch Fedora release files  Fedora 
oraclelinux-release-6Server-4.0.4:6.x86_64 Oracle Linux 6 release file   Oracle 
Inc.

Both in Channels -> Manage Software Channels -> Manage Software Packages -> 
(channel)
and  Channels -> Software Channels -> (channel) -> Packages.



Well, I've commited your patches and built packages. Could you check whether
current spacewalk nightly will work for you?

Regards,

--
Michael Mráka
Satellite Engineering, Red Hat

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

Re: [Spacewalk-devel] [PATCH] Added Oracle GPG key used to sign Oracle Linux 6 packages.

2013-09-13 Thread Avi Miller

On 13/09/2013, at 9:46 AM, Avi Miller  wrote:

> So, I've now tried this on Oracle Linux 6 (x86_64) with both Oracle Database 
> 11.2.0.4 and PostgreSQL (embedded) and both times, with the following changes:


As a test, I downloaded the -release RPMs from OL4, OL5, OL6, CenOS and Fedora 
and used rhnpush to push them into a single channel. Results:

1. Packages are listed in Channels -> Manage Software Channels -> Manage 
Software Packages -> (channel) but with "Content Provider" as "Unknown" for the 
OL6 package only. The other four packages are listed with the correct content 
provider.

2. 4 Packages are listed in Channels -> Software Channels -> (channel) -> 
Packages. The OL6 package is missing in the package list.

However, if I query the table using the packages_in_channel query, I get the 
right results with all 5 packages listed:

ID  PACKAGE_NAMESUMMARY NVREA   PROVIDER
90  enterprise-release  Enterprise Linux release file   
enterprise-release-4-3.7.18:6.x86_64Oracle Inc.
91  enterprise-release  Enterprise Linux release file   
enterprise-release-5-9.0.6:6.x86_64 Oracle Inc.
92  fedora-release  Fedora release filesfedora-release-19-2.noarch  
Fedora
93  oraclelinux-release Oracle Linux 6 release file 
oraclelinux-release-6Server-4.0.4:6.x86_64  Oracle Inc.
94  centos-release  CentOS release file 
centos-release-6-4.el6.centos.10.x86_64 CentOS

So, something is happening in the Java to filter out the oraclelinux-release 
package in both my Oracle and PostgreSQL installs on Oracle Linux 6. I have no 
idea where to look now. :)

--
Oracle 
Avi Miller | Principal Program Manager | +61 (412) 229 687
Oracle Linux and Virtualization
417 St Kilda Road, Melbourne, Victoria 3004 Australia


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


Re: [Spacewalk-devel] [PATCH] Added Oracle GPG key used to sign Oracle Linux 6 packages.

2013-09-12 Thread Avi Miller
Hey,

On 12/09/2013, at 7:40 PM, Michael Mraka  wrote:

> as we discussed on IRC - currently spacewalk doesn't correctly recognize
> signature type so you need to fix _extract_signatures() in rhn_rpm.py to
> get it right; your proposed change works for me.


So, I've now tried this on Oracle Linux 6 (x86_64) with both Oracle Database 
11.2.0.4 and PostgreSQL (embedded) and both times, with the following changes:

diff --git a/schema/spacewalk/common/data/rhnPackageKey.sql 
b/schema/spacewalk/common/data/rhnPackageKey.sql
index ff1ba26..ce9d378 100644
--- a/schema/spacewalk/common/data/rhnPackageKey.sql
+++ b/schema/spacewalk/common/data/rhnPackageKey.sql
@@ -93,6 +93,9 @@ insert into rhnPackageKey (id, key_id, key_type_id, 
provider_id) values
 insert into rhnPackageKey (id, key_id, key_type_id, provider_id) values
 (sequence_nextval('rhn_pkey_id_seq'), '2e2bcdbcb38a8516', 
lookup_package_key_type('gpg'), lookup_package_provider('Oracle Inc.'));

+insert into rhnPackageKey (id, key_id, key_type_id, provider_id) values
+(sequence_nextval('rhn_pkey_id_seq'), '72f97b74ec551f03', 
lookup_package_key_type('pgp'), lookup_package_provider('Oracle Inc.'));
+


diff --git a/backend/common/rhn_rpm.py b/backend/common/rhn_rpm.py
index f06fbd5..bfa9d82 100644
--- a/backend/common/rhn_rpm.py
+++ b/backend/common/rhn_rpm.py
@@ -128,6 +128,8 @@ class RPM_Header:
 key_id = ret[9:17]
 elif ret_len <= 72: # V4 DSA signature
 key_id = ret[18:26]
+elif ret_len <= 280: # V3 RSA/8 signature
+key_id = ret[10:18]
 elif ret_len <= 287: # V4 RSA/SHA1 signature
 key_id = ret[19:27]
 elif ret_len <= 536: # V3 RSA/SHA256 signature


I get the following results (using spacewalk-repo-sync to pull packages):

1. Packages are listed in Channels -> Manage Software Channels -> Manage 
Software Packages -> (channel) but with "Content Provider" as "Unknown"

2. Packages are not listed at all in Channels -> Software Channels -> (channel) 
-> Packages

However, if I look in both databases, I see the rhnPackageKey entry is created 
correctly and linked to the correct provider_id and the 
rhnPackageKeyAssociation table lists the correct key_id for each package_id. 
Also, if I run the packages_in_channel SQL query on both databases, I get 
exactly the same (correct) result:

SELECT P.id AS ID,
   PN.name as package_name,
   P.summary,
   PN.name || '-' || evr_t_as_vre_simple(PE.evr) || '.' || PA.label AS nvrea,
   PP.name AS provider
FROM rhnPackage P inner join
   rhnPackageArch PA on P.package_arch_id = PA.id inner join
   rhnPackageName PN on P.name_id = PN.id inner join
   rhnPackageEVR PE on P.evr_id = PE.id  inner join
   rhnChannelPackage CP on P.id = CP.package_id left join
   rhnPackageKeyAssociation assoc on assoc.package_id = P.id left join
   rhnPackageKey KEY on KEY.id = assoc.key_id left join
   rhnPackageProvider PP on KEY.provider_id = PP.id
WHERE CP.channel_id = :cid

id | package_name |   summary   
 |  nvrea   |  provider
+--+--+--+-
 55 | mysql| MySQL client programs and shared libraries 
  | mysql-5.5.33-1.el6.x86_64| Oracle Inc.
 47 | mysql| MySQL client programs and shared libraries 
  | mysql-5.5.32-2.el6.x86_64| Oracle Inc.
...

So, I could use some assistance to work out why it's working for you guys, but 
not on my test rigs. 

Thanks,
Avi

--
Oracle 
Avi Miller | Principal Program Manager | +61 (412) 229 687
Oracle Linux and Virtualization
417 St Kilda Road, Melbourne, Victoria 3004 Australia


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


Re: [Spacewalk-devel] [PATCH] Added Oracle GPG key used to sign Oracle Linux 6 packages.

2013-09-12 Thread Michael Mraka
Avi Miller wrote:
% Hi,
% 
% Please ignore this patch. There are other changes required to support the 
Oracle Linux 6 key, which I'm still researching. Apologies for the noise.
% 
% Thanks,
% Avi

Hello Avi,

as we discussed on IRC - currently spacewalk doesn't correctly recognize
signature type so you need to fix _extract_signatures() in rhn_rpm.py to
get it right; your proposed change works for me.

Inserting new key into rhnPackageKey is correct but you should also
create schema upgrade for it.
(See e.g. 
schema/spacewalk/upgrade/spacewalk-schema-1.9-to-spacewalk-schema-1.10/037-rhnPackageKey.sql)

% On 12/09/2013, at 8:46 AM, Avi Miller  wrote:
% 
% > Spacewalk already had the Oracle Linux 4 and 5 GPG keys. This adds the GPG 
key used to sign Oracle Linux 6 packages.
% > 
% > ---
% > schema/spacewalk/common/data/rhnPackageKey.sql |3 +++
% > 1 files changed, 3 insertions(+), 0 deletions(-)
% > 
% > diff --git a/schema/spacewalk/common/data/rhnPackageKey.sql 
b/schema/spacewalk/common/data/rhnPackageKey.sql
% > index ff1ba26..1c66937 100644
% > --- a/schema/spacewalk/common/data/rhnPackageKey.sql
% > +++ b/schema/spacewalk/common/data/rhnPackageKey.sql
% > @@ -93,6 +93,9 @@ insert into rhnPackageKey (id, key_id, key_type_id, 
provider_id) values
% > insert into rhnPackageKey (id, key_id, key_type_id, provider_id) values
% > (sequence_nextval('rhn_pkey_id_seq'), '2e2bcdbcb38a8516', 
lookup_package_key_type('gpg'), lookup_package_provider('Oracle Inc.'));
% > 
% > +insert into rhnPackageKey (id, key_id, key_type_id, provider_id) values
% > +(sequence_nextval('rhn_pkey_id_seq'), '72f97b74ec551f03', 
lookup_package_key_type('gpg'), lookup_package_provider('Oracle Inc.'));
% > +
% > 
% > -- Novell
% > insert into rhnPackageKey (id, key_id, key_type_id, provider_id) values
% > -- 
% > 1.7.1

Regards,

--
Michael Mráka
Satellite Engineering, Red Hat

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

Re: [Spacewalk-devel] [PATCH] Added Oracle GPG key used to sign Oracle Linux 6 packages.

2013-09-11 Thread Avi Miller
Hi,

Please ignore this patch. There are other changes required to support the 
Oracle Linux 6 key, which I'm still researching. Apologies for the noise.

Thanks,
Avi

On 12/09/2013, at 8:46 AM, Avi Miller  wrote:

> Spacewalk already had the Oracle Linux 4 and 5 GPG keys. This adds the GPG 
> key used to sign Oracle Linux 6 packages.
> 
> ---
> schema/spacewalk/common/data/rhnPackageKey.sql |3 +++
> 1 files changed, 3 insertions(+), 0 deletions(-)
> 
> diff --git a/schema/spacewalk/common/data/rhnPackageKey.sql 
> b/schema/spacewalk/common/data/rhnPackageKey.sql
> index ff1ba26..1c66937 100644
> --- a/schema/spacewalk/common/data/rhnPackageKey.sql
> +++ b/schema/spacewalk/common/data/rhnPackageKey.sql
> @@ -93,6 +93,9 @@ insert into rhnPackageKey (id, key_id, key_type_id, 
> provider_id) values
> insert into rhnPackageKey (id, key_id, key_type_id, provider_id) values
> (sequence_nextval('rhn_pkey_id_seq'), '2e2bcdbcb38a8516', 
> lookup_package_key_type('gpg'), lookup_package_provider('Oracle Inc.'));
> 
> +insert into rhnPackageKey (id, key_id, key_type_id, provider_id) values
> +(sequence_nextval('rhn_pkey_id_seq'), '72f97b74ec551f03', 
> lookup_package_key_type('gpg'), lookup_package_provider('Oracle Inc.'));
> +
> 
> -- Novell
> insert into rhnPackageKey (id, key_id, key_type_id, provider_id) values
> -- 
> 1.7.1

--
Oracle 
Avi Miller | Principal Program Manager | +61 (412) 229 687
Oracle Linux and Virtualization
417 St Kilda Road, Melbourne, Victoria 3004 Australia


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


[Spacewalk-devel] [PATCH] Added Oracle GPG key used to sign Oracle Linux 6 packages.

2013-09-11 Thread Avi Miller
Spacewalk already had the Oracle Linux 4 and 5 GPG keys. This adds the GPG key 
used to sign Oracle Linux 6 packages.

---
 schema/spacewalk/common/data/rhnPackageKey.sql |3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/schema/spacewalk/common/data/rhnPackageKey.sql 
b/schema/spacewalk/common/data/rhnPackageKey.sql
index ff1ba26..1c66937 100644
--- a/schema/spacewalk/common/data/rhnPackageKey.sql
+++ b/schema/spacewalk/common/data/rhnPackageKey.sql
@@ -93,6 +93,9 @@ insert into rhnPackageKey (id, key_id, key_type_id, 
provider_id) values
 insert into rhnPackageKey (id, key_id, key_type_id, provider_id) values
 (sequence_nextval('rhn_pkey_id_seq'), '2e2bcdbcb38a8516', 
lookup_package_key_type('gpg'), lookup_package_provider('Oracle Inc.'));

+insert into rhnPackageKey (id, key_id, key_type_id, provider_id) values
+(sequence_nextval('rhn_pkey_id_seq'), '72f97b74ec551f03', 
lookup_package_key_type('gpg'), lookup_package_provider('Oracle Inc.'));
+

 -- Novell
 insert into rhnPackageKey (id, key_id, key_type_id, provider_id) values
-- 
1.7.1

--
Oracle 
Avi Miller | Principal Program Manager | +61 (412) 229 687
Oracle Linux and Virtualization
417 St Kilda Road, Melbourne, Victoria 3004 Australia


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