2 commits - web/modules
by Jan Pazdziora
web/modules/rhn/RHN/DB/User.pm | 55 ++++++++++++-----------------------------
1 file changed, 17 insertions(+), 38 deletions(-)
New commits:
commit 35b7a37c4093b09ac6310c1b1876906ccf347e7d
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Wed Mar 9 15:27:19 2011 +0100
Fixing system group admin revocation (which is also used while granting) (PostgreSQL).
Addressing
DBD::Pg::st execute failed: ERROR: syntax error at or near "usgps"
LINE 2: cursor usgps is
diff --git a/web/modules/rhn/RHN/DB/User.pm b/web/modules/rhn/RHN/DB/User.pm
index 0592939..cfb5994 100644
--- a/web/modules/rhn/RHN/DB/User.pm
+++ b/web/modules/rhn/RHN/DB/User.pm
@@ -1684,32 +1684,23 @@ sub revoke_servergroup_permission {
my $sgid = shift;
my $dbh = RHN::DB->connect;
- my $sth = $dbh->prepare(<<EOS);
-DECLARE
- cursor usgps is
+ for my $row (@{ $dbh->selectall_arrayref(<<EOS, {}, $uid, $sgid) }) {
select usgp.server_group_id, usgp.user_id
from rhnUserServerGroupPerms usgp
- where usgp.server_group_id = :server_group_id
+ where usgp.user_id = ?
+ and usgp.server_group_id = ?
and exists (
select 1
from rhnServerGroup sg,
web_contact wc
- where wc.id = :user_id
- and sg.id = :server_group_id
+ where wc.id = usgp.user_id
+ and sg.id = usgp.server_group_id
and sg.org_id = wc.org_id
);
-BEGIN
- for usgp in usgps loop
- begin
- rhn_user.remove_servergroup_perm(:user_id, :server_group_id);
- exception
- when others then null;
- end;
- end loop;
-END;
EOS
+ $dbh->call_procedure('rhn_user.remove_servergroup_perm', $uid, $sgid);
+ }
- $sth->execute_h(server_group_id => $sgid, user_id => $uid);
$dbh->commit;
}
commit a515bea229f3d103507403443a3f5935aa221215
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Wed Mar 9 15:13:34 2011 +0100
Fixing system group admin granting (PostgreSQL).
Addressing
DBD::Pg::st execute failed: ERROR: syntax error at or near "usgps"
LINE 2: cursor usgps is
diff --git a/web/modules/rhn/RHN/DB/User.pm b/web/modules/rhn/RHN/DB/User.pm
index 2f3ac69..0592939 100644
--- a/web/modules/rhn/RHN/DB/User.pm
+++ b/web/modules/rhn/RHN/DB/User.pm
@@ -1653,33 +1653,21 @@ sub grant_servergroup_permission {
my $sgid = shift;
my $dbh = RHN::DB->connect;
- my $sth = $dbh->prepare(<<EOS);
-DECLARE
- cursor usgps is
- select wc.id user_id,
- sg.id server_group_id
- from rhnServerGroup sg,
- web_contact wc
- where wc.id = :user_id
- and sg.id = :server_group_id
+ if ($dbh->selectrow_array(<<EOS, {}, $uid, $sgid)) {
+ select web_contact.id, rhnServerGroup.id
+ from web_contact, rhnServerGroup
+ where web_contact.id = ?
+ and rhnServerGroup.id = ?
and not exists (
select 1
from rhnUserServerGroupPerms usgp
- where usgp.user_id = :user_id
- and usgp.server_group_id = :server_group_id
- );
-BEGIN
- for usgp in usgps loop
- begin
- rhn_user.add_servergroup_perm(:user_id, :server_group_id);
- exception
- when others then null;
- end;
- end loop;
-END;
+ where web_contact.id = usgp.user_id
+ and rhnServerGroup.id = usgp.server_group_id
+ )
EOS
+ $dbh->call_procedure('rhn_user.add_servergroup_perm', $uid, $sgid);
+ }
- $sth->execute_h(user_id => $uid, server_group_id => $sgid);
$dbh->commit;
}
13 years, 2 months
web/modules
by Jan Pazdziora
web/modules/rhn/RHN/DB/DataSource/xml/User_queries.xml | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
New commits:
commit 41d9e5ea308029d903ad9d2a7f94466811865148
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Wed Mar 9 14:56:53 2011 +0100
Fixing system group Admins listing (PostgreSQL).
Addressing
DBD::Pg::st execute failed: ERROR: function nvl(integer, integer) does not exist
LINE 4: NVL((SELECT MAX(1) FROM rhnUserManagedServerGroups US...
^
HINT: No function matches the given name and argument types. You might need to add explicit type casts.
diff --git a/web/modules/rhn/RHN/DB/DataSource/xml/User_queries.xml b/web/modules/rhn/RHN/DB/DataSource/xml/User_queries.xml
index be7d9bc..e15d2ca 100644
--- a/web/modules/rhn/RHN/DB/DataSource/xml/User_queries.xml
+++ b/web/modules/rhn/RHN/DB/DataSource/xml/User_queries.xml
@@ -4,9 +4,8 @@
<query params="sgid, org_id">
SELECT wc.id AS ID,
wc.login,
- NVL((SELECT MAX(1) FROM rhnUserManagedServerGroups USGP WHERE
- USGP.server_group_id = :sgid AND USGP.user_id = wc.id), 0) AS
- IS_ADMIN
+ case when (SELECT MAX(1) FROM rhnUserManagedServerGroups USGP WHERE
+ USGP.server_group_id = :sgid AND USGP.user_id = wc.id) = 1 then 1 else 0 end AS IS_ADMIN
FROM web_contact wc
WHERE wc.org_id = :org_id
ORDER BY wc.login_uc, wc.id
13 years, 2 months
web/modules
by Jan Pazdziora
web/modules/rhn/RHN/DB/ServerGroup.pm | 28 +++++++---------------------
1 file changed, 7 insertions(+), 21 deletions(-)
New commits:
commit 7e2ad33336457906a5791ac842ae909696a539cd
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Wed Mar 9 13:41:57 2011 +0100
Fixing system group removal for PostgreSQL.
Addressing
RHN::Exception: DBD::Pg::st execute failed: ERROR: syntax error at or near "uids"\nLINE 2: cursor uids is
and related issues in the remove method.
diff --git a/web/modules/rhn/RHN/DB/ServerGroup.pm b/web/modules/rhn/RHN/DB/ServerGroup.pm
index 1418173..b22f9d7 100644
--- a/web/modules/rhn/RHN/DB/ServerGroup.pm
+++ b/web/modules/rhn/RHN/DB/ServerGroup.pm
@@ -201,37 +201,23 @@ sub remove {
# 1. Remove the user permissions to the group.
# First, so that user perms won't be regenerated twice.
- my $query = <<EOQ;
-DECLARE
- cursor uids is
+ for my $uid ( @{ $dbh->selectcol_arrayref( <<EOQ, {}, $group_id) } ) {
select user_id id
from rhnUserServerGroupPerms
- where server_group_id = :server_group_id;
-BEGIN
- for u in uids loop
- rhn_user.remove_servergroup_perm(u.id, :server_group_id);
- end loop;
-END;
+ where server_group_id = ?
EOQ
- my $sth = $dbh->prepare($query);
- $sth->execute_h(server_group_id => $group_id);
+ $dbh->call_procedure('rhn_user.remove_servergroup_perm', $uid, $group_id);
+ }
# 2. Remove systems from system group
- $query = <<EOQ;
-BEGIN
- rhn_server.clear_servergroup(:server_group_id);
-END;
-EOQ
-
- $sth = $dbh->prepare($query);
- $sth->execute_h(server_group_id => $group_id);
+ $dbh->call_procedure('rhn_server.clear_servergroup', $group_id);
# 3. Remove the group itself
- $query = <<EOQ;
+ my $query = <<EOQ;
DELETE FROM rhnServerGroup SG WHERE SG.id = ?
EOQ
- $sth = $dbh->prepare($query);
+ my $sth = $dbh->prepare($query);
$sth->execute($group_id);
$dbh->commit();
13 years, 2 months
backend/satellite_tools
by Šimon Lukašík
backend/satellite_tools/rhn_satellite_activate.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit 13ed3af68f3305f94dff0eb34adcdf2130ae6942
Author: Simon Lukasik <slukasik(a)redhat.com>
Date: Wed Mar 9 10:48:41 2011 +0100
The file attribute has been renamed to filename
The original change was 96be8dcdb140f5820b15f0c38b0c49a9eaf54cbc.
Adressing:
Traceback (most recent call last):
File "/usr/bin/rhn-satellite-activate", line 43, in ?
sys.exit(abs(mod.main() or 0))
File "/usr/lib/python2.4/site-packages/spacewalk/satellite_tools/rhn_satellite_activate.py", line 586, in main
print ("Database connectioned initialized: refer to %s" %
File "/usr/lib/python2.4/site-packages/spacewalk/common/rhnConfig.py", line 356, in __getattr__
raise AttributeError(key)
AttributeError: file
diff --git a/backend/satellite_tools/rhn_satellite_activate.py b/backend/satellite_tools/rhn_satellite_activate.py
index 96c6222..eb4e14e 100644
--- a/backend/satellite_tools/rhn_satellite_activate.py
+++ b/backend/satellite_tools/rhn_satellite_activate.py
@@ -584,7 +584,7 @@ def main():
username=db_user, password=db_password, database=database)
if options.verbose:
print ("Database connectioned initialized: refer to %s" %
- CFG.file)
+ CFG.filename)
activateSatellite_local(options)
except RHNCertLocalActivationException, e:
writeError(e)
13 years, 2 months
client/tools
by Miroslav Suchý
client/tools/spacewalk-remote-utils/spacewalk-create-channel/spacewalk-create-channel | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
New commits:
commit 502cf4c2b03e3213a9cbf652c857d37b94e65eb4
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Tue Mar 8 23:19:03 2011 +0100
replace dead code with default from optparse
defaulting server to localhost is nice, but is is overwriten 3 lines after validate_options()
we can use instead default from optparse
diff --git a/client/tools/spacewalk-remote-utils/spacewalk-create-channel/spacewalk-create-channel b/client/tools/spacewalk-remote-utils/spacewalk-create-channel/spacewalk-create-channel
index 33346a2..46d8718 100755
--- a/client/tools/spacewalk-remote-utils/spacewalk-create-channel/spacewalk-create-channel
+++ b/client/tools/spacewalk-remote-utils/spacewalk-create-channel/spacewalk-create-channel
@@ -50,7 +50,7 @@ def get_args():
[-C | --clear] [-n | --nossl]""")
parser.add_option("-n", "--nossl", action="store_false", dest="ssl", default=True, help="disables the use of SSL when connecting to the server")
parser.add_option("-C", "--clear", action="store_true", dest="clear_channel", help="remove all channel packages from the channel before adding")
- parser.add_option("-s", "--server", action="store", dest="server", help="the server to connect to (i.e. hostname.domain.com)")
+ parser.add_option("-s", "--server", action="store", dest="server", default="localhost", help="the server to connect to (i.e. hostname.domain.com) [default: %default]")
parser.add_option("-l", "--user", action="store", dest="user", help="the user to connect as")
parser.add_option("-p", "--password", action="store", dest="password", help="the password to use for the connection (if not specified, will be prompted for)")
parser.add_option("-v", "--version", action="store", dest="version", help='the version to use (i.e.' + string.join(versions, ', ') +')')
@@ -100,10 +100,6 @@ def validate_options(options):
if error:
sys.exit(1)
- if not options.server:
- server = "localhost"
- print "No server specified, defaulting to localhost."
-
def main():
13 years, 2 months
Changes to 'refs/tags/rhnclient-0.12-1'
by Miroslav Suchý
Tag 'rhnclient-0.12-1' created by Miroslav Suchý <msuchy(a)redhat.com> at 2011-03-08 22:02 +0000
Tagging package [rhnclient] version [0.12-1] in directory [client/solaris/rhnclient/].
Changes since rhnclient-0.11-1:
Miroslav Suchý (2):
add binutils-devel as buildrequires
Automatic commit of package [rhnclient] release [0.12-1].
---
client/solaris/rhnclient/rhnclient.spec | 7 +++++--
client/solaris/rhnclient/setup.py | 2 +-
rel-eng/packages/rhnclient | 2 +-
3 files changed, 7 insertions(+), 4 deletions(-)
---
13 years, 2 months
2 commits - client/solaris rel-eng/packages
by Miroslav Suchý
client/solaris/rhnclient/rhnclient.spec | 7 +++++--
client/solaris/rhnclient/setup.py | 2 +-
rel-eng/packages/rhnclient | 2 +-
3 files changed, 7 insertions(+), 4 deletions(-)
New commits:
commit 819abd45f0c540500b2ff6a861034fe73ae51e52
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Tue Mar 8 23:02:26 2011 +0100
Automatic commit of package [rhnclient] release [0.12-1].
diff --git a/client/solaris/rhnclient/rhnclient.spec b/client/solaris/rhnclient/rhnclient.spec
index 27f6911..a6c1857 100644
--- a/client/solaris/rhnclient/rhnclient.spec
+++ b/client/solaris/rhnclient/rhnclient.spec
@@ -5,7 +5,7 @@
Summary: Red Hat Network Client Utilities and Libraries
Name: rhnclient
Source0: %{name}-%{version}.tar.gz
-Version: 0.11
+Version: 0.12
Release: 1
License: GPLv2
Group: Development/Libraries
@@ -64,6 +64,9 @@ rm -rf $RPM_BUILD_ROOT
#%doc ChangeLog COPYING README TODO
%changelog
+* Tue Mar 08 2011 Miroslav Suchý <msuchy(a)redhat.com> 0.12-1
+- add binutils-devel as buildrequires
+
* Tue Mar 08 2011 Miroslav Suchý <msuchy(a)redhat.com> 0.11-1
- removing files from rhn subdir - they are not used
- do not record installed files as it does not include .pyo files
diff --git a/client/solaris/rhnclient/setup.py b/client/solaris/rhnclient/setup.py
index a23d0fb..7356114 100644
--- a/client/solaris/rhnclient/setup.py
+++ b/client/solaris/rhnclient/setup.py
@@ -6,7 +6,7 @@
from distutils.core import setup
setup(name = "rhnclient",
- version = "0.11",
+ version = "0.12",
description = "Red Hat Network Client Utilities and Libraries",
long_description = """\
Red Hat Network Client Utilities
diff --git a/rel-eng/packages/rhnclient b/rel-eng/packages/rhnclient
index f4455c8..67c7ea3 100644
--- a/rel-eng/packages/rhnclient
+++ b/rel-eng/packages/rhnclient
@@ -1 +1 @@
-0.11-1 client/solaris/rhnclient/
+0.12-1 client/solaris/rhnclient/
commit dd6e5cd744ba39e051621fd36fe3b8b5497763bb
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Tue Mar 8 22:25:01 2011 +0100
add binutils-devel as buildrequires
addressing:
gcc -fPIC -DRHN_SYSID=\"//etc/sysconfig/rhn/systemid\" -DRHN_CHECK=\"///usr/sbin/rhn_check\" -DPATH_RHNDPID=\"//var/run//rhnsd.pid\" -Wall -O2 -fomit-frame-pointer -I/opt/redhat/gnupro-03r1-3/sources/tools/native/include -I/usr/local/include -c -o rhnsd.o rhnsd.c
gcc -o rhnsd rhnsd.o -liberty
/usr/bin/ld: cannot find -liberty
collect2: ld returned 1 exit status
diff --git a/client/solaris/rhnclient/rhnclient.spec b/client/solaris/rhnclient/rhnclient.spec
index e2fbe3d..27f6911 100644
--- a/client/solaris/rhnclient/rhnclient.spec
+++ b/client/solaris/rhnclient/rhnclient.spec
@@ -13,7 +13,7 @@ BuildRoot: %{_tmppath}/%{name}-buildroot
Prefix: %{_prefix}
#BuildArch: noarch
Requires: pyOpenSSL python
-BuildRequires: python-devel
+BuildRequires: python-devel binutils-devel
Url: http://rhn.redhat.com
%description
13 years, 2 months
Changes to 'refs/tags/rhnclient-0.11-1'
by Miroslav Suchý
Tag 'rhnclient-0.11-1' created by Miroslav Suchý <msuchy(a)redhat.com> at 2011-03-08 21:50 +0000
Tagging package [rhnclient] version [0.11-1] in directory [client/solaris/rhnclient/].
Changes since spacecmd-1.4.2-1:
Miroslav Suchý (4):
do not record installed files as it does not include .pyo files
removing files from rhn subdir - they are not used
change mode of python modules to reflect original behaviour
Automatic commit of package [rhnclient] release [0.11-1].
---
client/solaris/rhnclient/rhn/RHNS-CA-CERT | 204 ----------------
client/solaris/rhnclient/rhn/rhn_check.py | 322 --------------------------
client/solaris/rhnclient/rhn/rhnreg_ks.py | 341 ----------------------------
client/solaris/rhnclient/rhn/up2date.config | 86 -------
client/solaris/rhnclient/rhnclient.spec | 15 -
client/solaris/rhnclient/setup.py | 2
rel-eng/packages/rhnclient | 2
7 files changed, 11 insertions(+), 961 deletions(-)
---
13 years, 2 months
client/solaris rel-eng/packages
by Miroslav Suchý
client/solaris/rhnclient/rhnclient.spec | 6 +++++-
client/solaris/rhnclient/setup.py | 2 +-
rel-eng/packages/rhnclient | 2 +-
3 files changed, 7 insertions(+), 3 deletions(-)
New commits:
commit 1c4b916291185d4667924bcf3d891d8e59c0c91d
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Tue Mar 8 22:50:31 2011 +0100
Automatic commit of package [rhnclient] release [0.11-1].
diff --git a/client/solaris/rhnclient/rhnclient.spec b/client/solaris/rhnclient/rhnclient.spec
index dcb45a7..e2fbe3d 100644
--- a/client/solaris/rhnclient/rhnclient.spec
+++ b/client/solaris/rhnclient/rhnclient.spec
@@ -5,7 +5,7 @@
Summary: Red Hat Network Client Utilities and Libraries
Name: rhnclient
Source0: %{name}-%{version}.tar.gz
-Version: 0.10
+Version: 0.11
Release: 1
License: GPLv2
Group: Development/Libraries
@@ -64,6 +64,10 @@ rm -rf $RPM_BUILD_ROOT
#%doc ChangeLog COPYING README TODO
%changelog
+* Tue Mar 08 2011 Miroslav Suchý <msuchy(a)redhat.com> 0.11-1
+- removing files from rhn subdir - they are not used
+- do not record installed files as it does not include .pyo files
+
* Wed Dec 08 2010 Michael Mraka <michael.mraka(a)redhat.com> 0.10-1
- import Fault, ResponseError and ProtocolError directly from xmlrpclib
diff --git a/client/solaris/rhnclient/setup.py b/client/solaris/rhnclient/setup.py
index 02578fa..a23d0fb 100644
--- a/client/solaris/rhnclient/setup.py
+++ b/client/solaris/rhnclient/setup.py
@@ -6,7 +6,7 @@
from distutils.core import setup
setup(name = "rhnclient",
- version = "0.10",
+ version = "0.11",
description = "Red Hat Network Client Utilities and Libraries",
long_description = """\
Red Hat Network Client Utilities
diff --git a/rel-eng/packages/rhnclient b/rel-eng/packages/rhnclient
index fc27292..f4455c8 100644
--- a/rel-eng/packages/rhnclient
+++ b/rel-eng/packages/rhnclient
@@ -1 +1 @@
-0.10-1 client/solaris/rhnclient/
+0.11-1 client/solaris/rhnclient/
13 years, 2 months
3 commits - client/solaris
by Miroslav Suchý
client/solaris/rhnclient/rhn/RHNS-CA-CERT | 204 ----------------
client/solaris/rhnclient/rhn/rhn_check.py | 322 --------------------------
client/solaris/rhnclient/rhn/rhnreg_ks.py | 341 ----------------------------
client/solaris/rhnclient/rhn/up2date.config | 86 -------
client/solaris/rhnclient/rhnclient.spec | 9
5 files changed, 4 insertions(+), 958 deletions(-)
New commits:
commit c98c53a219f794f9db1643f6224f9b0de2d4bed1
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Tue Mar 8 22:44:16 2011 +0100
change mode of python modules to reflect original behaviour
diff --git a/client/solaris/rhnclient/rhn/actions/Makefile b/client/solaris/rhnclient/rhn/actions/Makefile
old mode 100644
new mode 100755
diff --git a/client/solaris/rhnclient/rhn/actions/__init__.py b/client/solaris/rhnclient/rhn/actions/__init__.py
old mode 100644
new mode 100755
diff --git a/client/solaris/rhnclient/rhn/actions/rhnsd.py b/client/solaris/rhnclient/rhn/actions/rhnsd.py
old mode 100644
new mode 100755
diff --git a/client/solaris/rhnclient/rhn/actions/systemid.py b/client/solaris/rhnclient/rhn/actions/systemid.py
old mode 100644
new mode 100755
diff --git a/client/solaris/rhnclient/rhn/actions/up2date_config.py b/client/solaris/rhnclient/rhn/actions/up2date_config.py
old mode 100644
new mode 100755
diff --git a/client/solaris/rhnclient/rhn/client/Makefile b/client/solaris/rhnclient/rhn/client/Makefile
old mode 100644
new mode 100755
diff --git a/client/solaris/rhnclient/rhn/client/__init__.py b/client/solaris/rhnclient/rhn/client/__init__.py
old mode 100644
new mode 100755
diff --git a/client/solaris/rhnclient/rhn/client/capabilities.py b/client/solaris/rhnclient/rhn/client/capabilities.py
old mode 100644
new mode 100755
diff --git a/client/solaris/rhnclient/rhn/client/clientCaps.py b/client/solaris/rhnclient/rhn/client/clientCaps.py
old mode 100644
new mode 100755
diff --git a/client/solaris/rhnclient/rhn/client/config.py b/client/solaris/rhnclient/rhn/client/config.py
old mode 100644
new mode 100755
diff --git a/client/solaris/rhnclient/rhn/client/rhnAuth.py b/client/solaris/rhnclient/rhn/client/rhnAuth.py
old mode 100644
new mode 100755
diff --git a/client/solaris/rhnclient/rhn/client/rhnErrors.py b/client/solaris/rhnclient/rhn/client/rhnErrors.py
old mode 100644
new mode 100755
diff --git a/client/solaris/rhnclient/rhn/client/rhnHardware.py b/client/solaris/rhnclient/rhn/client/rhnHardware.py
old mode 100644
new mode 100755
diff --git a/client/solaris/rhnclient/rhn/client/rhnLog.py b/client/solaris/rhnclient/rhn/client/rhnLog.py
old mode 100644
new mode 100755
diff --git a/client/solaris/rhnclient/rhn/client/rhnPackages.py b/client/solaris/rhnclient/rhn/client/rhnPackages.py
old mode 100644
new mode 100755
diff --git a/client/solaris/rhnclient/rhn/client/rhnUtils.py b/client/solaris/rhnclient/rhn/client/rhnUtils.py
old mode 100644
new mode 100755
diff --git a/client/solaris/rhnclient/rhn/client/rpcServer.py b/client/solaris/rhnclient/rhn/client/rpcServer.py
old mode 100644
new mode 100755
diff --git a/client/solaris/rhnclient/rhn/client/translate.py b/client/solaris/rhnclient/rhn/client/translate.py
old mode 100644
new mode 100755
commit c01e554bd13494852a495947dcce9c6f85cc8c9b
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Tue Mar 8 22:26:54 2011 +0100
removing files from rhn subdir - they are not used
diff --git a/client/solaris/rhnclient/rhn/RHNS-CA-CERT b/client/solaris/rhnclient/rhn/RHNS-CA-CERT
deleted file mode 100644
index 51094d0..0000000
--- a/client/solaris/rhnclient/rhn/RHNS-CA-CERT
+++ /dev/null
@@ -1,204 +0,0 @@
-Certificate:
- Data:
- Version: 3 (0x2)
- Serial Number: 0 (0x0)
- Signature Algorithm: md5WithRSAEncryption
- Issuer: C=US, ST=North Carolina, L=Research Triangle Park, O=Red Hat, Inc., OU=Red Hat Network Services, CN=RHNS Certificate Authority/Email=rhns(a)redhat.com
- Validity
- Not Before: Aug 23 22:45:55 2000 GMT
- Not After : Aug 28 22:45:55 2003 GMT
- Subject: C=US, ST=North Carolina, L=Research Triangle Park, O=Red Hat, Inc., OU=Red Hat Network Services, CN=RHNS Certificate Authority/Email=rhns(a)redhat.com
- Subject Public Key Info:
- Public Key Algorithm: rsaEncryption
- RSA Public Key: (1024 bit)
- Modulus (1024 bit):
- 00:c0:68:2b:12:30:e2:21:2d:22:c6:72:71:5b:bf:
- 17:a0:93:10:e9:9b:e3:c9:8d:3b:2d:ac:c4:bb:95:
- 3b:e0:ca:55:32:dc:95:c2:10:b3:04:b2:51:fb:e8:
- 85:61:16:34:a5:b4:1d:67:5c:a7:77:f4:f0:92:da:
- b4:8b:af:95:93:62:f3:66:29:ae:c0:88:b7:64:84:
- 0e:48:90:60:f8:60:3e:00:7f:54:dd:17:a6:ac:18:
- e0:42:de:7c:be:90:81:f7:f4:05:85:0a:08:cc:d5:
- f2:9f:fc:24:8b:77:a5:3d:e9:48:a9:ef:0f:3b:63:
- a3:fe:a6:83:4c:e8:dc:0b:77
- Exponent: 65537 (0x10001)
- X509v3 extensions:
- X509v3 Subject Key Identifier:
- 54:15:CD:9F:2C:F7:EC:0D:1F:D2:A8:BE:4C:07:AC:88:3E:FB:9B:0A
- X509v3 Authority Key Identifier:
- keyid:54:15:CD:9F:2C:F7:EC:0D:1F:D2:A8:BE:4C:07:AC:88:3E:FB:9B:0A
- DirName:/C=US/ST=North Carolina/L=Research Triangle Park/O=Red Hat, Inc./OU=Red Hat Network Services/CN=RHNS Certificate Authority/Email=rhns(a)redhat.com
- serial:00
-
- X509v3 Basic Constraints:
- CA:TRUE
- Signature Algorithm: md5WithRSAEncryption
- 93:01:88:88:67:67:91:8c:9e:d0:12:14:90:71:12:87:55:0a:
- f2:52:1b:ad:f2:d3:07:1d:af:70:99:bb:b0:cd:80:23:c9:ed:
- 2b:73:e9:63:b1:d0:b3:8c:60:c5:42:64:a6:c1:95:56:90:c5:
- 35:06:03:58:f5:8e:2b:d9:f9:a9:a0:10:a9:99:f7:15:42:92:
- a5:50:d7:11:07:f1:02:d5:e0:70:e4:55:6e:2a:ce:25:f8:5d:
- cd:0b:2f:10:61:f8:f6:20:42:cc:c3:89:f8:8a:4f:82:24:12:
- cf:39:7f:21:a8:2c:8d:52:97:52:c5:f7:5f:42:a5:87:09:66:
- b0:cc
------BEGIN CERTIFICATE-----
-MIIEMDCCA5mgAwIBAgIBADANBgkqhkiG9w0BAQQFADCBxzELMAkGA1UEBhMCVVMx
-FzAVBgNVBAgTDk5vcnRoIENhcm9saW5hMR8wHQYDVQQHExZSZXNlYXJjaCBUcmlh
-bmdsZSBQYXJrMRYwFAYDVQQKEw1SZWQgSGF0LCBJbmMuMSEwHwYDVQQLExhSZWQg
-SGF0IE5ldHdvcmsgU2VydmljZXMxIzAhBgNVBAMTGlJITlMgQ2VydGlmaWNhdGUg
-QXV0aG9yaXR5MR4wHAYJKoZIhvcNAQkBFg9yaG5zQHJlZGhhdC5jb20wHhcNMDAw
-ODIzMjI0NTU1WhcNMDMwODI4MjI0NTU1WjCBxzELMAkGA1UEBhMCVVMxFzAVBgNV
-BAgTDk5vcnRoIENhcm9saW5hMR8wHQYDVQQHExZSZXNlYXJjaCBUcmlhbmdsZSBQ
-YXJrMRYwFAYDVQQKEw1SZWQgSGF0LCBJbmMuMSEwHwYDVQQLExhSZWQgSGF0IE5l
-dHdvcmsgU2VydmljZXMxIzAhBgNVBAMTGlJITlMgQ2VydGlmaWNhdGUgQXV0aG9y
-aXR5MR4wHAYJKoZIhvcNAQkBFg9yaG5zQHJlZGhhdC5jb20wgZ8wDQYJKoZIhvcN
-AQEBBQADgY0AMIGJAoGBAMBoKxIw4iEtIsZycVu/F6CTEOmb48mNOy2sxLuVO+DK
-VTLclcIQswSyUfvohWEWNKW0HWdcp3f08JLatIuvlZNi82YprsCIt2SEDkiQYPhg
-PgB/VN0XpqwY4ELefL6Qgff0BYUKCMzV8p/8JIt3pT3pSKnvDztjo/6mg0zo3At3
-AgMBAAGjggEoMIIBJDAdBgNVHQ4EFgQUVBXNnyz37A0f0qi+TAesiD77mwowgfQG
-A1UdIwSB7DCB6YAUVBXNnyz37A0f0qi+TAesiD77mwqhgc2kgcowgccxCzAJBgNV
-BAYTAlVTMRcwFQYDVQQIEw5Ob3J0aCBDYXJvbGluYTEfMB0GA1UEBxMWUmVzZWFy
-Y2ggVHJpYW5nbGUgUGFyazEWMBQGA1UEChMNUmVkIEhhdCwgSW5jLjEhMB8GA1UE
-CxMYUmVkIEhhdCBOZXR3b3JrIFNlcnZpY2VzMSMwIQYDVQQDExpSSE5TIENlcnRp
-ZmljYXRlIEF1dGhvcml0eTEeMBwGCSqGSIb3DQEJARYPcmhuc0ByZWRoYXQuY29t
-ggEAMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEEBQADgYEAkwGIiGdnkYye0BIU
-kHESh1UK8lIbrfLTBx2vcJm7sM2AI8ntK3PpY7HQs4xgxUJkpsGVVpDFNQYDWPWO
-K9n5qaAQqZn3FUKSpVDXEQfxAtXgcORVbirOJfhdzQsvEGH49iBCzMOJ+IpPgiQS
-zzl/IagsjVKXUsX3X0KlhwlmsMw=
------END CERTIFICATE-----
-
-Certificate:
- Data:
- Version: 3 (0x2)
- Serial Number: 0 (0x0)
- Signature Algorithm: md5WithRSAEncryption
- Issuer: C=US, ST=North Carolina, L=Raleigh, O=Red Hat, Inc., OU=Red Hat Network, CN=RHN Certificate Authority/Email=rhn-noc(a)redhat.com
- Validity
- Not Before: Sep 5 20:45:16 2002 GMT
- Not After : Sep 9 20:45:16 2007 GMT
- Subject: C=US, ST=North Carolina, L=Raleigh, O=Red Hat, Inc., OU=Red Hat Network, CN=RHN Certificate Authority/Email=rhn-noc(a)redhat.com
- Subject Public Key Info:
- Public Key Algorithm: rsaEncryption
- RSA Public Key: (1024 bit)
- Modulus (1024 bit):
- 00:b3:16:b7:c5:f5:b9:69:51:1f:cd:b4:3d:70:cf:
- 60:57:85:a4:2a:a7:5d:28:22:0e:ec:19:e2:92:f7:
- 48:97:a6:a6:1f:51:95:83:11:8f:9a:98:a2:90:e0:
- cb:4a:24:19:94:a8:8a:4b:88:b4:06:6c:ce:77:d7:
- 15:3b:3c:cd:66:83:cf:23:1d:0d:bc:0a:0c:cb:1f:
- cb:40:fb:f3:d9:fe:2a:b4:85:2c:7b:c9:a1:fe:f3:
- 8f:68:1d:f2:12:b1:a4:16:19:ce:0f:b8:9a:9c:d9:
- bc:5f:49:62:b2:95:93:ce:5d:2e:dd:79:3c:f1:5b:
- a6:b7:a2:b5:39:0d:8e:12:31
- Exponent: 65537 (0x10001)
- X509v3 extensions:
- X509v3 Subject Key Identifier:
- 7F:1B:64:A1:2E:02:C5:A8:7D:B8:D1:B1:8B:06:9D:A3:A9:50:63:92
- X509v3 Authority Key Identifier:
- keyid:7F:1B:64:A1:2E:02:C5:A8:7D:B8:D1:B1:8B:06:9D:A3:A9:50:63:92
- DirName:/C=US/ST=North Carolina/L=Raleigh/O=Red Hat, Inc./OU=Red Hat Network/CN=RHN Certificate Authority/Email=rhn-noc(a)redhat.com
- serial:00
-
- X509v3 Basic Constraints:
- CA:TRUE
- Signature Algorithm: md5WithRSAEncryption
- 28:4d:42:e5:34:22:dd:c6:86:63:04:75:52:67:17:45:72:f2:
- 3b:21:2b:45:59:72:73:f7:59:36:9d:57:43:c6:dc:94:0f:0e:
- ff:13:5c:4f:50:37:85:b2:e4:c2:1f:35:9f:74:f4:e7:53:fb:
- a1:06:b8:39:ce:e4:0a:86:7b:5f:28:5d:c7:11:9e:12:a5:d6:
- b9:6c:e9:18:09:d5:f0:42:e7:54:b5:91:9e:23:ad:12:7a:aa:
- 72:7c:39:3c:83:f8:75:a4:7b:03:92:ff:2a:d4:c5:76:19:12:
- fa:b4:3b:b0:89:2c:95:8c:01:90:0d:d8:ba:06:05:61:00:ac:
- 95:da
------BEGIN CERTIFICATE-----
-MIID7jCCA1egAwIBAgIBADANBgkqhkiG9w0BAQQFADCBsTELMAkGA1UEBhMCVVMx
-FzAVBgNVBAgTDk5vcnRoIENhcm9saW5hMRAwDgYDVQQHEwdSYWxlaWdoMRYwFAYD
-VQQKEw1SZWQgSGF0LCBJbmMuMRgwFgYDVQQLEw9SZWQgSGF0IE5ldHdvcmsxIjAg
-BgNVBAMTGVJITiBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkxITAfBgkqhkiG9w0BCQEW
-EnJobi1ub2NAcmVkaGF0LmNvbTAeFw0wMjA5MDUyMDQ1MTZaFw0wNzA5MDkyMDQ1
-MTZaMIGxMQswCQYDVQQGEwJVUzEXMBUGA1UECBMOTm9ydGggQ2Fyb2xpbmExEDAO
-BgNVBAcTB1JhbGVpZ2gxFjAUBgNVBAoTDVJlZCBIYXQsIEluYy4xGDAWBgNVBAsT
-D1JlZCBIYXQgTmV0d29yazEiMCAGA1UEAxMZUkhOIENlcnRpZmljYXRlIEF1dGhv
-cml0eTEhMB8GCSqGSIb3DQEJARYScmhuLW5vY0ByZWRoYXQuY29tMIGfMA0GCSqG
-SIb3DQEBAQUAA4GNADCBiQKBgQCzFrfF9blpUR/NtD1wz2BXhaQqp10oIg7sGeKS
-90iXpqYfUZWDEY+amKKQ4MtKJBmUqIpLiLQGbM531xU7PM1mg88jHQ28CgzLH8tA
-+/PZ/iq0hSx7yaH+849oHfISsaQWGc4PuJqc2bxfSWKylZPOXS7deTzxW6a3orU5
-DY4SMQIDAQABo4IBEjCCAQ4wHQYDVR0OBBYEFH8bZKEuAsWofbjRsYsGnaOpUGOS
-MIHeBgNVHSMEgdYwgdOAFH8bZKEuAsWofbjRsYsGnaOpUGOSoYG3pIG0MIGxMQsw
-CQYDVQQGEwJVUzEXMBUGA1UECBMOTm9ydGggQ2Fyb2xpbmExEDAOBgNVBAcTB1Jh
-bGVpZ2gxFjAUBgNVBAoTDVJlZCBIYXQsIEluYy4xGDAWBgNVBAsTD1JlZCBIYXQg
-TmV0d29yazEiMCAGA1UEAxMZUkhOIENlcnRpZmljYXRlIEF1dGhvcml0eTEhMB8G
-CSqGSIb3DQEJARYScmhuLW5vY0ByZWRoYXQuY29tggEAMAwGA1UdEwQFMAMBAf8w
-DQYJKoZIhvcNAQEEBQADgYEAKE1C5TQi3caGYwR1UmcXRXLyOyErRVlyc/dZNp1X
-Q8bclA8O/xNcT1A3hbLkwh81n3T051P7oQa4Oc7kCoZ7XyhdxxGeEqXWuWzpGAnV
-8ELnVLWRniOtEnqqcnw5PIP4daR7A5L/KtTFdhkS+rQ7sIkslYwBkA3YugYFYQCs
-ldo=
------END CERTIFICATE-----
-
-Certificate:
- Data:
- Version: 3 (0x2)
- Serial Number: 0 (0x0)
- Signature Algorithm: md5WithRSAEncryption
- Issuer: C=US, ST=North Carolina, L=Raleigh, O=Red Hat, Inc., OU=Red Hat Network, CN=RHN Certificate Authority/emailAddress=rhn-noc(a)redhat.com
- Validity
- Not Before: Aug 29 02:10:55 2003 GMT
- Not After : Aug 26 02:10:55 2013 GMT
- Subject: C=US, ST=North Carolina, L=Raleigh, O=Red Hat, Inc., OU=Red Hat Network, CN=RHN Certificate Authority/emailAddress=rhn-noc(a)redhat.com
- Subject Public Key Info:
- Public Key Algorithm: rsaEncryption
- RSA Public Key: (1024 bit)
- Modulus (1024 bit):
- 00:bf:61:63:eb:3d:8b:2b:45:48:e6:c2:fb:7c:d2:
- 21:21:b8:ec:90:93:41:30:7c:2c:8d:79:d5:14:e9:
- 0e:7e:3f:ef:d6:0a:9b:0a:a6:02:52:01:2d:26:96:
- a4:ed:bd:a9:9e:aa:08:03:c1:61:0a:41:80:ea:ae:
- 74:cc:61:26:d0:05:91:55:3e:66:14:a2:20:b3:d6:
- 9d:71:0c:ab:77:cc:f4:f0:11:b5:25:33:8a:4e:22:
- 9a:10:36:67:fa:11:6d:48:76:3a:1f:d2:e3:44:7b:
- 89:66:be:b4:85:fb:2f:a6:aa:13:fa:9a:6d:c9:bb:
- 18:c4:04:af:4f:15:69:89:9b
- Exponent: 65537 (0x10001)
- X509v3 extensions:
- X509v3 Subject Key Identifier:
- 69:44:27:05:DC:2E:ED:A5:F4:81:C4:D7:78:45:E7:44:5D:F8:87:47
- X509v3 Authority Key Identifier:
- keyid:69:44:27:05:DC:2E:ED:A5:F4:81:C4:D7:78:45:E7:44:5D:F8:87:47
- DirName:/C=US/ST=North Carolina/L=Raleigh/O=Red Hat, Inc./OU=Red Hat Network/CN=RHN Certificate Authority/emailAddress=rhn-noc(a)redhat.com
- serial:00
-
- X509v3 Basic Constraints:
- CA:TRUE
- Signature Algorithm: md5WithRSAEncryption
- 23:c9:ca:07:9f:5e:96:39:83:e0:4e:da:dd:47:84:30:ca:d4:
- d5:38:86:f9:de:88:83:ca:2c:47:26:36:ab:f4:14:1e:28:29:
- de:7d:10:4a:5e:91:3e:5a:99:07:0c:a9:2e:e3:fb:78:44:49:
- c5:32:d6:e8:7a:97:ff:29:d0:33:ae:26:ba:76:06:7e:79:97:
- 17:0c:4f:2d:2a:8b:8a:ac:41:59:ae:e9:c4:55:2d:b9:88:df:
- 9b:7b:41:f8:32:2e:ee:c9:c0:59:e2:30:57:5e:37:47:29:c0:
- 2d:78:33:d3:ce:a3:2b:dc:84:da:bf:3b:2e:4b:b6:b3:b6:4e:
- 9e:80
------BEGIN CERTIFICATE-----
-MIID7jCCA1egAwIBAgIBADANBgkqhkiG9w0BAQQFADCBsTELMAkGA1UEBhMCVVMx
-FzAVBgNVBAgTDk5vcnRoIENhcm9saW5hMRAwDgYDVQQHEwdSYWxlaWdoMRYwFAYD
-VQQKEw1SZWQgSGF0LCBJbmMuMRgwFgYDVQQLEw9SZWQgSGF0IE5ldHdvcmsxIjAg
-BgNVBAMTGVJITiBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkxITAfBgkqhkiG9w0BCQEW
-EnJobi1ub2NAcmVkaGF0LmNvbTAeFw0wMzA4MjkwMjEwNTVaFw0xMzA4MjYwMjEw
-NTVaMIGxMQswCQYDVQQGEwJVUzEXMBUGA1UECBMOTm9ydGggQ2Fyb2xpbmExEDAO
-BgNVBAcTB1JhbGVpZ2gxFjAUBgNVBAoTDVJlZCBIYXQsIEluYy4xGDAWBgNVBAsT
-D1JlZCBIYXQgTmV0d29yazEiMCAGA1UEAxMZUkhOIENlcnRpZmljYXRlIEF1dGhv
-cml0eTEhMB8GCSqGSIb3DQEJARYScmhuLW5vY0ByZWRoYXQuY29tMIGfMA0GCSqG
-SIb3DQEBAQUAA4GNADCBiQKBgQC/YWPrPYsrRUjmwvt80iEhuOyQk0EwfCyNedUU
-6Q5+P+/WCpsKpgJSAS0mlqTtvameqggDwWEKQYDqrnTMYSbQBZFVPmYUoiCz1p1x
-DKt3zPTwEbUlM4pOIpoQNmf6EW1Idjof0uNEe4lmvrSF+y+mqhP6mm3JuxjEBK9P
-FWmJmwIDAQABo4IBEjCCAQ4wHQYDVR0OBBYEFGlEJwXcLu2l9IHE13hF50Rd+IdH
-MIHeBgNVHSMEgdYwgdOAFGlEJwXcLu2l9IHE13hF50Rd+IdHoYG3pIG0MIGxMQsw
-CQYDVQQGEwJVUzEXMBUGA1UECBMOTm9ydGggQ2Fyb2xpbmExEDAOBgNVBAcTB1Jh
-bGVpZ2gxFjAUBgNVBAoTDVJlZCBIYXQsIEluYy4xGDAWBgNVBAsTD1JlZCBIYXQg
-TmV0d29yazEiMCAGA1UEAxMZUkhOIENlcnRpZmljYXRlIEF1dGhvcml0eTEhMB8G
-CSqGSIb3DQEJARYScmhuLW5vY0ByZWRoYXQuY29tggEAMAwGA1UdEwQFMAMBAf8w
-DQYJKoZIhvcNAQEEBQADgYEAI8nKB59eljmD4E7a3UeEMMrU1TiG+d6Ig8osRyY2
-q/QUHigp3n0QSl6RPlqZBwypLuP7eERJxTLW6HqX/ynQM64munYGfnmXFwxPLSqL
-iqxBWa7pxFUtuYjfm3tB+DIu7snAWeIwV143RynALXgz086jK9yE2r87Lku2s7ZO
-noA=
------END CERTIFICATE-----
diff --git a/client/solaris/rhnclient/rhn/rhn_check.py b/client/solaris/rhnclient/rhn/rhn_check.py
deleted file mode 100755
index bcc1a37..0000000
--- a/client/solaris/rhnclient/rhn/rhn_check.py
+++ /dev/null
@@ -1,322 +0,0 @@
-#!/usr/bin/python
-#
-# Python client for checking periodically for posted actions
-# on the Red Hat Network servers.
-#
-# Copyright (c) 2000--2010 Red Hat, Inc. Distributed under GPL.
-# Authors: Cristian Gafton <gafton(a)redhat.com>,
-# Preston Brown <pbrown(a)redhat.com>
-# Adrian Likins <alikins(a)redhat.com>
-#
-# $Id: rhn_check.py,v 1.11 2004/12/07 17:09:10 misa Exp $
-
-import os
-import sys
-import socket
-import string
-import getopt
-import fnmatch
-import traceback
-import time
-
-from OpenSSL import SSL
-PREFIX="/"
-MODULEPATH="%s/usr/share/rhn" % PREFIX
-sys.path.append(MODULEPATH)
-
-import actions
-from client.translate import _
-from client import rhnErrors
-from client import rhnAuth
-from client import rhnLog
-from client import rpcServer
-from client import config
-from client import clientCaps
-from client import capabilities
-
-import xmlrpclib
-
-cfg = config.initUp2dateConfig()
-log = rhnLog.initLog()
-
-# action version we understand
-ACTION_VERSION = 2
-
-# lock file to check if we're disabled at the server's request
-DISABLE_FILE = os.path.join(config.RHN_SYSCONFIG_DIR, "disable")
-
-# path location of the CA cert file
-rhns_ca_cert = cfg['sslCACert']
-
-# Exceptions
-class UnknownXML:
- def __init__(self, value):
- self.__value = value
-
- def __repr__(self):
- return "Invalid request received (%s)." % self.__value
-
-
-def showHelp():
- print _("Usage: rhn_check [options]")
- print ""
- print _("Available command line options:")
- print _("-h, --help - this help ")
- print _("-v, --verbose - increasing verbosity ")
- print ""
-
-
-LOCAL_ACTIONS = [("solarispkgs.checkNeedUpdate", ("rhnsd=1",))]
-def run_local_actions():
- # If we want to run any actions everytime rhnsd runs rhn_check,
- # we can add them to the list LOCAL_ACTIONS
-
- for method_params in LOCAL_ACTIONS:
- method = method_params[0]
- params = method_params[1]
- (status, message, data) = run_action(method, params)
- log.log_debug("local action status: ", (status, message, data))
-
-# submit a response for an action_id
-def submit_response(action_id, status, message, data):
- global server
- # try to submit
- try:
- ret = rpcServer.doCall(server.queue.submit,rhnAuth.getSystemId(),
- action_id, status, message, data)
- except xmlrpclib.Fault, f:
- print "Could not submit results to server %s" % server
- print "Error code: %d%s" % (f.faultCode, f.faultString)
- sys.exit(-1)
- # XXX: what if no SSL in socket?
- except socket.sslerror:
- print "ERROR: SSL handshake to %s failed" % server
- print """
- This could signal that you are *NOT* talking to a server
- whose certificate was signed by a Certificate Authority
- listed in the %s file or that the
- RHNS-CA-CERT file is invalid.""" % rhns_ca_cert
- sys.exit(-1)
- except socket.error:
- print "Could not submit to %s.\n"\
- "Possible networking problem?" % str(server)
- sys.exit(-1)
- return ret
-
-###
-# Functions
-###
-def check_action(action):
- log.log_debug("check_action", action)
-
- # be very paranoid of what we get back
- if type(action) != type({}):
- print "Got unparseable action response from server"
- sys.exit(-1)
-
- for key in ['id', 'version', 'action']:
- if not action.has_key(key):
- print "Got invalid response - missing '%s'" % key
- sys.exit(-1)
- try:
- ver = int(action['version'])
- except:
- ver = -1
- if ver > ACTION_VERSION or ver < 0:
- print "Got unknown action version %d" % ver
- print action
- # the -99 here is kind of magic
- submit_response(action["id"],
- xmlrpclib.Fault(-99, "Can not handle this version"))
- return -1
- return 0
-
-def run_action(method, params):
- try:
- log.log_debug("do_call", method, params)
- (status, message, data) = actions.do_call(method, params)
- except (TypeError, ValueError, KeyError, IndexError):
- if cfg["debug"]:
- traceback.print_exc()
- # wrong number of arguments, wrong type of arguments, etc
- status = 6,
- message = "Fatal error in Python code occured"
- data = {}
- except UnknownXML:
- log.log_debug("Got unknown XML-RPC call", method, params)
- # invalid function called
- status = 6
- message = "Invalid function call attempted"
- data = {}
- except AttributeError:
- log.log_debug("Attempt to call an unsupported action", method, params)
- status = 6
- message = "Invalid function call attempted"
- data = {}
-
-
- return (status, message, data)
-
-# Wrapper handler for the action we're asked to do
-def handle_action(action):
- global server
-
- log.log_debug("handle_action", action)
-
- version = action['version']
- action_id = action['id']
- data = action['action']
-
- log.log_debug("handle_action actionid = %s, version = %s" % (
- action_id, version))
-
- # Decipher the data
- parser, decoder = xmlrpclib.getparser()
- parser.feed(data)
- parser.close()
- params = decoder.close()
- method = decoder.getmethodname()
- data = {}
-
- (status, message, data) = run_action(method, params)
-
- log.log_debug("Sending back response", (status, message, data))
- return submit_response(action_id, status, message, data)
-
-###
-# Init
-###
-# quick check for other instances of up2date/rhn_check
-##lock = None
-##try:
-## lock = rhnLockfile.Lockfile('/var/run/up2date.pid')
-##except rhnLockfile.LockfileLockedException, e:
-## sys.stderr.write("Attempting to run more than one instance of up2date/rhn_check. Exiting.\n")
-## sys.exit(0)
-
-try:
- opts, args = getopt.getopt(sys.argv[1:], "hv", ["help", "verbose"])
-except getopt.error, e:
- print _("Error parsing command list arguments: %s") % e
- showHelp()
- sys.exit(1)
-
-for (opt, val) in opts:
- if opt in ["--verbose", "-v"]:
- cfg["debug"] = cfg["debug"] + 1
- elif opt in ["--help", "-h"]:
- showHelp()
- sys.exit(0)
-
-# if we're disabled, go down (almost) quietly
-if os.path.exists(DISABLE_FILE):
- print "RHN service is disabled. Check %s" % DISABLE_FILE
- sys.exit(0)
-
-# retrieve the system_id. This is required.
-if not rhnAuth.getSystemId():
- print "ERROR: unable to read system id."
- sys.exit(-1)
-
-# Initialize the server connection...
-server = rpcServer.getServer()
-
-# send up the capabality info
-headerlist = clientCaps.caps.headerFormat()
-for (headerName, value) in headerlist:
- server.add_header(headerName, value)
-
-# the list of caps the client needs
-caps = capabilities.Capabilities()
-
-
-
-# PORT ME, actually, once the getVersionRelease
-# stuff is ported, this should just work
-#try:
-# rhnAuth.maybeUpdateVersion()
-#except rhnErrors.CommunicationError, e:
-# print e
-# sys.exit(1)
-
-
-###
-# Main PROGRAM
-###
-
-# Build a status report
-Status = {}
-Status["uname"] = os.uname()
-
-# PORTME
-if os.access("/proc/uptime", os.R_OK):
- uptime = string.split(open("/proc/uptime", "r").read())
- try:
- Status["uptime"] = map(int, map(float, uptime))
- except TypeError, ValueError:
- Status["uptime"] = map(lambda a: a[:-3], uptime)
- except:
- pass
-
-# Process all the actions we have in the queue
-
-has_logged_in = None
-while 1:
- try:
- action = rpcServer.doCall(server.queue.get,rhnAuth.getSystemId(),
- ACTION_VERSION, Status)
- except xmlrpclib.Fault, f:
- print "Could not retrieve action item from server %s" % server
- print "Error code: %d%s" % (f.faultCode, f.faultString)
- sys.exit(-1)
- # XXX: what if no SSL in socket?
- except socket.sslerror:
- print "ERROR: SSL handshake to %s failed" % server
- print """
- This could signal that you are *NOT* talking to a server
- whose certificate was signed by a Certificate Authority
- listed in the %s file or that the
- RHNS-CA-CERT file is invalid.""" % rhns_ca_cert
- sys.exit(-1)
- except socket.error:
- print "Could not retrieve action from %s.\n"\
- "Possible networking problem?" % str(server)
- sys.exit(-1)
- except rhnErrors.ServerCapabilityError, e:
- print e
- sys.exit(1)
- except SSL.Error, e:
- print "ERROR: SSL errors detected"
- print "%s" % e
- sys.exit(-1)
-
- # verify serv caps
- response_headers = server.get_response_headers()
- caps.populate(response_headers)
- # do we actually want to validte here?
- try:
- caps.validate()
- except rhnErrors.ServerCapabilityError, e:
- print e
- sys.exit(1)
-
-
- if action == "" or action == {}:
- break
-
- if check_action(action) == 0:
- if not has_logged_in:
- try:
- rhnAuth.updateLoginInfo()
- except rhnErrors.ServerCapabilityError, e:
- print e
- sys.exit(1)
- handle_action(action)
-
-# hit any actions that we want to always run
-run_local_actions()
-
-#if lock:
-# lock.release()
-
-sys.exit(0)
diff --git a/client/solaris/rhnclient/rhn/rhnreg_ks.py b/client/solaris/rhnclient/rhn/rhnreg_ks.py
deleted file mode 100755
index d51a5c9..0000000
--- a/client/solaris/rhnclient/rhn/rhnreg_ks.py
+++ /dev/null
@@ -1,341 +0,0 @@
-#!/usr/bin/python
-#
-# Registration client for the Red Hat Network for useage with kickstart
-# Copyright (c) 1999-2002 Red Hat, Inc. Distributed under GPL.
-#
-# Author: Adrian Likins <alikins(a)redhat.com>
-#
-# see the output of "--help" for the valid options.
-#
-# The contact info is in the form or a "key: value" one per line.
-# valid keys are:
-# reg_num, title, first_name, last_name, company,
-# position, address1, address2, city, state, zip,
-# country, phone, fax, contact_email, contact_mail,
-# contact_phone, contact_fax, contact_special,
-# contact_newsletter
-#
-#
-#
-import getopt
-import sys
-import os
-import string
-
-PREFIX="/"
-modulepath="%s/usr/share/rhn/" % PREFIX
-sys.path.append(modulepath)
-from client.translate import _
-from client import hardware
-#from client import packageUtils
-from client import rhnReg
-from client import rhnErrors
-from client import rhnUtils
-
-
-# XXX: convert to use Optik
-def printUsage():
- print _("Usage: rhnreg_ks [options]")
- print ""
- print _("Available command line options:")
- print _("-h, --help - this help ")
- print _(" --profilename=<value> - specify a profilename")
- print _(" --username=<value> - specify a username ")
- print _(" --password=<value> - specify a password ")
- print _(" --orgid=<value> - specify a organizational id ")
- print _(" --orgpassword=<value> - specify a organizational password")
- print _(" --noSSLServerURL=<url> - specify a url for a non ssl server")
- print _(" --useNoSSLForPackages - dont use ssl to download packages")
- print _(" --sslCACert=<path> - specify a file to use as the ssl CA cert")
- print _(" --serverUrl=<URL> - specify a url to use as a server")
- print _(" --email=<value> - specify a email address ")
- print _(" --activationkey=<value> - specify an activation key ")
- print _(" --contactinfo - read contact info from stdin ")
- print _(" --nohardware - do not probe or upload any hardware info ")
- print _(" --nopackages - do not profile or upload any package info ")
- print _(" --force - register the system even if it is already registered")
- print _(" --version - display the version ")
- print _(" --proxy - specify an http proxy to use ")
- print _(" --proxyUser=<value> - specify a username to use with an authenticated http proxy")
- print _(" --proxyPassword=<value> - specify a password to use with an authenticated http proxy")
- print ""
-
-
-def showVersion():
- print "Red Hat Network Registration Agent "\
- "(Kickstart Version) v%s" % rhnReg.version()
- print "Copyright (c) 1999-2002 Red Hat, Inc."
- print _("Licensed under terms of the GPL.")
-
-
-def readContactInfo():
- productInfo = [
- "reg_num",
- "title",
- "first_name",
- "last_name",
- "company",
- "position",
- "address1",
- "address2",
- "city",
- "state",
- "zip",
- "country",
- "phone",
- "fax",
- "contact_email",
- "contact_mail",
- "contact_phone",
- "contact_fax",
- "contact_special",
- "contact_newsletter"]
-
- # read a file from standard in or filename if specified
- L = sys.stdin.readlines()
-
- # parse it and build a dict
- info = {}
- for i in L:
- (key, value) = string.split(i, ':')
- info[key] = string.strip(value)
-
- #cleanse the hash for just the values we care about
- for i in info.keys():
- if i not in productInfo:
- del info[i]
-
- return info
-
-def generateProfileName(hardwareList):
- hostname = None
- ipaddr = None
- profileName = None
- for hw in hardwareList:
- if hw['class'] == 'NETINFO':
- hostname = hw.get('hostname')
- ipaddr = hw.get('ipaddr')
-
- if hostname:
- profileName = hostname
- else:
- if ipaddr:
- profileName = ipaddr
-
- if not profileName:
- print _("A profilename was not specified, "\
- "and hostname and IP address could not be determined "\
- "to use as a profilename, please specify one.")
- sys.exit(-1)
-
- return profileName
-
-
-def runRhnCheck():
- if rhnReg.cfg.has_key("rhnCheckPath"):
- rhncheck = rhnReg.cfg['rhnCheckPath']
- else:
- rhncheck = os.path.normpath("%s/usr/sbin/rhn_check" % PREFIX)
- os.system(rhncheck)
-
-
-def main(arglist=[]):
-
- if not len(arglist):
- arglist = sys.argv[1:]
- try:
- optlist, args = getopt.getopt(arglist,
- 'h',
- ['help',
- 'version',
- 'username=','password=',
- 'cryptedpassword=',
- 'orgid=','orgpassword=',
- 'profilename=',
- 'nopackages',
- 'nohardware',
- 'norhnsd',
- 'activationkey=',
- 'serialnumber=',
- 'serverUrl=',
- 'noSSLServerURL=',
- 'useNoSSLForPackages',
- 'proxy=',
- 'proxyUser=',
- 'proxyPassword=',
- 'sslCACert=',
- 'contactinfo',
- 'email=',"force",])
- except getopt.error, e:
- print _("Error parsing command list arguments: %s") % e
- printUsage()
- sys.exit(1)
-
- username = password = orgid = orgPassword = profilename = email = None
- force = None
- # for now, default to not sending packageinfo
- nopackages = 0
- nohardware = None
- serialnumber = None
- contactinfo = None
- norhnsd = 0
- oemInfo = {}
- ca_certs = []
-
- # to indicate we've potentially ran some sort of setup
- # to prevent up2date from asking this on first run in
- # the "rhnregks;up2date -u" case
- rhnReg.cfg.set("networkSetup", 1)
- rhnReg.cfg.save()
-
- save_cfg = 0
- for opt in optlist:
- if opt[0] in ['-h', "--help"]:
- printUsage()
- sys.exit(-1)
- if opt[0] == "--username":
- username = str(opt[1])
- if opt[0] == "--password":
- password = str(opt[1])
- if opt[0] == "--orgid":
- orgid = str(opt[1])
- if opt[0] == "--orgpassword":
- orgPassword = str(opt[1])
- if opt[0] == "--cryptedorgpassword":
- cryptOrgPassword = str(opt[1])
- if opt[0] == "--cryptedpassword":
- cryptPassword = str(opt[1])
- if opt[0] == "--profilename":
- profilename = str(opt[1])
- if opt[0] == "--email":
- email = str(opt[1])
- if opt[0] == "--force":
- force = 1
- if opt[0] == "--nopackages":
- nopackages = 1
- if opt[0] == "--nohardware":
- nohardware = 1
- if opt[0] == "--norhnsd":
- norhnsd = 1
- if opt[0] == "--serialnumber":
- print "--serialnumber is deprecated, please use --activationkey"
- serialnumber = str(opt[1])
- if opt[0] == "--activationkey":
- serialnumber = str(opt[1])
- if opt[0] == "--serverUrl":
- try:
- rhnReg.cfg.set("serverURL", rhnUtils.fix_url(opt[1]))
- except rhnErrors.InvalidUrlError:
- print "%s specified is not a valid url" % opt[1]
- save_cfg = 1
- if opt[0] == "--noSSLServerURL":
- rhnReg.cfg.set("noSSLServerURL", opt[1])
- save_cfg = 1
- if opt[0] == "--useNoSSLForPackages":
- rhnReg.cfg.set("useNoSSLForPackages", 1)
- save_cfg = 1
- if opt[0] == "--proxy":
- rhnReg.cfg.set("httpProxy", opt[1])
- rhnReg.cfg.set("enableProxy", 1)
- save_cfg = 1
- if opt[0] == "--proxyUser":
- rhnReg.cfg.set("proxyUser", opt[1])
- rhnReg.cfg.set("enableProxyAuth", 1)
- save_cfg = 1
- if opt[0] == "--proxyPassword":
- rhnReg.cfg.set("proxyPassword", opt[1])
- rhnReg.cfg.set("enableProxyAuth", 1)
- save_cfg = 1
- if opt[0] == "--sslCACert":
- ca_certs.append(opt[1])
-# rhnReg.cfg.set("sslCACert", opt[1])
- save_cfg = 1
- if opt[0] == "--contactinfo":
- contactinfo = readContactInfo()
- if opt[0] == "--version":
- showVersion()
- sys.exit(-1)
-
- if ca_certs:
- rhnReg.cfg.set("sslCACert", ca_certs)
-
- if save_cfg:
- rhnReg.cfg.save()
-
- if rhnReg.registered() and not force:
- print _("This system is already registered. Use --force to override")
- sys.exit(-1)
-
- if not serialnumber and (not username or not password and not email):
- print _("A username, password and email address are required "\
- "to register a system.")
- sys.exit(-1)
-
- rhnReg.getCaps()
-
- if not serialnumber:
- # reserver the username
- ret = rhnReg.reserveUser(username, password)
- rhnReg.registerUser(username, password, email, orgid, orgPassword)
-
-# FIXME (20050422): On Solaris we need call into smartpm for this
-# if not nopackages:
-# getInfo = 0
-# if rhnReg.cfg['supportsExtendedPackageProfile']:
-# getInfo = 1
-# # PORTME, if we care...
-# packageList = packageUtils.getInstalledPackageList()
-# else:
-# packageList = []
-
-
- # collect oemInfo
- oemInfo = rhnReg.getOemInfo()
-
- hardwareList = hardware.Hardware()
-
- if not profilename:
- profilename = generateProfileName(hardwareList)
-
- try:
- if serialnumber:
- systemId = rhnReg.registerSystem(token = serialnumber,
- profileName = profilename)
- else:
- systemId = rhnReg.registerSystem(username, password, profilename)
- except rhnErrors.AuthenticationTicketError, e:
- print "%s" % e.errmsg
- sys.exit(1)
- except rhnErrors.RhnUuidUniquenessError, e:
- print "%s" % e.errmsg
- sys.exit(1)
- except rhnErrors.CommunicationError, e:
- print "%s" % e.errmsg
- sys.exit(1)
-
-
- if serialnumber:
- rhnReg.sendSerialNumber(systemId, serialnumber)
-
- # collect hardware info, inluding hostname
- if not nohardware:
- rhnReg.sendHardware(systemId, hardwareList)
-
-# FIXME (20050422): On Solaris we need call into smartpm for this
-# if not nopackages:
-# rhnReg.sendPackages(systemId, packageList)
-
- if contactinfo:
- rhnReg.registerProduct(systemId, contactinfo, oemInfo)
-
- if not norhnsd:
- rhnReg.startRhnsd()
-
- # write out the new id
- rhnReg.writeSystemId(systemId)
-
- runRhnCheck()
-
-
-if __name__ == "__main__":
- main()
diff --git a/client/solaris/rhnclient/rhn/up2date.config b/client/solaris/rhnclient/rhn/up2date.config
deleted file mode 100644
index d0b4384..0000000
--- a/client/solaris/rhnclient/rhn/up2date.config
+++ /dev/null
@@ -1,86 +0,0 @@
-# Automatically generated Red Hat Update Agent config file, do not edit.
-# Format: 1.0
-
-enableRollbacks[comment]=Determine if up2date should create rollback rpms
-enableRollbacks=0
-
-noSSLServerURL[comment]=Remote server URL without SSL
-noSSLServerURL=http://xmlrpc.rhn.redhat.com/XMLRPC
-
-useNoSSLForPackages[comment] =Use the noSSLServerURL for package, package list, and header fetching
-useNoSSLForPackages=0
-
-debug[comment]=Whether or not debugging is enabled
-debug=0
-
-noReplaceConfig[comment]=When selected, no packages that would change configuration data are automatically installed
-noReplaceConfig=1
-
-retrieveOnly[comment]=Retrieve packages only
-retrieveOnly=0
-
-keepAfterInstall[comment]=Keep packages on disk after installation
-keepAfterInstall=0
-
-systemIdPath[comment]=Location of system id
-systemIdPath=/etc/sysconfig/rhn/systemid
-
-serverURL[comment]=Remote server URL
-serverURL=https://xmlrpc.rhn.redhat.com/XMLRPC
-
-pkgSkipList[comment]=A list of package names, optionally including wildcards, to skip
-pkgSkipList=kernel*;
-
-pkgsToInstallNotUpdate[comment]=A list of provides names or package names of packages to install not update
-pkgsToInstallNotUpdate=kernel;kernel-modules;
-
-adminAddress[comment]=List of e-mail addresses for update agent to communicate with when run in batch mode
-adminAddress=root@localhost;
-
-storageDir[comment]=Where to store packages and other data when they are retrieved
-storageDir=/var/spool/up2date
-
-fileSkipList[comment]=A list of file names, optionally including wildcards, to skip
-fileSkipList=;
-
-removeSkipList[comment]=A list of package names, optionally including wildcards that up2date will not remove
-removeSkipList=kernel*;
-
-enableProxy[comment]=Use a HTTP Proxy
-enableProxy=0
-
-retrieveSource[comment]=Retrieve source RPM along with binary package
-retrieveSource=0
-
-versionOverride[comment]=Override the automatically determined system version
-versionOverride=
-
-httpProxy[comment]=HTTP proxy in host:port format, e.g. squid.redhat.com:3128
-httpProxy=
-
-useGPG[comment]=Use GPG to verify package integrity
-useGPG=1
-
-gpgKeyRing[comment]=The location of the gpg keyring to use for package checking
-gpgKeyRing=/etc/sysconfig/rhn/up2date-keyring.gpg
-
-noBootLoader[comment]=To disable modification of the boot loader (lilo, silo, etc)
-noBootLoader=0
-
-noReboot[comment]=Disable the reboot actions
-noReboot=0
-
-networkRetries[comment]=Number of attempts to make at network connections before giving up
-networkRetries=5
-
-updateUp2date[comment]=Allow up2date to update itself when possible
-updateUp2date=1
-
-disallowConfChanges[comment]=Config options that can not be overwritten by a config update action
-disallowConfChanges=noReboot;sslCACert;useNoSSLForPackages;noSSLServerURL;serverURL;disallowConfChanges;
-
-sslCACert[comment]=The CA cert used to verify the ssl server
-sslCACert=/usr/share/rhn/RHNS-CA-CERT
-
-rhnCheckPath[comment]=The path to the rhn_check program
-rhnCheckPath=/usr/sbin/rhn_check
commit fdfc05fe3e56681cd3fc9eaa6aed6413bece93bf
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Tue Mar 8 22:38:21 2011 +0100
do not record installed files as it does not include .pyo files
diff --git a/client/solaris/rhnclient/rhnclient.spec b/client/solaris/rhnclient/rhnclient.spec
index e39d764..dcb45a7 100644
--- a/client/solaris/rhnclient/rhnclient.spec
+++ b/client/solaris/rhnclient/rhnclient.spec
@@ -29,10 +29,7 @@ client packages to communicate with RHN.
make
%install
-%{__python} setup.py install --root=$RPM_BUILD_ROOT --record=INSTALLED_FILES
-sed -e 's|/[^/]*$||' INSTALLED_FILES | grep "site-packages/" | \
- sort | uniq | awk '{ print "%attr(755,root,root) %dir " $1}' > INSTALLED_DIRS
-cat INSTALLED_FILES INSTALLED_DIRS > INSTALLED_OBJECTS
+%{__python} setup.py install --root=$RPM_BUILD_ROOT
%{__install} -d -m 0755 $RPM_BUILD_ROOT/usr/sbin/
%{__cp} -p rhn_check.py $RPM_BUILD_ROOT/usr/sbin/rhn_check
%{__cp} -p rhnsd $RPM_BUILD_ROOT/usr/sbin/rhnsd
@@ -53,10 +50,12 @@ touch $RPM_BUILD_ROOT/var/run/.keep
%clean
rm -rf $RPM_BUILD_ROOT
-%files -f INSTALLED_OBJECTS
+%files
%defattr(-,root,root)
%{shareroot}/rhn/*
/usr/sbin/*
+%{python_sitelib}/rhn/*
+%{python_sitelib}/rhnclient*
%{rhnconf}/*
/var/log/up2date
/var/run/.keep
13 years, 2 months