Skip to content

Commit

Permalink
Merge pull request #13 from mvidner/master
Browse files Browse the repository at this point in the history
Merge the SLE11-SP3 branch to Factory
  • Loading branch information
mvidner committed Sep 13, 2013
2 parents 84fe94c + 700a1ba commit 34cc8d8
Show file tree
Hide file tree
Showing 30 changed files with 826 additions and 333 deletions.
24 changes: 0 additions & 24 deletions .cvsignore

This file was deleted.

19 changes: 19 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# autotools
Makefile
Makefile.in
aclocal.m4
autom4te.cache/
config.guess
config.log
config.status
config.sub
configure
install-sh
missing
# devtools
.dep
*.ami
/Makefile.am
/Makefile.am.common
configure.in
doc/autodocs/*.html
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.0.0
3.0.1
2 changes: 0 additions & 2 deletions agents/.cvsignore

This file was deleted.

5 changes: 0 additions & 5 deletions agents/Makefile.am

This file was deleted.

2 changes: 0 additions & 2 deletions doc/.cvsignore

This file was deleted.

3 changes: 0 additions & 3 deletions doc/autodocs/.cvsignore

This file was deleted.

2 changes: 2 additions & 0 deletions doc/autodocs/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# Makefile.am for YCP module .../doc/autodocs

AUTODOCS_YCP = $(wildcard $(top_srcdir)/src/*/*.ycp $(top_srcdir)/src/*/*/*.ycp)
AUTODOCS_STRIP = $(top_srcdir)/src
include $(top_srcdir)/autodocs-ycp.ami
2 changes: 0 additions & 2 deletions package/.cvsignore

This file was deleted.

19 changes: 19 additions & 0 deletions package/yast2-nfs-client.changes
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
-------------------------------------------------------------------
Fri Sep 13 12:18:03 UTC 2013 - mvidner@suse.com

