[yast-commit] r47044 - in /trunk/registration: ./ package/ src/ src/clients/ src/config/ src/modules/
Author: jdsn
Date: Thu Apr 24 18:33:57 2008
New Revision: 47044
URL: http://svn.opensuse.org/viewcvs/yast?rev=47044&view=rev
Log:
fixed SMT autoyast bug (bnc#377929)
integrated SMT renaming (bnc#376000)
removed dependencies to limal for SMT support (bnc#380060)
cleaned gui layout
initial release of postinstallation workflow (piwo) (fate#303359)
2.16.2
Modified:
trunk/registration/VERSION
trunk/registration/package/yast2-registration.changes
trunk/registration/src/Makefile.am
trunk/registration/src/clients/inst_suse_register.ycp
trunk/registration/src/config/registration.rnc
trunk/registration/src/modules/Register.ycp
trunk/registration/yast2-registration.spec.in
Modified: trunk/registration/VERSION
URL: http://svn.opensuse.org/viewcvs/yast/trunk/registration/VERSION?rev=47044&r1=47043&r2=47044&view=diff
==============================================================================
--- trunk/registration/VERSION (original)
+++ trunk/registration/VERSION Thu Apr 24 18:33:57 2008
@@ -1 +1 @@
-2.16.1
+2.16.2
Modified: trunk/registration/package/yast2-registration.changes
URL: http://svn.opensuse.org/viewcvs/yast/trunk/registration/package/yast2-registration.changes?rev=47044&r1=47043&r2=47044&view=diff
==============================================================================
--- trunk/registration/package/yast2-registration.changes (original)
+++ trunk/registration/package/yast2-registration.changes Thu Apr 24 18:33:57 2008
@@ -1,4 +1,14 @@
-------------------------------------------------------------------
+Tue Apr 24 17:15:09 CEST 2008 - jdsn@suse.de
+
+- fixed SMT autoyast bug (bnc#377929)
+- integrated SMT renaming (bnc#376000)
+- removed dependencies to limal for SMT support (bnc#380060)
+- cleaned gui layout
+- initial release of postinstallation workflow (piwo) (fate#303359)
+- 2.16.2
+
+-------------------------------------------------------------------
Tue Apr 1 21:09:48 CEST 2008 - jdsn@suse.de
- proper pluralization in autoYaST (bnc#184893)
Modified: trunk/registration/src/Makefile.am
URL: http://svn.opensuse.org/viewcvs/yast/trunk/registration/src/Makefile.am?rev=47044&r1=47043&r2=47044&view=diff
==============================================================================
--- trunk/registration/src/Makefile.am (original)
+++ trunk/registration/src/Makefile.am Thu Apr 24 18:33:57 2008
@@ -2,4 +2,4 @@
# Makefile.am for installation/src
#
-SUBDIRS = modules clients config yastbrowser
+SUBDIRS = modules clients config control yastbrowser
Modified: trunk/registration/src/clients/inst_suse_register.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/registration/src/clients/inst_suse_register.ycp?rev=47044&r1=47043&r2=47044&view=diff
==============================================================================
--- trunk/registration/src/clients/inst_suse_register.ycp (original)
+++ trunk/registration/src/clients/inst_suse_register.ycp Thu Apr 24 18:33:57 2008
@@ -211,30 +211,39 @@
/* vv MAIN (WIZARD) LAYOUT vv */
term sr_layout=nil;
- sr_layout=`HVCenter( `VBox(
- `Left (
- `RadioButtonGroup( `id(`sr_perform), `VBox(
- `Left ( `Label( nccc_top ) ),
- `VSpacing(1),
- `Left ( `RadioButton(`id(`noconfigure), `opt(`notify), nccc_noconfigure )),
- `Left ( `RadioButton(`id(`configure), `opt(`notify), nccc_configure, true )),
- `Left ( `id(`includeinfo), `HBox( `HSpacing( 3.0 ),
- `VBox (
- `VSpacing(0.5),
- `Left( `Label( nccc_sub_comment ) ),
- `Left( `CheckBox(`id(`hwinfo), `opt(`notify), nccc_sub_hwinfo, Register::submit_hwdata ) ),
- `Left( `CheckBox(`id(`optional), `opt(`notify), nccc_sub_optional, Register::submit_optional ) ),
- Register::display_forcereg ? `Left( `CheckBox(`id(`forcereg), `opt(`notify), nccc_forcereg, false ) ):`Empty() ,
- `VSpacing(0.5),
- `Right( `PushButton(`id(`showinfo), nccc_sub_showbtn ) )
- ) ) ) ,
- // active in SLE products only - merged here for consistency
- //`VSpacing(0.5),
- //`Left( `CheckBox(`id(`regularly_run), `opt(`notify), title_regularly_run, Register::register_regularly ) ),
- `VSpacing(0.5)
- )))
+
+ sr_layout = `HVSquash(
+ `VBox(
+ `Label( nccc_top ),
+ `VSpacing(0.5),
+ `Frame( title,
+ `RadioButtonGroup( `id(`sr_perform),
+ `MarginBox( 2, 0.5,
+ `VBox(
+ `Left ( `RadioButton(`id(`noconfigure), `opt(`notify), nccc_noconfigure )),
+ `Left ( `RadioButton(`id(`configure), `opt(`notify), nccc_configure, true )),
+ `Left ( `id(`includeinfo),
+ `HBox( `HSpacing( 3.0 ),
+ `VBox (
+ `VSpacing(0.5),
+ `Left( `Label( nccc_sub_comment ) ),
+ `Left( `CheckBox(`id(`hwinfo), `opt(`notify), nccc_sub_hwinfo, Register::submit_hwdata ) ),
+ `Left( `CheckBox(`id(`optional), `opt(`notify), nccc_sub_optional, Register::submit_optional ) ),
+ Register::display_forcereg ? `Left( `CheckBox(`id(`forcereg), `opt(`notify), nccc_forcereg, false ) ):`Empty(),
+ `VSpacing(0.5),
+ // active in SLE products only - merged here for consistency
+ //`VSpacing(0.5),
+ //`Left( `CheckBox(`id(`regularly_run), `opt(`notify), title_regularly_run, Register::register_regularly ) ),
+ `Right( `PushButton(`id(`showinfo), nccc_sub_showbtn ) )
+ )
+ )
+ )
+ ))
+ ))
));
+
+
term contents = `VBox ( `VSpacing (0.5), sr_layout, `VSpacing (0.5));
/* ^^ END MAIN LAYOUT ^^ */
@@ -409,13 +418,15 @@
chmod 700 $fakehome
tmp=$(mktemp $fakehome/.Xauthority.XXXXXX) || exit 1
chmod 600 $tmp
+chown $user:$group $tmp $fakehome
trap \"rm -rf $fakehome\" EXIT INT HUP TERM
", user, group, command );
+ // screen jail can be removed - no longer used (#367719)
// create a script to run a system call as different user
- // thanks to werner (script) and jw (.screenrc.jail) for their help
+ // thanks to werner (script)
// unset DESKTOP_SESSION : (#207332)
if (!textmode)
{ exec = exec +
@@ -443,6 +454,7 @@
}
else
{
+ // screen jail can be removed - no longer used (#367719)
exec = exec + "su -s /bin/bash -- $user -c \"cd; $cmd\"";
}
@@ -462,6 +474,7 @@
if ( textmode )
{
cmd_ok = (integer) SCR::Execute(.target.bash, "test -x /usr/bin/w3m") == 0 ? true:false;
+ // screen is no longer needed as there is UI::RunInTerminal for textmode programs now (#367719)
bcmd = " w3m ";
}
else
@@ -858,7 +871,11 @@
}
}
- // Register::finish mandatory as well - do not remove
+ // always return a proper return value
+ if (! contains([`next, `abort, `back], (symbol)ret ))
+ { ret = `next; }
+
+ // Register::finish mandatory as well - do not remove (#366687)
Register::finish();
return (symbol)ret;
Modified: trunk/registration/src/config/registration.rnc
URL: http://svn.opensuse.org/viewcvs/yast/trunk/registration/src/config/registration.rnc?rev=47044&r1=47043&r2=47044&view=diff
==============================================================================
--- trunk/registration/src/config/registration.rnc (original)
+++ trunk/registration/src/config/registration.rnc Thu Apr 24 18:33:57 2008
@@ -2,13 +2,13 @@
namespace a = "http://relaxng.org/ns/compatibility/annotations/1.0"
namespace config = "http://www.suse.com/1.0/configns"
-suse_register = element suse_register { do_registration? & submit_hwdata? & submit_optional? & registration_data? & register_regularly? & smt_server? & smt_server_cert? }
+suse_register = element suse_register { do_registration? & submit_hwdata? & submit_optional? & registration_data? & register_regularly? & reg_server? & reg_server_cert? }
do_registration = element do_registration { BOOLEAN }
submit_hwdata = element submit_hwdata { BOOLEAN }
submit_optional = element submit_optional { BOOLEAN }
register_regularly = element register_regularly { BOOLEAN }
-smt_server = element smt_server { text }
-smt_server_cert = element smt_server_cert { text }
+reg_server = element reg_server { text }
+reg_server_cert = element reg_server_cert { text }
registration_data =
Modified: trunk/registration/src/modules/Register.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/registration/src/modules/Register.ycp?rev=47044&r1=47043&r2=47044&view=diff
==============================================================================
--- trunk/registration/src/modules/Register.ycp (original)
+++ trunk/registration/src/modules/Register.ycp Thu Apr 24 18:33:57 2008
@@ -23,7 +23,6 @@
import "Linuxrc";
import "ProductFeatures";
import "SourceManager";
-import "RegisterCert";
// --------------------------------------------------------------
@@ -243,6 +242,9 @@
ay = true;
}
+ string smtpemPath = "/etc/ssl/certs";
+ string smtpemFile = smtpemPath + "/registration-server.pem";
+
// check if smt_server is a valid url
map smt_server_parsed = URL::Parse(smt_server);
if (smt_server_parsed == $[] || smt_server_parsed["host"]:"" == "" || smt_server_parsed["scheme"]:"" != "https" )
@@ -290,6 +292,15 @@
string certTmpFile = sformat("%1/__tmpSMTcert.crt", SCR::Read(.target.tmpdir));
+ // check for existing certificate (bnc#376000)
+ integer certExists = nil;
+ certExists = (integer) SCR::Execute(.target.bash, sformat("[ -f %1 ]", smtpemFile));
+ if (certmode != `url && certExists == 0)
+ {
+ // do nothing to refetch the certificate if manual interaction is necessary
+ y2milestone("Existing SMT certificate found and keeping it. To renew the SMT certificate please assign a URL as value to the key 'regcert' in /var/lib/YaST2/install.inf");
+ return `ok;
+ }
if ( certmode == `url )
{
@@ -310,8 +321,15 @@
// download cert
string curlcmd = sformat("curl -f --connect-timeout 60 --max-time 120 '%1' -o %2", smt_server_cert, certTmpFile);
- if ( SCR::Execute (.target.bash, curlcmd) != 0)
+ if ( SCR::Execute(.target.bash, curlcmd) != 0)
{
+ if (certExists == 0)
+ {
+ // do nothing to refetch the certificate if manual interaction is necessary
+ y2milestone("Could not download the current SMT certificate but existing certificate found and keeping it. To renew the SMT certificate please make sure it is available on the registration server.");
+ return `ok;
+ }
+
y2error("Could not download the SMT certificate file from specified URL %1", smt_server_cert);
if (ay) return `conferror;
@@ -359,7 +377,7 @@
{
string fdpath = regexpsub( smt_server_cert , "^floppy/(.+)$","\\1");
string cp2tmp = sformat("/bin/cp -a %1 %2 ", mf["mpoint"]:"/media/floppy" + "/" + fdpath, certTmpFile );
- if ( SCR::Execute (.target.bash, cp2tmp) != 0)
+ if ( SCR::Execute(.target.bash, cp2tmp) != 0)
{
y2error("Could not copy the specified SMT certificate file from floppy disk.");
if (ay) return `silentskip;
@@ -484,68 +502,45 @@
- // in autoYaST mode we automatically trust - we are done here
- if ( trust || ay ) { return `ok; }
+ // in autoYaST mode we automatically trust
+ if ( !ay ) // (bnc#377929)
+ {
+ // ask user if he trusts the certificate
- // ask user if he trusts the certificate
- map cP = RegisterCert::parseCertificate(certTmpFile);
- y2milestone("SMT certificate file information: %1", cP);
-
- string trustQuestion = _("Do you want to trust this certificate?");
- string trustMessage = _("This certificate will be used to connect to the SMT server.\nYou have to trust this certificate in order to continue with the Registration.");
-
- string certInfo = "";
- list issueList = (list) cP["ISSUER"]:[];
- //translators: this is certificate context
- certInfo = certInfo + _("<p><b>Issued For:</b></p>");
- if (size (issueList) > 0)
- {
- certInfo = certInfo + "<pre>";
- foreach (map
participants (1)
-
jdsn@svn.opensuse.org