YaST Commits
Threads by month
- ----- 2024 -----
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
January 2010
- 22 participants
- 425 discussions
[yast-commit] r60485 - in /branches/SuSE-Code-11-SP1-Branch/openvas-security-scanner: src/Makefile.am yast2-openvas-security-scanner.spec.in
by jsrain@svn.opensuse.org 22 Jan '10
by jsrain@svn.opensuse.org 22 Jan '10
22 Jan '10
Author: jsrain
Date: Fri Jan 22 12:44:03 2010
New Revision: 60485
URL: http://svn.opensuse.org/viewcvs/yast?rev=60485&view=rev
Log:
updates to build
Modified:
branches/SuSE-Code-11-SP1-Branch/openvas-security-scanner/src/Makefile.am
branches/SuSE-Code-11-SP1-Branch/openvas-security-scanner/yast2-openvas-security-scanner.spec.in
Modified: branches/SuSE-Code-11-SP1-Branch/openvas-security-scanner/src/Makefile.am
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP1-Branch/openv…
==============================================================================
--- branches/SuSE-Code-11-SP1-Branch/openvas-security-scanner/src/Makefile.am (original)
+++ branches/SuSE-Code-11-SP1-Branch/openvas-security-scanner/src/Makefile.am Fri Jan 22 12:44:03 2010
@@ -15,9 +15,7 @@
openvas-security-scanner.desktop
module_DATA = \
- OpenvasSecurityScanner.ycp \
- OpenvasSecurityScanner2.pm \
- OpenvasSecurityScanner3.py
+ OpenvasSecurityScanner.ycp
# create a symlink for local build, #145327
openvas-security-scanner:
Modified: branches/SuSE-Code-11-SP1-Branch/openvas-security-scanner/yast2-openvas-security-scanner.spec.in
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP1-Branch/openv…
==============================================================================
--- branches/SuSE-Code-11-SP1-Branch/openvas-security-scanner/yast2-openvas-security-scanner.spec.in (original)
+++ branches/SuSE-Code-11-SP1-Branch/openvas-security-scanner/yast2-openvas-security-scanner.spec.in Fri Jan 22 12:44:03 2010
@@ -24,8 +24,7 @@
%dir @yncludedir@/openvas-security-scanner
@yncludedir@/openvas-security-scanner/*
@clientdir@/openvas-security-scanner.ycp
-@clientdir@/openvas-security-scanner_*.ycp
@moduledir@/OpenvasSecurityScanner.*
-@moduledir@/OpenvasSecurityScanner2.*
@desktopdir@/openvas-security-scanner.desktop
+@scrconfdir@/*
%doc @docdir@
--
To unsubscribe, e-mail: yast-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: yast-commit+help(a)opensuse.org
1
0
[yast-commit] r60484 - in /trunk/wagon: package/ src/clients/ src/config/ src/include/ src/modules/
by locilka@svn.opensuse.org 22 Jan '10
by locilka@svn.opensuse.org 22 Jan '10
22 Jan '10
Author: locilka
Date: Fri Jan 22 12:08:50 2010
New Revision: 60484
URL: http://svn.opensuse.org/viewcvs/yast?rev=60484&view=rev
Log:
- Wagon extended to read and use migration products from the
<upgrade> section from product control files (BNC #559554).
Added:
trunk/wagon/src/clients/wagon_migration_products.ycp
trunk/wagon/src/clients/wagon_point_of_no_return.ycp
trunk/wagon/src/include/
trunk/wagon/src/include/Makefile.am
trunk/wagon/src/include/common_func.ycp
Modified:
trunk/wagon/package/yast2-wagon.changes
trunk/wagon/src/clients/wagon.ycp
trunk/wagon/src/clients/wagon_selfupdate.ycp
trunk/wagon/src/config/online_migration.xml
trunk/wagon/src/modules/Wagon.ycp
Modified: trunk/wagon/package/yast2-wagon.changes
URL: http://svn.opensuse.org/viewcvs/yast/trunk/wagon/package/yast2-wagon.change…
==============================================================================
--- trunk/wagon/package/yast2-wagon.changes (original)
+++ trunk/wagon/package/yast2-wagon.changes Fri Jan 22 12:08:50 2010
@@ -1,3 +1,9 @@
+-------------------------------------------------------------------
+Fri Jan 22 11:57:00 CET 2010 - locilka(a)suse.cz
+
+- Wagon extended to read and use migration products from the
+ <upgrade> section from product control files (BNC #559554).
+
------------------------------------------------------------------
Wed Jan 13 18:56:03 CET 2010 - kmachalkova(a)suse.cz
Modified: trunk/wagon/src/clients/wagon.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/wagon/src/clients/wagon.ycp?rev=…
==============================================================================
--- trunk/wagon/src/clients/wagon.ycp (original)
+++ trunk/wagon/src/clients/wagon.ycp Fri Jan 22 12:08:50 2010
@@ -26,6 +26,10 @@
import "CommandLine";
import "PackageLock";
import "PackageCallbacks";
+ import "Report";
+ import "FileUtils";
+
+ include "wagon/common_func.ycp";
textdomain "wagon";
@@ -137,6 +141,134 @@
}
}
+ boolean RevertToOldProducts () {
+ if (Wagon::abort_can_revert_products != true) {
+ y2warning ("Cannot revert the previous state of products, sorry. Installed products were: %1, Migration products were: %2",
+ Wagon::products_before_migration, Wagon::migration_products);
+
+ Report::Warning (_("Cannot revert the previous state of installed products.
+You will have to revert them manually."));
+
+ return false;
+ }
+
+ Wizard::SetContents (
+ _("Reverting Migration"),
+ `Label(_("Migration tool has to remove the temporary migration products,
+install the previously installed ones and contact Novell Customer Center
+to get update repositories.")),
+ _("<p>Several tasks can be done by the migration tool. If you skip this step,
+you will have to do them manually.</p>"),
+ false, true
+ );
+ Wizard::EnableAbortButton ();
+
+ boolean cont = true;
+ while (true) {
+ any ret = UI::UserInput();
+ if (ret == `next) {
+ cont = true;
+ break;
+ } else if (ret == `abort || ret == `cancel) {
+ if (Popup::AnyQuestion (
+ // popup dialog caption
+ _("Migration Has to Be Reverted"),
+ // popup dialog qustion
+ _("Are you sure you want to skip reverting the migration?"),
+ // button
+ _("&Yes, Skip It"),
+ // button
+ _("&No"),
+ `focus_no
+ )) {
+ cont = false;
+ break;
+ }
+ }
+ }
+
+ if (cont != true) {
+ y2warning ("User decided not to rollback");
+ return false;
+ }
+
+ ResetPackager();
+
+ // Full paths to product files
+ list <string> removed_product_files = [];
+ // Product packages
+ list <string> removed_packages = [];
+
+ Wizard::SetContents (
+ _("Reverting Migration"),
+ `Label(_("Removing temporary migration products...")),
+ "",
+ false, true
+ );
+
+ // Remove all the migration products using packages approach manually
+ // Removing via ResolvableRemove + PkgSolve usually produces errors,
+ // dependency loops etc.
+ //
+ y2milestone ("Removing newly installed products: %1", Wagon::migration_products);
+ foreach (string migration_product, Wagon::migration_products, {
+ foreach (map <string, any> remove_product, Pkg::ResolvableProperties (migration_product, `product, ""), {
+ remove_product = Wagon::MinimizeProductMap (remove_product);
+
+ string product_file = remove_product["product_file"]:"";
+ if (product_file == nil || product_file == "") {
+ y2error ("Cannot remove product: %1, no product file defined", remove_product);
+ Report::Error (sformat(_("Cannot remove product %1"), remove_product["name"]:_("Unknown product")));
+ return;
+ }
+
+ if (! regexpmatch (product_file, "^/etc/products\\.d/.+"))
+ product_file = sformat ("/etc/products.d/%1", product_file);
+
+ if (contains (removed_product_files, product_file)) {
+ y2milestone ("Product file %1 has been already removed", product_file);
+ return;
+ }
+
+ string package_name = Wagon::GetFileOwner (product_file);
+
+ if (package_name == nil || package_name == "") {
+ y2error ("Cannot find out file owner %1", product_file);
+ Report::Error (sformat(_("Cannot remove product %1"), remove_product["name"]:_("Unknown product")));
+ return;
+ }
+
+ if (Pkg::TargetRemove (package_name) != true) {
+ y2error ("Cannot remove package %1", package_name);
+ Report::Error (sformat(_("Cannot remove product %1.
+Remove package %2 manually"), remove_product["name"]:_("Unknown product"), package_name));
+ return;
+ }
+
+ y2milestone ("Product %1/%2 has been successfully removed", remove_product, package_name);
+ removed_product_files = add (removed_product_files, product_file);
+ removed_packages = add (removed_packages, package_name);
+ });
+ });
+
+ if (size (removed_packages) > 0) {
+ y2milestone ("%1 products were removed, reseting packager", size (removed_packages));
+ ResetPackager();
+
+ foreach (string one_package, removed_packages, {
+ y2milestone ("Removed product package check: %1", Pkg::ResolvableProperties (one_package, `package, ""));
+ });
+ }
+
+ y2milestone ("Running registration");
+ if (WFM::call ("inst_suse_register") == `abort) {
+ y2error ("Unable to register");
+ return false;
+ }
+
+ return true;
+ }
+
// main()
HandleInit();
@@ -152,6 +284,12 @@
ret = ProductControl::RunFrom (current_step, false);
}
+ // Wagon has been aborted, revert to the previous products
+ // if possible
+ if (ret == `abort || ret == `cancel) {
+ RevertToOldProducts();
+ }
+
Wizard::CloseDialog();
HandleRet (ret);
Added: trunk/wagon/src/clients/wagon_migration_products.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/wagon/src/clients/wagon_migratio…
==============================================================================
--- trunk/wagon/src/clients/wagon_migration_products.ycp (added)
+++ trunk/wagon/src/clients/wagon_migration_products.ycp Fri Jan 22 12:08:50 2010
@@ -0,0 +1,127 @@
+/**
+ * File:
+ * clients/wagon_migration_products.ycp
+ *
+ * Module:
+ * Wagon
+ *
+ * Authors:
+ * Lukas Ocilka <locilka(a)suse.cz>
+ *
+ * Summary:
+ * Online Migration Tool
+ *
+ * $Id$
+ *
+ */
+
+{
+ /**
+ * Selects and installs all migration products.
+ */
+
+ textdomain "wagon";
+
+ import "Wagon";
+ import "PackagesUI";
+ import "GetInstArgs";
+ import "Report";
+ import "Popup";
+ import "Label";
+
+ include "wagon/common_func.ycp";
+
+ if (GetInstArgs::going_back()) {
+ y2milestone ("Going back...");
+ return `back;
+ }
+
+ boolean FindAndSelectMigrationProducts () {
+ if (Wagon::InitPkg() != true) {
+ Report::Error (_("Unable to initialize the package manager."));
+ return false;
+ }
+
+ list <map <string,any> > products = Pkg::ResolvableProperties ("", `product, "");
+
+ foreach (map<string, any> p, products, {
+ if (p["status"]:`unknown != `installed) {
+ y2milestone ("Product %1 (%2) is not installed, skipping...",
+ p["name"]:"not-defined", p["short_name"]:p["display_name"]:"not-defined");
+ return;
+ }
+
+ if (! haskey (p, "upgrades") || p["upgrades"]:[] == []) {
+ y2warning ("Product %1 (%2) does not contain 'upgrades' section...",
+ p["name"]:"not-defined", p["short_name"]:p["display_name"]:"not-defined");
+ return;
+ }
+
+ y2milestone ("Going to upgrade product %1 (%2)",
+ p["name"]:"not-defined", p["short_name"]:p["display_name"]:"not-defined");
+
+ if (p["name"]:"" == nil || p["name"]:"" == "") {
+ y2error ("Product %1 doesn't have a name, reverting will be impossible", p);
+ Report::Error (sformat(_("Product %1 does not have a machine-readable 'name'.
+Automatic reverting of the product state will be impossible."), p["short_name"]:p["display_name"]:"not-defined"));
+ }
+
+ foreach (map <string, any> supported_upgrade, (list <map <string, any> >) p["upgrades"]:[], {
+ if (! haskey (supported_upgrade, "product") || supported_upgrade["product"]:"" == "") {
+ y2error ("Erroneous product upgrades: %1 (%2)", p, supported_upgrade);
+ Report::Error (sformat (_("Cannot upgrade product %1 (%2).
+Migration path is erroneous."), p["display_name"]:p["short_name"]:_("Unknown"), p["name"]:_("not-defined")));
+ return;
+ }
+
+ string old_product = p["name"]:"";
+ string migration_product = supported_upgrade["product"]:"";
+
+ // Install the migration product
+ if ((size (Pkg::ResolvableProperties (migration_product, `product, "")) == 0) || (Pkg::ResolvableInstall (migration_product, `product) != true)) {
+ y2error ("Cannot select migration product for installation: %1", Pkg::ResolvableProperties (migration_product, `product, ""));
+ Report::Error (sformat (_("Cannot select product
+%1 (%2) for installation."), supported_upgrade["name"]:"", migration_product));
+ return;
+ } else {
+ Wagon::migration_products = add (Wagon::migration_products, migration_product);
+ }
+
+// Old products are removed automatically during the upgrade
+// // Remove the old product
+// if ((Pkg::ResolvableInstalled (old_product, `product) != true) || (Pkg::ResolvableRemove (migration_product, `product) == true)) {
+// Report::Error (sformat (_("Cannot select product %1 for deinstallation."), migration_product));
+// return;
+// }
+ });
+ });
+
+ return true;
+ }
+
+ if (FindAndSelectMigrationProducts() != true) {
+ return `auto;
+ }
+
+ symbol ret = SolveDependencies();
+
+ if (ret != `abort) {
+ // Solver ends with some resolvables changed
+ if (Pkg::IsAnyResolvable (`any, `to_install) == true || Pkg::IsAnyResolvable (`any, `to_remove) == true) {
+ y2milestone ("Installing packages...");
+ // Everybody hold your breath 'cause we're gonna be sinkin' soon
+ any inst_ret = WFM::call ("inst_rpmcopy");
+ y2milestone ("Package installation returned: %1", inst_ret);
+ ret = `auto;
+ } else {
+ y2milestone ("Nothing to install/remove");
+ ret = `auto;
+ }
+ }
+
+ ResetPackager();
+
+ y2milestone ("Returning: %1", ret);
+
+ return ret;
+}
Added: trunk/wagon/src/clients/wagon_point_of_no_return.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/wagon/src/clients/wagon_point_of…
==============================================================================
--- trunk/wagon/src/clients/wagon_point_of_no_return.ycp (added)
+++ trunk/wagon/src/clients/wagon_point_of_no_return.ycp Fri Jan 22 12:08:50 2010
@@ -0,0 +1,39 @@
+/**
+ * File:
+ * clients/wagon_custom_url.ycp
+ *
+ * Module:
+ * Wagon
+ *
+ * Authors:
+ * Lukas Ocilka <locilka(a)suse.cz>
+ *
+ * Summary:
+ * Online Migration Tool
+ *
+ * $Id$
+ *
+ */
+
+{
+ textdomain "wagon";
+
+ import "GetInstArgs";
+ import "Wagon";
+
+ if (GetInstArgs::going_back()) {
+ y2milestone ("Going back...");
+ return `back;
+ }
+
+ /**
+ * Point of no return. After this call, YaST will start removing
+ * and installing packages. In other words, the real migration
+ * will start.
+ */
+
+ y2warning ("From this point, wagon cannot revert products anymore!");
+ Wagon::abort_can_revert_products = false;
+
+ return `auto;
+}
Modified: trunk/wagon/src/clients/wagon_selfupdate.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/wagon/src/clients/wagon_selfupda…
==============================================================================
--- trunk/wagon/src/clients/wagon_selfupdate.ycp (original)
+++ trunk/wagon/src/clients/wagon_selfupdate.ycp Fri Jan 22 12:08:50 2010
@@ -28,20 +28,15 @@
import "Popup";
import "Label";
import "PackagesUI";
+ import "Report";
+
+ include "wagon/common_func.ycp";
if (GetInstArgs::going_back()) {
y2milestone ("Going back...");
return `back;
}
- boolean SolverRunWithFeedback () {
- UI::OpenDialog (`Label (_("Solving the package dependencies...")));
- boolean ret = Pkg::PkgSolve (false);
- UI::CloseDialog();
-
- return ret;
- }
-
/**
* Tries to upgrade packages got as parameter.
*
@@ -140,11 +135,50 @@
return pkgs_affected;
}
+ integer UpdateInstalledProducts () {
+ integer affected_products = 0;
+
+ list <map <string,any> > products = Pkg::ResolvableProperties ("", `product, "");
+
+ foreach (map<string, any> p, products, {
+ // Product is not installed
+ if (p["status"]:`unknown != `installed) return;
+
+ // Make the logs readable
+ p["license"] = "...";
+ p["description"] = "...";
+
+ string product_name = p["name"]:"";
+ string product_version = p["version"]:"";
+
+ if (product_name == nil || product_name == "") {
+ y2error ("Cannot distinguish product name: %1", product_name);
+ return;
+ }
+
+ // Product version is the same but release can be different
+ // product map doesn't contain the release string. To be sure, product will be reinstalled
+ y2milestone ("Upgrading product %1 version %2", product_name, product_version);
+ // The version is the same, release can be different
+ if (Pkg::ResolvableInstall (product_name, `product) != true) {
+ Report::Error (sformat(_("Cannot update installed product %1."), product_name));
+ return;
+ }
+
+ affected_products = affected_products + 1;
+ });
+
+ return affected_products;
+ }
+
Wagon::InitPkg();
list <map <string, any> > products = Pkg::ResolvableProperties ("", `product, "");
y2milestone ("All known products: %1", products);
+ Wagon::ReadProductsBeforeMigration();
+ Wagon::StoreProductsBeforeMigration();
+
symbol ret = `auto;
// Patches need solver run
@@ -168,71 +202,21 @@
}
}
+ integer products_selected_for_update = UpdateInstalledProducts();
+ if (products_selected_for_update > 0) {
+ y2milestone ("%1 products were selected for update", products_selected_for_update);
+ selected = products_selected_for_update;
+ }
+
y2milestone ("Selected resolvables: %1", selected);
if (selected < 1) {
y2milestone ("Neither patches nor packages for self-update have been selected");
return ret;
}
- boolean solved = nil;
-
- while (solved != true) {
- // Trying to solve automatically
- solved = SolverRunWithFeedback();
- symbol ret_sel = nil;
-
- // PkgSolve didn't report any problem
- if (solved) {
- y2milestone ("Solved automatically");
- // FIXME: inform user?
- ret = `restart_same_step;
- // There are some issues in selecting the patches
- } else {
- y2milestone ("Cannot be solved automatically");
- while (true) {
- // Try to solve them manually
- ret_sel = PackagesUI::RunPackageSelector ($["mode":`summaryMode]);
-
- // Cannot or don't want to accept the proposal
- if (ret_sel == `cancel) {
- // Confirmed
- if (Popup::AnyQuestion (
- // TRANSLATORS: headline
- _("Aborting the Upgrade"),
- // TRANSLATORS: pop-up question
- _("Cannot continue without installing the required patches.
-Are sure you want to abort the upgrade process?"),
- _("Abort Upgrade"),
- Label::NoButton(),
- `yes_button
- )) {
- ret = `abort;
- break;
- // Try again
- } else {
- continue;
- }
- // Solved manually
- } else if (ret_sel == `accept) {
- solved = true;
- break;
- }
- }
- }
-
- if (ret == `abort) {
- solved = nil;
- y2warning ("Aborting...");
- break;
- }
-
- if (! Wagon::AcceptLicenses()) {
- y2warning ("Some license(s) have been rejected, running solver again");
- solved = nil;
- }
- }
+ ret = SolveDependencies();
- if (solved == true) {
+ if (ret != `abort) {
// Solver ends with some resolvables changed
if (Pkg::IsAnyResolvable (`any, `to_install) == true || Pkg::IsAnyResolvable (`any, `to_remove) == true) {
y2milestone ("Calling update...");
Modified: trunk/wagon/src/config/online_migration.xml
URL: http://svn.opensuse.org/viewcvs/yast/trunk/wagon/src/config/online_migratio…
==============================================================================
--- trunk/wagon/src/config/online_migration.xml (original)
+++ trunk/wagon/src/config/online_migration.xml Fri Jan 22 12:08:50 2010
@@ -29,8 +29,10 @@
<modules config:type="list">
<module>welcome</module>
<module>update_online_mechanism</module>
+ <module>install_migration_products</module>
<module>suse_register_workflow</module>
<module>prepare_progress</module>
+ <module>point_of_no_return</module>
<module>wagon_kickoff</module>
<module>wagon_rpmcopy</module>
<module>suseconfig_after_update</module>
@@ -52,12 +54,14 @@
<modules config:type="list">
<module>welcome</module>
<module>update_online_mechanism</module>
+ <module>install_migration_products</module>
<!-- Workflow is switched after this module -->
<module>update_url_dialog</module>
<module>suse_register_workflow</module>
<module>wagon_custom_url</module>
<module>wagon_selfupdate_from_url</module>
<module>prepare_progress</module>
+ <module>point_of_no_return</module>
<module>wagon_kickoff</module>
<module>wagon_rpmcopy</module>
<module>suseconfig_after_update</module>
@@ -77,10 +81,12 @@
<modules config:type="list">
<module>welcome</module>
<module>update_online_mechanism</module>
+ <module>install_migration_products</module>
<!-- Workflow is switched after this module -->
<module>update_url_dialog</module>
<module>suse_register_workflow</module>
<module>prepare_progress</module>
+ <module>point_of_no_return</module>
<module>wagon_kickoff</module>
<module>wagon_rpmcopy</module>
<module>suseconfig_after_update</module>
@@ -100,11 +106,13 @@
<modules config:type="list">
<module>welcome</module>
<module>update_online_mechanism</module>
+ <module>install_migration_products</module>
<!-- Workflow is switched after this module -->
<module>update_url_dialog</module>
<module>wagon_custom_url</module>
<module>wagon_selfupdate_from_url</module>
<module>prepare_progress</module>
+ <module>point_of_no_return</module>
<module>wagon_kickoff</module>
<module>wagon_rpmcopy</module>
<module>suseconfig_after_update</module>
@@ -126,6 +134,7 @@
<module>wagon_custom_url</module>
<module>wagon_selfupdate_from_url</module>
<module>prepare_progress</module>
+ <module>point_of_no_return</module>
<module>wagon_kickoff</module>
<module>wagon_rpmcopy</module>
<module>suseconfig_after_update</module>
@@ -199,16 +208,22 @@
<enable_back>no</enable_back>
</module>
- <!-- Update itself, Add new 'migration-product' -->
+ <!-- Update itself -->
<module>
<label>Renew Update Stack</label>
<name>update_online_mechanism</name>
<execute>wagon_selfupdate</execute>
</module>
+ <!-- Add new 'migration-products' -->
+ <module>
+ <label>Migration Configuration</label>
+ <name>install_migration_products</name>
+ <execute>wagon_migration_products</execute>
+ </module>
+
<!-- Offer several possibilities how to set update repository URL -->
<module>
- <label>Renew Update Stack</label>
<name>update_url_dialog</name>
<execute>wagon_update_url</execute>
</module>
@@ -219,7 +234,6 @@
(*) Offered in wagon_update_url if not running via applet
-->
<module>
- <label>Renew Update Stack</label>
<name>suse_register_workflow</name>
<execute>inst_suse_register</execute>
</module>
@@ -229,7 +243,6 @@
(*) Offered in wagon_update_url if not running via applet
-->
<module>
- <label>Renew Update Stack</label>
<name>wagon_custom_url</name>
<execute>wagon_custom_url</execute>
</module>
@@ -239,7 +252,6 @@
Follows the wagon_ownurl
-->
<module>
- <label>Renew Update Stack</label>
<name>wagon_selfupdate_from_url</name>
<execute>wagon_selfupdate</execute>
</module>
@@ -266,6 +278,12 @@
<execute>inst_prepareprogress</execute>
</module>
+ <!-- From this point, some possibilities are simply 'impossible' ;) -->
+ <module>
+ <name>point_of_no_return</name>
+ <execute>wagon_point_of_no_return</execute>
+ </module>
+
<module>
<name>wagon_kickoff</name>
<execute>inst_kickoff</execute>
Added: trunk/wagon/src/include/Makefile.am
URL: http://svn.opensuse.org/viewcvs/yast/trunk/wagon/src/include/Makefile.am?re…
==============================================================================
--- trunk/wagon/src/include/Makefile.am (added)
+++ trunk/wagon/src/include/Makefile.am Fri Jan 22 12:08:50 2010
@@ -0,0 +1,13 @@
+#
+# Makefile.am for wagon/src/include
+#
+
+yncludedir = @yncludedir@/wagon
+
+ynclude_DATA = $(wildcard *.ycp)
+
+YCPCFLAGS = -M ../modules
+
+EXTRA_DIST = $(ynclude_DATA)
+
+include $(top_srcdir)/Makefile.am.common
Added: trunk/wagon/src/include/common_func.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/wagon/src/include/common_func.yc…
==============================================================================
--- trunk/wagon/src/include/common_func.ycp (added)
+++ trunk/wagon/src/include/common_func.ycp Fri Jan 22 12:08:50 2010
@@ -0,0 +1,128 @@
+/**
+ * File:
+ * include/wagon/common_func.ycp
+ *
+ * Module:
+ * Wagon
+ *
+ * Authors:
+ * Lukas Ocilka <locilka(a)suse.cz>
+ *
+ * Summary:
+ * Online Migration Tool
+ *
+ * $Id$
+ *
+ */
+
+{
+ textdomain "wagon";
+
+ import "Label";
+ import "Popup";
+ import "PackagesUI";
+ import "Wagon";
+ import "Wizard";
+
+ boolean SolverRunWithFeedback () {
+ UI::OpenDialog (`Label (_("Solving the package dependencies...")));
+ boolean ret = Pkg::PkgSolve (true);
+ UI::CloseDialog();
+
+ return ret;
+ }
+
+ symbol SolveDependencies () {
+ symbol ret = `auto;
+
+ boolean solved = nil;
+
+ while (solved != true) {
+ // Trying to solve automatically
+ solved = SolverRunWithFeedback();
+ symbol ret_sel = nil;
+
+ // PkgSolve didn't report any problem
+ if (solved == true) {
+ y2milestone ("Solved automatically");
+ ret = `auto;
+ // There are some issues in selecting the patches
+ } else {
+ y2milestone ("Cannot be solved automatically");
+ while (true) {
+ // Try to solve them manually
+ ret_sel = PackagesUI::RunPackageSelector ($["mode":`summaryMode]);
+
+ // Cannot or don't want to accept the proposal
+ if (ret_sel == `cancel) {
+ // Confirmed
+ if (Popup::AnyQuestion (
+ // TRANSLATORS: headline
+ _("Aborting the Upgrade"),
+ // TRANSLATORS: pop-up question
+ _("Cannot continue without installing the required patches.
+Are sure you want to abort the upgrade process?"),
+ _("Abort Upgrade"),
+ Label::NoButton(),
+ `yes_button
+ )) {
+ ret = `abort;
+ break;
+ // Try again
+ } else {
+ continue;
+ }
+ // Solved manually
+ } else if (ret_sel == `accept) {
+ ret = `auto;
+ solved = true;
+ break;
+ }
+ }
+ }
+
+ if (ret == `abort) {
+ solved = nil;
+ y2warning ("Aborting...");
+ break;
+ }
+
+ if (! Wagon::AcceptLicenses()) {
+ y2warning ("Some license(s) have been rejected, running solver again");
+ solved = nil;
+ }
+ }
+
+ return ret;
+ }
+
+ void ResetPackager () {
+ Wizard::SetContents (
+ _("Reseting Package Manager"),
+ `Label(_("Reseting package manager...")),
+ "",
+ false, true
+ );
+
+ y2milestone ("Reseting Pkg");
+ Pkg::PkgApplReset();
+ Pkg::PkgReset();
+
+ symbol status = nil;
+ string name = nil;
+
+ y2milestone ("Neutralizing all resolvables");
+ foreach (symbol resolvable, [`pattern, `patch, `package, `product, `scrpackage], {
+ Pkg::ResolvableNeutral ("" /* all */, resolvable, true /* force */);
+ });
+
+ y2milestone ("Running solver");
+ Pkg::PkgSolve (true);
+
+ Pkg::TargetFinish();
+ Pkg::SourceFinishAll();
+
+ Wagon::InitPkg();
+ Pkg::PkgSolve (true);
+ }
+}
Modified: trunk/wagon/src/modules/Wagon.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/wagon/src/modules/Wagon.ycp?rev=…
==============================================================================
--- trunk/wagon/src/modules/Wagon.ycp (original)
+++ trunk/wagon/src/modules/Wagon.ycp Fri Jan 22 12:08:50 2010
@@ -29,11 +29,23 @@
import "Report";
import "ProductFeatures";
import "Update";
+ import "FileUtils";
+ import "String";
boolean running_by_applet = false;
string update_workflow_type = "manual";
+ // Products installed for the time of the migration
+ global list <string> migration_products = [];
+
+ // Products installed before the migration
+ global list <map <string, string> > products_before_migration = [];
+
+ // When aborting before the real migration starts, we can still
+ // revert to the old products
+ global boolean abort_can_revert_products = true;
+
global void SetUpdateWorkflow (string new_update_workflow_type) {
// FIXME: check
@@ -275,17 +287,192 @@
return true;
}
+ global map <string,any> MinimizeProductMap (map <string,any> product) {
+ if (haskey (product, "license")) product["license"] = "...";
+ if (haskey (product, "description")) product["description"] = "...";
+
+ return product;
+ }
+
+ string GetDisplayName (string display_name, string name) {
+ if (display_name == name)
+ return display_name;
+
+ // 'Product Long Name (product-libzypp-name)'
+ return sformat (_("%1 (%2)"), display_name, name);
+ }
+
+ string GetDistributionUpgradeSummary () {
+ string ret = "";
+
+ list <map <string,any> > products = sort (
+ map <string,any> x, map <string,any> y, Pkg::ResolvableProperties ("", `product, ""),
+ ``(x["display_name"]:x["short_name"]:x["name"]:"a" < y["display_name"]:x["short_name"]:x["name"]:"b")
+ );
+
+ // migration_products contains list of temporary products for migration process
+
+ y2milestone ("All known migration products: %1", migration_products);
+
+ string display_name = nil;
+ string name = nil;
+
+ // list of all products that will be installed (are selected)
+ list <string> products_to_be_installed = [];
+ foreach (map <string,any> product, products, {
+ if (product["status"]:`unknown != `selected) return;
+ name = product["name"]:_("No short name defined");
+ products_to_be_installed = add (products_to_be_installed, name);
+ });
+
+ // list of all products that will be upgraded
+ list <string> products_to_be_upgraded = [];
+
+ // Products that are going to be removed
+ foreach (map <string,any> product, products, {
+ if (product["status"]:`unknown != `removed) return;
+
+ product = MinimizeProductMap (product);
+ display_name = product["display_name"]:product["short_name"]:product["name"]:_("No name defined");
+ name = product["name"]:_("No short name defined");
+
+ // Removing product and installing the same one (name) means -> upgrade
+ if (contains (products_to_be_installed, name)) {
+ products_to_be_upgraded = add (products_to_be_upgraded, name);
+ y2milestone ("Product to be upgraded: %1 (this is the removed one)", product);
+ // Do not list this product as 'to removed', list it as 'to upgrade'
+ return;
+ }
+
+ // Removing a migration product is fine
+ if (contains (migration_products, product["name"]:"")) {
+ y2milestone ("Migration product will be removed: %1", product);
+ ret = ret + "<li>" + sformat (
+ _("Temporary migration product <b>%1</b> will be removed"),
+ GetDisplayName (display_name, name)
+ ) + "</li>\n";
+ // Removing another product might be an issue
+ } else {
+ y2warning ("Product will be removed: %1", product);
+ ret = ret + "<li>" + sformat (
+ _("<font color='red'>Warning: Product <b>%1</b> will be removed</font>"),
+ GetDisplayName (display_name, name)
+ ) + "</li>\n";
+ }
+ });
+
+ // Products that are going to be installed (new ones) or upgraded
+ foreach (map <string,any> product, products, {
+ if (product["status"]:`unknown != `selected) return;
+
+ product = MinimizeProductMap (product);
+ display_name = product["display_name"]:product["short_name"]:product["name"]:_("No name defined");
+ name = product["name"]:_("No short name defined");
+
+ // Product is going to be upgraded (removed + installed new version)
+ if (contains (products_to_be_upgraded, name)) {
+ y2milestone ("Product will be upgraded to: %1 (this is the installed one)", product);
+ ret = ret + "<li>" + sformat (
+ _("Product <b>%1</b> will be upgraded"),
+ GetDisplayName (display_name, name)
+ ) + "</li>\n";
+ // Newly installed product
+ } else {
+ y2milestone ("Product will be upgraded: %1", product);
+ ret = ret + "<li>" + sformat (
+ _("New product <b>%1</b> will be installed"),
+ GetDisplayName (display_name, name)
+ ) + "</li>\n";
+ }
+ });
+
+ // Products that will keep installed (unchanged)
+ foreach (map <string,any> product, products, {
+ if (product["status"]:`unknown != `installed) return;
+
+ product = MinimizeProductMap (product);
+ display_name = product["display_name"]:product["short_name"]:product["name"]:_("No name defined");
+ name = product["name"]:_("No short name defined");
+
+ y2milestone ("Product will keep: %1", product);
+ ret = ret + "<li>" + sformat (
+ _("Product <b>%1</b> will keep installed"),
+ GetDisplayName (display_name, name)
+ ) + "</li>\n";
+ });
+
+ return "<ul>\n" + ret + "</ul>\n";
+ }
+
global map <string, any> ProposalSummary () {
map <string, any> ret = $[];
- // FIXME: create a useful summary
ret = $[
- "preformatted_proposal" : "<ul><li>" + _("Distribution Upgrade") + "</li></ul>",
- "help" : _("<p>FIXME</p>"),
+ "preformatted_proposal" : GetDistributionUpgradeSummary(),
+ // help text
+ "help" : _("<p>To change update settings go to <p>Software Proposal</p> section.</p>"),
];
return ret;
}
+ global list <map <string, string> > ReadProductsBeforeMigration () {
+ list <map <string, any> > products = Pkg::ResolvableProperties ("", `product, "");
+ y2milestone ("All known products: %1", products);
+
+ foreach (map<string, any> p, products, {
+ if (p["status"]:`unknown != `installed)
+ return;
+
+ // Remember the 'old' product just for the case of reverting
+ products_before_migration = add (
+ products_before_migration,
+ $["name" : p["name"]:"", "version" : p["version"]:""]
+ );
+ });
+
+ return products_before_migration;
+ }
+
+ // YaST can be restarted but some data have to be kept
+ string migration_products_store_file = sformat ("%1/wagon_products_before_migration", Directory::vardir);
+
+ global boolean StoreProductsBeforeMigration () {
+ return (boolean) SCR::Write (.target.ycp, migration_products_store_file, products_before_migration);
+ }
+
+ global boolean RestoreProductsBeforeMigration () {
+ products_before_migration = (list <map <string, string> >) SCR::Read (.target.ycp, migration_products_store_file);
+
+ if (products_before_migration == nil) {
+ products_before_migration = [];
+ Report::Error (_("Error restoring the list of previously installed products."));
+ return false;
+ }
+
+ return true;
+ }
+
+ global string GetFileOwner (string file) {
+ if (file == nil || file == "") {
+ y2error ("File not provided");
+ return nil;
+ }
+
+ if (! FileUtils::Exists (file)) {
+ y2error ("File %1 doesn't exist", file);
+ return nil;
+ }
+
+ string command = sformat ("rpm -qf '%1'", String::Quote (file)) + " --queryformat \"%{NAME}\"";
+ map <string, any> cmd = (map <string, any>) SCR::Execute (.target.bash_output, command);
+ if (cmd["exit"]:-1 != 0) {
+ y2error ("Cannot get file owner %1: %2", command, cmd);
+ return nil;
+ }
+
+ return (string) splitstring (cmd["stdout"]:"", "\n")[0]:nil;
+ }
+
/* EOF */
}
--
To unsubscribe, e-mail: yast-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: yast-commit+help(a)opensuse.org
1
0
[yast-commit] r60483 - /branches/SuSE-Code-11-Branch/openvas-security-scanner/
by openvasfelix@svn.opensuse.org 22 Jan '10
by openvasfelix@svn.opensuse.org 22 Jan '10
22 Jan '10
Author: openvasfelix
Date: Fri Jan 22 12:08:49 2010
New Revision: 60483
URL: http://svn.opensuse.org/viewcvs/yast?rev=60483&view=rev
Log:
Removing OpenVAS Security Scanner from SuSE-Code-11-Branch (has been
moved to the SP1 branch).
Removed:
branches/SuSE-Code-11-Branch/openvas-security-scanner/
--
To unsubscribe, e-mail: yast-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: yast-commit+help(a)opensuse.org
1
0
[yast-commit] r60482 - in /branches/SuSE-Code-11-SP1-Branch/wagon: ./ package/ src/ src/clients/ src/config/ src/modules/
by locilka@svn.opensuse.org 22 Jan '10
by locilka@svn.opensuse.org 22 Jan '10
22 Jan '10
Author: locilka
Date: Fri Jan 22 12:08:23 2010
New Revision: 60482
URL: http://svn.opensuse.org/viewcvs/yast?rev=60482&view=rev
Log:
- Wagon extended to read and use migration products from the
<upgrade> section from product control files (BNC #559554).
- 2.17.9
Added:
branches/SuSE-Code-11-SP1-Branch/wagon/src/clients/wagon_migration_products.ycp
branches/SuSE-Code-11-SP1-Branch/wagon/src/clients/wagon_point_of_no_return.ycp
Modified:
branches/SuSE-Code-11-SP1-Branch/wagon/VERSION
branches/SuSE-Code-11-SP1-Branch/wagon/package/yast2-wagon.changes
branches/SuSE-Code-11-SP1-Branch/wagon/src/Makefile.am
branches/SuSE-Code-11-SP1-Branch/wagon/src/clients/wagon.ycp
branches/SuSE-Code-11-SP1-Branch/wagon/src/clients/wagon_selfupdate.ycp
branches/SuSE-Code-11-SP1-Branch/wagon/src/config/online_migration.xml
branches/SuSE-Code-11-SP1-Branch/wagon/src/modules/Wagon.ycp
branches/SuSE-Code-11-SP1-Branch/wagon/yast2-wagon.spec.in
Modified: branches/SuSE-Code-11-SP1-Branch/wagon/VERSION
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP1-Branch/wagon…
==============================================================================
--- branches/SuSE-Code-11-SP1-Branch/wagon/VERSION (original)
+++ branches/SuSE-Code-11-SP1-Branch/wagon/VERSION Fri Jan 22 12:08:23 2010
@@ -1 +1 @@
-2.17.8
+2.17.9
Modified: branches/SuSE-Code-11-SP1-Branch/wagon/package/yast2-wagon.changes
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP1-Branch/wagon…
==============================================================================
--- branches/SuSE-Code-11-SP1-Branch/wagon/package/yast2-wagon.changes (original)
+++ branches/SuSE-Code-11-SP1-Branch/wagon/package/yast2-wagon.changes Fri Jan 22 12:08:23 2010
@@ -1,4 +1,11 @@
-------------------------------------------------------------------
+Fri Jan 22 11:57:00 CET 2010 - locilka(a)suse.cz
+
+- Wagon extended to read and use migration products from the
+ <upgrade> section from product control files (BNC #559554).
+- 2.17.9
+
+-------------------------------------------------------------------
Mon Feb 9 10:10:05 CET 2009 - locilka(a)suse.cz
- Added new wagon_congratulate client - an envelope that loads the
Modified: branches/SuSE-Code-11-SP1-Branch/wagon/src/Makefile.am
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP1-Branch/wagon…
==============================================================================
--- branches/SuSE-Code-11-SP1-Branch/wagon/src/Makefile.am (original)
+++ branches/SuSE-Code-11-SP1-Branch/wagon/src/Makefile.am Fri Jan 22 12:08:23 2010
@@ -2,5 +2,5 @@
# Makefile.am for wagon/src
#
-SUBDIRS = modules clients config
+SUBDIRS = modules include clients config
Modified: branches/SuSE-Code-11-SP1-Branch/wagon/src/clients/wagon.ycp
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP1-Branch/wagon…
==============================================================================
--- branches/SuSE-Code-11-SP1-Branch/wagon/src/clients/wagon.ycp (original)
+++ branches/SuSE-Code-11-SP1-Branch/wagon/src/clients/wagon.ycp Fri Jan 22 12:08:23 2010
@@ -26,6 +26,10 @@
import "CommandLine";
import "PackageLock";
import "PackageCallbacks";
+ import "Report";
+ import "FileUtils";
+
+ include "wagon/common_func.ycp";
textdomain "wagon";
@@ -137,6 +141,134 @@
}
}
+ boolean RevertToOldProducts () {
+ if (Wagon::abort_can_revert_products != true) {
+ y2warning ("Cannot revert the previous state of products, sorry. Installed products were: %1, Migration products were: %2",
+ Wagon::products_before_migration, Wagon::migration_products);
+
+ Report::Warning (_("Cannot revert the previous state of installed products.
+You will have to revert them manually."));
+
+ return false;
+ }
+
+ Wizard::SetContents (
+ _("Reverting Migration"),
+ `Label(_("Migration tool has to remove the temporary migration products,
+install the previously installed ones and contact Novell Customer Center
+to get update repositories.")),
+ _("<p>Several tasks can be done by the migration tool. If you skip this step,
+you will have to do them manually.</p>"),
+ false, true
+ );
+ Wizard::EnableAbortButton ();
+
+ boolean cont = true;
+ while (true) {
+ any ret = UI::UserInput();
+ if (ret == `next) {
+ cont = true;
+ break;
+ } else if (ret == `abort || ret == `cancel) {
+ if (Popup::AnyQuestion (
+ // popup dialog caption
+ _("Migration Has to Be Reverted"),
+ // popup dialog qustion
+ _("Are you sure you want to skip reverting the migration?"),
+ // button
+ _("&Yes, Skip It"),
+ // button
+ _("&No"),
+ `focus_no
+ )) {
+ cont = false;
+ break;
+ }
+ }
+ }
+
+ if (cont != true) {
+ y2warning ("User decided not to rollback");
+ return false;
+ }
+
+ ResetPackager();
+
+ // Full paths to product files
+ list <string> removed_product_files = [];
+ // Product packages
+ list <string> removed_packages = [];
+
+ Wizard::SetContents (
+ _("Reverting Migration"),
+ `Label(_("Removing temporary migration products...")),
+ "",
+ false, true
+ );
+
+ // Remove all the migration products using packages approach manually
+ // Removing via ResolvableRemove + PkgSolve usually produces errors,
+ // dependency loops etc.
+ //
+ y2milestone ("Removing newly installed products: %1", Wagon::migration_products);
+ foreach (string migration_product, Wagon::migration_products, {
+ foreach (map <string, any> remove_product, Pkg::ResolvableProperties (migration_product, `product, ""), {
+ remove_product = Wagon::MinimizeProductMap (remove_product);
+
+ string product_file = remove_product["product_file"]:"";
+ if (product_file == nil || product_file == "") {
+ y2error ("Cannot remove product: %1, no product file defined", remove_product);
+ Report::Error (sformat(_("Cannot remove product %1"), remove_product["name"]:_("Unknown product")));
+ return;
+ }
+
+ if (! regexpmatch (product_file, "^/etc/products\\.d/.+"))
+ product_file = sformat ("/etc/products.d/%1", product_file);
+
+ if (contains (removed_product_files, product_file)) {
+ y2milestone ("Product file %1 has been already removed", product_file);
+ return;
+ }
+
+ string package_name = Wagon::GetFileOwner (product_file);
+
+ if (package_name == nil || package_name == "") {
+ y2error ("Cannot find out file owner %1", product_file);
+ Report::Error (sformat(_("Cannot remove product %1"), remove_product["name"]:_("Unknown product")));
+ return;
+ }
+
+ if (Pkg::TargetRemove (package_name) != true) {
+ y2error ("Cannot remove package %1", package_name);
+ Report::Error (sformat(_("Cannot remove product %1.
+Remove package %2 manually"), remove_product["name"]:_("Unknown product"), package_name));
+ return;
+ }
+
+ y2milestone ("Product %1/%2 has been successfully removed", remove_product, package_name);
+ removed_product_files = add (removed_product_files, product_file);
+ removed_packages = add (removed_packages, package_name);
+ });
+ });
+
+ if (size (removed_packages) > 0) {
+ y2milestone ("%1 products were removed, reseting packager", size (removed_packages));
+ ResetPackager();
+
+ foreach (string one_package, removed_packages, {
+ y2milestone ("Removed product package check: %1", Pkg::ResolvableProperties (one_package, `package, ""));
+ });
+ }
+
+ y2milestone ("Running registration");
+ if (WFM::call ("inst_suse_register") == `abort) {
+ y2error ("Unable to register");
+ return false;
+ }
+
+ return true;
+ }
+
// main()
HandleInit();
@@ -152,6 +284,12 @@
ret = ProductControl::RunFrom (current_step, false);
}
+ // Wagon has been aborted, revert to the previous products
+ // if possible
+ if (ret == `abort || ret == `cancel) {
+ RevertToOldProducts();
+ }
+
Wizard::CloseDialog();
HandleRet (ret);
Added: branches/SuSE-Code-11-SP1-Branch/wagon/src/clients/wagon_migration_products.ycp
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP1-Branch/wagon…
==============================================================================
--- branches/SuSE-Code-11-SP1-Branch/wagon/src/clients/wagon_migration_products.ycp (added)
+++ branches/SuSE-Code-11-SP1-Branch/wagon/src/clients/wagon_migration_products.ycp Fri Jan 22 12:08:23 2010
@@ -0,0 +1,127 @@
+/**
+ * File:
+ * clients/wagon_migration_products.ycp
+ *
+ * Module:
+ * Wagon
+ *
+ * Authors:
+ * Lukas Ocilka <locilka(a)suse.cz>
+ *
+ * Summary:
+ * Online Migration Tool
+ *
+ * $Id$
+ *
+ */
+
+{
+ /**
+ * Selects and installs all migration products.
+ */
+
+ textdomain "wagon";
+
+ import "Wagon";
+ import "PackagesUI";
+ import "GetInstArgs";
+ import "Report";
+ import "Popup";
+ import "Label";
+
+ include "wagon/common_func.ycp";
+
+ if (GetInstArgs::going_back()) {
+ y2milestone ("Going back...");
+ return `back;
+ }
+
+ boolean FindAndSelectMigrationProducts () {
+ if (Wagon::InitPkg() != true) {
+ Report::Error (_("Unable to initialize the package manager."));
+ return false;
+ }
+
+ list <map <string,any> > products = Pkg::ResolvableProperties ("", `product, "");
+
+ foreach (map<string, any> p, products, {
+ if (p["status"]:`unknown != `installed) {
+ y2milestone ("Product %1 (%2) is not installed, skipping...",
+ p["name"]:"not-defined", p["short_name"]:p["display_name"]:"not-defined");
+ return;
+ }
+
+ if (! haskey (p, "upgrades") || p["upgrades"]:[] == []) {
+ y2warning ("Product %1 (%2) does not contain 'upgrades' section...",
+ p["name"]:"not-defined", p["short_name"]:p["display_name"]:"not-defined");
+ return;
+ }
+
+ y2milestone ("Going to upgrade product %1 (%2)",
+ p["name"]:"not-defined", p["short_name"]:p["display_name"]:"not-defined");
+
+ if (p["name"]:"" == nil || p["name"]:"" == "") {
+ y2error ("Product %1 doesn't have a name, reverting will be impossible", p);
+ Report::Error (sformat(_("Product %1 does not have a machine-readable 'name'.
+Automatic reverting of the product state will be impossible."), p["short_name"]:p["display_name"]:"not-defined"));
+ }
+
+ foreach (map <string, any> supported_upgrade, (list <map <string, any> >) p["upgrades"]:[], {
+ if (! haskey (supported_upgrade, "product") || supported_upgrade["product"]:"" == "") {
+ y2error ("Erroneous product upgrades: %1 (%2)", p, supported_upgrade);
+ Report::Error (sformat (_("Cannot upgrade product %1 (%2).
+Migration path is erroneous."), p["display_name"]:p["short_name"]:_("Unknown"), p["name"]:_("not-defined")));
+ return;
+ }
+
+ string old_product = p["name"]:"";
+ string migration_product = supported_upgrade["product"]:"";
+
+ // Install the migration product
+ if ((size (Pkg::ResolvableProperties (migration_product, `product, "")) == 0) || (Pkg::ResolvableInstall (migration_product, `product) != true)) {
+ y2error ("Cannot select migration product for installation: %1", Pkg::ResolvableProperties (migration_product, `product, ""));
+ Report::Error (sformat (_("Cannot select product
+%1 (%2) for installation."), supported_upgrade["name"]:"", migration_product));
+ return;
+ } else {
+ Wagon::migration_products = add (Wagon::migration_products, migration_product);
+ }
+
+// Old products are removed automatically during the upgrade
+// // Remove the old product
+// if ((Pkg::ResolvableInstalled (old_product, `product) != true) || (Pkg::ResolvableRemove (migration_product, `product) == true)) {
+// Report::Error (sformat (_("Cannot select product %1 for deinstallation."), migration_product));
+// return;
+// }
+ });
+ });
+
+ return true;
+ }
+
+ if (FindAndSelectMigrationProducts() != true) {
+ return `auto;
+ }
+
+ symbol ret = SolveDependencies();
+
+ if (ret != `abort) {
+ // Solver ends with some resolvables changed
+ if (Pkg::IsAnyResolvable (`any, `to_install) == true || Pkg::IsAnyResolvable (`any, `to_remove) == true) {
+ y2milestone ("Installing packages...");
+ // Everybody hold your breath 'cause we're gonna be sinkin' soon
+ any inst_ret = WFM::call ("inst_rpmcopy");
+ y2milestone ("Package installation returned: %1", inst_ret);
+ ret = `auto;
+ } else {
+ y2milestone ("Nothing to install/remove");
+ ret = `auto;
+ }
+ }
+
+ ResetPackager();
+
+ y2milestone ("Returning: %1", ret);
+
+ return ret;
+}
Added: branches/SuSE-Code-11-SP1-Branch/wagon/src/clients/wagon_point_of_no_return.ycp
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP1-Branch/wagon…
==============================================================================
--- branches/SuSE-Code-11-SP1-Branch/wagon/src/clients/wagon_point_of_no_return.ycp (added)
+++ branches/SuSE-Code-11-SP1-Branch/wagon/src/clients/wagon_point_of_no_return.ycp Fri Jan 22 12:08:23 2010
@@ -0,0 +1,39 @@
+/**
+ * File:
+ * clients/wagon_custom_url.ycp
+ *
+ * Module:
+ * Wagon
+ *
+ * Authors:
+ * Lukas Ocilka <locilka(a)suse.cz>
+ *
+ * Summary:
+ * Online Migration Tool
+ *
+ * $Id$
+ *
+ */
+
+{
+ textdomain "wagon";
+
+ import "GetInstArgs";
+ import "Wagon";
+
+ if (GetInstArgs::going_back()) {
+ y2milestone ("Going back...");
+ return `back;
+ }
+
+ /**
+ * Point of no return. After this call, YaST will start removing
+ * and installing packages. In other words, the real migration
+ * will start.
+ */
+
+ y2warning ("From this point, wagon cannot revert products anymore!");
+ Wagon::abort_can_revert_products = false;
+
+ return `auto;
+}
Modified: branches/SuSE-Code-11-SP1-Branch/wagon/src/clients/wagon_selfupdate.ycp
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP1-Branch/wagon…
==============================================================================
--- branches/SuSE-Code-11-SP1-Branch/wagon/src/clients/wagon_selfupdate.ycp (original)
+++ branches/SuSE-Code-11-SP1-Branch/wagon/src/clients/wagon_selfupdate.ycp Fri Jan 22 12:08:23 2010
@@ -28,20 +28,15 @@
import "Popup";
import "Label";
import "PackagesUI";
+ import "Report";
+
+ include "wagon/common_func.ycp";
if (GetInstArgs::going_back()) {
y2milestone ("Going back...");
return `back;
}
- boolean SolverRunWithFeedback () {
- UI::OpenDialog (`Label (_("Solving the package dependencies...")));
- boolean ret = Pkg::PkgSolve (false);
- UI::CloseDialog();
-
- return ret;
- }
-
/**
* Tries to upgrade packages got as parameter.
*
@@ -140,11 +135,50 @@
return pkgs_affected;
}
+ integer UpdateInstalledProducts () {
+ integer affected_products = 0;
+
+ list <map <string,any> > products = Pkg::ResolvableProperties ("", `product, "");
+
+ foreach (map<string, any> p, products, {
+ // Product is not installed
+ if (p["status"]:`unknown != `installed) return;
+
+ // Make the logs readable
+ p["license"] = "...";
+ p["description"] = "...";
+
+ string product_name = p["name"]:"";
+ string product_version = p["version"]:"";
+
+ if (product_name == nil || product_name == "") {
+ y2error ("Cannot distinguish product name: %1", product_name);
+ return;
+ }
+
+ // Product version is the same but release can be different
+ // product map doesn't contain the release string. To be sure, product will be reinstalled
+ y2milestone ("Upgrading product %1 version %2", product_name, product_version);
+ // The version is the same, release can be different
+ if (Pkg::ResolvableInstall (product_name, `product) != true) {
+ Report::Error (sformat(_("Cannot update installed product %1."), product_name));
+ return;
+ }
+
+ affected_products = affected_products + 1;
+ });
+
+ return affected_products;
+ }
+
Wagon::InitPkg();
list <map <string, any> > products = Pkg::ResolvableProperties ("", `product, "");
y2milestone ("All known products: %1", products);
+ Wagon::ReadProductsBeforeMigration();
+ Wagon::StoreProductsBeforeMigration();
+
symbol ret = `auto;
// Patches need solver run
@@ -168,71 +202,21 @@
}
}
+ integer products_selected_for_update = UpdateInstalledProducts();
+ if (products_selected_for_update > 0) {
+ y2milestone ("%1 products were selected for update", products_selected_for_update);
+ selected = products_selected_for_update;
+ }
+
y2milestone ("Selected resolvables: %1", selected);
if (selected < 1) {
y2milestone ("Neither patches nor packages for self-update have been selected");
return ret;
}
- boolean solved = nil;
-
- while (solved != true) {
- // Trying to solve automatically
- solved = SolverRunWithFeedback();
- symbol ret_sel = nil;
-
- // PkgSolve didn't report any problem
- if (solved) {
- y2milestone ("Solved automatically");
- // FIXME: inform user?
- ret = `restart_same_step;
- // There are some issues in selecting the patches
- } else {
- y2milestone ("Cannot be solved automatically");
- while (true) {
- // Try to solve them manually
- ret_sel = PackagesUI::RunPackageSelector ($["mode":`summaryMode]);
-
- // Cannot or don't want to accept the proposal
- if (ret_sel == `cancel) {
- // Confirmed
- if (Popup::AnyQuestion (
- // TRANSLATORS: headline
- _("Aborting the Upgrade"),
- // TRANSLATORS: pop-up question
- _("Cannot continue without installing the required patches.
-Are sure you want to abort the upgrade process?"),
- _("Abort Upgrade"),
- Label::NoButton(),
- `yes_button
- )) {
- ret = `abort;
- break;
- // Try again
- } else {
- continue;
- }
- // Solved manually
- } else if (ret_sel == `accept) {
- solved = true;
- break;
- }
- }
- }
-
- if (ret == `abort) {
- solved = nil;
- y2warning ("Aborting...");
- break;
- }
-
- if (! Wagon::AcceptLicenses()) {
- y2warning ("Some license(s) have been rejected, running solver again");
- solved = nil;
- }
- }
+ ret = SolveDependencies();
- if (solved == true) {
+ if (ret != `abort) {
// Solver ends with some resolvables changed
if (Pkg::IsAnyResolvable (`any, `to_install) == true || Pkg::IsAnyResolvable (`any, `to_remove) == true) {
y2milestone ("Calling update...");
Modified: branches/SuSE-Code-11-SP1-Branch/wagon/src/config/online_migration.xml
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP1-Branch/wagon…
==============================================================================
--- branches/SuSE-Code-11-SP1-Branch/wagon/src/config/online_migration.xml (original)
+++ branches/SuSE-Code-11-SP1-Branch/wagon/src/config/online_migration.xml Fri Jan 22 12:08:23 2010
@@ -29,8 +29,10 @@
<modules config:type="list">
<module>welcome</module>
<module>update_online_mechanism</module>
+ <module>install_migration_products</module>
<module>suse_register_workflow</module>
<module>prepare_progress</module>
+ <module>point_of_no_return</module>
<module>wagon_kickoff</module>
<module>wagon_rpmcopy</module>
<module>suseconfig_after_update</module>
@@ -52,12 +54,14 @@
<modules config:type="list">
<module>welcome</module>
<module>update_online_mechanism</module>
+ <module>install_migration_products</module>
<!-- Workflow is switched after this module -->
<module>update_url_dialog</module>
<module>suse_register_workflow</module>
<module>wagon_custom_url</module>
<module>wagon_selfupdate_from_url</module>
<module>prepare_progress</module>
+ <module>point_of_no_return</module>
<module>wagon_kickoff</module>
<module>wagon_rpmcopy</module>
<module>suseconfig_after_update</module>
@@ -77,10 +81,12 @@
<modules config:type="list">
<module>welcome</module>
<module>update_online_mechanism</module>
+ <module>install_migration_products</module>
<!-- Workflow is switched after this module -->
<module>update_url_dialog</module>
<module>suse_register_workflow</module>
<module>prepare_progress</module>
+ <module>point_of_no_return</module>
<module>wagon_kickoff</module>
<module>wagon_rpmcopy</module>
<module>suseconfig_after_update</module>
@@ -100,11 +106,13 @@
<modules config:type="list">
<module>welcome</module>
<module>update_online_mechanism</module>
+ <module>install_migration_products</module>
<!-- Workflow is switched after this module -->
<module>update_url_dialog</module>
<module>wagon_custom_url</module>
<module>wagon_selfupdate_from_url</module>
<module>prepare_progress</module>
+ <module>point_of_no_return</module>
<module>wagon_kickoff</module>
<module>wagon_rpmcopy</module>
<module>suseconfig_after_update</module>
@@ -126,6 +134,7 @@
<module>wagon_custom_url</module>
<module>wagon_selfupdate_from_url</module>
<module>prepare_progress</module>
+ <module>point_of_no_return</module>
<module>wagon_kickoff</module>
<module>wagon_rpmcopy</module>
<module>suseconfig_after_update</module>
@@ -198,16 +207,22 @@
<enable_back>no</enable_back>
</module>
- <!-- Update itself, Add new 'migration-product' -->
+ <!-- Update itself -->
<module>
<label>Renew Update Stack</label>
<name>update_online_mechanism</name>
<execute>wagon_selfupdate</execute>
</module>
+ <!-- Add new 'migration-products' -->
+ <module>
+ <label>Migration Configuration</label>
+ <name>install_migration_products</name>
+ <execute>wagon_migration_products</execute>
+ </module>
+
<!-- Offer several possibilities how to set update repository URL -->
<module>
- <label>Renew Update Stack</label>
<name>update_url_dialog</name>
<execute>wagon_update_url</execute>
</module>
@@ -218,7 +233,6 @@
(*) Offered in wagon_update_url if not running via applet
-->
<module>
- <label>Renew Update Stack</label>
<name>suse_register_workflow</name>
<execute>inst_suse_register</execute>
</module>
@@ -228,7 +242,6 @@
(*) Offered in wagon_update_url if not running via applet
-->
<module>
- <label>Renew Update Stack</label>
<name>wagon_custom_url</name>
<execute>wagon_custom_url</execute>
</module>
@@ -238,7 +251,6 @@
Follows the wagon_ownurl
-->
<module>
- <label>Renew Update Stack</label>
<name>wagon_selfupdate_from_url</name>
<execute>wagon_selfupdate</execute>
</module>
@@ -265,6 +277,12 @@
<execute>inst_prepareprogress</execute>
</module>
+ <!-- From this point, some possibilities are simply 'impossible' ;) -->
+ <module>
+ <name>point_of_no_return</name>
+ <execute>wagon_point_of_no_return</execute>
+ </module>
+
<module>
<name>wagon_kickoff</name>
<execute>inst_kickoff</execute>
Modified: branches/SuSE-Code-11-SP1-Branch/wagon/src/modules/Wagon.ycp
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP1-Branch/wagon…
==============================================================================
--- branches/SuSE-Code-11-SP1-Branch/wagon/src/modules/Wagon.ycp (original)
+++ branches/SuSE-Code-11-SP1-Branch/wagon/src/modules/Wagon.ycp Fri Jan 22 12:08:23 2010
@@ -29,11 +29,23 @@
import "Report";
import "ProductFeatures";
import "Update";
+ import "FileUtils";
+ import "String";
boolean running_by_applet = false;
string update_workflow_type = "manual";
+ // Products installed for the time of the migration
+ global list <string> migration_products = [];
+
+ // Products installed before the migration
+ global list <map <string, string> > products_before_migration = [];
+
+ // When aborting before the real migration starts, we can still
+ // revert to the old products
+ global boolean abort_can_revert_products = true;
+
global void SetUpdateWorkflow (string new_update_workflow_type) {
// FIXME: check
@@ -275,17 +287,192 @@
return true;
}
+ global map <string,any> MinimizeProductMap (map <string,any> product) {
+ if (haskey (product, "license")) product["license"] = "...";
+ if (haskey (product, "description")) product["description"] = "...";
+
+ return product;
+ }
+
+ string GetDisplayName (string display_name, string name) {
+ if (display_name == name)
+ return display_name;
+
+ // 'Product Long Name (product-libzypp-name)'
+ return sformat (_("%1 (%2)"), display_name, name);
+ }
+
+ string GetDistributionUpgradeSummary () {
+ string ret = "";
+
+ list <map <string,any> > products = sort (
+ map <string,any> x, map <string,any> y, Pkg::ResolvableProperties ("", `product, ""),
+ ``(x["display_name"]:x["short_name"]:x["name"]:"a" < y["display_name"]:x["short_name"]:x["name"]:"b")
+ );
+
+ // migration_products contains list of temporary products for migration process
+
+ y2milestone ("All known migration products: %1", migration_products);
+
+ string display_name = nil;
+ string name = nil;
+
+ // list of all products that will be installed (are selected)
+ list <string> products_to_be_installed = [];
+ foreach (map <string,any> product, products, {
+ if (product["status"]:`unknown != `selected) return;
+ name = product["name"]:_("No short name defined");
+ products_to_be_installed = add (products_to_be_installed, name);
+ });
+
+ // list of all products that will be upgraded
+ list <string> products_to_be_upgraded = [];
+
+ // Products that are going to be removed
+ foreach (map <string,any> product, products, {
+ if (product["status"]:`unknown != `removed) return;
+
+ product = MinimizeProductMap (product);
+ display_name = product["display_name"]:product["short_name"]:product["name"]:_("No name defined");
+ name = product["name"]:_("No short name defined");
+
+ // Removing product and installing the same one (name) means -> upgrade
+ if (contains (products_to_be_installed, name)) {
+ products_to_be_upgraded = add (products_to_be_upgraded, name);
+ y2milestone ("Product to be upgraded: %1 (this is the removed one)", product);
+ // Do not list this product as 'to removed', list it as 'to upgrade'
+ return;
+ }
+
+ // Removing a migration product is fine
+ if (contains (migration_products, product["name"]:"")) {
+ y2milestone ("Migration product will be removed: %1", product);
+ ret = ret + "<li>" + sformat (
+ _("Temporary migration product <b>%1</b> will be removed"),
+ GetDisplayName (display_name, name)
+ ) + "</li>\n";
+ // Removing another product might be an issue
+ } else {
+ y2warning ("Product will be removed: %1", product);
+ ret = ret + "<li>" + sformat (
+ _("<font color='red'>Warning: Product <b>%1</b> will be removed</font>"),
+ GetDisplayName (display_name, name)
+ ) + "</li>\n";
+ }
+ });
+
+ // Products that are going to be installed (new ones) or upgraded
+ foreach (map <string,any> product, products, {
+ if (product["status"]:`unknown != `selected) return;
+
+ product = MinimizeProductMap (product);
+ display_name = product["display_name"]:product["short_name"]:product["name"]:_("No name defined");
+ name = product["name"]:_("No short name defined");
+
+ // Product is going to be upgraded (removed + installed new version)
+ if (contains (products_to_be_upgraded, name)) {
+ y2milestone ("Product will be upgraded to: %1 (this is the installed one)", product);
+ ret = ret + "<li>" + sformat (
+ _("Product <b>%1</b> will be upgraded"),
+ GetDisplayName (display_name, name)
+ ) + "</li>\n";
+ // Newly installed product
+ } else {
+ y2milestone ("Product will be upgraded: %1", product);
+ ret = ret + "<li>" + sformat (
+ _("New product <b>%1</b> will be installed"),
+ GetDisplayName (display_name, name)
+ ) + "</li>\n";
+ }
+ });
+
+ // Products that will keep installed (unchanged)
+ foreach (map <string,any> product, products, {
+ if (product["status"]:`unknown != `installed) return;
+
+ product = MinimizeProductMap (product);
+ display_name = product["display_name"]:product["short_name"]:product["name"]:_("No name defined");
+ name = product["name"]:_("No short name defined");
+
+ y2milestone ("Product will keep: %1", product);
+ ret = ret + "<li>" + sformat (
+ _("Product <b>%1</b> will keep installed"),
+ GetDisplayName (display_name, name)
+ ) + "</li>\n";
+ });
+
+ return "<ul>\n" + ret + "</ul>\n";
+ }
+
global map <string, any> ProposalSummary () {
map <string, any> ret = $[];
- // FIXME: create a useful summary
ret = $[
- "preformatted_proposal" : "<ul><li>" + _("Distribution Upgrade") + "</li></ul>",
- "help" : _("<p>FIXME</p>"),
+ "preformatted_proposal" : GetDistributionUpgradeSummary(),
+ // help text
+ "help" : _("<p>To change update settings go to <p>Software Proposal</p> section.</p>"),
];
return ret;
}
+ global list <map <string, string> > ReadProductsBeforeMigration () {
+ list <map <string, any> > products = Pkg::ResolvableProperties ("", `product, "");
+ y2milestone ("All known products: %1", products);
+
+ foreach (map<string, any> p, products, {
+ if (p["status"]:`unknown != `installed)
+ return;
+
+ // Remember the 'old' product just for the case of reverting
+ products_before_migration = add (
+ products_before_migration,
+ $["name" : p["name"]:"", "version" : p["version"]:""]
+ );
+ });
+
+ return products_before_migration;
+ }
+
+ // YaST can be restarted but some data have to be kept
+ string migration_products_store_file = sformat ("%1/wagon_products_before_migration", Directory::vardir);
+
+ global boolean StoreProductsBeforeMigration () {
+ return (boolean) SCR::Write (.target.ycp, migration_products_store_file, products_before_migration);
+ }
+
+ global boolean RestoreProductsBeforeMigration () {
+ products_before_migration = (list <map <string, string> >) SCR::Read (.target.ycp, migration_products_store_file);
+
+ if (products_before_migration == nil) {
+ products_before_migration = [];
+ Report::Error (_("Error restoring the list of previously installed products."));
+ return false;
+ }
+
+ return true;
+ }
+
+ global string GetFileOwner (string file) {
+ if (file == nil || file == "") {
+ y2error ("File not provided");
+ return nil;
+ }
+
+ if (! FileUtils::Exists (file)) {
+ y2error ("File %1 doesn't exist", file);
+ return nil;
+ }
+
+ string command = sformat ("rpm -qf '%1'", String::Quote (file)) + " --queryformat \"%{NAME}\"";
+ map <string, any> cmd = (map <string, any>) SCR::Execute (.target.bash_output, command);
+ if (cmd["exit"]:-1 != 0) {
+ y2error ("Cannot get file owner %1: %2", command, cmd);
+ return nil;
+ }
+
+ return (string) splitstring (cmd["stdout"]:"", "\n")[0]:nil;
+ }
+
/* EOF */
}
Modified: branches/SuSE-Code-11-SP1-Branch/wagon/yast2-wagon.spec.in
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP1-Branch/wagon…
==============================================================================
--- branches/SuSE-Code-11-SP1-Branch/wagon/yast2-wagon.spec.in (original)
+++ branches/SuSE-Code-11-SP1-Branch/wagon/yast2-wagon.spec.in Fri Jan 22 12:08:23 2010
@@ -36,6 +36,8 @@
@clientdir@/*.ycp
@moduledir@/*.ycp
@moduledir@/*.ybc
+%dir @yncludedir@/wagon
+@yncludedir@/wagon/*.ycp
%dir /usr/share/YaST2/control
@desktopdir@/*.desktop
/usr/share/YaST2/control/*.xml
--
To unsubscribe, e-mail: yast-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: yast-commit+help(a)opensuse.org
1
0
[yast-commit] r60481 - in /branches/SuSE-Code-11-SP1-Branch/openvas-security-scanner: ./ agents/ doc/ package/ src/ testsuite/
by openvasfelix@svn.opensuse.org 22 Jan '10
by openvasfelix@svn.opensuse.org 22 Jan '10
22 Jan '10
Author: openvasfelix
Date: Fri Jan 22 12:02:54 2010
New Revision: 60481
URL: http://svn.opensuse.org/viewcvs/yast?rev=60481&view=rev
Log:
Added OpenVAS Security Scanner module, which was accidentally commited in
wrong branch.
Added:
branches/SuSE-Code-11-SP1-Branch/openvas-security-scanner/ (props changed)
- copied from r60477, branches/SuSE-Code-11-Branch/openvas-security-scanner/
branches/SuSE-Code-11-SP1-Branch/openvas-security-scanner/agents/
- copied from r60478, branches/SuSE-Code-11-Branch/openvas-security-scanner/agents/
branches/SuSE-Code-11-SP1-Branch/openvas-security-scanner/doc/
- copied from r60478, branches/SuSE-Code-11-Branch/openvas-security-scanner/doc/
branches/SuSE-Code-11-SP1-Branch/openvas-security-scanner/package/
- copied from r60478, branches/SuSE-Code-11-Branch/openvas-security-scanner/package/
branches/SuSE-Code-11-SP1-Branch/openvas-security-scanner/src/
- copied from r60478, branches/SuSE-Code-11-Branch/openvas-security-scanner/src/
branches/SuSE-Code-11-SP1-Branch/openvas-security-scanner/testsuite/
- copied from r60478, branches/SuSE-Code-11-Branch/openvas-security-scanner/testsuite/
--
To unsubscribe, e-mail: yast-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: yast-commit+help(a)opensuse.org
1
0
[yast-commit] r60480 - in /branches/SuSE-Code-11-SP1-Branch/autoinstallation: package/autoyast2.changes src/modules/AutoInstallRules.ycp
by ug@svn.opensuse.org 22 Jan '10
by ug@svn.opensuse.org 22 Jan '10
22 Jan '10
Author: ug
Date: Fri Jan 22 11:49:26 2010
New Revision: 60480
URL: http://svn.opensuse.org/viewcvs/yast?rev=60480&view=rev
Log:
the regex match for rules only worked for substrings
Modified:
branches/SuSE-Code-11-SP1-Branch/autoinstallation/package/autoyast2.changes
branches/SuSE-Code-11-SP1-Branch/autoinstallation/src/modules/AutoInstallRules.ycp
Modified: branches/SuSE-Code-11-SP1-Branch/autoinstallation/package/autoyast2.changes
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP1-Branch/autoi…
==============================================================================
--- branches/SuSE-Code-11-SP1-Branch/autoinstallation/package/autoyast2.changes (original)
+++ branches/SuSE-Code-11-SP1-Branch/autoinstallation/package/autoyast2.changes Fri Jan 22 11:49:26 2010
@@ -1,4 +1,10 @@
-------------------------------------------------------------------
+Fri Jan 22 11:49:06 CET 2010 - ug(a)suse.de
+
+- the regex match for rules only worked for substring, not
+ with real regexpressions (bnc#572932)
+
+-------------------------------------------------------------------
Thu Jan 21 15:52:15 CET 2010 - ug(a)suse.de
- passing a boolean to an ask-script failed (bnc#572166)
Modified: branches/SuSE-Code-11-SP1-Branch/autoinstallation/src/modules/AutoInstallRules.ycp
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP1-Branch/autoi…
==============================================================================
--- branches/SuSE-Code-11-SP1-Branch/autoinstallation/src/modules/AutoInstallRules.ycp (original)
+++ branches/SuSE-Code-11-SP1-Branch/autoinstallation/src/modules/AutoInstallRules.ycp Fri Jan 22 11:49:26 2010
@@ -359,7 +359,7 @@
}
else if( matchtype == "regex" )
{
- tmpshell = tmpshell + sformat("[ \"$%1\" =~ \"%2\" ]", var, val);
+ tmpshell = tmpshell + sformat("[ \"$%1\" =~ %2 ]", var, val);
}
if (match)
--
To unsubscribe, e-mail: yast-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: yast-commit+help(a)opensuse.org
1
0
[yast-commit] r60479 - in /trunk/autoinstallation: package/autoyast2.changes src/modules/AutoInstallRules.ycp
by ug@svn.opensuse.org 22 Jan '10
by ug@svn.opensuse.org 22 Jan '10
22 Jan '10
Author: ug
Date: Fri Jan 22 11:48:41 2010
New Revision: 60479
URL: http://svn.opensuse.org/viewcvs/yast?rev=60479&view=rev
Log:
the regex match for rules only worked for substrings
Modified:
trunk/autoinstallation/package/autoyast2.changes
trunk/autoinstallation/src/modules/AutoInstallRules.ycp
Modified: trunk/autoinstallation/package/autoyast2.changes
URL: http://svn.opensuse.org/viewcvs/yast/trunk/autoinstallation/package/autoyas…
==============================================================================
--- trunk/autoinstallation/package/autoyast2.changes (original)
+++ trunk/autoinstallation/package/autoyast2.changes Fri Jan 22 11:48:41 2010
@@ -1,4 +1,10 @@
-------------------------------------------------------------------
+Fri Jan 22 11:47:22 CET 2010 - ug(a)suse.de
+
+- the regex match for rules only worked for substrings, not
+ with real regexpressions (bnc#572932)
+
+-------------------------------------------------------------------
Thu Jan 21 15:50:31 CET 2010 - ug(a)suse.de
- passing a boolean to an ask-script failed (bnc#572166)
Modified: trunk/autoinstallation/src/modules/AutoInstallRules.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/autoinstallation/src/modules/Aut…
==============================================================================
--- trunk/autoinstallation/src/modules/AutoInstallRules.ycp (original)
+++ trunk/autoinstallation/src/modules/AutoInstallRules.ycp Fri Jan 22 11:48:41 2010
@@ -360,7 +360,7 @@
}
else if( matchtype == "regex" )
{
- tmpshell = tmpshell + sformat("[ \"$%1\" =~ \"%2\" ]", var, val);
+ tmpshell = tmpshell + sformat("[ \"$%1\" =~ %2 ]", var, val);
}
if (match)
--
To unsubscribe, e-mail: yast-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: yast-commit+help(a)opensuse.org
1
0
[yast-commit] r60478 - in /branches/SuSE-Code-11-Branch/openvas-security-scanner: agents/ doc/ doc/autodocs/ package/ src/ testsuite/ testsuite/tests/
by openvasfelix@svn.opensuse.org 22 Jan '10
by openvasfelix@svn.opensuse.org 22 Jan '10
22 Jan '10
Author: openvasfelix
Date: Fri Jan 22 11:15:47 2010
New Revision: 60478
URL: http://svn.opensuse.org/viewcvs/yast?rev=60478&view=rev
Log:
Added remaining portion of the OpenVAS Security Scanner
YaST module.
* openvas-security-scanner/agents,
openvas-security-scanner/agents/Makefile.am,
openvas-security-scanner/agents/openvas-security-scanner.scr,
openvas-security-scanneragents/.cvsignore,
openvas-security-scanner/doc,
openvas-security-scanner/doc/autodocs,
openvas-security-scanner/doc/autodocs/Makefile.am,
openvas-security-scanner/doc/autodocs/.cvsignore,
openvas-security-scanner/doc/Makefile.am,
openvas-security-scanner/doc/.cvsignore,
openvas-security-scanner/src,
openvas-security-scanner/src/openvas-security-scanner.desktop,
openvas-security-scanner/src/openvas-security-scanner.ycp,
openvas-security-scanner/src/complex.ycp,
openvas-security-scanner/src/helps.ycp,
openvas-security-scanner/src/OpenvasSecurityScanner.ycp,
openvas-security-scanner/package,
openvas-security-scanner/package/.cvsignore: New. Remaining
portion of the OpenVAS Security Scanner module.
Added:
branches/SuSE-Code-11-Branch/openvas-security-scanner/agents/
branches/SuSE-Code-11-Branch/openvas-security-scanner/agents/.cvsignore
branches/SuSE-Code-11-Branch/openvas-security-scanner/agents/Makefile.am
branches/SuSE-Code-11-Branch/openvas-security-scanner/agents/openvas-security-scanner.scr
branches/SuSE-Code-11-Branch/openvas-security-scanner/doc/
branches/SuSE-Code-11-Branch/openvas-security-scanner/doc/.cvsignore
branches/SuSE-Code-11-Branch/openvas-security-scanner/doc/Makefile.am
branches/SuSE-Code-11-Branch/openvas-security-scanner/doc/autodocs/
branches/SuSE-Code-11-Branch/openvas-security-scanner/doc/autodocs/.cvsignore
branches/SuSE-Code-11-Branch/openvas-security-scanner/doc/autodocs/Makefile.am
branches/SuSE-Code-11-Branch/openvas-security-scanner/package/
branches/SuSE-Code-11-Branch/openvas-security-scanner/package/.cvsignore
branches/SuSE-Code-11-Branch/openvas-security-scanner/src/
branches/SuSE-Code-11-Branch/openvas-security-scanner/src/.cvsignore
branches/SuSE-Code-11-Branch/openvas-security-scanner/src/Makefile.am
branches/SuSE-Code-11-Branch/openvas-security-scanner/src/OpenvasSecurityScanner.ycp
branches/SuSE-Code-11-Branch/openvas-security-scanner/src/complex.ycp
branches/SuSE-Code-11-Branch/openvas-security-scanner/src/dialogs.ycp
branches/SuSE-Code-11-Branch/openvas-security-scanner/src/helps.ycp
branches/SuSE-Code-11-Branch/openvas-security-scanner/src/openvas-security-scanner.desktop
branches/SuSE-Code-11-Branch/openvas-security-scanner/src/openvas-security-scanner.ycp
branches/SuSE-Code-11-Branch/openvas-security-scanner/src/wizards.ycp
branches/SuSE-Code-11-Branch/openvas-security-scanner/testsuite/
branches/SuSE-Code-11-Branch/openvas-security-scanner/testsuite/.cvsignore
branches/SuSE-Code-11-Branch/openvas-security-scanner/testsuite/Makefile.am
branches/SuSE-Code-11-Branch/openvas-security-scanner/testsuite/tests/
branches/SuSE-Code-11-Branch/openvas-security-scanner/testsuite/tests/.cvsignore
Added: branches/SuSE-Code-11-Branch/openvas-security-scanner/agents/.cvsignore
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-Branch/openvas-s…
==============================================================================
--- branches/SuSE-Code-11-Branch/openvas-security-scanner/agents/.cvsignore (added)
+++ branches/SuSE-Code-11-Branch/openvas-security-scanner/agents/.cvsignore Fri Jan 22 11:15:47 2010
@@ -0,0 +1,2 @@
+Makefile
+Makefile.in
Added: branches/SuSE-Code-11-Branch/openvas-security-scanner/agents/Makefile.am
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-Branch/openvas-s…
==============================================================================
--- branches/SuSE-Code-11-Branch/openvas-security-scanner/agents/Makefile.am (added)
+++ branches/SuSE-Code-11-Branch/openvas-security-scanner/agents/Makefile.am Fri Jan 22 11:15:47 2010
@@ -0,0 +1,7 @@
+# Makefile.am for openvas-security-scanner/agents
+
+agent_SCRIPTS =
+
+scrconf_DATA = openvas-security-scanner.scr
+
+EXTRA_DIST = $(agent_SCRIPTS) $(scrconf_DATA)
Added: branches/SuSE-Code-11-Branch/openvas-security-scanner/agents/openvas-security-scanner.scr
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-Branch/openvas-s…
==============================================================================
--- branches/SuSE-Code-11-Branch/openvas-security-scanner/agents/openvas-security-scanner.scr (added)
+++ branches/SuSE-Code-11-Branch/openvas-security-scanner/agents/openvas-security-scanner.scr Fri Jan 22 11:15:47 2010
@@ -0,0 +1,24 @@
+/**
+ * File:
+ * openvas_security_scanner.scr
+ * Summary:
+ * SCR Agent for reading/writing /etc/openvas/openvas_security_scanner_config
+ * using the ini-agent
+ * Access:
+ * read/write
+ * Authors:
+ * Felix Wolfsteller <felix.wolfsteller(a)intevation.de>
+ * Example:
+ * Read(.openvas.feed)
+ * (["osf"])
+ *
+ * Write(.openvas.feed, "onf")
+ * (true)
+ * $**Id$
+ */
+
+.etc.openvas.openvas_security_scanner_config
+
+`ag_ini(
+ `SysConfigFile( "/etc/openvas/openvas_security_scanner.config")
+)
Added: branches/SuSE-Code-11-Branch/openvas-security-scanner/doc/.cvsignore
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-Branch/openvas-s…
==============================================================================
--- branches/SuSE-Code-11-Branch/openvas-security-scanner/doc/.cvsignore (added)
+++ branches/SuSE-Code-11-Branch/openvas-security-scanner/doc/.cvsignore Fri Jan 22 11:15:47 2010
@@ -0,0 +1,2 @@
+Makefile
+Makefile.in
Added: branches/SuSE-Code-11-Branch/openvas-security-scanner/doc/Makefile.am
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-Branch/openvas-s…
==============================================================================
--- branches/SuSE-Code-11-Branch/openvas-security-scanner/doc/Makefile.am (added)
+++ branches/SuSE-Code-11-Branch/openvas-security-scanner/doc/Makefile.am Fri Jan 22 11:15:47 2010
@@ -0,0 +1,10 @@
+# Makefile.am for openvas-security-scanner/doc
+
+SUBDIRS = autodocs
+
+htmldir = $(docdir)
+
+doc_DATA =
+html_DATA =
+
+EXTRA_DIST = $(doc_DATA) $(html_DATA)
Added: branches/SuSE-Code-11-Branch/openvas-security-scanner/doc/autodocs/.cvsignore
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-Branch/openvas-s…
==============================================================================
--- branches/SuSE-Code-11-Branch/openvas-security-scanner/doc/autodocs/.cvsignore (added)
+++ branches/SuSE-Code-11-Branch/openvas-security-scanner/doc/autodocs/.cvsignore Fri Jan 22 11:15:47 2010
@@ -0,0 +1,3 @@
+Makefile
+Makefile.in
+*.html
Added: branches/SuSE-Code-11-Branch/openvas-security-scanner/doc/autodocs/Makefile.am
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-Branch/openvas-s…
==============================================================================
--- branches/SuSE-Code-11-Branch/openvas-security-scanner/doc/autodocs/Makefile.am (added)
+++ branches/SuSE-Code-11-Branch/openvas-security-scanner/doc/autodocs/Makefile.am Fri Jan 22 11:15:47 2010
@@ -0,0 +1,3 @@
+# Makefile.am for openvas-security-scanner/doc/autodocs
+
+include $(top_srcdir)/autodocs-ycp.ami
Added: branches/SuSE-Code-11-Branch/openvas-security-scanner/package/.cvsignore
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-Branch/openvas-s…
==============================================================================
--- branches/SuSE-Code-11-Branch/openvas-security-scanner/package/.cvsignore (added)
+++ branches/SuSE-Code-11-Branch/openvas-security-scanner/package/.cvsignore Fri Jan 22 11:15:47 2010
@@ -0,0 +1,2 @@
+*.spec
+*.bz2
Added: branches/SuSE-Code-11-Branch/openvas-security-scanner/src/.cvsignore
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-Branch/openvas-s…
==============================================================================
--- branches/SuSE-Code-11-Branch/openvas-security-scanner/src/.cvsignore (added)
+++ branches/SuSE-Code-11-Branch/openvas-security-scanner/src/.cvsignore Fri Jan 22 11:15:47 2010
@@ -0,0 +1,4 @@
+Makefile
+Makefile.in
+*.ybc
+.dep
Added: branches/SuSE-Code-11-Branch/openvas-security-scanner/src/Makefile.am
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-Branch/openvas-s…
==============================================================================
--- branches/SuSE-Code-11-Branch/openvas-security-scanner/src/Makefile.am (added)
+++ branches/SuSE-Code-11-Branch/openvas-security-scanner/src/Makefile.am Fri Jan 22 11:15:47 2010
@@ -0,0 +1,29 @@
+# Makefile.am for openvas-security-scanner/src
+
+yncludedir = @yncludedir@/openvas-security-scanner
+
+client_DATA = \
+ openvas-security-scanner.ycp
+
+ynclude_DATA = \
+ helps.ycp \
+ wizards.ycp \
+ dialogs.ycp \
+ complex.ycp
+
+desktop_DATA = \
+ openvas-security-scanner.desktop
+
+module_DATA = \
+ OpenvasSecurityScanner.ycp \
+ OpenvasSecurityScanner2.pm \
+ OpenvasSecurityScanner3.py
+
+# create a symlink for local build, #145327
+openvas-security-scanner:
+ ln -sf . $@
+ycpchook = openvas-security-scanner
+
+EXTRA_DIST = $(client_DATA) $(ynclude_DATA) $(module_DATA) $(desktop_DATA)
+
+include $(top_srcdir)/Makefile.am.common
Added: branches/SuSE-Code-11-Branch/openvas-security-scanner/src/OpenvasSecurityScanner.ycp
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-Branch/openvas-s…
==============================================================================
--- branches/SuSE-Code-11-Branch/openvas-security-scanner/src/OpenvasSecurityScanner.ycp (added)
+++ branches/SuSE-Code-11-Branch/openvas-security-scanner/src/OpenvasSecurityScanner.ycp Fri Jan 22 11:15:47 2010
@@ -0,0 +1,545 @@
+/* ------------------------------------------------------------------------------
+ * Copyright (c) 2006 Novell, Inc. All Rights Reserved.
+ *
+ *
+ * This program is free software; you can redistribute it and/or modify it under
+ * the terms of version 2 of the GNU General Public License as published by the
+ * Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program; if not, contact Novell, Inc.
+ *
+ * To contact Novell about this file by physical or electronic mail, you may find
+ * current contact information at www.novell.com.
+ * ------------------------------------------------------------------------------
+ */
+
+/**
+ * File: modules/OpenvasSecurityScanner.ycp
+ * Package: Configuration of openvas-security-scanner
+ * Summary: OpenvasSecurityScanner settings, input and output functions
+ * Authors: Felix Wolfsteller <felix.wolfsteller(a)intevation.de>
+ *
+ * $**Id$
+ *
+ * Representation of the configuration of openvas-security-scanner.
+ * Input and output routines.
+ */
+
+{
+
+module "OpenvasSecurityScanner";
+textdomain "openvas-security-scanner";
+
+import "FileUtils";
+import "Popup";
+import "Progress";
+import "Report";
+import "SCR";
+import "Service";
+import "Summary";
+import "Message";
+
+/**
+ * Write only, used during autoinstallation.
+ * Don't run services and SuSEconfig, it's all done at one place.
+ */
+boolean write_only = false;
+
+/**
+ * The users choosen feed. Currently one of "No Feed",
+ * "Greenbone Security Feed" or "OpenVAS NVT Feed".
+ */
+global any feed_choice = "";
+
+/**
+ * Hold the path to where to install the GSF files from.
+ */
+global string gsf_location = "";
+
+/**
+ * Sleeping time beetwing progress steps.
+ */
+integer sl = 20;
+
+
+/**
+ * Returns whether the /usr/sbin/greenbone-nvt-sync and
+ * /etc/openvas/gsf-access-key exist.
+ * @return true if /usr/sbin/greenbone-nvt-sync and /etc/openvas/gsf-access-key
+ * exist.
+ */
+global boolean IsGSFInstalled () {
+ if (FileUtils::Exists ("/usr/sbin/greenbone-nvt-sync") && FileUtils::Exists ("/etc/openvas/gsf-access-key"))
+ return true;
+
+ return false;
+}
+
+/**
+ * Ask if user really wants to abort
+ * @return true on user intended abort.
+ */
+global boolean Abort () {
+ return Popup::ReallyAbort (true);
+}
+
+/**
+ * Checks whether an Abort button has been pressed.
+ * If so, calls function to confirm the abort call.
+ *
+ * @return true if abort confirmed
+ */
+global boolean PollAbort () {
+ if (UI::PollInput () == `abort)
+ return Abort ();
+
+ return false;
+}
+
+/**
+ * Removes contents of /var/cache/openvas .
+ * @return true.
+ */
+boolean CleanCache () {
+ SCR::Execute (.target.bash, "for i in /var/cache/openvas/*; do rm -rf $i; done");
+ return true;
+}
+
+/**
+ * Removes contents of /usr/lib/openvas/plugins .
+ * @return true.
+ */
+boolean CleanNVTDir () {
+ SCR::Execute (.target.bash, "for i in /usr/lib/openvas/plugins/*; do rm -rf $i; done");
+ return true;
+}
+
+
+/**
+ * Read all OpenVAS Security Scanner settings
+ * @return true on success
+ */
+global boolean Read() {
+ /* OpenvasSecurityScanner read dialog caption */
+ string caption = _("Initializing OpenVAS Security Scanner Configuration");
+
+ integer steps = 2;
+
+ Progress::New (caption, " ", steps, [
+ /* Progress stage 1/2 */
+ _("Read current OpenVAS Security Scanner configuration"),
+ /* Progress stage 2/2 */
+ _("Read current openvas-scanner state")
+ ], [
+ /* Progress stage 1/2 */
+ _("Reading current OpenVAS Security Scanner configuration..."),
+ /* Progress stage 2/2 */
+ _("Reading current openvas-scanner state..."),
+ /* Progress finished */
+ Message::Finished ()
+ ],"");
+
+ sleep (sl);
+
+ if (PollAbort ()) return false;
+ Progress::NextStage ();
+ if (false) Report::Error (Message::CannotReadCurrentSettings ());
+ sleep (sl);
+
+ if (PollAbort ()) return false;
+ Progress::NextStep();
+ if (false) Report::Error (_("Cannot read current openvas-scanner state."));
+ sleep (sl);
+
+ if (PollAbort ()) return false;
+ Progress::NextStage ();
+ sleep (sl);
+
+ feed_choice = SCR::Read (.etc.openvas.openvas_security_scanner_config.feed);
+ if (feed_choice == nil)
+ feed_choice = "No Feed";
+
+ return true;
+}
+
+
+/**
+ * Write all OpenVAS Security Scanner settings.
+ * @return true on success
+ */
+global boolean Write() {
+ /* Openvas Security Scanner write dialog caption */
+ string caption = _("Saving OpenVAS Security Scanner Configuration");
+
+ integer steps = 2;
+
+ Progress::New (caption, " ", steps, [
+ /* Progress stage 1/2 */
+ _("Write the OpenVAS Security Scanner settings")
+], [
+ /* Progress step 1/2 */
+ _("Writing the OpenVAS Security Scanner settings..."),
+ Message::Finished ()
+],
+""
+ );
+
+ sleep (sl);
+
+ /* Write settings to conf file */
+ if (PollAbort ()) return false;
+ Progress::NextStage ();
+ /* Error message */
+ if (!SCR::Write (.etc.openvas.openvas_security_scanner_config.feed, feed_choice)
+ || !SCR::Write (.etc.openvas.openvas_security_scanner_config, nil)){
+ Report::Error (_("Cannot write OpenVAS Security Scanner settings."));
+ }
+
+ sleep (sl);
+
+ Progress::NextStage ();
+
+ return true;
+}
+
+
+/**
+ * Disable the openvas service and clean up the cache and plugins directory.
+ * @return true on success
+ */
+global boolean DisableOpenVAS () {
+ string caption = _("Disable the OpenVAS Security Scanner");
+ integer steps = 3;
+
+ Progress::New (caption, " ", steps, [
+ /* Progress stage 1/3 */
+ _("Stopp the OpenVAS Security Scanner service"),
+ /* Progress stage 2/3 */
+ _("Disable the OpenVAS Security Scanner service"),
+ /* Progress stage 3/3 */
+ _("Delete the NVT datastores"),
+ ],[
+ /* Progress stage 1/3 */
+ _("Stopping the OpenVAS Security Scanner service..."),
+ /* Progress stage 2/3 */
+ _("Disabling the OpenVAS Security Scanner service..."),
+ /* Progress stage 3/3 */
+ _("Deleting the NVT datastores..."),
+ Message::Finished ()
+ ], "");
+
+ /* Stop the service (if running) */
+ if (PollAbort ())
+ return false;
+ Progress::NextStage ();
+ Service::Stop ("openvas-scanner");
+ sleep (sl);
+
+ /* Disable the service */
+ if (PollAbort ())
+ return false;
+ Progress::NextStage ();
+ Service::Adjust ("openvas-scanner", "disable");
+ sleep (sl);
+
+ /* Clean NVT Cache and Collection */
+ if (PollAbort ())
+ return false;
+ Progress::NextStage ();
+ CleanCache ();
+ CleanNVTDir ();
+ sleep (sl);
+
+ Progress::NextStage ();
+ sleep (sl);
+
+ return true;
+}
+
+/**
+ * Fetches a NVT Feed.
+ * @return true on success
+ */
+global boolean FetchFeed () {
+ string caption = _("Fetching NVT Feed");
+
+ integer steps = 4;
+
+ Progress::New (caption, " ", steps, [
+ /* Progress stage 1/4 */
+ _("Stop the OpenVAS Security Scanner service"),
+ /* Progress stage 2/4 */
+ _("Delete the NVT datastores"),
+ /* Progress stage 3/4 */
+ _("Fetch the Feed (may take a while)"),
+ /* Progress stage 4/4 */
+ _("Start the OpenVAS Security Scanner service (may take a while)")
+ ], [
+ /* Progress stage 1/4 */
+ _("Stopping the OpenVAS Security Scanner service..."),
+ /* Progress stage 2/4 */
+ _("Deleting the NVT datastores..."),
+ /* Progress stage 3/4 */
+ _("Fetching the Feed (may take a while)..."),
+ /* Progress stage 4/4 */
+ _("Starting the OpenVAS Security Scanner service (may take a while)..."),
+ Message::Finished ()
+ ], "");
+
+ sleep (sl);
+
+ /* Stop openvas service */
+ if (PollAbort())
+ return false;
+ Progress::NextStage ();
+ Service::Stop ("openvas-scanner");
+ sleep (sl);
+
+ /* Clean the NVT Cache and Collection */
+ if (PollAbort ())
+ return false;
+ Progress::NextStage ();
+ CleanCache ();
+ CleanNVTDir ();
+ sleep (sl);
+
+ /* Sync with feed */
+ if (PollAbort ())
+ return false;
+ Progress::NextStage ();
+ if (feed_choice == "Greenbone Security Feed")
+ SCR::Execute (.target.bash, "greenbone-nvt-sync");
+ else
+ SCR::Execute (.target.bash, "openvas-nvt-sync");
+ /** @TODO Once the feed synchronization scripts have been consolidated, it
+ * will be possible to check the return. */
+ sleep (sl);
+
+ /* Start openvas service */
+ if (PollAbort ()) return false;
+ Progress::NextStage ();
+ Service::Adjust ("openvas-scanner", "enable");
+ if (!Service::Start ("openvas-scanner"))
+ Report::Error (_("Could not start OpenVAS Security Scanner service."));
+ /** @TODO decide whether
+ * Report::Error (Message::CannotAdjustService ("openvas-scanner"));
+ * is more accurate */
+ sleep (sl);
+
+ Progress::NextStage ();
+ sleep (sl);
+
+ return true;
+}
+
+/**
+ * Fetches a NVT Feed.
+ * @return true on success
+ */
+global boolean SyncWithFeed () {
+ string caption = _("Synchronization with NVT Feed");
+
+ integer steps = 3;
+
+ Progress::New (caption, " ", steps, [
+ /* Progress stage 1/3 */
+ _("Stop the OpenVAS Security Scanner service"),
+ /* Progress stage 2/3 */
+ _("Fetch the Feed (may take a while)"),
+ /* Progress stage 2/3 */
+ _("Start the OpenVAS Security Scanner service (may take a while)")
+ ], [
+ /* Progress stage 1/3 */
+ _("Stopping the OpenVAS Security Scanner service..."),
+ /* Progress stage 2/3 */
+ _("Fetching the Feed (may take a while)..."),
+ /* Progress stage 3/3 */
+ _("Starting the OpenVAS Security Scanner service (may take a while)..."),
+ Message::Finished ()
+ ], "");
+
+ sleep (sl);
+
+ /* Stop openvas service */
+ if (PollAbort())
+ return false;
+ Progress::NextStage ();
+ Service::Stop ("openvas-scanner");
+ sleep (sl);
+
+ /* Sync with feed */
+ if (PollAbort ())
+ return false;
+ Progress::NextStage ();
+ if (feed_choice == "Greenbone Security Feed")
+ SCR::Execute (.target.bash, "greenbone-nvt-sync");
+ else
+ SCR::Execute (.target.bash, "openvas-nvt-sync");
+ /** @TODO Once the feed synchronization scripts have been consolidated, it
+ * will be possible to check the return. */
+ sleep (sl);
+
+ /* Start openvas service */
+ if (PollAbort ()) return false;
+ Progress::NextStage ();
+ Service::Adjust ("openvas-scanner", "enable");
+ if (!Service::Start ("openvas-scanner"))
+ Report::Error (_("Could not start OpenVAS Security Scanner service."));
+ /** @TODO decide whether
+ * Report::Error (Message::CannotAdjustService ("openvas-scanner"));
+ * is more accurate */
+ sleep (sl);
+
+ Progress::NextStage ();
+ sleep (sl);
+
+ return true;
+}
+
+/**
+ * Deactivate the GSF, remove access key and synchronization script.
+ */
+global boolean DeactivateGSF () {
+ /* Deactivate Greenbone Security Feed dialog caption */
+ string caption = _("Deactivate Greenbone Security Feed Subscription");
+
+ integer steps = 3;
+
+ Progress::New(caption, " ", steps, [
+ /* Progress stage 1/3 */
+ _("Remove Greenbone Security Feed Access Key"),
+ /* Progress stage 2/3 */
+ _("Remove Greenbone Security Feed Synchronization Script"),
+ /* Progress stage 3/3 */
+ _("Delete NVT datastores"),
+], [
+ /* Progress stage 1/3 */
+ _("Removing Greenbone Security Feed Access Key..."),
+ /* Progress stage 2/3 */
+ _("Removing Greenbone Security Feed Synchronization Script..."),
+ /* Progress stage 3/3 */
+ _("Deleting NVT datastores..."),
+ Message::Finished ()
+ ], "");
+
+ sleep (sl);
+
+ /* Removing Access Key */
+ if (PollAbort ()) return false;
+ Progress::NextStage ();
+ SCR::Execute (.target.bash, "rm -rf /etc/openvas/gsf-access-key");
+ sleep (sl);
+
+
+ /* Removing sync script */
+ if (PollAbort ()) return false;
+ Progress::NextStage ();
+ SCR::Execute (.target.bash, "rm -rf /usr/sbin/greenbone-nvt-sync");
+ sleep (sl);
+
+ /* Clean the NVT Cache and Collection */
+ if (PollAbort ()) return false;
+ Progress::NextStage ();
+ CleanCache ();
+ CleanNVTDir ();
+ sleep (sl);
+
+ return true;
+}
+
+/**
+ * Fetches a NVT Feed.
+ * @return true on success
+ */
+global boolean ActivateGSF () {
+ /* Openvas Security Scanner Feed Fetching dialog caption */
+ string caption = _("Fetching NVT Feed");
+
+ integer steps = 5;
+
+ Progress::New(caption, " ", steps, [
+ /* Progress stage 1/5 */
+ _("Copy Greenbone Security Feed Access Key"),
+ /* Progress stage 2/5 */
+ _("Add feed.greenbone.net to list of known hosts"),
+ /* Progress stage 3/5 */
+ _("Import Greenbone Key"),
+ /* Progress stage 4/5 */
+ _("Install greenbone-nvt-sync script"),
+ /* Progress stage 5/5 */
+ _("Test Keys")
+], [
+ /* Progress stage 1/5 */
+ _("Copying Greenbone Security Feed Access Key..."),
+ /* Progress stage 2/5 */
+ _("Adding feed.greenbone.net to list of known hosts"),
+ /* Progress stage 3/5 */
+ _("Importing Greenbone Key..."),
+ /* Progress stage 4/5 */
+ _("Installing greenbone-nvt-sync script..."),
+ /* Progress stage 5/5 */
+ _("Testing Keys..."),
+ Message::Finished ()
+ ], "");
+
+ sleep(sl);
+
+ /* Adding greenbone feed location to list of known hosts */
+ if (PollAbort ()) return false;
+ Progress::NextStage ();
+ SCR::Execute (.target.bash, "echo \"[feed.greenbone.net]:24,[193.108.181.139]:24 ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAmVIt4lOPi1lVJfFCtiNjGR4kHj377C6jMY4iaxotYueuGq8l8B1YIMUMLQzaUeaPwOGMZl5mWUT158zaiWK4zOzZarFLey6JrKfrnDZMdCcCneZPBRbMJUxiV1jv4U+/Vp/V1wO6OJ+S9XkodxvN9+vjAhcXspKXcRol30+T9mgilWK+nvSTVEhce+JJYz+gdQFN+1xgkPhjGbXSjHT7zB5fVjWe7TYLGhdqj1U+NTVOcKNn0wMBRGM3T63rKV71KI1hmLdX6+VmVQOCjYpqsFRh0TZadh5cEE5gmPDCnGlXCA9BrilOMSRvsTySs30xN4/Z5RHPWbDS0rwvqBf9Lw==\" >> /root/.ssh/known_hosts");
+ sleep (sl);
+
+
+ /* Copy access key and set permissions */
+ if (PollAbort ()) return false;
+ Progress::NextStage ();
+ y2milestone (" --> cp " + gsf_location + "/gsf-access-key"
+ + " /etc/openvas/gsf-access-key <--");
+ SCR::Execute (.target.bash, "cp " + gsf_location + "/gsf-access-key"
+ + " /etc/openvas/gsf-access-key");
+ SCR::Execute (.target.bash, "chmod 400 /etc/openvas/gsf-access-key");
+ sleep (sl);
+
+ /* Import Greenbone Key via script */
+ if (PollAbort ()) return false;
+ Progress::NextStage ();
+ integer ret = (integer) SCR::Execute (.target.bash,
+ gsf_location
+ + "/import-greenbone-key");
+ if (ret != 0)
+ {
+ Report::Error (_("The greenbone key could not be imported."));
+ }
+ sleep(sl);
+
+ /* Install Greenbone NVT Sync script */
+ if (PollAbort ()) return false;
+ Progress::NextStage ();
+ SCR::Execute (.target.bash, "cp " + gsf_location + "/greenbone-nvt-sync /usr/sbin");
+ sleep (sl);
+
+ /* Do a self test */
+ if (PollAbort ()) return false;
+ Progress::NextStage ();
+ ret = (integer) SCR::Execute (.target.bash,
+ "greenbone-nvt-sync --selftest");
+ if (ret != 0)
+ {
+ Report::Error (_("The synchronization test failed."));
+ }
+ sleep (sl);
+
+ Progress::NextStage ();
+ sleep (sl);
+
+ return true;
+}
+
+/* EOF */
+}
Added: branches/SuSE-Code-11-Branch/openvas-security-scanner/src/complex.ycp
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-Branch/openvas-s…
==============================================================================
--- branches/SuSE-Code-11-Branch/openvas-security-scanner/src/complex.ycp (added)
+++ branches/SuSE-Code-11-Branch/openvas-security-scanner/src/complex.ycp Fri Jan 22 11:15:47 2010
@@ -0,0 +1,101 @@
+/* ------------------------------------------------------------------------------
+ * Copyright (c) 2006 Novell, Inc. All Rights Reserved.
+ *
+ *
+ * This program is free software; you can redistribute it and/or modify it under
+ * the terms of version 2 of the GNU General Public License as published by the
+ * Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program; if not, contact Novell, Inc.
+ *
+ * To contact Novell about this file by physical or electronic mail, you may find
+ * current contact information at www.novell.com.
+ * ------------------------------------------------------------------------------
+ */
+
+/**
+ * File: include/openvas-security-scanner/complex.ycp
+ * Package: Configuration of openvas-security-scanner
+ * Summary: Dialogs definitions
+ * Authors: Felix Wolfsteller <felix.wolfsteller(a)intevation.de>
+ *
+ * $**Id$
+ */
+
+{
+
+textdomain "openvas-security-scanner";
+
+import "Label";
+import "Popup";
+import "Wizard";
+import "Wizard_hw";
+import "Confirm";
+import "OpenvasSecurityScanner";
+
+
+include "openvas-security-scanner/helps.ycp";
+
+/**
+ * Read settings dialog
+ * @return `abort if aborted and `next otherwise
+ */
+symbol ReadDialog() {
+ Wizard::RestoreHelp(HELPS["read"]:"");
+ //OpenvasSecurityScanner::SetAbortFunction(PollAbort);
+ if (!Confirm::MustBeRoot()) return `abort;
+ boolean ret = OpenvasSecurityScanner::Read();
+ return ret ? `next : `abort;
+}
+
+/**
+ * Write settings dialog
+ * @return `abort if aborted and `next otherwise
+ */
+symbol WriteDialog() {
+ Wizard::RestoreHelp(HELPS["write"]:"");
+ //OpenvasSecurityScanner::SetAbortFunction(PollAbort);
+ boolean ret = OpenvasSecurityScanner::Write();
+ return ret ? `next : `abort;
+}
+
+
+/**
+ * Feed fetching "dialog"
+ * @return `abort if aborted and `next otherwise
+ */
+symbol FetchFeedDialog() {
+ Wizard::RestoreHelp(HELPS["fetchfeed"]:"");
+ boolean ret = OpenvasSecurityScanner::FetchFeed();
+ return ret ? `next : `abort;
+}
+
+/**
+ * Feed Synchronization "dialog"
+ * @return `abort if aborted and `next otherwise
+ */
+symbol SyncDialog () {
+ Wizard::RestoreHelp(HELPS["fetchfeed"]:"");
+ boolean ret = OpenvasSecurityScanner::SyncWithFeed();
+ return ret ? `next : `abort;
+
+}
+
+/**
+ * Greenbone Security Feed Activation "dialog"
+ * @return `abort if aborted and `next otherwise
+ */
+symbol ActivateGSFDialog () {
+ Wizard::RestoreHelp(HELPS["activategsf"]:"");
+ boolean ret = OpenvasSecurityScanner::ActivateGSF();
+ return ret ? `next : `abort;
+}
+
+/* EOF */
+}
+
Added: branches/SuSE-Code-11-Branch/openvas-security-scanner/src/dialogs.ycp
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-Branch/openvas-s…
==============================================================================
--- branches/SuSE-Code-11-Branch/openvas-security-scanner/src/dialogs.ycp (added)
+++ branches/SuSE-Code-11-Branch/openvas-security-scanner/src/dialogs.ycp Fri Jan 22 11:15:47 2010
@@ -0,0 +1,232 @@
+/* ------------------------------------------------------------------------------
+ * Copyright (c) 2006 Novell, Inc. All Rights Reserved.
+ *
+ *
+ * This program is free software; you can redistribute it and/or modify it under
+ * the terms of version 2 of the GNU General Public License as published by the
+ * Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program; if not, contact Novell, Inc.
+ *
+ * To contact Novell about this file by physical or electronic mail, you may find
+ * current contact information at www.novell.com.
+ * ------------------------------------------------------------------------------
+ */
+
+/**
+ * File: include/openvas-security-scanner/dialogs.ycp
+ * Package: Configuration of openvas-security-scanner
+ * Summary: Dialogs definitions
+ * Authors: Felix Wolfsteller <felix.wolfsteller(a)intevation.de>
+ *
+ * $**Id$
+ */
+
+{
+
+textdomain "openvas-security-scanner";
+
+import "Label";
+import "Wizard";
+import "OpenvasSecurityScanner";
+
+include "openvas-security-scanner/helps.ycp";
+
+/**
+ * OpenVAS Scan-Server Configuration Dialog
+ *
+ * @return any dialog result
+ */
+any ScannerConfigurationDialog () {
+ string caption = _("OpenVAS Security Scanner Configuration");
+
+ boolean no_feed_selected = (OpenvasSecurityScanner::feed_choice == nil ||
+ OpenvasSecurityScanner::feed_choice == "No Feed" ||
+ OpenvasSecurityScanner::feed_choice == "");
+
+ term radio_group = `VBox ();
+ radio_group = add (radio_group, `Left(
+ `RadioButton(`id(`no_feed), _("&Disable OpenVAS Security Scanner"), no_feed_selected) ));
+
+ radio_group = add (radio_group, `Left(
+ `RadioButton(`id(`onf), _("Enable and use &OpenVAS NVT Feed"), (OpenvasSecurityScanner::feed_choice == "OpenVAS NVT Feed")) ));
+
+ // Disable the Greenbone Security Feed option if the GSF scripts are not installed / activated
+ if (OpenvasSecurityScanner::IsGSFInstalled ())
+ {
+ radio_group = add (radio_group, `Left(`RadioButton(`id(`gsf), _("Enable and use &Greenbone Security Feed"), (OpenvasSecurityScanner::feed_choice == "Greenbone Security Feed")) ));
+ }
+ else
+ {
+ radio_group = add (radio_group, `Left(`RadioButton(`id(`gsf), `opt(`disabled), _("Enable and use &Greenbone Security Feed"), false) ));
+ }
+
+ term radio_box = `RadioButtonGroup (`id(`feed), `HVSquash(radio_group));
+
+ term gsf_box = `VBox ();
+ if (OpenvasSecurityScanner::IsGSFInstalled ())
+ {
+ gsf_box = add (gsf_box, `PushButton(`id(`activate_gsf), `opt(`notify, `disabled), _("&Activate Greenbone Security Feed Subscription")));
+ gsf_box = add (gsf_box, `PushButton(`id(`deactivate_gsf), `opt(`notify), _("D&eactivate Greenbone Security Feed Subscription")));
+ }
+ else
+ {
+ gsf_box = add (gsf_box, `PushButton(`id(`activate_gsf), `opt(`notify), _("&Activate Greenbone Security Feed Subscription")));
+ gsf_box = add (gsf_box, `PushButton(`id(`deactivate_gsf), `opt(`notify, `disabled), _("D&eactivate Greenbone Security Feed Subscription")));
+ }
+
+ // Disable the "Sync Now" button if no feed is selected / the OpenVAS service is disabled.
+ term sync_now_button = (no_feed_selected) ? `PushButton(`id(`feedsync_now), `opt(`disabled), _("&Synchronize with Feed now"))
+ : `PushButton(`id(`feedsync_now), `opt(`notify), _("&Synchronize with Feed now"));
+
+ integer w = 38;
+ term contents = `VBox (`Frame ("Security Scanner Service", `MinSize (w, 0, radio_box)), `VSpacing (1),
+ `Frame ("Professional Feed Subscriptions", `MinSize (w, 0, gsf_box)), `VSpacing (1),
+ `Frame ("Manual Feed Management", `MinSize (w, 0, `VBox (sync_now_button))));
+
+ Wizard::SetContentsButtons (caption, contents,
+ HELPS["configuration"]:"",
+ Label::BackButton (), Label::FinishButton ());
+ Wizard::DisableBackButton();
+
+ any ret = nil;
+ while (true) {
+ ret = UI::UserInput ();
+
+ /* Abort? */
+ if (ret == `abort)
+ {
+ if (OpenvasSecurityScanner::Abort ()) break;
+ else continue;
+ }
+ /* Next */
+ else if (ret == `next)
+ {
+ ret = UI::QueryWidget (`id(`feed), `CurrentButton);
+ string choice = "";
+ if (ret == `no_feed)
+ choice = "No Feed";
+ else if (ret == `onf)
+ choice = "OpenVAS NVT Feed";
+ else if (ret == `gsf)
+ choice = "Greenbone Security Feed";
+
+ /* Check whether the feed-choice changed, do nothing if so */
+ if (OpenvasSecurityScanner::feed_choice == choice)
+ ret = `write;
+ else
+ {
+ OpenvasSecurityScanner::feed_choice = choice;
+ if (choice == "No Feed")
+ {
+ ret = `no_feed;
+ }
+ else
+ {
+ ret = `fetch_new;
+ }
+ }
+ break;
+
+ }
+ /* Do a feed sync */
+ else if (ret == `feedsync_now)
+ {
+ break;
+ }
+ /* Activate GSF */
+ else if (ret == `activate_gsf)
+ {
+ break;
+ }
+ /* Deactivate GSF */
+ else if (ret == `deactivate_gsf)
+ {
+ OpenvasSecurityScanner::feed_choice = "No Feed";
+ break;
+ }
+ /* Unknown */
+ else
+ {
+ y2error("unexpected retcode: %1", ret);
+ continue;
+ }
+ }
+
+ Wizard::RestoreBackButton ();
+
+ return ret;
+}
+
+/**
+ * Dialog to enter the location of the Greenbone Security Feed (key) files and scripts
+ *
+ * @return any dialog result
+ */
+any EnterGSFLocationDialog () {
+ string caption = _("Greenbone Security Feed installation");
+
+
+ term contents = `VBox (`InputField(`id(`gsf_location), _("Path to directory containing the Greenbone Security Feed Files"), ""));
+
+ Wizard::SetContentsButtons (caption, contents,
+ HELPS["activategsf"]:"",
+ Label::BackButton(), Label::NextButton());
+ Wizard::DisableBackButton ();
+
+ any ret = nil;
+ while (true) {
+ ret = UI::UserInput ();
+ if (ret == `abort)
+ {
+ break;
+ }
+ else if (ret == `next)
+ {
+ /* Assuming location is correct */
+ any text = UI::QueryWidget(`id(`gsf_location), `Value);
+ OpenvasSecurityScanner::gsf_location = (string) text;
+ break;
+ }
+ else
+ {
+ y2error ("unexpected retcode: %1", ret);
+ continue;
+ }
+ }
+
+ Wizard::RestoreBackButton ();
+ return ret;
+}
+
+/**
+ * Dialog showing progress of disabling the OpenVAS Security Scanner Service.
+ *
+ * @return any dialog result
+ */
+any DisableOpenVASDialog () {
+ Wizard::RestoreHelp (HELPS["disableopenvas"]:"");
+ boolean ret = OpenvasSecurityScanner::DisableOpenVAS ();
+ return ret ? `next : `abort;
+}
+
+/**
+ * Dialog showing progress of deactivating the Greenbone Security Feed.
+ *
+ * @return any dialog result
+ */
+any DeactivateGSFDialog () {
+ Wizard::RestoreHelp (HELPS["deactivategsf"]:""); /** TODO help */
+ boolean ret = OpenvasSecurityScanner::DeactivateGSF ();
+ return ret ? `next : `abort;
+}
+
+
+/* EOF */
+}
+
Added: branches/SuSE-Code-11-Branch/openvas-security-scanner/src/helps.ycp
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-Branch/openvas-s…
==============================================================================
--- branches/SuSE-Code-11-Branch/openvas-security-scanner/src/helps.ycp (added)
+++ branches/SuSE-Code-11-Branch/openvas-security-scanner/src/helps.ycp Fri Jan 22 11:15:47 2010
@@ -0,0 +1,131 @@
+/* ------------------------------------------------------------------------------
+ * Copyright (c) 2006 Novell, Inc. All Rights Reserved.
+ *
+ *
+ * This program is free software; you can redistribute it and/or modify it under
+ * the terms of version 2 of the GNU General Public License as published by the
+ * Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program; if not, contact Novell, Inc.
+ *
+ * To contact Novell about this file by physical or electronic mail, you may find
+ * current contact information at www.novell.com.
+ * ------------------------------------------------------------------------------
+ */
+
+/**
+ * File: include/openvas-security-scanner/helps.ycp
+ * Package: Configuration of openvas-security-scanner
+ * Summary: Help texts of all the dialogs
+ * Authors: Felix Wolfsteller <felix.wolfsteller(a)intevation.de>
+ *
+ * $**Id$
+ */
+
+{
+
+textdomain "openvas-security-scanner";
+
+/**
+ * All helps are here
+ */
+map HELPS = $[
+ /* Help for main dialog */
+ "configuration" : "<p><b><big>"
+ + _("OpenVAS Security Scanner Configuration")
+ + "</big></b>"
+ // Disable OpenVAS Security Scanner
+ + "<p><b>" + _("Disable OpenVAS Security Scanner") + "</b>: "
+ + _("Select \"Disable OpenVAS Security Scanner\" to switch off the OpenVAS Security Scanner Service. ")
+ + _("The datastores for Network Vulnerabilities (NVTs) will be deleted. This might take some time.")
+ // Enable and use OpenVAS NVT Feed
+ + "</p><p><b>" + _("Enable and use OpenVAS NVT Feed") + "</b>: "
+ + _("Select \"Enable and use OpenVAS NVT Feed\" to switch on the OpenVAS Security Scanner with the OpenVAS NVT Feed. ")
+ + _("The free-of-charge OpenVAS NVT Feed delivers the latest Network Vulnerability Tests (NVTs) with volunteer-based Quality Assurance. The NVT synchronisation uses RSYNC protocol. Please visit <tt>http://www.openvas.org/</tt> for more information.")
+ + _("Previous NVT datastores will be deleted before the initial synchronization is executed. This might take some time. ")
+ // Enable and use Greenbone Security Feed
+ + "</p><p><b>" + _("Enable and use Greenbone Security Feed") + "</b>: "
+ + _("Select \"Enable and use Greenbone Security Feed\" to switch on the OpenVAS Security Scanner with the Greenbone Security Feed.<br>")
+ + _("Note that this option is only available if you activated obtained and activated an access key for the Greenbone Security Feed. ")
+ + _("The subscription-based Greenbone Security Feed assures Network Vulnerability Tests (NVTs) of consistent quality, high availability and professional support. ")
+ + _("The NVT synchronisation uses SSH-secured RSYNC protocol. ")
+ + _("Previous NVT datastores will be deleted. This might take some time.")
+ // Activate Greenbone Security Feed Subscription
+ + "</p><p><b>" + _("Activate Greenbone Security Feed Subscription") + "</b>: "
+ + _("To obtain a access key for the Greenbone Security Feed, please visit <tt>http://greenbone.net/order/</tt>. ")
+ + _("Click on \"Activate Greenbone Security Feed\" and enter the path to the obtained access key files. ")
+ + _("The access key and synchronization script will then be installed and you can choose the <b>\"Use Greenbone Security Feed\"</b> option to use the OpenVAS Security Scanner with this feed.")
+ // Deactivate Greenbone Security Feed Subscription
+ + "</p><p><b>" + _("Deactivate Greenbone Security Feed Subscription") + "</b>: "
+ + _("This option is only available if you have previously activated your Greenbone Security Feed Subscription. ")
+ + _("If you select this option, previous NVT datastores, NVT selections and other feed related files will be deleted. This might take some time.")
+ // Synchronize with Feed now
+ + "</p><p><b>" + _("Synchronize with Feed now") + "</b>: "
+ + _("Will immediately start a synchronize with the selected feed. Note that this option is not available if you just changed the feed. ")
+ // Next
+ + "</p><p><b>" + _("Next") + "</b>: "
+ + _("Click on \"Next\" to synchronize with a newly chosen feed.")
+ + "</p>",
+
+ /* Help for the Activate Greenbone Security Feed dialog */
+ "activategsf" : "<p><b><big>" + _("Activate Greenbone Security Feed") + "</big></b>"
+ + "<p>" + _("If you already have obtained an access key, provide the path to these files in the text entry field.")
+ + "</p><p>"
+ + _("If you do not have an access key to the Greenbone Security Feed, please visit <tt>http://greenbone.net/order/</tt> to obtain one. ")
+ + _("Enter the path to the access key files. ")
+ + _("The access key and synchronization script will then be installed and you can choose the <b>\"Use Greenbone Security Feed\"</b> option.")
+ + "</p>",
+
+ /* Help for the Deactivate Greenbone Security Feed dialog */
+ "deactivategsf" : "<p><b><big>" + _("Deactivate Greenbone Security Feed") + "</big></b>"
+ + "<p>" + _("The access key, the Feed synchronization script and the NVT datastores will be deleted.")
+ + "</p></p>",
+
+ /* Read dialog help 1/2 */
+ "read" : _("<p><b><big>Initializing openvas-security-scanner Configuration</big></b><br>
+Please wait...<br></p>
+") +
+
+ /* Read dialog help 2/2 */
+ _("<p><b><big>Aborting Initialization:</big></b><br>
+Safely abort the configuration utility by pressing <b>Abort</b> now.</p>
+"),
+
+ /* Write dialog help 1/2 */
+ "write" : _("<p><b><big>Saving openvas-security-scanner Configuration</big></b><br>
+Please wait...<br></p>
+") +
+
+ /* Write dialog help 2/2 */
+_("<p><b><big>Aborting Saving:</big></b><br>
+Abort the save procedure by pressing <b>Abort</b>.
+An additional dialog informs whether it is safe to do so.
+</p>
+"),
+
+ "disableopenvas" : "<p><b><big>"
+ + _("Disabling the OpenVAS Security Scanner Service")
+ + "</big></b><br>"
+ + "<p>"
+ + _("The service will be stopped and not start automatically after a reboot. ")
+ + _("The NVT datastores will be deleted, which might take some time. Click abort to abort this action.")
+ + "</p></p>",
+
+ "fetchfeed" : "<p><b><big>"
+ + _("Fetching a NVT Feed")
+ + "</big></b><br>"
+ + "<p>"
+ + _("Before fetching the chosen feed, ")
+ + _("previous NVT datastores will be deleted, which might take some time. ")
+ + _("Note that in order to synchronize with a feed, the scanner service has to be stopped. It will be restarted once the synchronization is finished. ")
+ + _("Click <b>abort</b> to abort this action.")
+ + "</p></p>"
+];
+
+/* EOF */
+}
Added: branches/SuSE-Code-11-Branch/openvas-security-scanner/src/openvas-security-scanner.desktop
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-Branch/openvas-s…
==============================================================================
--- branches/SuSE-Code-11-Branch/openvas-security-scanner/src/openvas-security-scanner.desktop (added)
+++ branches/SuSE-Code-11-Branch/openvas-security-scanner/src/openvas-security-scanner.desktop Fri Jan 22 11:15:47 2010
@@ -0,0 +1,25 @@
+[Desktop Entry]
+Type=Application
+Categories=Settings;System;Qt;X-SuSE-YaST;X-SuSE-YaST-Security;
+
+X-KDE-ModuleType=Library
+X-KDE-RootOnly=true
+X-KDE-HasReadOnlyMode=true
+X-KDE-Library=yast2
+X-SuSE-YaST-Call=openvas-security-scanner
+
+X-SuSE-YaST-Group=Security
+X-SuSE-YaST-Argument=
+X-SuSE-YaST-RootOnly=true
+X-SuSE-YaST-AutoInst=
+X-SuSE-YaST-Geometry=
+X-SuSE-YaST-SortKey=
+X-SuSE-YaST-AutoInstResource=openvas-security-scanner
+
+Icon=yast-openvas
+Exec=/sbin/yast2 openvas-security-scanner
+
+Name=OpenVAS Security Scanner
+GenericName=Configure the OpenVAS Security Scanner
+X-KDE-SubstituteUID=true
+StartupNotify=true
Added: branches/SuSE-Code-11-Branch/openvas-security-scanner/src/openvas-security-scanner.ycp
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-Branch/openvas-s…
==============================================================================
--- branches/SuSE-Code-11-Branch/openvas-security-scanner/src/openvas-security-scanner.ycp (added)
+++ branches/SuSE-Code-11-Branch/openvas-security-scanner/src/openvas-security-scanner.ycp Fri Jan 22 11:15:47 2010
@@ -0,0 +1,76 @@
+/* ------------------------------------------------------------------------------
+ * Copyright (c) 2006 Novell, Inc. All Rights Reserved.
+ *
+ *
+ * This program is free software; you can redistribute it and/or modify it under
+ * the terms of version 2 of the GNU General Public License as published by the
+ * Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program; if not, contact Novell, Inc.
+ *
+ * To contact Novell about this file by physical or electronic mail, you may find
+ * current contact information at www.novell.com.
+ * ------------------------------------------------------------------------------
+ */
+
+/**
+ * File: clients/openvas-security-scanner.ycp
+ * Package: Configuration of openvas-security-scanner
+ * Summary: Main file
+ * Authors: Felix Wolfsteller <felix.wolfsteller(a)intevation.de>
+ *
+ * $**Id$
+ *
+ * Main file for openvas-security-scanner configuration. Uses all other files.
+ */
+
+{
+
+/***
+ * <h3>Configuration of openvas-security-scanner</h3>
+ */
+
+textdomain "openvas-security-scanner";
+
+/* The main () */
+y2milestone ("----------------------------------------");
+y2milestone ("OpenVAS Security Scanner module started");
+
+import "Progress";
+import "Report";
+import "Summary";
+
+import "CommandLine";
+
+include "openvas-security-scanner/wizards.ycp";
+
+map cmdline_description = $[
+ "id" : "openvas-security-scanner",
+ "help" : _("Configuration of OpenVAS Security Scanner"),
+ "guihandler" : OpenvasSecurityScannerSequence,
+ "initialize" : OpenvasSecurityScanner::Read,
+ "finish" : OpenvasSecurityScanner::Write,
+ "actions" : $[],
+ "options" : $[],
+ "mappings" : $[]
+];
+
+/* Main ui function */
+any ret = nil;
+
+ret = CommandLine::Run (cmdline_description);
+y2debug ("ret=%1", ret);
+
+/* Finish */
+y2milestone ("OpenVAS Security Scanner module finished");
+y2milestone ("----------------------------------------");
+
+return ret;
+
+/* EOF */
+}
Added: branches/SuSE-Code-11-Branch/openvas-security-scanner/src/wizards.ycp
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-Branch/openvas-s…
==============================================================================
--- branches/SuSE-Code-11-Branch/openvas-security-scanner/src/wizards.ycp (added)
+++ branches/SuSE-Code-11-Branch/openvas-security-scanner/src/wizards.ycp Fri Jan 22 11:15:47 2010
@@ -0,0 +1,153 @@
+/* ------------------------------------------------------------------------------
+ * Copyright (c) 2006 Novell, Inc. All Rights Reserved.
+ *
+ *
+ * This program is free software; you can redistribute it and/or modify it under
+ * the terms of version 2 of the GNU General Public License as published by the
+ * Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program; if not, contact Novell, Inc.
+ *
+ * To contact Novell about this file by physical or electronic mail, you may find
+ * current contact information at www.novell.com.
+ * ------------------------------------------------------------------------------
+ */
+
+/**
+ * File: include/openvas-security-scanner/wizards.ycp
+ * Package: Configuration of openvas-security-scanner
+ * Summary: Wizards definitions
+ * Authors: Felix Wolfsteller <felix.wolfsteller(a)intevation.de>
+ *
+ * $**Id$
+ */
+
+{
+
+textdomain "openvas-security-scanner";
+
+import "Sequencer";
+import "Wizard";
+
+include "openvas-security-scanner/complex.ycp";
+include "openvas-security-scanner/dialogs.ycp";
+
+
+/**
+ * Main dialog workflow of the openvas-security-scanner configuration.
+ *
+ * @return Sequence result.
+ */
+any MainSequence () {
+ map aliases = $[
+ "conf" : [ ``( ScannerConfigurationDialog () ), true],
+ "feed_sync" : [ ``( SyncDialog () ), true],
+ "enter_gsf" : [ ``( EnterGSFLocationDialog () ), true],
+ "activate_gsf" : [ ``( ActivateGSFDialog () ), true],
+ "deactivate_gsf" : [ ``( DeactivateGSFDialog () ), true]
+ ];
+
+ map sequence = $[
+ "ws_start" : "conf",
+ "conf" : $[
+ `abort : `abort,
+ `next : `next,
+ `feedsync_now : "feed_sync",
+ `activate_gsf : "enter_gsf",
+ `deactivate_gsf : "deactivate_gsf",
+ `no_feed : `no_feed,
+ `fetch_new : `fetch_new,
+ `write : `write
+ ],
+ "feed_sync" : $[
+ `abort : `abort,
+ `next : "conf"
+ ],
+ "enter_gsf" : $[
+ `abort : "conf",
+ `next : "activate_gsf"
+ ],
+ "activate_gsf" : $[
+ `abort : "conf",
+ `next : "conf"
+ ],
+ "deactivate_gsf" : $[
+ `abort : "conf",
+ `next : "conf"
+ ]
+ ];
+
+ any ret = Sequencer::Run (aliases, sequence);
+
+ return ret;
+}
+
+/**
+ * Workflow of the whole module
+ * @return sequence result
+ */
+any OpenvasSecurityScannerSequence () {
+ map aliases = $[
+ "read" : [ ``( ReadDialog () ), true ],
+ "main" : ``( MainSequence () ),
+ "feed_fetch" : ``( FetchFeedDialog () ),
+ "enter_gsf" : ``( EnterGSFLocationDialog () ),
+ "fetch_new" : ``( FetchFeedDialog () ),
+ "no_feed" : ``( DisableOpenVASDialog () ),
+ "write" : [ ``( WriteDialog () ), true ]
+ ];
+
+ map sequence = $[
+ "ws_start" : "read",
+ "read" : $[
+ `abort : `abort,
+ `next : "main"
+ ],
+ "main" : $[
+ `abort : `abort,
+ `feedsync_now : "feed_fetch",
+ `activate_gsf : "enter_gsf",
+ `fetch_new : "fetch_new",
+ `next : "write",
+ `no_feed : "no_feed",
+ `write : "write"
+ ],
+ "enter_gsf" : $[
+ `abort : "main",
+ `next : "main"
+ ],
+ "feed_fetch" : $[
+ `abort : "main",
+ `next : "main"
+ ],
+ "fetch_new" : $[
+ `abort : "main",
+ `next : "write"
+ ],
+ "no_feed" : $[
+ `abort : "main",
+ `next : "write"
+ ],
+ "write" : $[
+ `abort : `abort,
+ `next : `next
+ ]
+ ];
+
+ Wizard::CreateDialog ();
+
+ any ret = Sequencer::Run (aliases, sequence);
+
+ UI::CloseDialog ();
+ return ret;
+}
+
+
+/* EOF */
+}
+
Added: branches/SuSE-Code-11-Branch/openvas-security-scanner/testsuite/.cvsignore
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-Branch/openvas-s…
==============================================================================
--- branches/SuSE-Code-11-Branch/openvas-security-scanner/testsuite/.cvsignore (added)
+++ branches/SuSE-Code-11-Branch/openvas-security-scanner/testsuite/.cvsignore Fri Jan 22 11:15:47 2010
@@ -0,0 +1,11 @@
+Makefile
+Makefile.in
+site.exp
+*.sum
+*.log
+tmp.out*
+tmp.err*
+tmp.log*
+config
+run
+*.test
Added: branches/SuSE-Code-11-Branch/openvas-security-scanner/testsuite/Makefile.am
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-Branch/openvas-s…
==============================================================================
--- branches/SuSE-Code-11-Branch/openvas-security-scanner/testsuite/Makefile.am (added)
+++ branches/SuSE-Code-11-Branch/openvas-security-scanner/testsuite/Makefile.am Fri Jan 22 11:15:47 2010
@@ -0,0 +1,21 @@
+#
+# Makefile.am for .../testsuite
+#
+# Do not edit this file (Makefile.am) as it will be overwritten!
+#
+
+AUTOMAKE_OPTIONS = dejagnu
+EXTRA_DIST = $(wildcard tests/*.out) $(wildcard tests/*.err) $(wildcard tests/*.ycp) $(wildcard tests/*.yh)
+
+testsuite_prepare = @ydatadir@/testsuite/Makefile.testsuite
+
+all-local: $(testsuite_prepare)
+ make -f $(testsuite_prepare) RPMNAME=$(RPMNAME) srcdir=$(srcdir)
+
+clean-local: $(testsuite_prepare)
+ make -f $(testsuite_prepare) RPMNAME=$(RPMNAME) srcdir=$(srcdir) clean
+
+check-local: $(testsuite_prepare)
+ make -f $(testsuite_prepare) RPMNAME=$(RPMNAME) srcdir=$(srcdir) check
+
+# EOF
Added: branches/SuSE-Code-11-Branch/openvas-security-scanner/testsuite/tests/.cvsignore
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-Branch/openvas-s…
==============================================================================
(empty)
--
To unsubscribe, e-mail: yast-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: yast-commit+help(a)opensuse.org
1
0
[yast-commit] r60477 - in /branches/SuSE-Code-11-Branch/openvas-security-scanner: ./ MAINTAINER Makefile.cvs RPMNAME VERSION configure.in.in yast2-openvas-security-scanner.spec.in
by openvasfelix@svn.opensuse.org 22 Jan '10
by openvasfelix@svn.opensuse.org 22 Jan '10
22 Jan '10
Author: openvasfelix
Date: Fri Jan 22 10:50:54 2010
New Revision: 60477
URL: http://svn.opensuse.org/viewcvs/yast?rev=60477&view=rev
Log:
Added first portion of OpenVAS Security Scanner YaST module.
* openvas-security-scanner/, openvas-security-scanner/RPMNAME,
openvas-security-scanner/VERSION,
openvas-security-scanner/yast2-openvas-security-scanner.spec.in,
openvas-security-scanner/Makefile.cvs,
openvas-security-scanner/MAINTAINER,
openvas-security-scanner/configure.in.in: New files, first
portion of the OpenVAS Security Scanner module.
Added:
branches/SuSE-Code-11-Branch/openvas-security-scanner/
branches/SuSE-Code-11-Branch/openvas-security-scanner/MAINTAINER
branches/SuSE-Code-11-Branch/openvas-security-scanner/Makefile.cvs
branches/SuSE-Code-11-Branch/openvas-security-scanner/RPMNAME
branches/SuSE-Code-11-Branch/openvas-security-scanner/VERSION
branches/SuSE-Code-11-Branch/openvas-security-scanner/configure.in.in
branches/SuSE-Code-11-Branch/openvas-security-scanner/yast2-openvas-security-scanner.spec.in
Added: branches/SuSE-Code-11-Branch/openvas-security-scanner/MAINTAINER
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-Branch/openvas-s…
==============================================================================
--- branches/SuSE-Code-11-Branch/openvas-security-scanner/MAINTAINER (added)
+++ branches/SuSE-Code-11-Branch/openvas-security-scanner/MAINTAINER Fri Jan 22 10:50:54 2010
@@ -0,0 +1 @@
+Felix Wolfsteller <felix.wolfsteller(a)intevation.de>
Added: branches/SuSE-Code-11-Branch/openvas-security-scanner/Makefile.cvs
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-Branch/openvas-s…
==============================================================================
--- branches/SuSE-Code-11-Branch/openvas-security-scanner/Makefile.cvs (added)
+++ branches/SuSE-Code-11-Branch/openvas-security-scanner/Makefile.cvs Fri Jan 22 10:50:54 2010
@@ -0,0 +1,22 @@
+#
+# Makefile.cvs
+#
+PREFIX = /usr
+
+LIB = $(shell y2tool get-lib)
+
+configure: all
+ ./configure --prefix=$(PREFIX) --libdir=$(PREFIX)/$(LIB)
+
+all:
+ y2tool y2autoconf
+ y2tool y2automake
+ autoreconf --force --install
+
+install: configure
+ make
+ make install
+
+reconf: all
+ ./config.status --recheck
+ ./config.status
Added: branches/SuSE-Code-11-Branch/openvas-security-scanner/RPMNAME
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-Branch/openvas-s…
==============================================================================
--- branches/SuSE-Code-11-Branch/openvas-security-scanner/RPMNAME (added)
+++ branches/SuSE-Code-11-Branch/openvas-security-scanner/RPMNAME Fri Jan 22 10:50:54 2010
@@ -0,0 +1 @@
+yast2-openvas-security-scanner
Added: branches/SuSE-Code-11-Branch/openvas-security-scanner/VERSION
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-Branch/openvas-s…
==============================================================================
--- branches/SuSE-Code-11-Branch/openvas-security-scanner/VERSION (added)
+++ branches/SuSE-Code-11-Branch/openvas-security-scanner/VERSION Fri Jan 22 10:50:54 2010
@@ -0,0 +1 @@
+2.15.0
Added: branches/SuSE-Code-11-Branch/openvas-security-scanner/configure.in.in
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-Branch/openvas-s…
==============================================================================
--- branches/SuSE-Code-11-Branch/openvas-security-scanner/configure.in.in (added)
+++ branches/SuSE-Code-11-Branch/openvas-security-scanner/configure.in.in Fri Jan 22 10:50:54 2010
@@ -0,0 +1,12 @@
+## YCP module configure.in.in
+
+## Initialize
+@YAST2-INIT-COMMON@
+@YAST2-INIT-YCP@
+
+## some common checks
+@YAST2-CHECKS-COMMON@
+@YAST2-CHECKS-YCP@
+
+## and generate the output...
+@YAST2-OUTPUT@
Added: branches/SuSE-Code-11-Branch/openvas-security-scanner/yast2-openvas-security-scanner.spec.in
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-Branch/openvas-s…
==============================================================================
--- branches/SuSE-Code-11-Branch/openvas-security-scanner/yast2-openvas-security-scanner.spec.in (added)
+++ branches/SuSE-Code-11-Branch/openvas-security-scanner/yast2-openvas-security-scanner.spec.in Fri Jan 22 10:50:54 2010
@@ -0,0 +1,31 @@
+@HEADER-COMMENT@
+
+@HEADER@
+Requires: yast2
+BuildRequires: perl-XML-Writer update-desktop-files yast2 yast2-devtools yast2-testsuite
+
+BuildArchitectures: noarch
+
+Summary: Configuration of openvas-security-scanner
+
+%description
+-
+
+@PREP@
+
+@BUILD@
+
+@INSTALL@
+
+@CLEAN@
+
+%files
+%defattr(-,root,root)
+%dir @yncludedir@/openvas-security-scanner
+@yncludedir@/openvas-security-scanner/*
+@clientdir@/openvas-security-scanner.ycp
+@clientdir@/openvas-security-scanner_*.ycp
+@moduledir@/OpenvasSecurityScanner.*
+@moduledir@/OpenvasSecurityScanner2.*
+@desktopdir@/openvas-security-scanner.desktop
+%doc @docdir@
--
To unsubscribe, e-mail: yast-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: yast-commit+help(a)opensuse.org
1
0
[yast-commit] r60476 - /tags/branch-Code-11-SP1-2_17_29/registration/
by jdsn@svn.opensuse.org 21 Jan '10
by jdsn@svn.opensuse.org 21 Jan '10
21 Jan '10
Author: jdsn
Date: Thu Jan 21 19:04:25 2010
New Revision: 60476
URL: http://svn.opensuse.org/viewcvs/yast?rev=60476&view=rev
Log:
Created tag branch-Code-11-SP1-2_17_29 for registration
Added:
tags/branch-Code-11-SP1-2_17_29/registration/ (props changed)
- copied from r60475, branches/SuSE-Code-11-SP1-Branch/registration/
--
To unsubscribe, e-mail: yast-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: yast-commit+help(a)opensuse.org
1
0
[yast-commit] r60475 - /branches/SuSE-Code-11-SP1-Branch/registration/src/clients/inst_suse_register.ycp
by jdsn@svn.opensuse.org 21 Jan '10
by jdsn@svn.opensuse.org 21 Jan '10
21 Jan '10
Author: jdsn
Date: Thu Jan 21 18:29:59 2010
New Revision: 60475
URL: http://svn.opensuse.org/viewcvs/yast?rev=60475&view=rev
Log:
only reinitialize once
Modified:
branches/SuSE-Code-11-SP1-Branch/registration/src/clients/inst_suse_register.ycp
Modified: branches/SuSE-Code-11-SP1-Branch/registration/src/clients/inst_suse_register.ycp
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP1-Branch/regis…
==============================================================================
--- branches/SuSE-Code-11-SP1-Branch/registration/src/clients/inst_suse_register.ycp (original)
+++ branches/SuSE-Code-11-SP1-Branch/registration/src/clients/inst_suse_register.ycp Thu Jan 21 18:29:59 2010
@@ -673,8 +673,6 @@
Register::smt_server_cert = curRegCert;
y2milestone("New registration server: %1", curRegURL);
y2milestone("New registration server CA certificate location: %1", curRegCert);
- // run setup again, make sure settings get reset (maybe registration was already initalized and an error occurred) (bnc#557194)
- Register::setupRegistrationServer(nil);
status=true;
break;
}
--
To unsubscribe, e-mail: yast-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: yast-commit+help(a)opensuse.org
1
0
[yast-commit] r60474 - in /trunk/scanner: VERSION package/yast2-scanner.changes src/Scanner.ycp src/dialogs.ycp src/helps.ycp
by jsmeix@svn.opensuse.org 21 Jan '10
by jsmeix@svn.opensuse.org 21 Jan '10
21 Jan '10
Author: jsmeix
Date: Thu Jan 21 17:45:07 2010
New Revision: 60474
URL: http://svn.opensuse.org/viewcvs/yast?rev=60474&view=rev
Log:
- V 2.19.1
- Adapted to no longer try to install the proprietary packages
iscan, iscan-proprietary-drivers, and iscan-firmware.
Instead show a meaningful user information
when one of those Epson models is to be set up
which require the proprietary Iscan software
so that the user can download and install
the right packages from Avasys on his own
(see Novell/Suse Bugzilla bnc#569917).
- Reduced too long help text 'regarding firewall' but
added a link to 'SDB:CUPS and SANE Firewall settings' at
http://en.opensuse.org/SDB:CUPS_and_SANE_Firewall_settings
(see Novell/Suse Bugzilla bnc#551282).
Modified:
trunk/scanner/VERSION
trunk/scanner/package/yast2-scanner.changes
trunk/scanner/src/Scanner.ycp
trunk/scanner/src/dialogs.ycp
trunk/scanner/src/helps.ycp
Modified: trunk/scanner/VERSION
URL: http://svn.opensuse.org/viewcvs/yast/trunk/scanner/VERSION?rev=60474&r1=604…
==============================================================================
--- trunk/scanner/VERSION (original)
+++ trunk/scanner/VERSION Thu Jan 21 17:45:07 2010
@@ -1 +1 @@
-2.19.0
+2.19.1
Modified: trunk/scanner/package/yast2-scanner.changes
URL: http://svn.opensuse.org/viewcvs/yast/trunk/scanner/package/yast2-scanner.ch…
==============================================================================
--- trunk/scanner/package/yast2-scanner.changes (original)
+++ trunk/scanner/package/yast2-scanner.changes Thu Jan 21 17:45:07 2010
@@ -1,9 +1,26 @@
+-------------------------------------------------------------------
+Thu Jan 21 17:36:27 CET 2010 - jsmeix(a)suse.de
+
+- V 2.19.1
+- Adapted to no longer try to install the proprietary packages
+ iscan, iscan-proprietary-drivers, and iscan-firmware.
+ Instead show a meaningful user information
+ when one of those Epson models is to be set up
+ which require the proprietary Iscan software
+ so that the user can download and install
+ the right packages from Avasys on his own
+ (see Novell/Suse Bugzilla bnc#569917).
+- Reduced too long help text 'regarding firewall' but
+ added a link to 'SDB:CUPS and SANE Firewall settings' at
+ http://en.opensuse.org/SDB:CUPS_and_SANE_Firewall_settings
+ (see Novell/Suse Bugzilla bnc#551282).
+
------------------------------------------------------------------
Wed Jan 13 18:56:03 CET 2010 - kmachalkova(a)suse.cz
- Adjusted .desktop file(s) to wrap /sbin/yast2/ calls in xdg-su
where root privileges are needed, removed X-KDE-SubstituteUID key
- (bnc#540627)
+ (see Novell/Suse Bugzilla bnc#540627 and bnc#550073).
-------------------------------------------------------------------
Wed Dec 23 15:21:13 CET 2009 - jsmeix(a)suse.de
Modified: trunk/scanner/src/Scanner.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/scanner/src/Scanner.ycp?rev=6047…
==============================================================================
--- trunk/scanner/src/Scanner.ycp (original)
+++ trunk/scanner/src/Scanner.ycp Thu Jan 21 17:45:07 2010
@@ -361,42 +361,29 @@
* Test whether the package is installed (Package::Installed) and
* if not then test whether the package is available to be installed (Package::Available) and
* if yes then install it (Package::Install).
- * The packages iscan and iscan-free require special handling:
- * iscan and iscan-free conflict with each other,
- * iscan is only available on i386 compatible architectures
- * because iscan contains proprietary binary-only i386-only software,
- * some scanners require the non-free software.
* @param package_name string of the package name
* @return true on success
*/
boolean TestAndInstallPackage( string package_name )
{ // First of all the multi-line string because such strings cannot be indented:
string iscan_message =
- // Message of a Popup::Error
- // Do not change or translate "iscan", it is a package name.
- // Do not change or translate "i386", it is an architecture name.
-_("The package iscan should be installed
-but it contains proprietary binary-only i386-only software.
-Therefore it is only available for i386-compatible architectures.
-Some scanners are also supported by another driver.
-If you really want to install iscan, you must do it manually.
-");
- string iscan_64bit_message =
- // Do not change or translate "iscan", it is a package name.
- // Do not change or translate "x86_64", it is an architecture name.
- // Do not change or translate "AMD", it is a manufacturer name.
- // Do not change or translate "scanimage", it is a program name.
- // Do not change or translate "xscanimage", it is a program name.
- // Do not change or translate "xsane", it is a program name.
- // Do not change or translate "kooka", it is a program name.
-_("Iscan is only available as 32-bit software.
-On AMD 64-bit (x86_64) systems the scanner driver in the iscan package
-works only if also the scanning user frontend is 32-bit software.
-You can use the special frontend /usr/bin/iscan for Epson scanners
-which is included in the iscan package.
-If you like to use a standard frontend like scanimage, xscanimage, xsane, or kooka,
-you must explicitly install the 32-bit package version
-(i.e. get the package from the right media or repository).
+ // Message of a Popup::Error for models which require
+ // the third-party Image Scan (IScan) driver software from Epson/Avasys.
+ // Do not change or translate "Image Scan", it is a driver software name.
+ // Do not change or translate "Avasys, it is a manufacturer name.
+_("The third-party Image Scan driver software from Avasys is required.
+The Image Scan driver software is made and provided by Avasys
+http://avasys.jp/eng/linux_driver/
+where RPM packages for 32-bit (i386) and 64-bit (x86_64) architecture
+can be downloaded (if you accept the Avasys and Epson license agreements).
+The Image Scan driver contains proprietary binary-only software.
+For some models it is only available for 32-bit (i386) architecture
+which does not work when you have a 64-bit system installation.
+Some scanners are also supported by another (free-software) driver.
+When your scanner model requires a DFSG non-free (proprietary) module,
+you have to download and install two packages from Avasys:
+The 'iscan' package for the base software and an additional
+model dependant 'iscan-plugin' package with the proprietary module.
");
if( Package::Installed( package_name ) )
{ return true;
@@ -405,23 +392,16 @@
&& Package::Installed( "iscan" )
)
{ // Each scanner which is supported by iscan-free is also supported by iscan.
+ // 'iscan' is the package name of the primary RPM which is provided by Avasys
+ // (there are also additional iscan-plugin-<model-name> provided by Avasys).
// If iscan is already installed, there is no need to switch to iscan-free.
- // Because iscan contains proprietary software it is not installed by default.
- // Therefore the user must have had installed iscan intentionally.
+ // Because iscan contains proprietary software it is not provided by openSUSE.
+ // Therefore the user must have had downloaded it from Avasys
+ // and then installed intentionally and manually.
return true;
}
if( "iscan" == package_name )
- { // Some scanners which are supported by iscan are not supported by iscan-free.
- // If iscan-free is already installed, it would have to be replaced by iscan.
- // Because iscan contains proprietary software this would be a replacement of free software
- // by proprietary software and this cannot be done in an automated way (as it would happen here).
- // Furthermore iscan is only available on i386 compatible architectures (on x86_64 only as 32-bit).
- // Finally on x86_64 the 32-bit iscan software cannot be used with the usual scanning frontends.
- // Therefore there is only a message and the user must do the installation manually.
- y2milestone( "No automated installation of proprietary iscan." );
- if( Arch::x86_64() )
- { iscan_message = iscan_message + "\n" + iscan_64bit_message;
- }
+ { y2milestone( "Third-party Image Scan driver software from Avasys required." );
Popup::Error( iscan_message );
return false;
}
@@ -1376,9 +1356,15 @@
integer database_index = -1;
string model_string = "";
string interface_and_usbid_string = "";
+ string package_string = "";
string status_string = "";
// Scanner model list firmware entry for models which require a firmware upload:
string firmware_string = _("Firmware upload required.");
+ // Scanner model list entry for models which require
+ // the third-party Image Scan (IScan) driver software from Epson/Avasys.
+ // Do not change or translate "Image Scan", it is a driver software name.
+ // Do not change or translate "Avasys, it is a manufacturer name.
+ string iscan_string = _("Third-party Image Scan driver software from Avasys required.");
list< term > model_items = [];
foreach( map< string, string > database_entry,
database,
@@ -1446,6 +1432,19 @@
if( "" != comment )
{ comment = "[" + comment + "]";
}
+ // Build a translatable package_string:
+ if( "iscan" == package )
+ { package_string = iscan_string;
+ }
+ else
+ { package_string = sformat( // Scanner model list package name entry:
+ // %1 will be replaced by the RPM package name
+ // which provides the driver for the particular model:
+ _("Package %1"),
+ package
+ );
+ package_string = "(" + package_string + ")";
+ }
// Build a translatable status_string:
// These are the exiting status values according to the *desc files in sane-1.0.15 (9.3)
// and how often each value apppears:
@@ -1460,10 +1459,8 @@
if( "good" == status )
{ status_string = sformat( // Scanner model list status entry for "good" supported models:
// %1 will be replaced by the backend (scanner driver) name
- // %2 will be replaced by the package name which provides the backend
- _("Driver %1 (package %2) provides good functionality."),
- backend,
- package
+ _("Driver %1 provides good functionality."),
+ backend
);
}
else
@@ -1476,10 +1473,8 @@
{ status_string = sformat( // Scanner model list status entry for models
// which are listed as "unsupported" for a particular driver:
// %1 will be replaced by the backend (scanner driver) name
- // %2 will be replaced by the package name which provides the backend
- _("This scanner is not supported by the driver %1 (package %2)."),
- backend,
- package
+ _("This scanner is not supported by the driver %1."),
+ backend
);
}
}
@@ -1487,50 +1482,40 @@
{ if( "complete" == status )
{ status_string = sformat( // Scanner model list status entry for "complete" supported models:
// %1 will be replaced by the backend (scanner driver) name
- // %2 will be replaced by the package name which provides the backend
- _("Driver %1 (package %2) provides complete functionality."),
- backend,
- package
+ _("Driver %1 provides complete functionality."),
+ backend
);
}
else
{ if( "untested" == status )
{ status_string = sformat( // Scanner model list status entry for "untested" models:
// %1 will be replaced by the backend (scanner driver) name
- // %2 will be replaced by the package name which provides the backend
- _("Driver %1 (package %2) may work, but was not tested."),
- backend,
- package
+ _("Driver %1 may work, but was not tested."),
+ backend
);
}
else
{ if( "basic" == status )
{ status_string = sformat( // Scanner model list status entry for "basic" supported models:
// %1 will be replaced by the backend (scanner driver) name
- // %2 will be replaced by the package name which provides the backend
- _("Driver %1 (package %2) provides basic functionality."),
- backend,
- package
+ _("Driver %1 provides basic functionality."),
+ backend
);
}
else
{ if( "minimal" == status )
{ status_string = sformat( // Scanner model list status entry for "minimal" supported models:
// %1 will be replaced by the backend (scanner driver) name
- // %2 will be replaced by the package name which provides the backend
- _("Driver %1 (package %2) provides minimal functionality."),
- backend,
- package
+ _("Driver %1 provides minimal functionality."),
+ backend
);
}
else
{ status_string = sformat( // Fallback scanner model list status entry for models
// which are listed but without a known support status:
// %1 will be replaced by the backend (scanner driver) name
- // %2 will be replaced by the package name which provides the backend
- _("Driver %1 (package %2) may work, but the functionality is unknown."),
- backend,
- package
+ _("Driver %1 may work, but the functionality is unknown."),
+ backend
);
}
}
@@ -1540,10 +1525,11 @@
}
if( "required" == firmware )
{ // The model_string for supported models which require a firmware upload:
- model_string = sformat( "%1 %2 : %3 %4 %5 %6",
+ model_string = sformat( "%1 %2 : %3 %4 %5 %6 %7",
manufacturer,
model,
firmware_string,
+ package_string,
status_string,
interface_and_usbid_string,
comment
@@ -1551,9 +1537,10 @@
}
else
{ // The model_string for all other supported and unsupported models:
- model_string = sformat( "%1 %2 : %3 %4 %5",
+ model_string = sformat( "%1 %2 : %3 %4 %5 %6",
manufacturer,
model,
+ package_string,
status_string,
interface_and_usbid_string,
comment
@@ -1750,9 +1737,9 @@
Because firmware is licensed by the scanner manufacturer, we cannot distribute it.
Usually the firmware file is stored somewhere on the manufacturer's CD.
-Alternatively, it may be possible to download it from the manufacturer's Web site.
+Alternatively, it may be possible to download it from the manufacturer's web site.
Ask the manufacturer how to get the firmware file for your particular scanner.
-Find additional useful information on the SANE Web site at
+Find additional useful information on the SANE web site at
http://www.sane-project.org/.
After you get the firmware file, you must configure the driver manually.
@@ -1899,16 +1886,20 @@
&& user_confirmation
)
{ if( ! TestAndInstallPackage( package_name ) )
- { Popup::AnyMessage( // Header of a Popup::AnyMessage:
- _("Required Package Not Installed"),
- // Body of a Popup::AnyMessage where
- // %1 will be replaced by the backend name
- // %2 will be replaced by the package name
- // Only a simple message because before there was a dialog
- // which let the user install the package so that this message is shown
- // if the user has explicitly rejected to install it.
- sformat( _("The driver %1 requires the package %2."), backend_name, package_name )
- );
+ { // There is already sufficient user information regarding
+ // the third-party Image Scan driver software from Avasys:
+ if( package_name != "iscan" )
+ { Popup::AnyMessage( // Header of a Popup::AnyMessage:
+ _("Required Package Not Installed"),
+ // Body of a Popup::AnyMessage where
+ // %1 will be replaced by the backend name
+ // %2 will be replaced by the package name
+ // Only a simple message because before there was a dialog
+ // which let the user install the package so that this message is shown
+ // if the user has explicitly rejected to install it.
+ sformat( _("The driver %1 requires the package %2."), backend_name, package_name )
+ );
+ }
Progress::Title( // Last progress step progress bar title when the Progress was aborted:
_("Aborted")
);
Modified: trunk/scanner/src/dialogs.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/scanner/src/dialogs.ycp?rev=6047…
==============================================================================
--- trunk/scanner/src/dialogs.ycp (original)
+++ trunk/scanner/src/dialogs.ycp Thu Jan 21 17:45:07 2010
@@ -707,9 +707,13 @@
}
continue;
}
- // The epkowa backend in the package iscan is only available for i386-compatible architectures.
// The epkowa backend in the package iscan-free is available for all architectures.
- // Some scanners require additionally proprietary libraries which are only in iscan.
+ // In contrast the epkowa backend in the package iscan which is provided by Avasys
+ // is only available for i386-compatible architectures:
+ // True 32-bit i386 and also 64-bit x86_64.
+ // For some models it might be only available for 32-bit i386 architecture.
+ // Some scanners require additionally proprietary libraries which are
+ // provided by Avasys as additional model dependant iscan-plugin-<model-name> RPMs.
// For those scanners there is in the database "backend"="epkowa" and "package"="iscan".
// The scanners which work with iscan-free have "backend"="epkowa" and "package"="iscan-free".
// It would be possible to test for non-i386-compatible architecture in the ModelItems function
@@ -731,9 +735,8 @@
// Body of a Popup::AnyMessage when the epkowa driver was selected
// on a non-i386-compatible architecture (i.e. neither i386 nor x86_64).
// Do not change or translate "epkowa", it is a driver name.
- // Do not change or translate "iscan", it is a package name.
// Do not change or translate "i386", it is an architecture name.
- _("The epkowa driver (package iscan) is only available for i386-compatible architectures.")
+ _("The epkowa driver is only available for i386-compatible architectures (32-bit i386 and also 64-bit x86_64).")
);
continue;
}
@@ -743,7 +746,7 @@
// Body of a Popup::ContinueCancelHeadline
// when the epkowa driver was selected on x86_64.
// Do not change or translate "epkowa", it is a driver name.
- _("The epkowa driver may cause problems on 64-bit architectures.\nSee our support database for details.")
+ _("The epkowa driver may cause problems on 64-bit x86_64 architecture.")
)
)
{ // The user has decided to cancel the set up of the epkowa backend on x86_64:
Modified: trunk/scanner/src/helps.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/scanner/src/helps.ycp?rev=60474&…
==============================================================================
--- trunk/scanner/src/helps.ycp (original)
+++ trunk/scanner/src/helps.ycp Thu Jan 21 17:45:07 2010
@@ -196,14 +196,11 @@
If you press <b>Back</b>, the driver is deactivated.
</p>") +
// ConfigureBackend dialog help 2/4:
-// Do not change or translate "iscan", it is a package name.
-// Do not change or translate "i386", it is an architecture name.
_("<p>
<b><big>Additional Packages</big></b><br>
If the package that provides the driver is not yet installed,
an appropriate dialog is shown to install the package.
-Such packages may not be available for all architectures
-(for example, the iscan package is only available for i386 architectures).
+Such packages may not be available for all architectures.
</p>") +
// ConfigureBackend dialog help 3/4:
_("<p>
@@ -271,7 +268,7 @@
on your host against unwanted access via network.
For using scanners via network the SANE network daemon (the saned)
is the server process which must run so that remote clients
-can access scanners which are connected to your local host.
+can access scanners which are connected to your local host.
Client hosts contact the saned via the sane-port (TCP port 6566)
but scanning data is transferred via an additional random port.
Therefore only port 6566 is not sufficient for scanning via network.<br>
--
To unsubscribe, e-mail: yast-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: yast-commit+help(a)opensuse.org
1
0
[yast-commit] r60473 - in /trunk/storage: package/ storage/src/include/ storage/src/modules/
by aschnell@svn.opensuse.org 21 Jan '10
by aschnell@svn.opensuse.org 21 Jan '10
21 Jan '10
Author: aschnell
Date: Thu Jan 21 17:32:04 2010
New Revision: 60473
URL: http://svn.opensuse.org/viewcvs/yast?rev=60473&view=rev
Log:
- implemented moving of newly created partitions (see bnc #541034)
Modified:
trunk/storage/package/yast2-storage.changes
trunk/storage/storage/src/include/ep-dialogs.ycp
trunk/storage/storage/src/include/ep-hd-dialogs.ycp
trunk/storage/storage/src/include/ep-hd-lib.ycp
trunk/storage/storage/src/include/ep-hd.ycp
trunk/storage/storage/src/modules/Storage.ycp
Modified: trunk/storage/package/yast2-storage.changes
URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/package/yast2-storage.ch…
==============================================================================
--- trunk/storage/package/yast2-storage.changes (original)
+++ trunk/storage/package/yast2-storage.changes Thu Jan 21 17:32:04 2010
@@ -1,4 +1,9 @@
-------------------------------------------------------------------
+Thu Jan 21 17:28:48 CET 2010 - aschnell(a)suse.de
+
+- implemented moving of newly created partitions (see bnc #541034)
+
+-------------------------------------------------------------------
Tue Jan 19 14:14:26 CET 2010 - fehr(a)suse.de
- allow to use cylinder 0 for partition (bnc #571749)
Modified: trunk/storage/storage/src/include/ep-dialogs.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/storage/src/include/ep-d…
==============================================================================
--- trunk/storage/storage/src/include/ep-dialogs.ycp (original)
+++ trunk/storage/storage/src/include/ep-dialogs.ycp Thu Jan 21 17:32:04 2010
@@ -622,7 +622,8 @@
heading = sformat(_("Resize Partition %1"), device);
cyl_size = disk["cyl_size"]:1;
- free_cyl_after = Storage::FreeCylindersAfterPartition(device);
+ integer free_cyl_before = 0;
+ Storage::FreeCylindersAroundPartition(device, free_cyl_before, free_cyl_after);
min_size_k = Integer::Max([ min_size_k, cyl_size / 1024 ]);
max_size_k = size_k + (cyl_size * free_cyl_after) / 1024;
Modified: trunk/storage/storage/src/include/ep-hd-dialogs.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/storage/src/include/ep-h…
==============================================================================
--- trunk/storage/storage/src/include/ep-hd-dialogs.ycp (original)
+++ trunk/storage/storage/src/include/ep-hd-dialogs.ycp Thu Jan 21 17:32:04 2010
@@ -340,11 +340,99 @@
}
+ boolean DlgMovePartition(map<string, any>& part)
+ {
+ string device = part["device"]:"error";
+
+ integer free_cyl_before = 0;
+ integer free_cyl_after = 0;
+
+ Storage::FreeCylindersAroundPartition(device, free_cyl_before, free_cyl_after);
+
+ if (free_cyl_before == 0 && free_cyl_after == 0)
+ {
+ // error popup text, %1 is replace with name of partition
+ Popup::Error(sformat(_("No space to moved partition %1."), device));
+ return false;
+ }
+
+ integer move = 0;
+
+ if (free_cyl_before > 0 && free_cyl_after == 0)
+ {
+ // popup text, %1 is replace with name of partition
+ if (!Popup::YesNo(sformat(_("Move partition %1 forward?"), device)))
+ return false;
+
+ move = -free_cyl_before;
+ }
+ else if (free_cyl_before == 0 && free_cyl_after > 0)
+ {
+ // popup text, %1 is replace with name of partition
+ if (!Popup::YesNo(sformat(_("Move partition %1 backward?"), device)))
+ return false;
+
+ move = free_cyl_after;
+ }
+ else if (free_cyl_before > 0 && free_cyl_after > 0)
+ {
+ UI::OpenDialog(`opt(`decorated),
+ Greasemonkey::Transform(
+ `VBox(
+ `MarginBox(2, 0.4,
+ `RadioButtonGroup(`id(`directions),
+ `VBox(
+ // popup text, %1 is replace with name of partition
+ `Label(sformat(_("Move partition %1?"), device)),
+ // radio button text
+ `LeftRadioButton(`id(`forward), _("Forward"), true),
+ // radio button text
+ `LeftRadioButton(`id(`backward), _("Backward"))
+ ))),
+ `ButtonBox(
+ `PushButton(`id(`cancel), `opt(`cancelButton), Label::CancelButton()),
+ `PushButton(`id(`ok), `opt(`default, `okButton), Label::OKButton())
+ )
+ )
+ )
+ );
+
+ symbol widget = (symbol) UI::UserInput();
+
+ symbol direction = (symbol) UI::QueryWidget(`id(`directions), `Value);
+
+ UI::CloseDialog();
+
+ if (widget != `ok)
+ return false;
+
+ switch (direction)
+ {
+ case `forward:
+ move = -free_cyl_before;
+ break;
+
+ case `backward:
+ move = free_cyl_after;
+ break;
+ }
+ }
+
+ if (move == 0)
+ return false;
+
+ part["region", 0] = part["region", 0]:0 + move;
+ y2milestone("part:%1", part);
+ return true;
+ }
+
+
boolean DlgResizePartition(map<string, any> &data, map <string, any> disk)
{
return DlgResize(data, disk);
}
+
boolean ConfirmPartitionsDelete( string disk, list<string> pnames )
{
return ConfirmRecursiveDelete( disk, pnames,
Modified: trunk/storage/storage/src/include/ep-hd-lib.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/storage/src/include/ep-h…
==============================================================================
--- trunk/storage/storage/src/include/ep-hd-lib.ycp (original)
+++ trunk/storage/storage/src/include/ep-hd-lib.ycp Thu Jan 21 17:32:04 2010
@@ -269,6 +269,52 @@
}
+ void EpMovePartition(string device)
+ {
+ if (device == nil)
+ {
+ // error popup
+ Popup::Error(_("No partition selected."));
+ return;
+ }
+
+ map<string, map> target_map = Storage::GetTargetMap();
+ map<string, any> disk = Storage::GetDisk(target_map, device);
+ map<string, any> part = Storage::GetPartition(target_map, device);
+
+ if (disk["readonly"]:false)
+ {
+ Popup::Error(Partitions::RdonlyText(disk["device"]:"", true));
+ return;
+ }
+
+ if (!part["create"]:false)
+ {
+ // error popup, %1 is replace by partition device name, e.g. /dev/sdb1
+ Popup::Error(sformat(_("The partition %1 is already created on disk
+and cannot be moved."), device));
+ return;
+ }
+
+ if (part["type"]:`primary == `extended)
+ {
+ // error popup text
+ Popup::Error(_("An extended partition cannot be moved."));
+ return;
+ }
+
+ if (DlgMovePartition(part))
+ {
+ if (Storage::UpdatePartition(device, part["region", 0]:0, part["region", 1]:0))
+ {
+ UpdateMainStatus();
+ TreePanel::Create();
+ UpdateTableFocus(device);
+ }
+ }
+ }
+
+
void EpResizePartition(string device)
{
if (device == nil)
@@ -366,11 +412,11 @@
string mypart_table_type = target_map[ device, "label" ]:Storage::DefaultDiskLabel( mysize );
// helptext
- string helptext = _("<p>Select one or more (if available) hard disks
-that will have the same partition layout as
-this disk.</p>
+ string helptext = _("<p>Select one or more (if available) hard disks
+that will have the same partition layout as
+this disk.</p>
<p>Disks marked with '*' sign contain one or
-more partitions. After cloning, these
+more partitions. After cloning, these
partitions will be deleted.</p>");
list <string> AvailableTargetDisks()
@@ -379,7 +425,7 @@
filter( string dev, map props, target_map, {
return dev != device &&
Storage::IsDiskType( props["type"]:`CT_UNKNOWN ) &&
- isempty(props["used_by"]:[]) &&
+ isempty(props["used_by"]:[]) &&
props["cyl_size"]:0 == mycyl_size;
});
@@ -389,8 +435,8 @@
foreach( string dev, map props, filtered_target_map,{
if( props["size_k"]:0 >= mysize )
- items = add(items, dev);
- else
+ items = add(items, dev);
+ else
y2milestone("%1 is smaller than needed, skipping it", device);
});
@@ -418,7 +464,7 @@
}
if (isempty(myparts)) {
- Popup::Error(_("There are no partitions on this disk (a clonable
+ Popup::Error(_("There are no partitions on this disk (a clonable
disk must have at least one partition).
Create some partitions before cloning the disk."));
return;
@@ -427,7 +473,7 @@
list <string> mydisks = AvailableTargetDisks();
if (isempty(mydisks)) {
- Popup::Error("This disk cannot be cloned. There are no suitable
+ Popup::Error("This disk cannot be cloned. There are no suitable
disks that could have the same partitioning layout.");
return;
}
@@ -486,7 +532,7 @@
});
//if there is anything to delete, ask user if s/he really wants to delete
- if ( !isempty(partitions_to_delete) &&
+ if ( !isempty(partitions_to_delete) &&
!ConfirmDeletePartitions( partitions_to_delete )) {
ret = nil;
continue;
@@ -519,10 +565,10 @@
foreach( map one_partition, myparts, {
map next = Storage::NextPartition( this_disk, one_partition["type"]:`none);
- Storage::CreatePartition( this_disk, next["device"]:"error",
+ Storage::CreatePartition( this_disk, next["device"]:"error",
one_partition["type"]:`primary,
one_partition["fsid"]: Partitions::fsid_native,
- one_partition["region",0]:0, one_partition["region",1]:0,
+ one_partition["region",0]:0, one_partition["region",1]:0,
one_partition["mountby"]:Storage::GetMountBy(device) );
//FIXME: ChangeVolumeProperties too?
});
Modified: trunk/storage/storage/src/include/ep-hd.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/storage/src/include/ep-h…
==============================================================================
--- trunk/storage/storage/src/include/ep-hd.ycp (original)
+++ trunk/storage/storage/src/include/ep-hd.ycp Thu Jan 21 17:32:04 2010
@@ -34,6 +34,7 @@
void EpContextMenuHdPartition(string device)
{
symbol widget = ContextMenu::Simple([ `item(`id(`edit), _("Edit")),
+ `item(`id(`move), _("Move")),
`item(`id(`resize), _("Resize")),
`item(`id(`delete), _("Delete")) ]);
@@ -43,6 +44,10 @@
EpEditPartition(device);
break;
+ case `move:
+ EpMovePartition(device);
+ break;
+
case `resize:
EpResizePartition(device);
break;
@@ -60,6 +65,8 @@
// push button text
`PushButton(`id(`edit),`opt(`key_F4), _("Edit...")),
// push button text
+ `PushButton(`id(`move), `opt(`key_F7), _("Move...")),
+ // push button text
`PushButton(`id(`resize), `opt(`key_F6), _("Resize...")),
// push button text
`PushButton(`id(`delete), `opt(`key_F5), _("Delete..."))
@@ -100,6 +107,15 @@
EpEditPartition( device );
break;
+ case `move:
+ if (is_disk)
+ // error popup
+ Popup::Error(_("Hard disks, BIOS RAIDs and multipath
+devices cannot be moved."));
+ else
+ EpMovePartition(device);
+ break;
+
case `resize:
if (is_disk)
// error popup
Modified: trunk/storage/storage/src/modules/Storage.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/storage/src/modules/Stor…
==============================================================================
--- trunk/storage/storage/src/modules/Storage.ycp (original)
+++ trunk/storage/storage/src/modules/Storage.ycp Thu Jan 21 17:32:04 2010
@@ -2153,6 +2153,7 @@
return( ret==0 );
}
+
global boolean UpdatePartition( string device, integer start, integer len )
{
y2milestone( "UpdatePartition device:%1 start:%2 len:%3",
@@ -4388,31 +4389,14 @@
}
-global integer FreeCylindersAfterPartition(string device)
+global boolean FreeCylindersAroundPartition(string device, integer& free_before, integer& free_after)
{
- integer ret = 0;
- if (LibStorage::StorageInterface::freeCylindersAfterPartition(sint, device, ret) != 0)
- ret = 0;
- y2milestone("FreeCylindersAfterPartition ret:%1", ret);
+ boolean ret = LibStorage::StorageInterface::freeCylindersAroundPartition(sint, device, free_before, free_after) == 0;
+ y2milestone("FreeCylindersAfterPartition ret:%1 free_before:%2 free_after:%3", ret, free_before, free_after);
return ret;
}
-global define boolean CheckNextCreated( map disk, list region )
- ``{
- boolean ret = false;
- integer cylinder = region[0]:0 + region[1]:0;
- foreach(map part, disk["partitions"]:[], ``{
- if( part["region",0]:0 == cylinder && part["create"]:false )
- {
- ret = true;
- }
- });
- y2milestone( "CheckNextCreated region:%1 ret:%2", region, ret );
- return( ret );
- }
-
-
global string PathToDestdir(string p)
{
if (Installation::scr_destdir != "/")
@@ -5013,125 +4997,6 @@
}
-global define void AdaptResize( string maindev, list region, integer schange )
- ``{
- map<string,map> tg = GetTargetMap();
- list<map> partitions = tg[maindev,"partitions"]:[];
- integer cylinder = region[0]:0 + region[1]:0;
- boolean found = false;
- integer index = -1;
- integer e_idx = -1;
- list<integer> idx_list = [];
- map part = (map) find(map p, partitions,
- ``(p["region",0]:0 == cylinder && p["create"]:false));
- y2milestone( "AdaptResize %1 reg %2 change %3", maindev, region, schange );
- if( part != nil )
- {
- found = false;
- index = 0;
- foreach(map p, partitions,
- ``{
- if( p["region",0]:0 == cylinder && p["create"]:false )
- {
- found = true;
- }
- else if( !found )
- {
- index = index + 1;
- }
- });
- if( partitions[index,"type"]:`primary == `extended )
- {
- e_idx = index;
- found = false;
- index = 0;
- foreach(map p, partitions,
- ``{
- if( p["region",0]:0 == cylinder && p["create"]:false &&
- p["type"]:`primary != `extended )
- {
- found = true;
- part = p;
- }
- else if( !found )
- {
- index = index + 1;
- }
- });
- }
- cylinder = part["region",0]:0 + part["region",1]:0;
- y2milestone( "AdaptResize part:%1", part );
- y2milestone( "AdaptResize index:%1 e_idx:%2 cylinder:%3", index, e_idx,
- cylinder );
- map pnew = (map) find( map p, partitions,
- ``( p["region",0]:0 == cylinder &&
- p["create"]:false ));
- y2milestone( "AdaptResize pnew:%1", pnew );
- while( pnew != nil &&
- (part["mount"]:"" == Partitions::BootMount() ||
- part["fsid"]:0==Partitions::fsid_swap ||
- part["region",1]:0 < (schange<0?(-1*schange):schange)) )
- {
- y2milestone( "AdaptResize pnew:%1", pnew );
- part = pnew;
- idx_list = add( idx_list, index );
- y2milestone( "AdaptResize index:%1 idx_list:%2", index, idx_list );
- found = false;
- index = 0;
- foreach(map p, partitions, ``{
- y2milestone( "found:%1 index:%2 p=%3", found, index, p );
- if( p["nr"]:0 == pnew["nr"]:0 )
- {
- found = true;
- }
- else if( !found )
- {
- index = index + 1;
- }
- });
- cylinder = part["region",0]:0 + part["region",1]:0;
- pnew = (map) find( map p, partitions,
- ``( p["region",0]:0 == cylinder &&
- p["create"]:false ));
- }
- y2milestone( "AdaptResize idx:%1 list:%2", index, idx_list );
-
- foreach(integer num, idx_list, ``{
- partitions[num,"region",0] = partitions[num,"region",0]:0 - schange;
- UpdatePartition( partitions[num,"device"]:"", partitions[num,"region",0]:0,
- partitions[num,"region",1]:1 );
- });
- partitions[index,"region",0] = partitions[index,"region",0]:0 - schange;
- partitions[index,"region",1] = partitions[index,"region",1]:0 + schange;
- if( partitions[index,"region",1]:0 <= 0 )
- {
- partitions[index,"region",1] = 1;
- }
- y2milestone( "AdaptResize increase p:%1", partitions[index]:$[] );
- UpdatePartition( partitions[index,"device"]:"", partitions[index,"region",0]:0,
- partitions[index,"region",1]:1 );
- if( e_idx>=0 )
- {
- partitions[e_idx,"region",0] = partitions[e_idx,"region",0]:0 - schange;
- partitions[e_idx,"region",1] = partitions[e_idx,"region",1]:0 + schange;
- if( partitions[e_idx,"region",1]:0 <= 0 )
- {
- partitions[e_idx,"region",1] = 1;
- }
- UpdatePartition( partitions[e_idx,"device"]:"", partitions[e_idx,"region",0]:0,
- partitions[e_idx,"region",1]:1 );
- }
- }
- else
- {
- y2error( "AdaptResize this should not happen %1", partitions );
- }
- y2milestone( "AdaptResize partitions:%1", partitions );
- y2milestone( "AdaptResize maindev:%1 region:%2 change:%3", maindev,
- region, schange );
- }
-
-
global define integer NumLoopDevices()
{
map bo = (map)WFM::Execute (.local.bash_output, "losetup -a" );
--
To unsubscribe, e-mail: yast-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: yast-commit+help(a)opensuse.org
1
0
[yast-commit] r60472 - /tags/branch-SLE-10-SP3-2_13_17/cd-creator/
by jsuchome@svn.opensuse.org 21 Jan '10
by jsuchome@svn.opensuse.org 21 Jan '10
21 Jan '10
Author: jsuchome
Date: Thu Jan 21 17:03:58 2010
New Revision: 60472
URL: http://svn.opensuse.org/viewcvs/yast?rev=60472&view=rev
Log:
Created tag branch-SLE-10-SP3-2_13_17 for cd-creator
Added:
tags/branch-SLE-10-SP3-2_13_17/cd-creator/
- copied from r60471, branches/SuSE-SLE-10-SP3-Branch/cd-creator/
--
To unsubscribe, e-mail: yast-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: yast-commit+help(a)opensuse.org
1
0
21 Jan '10
Author: jsuchome
Date: Thu Jan 21 17:03:53 2010
New Revision: 60471
URL: http://svn.opensuse.org/viewcvs/yast?rev=60471&view=rev
Log:
Created tag branch-SLE-10-SP3-2_13_17
Added:
tags/branch-SLE-10-SP3-2_13_17/
--
To unsubscribe, e-mail: yast-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: yast-commit+help(a)opensuse.org
1
0
[yast-commit] r60470 - in /branches/SuSE-SLE-10-SP3-Branch/cd-creator: VERSION package/yast2-cd-creator.changes src/CDCreator.ycp src/wizards.ycp
by jsuchome@svn.opensuse.org 21 Jan '10
by jsuchome@svn.opensuse.org 21 Jan '10
21 Jan '10
Author: jsuchome
Date: Thu Jan 21 17:03:42 2010
New Revision: 60470
URL: http://svn.opensuse.org/viewcvs/yast?rev=60470&view=rev
Log:
- correctly copy PPC files for bootable medias (bnc#561751)
- do not copy /etc, /PS3 directories
- do not write TRANS.TBL checksum into content file
- 2.13.17
Modified:
branches/SuSE-SLE-10-SP3-Branch/cd-creator/VERSION
branches/SuSE-SLE-10-SP3-Branch/cd-creator/package/yast2-cd-creator.changes
branches/SuSE-SLE-10-SP3-Branch/cd-creator/src/CDCreator.ycp
branches/SuSE-SLE-10-SP3-Branch/cd-creator/src/wizards.ycp
Modified: branches/SuSE-SLE-10-SP3-Branch/cd-creator/VERSION
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-SLE-10-SP3-Branch/cd-cre…
==============================================================================
--- branches/SuSE-SLE-10-SP3-Branch/cd-creator/VERSION (original)
+++ branches/SuSE-SLE-10-SP3-Branch/cd-creator/VERSION Thu Jan 21 17:03:42 2010
@@ -1 +1 @@
-2.13.16
+2.13.17
Modified: branches/SuSE-SLE-10-SP3-Branch/cd-creator/package/yast2-cd-creator.changes
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-SLE-10-SP3-Branch/cd-cre…
==============================================================================
--- branches/SuSE-SLE-10-SP3-Branch/cd-creator/package/yast2-cd-creator.changes (original)
+++ branches/SuSE-SLE-10-SP3-Branch/cd-creator/package/yast2-cd-creator.changes Thu Jan 21 17:03:42 2010
@@ -1,4 +1,12 @@
-------------------------------------------------------------------
+Thu Jan 14 07:34:27 CET 2010 - jsuchome(a)suse.cz
+
+- correctly copy PPC files for bootable medias (bnc#561751)
+- do not copy /etc, /PS3 directories
+- do not write TRANS.TBL checksum into content file
+- 2.13.17
+
+-------------------------------------------------------------------
Wed Apr 22 17:00:35 CEST 2009 - lslezak(a)suse.cz
- register Pkg::CallbackSourceReportInit/Destroy() callbacks -
Modified: branches/SuSE-SLE-10-SP3-Branch/cd-creator/src/CDCreator.ycp
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-SLE-10-SP3-Branch/cd-cre…
==============================================================================
--- branches/SuSE-SLE-10-SP3-Branch/cd-creator/src/CDCreator.ycp (original)
+++ branches/SuSE-SLE-10-SP3-Branch/cd-creator/src/CDCreator.ycp Thu Jan 21 17:03:42 2010
@@ -471,7 +471,7 @@
{
// generate new sha1 sums for files in descr subdirectory
// remove './' from the file names, ignore directory.yast file, sort the output
- string command = sformat("(cd '%1/%2' && find . -type f -exec sha1sum \\{\\} \\; | sed -e 's#^\\(.\\{40\\}\\) ./#META SHA1 \\1 #' | grep -v '^.\\{40\\} directory.yast$' | LC_ALL=C sort -k 2)", String::Quote(dir), String::Quote(product_dir));
+ string command = sformat("(cd '%1/%2' && find . -type f -exec sha1sum \\{\\} \\; | sed -e 's#^\\(.\\{40\\}\\) ./#META SHA1 \\1 #' | grep -Ev '( directory.yast$| TRANS.TBL$)' | LC_ALL=C sort -k 2)", String::Quote(dir), String::Quote(product_dir));
y2milestone("Generating SHA1 sums: %1", command);
@@ -600,7 +600,7 @@
return true;
}
-boolean CopyDirectoryRec(integer srcid, integer mid, string src, string target)
+boolean CopyDirectoryR(integer srcid, integer mid, string src, string target, boolean optional)
{
y2milestone("CopyDirectoryRec: srcid: %1, mid: %2, src: %3, target: %4", srcid, mid, src, target);
@@ -609,14 +609,29 @@
if (local_dir == nil || local_dir == "")
{
- // an error message, %1 is the directory, %2 is URL of the source
- Report::Error(sformat(_("Cannot read directory %1\nfrom source %2."), src, Pkg::SourceGeneralData(srcid)["url"]:""));
+ if (!optional)
+ {
+ // an error message, %1 is the directory, %2 is URL of the source
+ Report::Error(sformat(_("Cannot read directory %1\nfrom source %2."), src, Pkg::SourceGeneralData(srcid)["url"]:""));
+ }
+
return false;
}
return Exec(sformat("/bin/cp -a -f -- '%1' '%2'", String::Quote(local_dir), String::Quote(target)));
}
+boolean CopyDirectoryRec(integer srcid, integer mid, string src, string target)
+{
+ return CopyDirectoryR(srcid, mid, src, target, false);
+}
+
+boolean CopyDirectoryRecOpt(integer srcid, integer mid, string src, string target)
+{
+ return CopyDirectoryR(srcid, mid, src, target, true);
+}
+
+
boolean CopyDirectoryNonRec(integer srcid, integer mid, string src, string target)
{
// get file list from directory.yast
@@ -647,9 +662,44 @@
boolean CopyPPCBoot(integer srcid, string target)
{
- return CopyDirectoryRec(srcid, 1, "/ppc", target)
- && CopyDirectoryRec(srcid, 1, "/etc", target)
- && CopyDirectoryRec(srcid, 1, "/suseboot", target);
+ y2milestone("Copying PPC boot files");
+ boolean ret = true;
+
+ y2milestone("Copying /ppc subdirectory");
+ boolean r = CopyDirectoryRecOpt(srcid, 1, "/ppc", target);
+
+ if (!r)
+ {
+ y2milestone("Directory listing may be missing, copying /ppc/bootinfo.txt");
+ CopyFile(srcid, 1, "/ppc/bootinfo.txt", target + "/ppc");
+ }
+
+ ret = ret && r;
+
+ y2milestone("Copying /suseboot subdirectory");
+ r = CopyDirectoryRecOpt(srcid, 1, "/suseboot", target);
+ y2milestone("Result: %1", r);
+
+ if (!r)
+ {
+ list<string> files = [
+ "/suseboot/inst32", "/suseboot/inst64", "/suseboot/os-chooser",
+ "/suseboot/yaboot", "/suseboot/yaboot.cnf", "/suseboot/yaboot.ibm",
+ "/suseboot/yaboot.txt"
+ ];
+
+ y2milestone("Directory listing may be missing using fixed list: %1", files);
+
+ foreach(string f, files,
+ {
+ CopyOptionalFile(srcid, 1, f, target + f);
+ }
+ );
+ }
+
+ ret = ret && r;
+
+ return ret;
}
string UpDir(string input)
@@ -761,7 +811,6 @@
}
else if (Arch::ppc() || Arch::ppc64())
{
- Exec(sformat("/bin/mkdir -p %1/etc", skel_root));
Exec(sformat("/bin/mkdir -p %1/ppc", skel_root));
Exec(sformat("/bin/mkdir -p %1/suseboot", skel_root));
}
@@ -981,6 +1030,13 @@
CopyDirectoryRec(source_id, 1, "boot/loader", sformat("%1/boot", skel_root));
}
}
+ else if (Arch::ppc() || Arch::ppc64())
+ {
+ CopyPPCBoot(source_id, skel_root);
+
+ // recursive copy of /boot
+ CopyDirectoryRec(source_id, 1, "boot", skel_root);
+ }
else
{
// recursive copy of /boot/loader/*
@@ -990,6 +1046,10 @@
else
{
CopyDirectoryRec(source_id, 1, "/boot", skel_root);
+ if (Arch::ppc() || Arch::ppc64())
+ {
+ CopyPPCBoot(source_id, skel_root);
+ }
}
}
Modified: branches/SuSE-SLE-10-SP3-Branch/cd-creator/src/wizards.ycp
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-SLE-10-SP3-Branch/cd-cre…
==============================================================================
--- branches/SuSE-SLE-10-SP3-Branch/cd-creator/src/wizards.ycp (original)
+++ branches/SuSE-SLE-10-SP3-Branch/cd-creator/src/wizards.ycp Thu Jan 21 17:03:42 2010
@@ -58,7 +58,7 @@
"isolinux": $[
`abort : `abort,
`next : "packagemanager",
- `autoyast : "summary"
+ `autoyast : "gpgkey"
],
"packagemanager": $[
`abort : `abort,
--
To unsubscribe, e-mail: yast-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: yast-commit+help(a)opensuse.org
1
0
[yast-commit] r60469 - in /branches/SuSE-Code-11-SP1-Branch/autoinstallation: package/autoyast2.changes src/dialogs/ask.ycp
by ug@svn.opensuse.org 21 Jan '10
by ug@svn.opensuse.org 21 Jan '10
21 Jan '10
Author: ug
Date: Thu Jan 21 15:52:27 2010
New Revision: 60469
URL: http://svn.opensuse.org/viewcvs/yast?rev=60469&view=rev
Log:
passing a boolean to an ask-script failed (bnc#572166)
Modified:
branches/SuSE-Code-11-SP1-Branch/autoinstallation/package/autoyast2.changes
branches/SuSE-Code-11-SP1-Branch/autoinstallation/src/dialogs/ask.ycp
Modified: branches/SuSE-Code-11-SP1-Branch/autoinstallation/package/autoyast2.changes
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP1-Branch/autoi…
==============================================================================
--- branches/SuSE-Code-11-SP1-Branch/autoinstallation/package/autoyast2.changes (original)
+++ branches/SuSE-Code-11-SP1-Branch/autoinstallation/package/autoyast2.changes Thu Jan 21 15:52:27 2010
@@ -1,4 +1,9 @@
-------------------------------------------------------------------
+Thu Jan 21 15:52:15 CET 2010 - ug(a)suse.de
+
+- passing a boolean to an ask-script failed (bnc#572166)
+
+-------------------------------------------------------------------
Thu Jan 7 10:36:45 CET 2010 - ug(a)suse.de
- 2.17.32
Modified: branches/SuSE-Code-11-SP1-Branch/autoinstallation/src/dialogs/ask.ycp
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP1-Branch/autoi…
==============================================================================
--- branches/SuSE-Code-11-SP1-Branch/autoinstallation/src/dialogs/ask.ycp (original)
+++ branches/SuSE-Code-11-SP1-Branch/autoinstallation/src/dialogs/ask.ycp Thu Jan 21 15:52:27 2010
@@ -185,6 +185,8 @@
any val = UI::QueryWidget(`id(entry_id), `Value);
if( ask["type"]:"string" == "integer" ) {
val = tointeger((string)val);
+ } else if( ask["type"]:"string" == "boolean" ) {
+ val = ( (boolean)val ? "true" : "false" );
}
if( ask["password"]:false == true ) {
string pass2 = (string)UI::QueryWidget(`id(`pass2), `Value);
--
To unsubscribe, e-mail: yast-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: yast-commit+help(a)opensuse.org
1
0
[yast-commit] r60468 - in /trunk/autoinstallation: package/autoyast2.changes src/dialogs/ask.ycp
by ug@svn.opensuse.org 21 Jan '10
by ug@svn.opensuse.org 21 Jan '10
21 Jan '10
Author: ug
Date: Thu Jan 21 15:51:45 2010
New Revision: 60468
URL: http://svn.opensuse.org/viewcvs/yast?rev=60468&view=rev
Log:
passing a boolean to an ask-script failed (bnc#572166)
Modified:
trunk/autoinstallation/package/autoyast2.changes
trunk/autoinstallation/src/dialogs/ask.ycp
Modified: trunk/autoinstallation/package/autoyast2.changes
URL: http://svn.opensuse.org/viewcvs/yast/trunk/autoinstallation/package/autoyas…
==============================================================================
--- trunk/autoinstallation/package/autoyast2.changes (original)
+++ trunk/autoinstallation/package/autoyast2.changes Thu Jan 21 15:51:45 2010
@@ -1,4 +1,9 @@
-------------------------------------------------------------------
+Thu Jan 21 15:50:31 CET 2010 - ug(a)suse.de
+
+- passing a boolean to an ask-script failed (bnc#572166)
+
+-------------------------------------------------------------------
Tue Jan 19 13:26:19 CET 2010 - ug(a)suse.de
- bootloader docu rewritten - thanx to Jozef Uhliarik for
Modified: trunk/autoinstallation/src/dialogs/ask.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/autoinstallation/src/dialogs/ask…
==============================================================================
--- trunk/autoinstallation/src/dialogs/ask.ycp (original)
+++ trunk/autoinstallation/src/dialogs/ask.ycp Thu Jan 21 15:51:45 2010
@@ -217,6 +217,8 @@
any val = UI::QueryWidget(`id(entry_id), `Value);
if( ask["type"]:"string" == "integer" ) {
val = tointeger((string)val);
+ } else if( ask["type"]:"string" == "boolean" ) {
+ val = ( (boolean)val ? "true" : "false" );
}
if( ask["password"]:false == true ) {
string pass2 = (string)UI::QueryWidget(`id(`pass2), `Value);
--
To unsubscribe, e-mail: yast-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: yast-commit+help(a)opensuse.org
1
0
[yast-commit] r60467 - /trunk/installation/control/control.openSUSE.xml
by coolo@svn.opensuse.org 21 Jan '10
by coolo@svn.opensuse.org 21 Jan '10
21 Jan '10
Author: coolo
Date: Thu Jan 21 15:29:22 2010
New Revision: 60467
URL: http://svn.opensuse.org/viewcvs/yast?rev=60467&view=rev
Log:
use 11.3 urls
Modified:
trunk/installation/control/control.openSUSE.xml
Modified: trunk/installation/control/control.openSUSE.xml
URL: http://svn.opensuse.org/viewcvs/yast/trunk/installation/control/control.ope…
==============================================================================
--- trunk/installation/control/control.openSUSE.xml (original)
+++ trunk/installation/control/control.openSUSE.xml Thu Jan 21 15:29:22 2010
@@ -199,9 +199,9 @@
<extra_urls config:type="list">
<!-- Default update repository, bnc #381360 -->
<extra_url>
- <baseurl>http://download.opensuse.org/update/11.2/</baseurl>
+ <baseurl>http://download.opensuse.org/update/11.3/</baseurl>
<alias>repo-update</alias>
- <name>openSUSE-11.2-Update</name>
+ <name>openSUSE-11.3-Update</name>
<prod_dir>/</prod_dir>
<enabled config:type="boolean">true</enabled>
<autorefresh config:type="boolean">true</autorefresh>
@@ -210,36 +210,36 @@
<!-- Replacement for EXTRAURLS and OPTIONALURLS -->
<extra_url>
- <baseurl>http://download.opensuse.org/distribution/11.2/repo/oss/</baseurl>
+ <baseurl>http://download.opensuse.org/distribution/11.3/repo/oss/</baseurl>
<alias>repo-oss</alias>
- <name>openSUSE-11.2-Oss</name>
+ <name>openSUSE-11.3-Oss</name>
<prod_dir>/</prod_dir>
<enabled config:type="boolean">true</enabled>
<autorefresh config:type="boolean">true</autorefresh>
<priority config:type="integer">99</priority>
</extra_url>
<extra_url>
- <baseurl>http://download.opensuse.org/distribution/11.2/repo/non-oss/</baseurl>
+ <baseurl>http://download.opensuse.org/distribution/11.3/repo/non-oss/</baseurl>
<alias>repo-non-oss</alias>
- <name>openSUSE-11.2-Non-Oss</name>
+ <name>openSUSE-11.3-Non-Oss</name>
<prod_dir>/</prod_dir>
<enabled config:type="boolean">true</enabled>
<autorefresh config:type="boolean">true</autorefresh>
<priority config:type="integer">99</priority>
</extra_url>
<extra_url>
- <baseurl>http://download.opensuse.org/debug/distribution/11.2/repo/oss/</baseurl>
+ <baseurl>http://download.opensuse.org/debug/distribution/11.3/repo/oss/</baseurl>
<alias>repo-debug</alias>
- <name>openSUSE-11.2-Debug</name>
+ <name>openSUSE-11.3-Debug</name>
<prod_dir>/</prod_dir>
<enabled config:type="boolean">false</enabled>
<autorefresh config:type="boolean">true</autorefresh>
<priority config:type="integer">99</priority>
</extra_url>
<extra_url>
- <baseurl>http://download.opensuse.org/source/distribution/11.2/repo/oss/</baseurl>
+ <baseurl>http://download.opensuse.org/source/distribution/11.3/repo/oss/</baseurl>
<alias>repo-source</alias>
- <name>openSUSE-11.2-Source</name>
+ <name>openSUSE-11.3-Source</name>
<prod_dir>/</prod_dir>
<enabled config:type="boolean">false</enabled>
<autorefresh config:type="boolean">true</autorefresh>
--
To unsubscribe, e-mail: yast-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: yast-commit+help(a)opensuse.org
1
0
21 Jan '10
Author: jsmeix
Date: Thu Jan 21 11:02:03 2010
New Revision: 60466
URL: http://svn.opensuse.org/viewcvs/yast?rev=60466&view=rev
Log:
Improved help text 'regarding firewall'.
Modified:
trunk/printer/src/helps.ycp
Modified: trunk/printer/src/helps.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/printer/src/helps.ycp?rev=60466&…
==============================================================================
--- trunk/printer/src/helps.ycp (original)
+++ trunk/printer/src/helps.ycp Thu Jan 21 11:02:03 2010
@@ -649,15 +649,22 @@
in which printers are published via network.
By default the SuSEfirewall allows any incomming information
via a network interface which belongs to the 'internal zone'
-because this zone is trusted by default.
-If the CUPS servers and your system are in a trusted internal network,
-your network interface must be set to be in the 'internal zone'.
-It does not make sense to have a network setup in a trusted internal network
+because this zone is trusted by default.<br>
+It does not make sense to do printing in a trusted internal network
with a network interface which belongs to the untrusted 'external zone'
(the latter is the default setting for network interfaces to be safe).
-Do not disable firewall protection for CUPS
+In particular do not disable firewall protection for CUPS
(i.e. for IPP which uses TCP port 631 and UDP port 631)
for the untrusted 'external zone'.<br>
+To use remote printers in a trusted internal network
+and be protected by the firewall against unwanted access
+from any external network (in particular from the Internet),
+assign the network interface which belongs to the internal network
+to the internal zone of the firewall.
+Use the YaST Firewall setup module to do this fundamental setup
+to gain security plus usefulness in your network
+and using remote printers in a trusted internal network
+will work without any further firewall setup.<br>
For details see the openSUSE support database
article 'CUPS and SANE Firewall settings' at<br>
http://en.opensuse.org/SDB:CUPS_and_SANE_Firewall_settings
@@ -713,20 +720,34 @@
// SharingDialog help 3/3:
_("<p>
Regarding firewall:<br>
-Check if a firewall is active for a network zone in which printers
-are made available via network to be used by trusted users
-(nobody lets arbitrary users print on his printer).
-By default the SuSEfirewall allows any access via a network interface
-which belongs to the 'internal zone' because this zone is trusted by default.
-If the CUPS server and the client systems are in an internal network
-and when you trust all what there is in your internal network,
-your network interface must be set to be in the 'internal zone'.
-It does not make sense to have a network setup in a trusted internal network
+A firewall is used to protect running server processes
+(in this case the CUPS server process 'cupsd')
+on your host against unwanted access via network.<br>
+Printing via network happens in a trusted internal network
+(nobody lets arbitrary users from whatever external network
+print on his printer) and usually the users need
+physical printer access to get their paper output.<br>
+By default the SuSEfirewall lets any network traffic pass
+via a network interface which belongs to the 'internal zone'
+because this zone is trusted by default.<br>
+It does not make sense to do printing in a trusted internal network
with a network interface which belongs to the untrusted 'external zone'
-which is the default setting for network interfaces to be safe.
+(the latter is the default setting for network interfaces to be safe).
Do not disable firewall protection for CUPS
(i.e. for IPP which uses TCP port 631 and UDP port 631)
-for the untrusted 'external zone'.
+for the untrusted 'external zone'.<br>
+To make printers accessible in a trusted internal network
+and be protected by the firewall against unwanted access
+from any external network (in particular from the Internet),
+assign the network interface which belongs to the internal network
+to the internal zone of the firewall.
+Use the YaST Firewall setup module to do this fundamental setup
+to gain security plus usefulness in your network and
+sharing printers in a trusted internal network
+will work without any further firewall setup.<br>
+For details see the openSUSE support database
+article 'CUPS and SANE Firewall settings' at<br>
+http://en.opensuse.org/SDB:CUPS_and_SANE_Firewall_settings
</p>"),
"policies" :
--
To unsubscribe, e-mail: yast-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: yast-commit+help(a)opensuse.org
1
0
[yast-commit] r60465 - in /branches/SuSE-Code-11-SP1-Branch/network/src: lan/complex.ycp modules/Lan.ycp
by kmachalkova@svn.opensuse.org 20 Jan '10
by kmachalkova@svn.opensuse.org 20 Jan '10
20 Jan '10
Author: kmachalkova
Date: Wed Jan 20 18:02:46 2010
New Revision: 60465
URL: http://svn.opensuse.org/viewcvs/yast?rev=60465&view=rev
Log:
Now use the library func - look for changes in
all components (L.Items, DNS, Routing, N.Config)
Modified:
branches/SuSE-Code-11-SP1-Branch/network/src/lan/complex.ycp
branches/SuSE-Code-11-SP1-Branch/network/src/modules/Lan.ycp
Modified: branches/SuSE-Code-11-SP1-Branch/network/src/lan/complex.ycp
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP1-Branch/netwo…
==============================================================================
--- branches/SuSE-Code-11-SP1-Branch/network/src/lan/complex.ycp (original)
+++ branches/SuSE-Code-11-SP1-Branch/network/src/lan/complex.ycp Wed Jan 20 18:02:46 2010
@@ -50,9 +50,9 @@
* Display finished popup
* @return dialog result
*/
-define symbol FinishDialog() ``{
+/*define symbol FinishDialog() ``{
return FinishPopup(Modified(), "lan", "", "mail", ["permanent"]);
-}
+}*/
/**
* Read settings dialog
@@ -91,7 +91,7 @@
define symbol WriteDialog() ``{
ScreenName("lan-write");
- if(!Modified()) return `next;
+ if(!Lan::Modified()) return `next;
LanItems::SetModified();
Wizard::RestoreHelp(help["write"]:"");
Modified: branches/SuSE-Code-11-SP1-Branch/network/src/modules/Lan.ycp
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP1-Branch/netwo…
==============================================================================
--- branches/SuSE-Code-11-SP1-Branch/network/src/modules/Lan.ycp (original)
+++ branches/SuSE-Code-11-SP1-Branch/network/src/modules/Lan.ycp Wed Jan 20 18:02:46 2010
@@ -105,21 +105,22 @@
// FIXME: MOD list<string> DeletedModules = [];
+// FIXME: used in lan/address.ycp (#17346) -> "global"
+
+/*------------------*/
+/* GLOBAL FUNCTIONS */
+/*------------------*/
+
/**
* Return a modification status
* @return true if data was modified
*/
-boolean Modified() {
+global boolean Modified() {
boolean ret = LanItems::Modified() || DNS::modified || Routing::Modified() ||
NetworkConfig::Modified();
return ret;
}
-// FIXME: used in lan/address.ycp (#17346) -> "global"
-
-/*------------------*/
-/* GLOBAL FUNCTIONS */
-
// function for use from autoinstallation (Fate #301032)
global define boolean isAnyInterfaceDown(){
boolean down = false;
@@ -387,11 +388,11 @@
global define boolean Write() {
y2milestone("Writing configuration");
-// if(!write_only && NetHwDetection::running) NetHwDetection::Stop();
- /* Stop the detection */
- //FIXME: not only LanItems
- if(!LanItems::modified) {
+ // Query modified flag in all components, not just LanItems - DNS,
+ // Routing, NetworkConfig too in order not to discard changes made
+ // outside LanItems (bnc#439235)
+ if(!Modified()) {
y2milestone("No changes to network setup -> nothing to write");
return true;
}
--
To unsubscribe, e-mail: yast-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: yast-commit+help(a)opensuse.org
1
0
[yast-commit] r60464 - in /trunk/printer/src: basicadd.ycp basicmodify.ycp
by jsmeix@svn.opensuse.org 20 Jan '10
by jsmeix@svn.opensuse.org 20 Jan '10
20 Jan '10
Author: jsmeix
Date: Wed Jan 20 17:43:53 2010
New Revision: 60464
URL: http://svn.opensuse.org/viewcvs/yast?rev=60464&view=rev
Log:
Fixed search usability in basicadd.ycp and basicmodify.ycp
for ncurses: Only when the user is already searching drivers,
set the focus to the InputField for the driver search string
so that the user can just continue typing other search strings.
In contrast when the user is not already searching drivers,
it is annoying in particular in the text-only ncurses UI
when the focus becomes always set to the driver search string
InputField.
Modified:
trunk/printer/src/basicadd.ycp
trunk/printer/src/basicmodify.ycp
Modified: trunk/printer/src/basicadd.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/printer/src/basicadd.ycp?rev=604…
==============================================================================
--- trunk/printer/src/basicadd.ycp (original)
+++ trunk/printer/src/basicadd.ycp Wed Jan 20 17:43:53 2010
@@ -295,9 +295,15 @@
_("&Search for")
)
);
- // Set the focus to the InputField for the driver search string
- // so that the user can just start typing:
- UI::SetFocus( `driver_filter_input );
+ if( `apply_driver_filter == user_input )
+ { // Only when the user is already searching drivers,
+ // set the focus to the InputField for the driver search string
+ // so that the user can just continue typing other search strings.
+ // In contrast when the user is not already searching drivers,
+ // it is annoying in particular in the text-only ncurses UI
+ // when the focus becomes always set to the driver search string InputField.
+ UI::SetFocus( `driver_filter_input );
+ }
// Wait for user input:
user_input = UI::UserInput();
if( `abort == user_input || `cancel == user_input || `back == user_input ) break;
Modified: trunk/printer/src/basicmodify.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/printer/src/basicmodify.ycp?rev=…
==============================================================================
--- trunk/printer/src/basicmodify.ycp (original)
+++ trunk/printer/src/basicmodify.ycp Wed Jan 20 17:43:53 2010
@@ -493,9 +493,15 @@
_("&Search for")
)
);
- // Set the focus to the InputField for the driver search string
- // so that the user can just start typing:
- UI::SetFocus( `driver_filter_input );
+ if( `apply_driver_filter == user_input )
+ { // Only when the user is already searching drivers,
+ // set the focus to the InputField for the driver search string
+ // so that the user can just continue typing other search strings.
+ // In contrast when the user is not already searching drivers,
+ // it is annoying in particular in the text-only ncurses UI
+ // when the focus becomes always set to the driver search string InputField.
+ UI::SetFocus( `driver_filter_input );
+ }
// Wait for user input:
user_input = UI::UserInput();
if( `abort == user_input || `cancel == user_input || `back == user_input ) break;
--
To unsubscribe, e-mail: yast-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: yast-commit+help(a)opensuse.org
1
0
[yast-commit] r60463 - in /branches/SuSE-Code-11-SP1-Branch/storage/libstorage/src: MdPartCo.cc MdPartCo.h
by mpatelcz@svn.opensuse.org 20 Jan '10
by mpatelcz@svn.opensuse.org 20 Jan '10
20 Jan '10
Author: mpatelcz
Date: Wed Jan 20 17:40:46 2010
New Revision: 60463
URL: http://svn.opensuse.org/viewcvs/yast?rev=60463&view=rev
Log:
1. Removed text massages on deletion
2. RAID disks are released after partition deletion.
Modified:
branches/SuSE-Code-11-SP1-Branch/storage/libstorage/src/MdPartCo.cc
branches/SuSE-Code-11-SP1-Branch/storage/libstorage/src/MdPartCo.h
Modified: branches/SuSE-Code-11-SP1-Branch/storage/libstorage/src/MdPartCo.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP1-Branch/stora…
==============================================================================
--- branches/SuSE-Code-11-SP1-Branch/storage/libstorage/src/MdPartCo.cc (original)
+++ branches/SuSE-Code-11-SP1-Branch/storage/libstorage/src/MdPartCo.cc Wed Jan 20 17:40:46 2010
@@ -674,13 +674,6 @@
}
if( ret==0 && !created() )
{
- list<string> rdevs;
- getDevs( rdevs );
- for( list<string>::const_iterator s=rdevs.begin();
- s!=rdevs.end(); ++s )
- {
- getStorage()->clearUsedBy(*s);
- }
//Remove partitions
MdPartPair p=mdpartPair(MdPart::notDeleted);
for( MdPartIter i=p.begin(); i!=p.end(); ++i )
@@ -688,6 +681,12 @@
if( i->nr()>0 )
{
ret = removePartition( i->nr() );
+ if( ret != 0 )
+ {
+ // Error. Break.
+ break;
+ }
+
}
}
//Remove 'whole device' it was created when last partition was deleted.
@@ -697,16 +696,35 @@
if( !removeFromList( &(*p.begin()) ))
{
y2err( "not found:" << *p.begin() );
+ ret = MDPART_PARTITION_NOT_FOUND;
}
}
- setDeleted( true );
- destrSb = true;
- del_ptable = true;
}
+ if( ret==0 )
+ {
+ unuseDevs();
+ setDeleted( true );
+ destrSb = true;
+ del_ptable = true;
+ }
y2mil("ret:" << ret);
return( ret );
}
+int MdPartCo::unuseDevs(void)
+{
+ list<string> rdevs;
+ getDevs( rdevs );
+ for( list<string>::const_iterator s=rdevs.begin();
+ s!=rdevs.end(); s++ )
+ {
+ getStorage()->clearUsedBy(*s);
+ }
+ return 0;
+}
+
+
+
void MdPartCo::removePresentPartitions()
{
VolPair p = volPair();
@@ -888,10 +906,6 @@
// 1. Check Metadata.
if( sb_ver == "imsm" || sb_ver == "ddf" )
{
- if( !silent )
- {
- getStorage()->showInfoCb( noRemoveTextFormat(true) );
- }
y2error("Cannot remove IMSM or DDF SW RAIDs.");
return (MDPART_NO_REMOVE);
}
@@ -912,10 +926,6 @@
}
if( permitRemove == 1 )
{
- if( !silent )
- {
- getStorage()->showInfoCb( noRemoveTextPartitions(true) );
- }
y2error("Cannot remove RAID with partitions.");
return (MDPART_NO_REMOVE);
}
@@ -1090,36 +1100,6 @@
}
return( txt );
}
-string MdPartCo::noRemoveTextFormat( bool doing ) const
- {
- string txt;
- if( doing )
- {
- // displayed text during action, %1$s is replaced by a name (e.g. pdc_igeeeadj),
- txt = sformat( _("Cannot remove %1$s. It is IMSM or DDF RAID."), name().c_str() );
- }
- else
- {
- // displayed text before action, %1$s is replaced by a name (e.g. pdc_igeeeadj),
- txt = sformat( _("Couldn't remove %1$s. It is IMSM or DDF RAID."), name().c_str() );
- }
- return( txt );
- }
-string MdPartCo::noRemoveTextPartitions( bool doing ) const
- {
- string txt;
- if( doing )
- {
- // displayed text during action, %1$s is replaced by a name (e.g. pdc_igeeeadj),
- txt = sformat( _("Cannot remove %1$s because it contains at least 1 partition."), name().c_str() );
- }
- else
- {
- // displayed text before action, %1$s is replaced by a name (e.g. pdc_igeeeadj),
- txt = sformat( _("Couldn't remove %1$s because it contains at least 1 partition."), name().c_str() );
- }
- return( txt );
- }
void
MdPartCo::setUdevData(const list<string>& id)
{
Modified: branches/SuSE-Code-11-SP1-Branch/storage/libstorage/src/MdPartCo.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP1-Branch/stora…
==============================================================================
--- branches/SuSE-Code-11-SP1-Branch/storage/libstorage/src/MdPartCo.h (original)
+++ branches/SuSE-Code-11-SP1-Branch/storage/libstorage/src/MdPartCo.h Wed Jan 20 17:40:46 2010
@@ -277,8 +277,6 @@
int doCreateLabel();
virtual int doRemove();
virtual string removeText( bool doing ) const;
- virtual string noRemoveTextFormat( bool doing ) const;
- virtual string noRemoveTextPartitions( bool doing ) const;
virtual string setDiskLabelText( bool doing ) const;
void getMajorMinor(void);
@@ -299,6 +297,8 @@
void getMdProps(void);
void setSpares(void);
+ /* Clear UsedBy for Disks. */
+ int unuseDevs(void);
void logData( const string& Dir );
string udev_path;
--
To unsubscribe, e-mail: yast-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: yast-commit+help(a)opensuse.org
1
0
20 Jan '10
Author: jsmeix
Date: Wed Jan 20 16:49:56 2010
New Revision: 60462
URL: http://svn.opensuse.org/viewcvs/yast?rev=60462&view=rev
Log:
Reduced too long help text 'regarding firewall' but
added a link to 'SDB:CUPS and SANE Firewall settings' at
http://en.opensuse.org/SDB:CUPS_and_SANE_Firewall_settings
Modified:
trunk/scanner/src/helps.ycp
Modified: trunk/scanner/src/helps.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/scanner/src/helps.ycp?rev=60462&…
==============================================================================
--- trunk/scanner/src/helps.ycp (original)
+++ trunk/scanner/src/helps.ycp Wed Jan 20 16:49:56 2010
@@ -267,48 +267,32 @@
// Keep the information that external access is useless and insecure (see "man saned").
_("<p>
<b><big>Regarding Firewall</big></b><br>
-Clients contact the saned via the sane-port (TCP port 6566)
+A firewall is used to protect running server processes
+on your host against unwanted access via network.
+For using scanners via network the SANE network daemon (the saned)
+is the server process which must run so that remote clients
+can access scanners which are connected to your local host.
+Client hosts contact the saned via the sane-port (TCP port 6566)
but scanning data is transferred via an additional random port.
-Therefore is is not sufficient for scanning via network
-to open only port 6566 in the firewall.<br>
-You can specify a port range for the data connection
-in the saned config file /etc/sane.d/saned.conf
-via an entry like 'data_portrange = 30000 - 30100'
-and then open port 6566 and the port range 30000:30100
-in the firewall.<br>
-The default firewall settings protect your host from external access.
+Therefore only port 6566 is not sufficient for scanning via network.<br>
+Do not open the sane-port 6566 or any other port
+regarding using scanners for the external zone in the firewall.
+This is dangerous because it allows access to the saned from foreign hosts
+so that the firewall does no longer provide any protection for the saned.
Allowing access from the external network (i.e. for the external zone)
does not make sense because scanning documents requires
physical scanner access by trusted users.<br>
On the other hand the default firewall settings allow
-any access from an internal (i.e. trusted) network
-unless you have firewall protection enabled for the internal zone.
-But an active firewall for the internal zone (i.e. for the
-trusted network zone) does usually also not make much sense
-because this makes the internal zone effectively the same
-as the external zone.<br>
-The simplest and most secure way to do scanning via network
-is when the trusted network has a well separated network interface
-to have the trusted network well separated from the rest.
-Then those network interface can be assigned to the internal zone
-via the YaST Firewall setup module and scanning via network
+any access from an internal (i.e. trusted) network.
+To make the saned on your server accessible from an internal network,
+assign the network interface which belongs to the internal network
+to the internal zone of the firewall.
+Use the YaST Firewall setup module to do this fundamental setup
+regarding network security and firewall and scanning via network
will work without any further firewall setup.<br>
-Anything else may result a problematic mix-up of trusted and
-non-trusted network traffic in one same network environment.
-For example when both the internal network and the connection
-to the Internet happens via one same 'router-box' device.
-In such a case the 'router-box' device is the crucial point
-(in particular the crucial point of possible failure)
-regarding network security.<br>
-In any case a plain opening of a port for the external zone
-is dangerous because it allows access from any foreign host
-to those port but does not provide any protection for
-the service which is accessed via this port (e.g. the saned).
-Instead of plain opening of ports for arbitrary access
-one should additionally specify in the firewall setup
-from which hosts and networks the access is allowed.
-The YaST Firewall setup module can also be used
-for such kind of more sophisticated firewall setup.
+For details see the openSUSE support database
+article 'CUPS and SANE Firewall settings' at<br>
+http://en.opensuse.org/SDB:CUPS_and_SANE_Firewall_settings
</p>") +
// ConfigureNetworkScanning dialog help 4/5:
// Do not change or translate "net", it is a metadriver name.
@@ -318,7 +302,7 @@
<b><big>Client Settings</big></b><br>
If you want to access scanners connected to other hosts (servers) in the network,
set up the net metadriver to access them via the daemon running on the servers.
-saned and firewall on the servers must permit the access.
+The saned and the firewall on the servers must permit the access.
In <b>Servers Used</b>, enter which servers should be used.
Enter a comma-separated list of servers (server names or IP addresses).
If no servers are entered, net is not activated.
--
To unsubscribe, e-mail: yast-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: yast-commit+help(a)opensuse.org
1
0
[yast-commit] r60461 - in /trunk/printer/src: basicadd.ycp basicmodify.ycp
by jsmeix@svn.opensuse.org 20 Jan '10
by jsmeix@svn.opensuse.org 20 Jan '10
20 Jan '10
Author: jsmeix
Date: Wed Jan 20 16:18:24 2010
New Revision: 60461
URL: http://svn.opensuse.org/viewcvs/yast?rev=60461&view=rev
Log:
Fixed search usability in basicadd.ycp and basicmodify.ycp
in each run of the user input while loop
directly before UI::UserInput() by
first replacing the [Search for] button with itself
with `opt(`default) to enforce this default regardless
whatever function call or UI bug may have changed it
and then setting the focus to the InputField for the driver
search string so that the user can just start typing
(it does not work the other way round, i.e. first
set the focus then the default widget because it seems
setting the default widget sets also the focus to it).
Modified:
trunk/printer/src/basicadd.ycp
trunk/printer/src/basicmodify.ycp
Modified: trunk/printer/src/basicadd.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/printer/src/basicadd.ycp?rev=604…
==============================================================================
--- trunk/printer/src/basicadd.ycp (original)
+++ trunk/printer/src/basicadd.ycp Wed Jan 20 16:18:24 2010
@@ -134,18 +134,21 @@
)
),
`HBox
- ( `PushButton
- ( `id(`apply_driver_filter),
- // This button must be the default
- // (it is activated when the user pressed the Enter key)
- // because when the user has clicked into TextEntry to enter something
- // it is normal to finish entering by pressing the Enter key
- // but if the Enter key was linked to 'Next' or 'Back',
- // the user would get the wrong action.
- `opt(`default),
- // Label of a PushButton to search a list for a search string
- // and then show the search result:
- _("&Search for")
+ ( `ReplacePoint
+ ( `id(`apply_driver_filter_replace_point),
+ `PushButton
+ ( `id(`apply_driver_filter),
+ // This button must be the default
+ // (it is activated when the user pressed the Enter key)
+ // because when the user has clicked into InputField to enter something
+ // it is normal to finish entering by pressing the Enter key
+ // but if the Enter key was linked to 'Next' or 'Back',
+ // the user would get the wrong action.
+ `opt(`default),
+ // Label of a PushButton to search a list for a search string
+ // and then show the search result:
+ _("&Search for")
+ )
),
`ReplacePoint
( `id(`driver_filter_input_replace_point),
@@ -274,13 +277,28 @@
UI::FakeUserInput( `connection_selection );
any user_input = nil;
while( true )
- { // The [Search for] button must be the default
- // (it is activated when the user pressed the Enter key)
- // because when the user has clicked into TextEntry to enter something
- // it is normal to finish entering by pressing the Enter key
- // but if the Enter key was linked to 'Next' or 'Back',
- // the user would get the wrong action.
- UI::SetFocus( `apply_driver_filter );
+ { // Replace the [Search for] button with itself to enforce it is the default widget
+ // (the default widget is the result of UI::UserInput when the user pressed the Enter key)
+ // regardless whatever function call or UI bug (e.g. bnc#558900) may have changed the default widget:
+ UI::ReplaceWidget( `id(`apply_driver_filter_replace_point),
+ `PushButton
+ ( `id(`apply_driver_filter),
+ // This button must be the default
+ // (it is activated when the user pressed the Enter key)
+ // because when the user has clicked into InputField to enter something
+ // it is normal to finish entering by pressing the Enter key
+ // but if the Enter key was linked to 'Next' or 'Back',
+ // the user would get the wrong action.
+ `opt(`default),
+ // Label of a PushButton to search a list for a search string
+ // and then show the search result:
+ _("&Search for")
+ )
+ );
+ // Set the focus to the InputField for the driver search string
+ // so that the user can just start typing:
+ UI::SetFocus( `driver_filter_input );
+ // Wait for user input:
user_input = UI::UserInput();
if( `abort == user_input || `cancel == user_input || `back == user_input ) break;
if( `next == user_input )
Modified: trunk/printer/src/basicmodify.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/printer/src/basicmodify.ycp?rev=…
==============================================================================
--- trunk/printer/src/basicmodify.ycp (original)
+++ trunk/printer/src/basicmodify.ycp Wed Jan 20 16:18:24 2010
@@ -337,18 +337,21 @@
)
),
`HBox
- ( `PushButton
- ( `id(`apply_driver_filter),
- // This button must be the default
- // (it is activated when the user pressed the Enter key)
- // because when the user has clicked into TextEntry to enter something
- // it is normal to finish entering by pressing the Enter key
- // but if the Enter key was linked to 'Next' or 'Back',
- // the user would get the wrong action.
- `opt(`default),
- // Label of a PushButton to search a list for a search string
- // and then show the search result:
- _("&Search for")
+ ( `ReplacePoint
+ ( `id(`apply_driver_filter_replace_point),
+ `PushButton
+ ( `id(`apply_driver_filter),
+ // This button must be the default
+ // (it is activated when the user pressed the Enter key)
+ // because when the user has clicked into InputField to enter something
+ // it is normal to finish entering by pressing the Enter key
+ // but if the Enter key was linked to 'Next' or 'Back',
+ // the user would get the wrong action.
+ `opt(`default),
+ // Label of a PushButton to search a list for a search string
+ // and then show the search result:
+ _("&Search for")
+ )
),
`ReplacePoint
( `id(`driver_filter_input_replace_point),
@@ -472,13 +475,28 @@
}
any user_input = nil;
while( true )
- { // The [Search for] button must be the default
- // (it is activated when the user pressed the Enter key)
- // because when the user has clicked into TextEntry to enter something
- // it is normal to finish entering by pressing the Enter key
- // but if the Enter key was linked to 'Next' or 'Back',
- // the user would get the wrong action.
- UI::SetFocus( `apply_driver_filter );
+ { // Replace the [Search for] button with itself to enforce it is the default widget
+ // (the default widget is the result of UI::UserInput when the user pressed the Enter key)
+ // regardless whatever function call or UI bug (e.g. bnc#558900) may have changed the default widget:
+ UI::ReplaceWidget( `id(`apply_driver_filter_replace_point),
+ `PushButton
+ ( `id(`apply_driver_filter),
+ // This button must be the default
+ // (it is activated when the user pressed the Enter key)
+ // because when the user has clicked into InputField to enter something
+ // it is normal to finish entering by pressing the Enter key
+ // but if the Enter key was linked to 'Next' or 'Back',
+ // the user would get the wrong action.
+ `opt(`default),
+ // Label of a PushButton to search a list for a search string
+ // and then show the search result:
+ _("&Search for")
+ )
+ );
+ // Set the focus to the InputField for the driver search string
+ // so that the user can just start typing:
+ UI::SetFocus( `driver_filter_input );
+ // Wait for user input:
user_input = UI::UserInput();
if( `abort == user_input || `cancel == user_input || `back == user_input ) break;
if( `next == user_input )
--
To unsubscribe, e-mail: yast-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: yast-commit+help(a)opensuse.org
1
0