Hello community,
here is the log from the commit of package yast2-samba-client
checked in at Thu Mar 8 20:25:50 CET 2007.
--------
--- yast2-samba-client/yast2-samba-client.changes 2007-01-16 15:30:09.000000000 +0100
+++ /mounts/work_src_done/NOARCH/yast2-samba-client/yast2-samba-client.changes 2007-03-08 11:05:39.590123000 +0100
@@ -1,0 +2,6 @@
+Thu Mar 8 10:47:56 CET 2007 - jsuchome@suse.cz
+
+- added support for DHCP (F120090)
+- 2.15.3
+
+-------------------------------------------------------------------
Old:
----
yast2-samba-client-2.15.2.tar.bz2
New:
----
yast2-samba-client-2.15.3.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2-samba-client.spec ++++++
--- /var/tmp/diff_new_pack.W19775/_old 2007-03-08 20:25:36.000000000 +0100
+++ /var/tmp/diff_new_pack.W19775/_new 2007-03-08 20:25:36.000000000 +0100
@@ -1,5 +1,5 @@
#
-# spec file for package yast2-samba-client (Version 2.15.2)
+# spec file for package yast2-samba-client (Version 2.15.3)
#
# Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
@@ -11,12 +11,12 @@
# norootforbuild
Name: yast2-samba-client
-Version: 2.15.2
+Version: 2.15.3
Release: 1
License: GNU General Public License (GPL)
Group: System/YaST
BuildRoot: %{_tmppath}/%{name}-%{version}-build
-Source0: yast2-samba-client-2.15.2.tar.bz2
+Source0: yast2-samba-client-2.15.3.tar.bz2
prefix: /usr
BuildRequires: perl-XML-Writer update-desktop-files yast2-devtools yast2-pam yast2-perl-bindings yast2-testsuite
Requires: yast2 yast2-kerberos-client
@@ -36,7 +36,7 @@
Stanislav Visnovsky
%prep
-%setup -n yast2-samba-client-2.15.2
+%setup -n yast2-samba-client-2.15.3
%build
%{prefix}/bin/y2tool y2autoconf
@@ -73,7 +73,10 @@
/usr/share/YaST2/schema/autoyast/rnc/samba-client.rnc
%doc %{prefix}/share/doc/packages/yast2-samba-client
-%changelog -n yast2-samba-client
+%changelog
+* Thu Mar 08 2007 - jsuchome@suse.cz
+- added support for DHCP (F120090)
+- 2.15.3
* Tue Jan 16 2007 - jsuchome@suse.cz
- added missing schema file for autoyast (#235316)
- 2.15.2
++++++ yast2-samba-client-2.15.2.tar.bz2 -> yast2-samba-client-2.15.3.tar.bz2 ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-samba-client-2.15.2/src/dialogs.ycp new/yast2-samba-client-2.15.3/src/dialogs.ycp
--- old/yast2-samba-client-2.15.2/src/dialogs.ycp 2006-12-20 14:58:53.000000000 +0100
+++ new/yast2-samba-client-2.15.3/src/dialogs.ycp 2007-02-26 16:14:41.000000000 +0100
@@ -42,6 +42,7 @@
if (gid_min == nil) gid_min = 10000;
integer gid_max = tointeger (l[1]:"20000");
if (gid_max == nil) gid_max = 20000;
+ boolean dhcp_support = Samba::GetDHCP ();
// help text, do not translate 'winbind uid', 'winbind gid'
string help_text = _("Specify the range for Samba user and group IDs (<tt>winbind uid</tt> and <tt>winbind gid</tt> values).");
@@ -67,6 +68,8 @@
`IntField (`id (`gid_max), _("M&aximum"), 0, 99999, gid_max)
)),
`VSpacing (),
+ DHCPSupportTerm (dhcp_support),
+ `VSpacing (),
`HBox (
`PushButton (`id(`ok), Label::OKButton()),
`PushButton (`id(`cancel), Label::CancelButton())
@@ -100,6 +103,7 @@
SambaConfig::GlobalSetStr ("winbind uid", winbind_uid_new);
if (winbind_gid_new != winbind_gid)
SambaConfig::GlobalSetStr ("winbind gid", winbind_gid_new);
+ Samba::SetDHCP ((boolean)UI::QueryWidget (`id (`dhcp), `Value));
break;
}
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-samba-client-2.15.2/src/routines.ycp new/yast2-samba-client-2.15.3/src/routines.ycp
--- old/yast2-samba-client-2.15.2/src/routines.ycp 2006-10-30 13:42:02.000000000 +0100
+++ new/yast2-samba-client-2.15.3/src/routines.ycp 2007-02-26 16:14:26.000000000 +0100
@@ -269,6 +269,17 @@
return Popup::YesNo (_("Other Windows sharing services are available. Stop them as well?"));
}
+
+/**
+ * return the term with DHCP support check box
+ * @param dhcp_support current value of DHCP support in smb.conf
+ */
+define term DHCPSupportTerm (boolean dhcp_support) {
+
+ // check box label
+ return `Left (`CheckBox (`id (`dhcp), _("Retrieve WINS server via &DHCP"), dhcp_support));
+}
+
/**
* return the term with shares settings
* @param settings map with parameters to show in term
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-samba-client-2.15.2/src/SambaConfig.pm new/yast2-samba-client-2.15.3/src/SambaConfig.pm
--- old/yast2-samba-client-2.15.2/src/SambaConfig.pm 2006-12-20 14:58:53.000000000 +0100
+++ new/yast2-samba-client-2.15.3/src/SambaConfig.pm 2007-02-26 15:39:01.000000000 +0100
@@ -562,6 +562,73 @@
return $default;
}
+# get share key values (return a list of values for given key)
+BEGIN{ $TYPEINFO{ShareGetList} = ["function", ["list", "string"], "string", "string", ["list", "string"]]; }
+sub ShareGetList {
+ my ($self, $share, $key, $default) = @_;
+ if (not defined $share) {
+ y2error("undefned share");
+ return undef;
+ }
+ if (not defined $key) {
+ y2error("undefned key");
+ return undef;
+ }
+ $key = lc($key);
+ $key = $Synonyms{$key} if exists $Synonyms{$key};
+ if (exists $InvertedSynonyms{$key}) {
+ $key = $InvertedSynonyms{$key};
+ if (defined $Config{$share}{$key}) {
+ my $val = $Config{$share}{$key};
+ if (ref $val eq "ARRAY") {
+ return $val;
+ }
+ return [$val];
+ }
+ }
+ if (defined $Config{$share}{$key}) {
+ if (ref $Config{$share}{$key} eq "ARRAY") {
+ return $Config{$share}{$key};
+ }
+ else {
+ return [$Config{$share}{$key}];
+ }
+ }
+ return $default;
+}
+
+# set share key values
+# (no check for InvertedSynonyms)
+BEGIN{ $TYPEINFO{ShareSetList} = ["function", "boolean", "string", "string", ["list", "string"]]; }
+sub ShareSetList {
+ my ($self, $share, $key, $val) = @_;
+ if (not defined $share) {
+ y2error("undefned share");
+ return undef;
+ }
+ if (not defined $key) {
+ y2error("undefned key");
+ return undef;
+ }
+ my $modified = 0;
+ $key = lc($key);
+ $key = $Synonyms{$key} if exists $Synonyms{$key};
+ my $old = $Config{$share}{$key};
+ if (defined $val) {
+ if (defined $old && ref ($old) eq "ARRAY" && ref ($val) eq "ARRAY") {
+ return 0 if @$old eq @$val;
+ }
+ $modified = 1;
+ $Config{$share}{$key} = $val;
+ } else {
+ $modified = 1 if defined $old;
+ $Config{$share}{$key} = undef;
+ }
+ $self->ShareSetModified($share) if $modified;
+ y2debug ("ShareSetList($share, $key, ".($val||"<undef>").")") if $modified;
+ return $modified;
+}
+
# add share key value: used when some key is used multiple times
# no checks for InvertedSynonyms, no checking for changes
BEGIN{ $TYPEINFO{ShareAddStr} = ["function", "boolean", "string", "string", "string"]; }
@@ -586,10 +653,11 @@
}
}
push @{$Config{$share}{$key}}, $val;
- return 1;
+ $self->ShareSetModified($share);
+ return 1; # allways modified, since we're always adding
}
-# set share key value, return old value
+# set share key value, return modified boolean
BEGIN{ $TYPEINFO{ShareSetStr} = ["function", "boolean", "string", "string", "string"]; }
sub ShareSetStr {
my ($self, $share, $key, $val) = @_;
@@ -889,6 +957,12 @@
BEGIN{ $TYPEINFO{GlobalSetInteger} = ["function", "boolean", "string", "integer"]; }
sub GlobalSetInteger { return ShareSetInteger(shift, "global", @_); }
+BEGIN{ $TYPEINFO{GlobalGetList} = ["function", ["list", "string"], "string", ["list", "string"]]; }
+sub GlobalGetList { return ShareGetList(shift, "global", @_); }
+
+BEGIN{ $TYPEINFO{GlobalSetList} = ["function", "boolean", "string", ["list", "string"]]; }
+sub GlobalSetList { return ShareSetList(shift, "global", @_); }
+
BEGIN{ $TYPEINFO{GlobalEnable} = ["function", "boolean"]; }
sub GlobalEnable { ShareEnable(shift, "global", @_); }
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-samba-client-2.15.2/src/Samba.ycp new/yast2-samba-client-2.15.3/src/Samba.ycp
--- old/yast2-samba-client-2.15.2/src/Samba.ycp 2007-01-09 16:36:41.000000000 +0100
+++ new/yast2-samba-client-2.15.3/src/Samba.ycp 2007-02-26 15:37:55.000000000 +0100
@@ -79,6 +79,9 @@
// dir with user shares
global string shares_dir = "/var/lib/samba/usershares";
+// path to config file with DHCP settings
+string dhcp_path = "/etc/samba/dhcp.conf";
+
// if existing shares should be removed
global boolean remove_shares = false;
@@ -179,6 +182,35 @@
}
/**
+ * Check if dhcp.conf is included in smb.conf
+ */
+global define boolean GetDHCP () {
+
+ list<string> include_list = SambaConfig::GlobalGetList ("include", []);
+ return contains (include_list, dhcp_path);
+}
+
+/**
+ * Set the support of DHCP (include dhcp.conf in smb.conf)
+ * @return if status was changed
+ */
+global define boolean SetDHCP (boolean new) {
+
+ list<string> include_list = SambaConfig::GlobalGetList ("include", []);
+ if (new && !contains (include_list, dhcp_path))
+ {
+ include_list = (list<string>) union (include_list, [dhcp_path]);
+ }
+ else if (!new && contains (include_list, dhcp_path))
+ {
+ include_list = filter (string i, include_list, ``(i != dhcp_path));
+ }
+ else return false;
+ SambaConfig::GlobalSetList ("include", include_list);
+ return true;
+}
+
+/**
* check if shares guest access is allowed
*/
global define boolean GetGuessAccess () {
@@ -412,7 +444,6 @@
Progress::NextStage();
globals_configured = true;
modified = false;
-
return true;
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-samba-client-2.15.2/VERSION new/yast2-samba-client-2.15.3/VERSION
--- old/yast2-samba-client-2.15.2/VERSION 2007-01-16 14:45:16.000000000 +0100
+++ new/yast2-samba-client-2.15.3/VERSION 2007-03-08 10:49:12.000000000 +0100
@@ -1 +1 @@
-2.15.2
+2.15.3
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org