The Samba-Bugzilla – Attachment 13695 Details for
Bug 13081
smb.conf has parameter descriptions in non-alphabetical order
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
propsed patch forv v4.7
ab-samba-v4.7-docs-sort-items-smb.conf.patch (text/plain), 2.02 KB, created by
Alexander Bokovoy
on 2017-10-16 14:11:42 UTC
(
hide
)
Description:
propsed patch forv v4.7
Filename:
MIME Type:
Creator:
Alexander Bokovoy
Created:
2017-10-16 14:11:42 UTC
Size:
2.02 KB
patch
obsolete
>From 41d55faaebc78465f2910ba3ed1acb7f3d070bd7 Mon Sep 17 00:00:00 2001 >From: Alexander Bokovoy <ab@samba.org> >Date: Fri, 6 Oct 2017 22:49:11 +0300 >Subject: [PATCH 1/2] smb.conf.5: sort parameters alphabetically > >Content of each separate parameter description file is added >into a parameters.all.xml file before compiling smb.conf.5. > >The issue is that POSIX file systems generally don't give any >promises over how glob-produced files are sorted. Thus, we need to sort >them in a predictable way. > >This patch adds sorting based on a file name as a string. Since all >parameter files named after the parameter itself (plus .xml), we can >use file name sorting. > >BUG: https://bugzilla.samba.org/show_bug.cgi?id=13081 > >Signed-off-by: Alexander Bokovoy <ab@samba.org> >Reviewed-By: Andreas Schneider <asn@samba.org> >Reviewed-by: Andrew Bartlett <abartlet@samba.org> >(cherry picked from commit 543c0af4767f5be723594b87d078357e1e04f02e) >--- > docs-xml/wscript_build | 9 ++++++++- > 1 file changed, 8 insertions(+), 1 deletion(-) > >diff --git a/docs-xml/wscript_build b/docs-xml/wscript_build >index cbc09a56559..eb25aa0a46a 100644 >--- a/docs-xml/wscript_build >+++ b/docs-xml/wscript_build >@@ -1,5 +1,6 @@ > #!/usr/bin/env python > from samba_utils import save_file >+import os > manpages=''' > manpages/cifsdd.8 > manpages/dbwrap_tool.1 >@@ -129,7 +130,13 @@ def smbdotconf_generate_parameter_list(task): > save_file(parameter_all, t , create_dir=True) > return 0 > >-articles = bld.path.ant_glob("smbdotconf/**/*.xml", flat=True) >+# Since nothing really forces sorting in glob, we have to sort by file name >+# POSIX file systems aren't required to return sorted content but we want >+# smb.conf parameters to be sorted alphabetically >+sources = bld.path.ant_glob("smbdotconf/**/*.xml", flat=False) >+articles = " ".join(sorted([x.relpath_gen(bld.path) for x in sources], >+ key=lambda m: m.split(os.sep)[-1])) >+ > parameter_all = 'smbdotconf/parameters.all.xml' > bld.SAMBA_GENERATOR(parameter_all, > source=articles, >-- >2.13.6 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Flags:
asn
:
review+
Actions:
View
Attachments on
bug 13081
: 13695