From: Mathieu Parent Date: Sat, 4 Jul 2020 21:16:40 +0000 (+0200) Subject: Rename mdfind to mdsearch X-Git-Tag: tevent-0.11.0~1378 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=359c6bd21084b075d3d47f5cec427a5801ac11de;p=thirdparty%2Fsamba.git Rename mdfind to mdsearch GNUstep as an mdfind binary, and both should be co-instalable. BUG: https://bugzilla.samba.org/show_bug.cgi?id=14431 Signed-off-by: Mathieu Parent Reviewed-by: Ralph Boehme Reviewed-by: Björn Baumbach Autobuild-User(master): Ralph Böhme Autobuild-Date(master): Mon Mar 29 16:18:54 UTC 2021 on sn-devel-184 --- diff --git a/docs-xml/manpages/mdfind.1.xml b/docs-xml/manpages/mdsearch.1.xml similarity index 94% rename from docs-xml/manpages/mdfind.1.xml rename to docs-xml/manpages/mdsearch.1.xml index 0deef066059..c75d1f045f0 100644 --- a/docs-xml/manpages/mdfind.1.xml +++ b/docs-xml/manpages/mdsearch.1.xml @@ -1,9 +1,9 @@ - + - mdfind + mdsearch 1 Samba User Commands @@ -11,7 +11,7 @@ - mdfind + mdsearch Run Spotlight searches against an SMB server @@ -32,7 +32,7 @@ This tool is part of the samba 1 suite. - mdfind is a simple utility to run Spotlight searches against an SMB server + mdsearch is a simple utility to run Spotlight searches against an SMB server that runs the Spotlight mdssvc RPC service. @@ -143,6 +143,6 @@ Andrew Tridgell. Samba is now developed by the Samba Team as an Open Source project similar to the way the Linux kernel is developed. - The mdfind manpage was written by Ralph Boehme. + The mdsearch manpage was written by Ralph Boehme. diff --git a/docs-xml/wscript_build b/docs-xml/wscript_build index dc5f31459e7..37094147e0b 100644 --- a/docs-xml/wscript_build +++ b/docs-xml/wscript_build @@ -19,7 +19,7 @@ manpages=''' manpages/libsmbclient.7 manpages/lmhosts.5 manpages/log2pcap.1 - manpages/mdfind.1 + manpages/mdsearch.1 manpages/mvxattr.1 manpages/net.8 manpages/nmbd.8 diff --git a/python/samba/tests/blackbox/mdfind.py b/python/samba/tests/blackbox/mdsearch.py similarity index 93% rename from python/samba/tests/blackbox/mdfind.py rename to python/samba/tests/blackbox/mdsearch.py index 5c1c0c3d155..8da5a49e136 100644 --- a/python/samba/tests/blackbox/mdfind.py +++ b/python/samba/tests/blackbox/mdsearch.py @@ -1,5 +1,5 @@ # -# Blackbox tests for mdfind +# Blackbox tests for mdsearch # # Copyright (C) Ralph Boehme 2019 # @@ -17,7 +17,7 @@ # along with this program. If not, see . # -"""Blackbox test for mdfind""" +"""Blackbox test for mdsearch""" import os import time @@ -95,8 +95,8 @@ class MdfindBlackboxTests(BlackboxTestCase): self.server.server_activate() self.server.serve_forever() - def test_mdfind(self): - """Simple blackbox test for mdfind""" + def test_mdsearch(self): + """Simple blackbox test for mdsearch""" username = os.environ["USERNAME"] password = os.environ["PASSWORD"] @@ -123,7 +123,7 @@ class MdfindBlackboxTests(BlackboxTestCase): self.server.json_in = json_in.replace("%BASEPATH%", self.sharepath) self.server.json_out = json_out.replace("%BASEPATH%", self.sharepath) - output = self.check_output("mdfind -s %s -U %s%%%s fileserver spotlight '*==\"samba*\"'" % (config, username, password)) + output = self.check_output("mdsearch -s %s -U %s%%%s fileserver spotlight '*==\"samba*\"'" % (config, username, password)) actual = output.decode('utf-8').splitlines() expected = ["%s/%s" % (self.sharepath, file) for file in testfiles] diff --git a/source3/utils/mdfind.c b/source3/utils/mdsearch.c similarity index 98% rename from source3/utils/mdfind.c rename to source3/utils/mdsearch.c index aed7edc2930..831f77f4314 100644 --- a/source3/utils/mdfind.c +++ b/source3/utils/mdsearch.c @@ -90,7 +90,7 @@ int main(int argc, char **argv) long_options, POPT_CONTEXT_KEEP_FIRST); - poptSetOtherOptionHelp(pc, "mdfind [OPTIONS] \n"); + poptSetOtherOptionHelp(pc, "mdsearch [OPTIONS] \n"); while ((opt = poptGetNextOpt(pc)) != -1) { DBG_ERR("Invalid option %s: %s\n", diff --git a/source3/utils/wscript_build b/source3/utils/wscript_build index a541163141d..5ab82660c45 100644 --- a/source3/utils/wscript_build +++ b/source3/utils/wscript_build @@ -313,8 +313,8 @@ bld.SAMBA3_BINARY('smbstatus', CONN_TDB ''') -bld.SAMBA3_BINARY('mdfind', - source='mdfind.c', +bld.SAMBA3_BINARY('mdsearch', + source='mdsearch.c', deps=''' talloc tevent diff --git a/source4/selftest/tests.py b/source4/selftest/tests.py index 781f1a59fdc..051f483c5e3 100755 --- a/source4/selftest/tests.py +++ b/source4/selftest/tests.py @@ -959,7 +959,7 @@ planoldpythontestsuite("ad_dc_ntvfs", extra_args=['-U"$USERNAME%$PASSWORD"']) planoldpythontestsuite("none", "samba.tests.loadparm") planoldpythontestsuite("fileserver", - "samba.tests.blackbox.mdfind", + "samba.tests.blackbox.mdsearch", extra_args=['-U"$USERNAME%$PASSWORD"']) planoldpythontestsuite("fileserver", "samba.tests.blackbox.smbcacls_basic")