Hello community,
here is the log from the commit of package yast2-nfs-client for openSUSE:Factory checked in at 2012-02-20 16:20:04
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/yast2-nfs-client (Old)
and /work/SRC/openSUSE:Factory/.yast2-nfs-client.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "yast2-nfs-client", Maintainer is "mvidner@suse.com"
Changes:
--------
--- /work/SRC/openSUSE:Factory/yast2-nfs-client/yast2-nfs-client.changes 2012-02-16 16:25:11.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.yast2-nfs-client.new/yast2-nfs-client.changes 2012-02-20 16:20:06.000000000 +0100
@@ -1,0 +2,12 @@
+Fri Feb 17 13:14:44 UTC 2012 - mfilka@suse.com
+
+- IPv6 addresses supported - bnc#719538
+- updated testsuite
+- 2.21.5
+
+-------------------------------------------------------------------
+Thu Feb 16 13:16:18 UTC 2012 - mfilka@suse.com
+
+- removed some dead code, whitespaces
+
+-------------------------------------------------------------------
Old:
----
yast2-nfs-client-2.21.4.tar.bz2
New:
----
yast2-nfs-client-2.21.5.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2-nfs-client.spec ++++++
--- /var/tmp/diff_new_pack.rFqgMs/_old 2012-02-20 16:20:07.000000000 +0100
+++ /var/tmp/diff_new_pack.rFqgMs/_new 2012-02-20 16:20:07.000000000 +0100
@@ -19,7 +19,7 @@
Name: yast2-nfs-client
-Version: 2.21.4
+Version: 2.21.5
Release: 0
BuildRoot: %{_tmppath}/%{name}-%{version}-build
++++++ yast2-nfs-client-2.21.4.tar.bz2 -> yast2-nfs-client-2.21.5.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-nfs-client-2.21.4/VERSION new/yast2-nfs-client-2.21.5/VERSION
--- old/yast2-nfs-client-2.21.4/VERSION 2012-02-16 13:45:15.000000000 +0100
+++ new/yast2-nfs-client-2.21.5/VERSION 2012-02-17 09:40:41.000000000 +0100
@@ -1 +1 @@
-2.21.4
+2.21.5
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-nfs-client-2.21.4/src/Nfs.ycp new/yast2-nfs-client-2.21.5/src/Nfs.ycp
--- old/yast2-nfs-client-2.21.4/src/Nfs.ycp 2012-02-16 13:47:55.000000000 +0100
+++ new/yast2-nfs-client-2.21.5/src/Nfs.ycp 2012-02-16 14:22:26.000000000 +0100
@@ -13,7 +13,7 @@
* Dan Vesely
* Martin Vidner
*
- * $Id: Nfs.ycp 67463 2012-02-16 12:47:25Z mfilka $
+ * $Id: Nfs.ycp 67465 2012-02-16 13:22:19Z mfilka $
*/
{
@@ -82,7 +82,7 @@
list<string> created_dirs = [];
boolean ReadNfs4 () {
- return (SCR::Read(.sysconfig.nfs.NFS4_SUPPORT)=="yes");
+ return (SCR::Read(.sysconfig.nfs.NFS4_SUPPORT)=="yes");
}
string ReadIdmapd() {
@@ -375,11 +375,6 @@
return false;
}
-/* if (size (nfs_entries) == 0)
- {
- // Service::Adjust ("nfs", "disable"); // what if autofs needs it?
- }*/
-
portmapper = FindPortmapper();
if (size (nfs_entries) != 0)
{
@@ -636,8 +631,8 @@
return true;
}
- /**
- * Return required packages for auto-installation
+ /**
+ * Return required packages for auto-installation
* @return map of packages to be installed and to be removed
*/
global define map AutoPackages() ``{
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-nfs-client-2.21.4/src/routines.ycp new/yast2-nfs-client-2.21.5/src/routines.ycp
--- old/yast2-nfs-client-2.21.4/src/routines.ycp 2012-02-06 08:04:39.000000000 +0100
+++ new/yast2-nfs-client-2.21.5/src/routines.ycp 2012-02-17 14:18:58.000000000 +0100
@@ -12,7 +12,7 @@
* Jan Holesovsky
* Dan Vesely
*
- * $Id: routines.ycp 51341 2008-09-19 16:44:21Z kmachalkova $
+ * $Id: routines.ycp 67469 2012-02-17 13:18:54Z mfilka $
*
* Network NFS routines
*
@@ -23,17 +23,29 @@
import "Package";
import "Report";
+ import "IP";
+ import "String";
/**
* @param spec "server:/path/specification"
* @return `couple("server", "/path/specification")
*/
define term SpecToServPath(string spec) ``{
- integer colonpos = findfirstof(spec, ":");
+ // split using ":/" (because of IPv6)
+ integer path_begin = search( spec, ":/");
string serv = "";
- if (colonpos != nil) {
- serv = substring(spec, 0, colonpos);
- spec = substring(spec, colonpos+1);
+
+ // no :/ inside => <server>: or [/]<path>
+ if( path_begin == nil )
+ {
+ if(spec == filterchars(spec, "-_." + String::CAlnum() ) + ":")
+ // matches [a-zA-Z0-1.-_] and ends with colon? => <server>:
+ path_begin = size( spec) -1;
+ }
+
+ if (path_begin != nil) {
+ serv = substring(spec, 0, path_begin);
+ spec = substring(spec, path_begin+1);
}
return `couple(serv, spec);
}
@@ -68,16 +80,22 @@
* @return whether valid
*/
define boolean CheckHostName(string name) ``{
+ string dirname_forbidden = ":";
+
if (size(name) > 0 &&
size(name) < 50 &&
- name == filterchars(name,
- "-_.0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz")) {
+ name == filterchars(name, "-_.:" + String::CAlnum() )) {
+ if( IP::Check( name))
+ return true;
+ if( "" != filterchars( name, dirname_forbidden))
+ return false;
+
return true;
} else
// error popup message
Report::Error (sformat(_("The hostname entered is invalid. It must be
shorter than 50 characters and only use
-0-9, A-Z, a-z, dots, -, and _.")));
+0-9, A-Z, a-z, dots, -, and _.:")));
return false;
};
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-nfs-client-2.21.4/src/ui.ycp new/yast2-nfs-client-2.21.5/src/ui.ycp
--- old/yast2-nfs-client-2.21.4/src/ui.ycp 2012-02-16 13:43:18.000000000 +0100
+++ new/yast2-nfs-client-2.21.5/src/ui.ycp 2012-02-16 14:22:26.000000000 +0100
@@ -13,7 +13,7 @@
* Dan Vesely
* Martin Vidner
*
- * $Id: ui.ycp 67462 2012-02-16 12:43:13Z mfilka $
+ * $Id: ui.ycp 67465 2012-02-16 13:22:19Z mfilka $
*
* Network NFS client dialogs
*
@@ -129,7 +129,7 @@
/* Return convenient hostname (FaTE #302863) to be proposed
* i.e. nfs + current domain (nfs. + suse.cz)
- * @return string proposed hostname
+ * @return string proposed hostname
*/
define string ProposeHostname() {
string ret = "";
@@ -586,7 +586,7 @@
EnableDisableButtons();
}
-
+
void InitSettings( )
{
CWMFirewallInterfaces::OpenFirewallInit (fw_cwm_widget, "");
@@ -594,16 +594,16 @@
UI::ChangeWidget( `id(`nfs4_domain), `Enabled, Nfs::nfs4_enabled != false);
UI::ChangeWidget(`id(`nfs4_domain), `Value, Nfs::idmapd_domain);
}
-
+
void SaveFstabEntries( )
{
Nfs::nfs_entries = nfs_entries;
}
-
+
void SaveSettings( map event )
{
CWMFirewallInterfaces::OpenFirewallStore (fw_cwm_widget, "", event);
- Nfs::nfs4_enabled = (boolean) UI::QueryWidget(`id(`enable_nfs4),`Value);
+ Nfs::nfs4_enabled = (boolean) UI::QueryWidget(`id(`enable_nfs4),`Value);
Nfs::idmapd_domain = (string) UI::QueryWidget(`id(`nfs4_domain),`Value);
}
@@ -613,9 +613,6 @@
// handle the events, enable/disable the button, show the popup if button clicked
if ( UI::WidgetExists(`id("_cwm_firewall_details")) && UI::WidgetExists(`id("_cwm_open_firewall")) )
CWMFirewallInterfaces::OpenFirewallHandle (fw_cwm_widget, "", $[ "ID" : widget ]);
- /*changed =
- true || // TODO: fw changed, #44106
- true; // TODO: nfs changed*/
if ( UI::WidgetExists(`id(`fstable)) )
entryno = (integer) UI::QueryWidget(`id(`fstable), `CurrentItem);
@@ -719,7 +716,7 @@
do
{
- event = UI::WaitForEvent ();
+ event = UI::WaitForEvent ();
ret = event["ID"]:nil;
if (ret == `ok)
{
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-nfs-client-2.21.4/testsuite/tests/r-check.out new/yast2-nfs-client-2.21.5/testsuite/tests/r-check.out
--- old/yast2-nfs-client-2.21.4/testsuite/tests/r-check.out 2012-02-06 08:04:39.000000000 +0100
+++ new/yast2-nfs-client-2.21.5/testsuite/tests/r-check.out 2012-02-17 10:29:33.000000000 +0100
@@ -14,3 +14,6 @@
Return false
Return false
Return false
+Return true
+Return false
+Return true
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-nfs-client-2.21.4/testsuite/tests/r-check.ycp new/yast2-nfs-client-2.21.5/testsuite/tests/r-check.ycp
--- old/yast2-nfs-client-2.21.4/testsuite/tests/r-check.ycp 2012-02-06 08:04:39.000000000 +0100
+++ new/yast2-nfs-client-2.21.5/testsuite/tests/r-check.ycp 2012-02-17 14:18:58.000000000 +0100
@@ -8,7 +8,7 @@
* Authors:
* Martin Vidner
*
- * $Id: r-check.ycp 17937 2004-06-21 08:59:23Z mvidner $
+ * $Id: r-check.ycp 67469 2012-02-17 13:18:54Z mfilka $
*/
{
// testedfiles: routines.ycp Testsuite.ycp
@@ -19,6 +19,9 @@
string OK_Name = "foo.bar.com.tw";
string TooLongName = "123456789012345678901234567890123456789012345678901234567890";
string IllegalName = "Something:wrong";
+ string IPv4 = "192.168.10.1";
+ string IPv4_invalid= "192.168.10:1";
+ string IPv6 = "fe80::219:d1ff:feac:fd10";
DUMP ("check_options");
TEST (``(check_options ("")), [], nil);
@@ -37,5 +40,9 @@
TEST (``(CheckHostName (TooLongName)), [], nil);
TEST (``(CheckHostName (IllegalName)), [], nil);
// Too long & illegal char
- TEST (``(CheckHostName (TooLongName + ":")), [], nil);
+ TEST (``(CheckHostName (TooLongName + "!")), [], nil);
+ // check IPv? adresses
+ TEST (``(CheckHostName (IPv4)), [], nil);
+ TEST (``(CheckHostName (IPv4_invalid)), [], nil);
+ TEST (``(CheckHostName (IPv6)), [], nil);
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-nfs-client-2.21.4/testsuite/tests/r-spec.out new/yast2-nfs-client-2.21.5/testsuite/tests/r-spec.out
--- old/yast2-nfs-client-2.21.4/testsuite/tests/r-spec.out 2012-02-06 08:04:39.000000000 +0100
+++ new/yast2-nfs-client-2.21.5/testsuite/tests/r-spec.out 2012-02-17 10:16:13.000000000 +0100
@@ -4,5 +4,5 @@
Return `couple ("", "nocolon.only.server.com")
Return `couple ("", "/only/path")
Return `couple ("", "/nocolon/only/path")
-Return `couple ("two", "colons:used")
+Return `couple ("fe80::219:d1ff:feac:fd10", "/path")
Return `couple ("", "")
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-nfs-client-2.21.4/testsuite/tests/r-spec.ycp new/yast2-nfs-client-2.21.5/testsuite/tests/r-spec.ycp
--- old/yast2-nfs-client-2.21.4/testsuite/tests/r-spec.ycp 2012-02-06 08:04:39.000000000 +0100
+++ new/yast2-nfs-client-2.21.5/testsuite/tests/r-spec.ycp 2012-02-17 14:18:58.000000000 +0100
@@ -8,7 +8,7 @@
* Authors:
* Martin Vidner
*
- * $Id: r-spec.ycp 17937 2004-06-21 08:59:23Z mvidner $
+ * $Id: r-spec.ycp 67469 2012-02-17 13:18:54Z mfilka $
*/
{
// testedfiles: routines.ycp Testsuite.ycp
@@ -22,6 +22,6 @@
TEST (``(SpecToServPath ("nocolon.only.server.com")), [], nil);
TEST (``(SpecToServPath (":/only/path")), [], nil);
TEST (``(SpecToServPath ("/nocolon/only/path")), [], nil);
- TEST (``(SpecToServPath ("two:colons:used")), [], nil);
+ TEST (``(SpecToServPath ("fe80::219:d1ff:feac:fd10:/path")), [], nil);
TEST (``(SpecToServPath ("")), [], nil);
}
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org