Hello community,
here is the log from the commit of package yast2-samba-server for
openSUSE:Factory checked in at 2013-09-14 19:09:16
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/yast2-samba-server (Old)
and /work/SRC/openSUSE:Factory/.yast2-samba-server.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "yast2-samba-server"
Changes:
--------
--- /work/SRC/openSUSE:Factory/yast2-samba-server/yast2-samba-server.changes
2013-08-01 11:09:51.000000000 +0200
+++
/work/SRC/openSUSE:Factory/.yast2-samba-server.new/yast2-samba-server.changes
2013-09-14 19:09:17.000000000 +0200
@@ -1,0 +2,13 @@
+Fri Sep 13 16:08:59 CEST 2013 - [email protected]
+
+- check if Share value was changed by Browse button
+- added help text, renamed Snapper checkbox
+- 3.0.2
+
+-------------------------------------------------------------------
+Thu Sep 12 17:11:20 CEST 2013 - [email protected]
+
+- added "Snapper Support" checkbox for shares (fate#313349)
+- 3.0.1
+
+-------------------------------------------------------------------
Old:
----
yast2-samba-server-3.0.0.tar.bz2
New:
----
yast2-samba-server-3.0.2.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2-samba-server.spec ++++++
--- /var/tmp/diff_new_pack.fDMrRG/_old 2013-09-14 19:09:18.000000000 +0200
+++ /var/tmp/diff_new_pack.fDMrRG/_new 2013-09-14 19:09:18.000000000 +0200
@@ -17,7 +17,7 @@
Name: yast2-samba-server
-Version: 3.0.0
+Version: 3.0.2
Release: 0
BuildRoot: %{_tmppath}/%{name}-%{version}-build
@@ -46,8 +46,8 @@
Requires: yast2-ldap-client
Requires: yast2-network
Requires: yast2-perl-bindings
-# Samba::Wins~Name~Resolution
-Requires: yast2-samba-client >= 2.17.1
+# samba-client/routines.rb
+Requires: yast2-samba-client >= 3.0.0
Requires: yast2-users
# bnc #386473, recommend yast2-samba-server when installaing these packages
++++++ yast2-samba-server-3.0.0.tar.bz2 -> yast2-samba-server-3.0.2.tar.bz2
++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/yast2-samba-server-3.0.0/Makefile.am.common
new/yast2-samba-server-3.0.2/Makefile.am.common
--- old/yast2-samba-server-3.0.0/Makefile.am.common 2013-07-31
13:36:34.000000000 +0200
+++ new/yast2-samba-server-3.0.2/Makefile.am.common 2013-09-13
16:52:50.000000000 +0200
@@ -15,6 +15,7 @@
CLEANFILES = ${ybcfiles}
DISTCLEANFILES = .dep
+if HAS_YCP_MODULES
# Needs to be outside "." because of cases
# where ycpchook contains a symlink to "."
# Otherwise "." keeps being newer than .dep and we loop.
@@ -26,14 +27,16 @@
${YCPMAKEDEP} --prefix=${prefix} ${YCPCFLAGS} > ${NEWDEP}
cat ${NEWDEP} > .dep
rm ${NEWDEP}
+-include .dep
+endif
dist-hook: check-syntax
CHECK_SYNTAX = true
-check-syntax: $(client_DATA) $(ycpchook) $(ybcfiles)
- @if test "$(filter %.ycp,client_DATA)"; then \
+check-syntax: $(client_DATA) $(module_DATA) $(ynclude_DATA) $(ydata_DATA)
$(ycpchook) $(ybcfiles)
+ @if test "$(filter %.ycp, $(client_DATA) $(ydata_DATA))"; then \
if $(CHECK_SYNTAX); then \
- TO_CHECK="$(filter %.ycp,$^)"; \
+ TO_CHECK="$(filter %.ycp, $(client_DATA) $(ydata_DATA))"; \
echo "Checking syntax of $${TO_CHECK}"; \
if ! $(YCPC) -qE -M. -I. $(YCPCFLAGS) $${TO_CHECK}; then \
echo "Failed. Disable by 'make ... CHECK_SYNTAX=false' at your
own risk"; \
@@ -43,5 +46,18 @@
echo "Syntax check disabled"; \
fi; \
fi
+ @if test "$(filter %.rb, $^)"; then \
+ if $(CHECK_SYNTAX); then \
+ TO_CHECK="$(filter %.rb, $^)"; \
+ echo "Checking syntax of $${TO_CHECK}"; \
+ for f in $${TO_CHECK}; do \
+ if ! ruby -c $$f > /dev/null; then \
+ echo "Failed. Disable by 'make ... CHECK_SYNTAX=false' at your
own risk"; \
+ exit 1; \
+ fi; \
+ done; \
+ else \
+ echo "Syntax check disabled"; \
+ fi; \
+ fi
--include .dep
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/yast2-samba-server-3.0.0/VERSION
new/yast2-samba-server-3.0.2/VERSION
--- old/yast2-samba-server-3.0.0/VERSION 2013-07-30 13:57:59.000000000
+0200
+++ new/yast2-samba-server-3.0.2/VERSION 2013-09-13 16:46:52.000000000
+0200
@@ -1 +1 @@
-3.0.0
+3.0.2
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/yast2-samba-server-3.0.0/autodocs-ycp.ami
new/yast2-samba-server-3.0.2/autodocs-ycp.ami
--- old/yast2-samba-server-3.0.0/autodocs-ycp.ami 2013-07-31
13:36:34.000000000 +0200
+++ new/yast2-samba-server-3.0.2/autodocs-ycp.ami 2013-09-13
16:52:50.000000000 +0200
@@ -17,8 +17,11 @@
htmldir = $(docdir)/$(AUTODOCS_SUBDIR)/autodocs
+# find all files in Yast/ subdirectory if it exists
+YARD_YAST_FILES = $(shell test -d Yast && find Yast -type f)
+
# use nobase_ prefix to keep the directory structure
-nobase_html_DATA = index.html $(filter-out index.html, $(wildcard *.html))
$(wildcard js/*) $(wildcard css/*) $(wildcard Yast/*)
+nobase_html_DATA = index.html $(filter-out index.html, $(wildcard *.html))
$(wildcard js/*) $(wildcard css/*) $(YARD_YAST_FILES)
CLEANFILES = $(nobase_html_DATA) pod2htm*.tmp
AUTODOCS_YCP ?= $(wildcard $(srcdir)/../../src/*.ycp)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/yast2-samba-server-3.0.0/configure
new/yast2-samba-server-3.0.2/configure
--- old/yast2-samba-server-3.0.0/configure 2013-07-31 13:36:40.000000000
+0200
+++ new/yast2-samba-server-3.0.2/configure 2013-09-13 16:52:53.000000000
+0200
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for yast2-samba-server 3.0.0.
+# Generated by GNU Autoconf 2.69 for yast2-samba-server 3.0.2.
#
# Report bugs to <http://bugs.opensuse.org/>.
#
@@ -579,8 +579,8 @@
# Identity of this package.
PACKAGE_NAME='yast2-samba-server'
PACKAGE_TARNAME='yast2-samba-server'
-PACKAGE_VERSION='3.0.0'
-PACKAGE_STRING='yast2-samba-server 3.0.0'
+PACKAGE_VERSION='3.0.2'
+PACKAGE_STRING='yast2-samba-server 3.0.2'
PACKAGE_BUGREPORT='http://bugs.opensuse.org/'
PACKAGE_URL=''
@@ -588,6 +588,8 @@
ac_default_prefix=/usr
ac_subst_vars='LTLIBOBJS
LIBOBJS
+HAS_YCP_MODULES_FALSE
+HAS_YCP_MODULES_TRUE
YCPC
YCPMAKEDEP
YCPDOC
@@ -1247,7 +1249,7 @@
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures yast2-samba-server 3.0.0 to adapt to many kinds of
systems.
+\`configure' configures yast2-samba-server 3.0.2 to adapt to many kinds of
systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1319,7 +1321,7 @@
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of yast2-samba-server 3.0.0:";;
+ short | recursive ) echo "Configuration of yast2-samba-server 3.0.2:";;
esac
cat <<\_ACEOF
@@ -1399,7 +1401,7 @@
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-yast2-samba-server configure 3.0.0
+yast2-samba-server configure 3.0.2
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
@@ -1416,7 +1418,7 @@
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by yast2-samba-server $as_me 3.0.0, which was
+It was created by yast2-samba-server $as_me 3.0.2, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
@@ -2355,7 +2357,7 @@
# Define the identity of the package.
PACKAGE='yast2-samba-server'
- VERSION='3.0.0'
+ VERSION='3.0.2'
cat >>confdefs.h <<_ACEOF
@@ -2478,7 +2480,7 @@
-VERSION="3.0.0"
+VERSION="3.0.2"
RPMNAME="yast2-samba-server"
MAINTAINER="Jiří Suchomel <[email protected]>"
@@ -2842,6 +2844,29 @@
fi
+# handle .dep files in Makefile.am.common if any YCP module is present
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for YCP modules" >&5
+$as_echo_n "checking for YCP modules... " >&6; }
+
+# YCP module file name starts with an upper case letter
+find . -type f | grep -q "[[:upper:]][^/]*\.ycp$" && has_ycp_modules=1
+ if test -n "$has_ycp_modules"; then
+ HAS_YCP_MODULES_TRUE=
+ HAS_YCP_MODULES_FALSE='#'
+else
+ HAS_YCP_MODULES_TRUE='#'
+ HAS_YCP_MODULES_FALSE=
+fi
+
+
+if test -n "$has_ycp_modules"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5
+$as_echo "found" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+$as_echo "not found" >&6; }
+fi
+
ac_config_files="$ac_config_files Makefile doc/autodocs/Makefile doc/Makefile
src/Makefile testsuite/Modules/Makefile testsuite/YaPI/Makefile
testsuite/Makefile users-plugin/Makefile"
@@ -3007,6 +3032,10 @@
as_fn_error $? "conditional \"CREATE_PKGCONFIG_NOARCH\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
+if test -z "${HAS_YCP_MODULES_TRUE}" && test -z "${HAS_YCP_MODULES_FALSE}";
then
+ as_fn_error $? "conditional \"HAS_YCP_MODULES\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
: "${CONFIG_STATUS=./config.status}"
ac_write_fail=0
@@ -3404,7 +3433,7 @@
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by yast2-samba-server $as_me 3.0.0, which was
+This file was extended by yast2-samba-server $as_me 3.0.2, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -3457,7 +3486,7 @@
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //;
s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-yast2-samba-server config.status 3.0.0
+yast2-samba-server config.status 3.0.2
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/yast2-samba-server-3.0.0/configure.ac
new/yast2-samba-server-3.0.2/configure.ac
--- old/yast2-samba-server-3.0.0/configure.ac 2013-07-31 13:36:34.000000000
+0200
+++ new/yast2-samba-server-3.0.2/configure.ac 2013-09-13 16:52:49.000000000
+0200
@@ -1,9 +1,9 @@
dnl configure.ac for yast2-samba-server
dnl
-dnl -- This file is generated by y2autoconf 2.24.7 - DO NOT EDIT! --
+dnl -- This file is generated by y2autoconf 3.0.5 - DO NOT EDIT! --
dnl (edit configure.ac.in or configure.in.in instead)
-AC_INIT(yast2-samba-server, 3.0.0, http://bugs.opensuse.org/,
yast2-samba-server)
+AC_INIT(yast2-samba-server, 3.0.2, http://bugs.opensuse.org/,
yast2-samba-server)
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="3.0.0"
+VERSION="3.0.2"
RPMNAME="yast2-samba-server"
MAINTAINER="Jiří Suchomel <[email protected]>"
@@ -149,6 +149,19 @@
AC_MSG_WARN([yast2-testsuite.rpm is not installed])
])
+# handle .dep files in Makefile.am.common if any YCP module is present
+AC_MSG_CHECKING([for YCP modules])
+
+# YCP module file name starts with an upper case letter
+[find . -type f | grep -q "[[:upper:]][^/]*\.ycp$" && has_ycp_modules=1]
+AM_CONDITIONAL([HAS_YCP_MODULES], [test -n "$has_ycp_modules"])
+
+if test -n "$has_ycp_modules"; then
+ AC_MSG_RESULT([found])
+else
+ AC_MSG_RESULT([not found])
+fi
+
AC_CONFIG_FILES(Makefile doc/autodocs/Makefile
doc/Makefile
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/yast2-samba-server-3.0.0/doc/autodocs/Makefile.in
new/yast2-samba-server-3.0.2/doc/autodocs/Makefile.in
--- old/yast2-samba-server-3.0.0/doc/autodocs/Makefile.in 2013-07-31
13:36:41.000000000 +0200
+++ new/yast2-samba-server-3.0.2/doc/autodocs/Makefile.in 2013-09-13
16:52:55.000000000 +0200
@@ -235,8 +235,11 @@
yncludedir = @yncludedir@
ystartupdir = @ystartupdir@
+# find all files in Yast/ subdirectory if it exists
+YARD_YAST_FILES = $(shell test -d Yast && find Yast -type f)
+
# use nobase_ prefix to keep the directory structure
-nobase_html_DATA = index.html $(filter-out index.html, $(wildcard *.html))
$(wildcard js/*) $(wildcard css/*) $(wildcard Yast/*)
+nobase_html_DATA = index.html $(filter-out index.html, $(wildcard *.html))
$(wildcard js/*) $(wildcard css/*) $(YARD_YAST_FILES)
CLEANFILES = $(nobase_html_DATA) pod2htm*.tmp
all: all-am
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/yast2-samba-server-3.0.0/src/Makefile.in
new/yast2-samba-server-3.0.2/src/Makefile.in
--- old/yast2-samba-server-3.0.0/src/Makefile.in 2013-07-31
13:36:41.000000000 +0200
+++ new/yast2-samba-server-3.0.2/src/Makefile.in 2013-09-13
16:52:55.000000000 +0200
@@ -281,7 +281,7 @@
# Needs to be outside "." because of cases
# where ycpchook contains a symlink to "."
# Otherwise "." keeps being newer than .dep and we loop.
-NEWDEP = ${top_builddir}/.dep.new
+@HAS_YCP_MODULES_TRUE@NEWDEP = ${top_builddir}/.dep.new
CHECK_SYNTAX = true
all: all-am
@@ -664,16 +664,17 @@
# generate dependencies
# two steps not to lose the file if the command fails
# hook: create the links before we look for files
-.dep: $(wildcard *.ycp) ${ycpchook}
- ${YCPMAKEDEP} --prefix=${prefix} ${YCPCFLAGS} > ${NEWDEP}
- cat ${NEWDEP} > .dep
- rm ${NEWDEP}
+@[email protected]: $(wildcard *.ycp) ${ycpchook}
+@HAS_YCP_MODULES_TRUE@ ${YCPMAKEDEP} --prefix=${prefix} ${YCPCFLAGS} >
${NEWDEP}
+@HAS_YCP_MODULES_TRUE@ cat ${NEWDEP} > .dep
+@HAS_YCP_MODULES_TRUE@ rm ${NEWDEP}
+@HAS_YCP_MODULES_TRUE@-include .dep
dist-hook: check-syntax
-check-syntax: $(client_DATA) $(ycpchook) $(ybcfiles)
- @if test "$(filter %.ycp,client_DATA)"; then \
+check-syntax: $(client_DATA) $(module_DATA) $(ynclude_DATA) $(ydata_DATA)
$(ycpchook) $(ybcfiles)
+ @if test "$(filter %.ycp, $(client_DATA) $(ydata_DATA))"; then \
if $(CHECK_SYNTAX); then \
- TO_CHECK="$(filter %.ycp,$^)"; \
+ TO_CHECK="$(filter %.ycp, $(client_DATA) $(ydata_DATA))"; \
echo "Checking syntax of $${TO_CHECK}"; \
if ! $(YCPC) -qE -M. -I. $(YCPCFLAGS) $${TO_CHECK}; then \
echo "Failed. Disable by 'make ... CHECK_SYNTAX=false' at your
own risk"; \
@@ -683,8 +684,20 @@
echo "Syntax check disabled"; \
fi; \
fi
-
--include .dep
+ @if test "$(filter %.rb, $^)"; then \
+ if $(CHECK_SYNTAX); then \
+ TO_CHECK="$(filter %.rb, $^)"; \
+ echo "Checking syntax of $${TO_CHECK}"; \
+ for f in $${TO_CHECK}; do \
+ if ! ruby -c $$f > /dev/null; then \
+ echo "Failed. Disable by 'make ... CHECK_SYNTAX=false' at your
own risk"; \
+ exit 1; \
+ fi; \
+ done; \
+ else \
+ echo "Syntax check disabled"; \
+ fi; \
+ fi
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/yast2-samba-server-3.0.0/src/include/samba-server/dialogs.rb
new/yast2-samba-server-3.0.2/src/include/samba-server/dialogs.rb
--- old/yast2-samba-server-3.0.0/src/include/samba-server/dialogs.rb
2013-07-30 13:57:59.000000000 +0200
+++ new/yast2-samba-server-3.0.2/src/include/samba-server/dialogs.rb
2013-09-13 16:46:52.000000000 +0200
@@ -81,10 +81,38 @@
@guest_access = false
@autoyast_warning_done = false
+
+ @snapper_available = nil
end
# routines
+ # check if snapper support is available (initial check)
+ def snapper_available?
+ if @snapper_available.nil?
+ @snapper_available =
+ Package.Installed("snapper") &&
+ # check for the presence of Samba's Snapper VFS module
+ 0 == SCR.Execute(path(".target.bash"), "smbd --build-options | grep
vfs_snapper_init")
+ end
+ @snapper_available
+ end
+
+ # check if given path points to btrfs subvolume
+ def subvolume?(path)
+ return false unless path
+ stat = SCR.Read(path(".target.stat"), path)
+
+ # 1. is btrfs subvolume
+ if stat["inode"] == 256 &&
+ # 2. has snapper config
+ 0 == SCR.Execute(path(".target.bash"), "grep 'SUBVOLUME=\"#{path}\"'
/etc/snapper/configs/*")
+ return true
+ else
+ return false
+ end
+ end
+
def sharesItems(filt)
shares = SambaConfig.GetShares
@@ -653,7 +681,7 @@
)
return nil if share == nil
- if ret == :edit
+ if ret == :edit || ret == :table
@shareToEdit = share
return :edit
end
@@ -825,9 +853,7 @@
"caption" => caption,
"back_button" => Label.BackButton,
"next_button" => Label.OKButton,
- "fallback_functions" => {
- :abort => fun_ref(method(:confirmAbort), "boolean ()")
- }
+ "abort_button" => nil
}
)
end
@@ -865,113 +891,117 @@
end
def AddShareDialog
- contents = HVSquash(
- HBox(
- HSpacing(1),
- VBox(
- Opt(:hstretch),
- VSpacing(1),
- Frame(
- _("Identification"),
- VBox(
- InputField(Id(:name), Opt(:hstretch), _("Share &Name")),
- InputField(
- Id(:comment),
- Opt(:hstretch),
- _("Share &Description")
- )
- )
- ),
- Frame(
- _("Share Type"),
+ default_path = "/home"
+
+ contents = HVSquash(HBox(
+ HSpacing(1),
+ VBox(Opt(:hstretch),
+ VSpacing(1),
+ # frame label
+ Frame(_("Identification"), VBox(
+ # text entry label
+ InputField(Id(:name), Opt(:hstretch), _("Share &Name")),
+ # text entry label
+ InputField(Id(:comment), Opt(:hstretch), _("Share &Description"))
+ )),
+ VSpacing(1),
+ # frame label
+ Frame(_("Share Type"), HBox(
+ HSpacing(1),
+ VBox(Opt(:hstretch),
+ RadioButtonGroup(VBox(
+ # radio button label
+ Left(RadioButton(Id(:printer), Opt(:notify), _("&Printer"))),
+ # radio button label
+ Left(RadioButton(Id(:directory), Opt(:notify),
_("&Directory"), true))
+ )),
HBox(
- HSpacing(1),
+ # translators: text entry label
+ InputField(Id(:path), Opt(:notify), _("Share &Path"),
default_path),
VBox(
- Opt(:hstretch),
- RadioButtonGroup(
- VBox(
- Left(
- RadioButton(Id(:printer), Opt(:notify), _("&Printer"))
- ),
- Left(
- RadioButton(
- Id(:directory),
- Opt(:notify),
- _("&Directory"),
- true
- )
- )
- )
- ),
- HBox(
- # translators: text entry label
- TextEntry(Id(:path), _("Share &Path"), "/home"),
- Bottom(PushButton(Id(:browse), Label.BrowseButton))
- ),
- HBox(
- # translators: checkbox label, setting for share
- Left(CheckBox(Id(:read_only), _("&Read-Only"), false)),
- Left(CheckBox(Id(:inherit_acls), _("&Inherit ACLs"), true))
- )
- ),
- HSpacing(1)
- )
- )
- )
+ Label(""),
+ PushButton(Id(:browse), Label.BrowseButton)
+ )
+ ),
+ # translators: checkbox label, setting for share
+ Left(CheckBox(Id(:read_only), _("&Read-Only"), false)),
+ # checkbox label
+ Left(CheckBox(Id(:inherit_acls), _("&Inherit ACLs"), true)),
+ # checkbox label
+ Left(CheckBox(Id(:snapper_support), _("Expose Snapshots"),
false))
+ ),
+ HSpacing(1)
+ ))
)
- )
-
- # translators: dialog caption
- caption = _("New Share")
+ ))
Wizard.SetContentsButtons(
- caption,
+ # translators: dialog caption
+ _("New Share"),
contents,
- Ops.get_string(@HELPS, "add_share", ""),
+ @HELPS["add_share"] || "",
Label.BackButton,
Label.OKButton
)
+ Wizard.HideAbortButton
UI.SetFocus(Id(:name))
+ UI.ChangeWidget(Id(:snapper_support), :Enabled, snapper_available? &&
subvolume?(default_path))
ret = nil
begin
# enable/disable path
- on = Convert.to_boolean(UI.QueryWidget(Id(:directory), :Value))
+ on = UI.QueryWidget(Id(:directory), :Value)
UI.ChangeWidget(Id(:path), :Enabled, on)
UI.ChangeWidget(Id(:browse), :Enabled, on)
UI.ChangeWidget(Id(:read_only), :Enabled, on)
UI.ChangeWidget(Id(:inherit_acls), :Enabled, on)
- ret = Convert.to_symbol(UI.UserInput)
+ ret = UI.UserInput
+
+ if ret == :cancel
+ break if confirmAbort
+ ret = nil
+ next
+ end
if ret == :printer || ret == :directory
ret = nil
next
end
- if ret == :browse
+ pathvalue = UI.QueryWidget(Id(:path), :Value)
+
+ if ret == :path
+ if snapper_available?
+ UI.ChangeWidget(Id(:snapper_support), :Enabled,
subvolume?(pathvalue))
+ end
+ ret = nil
+ elsif ret == :browse
# translators: file selection dialog title
- dir = UI.AskForExistingDirectory(
- Convert.to_string(UI.QueryWidget(Id(:path), :Value)),
- _("Path for a Share")
- )
- UI.ChangeWidget(Id(:path), :Value, dir) if dir != nil
+ dir = UI.AskForExistingDirectory(pathvalue, _("Path for a Share"))
+ if dir
+ UI.ChangeWidget(Id(:path), :Value, dir)
+ if snapper_available?
+ subvolume = subvolume?(dir)
+ UI.ChangeWidget(Id(:snapper_support), :Enabled, subvolume)
+ UI.ChangeWidget(Id(:snapper_support), :Value, false) unless
subvolume
+ end
+ end
ret = nil
elsif ret == :next
# OK was pressed
- name = Convert.to_string(UI.QueryWidget(Id(:name), :Value))
- pathvalue = Convert.to_string(UI.QueryWidget(Id(:path), :Value))
- comment = Convert.to_string(UI.QueryWidget(Id(:comment), :Value))
- printable = Convert.to_boolean(UI.QueryWidget(Id(:printer), :Value))
+ name = UI.QueryWidget(Id(:name), :Value)
+ comment = UI.QueryWidget(Id(:comment), :Value)
+ printable = UI.QueryWidget(Id(:printer), :Value)
- if Builtins.size(name) == 0
+ if name.empty?
# translators: error message
Popup.Error(_("Share name cannot be empty."))
ret = nil
next
- elsif Builtins.size(pathvalue) == 0 && !printable
+ elsif pathvalue.empty? && !printable
# translators: error message
Popup.Error(_("Share path cannot be empty."))
ret = nil
@@ -988,18 +1018,18 @@
res = { "comment" => comment }
if printable
- Ops.set(res, "printable", "Yes")
- Ops.set(res, "path", "/var/tmp")
+ res["printable"] = "Yes"
+ res["path"] = "/var/tmp"
else
- read_only = Convert.to_boolean(
- UI.QueryWidget(Id(:read_only), :Value)
- )
- inherit_acls = Convert.to_boolean(
- UI.QueryWidget(Id(:inherit_acls), :Value)
- )
- Ops.set(res, "read only", read_only ? "Yes" : "No")
- Ops.set(res, "inherit acls", inherit_acls ? "Yes" : "No")
- Ops.set(res, "path", pathvalue)
+ read_only = UI.QueryWidget(Id(:read_only), :Value)
+ inherit_acls = UI.QueryWidget(Id(:inherit_acls), :Value)
+
+ res["read only"] = read_only ? "Yes" : "No"
+ res["inherit acls"] = inherit_acls ? "Yes" : "No"
+ res["path"] = pathvalue
+ if snapper_available? && UI.QueryWidget(Id(:snapper_support),
:Value)
+ res["vfs objects"] = "snapper"
+ end
end
if SambaConfig.ShareExists(name)
@@ -1040,7 +1070,7 @@
# translators: table header texts
Table(
Id(:table),
- Opt(:hvstretch),
+ Opt(:hvstretch,:notify),
Header(
_("Status"),
_("Read-Only"),
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/yast2-samba-server-3.0.0/src/include/samba-server/helps.rb
new/yast2-samba-server-3.0.2/src/include/samba-server/helps.rb
--- old/yast2-samba-server-3.0.0/src/include/samba-server/helps.rb
2013-07-30 13:57:59.000000000 +0200
+++ new/yast2-samba-server-3.0.2/src/include/samba-server/helps.rb
2013-09-13 16:46:52.000000000 +0200
@@ -268,7 +268,10 @@
"<p><b>Inherit ACLS</b> can be used to ensure\n" +
"that if default ACLs exist on parent directories, they are
always\n" +
"honored when creating a subdirectory.</p>\n"
- ),
+ ) +
+ # add new share dialog help
+ _("<p>With <b>Expose Snapshots</b> selected, Samba exposes snapshots
created by Snapper for access and manipulation by CIFS/SMB clients.
+This option is only available if Samba offers Snapper support, and the Share
Path corresponds to a Btrfs backed Snapper configuration subvolume.</p>"),
# help for LDAP Settings dialog
"samba_ldap_setting_auth_widget" => _(
"<p><b><big>LDAP Settings</big></b><br>\n" +
--
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]