Hello community,
here is the log from the commit of package yast2-storage for openSUSE:Factory
checked in at Sun Mar 21 11:58:15 CET 2010.
--------
--- yast2-storage/yast2-storage.changes 2010-03-16 15:41:26.000000000 +0100
+++ /mounts/work_src_done/STABLE/yast2-storage/yast2-storage.changes 2010-03-19 15:42:32.000000000 +0100
@@ -1,0 +2,21 @@
+Fri Mar 19 11:54:53 CET 2010 - aschnell@suse.de
+
+- fixed detection of Windows (bnc #589019)
+- 2.19.9
+
+-------------------------------------------------------------------
+Fri Mar 19 10:23:49 CET 2010 - aschnell@suse.de
+
+- improved warning about unformatted home volume
+
+-------------------------------------------------------------------
+Thu Mar 18 18:54:31 CET 2010 - fehr@suse.de
+
+- make update and detection of encrypted LVM VGs possible
+
+-------------------------------------------------------------------
+Thu Mar 18 11:29:58 CET 2010 - aschnell@suse.de
+
+- fixed proposal name for DM and MD RAIDs
+
+-------------------------------------------------------------------
calling whatdependson for head-i586
Old:
----
yast2-storage-2.19.8.tar.bz2
New:
----
yast2-storage-2.19.9.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2-storage.spec ++++++
--- /var/tmp/diff_new_pack.e3fzB4/_old 2010-03-21 11:58:06.000000000 +0100
+++ /var/tmp/diff_new_pack.e3fzB4/_new 2010-03-21 11:58:06.000000000 +0100
@@ -1,5 +1,5 @@
#
-# spec file for package yast2-storage (Version 2.19.8)
+# spec file for package yast2-storage (Version 2.19.9)
#
# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
@@ -19,11 +19,11 @@
Name: yast2-storage
-Version: 2.19.8
+Version: 2.19.9
Release: 1
BuildRoot: %{_tmppath}/%{name}-%{version}-build
-Source0: yast2-storage-2.19.8.tar.bz2
+Source0: yast2-storage-2.19.9.tar.bz2
Prefix: /usr
@@ -31,7 +31,7 @@
License: GPLv2+
BuildRequires: blocxx-devel boost-devel gcc-c++ libxcrypt-devel openssl-devel sablot swig
BuildRequires: docbook-xsl-stylesheets doxygen libxslt perl-XML-Writer sgml-skel update-desktop-files
-BuildRequires: libstorage-devel >= 2.19.11 yast2 >= 2.19.4 yast2-core-devel >= 2.18.1 yast2-devtools
+BuildRequires: libstorage-devel >= 2.19.12 yast2 >= 2.19.4 yast2-core-devel >= 2.18.1 yast2-devtools
BuildRequires: yast2-perl-bindings yast2-testsuite >= 2.19.0
Requires: libstorage = %(echo `rpm -q --queryformat '%{VERSION}' libstorage`)
Requires: yast2-perl-bindings yast2-core >= 2.18.3 yast2 >= 2.19.4 yast2-libyui >= 2.18.7
@@ -55,7 +55,7 @@
devices during installation and on an installed system.
%prep
-%setup -n yast2-storage-2.19.8
+%setup -n yast2-storage-2.19.9
%build
%{prefix}/bin/y2tool y2autoconf
++++++ yast2-storage-2.19.8.tar.bz2 -> yast2-storage-2.19.9.tar.bz2 ++++++
++++ 2720 lines of diff (skipped)
++++ retrying with extended exclude list
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-storage-2.19.8/VERSION new/yast2-storage-2.19.9/VERSION
--- old/yast2-storage-2.19.8/VERSION 2010-03-16 15:37:05.000000000 +0100
+++ new/yast2-storage-2.19.9/VERSION 2010-03-19 15:37:55.000000000 +0100
@@ -1 +1 @@
-2.19.8
+2.19.9
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-storage-2.19.8/configure.in new/yast2-storage-2.19.9/configure.in
--- old/yast2-storage-2.19.8/configure.in 2010-03-16 15:38:55.000000000 +0100
+++ new/yast2-storage-2.19.9/configure.in 2010-03-19 15:40:28.000000000 +0100
@@ -3,7 +3,7 @@
dnl -- This file is generated by y2autoconf 2.18.11 - DO NOT EDIT! --
dnl (edit configure.in.in instead)
-AC_INIT(yast2-storage, 2.19.8, http://bugs.opensuse.org/, yast2-storage)
+AC_INIT(yast2-storage, 2.19.9, http://bugs.opensuse.org/, yast2-storage)
dnl Check for presence of file 'RPMNAME'
AC_CONFIG_SRCDIR([RPMNAME])
@@ -18,7 +18,7 @@
AM_INIT_AUTOMAKE(tar-ustar -Wno-portability)
dnl Important YaST2 variables
-VERSION="2.19.8"
+VERSION="2.19.9"
RPMNAME="yast2-storage"
MAINTAINER="Arvin Schnell "
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-storage-2.19.8/storage/src/include/auto_part_functions.ycp new/yast2-storage-2.19.9/storage/src/include/auto_part_functions.ycp
--- old/yast2-storage-2.19.8/storage/src/include/auto_part_functions.ycp 2009-07-21 16:37:06.000000000 +0200
+++ new/yast2-storage-2.19.9/storage/src/include/auto_part_functions.ycp 2010-03-19 15:10:32.000000000 +0100
@@ -7,7 +7,7 @@
* Purpose: This module define functions of general use
* to the automatic partitioner
*
- * $Id: auto_part_functions.ycp 57106 2009-05-08 12:26:51Z aschnell $
+ * $Id: auto_part_functions.ycp 61402 2010-03-19 14:10:31Z aschnell $
*
* needs global variables:
*
@@ -17,22 +17,16 @@
*
* defined functions:
global define size_of_region (list region) ``{
- global define size_to_units (integer bytes) ``{
global define start_of_region (list region) ``{
global define end_of_region (list region) ``{
global define num_primary (list partitions) ``{
- global define contiguous_selection (list selection) ``{
global define contains_extended (list partitions) ``{
global define extended_region (list partitions) ``{
- global define calculate_selected_region (list selection, any extended_region) ``{
global define can_create_logical (list partitions, integer first_logical,
integer max_logical ) ``{
global define can_resize( list partitions ) ``{
- global define renumber_logical_partitions (list partitions) ``{
global define unused_extended_region (list partitions) ``{
- global define unused_logical_region (list partitions) ``{
global define compute_max_partitions (map target) ``{
- global define compute_max_primary (map target)
*
*/
{
@@ -50,13 +44,6 @@
return region[1]:0 * bytes_per_unit;
};
- // Return the number of units that holds at least BYTES
-
-define integer size_to_units( integer bytes,
- integer bytes_per_unit) ``{
- return (bytes + bytes_per_unit - 1) / bytes_per_unit;
- };
-
// Return the start of the region.
define integer start_of_region (list<integer> region) ``{
@@ -103,33 +90,6 @@
return( ret );
};
- // return the maximal number of primary partitions
-
-define integer compute_max_primary (map disk) ``{
- return disk["max_primary"]:4;
- };
-
- // Return whether the list of selected partitions is contiguous.
-
-define boolean contiguous_selection (list<map> selection) ``{
- boolean ret = true;
- list<integer> last_region = nil;
-
- foreach (map pentry, selection, ``{
- if (!pentry["create"]:false) {
- list<integer> region = pentry["region"]:[];
- symbol type = pentry["type"]:`unknown;
- if( last_region != nil &&
- (end_of_region(last_region) < start_of_region(region)))
- {
- ret = false;
- }
- last_region = region;
- }
- });
- return ret;
- }; // contiguous_selection
-
// Return true if an extended partition exists
@@ -163,39 +123,6 @@
};
- // Return the region for the selected partitions. If EXTENDED_REGION
- // is not nil it is used to clip the region so that it is contained
- // entirely within it.
-
-define list<integer> calculate_selected_region( list selection,
- list<integer> ext_region )
- ``{
- integer start = -1;
- integer end = 0;
- if( size(selection) > 0)
- {
- start = start_of_region( selection[0,"region"]:[] );
- end = end_of_region( selection[size(selection)-1,"region"]:[] );
- }
- if (start != -1)
- {
- if (size (ext_region)>0)
- {
- // Use only the part that is contained in the extended
- // partition
- if (start >= end_of_region (ext_region))
- return [ 0, 0 ];
- if (start < start_of_region (ext_region))
- start = start_of_region (ext_region);
- if (end > end_of_region (ext_region))
- end = end_of_region (ext_region);
- }
- return [ start, end - start ];
- }
- return [ 0, 0 ];
- }; // selected_region
-
-
// Check whether three logical partitions can be created without
// running past the kernel limit for the number of partitions
@@ -385,25 +312,6 @@
}; // End of check_win_nt_system()
- // --------------------------------------------------------------
- // Renumber the logical partitions if some of them are deleted
- // The returned list is sorted by partition number instead of region
-
-define list<map> renumber_logical_partitions (list<map> partitions) ``{
- partitions = sort (map a, map b, partitions, ``(a["nr"]:0 < b["nr"]:0));
- integer logicals_deleted = 0;
- return maplist (map pentry, partitions, ``{
- if (pentry["type"]:`unknown == `logical) {
- if (pentry["delete"]:false)
- logicals_deleted = logicals_deleted + 1;
- else
- pentry = add (pentry, "nr",
- pentry["nr"]:0 - logicals_deleted);
- }
- return pentry;
- });
- };
-
// Find unused space at the end of the extended partition
define list<integer> unused_extended_region (list<map> partitions) ``{
list<integer> extended = extended_region (partitions);
@@ -420,21 +328,4 @@
return [0, 0];
};
-
- // Find unused space at the start of the extended partition
-define list<integer> unused_logical_region (list<map> partitions) ``{
- list<integer> extended = extended_region (partitions);
- list logicals = filter (map pentry, partitions, ``(pentry["type"]:`unknown == `logical));
- integer start_of_logicals = 0;
-
- if (size (logicals) > 0)
- start_of_logicals = start_of_region (logicals[0,"region"]:[]);
- else
- start_of_logicals = start_of_region (extended);
-
- if (start_of_logicals > start_of_region (extended))
- return [ start_of_region(extended), start_of_region (extended) - start_of_logicals ];
- return [0, 0];
- };
-
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-storage-2.19.8/storage/src/include/custom_part_dialogs.ycp new/yast2-storage-2.19.9/storage/src/include/custom_part_dialogs.ycp
--- old/yast2-storage-2.19.8/storage/src/include/custom_part_dialogs.ycp 2010-01-07 14:35:37.000000000 +0100
+++ new/yast2-storage-2.19.9/storage/src/include/custom_part_dialogs.ycp 2010-03-19 10:23:23.000000000 +0100
@@ -16,7 +16,7 @@
*
*************************************************************
- $Id: custom_part_dialogs.ycp 60237 2010-01-05 16:07:41Z aschnell $
+ $Id: custom_part_dialogs.ycp 61391 2010-03-18 17:56:35Z fehr $
*/
{
@@ -49,104 +49,21 @@
device, minpwlen, format, tmpcrypt );
// heading text
- string h = _("Enter your password for the encrypted file system.");
+ string h = _("Enter your Password for the Encrypted File System.");
// label text
string label = _("Don't forget what you enter here!");
if( tmpcrypt )
{
label = label + " ";
- label = label + ("Empty password allowed.");
+ label = label + _("Empty password allowed.");
}
if( size(device)>0 )
// heading text, %1 is replaced by device name (e.g. /dev/hda1)
h = sformat( _("Password for Encrypted File System on %1"), device );
- UI::OpenDialog(
- `opt(`decorated ),
- `HBox(
- `HWeight(3, `RichText( helptext ) ),
- `HWeight(6, `VBox(
- `VSpacing(0.3),
- `HBox(
- `HSpacing(1),
- `Heading(h),
- `HSpacing(1)
- ),
- `VSpacing(4),
- `HBox(
- `HSpacing(4),
- `VBox(
- // label text
- `Label(label),
- `VSpacing(),
-
- `HBox(
- `Password(`id("pw1"),
- // Label: get password for user root
- // Please use newline if label is longer than 40 characters
- _("&Enter a password for your file system:"), ""),
- `HSpacing(15)),
-
- `VSpacing(0.5),
-
- `HBox(
- `Password(`id("pw2"),
- // Label: get same password again for verification
- // Please use newline if label is longer than 40 characters
- _("Reenter the password for &verification:"), ""),
- `HSpacing(15))
- ),
- `HSpacing(4)
- ),
- `VSpacing(3),
- `ButtonBox(
- `PushButton(`id("ok"), `opt(`default), Label::OKButton()),
- `PushButton(`id("cancel"), Label::CancelButton())
- ),
- `VSpacing(0.5)
- )
- )
- ));
-
- string password = "";
- symbol widget = nil;
-
- repeat
- {
- // Clear password fields on every round.
- UI::ChangeWidget(`id(`pw1), `Value, "");
- UI::ChangeWidget(`id(`pw2), `Value, "");
-
- UI::SetFocus(`id(`pw1));
-
- widget = (symbol) UI::UserInput();
-
- switch (widget)
- {
- case `ok:
-
- password = (string) UI::QueryWidget(`id(`pw1), `Value);
- string tmp = (string) UI::QueryWidget(`id(`pw2), `Value);
-
- if (!Storage::CheckEncryptionPasswords(password, tmp, minpwlen, tmpcrypt))
- widget = `again;
-
- break;
- }
-
- } until (widget == `cancel || widget == `ok);
-
- UI::CloseDialog();
-
- if (widget == `ok)
- {
- return password;
- }
- else
- {
- return "";
- }
+ string ret = Storage::PasswdPopup( helptext, h, label, format, minpwlen, tmpcrypt );
+ return( ret );
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-storage-2.19.8/storage/src/include/custom_part_lib.ycp new/yast2-storage-2.19.9/storage/src/include/custom_part_lib.ycp
--- old/yast2-storage-2.19.8/storage/src/include/custom_part_lib.ycp 2010-02-16 16:32:39.000000000 +0100
+++ new/yast2-storage-2.19.9/storage/src/include/custom_part_lib.ycp 2010-03-19 15:24:27.000000000 +0100
@@ -13,7 +13,7 @@
*
*************************************************************
*
- $Id: custom_part_lib.ycp 60827 2010-02-16 15:32:38Z aschnell $
+ $Id: custom_part_lib.ycp 61391 2010-03-18 17:56:35Z fehr $
*
*/
@@ -530,94 +530,6 @@
return( ret );
}
-
-/**
- * Do all checks concerning handling of crypt fs
- * @param new partition map
- * @return map
- **/
-define map CheckCryptOk( map new )
- ``{
- map ret = $[ "ok" : true ];
- boolean crypt_fs = false;
- if( UI::WidgetExists( `id(`crypt_fs) ))
- {
- crypt_fs = (boolean)UI::QueryWidget(`id(`crypt_fs), `Value );
- }
- if( crypt_fs )
- new["enc_type"] = new["format"]:false?`luks:`twofish;
- else
- new["enc_type"] = `none;
- if( crypt_fs && size(Storage::GetCryptPwd( new["device"]:"" ))==0 )
- {
- boolean tmpc = EmptyCryptPwdAllowed( new );
- string fs_passwd = DlgCreateCryptFs( new["device"]:"",
- new["format"]:false?8:1,
- new["format"]:false, tmpc );
- // Ask the user for a password for cryptofs, else set crypto to nil??
- if( fs_passwd != nil && size(fs_passwd)>0 )
- {
- string dev = new["device"]:"";
- boolean popup = !new["format"]:false;
- y2milestone( "CheckCryptOk dev %1 popup %2", dev, popup );
- if( popup )
- UI::OpenDialog( `opt(`decorated),
- `VBox(
- `VSpacing(1),
- `HBox(`HSpacing(1),
- `Label(_("Detecting encryption type...")),
- `HSpacing(1)),
- `VSpacing(1)));
-
- ret["ok"] = Storage::SetCryptPwd( dev, fs_passwd ) &&
- (new["format"]:false ||
- Storage::SetCrypt( dev, true, new["format"]:false ));
- if( popup )
- UI::CloseDialog();
- }
- else
- {
- ret["ok"] = tmpc;
- }
- }
- ret["map"] = new;
- y2milestone( "CheckCryptOk ret:%1", ret );
- return( ret );
- };
-
-define map CheckFormatOk( map new )
- ``{
- map ret = $[ "ok" : true ];
- if( new["format"]:false )
- {
- symbol ufs = new["used_fs"]:`unknown;
- y2milestone( "GetSupportFormat %1", FileSystems::GetSupportFormat(ufs));
- if( !FileSystems::GetSupportFormat(ufs) )
- {
- // Popup text
- string txt = sformat( "The file system of type %1 cannot be created.",
- FileSystems::GetName( ufs, "" ));
- Popup::Error(txt);
- ret["ok"] = false;
- }
- }
- ret["map"] = new;
- y2milestone( "CheckFormatOk ret:%1", ret["ok"]:false );
- return( ret );
- };
-
-define map CheckDeviceFinalOk( map new )
- ``{
- y2milestone( "CheckDeviceFinalOk new:%1", new );
- map ret = CheckFormatOk( new );
- if( ret["ok"]:false )
- {
- ret = CheckCryptOk( ret["map"]:$[] );
- }
- y2milestone( "CheckDeviceFinalOk ret:%1", ret );
- return( ret );
- }
-
map pkg_for_fs = $[
`ext2 : [ "e2fsprogs" ],
`ext3 : [ "e2fsprogs" ],
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-storage-2.19.8/storage/src/include/ep-dialogs.ycp new/yast2-storage-2.19.9/storage/src/include/ep-dialogs.ycp
--- old/yast2-storage-2.19.8/storage/src/include/ep-dialogs.ycp 2010-03-04 16:38:20.000000000 +0100
+++ new/yast2-storage-2.19.9/storage/src/include/ep-dialogs.ycp 2010-03-19 10:23:23.000000000 +0100
@@ -480,10 +480,25 @@
integer min_pw_len = data["format"]:false ? 8 : 1;
boolean empty_pw_allowed = EmptyCryptPwdAllowed(data);
+ boolean two_pw = data["format"]:false || size(data["mount"]:"")==0;
- string label = _("Don't forget what you enter here!");
+ string label = "";
+
+ if( two_pw )
+ {
+ label = _("Don't forget what you enter here!");
+ label = label + "\n";
+ }
if (empty_pw_allowed)
- label = label + "\n" + _("Empty password allowed.");
+ label = label + _("Empty password allowed.");
+
+ term ad = `Empty();
+ if( two_pw )
+ ad = `Password( `id(`pw2), `opt(`hstretch),
+ // Label: get same password again for verification
+ // Please use newline if label is longer than 40 characters
+ _("Reenter the password for &verification:"), "");
+
term contents = `HVSquash(`FrameWithMarginBox(_("Password"),
`VBox(
@@ -491,10 +506,7 @@
// Label: get password for user root
// Please use newline if label is longer than 40 characters
_("&Enter a password for your file system:"), ""),
- `Password(`id(`pw2), `opt(`hstretch),
- // Label: get same password again for verification
- // Please use newline if label is longer than 40 characters
- _("Reenter the password for &verification:"), ""),
+ ad,
`VSpacing(0.5),
`Left(`Label(label))
)
@@ -525,7 +537,7 @@
size(data["mount"]:"")>0;
if (!Storage::CheckEncryptionPasswords(password, tmp, min_pw_len, empty_pw_allowed) ||
- (need_verify && !Storage::CheckCryptOk(dev, password)) )
+ (need_verify && !Storage::CheckCryptOk(dev, password, false, false)) )
{
UI::SetFocus(`id(`pw1) );
widget = `again;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-storage-2.19.8/storage/src/inst_target_part.ycp new/yast2-storage-2.19.9/storage/src/inst_target_part.ycp
--- old/yast2-storage-2.19.8/storage/src/inst_target_part.ycp 2009-12-02 15:25:08.000000000 +0100
+++ new/yast2-storage-2.19.9/storage/src/inst_target_part.ycp 2010-03-18 17:30:52.000000000 +0100
@@ -9,7 +9,7 @@
* -Ask the user which partition to use.
* -Check the input and return error-messages.
*
- * $Id: inst_target_part.ycp 59894 2009-12-02 14:26:01Z aschnell $
+ * $Id: inst_target_part.ycp 61390 2010-03-18 16:30:28Z aschnell $
*/
{
textdomain "storage";
@@ -109,7 +109,7 @@
}
// user visible name of target
- string targetname = target["name"]:"";
+ string targetname = target["proposal_name"]:target["device"]:"?";
// The current list of partitions
list< map > partitions = target["partitions"]:[];
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-storage-2.19.8/storage/src/inst_target_selection.ycp new/yast2-storage-2.19.9/storage/src/inst_target_selection.ycp
--- old/yast2-storage-2.19.8/storage/src/inst_target_selection.ycp 2009-12-30 11:45:28.000000000 +0100
+++ new/yast2-storage-2.19.9/storage/src/inst_target_selection.ycp 2010-03-18 15:30:00.000000000 +0100
@@ -12,7 +12,7 @@
* "target_is":<devicename> (key to "targets" map)
* if custom, set "target_is":"CUSTOM"
*
- * $Id: inst_target_selection.ycp 60204 2009-12-30 10:46:27Z aschnell $
+ * $Id: inst_target_selection.ycp 61385 2010-03-18 14:06:54Z aschnell $
*/
{
textdomain "storage";
@@ -70,14 +70,16 @@
});
integer dskcnt = size(usable_target_map);
- y2milestone( "dskcnt %1", dskcnt );
+ y2milestone("dskcnt:%1", dskcnt);
- if (dskcnt > 10)
+ if (dskcnt >= 10)
{
integer i = 1;
- list disklist = [];
+ list<term> disklist = [];
foreach(string tname, map tdata, usable_target_map, {
- disklist = add(disklist, `item(`id(tname), sformat("%1: %2", i, tname)));
+ string tlinename = tdata["proposal_name"]:tdata["device"]:"?";
+ string tline = sformat("%1: %2", i, tlinename);
+ disklist = add(disklist, `item(`id(tname), tline));
i = i + 1;
});
buttonbox = add(buttonbox, `SelectionBox(`id(`disklist), `opt(`notify),
@@ -87,14 +89,9 @@
{
integer i = 1;
foreach(string tname, map tdata, usable_target_map, {
- string tlinename = tdata["name"]:"?";
- if (haskey(tdata, "name"))
- tlinename = tdata["proposal_name"]:"?";
- if( tdata["type"]:`CT_UNKNOWN==`CT_DMRAID )
- tlinename = "BIOS RAID " + tdata["name"]:"?";
- string tline = "&" + i + ": " + tlinename;
- boolean sel = Storage::GetPartDisk()==tname &&
- !custom_val;
+ string tlinename = tdata["proposal_name"]:tdata["device"]:"?";
+ string tline = sformat("&%1: %2", i, tlinename);
+ boolean sel = Storage::GetPartDisk() == tname && !custom_val;
buttonbox = add(buttonbox, `Left(`RadioButton(`id(tname), tline, sel)));
i = i + 1;
});
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-storage-2.19.8/storage/src/modules/Storage.ycp new/yast2-storage-2.19.9/storage/src/modules/Storage.ycp
--- old/yast2-storage-2.19.8/storage/src/modules/Storage.ycp 2010-03-16 15:03:23.000000000 +0100
+++ new/yast2-storage-2.19.9/storage/src/modules/Storage.ycp 2010-03-19 11:58:22.000000000 +0100
@@ -19,7 +19,7 @@
* wurde versucht "intelligent" zu gestallten und ist im einzelen bei den
* entspechenden Funktionen n�her erkl�rt.
*
- * $Id: Storage.ycp 61335 2010-03-16 14:03:23Z aschnell $
+ * $Id: Storage.ycp 61401 2010-03-19 10:58:12Z aschnell $
*/
{
module "Storage";
@@ -32,6 +32,7 @@
import "FileUtils";
import "Installation";
import "Label";
+ import "Icon";
import "Mode";
import "Partitions";
import "Popup";
@@ -189,6 +190,7 @@
string part_insts = nil;
+global map ReReadTargetMap();
global boolean IsKernelDeviceName(string device)
{
@@ -803,8 +805,8 @@
}
-boolean GetFreeInfo(string device, boolean get_resize, map& resize_info,
- boolean get_content, map& content_info, boolean use_cache)
+global boolean GetFreeInfo(string device, boolean get_resize, map& resize_info,
+ boolean get_content, map& content_info, boolean use_cache)
{
resize_info = $[];
content_info = $[];
@@ -2842,6 +2844,18 @@
return( ret==0 );
}
+global boolean ActivateCrypt( string device, boolean on )
+ {
+ y2milestone( "ActivateCrypt device:%1 on:%2", device, on );
+ integer ret = 0;
+ ret = LibStorage::StorageInterface::activateEncryption( sint, device, on );
+ if( ret<0 )
+ y2error( "ActivateCrypt ret:%1", ret );
+ else
+ y2milestone( "ActivateCrypt ret:%1", ret );
+ return( ret==0 );
+ }
+
global boolean NeedCryptPwd( string device )
{
boolean ret = false;
@@ -3196,6 +3210,380 @@
return target;
}
+global boolean CheckCryptOk( string dev, string fs_passwd, boolean silent,
+ boolean erase )
+ {
+ integer i = LibStorage::StorageInterface::verifyCryptPassword( sint, dev, fs_passwd, erase );
+ if( i!=0 && !silent )
+ Popup::Error( sformat(_("Could not set encryption.
+System error code is %1.
+
+The crypt password provided could be incorrect.
+"), i ));
+ y2milestone( "CheckCryptOk dev:%1 pwlen:%2 ret:%3",
+ dev, size(fs_passwd), i==0 );
+ return( i==0 );
+ }
+
+global boolean RescanCrypted()
+ {
+ boolean ret = LibStorage::StorageInterface::rescanCryptedObjects( sint );
+ y2milestone( "RescanCrypted ret:%1", ret );
+ return( ret );
+ }
+
+global boolean CheckEncryptionPasswords( string pw1, string pw2,
+ integer min_length,
+ boolean empty_allowed)
+ {
+ if (pw1 != pw2)
+ {
+ // popup text
+ Popup::Message(_("The first and the second version
+of the password do not match.
+Try again."));
+ return false;
+ }
+
+ if (isempty(pw1))
+ {
+ if (!empty_allowed)
+ {
+ // popup text
+ Popup::Message(_("You did not enter a password.
+Try again.
+"));
+ return false;
+ }
+ }
+ else
+ {
+ if (size(pw1) < min_length)
+ {
+ // popup text
+ Popup::Message(sformat(_("The password must have at least %1 characters.
+Try again.
+"), min_length));
+ return false;
+ }
+
+ string allowed_chars = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ#* ,.;:._-+!$%&/|\?{[()]}@^\\<>";
+ if (findfirstnotof(pw1, allowed_chars) != nil)
+ {
+ // popup text
+ Popup::Message(_("The password may only contain the following characters:
+0..9, a..z, A..Z, and any of \"@#* ,.;:._-+!$%&/|\?{[()]}^\\<>\".
+Try again."));
+ return false;
+ }
+ }
+
+ return true;
+ }
+
+global string PasswdPopup( string helptxt, string header, string label,
+ boolean pw2, integer minpwlen, boolean tmpcrypt )
+ {
+ term ad = `Empty();
+ if( pw2 )
+ ad = `VBox(
+ `VSpacing(0.5),
+ `HBox(
+ `Password(`id(`pw2), `opt(`hstretch),
+ // Label: get same password again for verification
+ // Please use newline if label is longer than 40 characters
+ _("Reenter the password for &verification:"), ""),
+ `HSpacing(13))
+ );
+ UI::OpenDialog(
+ `opt(`decorated ),
+ `HBox(
+ `HWeight(3, `RichText( helptxt ) ),
+ `HWeight(6, `VBox(
+ `VSpacing(0.3),
+ `HBox(
+ `HSpacing(1),
+ `Heading(header),
+ `HSpacing(1)
+ ),
+ `VSpacing(1),
+ `HBox(
+ `HSpacing(4),
+ `VBox(
+ // label text
+ `Label(label),
+ `VSpacing(),
+ `HBox(
+ `Password(`id(`pw1), `opt(`hstretch),
+ // Label: get password for encrypted volume
+ // Please use newline if label is longer than 40 characters
+ _("&Enter encryption password:"), ""),
+ `HSpacing(13)),
+ ad),
+ `HSpacing(4)
+ ),
+ `VSpacing(2),
+ `ButtonBox(
+ `PushButton(`id(`ok), `opt(`default), Label::OKButton()),
+ `PushButton(`id(`cancel), Label::CancelButton())
+ ),
+ `VSpacing(0.5)
+ )
+ )
+ ));
+
+ string ret = "";
+ string password = "";
+ symbol widget = nil;
+
+ repeat
+ {
+ // Clear password fields on every round.
+ UI::ChangeWidget(`id(`pw1), `Value, "");
+ if( pw2 )
+ UI::ChangeWidget(`id(`pw2), `Value, "");
+
+ UI::SetFocus(`id(`pw1));
+
+ widget = (symbol) UI::UserInput();
+
+ switch (widget)
+ {
+ case `ok:
+ password = (string) UI::QueryWidget(`id(`pw1), `Value);
+ string tmp = password;
+ if( pw2 )
+ tmp = (string) UI::QueryWidget(`id(`pw2), `Value);
+
+ if (!Storage::CheckEncryptionPasswords( password, tmp,
+ minpwlen, tmpcrypt))
+ widget = `again;
+ else
+ ret = password;
+ break;
+ }
+ } until (widget == `cancel || widget == `ok);
+
+ UI::CloseDialog();
+ if( widget == `ok )
+ ret = password;
+ return( ret );
+ }
+
+
+boolean CryptVolPopup( list<string> dev1, list<string> dev2 )
+ {
+ term button_box = `ButtonBox(
+ `PushButton( `id(`yes), `opt(`okButton), _("Provide Password")),
+ `PushButton( `id(`no_button), `opt(`default, `cancelButton), Label::CancelButton())
+ );
+
+ map display_info = UI::GetDisplayInfo();
+ boolean has_image_support = display_info["HasImageSupport"]:false;
+
+ term ad = `Empty();
+ if( size(dev2)>0 )
+ ad = `VBox(
+ `Left( `Label( _(
+"The following encrypted volumes are already available."))),
+ `Left(`RichText(HTML::List(sort(dev2)))),
+ `VSpacing(0.2)
+ );
+
+ term icon = has_image_support ? `Top (`Image(Icon::IconPath ("question")))
+ : `Empty();
+
+ term layout =
+ `VBox (
+ `VSpacing (0.4),
+ `HBox (
+ icon,
+ `HSpacing (1),
+ `VBox (
+ `Left (`Heading (_("Encrypted Volume Activation"))),
+ `VSpacing(0.2),
+ `Left( `Label( _(
+"The following volumes contain an encryption signature but the
+passwords are not yet known.
+The passwords need to be known if the volumes are needed either
+during an update or if they contain an encrypted LVM physical volume."))),
+ `VSpacing(0.2),
+ `Left(`RichText(HTML::List(sort(dev1)))),
+ `VSpacing(0.2),
+ ad,
+ `Left(`Label( _("Do you want to provide crypt passwords?"))),
+ button_box
+ )
+ )
+ );
+
+ UI::OpenDialog(layout);
+ symbol ret = (symbol) UI::UserInput();
+ UI::CloseDialog();
+ y2milestone( "symbol:%1", ret );
+ return ret == `yes;
+ }
+
+map GetCryptLists( map target )
+ {
+ list<map> ac_cr = [];
+ list<map> in_cr = [];
+ foreach( string k, map m, target,
+ ``{
+ list<map> tmp = filter( map p, m["partitions"]:[],
+ ``(p["enc_type"]:`none==`luks ));
+ in_cr = (list<map>)merge( in_cr,
+ filter( map p, tmp,
+ ``(size(p["crypt_device"]:"")==0)));
+ ac_cr = (list<map>)merge( ac_cr,
+ filter( map p, tmp,
+ ``(size(p["crypt_device"]:"")>0)));
+ });
+ y2milestone( "GetCryptLists inactive:%1", in_cr );
+ y2milestone( "GetCryptLists active:%1", ac_cr );
+ map ret = $[];
+ ret["active"] = maplist( map p, ac_cr, ``(p["device"]:""));
+ ret["inactive"] = maplist( map p, in_cr, ``(p["device"]:""));
+ y2milestone( "ret:%1", ret );
+ return( ret );
+ }
+
+map AskCryptPasswords( map target )
+ {
+ map crvol = GetCryptLists( target );
+ boolean ret = true;
+ // text in help field
+ string helptext = _(
+"Enter encryption password for any of the
+devices in the locked devices list.
+Password will be tried for all devices.");
+ // header text
+ string header = _("Enter Encryption Password");
+
+ while( size(crvol["inactive"]:[])>0 && ret )
+ {
+ ret = CryptVolPopup( crvol["inactive"]:[], crvol["active"]:[] );
+ y2milestone( "ret:%1", ret );
+ if( ret )
+ {
+ // label text, multiple device names follow
+ string label = _("Please provide password for any of the following devices:");
+ if( size(crvol["inactive"]:[])==1 )
+ // label text, one device name follows
+ label = _("Please provide password for the following device:");
+ foreach( string s, crvol["inactive"]:[],
+ ``{
+ label = label + sformat("\n%1", s );
+ });
+ string pw = PasswdPopup( helptext, header, label, false, 1, false );
+ if( size(pw)>0 )
+ {
+ UI::OpenDialog( `opt(`decorated),
+ `VBox(
+ `VSpacing(1),
+ `HBox(`HSpacing(1),
+ `Label(_("Trying to unlock encrypted volumes...")),
+ `HSpacing(1)),
+ `VSpacing(1)));
+ boolean unlock = false;
+ list<string> rl = [];
+ foreach( string d, crvol["inactive"]:[],
+ ``{
+ if( CheckCryptOk( d, pw, true, false ) &&
+ SetCryptPwd( d, pw ) &&
+ SetCrypt( d, true, false ) &&
+ ActivateCrypt( d, true ) )
+ {
+ y2milestone( "AskCryptPasswords activated %1", d );
+ unlock = true;
+ crvol["active"] = add( crvol["active"]:[], d );
+ rl = add( rl, d );
+ }
+ });
+ UI::CloseDialog();
+ if( !unlock )
+ {
+ Popup::Error( _("Password did not unlock any volume."));
+ }
+ else
+ {
+ crvol["inactive"] = filter( string s, crvol["inactive"]:[],
+ ``(!contains(rl,s)));
+ RescanCrypted();
+ }
+ }
+ }
+ }
+ return( target );
+ }
+
+map AddProposalName(map target_map)
+{
+ integer ide_disk_count = 0;
+ integer scsi_disk_count = 0;
+ integer generic_disk_count = 0;
+ integer dm_raid_count = 0;
+ integer md_raid_count = 0;
+
+ return mapmap(string device, map disk, target_map, {
+
+ string s = Storage::KByteToHumanString(disk["size_k"]:0);
+
+ switch (disk["type"]:`CT_UNKNOWN)
+ {
+ case `CT_DISK:
+ {
+ string proposal_name = "";
+
+ string bus = disk["bus"]:"";
+ if (bus == "IDE") {
+ ide_disk_count = ide_disk_count + 1;
+ proposal_name = sformat("%1. ", ide_disk_count) + _("IDE Disk");
+ } else if (bus == "SCSI") {
+ scsi_disk_count = scsi_disk_count + 1;
+ proposal_name = sformat("%1. ", scsi_disk_count) + _("SCSI Disk");
+ } else {
+ generic_disk_count = generic_disk_count + 1;
+ proposal_name = sformat("%1. ", generic_disk_count) + _("Disk");
+ }
+
+ proposal_name = proposal_name + ", " + s + ", " + device + ", ";
+
+ if (!isempty(disk["vendor"]:""))
+ proposal_name = proposal_name + disk["vendor"]:"" + "-";
+ proposal_name = proposal_name + disk["model"]:"";
+
+ disk["proposal_name"] = proposal_name;
+ }
+ break;
+
+ case `CT_DMRAID:
+ {
+ dm_raid_count = dm_raid_count + 1;
+ string proposal_name = sformat("%1. ", dm_raid_count) + _("DM RAID");
+
+ proposal_name = proposal_name + ", " + s + ", " + device;
+
+ disk["proposal_name"] = proposal_name;
+ }
+ break;
+
+ case `CT_MDPART:
+ {
+ md_raid_count = md_raid_count + 1;
+ string proposal_name = sformat("%1. ", md_raid_count) + _("MD RAID");
+
+ proposal_name = proposal_name + ", " + s + ", " + device;
+
+ disk["proposal_name"] = proposal_name;
+ }
+ break;
+ }
+
+ return $[ device : disk ];
+ });
+}
+
/**
* Returns a system target map.
@@ -3270,29 +3658,16 @@
{
probe_done = true;
changed = true;
- foreach( string dev, map disk, tmp,
- ``{
- disk = getDiskInfo( dev, disk );
- integer s = disk["size_k"]:0 * 1024;
- string proposal_name = disk["dname"]:"" +
- Storage::ByteToHumanString( s ) + ", " +
- disk["device"]:"" + ", ";
- if( size( disk["vendor"]:"")>0 )
- proposal_name = proposal_name + disk["vendor"]:"" + "-";
- proposal_name = proposal_name + disk["model"]:"";
- disk["proposal_name"] = proposal_name;
- if( haskey( disk, "dname" ))
- disk = remove( disk, "dname" );
- tmp[dev] = disk;
+ foreach (string dev, map disk, tmp, {
+ tmp[dev] = getDiskInfo(dev, disk);
if( disk["dasdfmt"]:false )
Storage::InitializeDisk( dev, true );
});
- foreach( map c, conts,
- ``{
+ foreach (map c, conts, {
if( c["type"]:`CT_UNKNOWN!=`CT_DISK )
tmp[c["device"]:""] = getContainerInfo( c );
});
- if( size(bios_id_raid)>0 )
+ if (!isempty(bios_id_raid))
{
y2milestone( "bios_id_raid:%1", bios_id_raid );
foreach( string dm, string bios, bios_id_raid, {
@@ -3313,6 +3688,11 @@
});
});
}
+ if (Stage::initial())
+ {
+ tmp = AddProposalName(tmp);
+ AskCryptPasswords( tmp );
+ }
StorageMap[targets_key] = tmp;
}
}
@@ -3333,10 +3713,17 @@
}
map ret = StorageMap[targets_key]:$[];
- if (changed)
- y2milestone("GetTargetMap changed:%1 ret:%2", changed, ret);
+ if( changed )
+ y2milestone("GetTargetMap changed:%1", changed );
else
- y2debug("GetTargetMap changed:%1 ret:%2", changed, ret);
+ y2debug("GetTargetMap changed:%1", changed );
+ foreach( string k, map m, ret,
+ ``{
+ if (changed)
+ y2milestone("GetTargetMap %1:%2", k, m);
+ else
+ y2debug("GetTargetMap %1:%2", k, m);
+ });
return ret;
}
@@ -4237,7 +4624,7 @@
}
if (!isempty(text))
{
- map entry = $[ "device" : device, "text" : text ];
+ map entry = $[ "device" : device, "string" : text ];
y2milestone( "new entry %1", entry );
ret = add(ret, entry);
}
@@ -5328,66 +5715,4 @@
return ret;
}
-
- global boolean CheckEncryptionPasswords(string pw1, string pw2, integer min_length, boolean empty_allowed)
- {
- if (pw1 != pw2)
- {
- // popup text
- Popup::Message(_("The first and the second version
-of the password do not match.
-Try again."));
- return false;
- }
-
- if (isempty(pw1))
- {
- if (!empty_allowed)
- {
- // popup text
- Popup::Message(_("You did not enter a password.
-Try again.
-"));
- return false;
- }
- }
- else
- {
- if (size(pw1) < min_length)
- {
- // popup text
- Popup::Message(sformat(_("The password must have at least %1 characters.
-Try again.
-"), min_length));
- return false;
- }
-
- string allowed_chars = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ#* ,.;:._-+!$%&/|\?{[()]}@^\\<>";
- if (findfirstnotof(pw1, allowed_chars) != nil)
- {
- // popup text
- Popup::Message(_("The password may only contain the following characters:
-0..9, a..z, A..Z, and any of \"@#* ,.;:._-+!$%&/|\?{[()]}^\\<>\".
-Try again."));
- return false;
- }
- }
-
- return true;
- }
-
-global boolean CheckCryptOk( string dev, string fs_passwd )
- {
- integer i = LibStorage::StorageInterface::verifyCryptPassword( sint, dev, fs_passwd );
- if( i!=0 )
- Popup::Error( sformat(_("Could not set encryption.
-System error code is %1.
-
-The crypt password provided could be incorrect.
-"), i ));
- y2milestone( "CheckCryptOk dev:%1 pwlen:%2 ret:%3",
- dev, size(fs_passwd), i==0 );
- return( i==0 );
- }
-
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-storage-2.19.8/storage/src/modules/StorageDevices.ycp new/yast2-storage-2.19.9/storage/src/modules/StorageDevices.ycp
--- old/yast2-storage-2.19.8/storage/src/modules/StorageDevices.ycp 2010-02-03 18:43:03.000000000 +0100
+++ new/yast2-storage-2.19.9/storage/src/modules/StorageDevices.ycp 2010-03-18 16:32:23.000000000 +0100
@@ -14,7 +14,7 @@
* - removable drives (ZIP)
* - floppy devices
*
- * $Id: StorageDevices.ycp 60682 2010-02-03 17:43:02Z aschnell $
+ * $Id: StorageDevices.ycp 61389 2010-03-18 15:32:22Z aschnell $
*
* Author:
* Klaus Kaempf (initial)
@@ -399,7 +399,7 @@
map localProbe()
{
- map targets = $[];
+ map targets = $[];
if( Mode::test () )
{
return fakeProbe();
@@ -414,24 +414,19 @@
{
// somehow, we couldn't find any harddisks for installation.
// This is a fatal error, we can't do anything about it
- return (map) targets;
+ return targets;
}
// loop over all_disks, constructing targets map
- integer ide_count = 0;
- integer scsi_count = 0;
- integer raid_count = 0;
- integer other_count = 0;
- string fake_raid = "";
- map target = $[];
zip_drives = $[];
- foreach (map disk, filter(map e,all_disks,``(size(e["dev_name"]:"")>0)),
- ``{
- target = $[];
+ foreach (map disk, filter(map e, all_disks, ``(!isempty(e["dev_name"]:""))), {
+
y2milestone( "localProbe: disk %1", disk );
+ map target = $[];
+
boolean no_disk = false;
boolean notready = disk["notready"]:false &&
disk["device"]:"" != "DASD";
@@ -444,15 +439,7 @@
if( disk["hotpluggable"]:false )
target["hotpluggable"] = true;
if( disk["softraiddisk"]:false )
- {
target["softraiddisk"] = true;
- if( size(fake_raid)>0 )
- {
- fake_raid = fake_raid + " ";
- }
- fake_raid = fake_raid + disk["dev_name"]:"";
- y2milestone( "localProbe: fake_raid %1", fake_raid );
- }
map res_fc = disk["resource", "fc", 0]:$[];
if (res_fc != $[])
@@ -464,69 +451,22 @@
if( no_disk )
continue;
- string bus = disk["bus"]:"?";
- string dname = "";
- integer i = 0;
-
// write out data for hardware status check
HwStatus::Set (disk["unique_key"]:"", `yes);
target["unique"] = disk["unique_key"]:"";
- // ------------------------------------------------------
- // check bus, count disks per bus
-
- if (bus == "IDE")
- {
- ide_count = ide_count + 1;
- i = ide_count;
- }
- else if (bus == "SCSI")
- {
- scsi_count = scsi_count + 1;
- i = scsi_count;
- }
- else if (bus == "RAID")
- {
- raid_count = raid_count + 1;
- i = raid_count;
- }
- else
- {
- other_count = other_count + 1;
- i = other_count;
- }
-
- target["bus"] = bus;
-
- // ------------------------------------------------------
- // construct disk name for user
-
- dname = ""+i+". ";
- if( bus != "None" )
- {
- dname = dname + bus;
- }
- else
- {
- dname = dname + "Disk";
- }
- dname = dname + ", ";
- target["dname"] = dname;
+ target["bus"] = disk["bus"]:"?";
// needed also later as key
string ddevice = disk["dev_name"]:"";
target["device"] = ddevice;
if( size(disk["bios_id"]:"")>0 )
- {
target["bios_id"] = disk["bios_id"]:"";
- }
y2milestone("localProbe: disk: %1", ddevice );
- // call fdisk agent to get size information
-
// ------------------------------------------------------
// construct full target name
@@ -595,7 +535,7 @@
y2milestone( "localProbe: FloppyDrives %1", FloppyDrives() );
y2milestone( "localProbe: ZipDrives %1", ZipDrives() );
- return (map) targets;
+ return targets;
}
/*
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-storage-2.19.8/storage/src/proposal/partitions_proposal.ycp new/yast2-storage-2.19.9/storage/src/proposal/partitions_proposal.ycp
--- old/yast2-storage-2.19.8/storage/src/proposal/partitions_proposal.ycp 2010-03-09 16:45:12.000000000 +0100
+++ new/yast2-storage-2.19.9/storage/src/proposal/partitions_proposal.ycp 2010-03-19 10:30:29.000000000 +0100
@@ -1,7 +1,7 @@
/**
* Module: proposal_partitions.ycp
*
- * $Id: partitions_proposal.ycp 61023 2010-02-25 12:04:23Z aschnell $
+ * $Id: partitions_proposal.ycp 61400 2010-03-19 09:30:26Z aschnell $
*
* Author: Klaus Kaempf
*
@@ -15,35 +15,49 @@
import "Arch";
import "Wizard";
import "Mode";
- import "Storage";
import "Sequencer";
+ import "Storage";
import "StorageProposal";
+
string func = (string) WFM::Args(0);
map param = (map) WFM::Args(1);
map ret = $[];
y2milestone( "func:%1 param:%2", func, param );
+
// check if /home partition keeps unformatted in order to warn for
- // possible incorrectly set file ownership (fate#306325)
- boolean home_not_formatted() {
- map tm = Storage::GetTargetMap();
- boolean ret = false;
- foreach (string disk, map info, tm, {
- list<map> partitions = info["partitions"]:[];
- foreach (map p, partitions, {
- if (p["mount"]:"" == "/home" && ! p["format"]:false)
- {
- y2milestone ("The /home partition will not be formatted.");
- ret = true;
- break;
- }
- });
- });
- return ret;
+ // possible incorrectly set file ownership (fate #306325)
+ boolean unformatted_home_warning()
+ {
+ map part = Storage::GetEntryForMountpoint("/home");
+ if (!isempty(part) && !part["format"]:false)
+ {
+ y2milestone("/home partition will not be formatted");
+
+ import "UsersSimple";
+ if (UsersSimple::AfterAuth() != "users")
+ {
+ y2milestone("non-local user authentication");
+ return true;
+ }
+
+ string device = part["device"]:"";
+ map resize_info = $[];
+ map content_info = $[];
+ if (Storage::GetFreeInfo(device, false, resize_info, true, content_info, true) &&
+ content_info[`homes]:0 > 1)
+ {
+ y2milestone("multiple home directories");
+ return true;
+ }
+ }
+
+ return false;
}
+
if( func == "MakeProposal" && Mode::autoinst() )
{
ret["preformatted_proposal"] = Storage::ChangeText();
@@ -84,17 +98,13 @@
!Storage::GetPartProposalActive() )
{
ret["preformatted_proposal"] = Storage::ChangeText();
- // detect non-formated /home together with remote authentication - Fate#306325
- if (home_not_formatted())
- {
- import "UsersSimple";
- if (UsersSimple::AfterAuth() != "users")
- {
- ret["warning"] = _("The /home partition will not be formatted. After installation,
-ensure that the permissions to home directories are set properly.");
- ret["warning_level"] = `warning;
- }
- }
+
+ if (unformatted_home_warning())
+ {
+ ret["warning"] = _("The /home partition will not be formatted. After installation,
+ensure that ownerships of home directories are set properly.");
+ ret["warning_level"] = `warning;
+ }
}
else
{
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-storage-2.19.8/storage/src/testsuite/tests/empty1.out new/yast2-storage-2.19.9/storage/src/testsuite/tests/empty1.out
--- old/yast2-storage-2.19.8/storage/src/testsuite/tests/empty1.out 2010-01-15 16:19:17.000000000 +0100
+++ new/yast2-storage-2.19.9/storage/src/testsuite/tests/empty1.out 2010-03-17 16:26:47.000000000 +0100
@@ -1,3 +1,3 @@
Dump Proposal:
-Dump Create swap partition /dev/sda1 (517.72 MB)
-Dump Create root partition /dev/sda2 (297.58 GB) with ext4
+Dump Create swap volume /dev/sda1 (517.72 MB)
+Dump Create root volume /dev/sda2 (297.58 GB) with ext4
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-storage-2.19.8/storage/src/testsuite/tests/empty2.out new/yast2-storage-2.19.9/storage/src/testsuite/tests/empty2.out
--- old/yast2-storage-2.19.8/storage/src/testsuite/tests/empty2.out 2010-01-15 16:19:17.000000000 +0100
+++ new/yast2-storage-2.19.9/storage/src/testsuite/tests/empty2.out 2010-03-17 16:26:47.000000000 +0100
@@ -1,4 +1,4 @@
Dump Proposal:
-Dump Create swap partition /dev/sda1 (2.01 GB)
-Dump Create root partition /dev/sda2 (20.00 GB) with ext4
-Dump Create partition /dev/sda3 (276.08 GB) for /home with ext4
+Dump Create swap volume /dev/sda1 (2.01 GB)
+Dump Create root volume /dev/sda2 (20.00 GB) with ext4
+Dump Create volume /dev/sda3 (276.08 GB) for /home with ext4
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-storage-2.19.8/storage/src/testsuite/tests/empty3.out new/yast2-storage-2.19.9/storage/src/testsuite/tests/empty3.out
--- old/yast2-storage-2.19.8/storage/src/testsuite/tests/empty3.out 2010-01-15 16:19:17.000000000 +0100
+++ new/yast2-storage-2.19.9/storage/src/testsuite/tests/empty3.out 2010-03-17 16:28:09.000000000 +0100
@@ -1,6 +1,6 @@
Dump Proposal:
-Dump Create boot partition /dev/sda1 (70.60 MB) with ext4
-Dump Create partition /dev/sda2 (29.99 GB) with id=8E
+Dump Create boot volume /dev/sda1 (70.60 MB) with ext4
+Dump Create volume /dev/sda2 (29.99 GB)
Dump Create volume group system from /dev/sda2 [destructive]
Dump Create logical volume /dev/system/root (10.00 GB) for / with ext4
Dump Create swap logical volume /dev/system/swap (512.00 MB)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-storage-2.19.8/storage/src/testsuite/tests/empty4.out new/yast2-storage-2.19.9/storage/src/testsuite/tests/empty4.out
--- old/yast2-storage-2.19.8/storage/src/testsuite/tests/empty4.out 2010-01-15 16:19:17.000000000 +0100
+++ new/yast2-storage-2.19.9/storage/src/testsuite/tests/empty4.out 2010-03-17 16:28:02.000000000 +0100
@@ -1,6 +1,6 @@
Dump Proposal:
-Dump Create boot partition /dev/sda1 (70.60 MB) with ext4
-Dump Create partition /dev/sda2 (29.99 GB) with id=8E
+Dump Create boot volume /dev/sda1 (70.60 MB) with ext4
+Dump Create volume /dev/sda2 (29.99 GB)
Dump Create volume group system from /dev/sda2 [destructive]
Dump Create logical volume /dev/system/home (19.49 GB) for /home with ext4
Dump Create logical volume /dev/system/root (10.00 GB) for / with ext4
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-storage-2.19.8/storage/src/testsuite/tests/empty5.out new/yast2-storage-2.19.9/storage/src/testsuite/tests/empty5.out
--- old/yast2-storage-2.19.8/storage/src/testsuite/tests/empty5.out 2010-01-15 16:19:17.000000000 +0100
+++ new/yast2-storage-2.19.9/storage/src/testsuite/tests/empty5.out 2010-03-17 16:27:49.000000000 +0100
@@ -1,6 +1,6 @@
Dump Proposal:
-Dump Create boot partition /dev/sda1 (70.60 MB) with ext4
-Dump Create partition /dev/sda2 (298.02 GB) with id=8E
+Dump Create boot volume /dev/sda1 (70.60 MB) with ext4
+Dump Create volume /dev/sda2 (298.02 GB)
Dump Create volume group system from /dev/sda2 [destructive]
Dump Create logical volume /dev/system/root (10.00 GB) for / with ext4
Dump Create swap logical volume /dev/system/swap (768.00 MB)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-storage-2.19.8/storage/src/testsuite/tests/empty6.out new/yast2-storage-2.19.9/storage/src/testsuite/tests/empty6.out
--- old/yast2-storage-2.19.8/storage/src/testsuite/tests/empty6.out 2010-01-15 16:19:17.000000000 +0100
+++ new/yast2-storage-2.19.9/storage/src/testsuite/tests/empty6.out 2010-03-17 16:27:40.000000000 +0100
@@ -1,6 +1,6 @@
Dump Proposal:
-Dump Create boot partition /dev/sda1 (70.60 MB) with ext4
-Dump Create partition /dev/sda2 (298.02 GB) with id=8E
+Dump Create boot volume /dev/sda1 (70.60 MB) with ext4
+Dump Create volume /dev/sda2 (298.02 GB)
Dump Create volume group system from /dev/sda2 [destructive]
Dump Create logical volume /dev/system/home (25.00 GB) for /home with ext4
Dump Create logical volume /dev/system/root (10.00 GB) for / with ext4
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-storage-2.19.8/storage/src/testsuite/tests/half-empty1.out new/yast2-storage-2.19.9/storage/src/testsuite/tests/half-empty1.out
--- old/yast2-storage-2.19.8/storage/src/testsuite/tests/half-empty1.out 2010-01-15 16:19:17.000000000 +0100
+++ new/yast2-storage-2.19.9/storage/src/testsuite/tests/half-empty1.out 2010-03-17 16:26:47.000000000 +0100
@@ -1,5 +1,5 @@
Dump Proposal:
Dump Create extended partition /dev/sda3 (147.09 GB)
-Dump Create swap partition /dev/sda5 (2.01 GB)
-Dump Create root partition /dev/sda6 (20.00 GB) with ext4
-Dump Create partition /dev/sda7 (125.08 GB) for /home with ext4
+Dump Create swap volume /dev/sda5 (2.01 GB)
+Dump Create root volume /dev/sda6 (20.00 GB) with ext4
+Dump Create volume /dev/sda7 (125.08 GB) for /home with ext4
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-storage-2.19.8/storage/src/testsuite/tests/windows-only1.out new/yast2-storage-2.19.9/storage/src/testsuite/tests/windows-only1.out
--- old/yast2-storage-2.19.8/storage/src/testsuite/tests/windows-only1.out 2010-01-15 16:19:17.000000000 +0100
+++ new/yast2-storage-2.19.9/storage/src/testsuite/tests/windows-only1.out 2010-03-17 16:25:27.000000000 +0100
@@ -1,6 +1,6 @@
Dump Proposal:
Dump Shrink Windows partition /dev/sda1 to 33.21 GB [destructive]
Dump Create extended partition /dev/sda2 (41.32 GB)
-Dump Create swap partition /dev/sda5 (517.72 MB)
-Dump Create root partition /dev/sda6 (16.50 GB) with ext4
-Dump Create partition /dev/sda7 (24.31 GB) for /home with ext4
+Dump Create swap volume /dev/sda5 (517.72 MB)
+Dump Create root volume /dev/sda6 (16.50 GB) with ext4
+Dump Create volume /dev/sda7 (24.31 GB) for /home with ext4
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-storage-2.19.8/storage/src/testsuite/tests/windows1.out new/yast2-storage-2.19.9/storage/src/testsuite/tests/windows1.out
--- old/yast2-storage-2.19.8/storage/src/testsuite/tests/windows1.out 2010-01-15 16:19:17.000000000 +0100
+++ new/yast2-storage-2.19.9/storage/src/testsuite/tests/windows1.out 2010-03-17 16:26:47.000000000 +0100
@@ -1,6 +1,6 @@
Dump Proposal:
Dump Create extended partition /dev/sda2 (34.52 GB)
-Dump Create swap partition /dev/sda5 (517.72 MB)
-Dump Create root partition /dev/sda6 (15.01 GB) with ext4
-Dump Create partition /dev/sda7 (19.01 GB) for /home with ext4
+Dump Create swap volume /dev/sda5 (517.72 MB)
+Dump Create root volume /dev/sda6 (15.01 GB) with ext4
+Dump Create volume /dev/sda7 (19.01 GB) for /home with ext4
Dump Set mount point of /dev/sda1 to /windows/C
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org