- merged changes from SLE11-SP3
- refactored the last change following a late review
(FATE#312242, bnc#820989)
- AutoYaST: fix to allow NFS4 options (FATE#312242, bnc#457981)
- added option for enabling NFS4 GSS (FATE#312242, bnc#681190)
- Added minorversion=1 for pNFS, NFS4.1 (FATE#312259).
- enable compiling, testing, packaging from the WC (bnc#790490)
- merged changelogs from SLE-SP3 for changes
that already are in this branch
- fix enablement of NFSv4 in autoyast (bnc#684859)
- allow to set version of nfs on command line and also fix passing
default value (bnc#681275)
- Consistent setting of widget focus esp. when embedded in partitioner
(bnc#435992)
- 3.0.1

-------------------------------------------------------------------
Wed Jul 31 08:33:54 UTC 2013 - yast-devel@opensuse.org

Expand Down
4 changes: 0 additions & 4 deletions src/.cvsignore

This file was deleted.

3 changes: 2 additions & 1 deletion src/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Sources for nfs-client

module_DATA = \
modules/NfsOptions.rb \
modules/Nfs.rb

client_DATA = \
Expand All @@ -24,4 +25,4 @@ desktop_DATA = \

EXTRA_DIST = $(module_DATA) $(client_DATA) $(ynclude_DATA) $(schemafiles_DATA) $(desktop_DATA)

include $(top_srcdir)/Makefile.am.common
include $(top_srcdir)/Makefile.am.common
60 changes: 54 additions & 6 deletions src/autoyast-rnc/nfs.rnc
Original file line number Diff line number Diff line change
@@ -1,14 +1,62 @@
nfs =
# It is complicated.

nfs_entry_content = (
element server_path { text }
& element mount_point { text }
& element vfstype {text}?
& element nfs_options { text }
)

# SLE11-SP2 and earlier, openSUSE 11.2 and earlier:
# A list of entries
# (This definition is unused below but provided for historical context)
nfs_sle11_sp2 =
element nfs {
LIST,
element nfs_entry {
nfs_entry_content
}*
}

# openSUSE 11.3-12.3 (since yast2-nfs-client-2.19.1, openSUSE-11.3, 2010):
# Switched to a map so that we can have global options

nfs_global_options_content = (
element enable_nfs4 { BOOLEAN }? &
element idmapd_domain { text }? &
element enable_nfs_gss { BOOLEAN }? &
element idmapd_domain { text }?
)

nfs_os113_123 =
element nfs {
nfs_global_options_content,
element nfs_entries {
LIST,
element nfs_entry {
element server_path { text }
& element mount_point { text }
& element vfstype {text}?
& element nfs_options { text }
nfs_entry_content
}*
}

# Now we want to port the options to SLE11-SP3.
# But the AutoYaST core does not allow switching a list to a map!
# bnc#820989

# SLE11-SP3:
# a list, like in SLE11-SP2, but
# with an optional first entry which carries the global options
nfs_sle11_sp3 =
element nfs {
LIST,
element nfs_entry {
nfs_global_options_content
}? ,
element nfs_entry {
nfs_entry_content
}*
}

# openSUSE-13.1:
# Merge: allow all formats
# Well, on this layer only. The AY core still allows a map only.
# Needs to be fixed there.
nfs = nfs_os113_123 | nfs_sle11_sp3
5 changes: 3 additions & 2 deletions src/clients/nfs.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ def main
Builtins.y2milestone("NFS module started")

Yast.import "Nfs"
Yast.import "NfsOptions"
Yast.import "Progress"
Yast.import "Report"
Yast.import "String"
Expand Down Expand Up @@ -207,7 +208,7 @@ def NfsAddHandler(options)
Ops.set(options, "mntops", "defaults")
end

options_error = check_options(Ops.get_string(options, "mntops", ""))
options_error = NfsOptions.validate(Ops.get_string(options, "mntops", ""))
if Ops.greater_than(Builtins.size(options_error), 0)
Report.Error(options_error)
return false
Expand Down Expand Up @@ -317,7 +318,7 @@ def NfsEditHandler(options)
return false
end

options_error = check_options(Ops.get_string(entry, "mntops", ""))
options_error = NfsOptions.validate(Ops.get_string(entry, "mntops", ""))
if Ops.greater_than(Builtins.size(options_error), 0)
Report.Error(options_error)
return false
Expand Down
135 changes: 0 additions & 135 deletions src/include/nfs/routines.rb
Original file line number Diff line number Diff line change
Expand Up @@ -162,141 +162,6 @@ def CheckPath(name)
false
end

# Checks the nfs options for /etc/fstab:
# nonempty, comma separated list of foo,nofoo,bar=baz (see nfs(5))
# @param [String] options options
# @return a translated string with error message, emtpy string if ok
def check_options(options)
# To translators: error popup
if Builtins.size(options) == 0
return _("Empty option strings are not allowed.")
end
return "" if options == "defaults"


option_list = Builtins.splitstring(options, ",")

#the options must be easy to sync with mount.c and nfsmount.c

# these can be negated by "no"
non_value = [
"bg",
"fg",
"soft",
"hard",
"intr",
"posix",
"cto",
"ac",
"acl",
"lock",
"tcp",
"udp",
"rdirplus",
"sharecache",
"resvport",
"fsc",
# these are common for all fs types
"atime",
"auto",
"dev",
"exec",
"group",
"owner",
"suid",
"user",
"users",
"sub",
"mand",
"loop",
"diratime",
"relatime",
"quota"
]
# these cannot be negated
# they are not nfs specific BTW
non_value1 = [
"defaults",
"async",
"sync",
"dirsync",
"ro",
"rw",
"remount",
"bind",
"rbind",
"_netdev",
"nofail",
"rdma",
"quiet",
"loud",
"usrquota",
"grpquota"
]
with_value = [
"rsize",
"wsize",
"timeo",
"retrans",
"acregmin",
"acregmax",
"acdirmin",
"acdirmax",
"actimeo",
"retry",
"namlen",
"port",
"proto",
"clientaddr",
"mountport",
"mountproto",
"mounthost",
"mountprog",
"mountvers",
"nfsprog",
"nfsvers",
"vers",
"sec",
"comment",
"lookupcache",
"local_lock"
]
i = 0
current_option = ""

# first fiter out non value options and its nooptions forms (see nfs(5))
option_list = Builtins.filter(option_list) do |e|
!Builtins.contains(non_value, e)
end
non_value = Builtins.maplist(non_value) { |e| Builtins.sformat("no%1", e) }
option_list = Builtins.filter(option_list) do |e|
!Builtins.contains(non_value, e)
end
option_list = Builtins.filter(option_list) do |e|
!Builtins.contains(non_value1, e)
end

while Ops.less_than(i, Builtins.size(option_list))
opt = Ops.get(option_list, i, "")
value = Builtins.splitstring(opt, "=")
v0 = Ops.get(value, 0, "")
v1 = Ops.get(value, 1, "")
# FIXME: this also triggers for "intr=bogus"
# To translators: error popup
if !Builtins.contains(with_value, v0)
return Builtins.sformat(_("Unknown option: %1"), v0)
end
# To translators: error popup
if Builtins.size(value) != 2
return Builtins.sformat(_("Invalid option: %1"), opt)
end
# To translators: error popup
return Builtins.sformat(_("Empty value for option: %1"), v0) if v1 == ""
i = Ops.add(i, 1)
end

""
end

# Strips a superfluous slash off the end of a pathname.
# @param [String] p pathname
Expand Down

0 comments on commit 34cc8d8

Please sign in to comment.