client/rhel/rhn-client-tools/data/rh_register.glade | 208 ++++++++++ client/rhel/rhn-client-tools/rhn-client-tools.spec | 12 client/rhel/rhn-client-tools/src/up2date_client/gui.py | 7 client/rhel/rhn-client-tools/src/up2date_client/rhnreg.py | 8 client/rhel/rhn-client-tools/src/up2date_client/rhnregGui.py | 17 client/rhel/rhn-client-tools/src/up2date_client/rhnreg_constants.py | 10 client/rhel/rhn-client-tools/src/up2date_client/tui.py | 46 ++ rel-eng/packages/rhn-client-tools | 2 8 files changed, 307 insertions(+), 3 deletions(-)
New commits: commit af80b813e89284c01b52ce0f07b86f57e826e539 Author: Miroslav Suchý msuchy@redhat.com Date: Tue Feb 8 16:54:21 2011 +0100
Automatic commit of package [rhn-client-tools] release [1.4.1-1].
diff --git a/client/rhel/rhn-client-tools/rhn-client-tools.spec b/client/rhel/rhn-client-tools/rhn-client-tools.spec index fae2629..917b3ea 100644 --- a/client/rhel/rhn-client-tools/rhn-client-tools.spec +++ b/client/rhel/rhn-client-tools/rhn-client-tools.spec @@ -4,7 +4,7 @@ Group: System Environment/Base Source0: https://fedorahosted.org/releases/s/p/spacewalk/%%7Bname%7D-%%7Bversion%7D.t... URL: https://fedorahosted.org/spacewalk Name: rhn-client-tools -Version: 1.4.0 +Version: 1.4.1 Release: 1%{?dist} BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch @@ -292,6 +292,16 @@ make -f Makefile.rhn-client-tools test %endif
%changelog +* Tue Feb 08 2011 Miroslav Suchý msuchy@redhat.com 1.4.1-1 +- fix typo +- 671039 - add warning about subsription manager to TUI part of rhn_register +- 671039 - add warning about subsription manager to GUI part of rhn_register +- l10n: Updates to German (de) translation (delouw@fedoraproject.org) +- 671041 - substitute RHN with "RHN Satellite or RHN Classic" +- 671032 - disable rhnplugin by default and enable it only after successful + registration +- Bumping package versions for 1.4 (tlestach@redhat.com) + * Mon Jan 31 2011 Miroslav Suchý msuchy@redhat.com 1.3.12-1 - cp firstboot/rhn_choose_channel.py firstboot-legacy-rhel5/
diff --git a/rel-eng/packages/rhn-client-tools b/rel-eng/packages/rhn-client-tools index 81aee16..89443ee 100644 --- a/rel-eng/packages/rhn-client-tools +++ b/rel-eng/packages/rhn-client-tools @@ -1 +1 @@ -1.3.12-1 client/rhel/rhn-client-tools/ +1.4.1-1 client/rhel/rhn-client-tools/
commit ec75cfa03587fbf04dde8c18bf4c357fc90599cb Author: Miroslav Suchý msuchy@redhat.com Date: Tue Feb 8 16:51:17 2011 +0100
fix typo
diff --git a/client/rhel/rhn-client-tools/src/up2date_client/rhnreg_constants.py b/client/rhel/rhn-client-tools/src/up2date_client/rhnreg_constants.py index 3917853..bc70615 100644 --- a/client/rhel/rhn-client-tools/src/up2date_client/rhnreg_constants.py +++ b/client/rhel/rhn-client-tools/src/up2date_client/rhnreg_constants.py @@ -106,7 +106,7 @@ PACKAGES_WINDOW_DESC1 = _("RPM information is important to determine what" " system.") PACKAGES_WINDOW_DESC2 = _("Include RPM packages installed on this system" " in my System Profile") -PACKAGES_WINDOW_UNCHECK = _("You may deselect individua l packages by" +PACKAGES_WINDOW_UNCHECK = _("You may deselect individual packages by" " unchecking them below.") PACKAGES_WINDOW_PKGLIST = _("Building Package List")
commit 47ed78e3ce30b402d88295a90a116f3cb31b9c00 Author: Miroslav Suchý msuchy@redhat.com Date: Tue Feb 8 16:49:36 2011 +0100
671039 - add warning about subsription manager to TUI part of rhn_register
diff --git a/client/rhel/rhn-client-tools/src/up2date_client/rhnreg_constants.py b/client/rhel/rhn-client-tools/src/up2date_client/rhnreg_constants.py index 1199af3..3917853 100644 --- a/client/rhel/rhn-client-tools/src/up2date_client/rhnreg_constants.py +++ b/client/rhel/rhn-client-tools/src/up2date_client/rhnreg_constants.py @@ -121,6 +121,14 @@ SYSTEM_ALREADY_SETUP = _("System software updates already set up") SYSTEM_ALREADY_REGISTERED = _("It appears this system has already been set up for software updates:") SYSTEM_ALREADY_REGISTERED_CONT = _("Are you sure you would like to continue?")
+RHSM_SYSTEM_ALREADY_REGISTERED = _("It appears this system has already been registered with RHN using RHN" + " Certificate-Based Entitlement technology. This tool requires registration using" + " RHN Classic technology.\n\n" + "Except for a few cases, Red Hat recommends customers only register with RHN" + " once.\n\n" + "For more information, including alternate tools, consult this Knowledge Base" + " Article: https://access.redhat.com/kb/docs/DOC-45563") + # Send Window SEND_WINDOW = _("Send Profile Information to Red Hat Network") SEND_WINDOW_DESC = _("We are finished collecting information for the System Profile.\n\n" diff --git a/client/rhel/rhn-client-tools/src/up2date_client/tui.py b/client/rhel/rhn-client-tools/src/up2date_client/tui.py index 2ff68e3..bfc6255 100644 --- a/client/rhel/rhn-client-tools/src/up2date_client/tui.py +++ b/client/rhel/rhn-client-tools/src/up2date_client/tui.py @@ -146,6 +146,51 @@ class AlreadyRegisteredWindow:
return button
+class AlreadyRegisteredSubscriptionManagerWindow: + + def __init__(self, screen, tui): + + if not rhnreg.rhsm_registered() or tui.test: + raise WindowSkipException() + + self.name = "AlreadyRegisteredSubscriptionManagerWindow" + self.screen = screen + self.tui = tui + size = snack._snack.size() + + systemIdXml = rpclib.xmlrpclib.loads(up2dateAuth.getSystemId()) + oldUsername = systemIdXml[0][0]['username'] + oldsystemId = systemIdXml[0][0]['system_id'] + + toplevel = snack.GridForm(self.screen, SYSTEM_ALREADY_SETUP, 1, 2) + self.bb = snack.ButtonBar(self.screen, + [(YES_CONT, "next"), + (NO_CANCEL, "exit")]) + toplevel.add(self.bb, 0, 1, growx = 1) + + tb = snack.Textbox(size[0]-30, size[1]-20, + WARNING + "\n\n" + + RHSM_SYSTEM_ALREADY_REGISTERED + "\n\n" + + SYSTEM_ALREADY_REGISTERED_CONT + "\n", + 1, 1) + toplevel.add(tb, 0, 0, padding = (0, 0, 0, 1)) + + self.g = toplevel + + def saveResults(self): + pass + + def run(self): + log.log_debug("Running %s" % self.__class__.__name__) + + result = self.g.runOnce() + button = self.bb.buttonPressed(result) + + if result == "F12": + return "next" + + return button + class ConnectWindow:
def __init__(self, screen, tui): @@ -1092,6 +1137,7 @@ class Tui: "Only https and http are allowed."))
self.windows = [ + AlreadyRegisteredSubscriptionManagerWindow, AlreadyRegisteredWindow, ConnectWindow, StartWindow,
commit c2c8fa6770f448fc77d6e710790e2ccab9777b20 Author: Miroslav Suchý msuchy@redhat.com Date: Tue Feb 8 16:01:51 2011 +0100
671039 - add warning about subsription manager to GUI part of rhn_register
diff --git a/client/rhel/rhn-client-tools/data/rh_register.glade b/client/rhel/rhn-client-tools/data/rh_register.glade index 33273f9..ab1a2d5 100644 --- a/client/rhel/rhn-client-tools/data/rh_register.glade +++ b/client/rhel/rhn-client-tools/data/rh_register.glade @@ -5039,6 +5039,214 @@ Are you sure you would like to continue?</property> </child> </widget>
+<widget class="GtkDialog" id="alreadyRegisteredSubscriptionManagerDialog"> + <property name="title" translatable="yes">System software updates already set up</property> + <property name="type">GTK_WINDOW_TOPLEVEL</property> + <property name="window_position">GTK_WIN_POS_NONE</property> + <property name="modal">False</property> + <property name="resizable">True</property> + <property name="destroy_with_parent">False</property> + <property name="decorated">True</property> + <property name="skip_taskbar_hint">False</property> + <property name="skip_pager_hint">False</property> + <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property> + <property name="gravity">GDK_GRAVITY_NORTH_WEST</property> + <property name="focus_on_map">True</property> + <property name="urgency_hint">False</property> + <property name="has_separator">False</property> + + <child internal-child="vbox"> + <widget class="GtkVBox" id="dialog-vbox4"> + <property name="visible">True</property> + <property name="homogeneous">False</property> + <property name="spacing">0</property> + + <child internal-child="action_area"> + <widget class="GtkHButtonBox" id="dialog-action_area4"> + <property name="visible">True</property> + <property name="layout_style">GTK_BUTTONBOX_END</property> + + <child> + <widget class="GtkButton" id="button5"> + <property name="visible">True</property> + <property name="label" translatable="yes" context="yes">_No, Cancel</property> + <property name="use_underline">True</property> + <property name="relief">GTK_RELIEF_NORMAL</property> + <property name="focus_on_click">True</property> + <property name="response_id">0</property> + <accessibility> + <atkproperty name="AtkObject::accessible_name" translatable="yes">No, Cancel</atkproperty> + </accessibility> + </widget> + </child> + + <child> + <widget class="GtkButton" id="button6"> + <property name="visible">True</property> + <property name="label" translatable="yes" context="yes">_Yes, Continue</property> + <property name="use_underline">True</property> + <property name="relief">GTK_RELIEF_NORMAL</property> + <property name="focus_on_click">True</property> + <property name="response_id">1</property> + <accessibility> + <atkproperty name="AtkObject::accessible_name" translatable="yes">Yes, Continue</atkproperty> + </accessibility> + </widget> + </child> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="pack_type">GTK_PACK_END</property> + </packing> + </child> + + <child> + <widget class="GtkVBox" id="vbox30"> + <property name="border_width">10</property> + <property name="visible">True</property> + <property name="homogeneous">False</property> + <property name="spacing">15</property> + + <child> + <widget class="GtkLabel" id="label71"> + <property name="visible">True</property> + <property name="label" translatable="yes" context="yes"><b>Warning</b></property> + <property name="use_underline">False</property> + <property name="use_markup">True</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">True</property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="label72"> + <property name="visible">True</property> + <property name="label" translatable="yes" context="yes">It appears this system has already been registered with RHN using RHN Certificate-Based Entitlement technology. This tool requires registration using RHN Classic technology.</property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">True</property> + <property name="selectable">False</property> + <property name="xalign">0</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">True</property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="label73"> + <property name="visible">True</property> + <property name="label" translatable="yes" context="yes">Except for a few cases, Red Hat recommends customers only register with RHN once. +</property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">True</property> + <property name="selectable">False</property> + <property name="xalign">0</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">True</property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="label74"> + <property name="visible">True</property> + <property name="label" translatable="yes" context="yes">For more information, including alternate tools, consult this Knowledge Base Article: <a href="https://access.redhat.com/kb/docs/DOC-45563%22%3Ehttps://access.redhat.com/k...; +</property> + <property name="use_underline">False</property> + <property name="use_markup">True</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">True</property> + <property name="selectable">False</property> + <property name="xalign">0</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">True</property> + </packing> + </child> + + + <child> + <widget class="GtkLabel" id="label75"> + <property name="visible">True</property> + <property name="label" translatable="yes" context="yes">Are you sure you would like to continue?</property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">True</property> + </packing> + </child> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">True</property> + </packing> + </child> + </widget> + </child> +</widget> + <widget class="GtkWindow" id="successfulFinishWindow"> <property name="title" translatable="yes"></property> <property name="type">GTK_WINDOW_TOPLEVEL</property> diff --git a/client/rhel/rhn-client-tools/src/up2date_client/gui.py b/client/rhel/rhn-client-tools/src/up2date_client/gui.py index e22aec1..af8f204 100644 --- a/client/rhel/rhn-client-tools/src/up2date_client/gui.py +++ b/client/rhel/rhn-client-tools/src/up2date_client/gui.py @@ -106,6 +106,7 @@ class Gui(rhnregGui.StartPage, rhnregGui.ChooseServerPage, rhnregGui.LoginPage, self.oemInfo = {} self.productInfo = {} self.already_registered_already_shown = False + self.rhsm_already_registered_already_shown = False
self.druid = self.xml.get_widget("druid") self.mainWin = self.xml.get_widget("mainWin") @@ -170,6 +171,12 @@ class Gui(rhnregGui.StartPage, rhnregGui.ChooseServerPage, rhnregGui.LoginPage, if not manualPrepare: self.startPage.emit_stop_by_name("prepare") self.druid.set_buttons_sensitive(False, True, True, False) + if rhnreg.rhsm_registered() and not self.rhsm_already_registered_already_shown: + # Dialog constructor returns when dialog closes + dialog = rhnregGui.AlreadyRegisteredSubscriptionManagerDialog() + if dialog.rc == 0: + sys.exit(0) + self.rhsm_already_registered_already_shown = True if rhnreg.registered() and not self.already_registered_already_shown: # Dialog constructor returns when dialog closes dialog = rhnregGui.AlreadyRegisteredDialog() diff --git a/client/rhel/rhn-client-tools/src/up2date_client/rhnreg.py b/client/rhel/rhn-client-tools/src/up2date_client/rhnreg.py index 72c4f49..1324d84 100644 --- a/client/rhel/rhn-client-tools/src/up2date_client/rhnreg.py +++ b/client/rhel/rhn-client-tools/src/up2date_client/rhnreg.py @@ -41,6 +41,7 @@ SYSID_DIR = "/etc/sysconfig/rhn" REMIND_FILE = "%s/rhn_register_remind" % SYSID_DIR
HW_CODE_FILE = "%s/hw-activation-code" % SYSID_DIR +RHSM_FILE = "/etc/pki/consumer/cert.pem"
import config cfg = config.initUp2dateConfig() @@ -82,6 +83,13 @@ def getOemInfo():
return info
+def rhsm_registered(): + """ Returns true if system is registred using subscription manager """ + if os.access(RHSM_FILE, os.R_OK): + statinfo = os.stat(RHSM_FILE) + return statinfo.st_size > 0 + else: + return False
def registered(): return os.access(cfg['systemIdPath'], os.R_OK) diff --git a/client/rhel/rhn-client-tools/src/up2date_client/rhnregGui.py b/client/rhel/rhn-client-tools/src/up2date_client/rhnregGui.py index ab06a88..bc4b7d8 100644 --- a/client/rhel/rhn-client-tools/src/up2date_client/rhnregGui.py +++ b/client/rhel/rhn-client-tools/src/up2date_client/rhnregGui.py @@ -1116,6 +1116,23 @@ class AlreadyRegisteredDialog: self.rc = 0 self.dialog.destroy()
+class AlreadyRegisteredSubscriptionManagerDialog: + """ Window with text: + You are already subscribed using subscription manager. Exit. Continue + """ + + def __init__(self): + """Returns when dialog closes. Dialog.rc will be set to 1 if the user + clicked continue, or 0 if they clicked cancel or close the dialog. + """ + self.xml = gtk.glade.XML(gladefile, "alreadyRegisteredSubscriptionManagerDialog", + domain="rhn-client-tools") + self.dialog = self.xml.get_widget("alreadyRegisteredSubscriptionManagerDialog") + + self.rc = self.dialog.run() + if self.rc != 1: + self.rc = 0 + self.dialog.destroy()
class ConfirmQuitDialog: def __init__(self):
spacewalk-commits@lists.fedorahosted.org