]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
Rename mdfind to mdsearch
authorMathieu Parent <math.parent@gmail.com>
Sat, 4 Jul 2020 21:16:40 +0000 (23:16 +0200)
committerRalph Boehme <slow@samba.org>
Mon, 29 Mar 2021 16:18:54 +0000 (16:18 +0000)
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 <math.parent@gmail.com>
Reviewed-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Björn Baumbach <bb@sernet.de>
Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Mon Mar 29 16:18:54 UTC 2021 on sn-devel-184

docs-xml/manpages/mdsearch.1.xml [moved from docs-xml/manpages/mdfind.1.xml with 94% similarity]
docs-xml/wscript_build
python/samba/tests/blackbox/mdsearch.py [moved from python/samba/tests/blackbox/mdfind.py with 93% similarity]
source3/utils/mdsearch.c [moved from source3/utils/mdfind.c with 98% similarity]
source3/utils/wscript_build
source4/selftest/tests.py

similarity index 94%
rename from docs-xml/manpages/mdfind.1.xml
rename to docs-xml/manpages/mdsearch.1.xml
index 0deef06605906a12078bf3fa898d0c36d0c8a267..c75d1f045f0dffec1788dde1780bc5feb3f981f1 100644 (file)
@@ -1,9 +1,9 @@
 <?xml version="1.0" encoding="iso-8859-1"?>
 <!DOCTYPE refentry PUBLIC "-//Samba-Team//DTD DocBook V4.2-Based Variant V1.0//EN" "http://www.samba.org/samba/DTD/samba-doc">
-<refentry id="mdfind.1">
+<refentry id="mdsearch.1">
 
   <refmeta>
-    <refentrytitle>mdfind</refentrytitle>
+    <refentrytitle>mdsearch</refentrytitle>
     <manvolnum>1</manvolnum>
     <refmiscinfo class="source">Samba</refmiscinfo>
     <refmiscinfo class="manual">User Commands</refmiscinfo>
@@ -11,7 +11,7 @@
   </refmeta>
 
   <refnamediv>
-    <refname>mdfind</refname>
+    <refname>mdsearch</refname>
     <refpurpose>Run Spotlight searches against an SMB server</refpurpose>
   </refnamediv>
 
@@ -32,7 +32,7 @@
     <para>This tool is part of the <citerefentry><refentrytitle>samba</refentrytitle>
     <manvolnum>1</manvolnum></citerefentry> suite.</para>
 
-    <para>mdfind is a simple utility to run Spotlight searches against an SMB server
+    <para>mdsearch is a simple utility to run Spotlight searches against an SMB server
     that runs the Spotlight <emphasis>mdssvc</emphasis> RPC service.</para>
   </refsect1>
 
     Andrew Tridgell. Samba is now developed by the Samba Team as an Open
     Source project similar to the way the Linux kernel is developed.</para>
 
-    <para>The mdfind manpage was written by Ralph Boehme.</para>
+    <para>The mdsearch manpage was written by Ralph Boehme.</para>
   </refsect1>
 </refentry>
index dc5f31459e780ef2567d369704391c19d4273c8c..37094147e0b249cfe5efeadd004a34ff1fd40987 100644 (file)
@@ -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
similarity index 93%
rename from python/samba/tests/blackbox/mdfind.py
rename to python/samba/tests/blackbox/mdsearch.py
index 5c1c0c3d1558bd82e83bee4529d1a74dedc533fb..8da5a49e136ec367b7f14787616af218d86baa71 100644 (file)
@@ -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 <http://www.gnu.org/licenses/>.
 #
 
-"""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]
similarity index 98%
rename from source3/utils/mdfind.c
rename to source3/utils/mdsearch.c
index aed7edc293083314153a858878432ca15d802c3c..831f77f431422ed476558f45f4d7e858b70f97ff 100644 (file)
@@ -90,7 +90,7 @@ int main(int argc, char **argv)
                            long_options,
                            POPT_CONTEXT_KEEP_FIRST);
 
-       poptSetOtherOptionHelp(pc, "mdfind [OPTIONS] <server> <share> <query>\n");
+       poptSetOtherOptionHelp(pc, "mdsearch [OPTIONS] <server> <share> <query>\n");
 
        while ((opt = poptGetNextOpt(pc)) != -1) {
                DBG_ERR("Invalid option %s: %s\n",
index a541163141dfd30c72bc6f38f1b45b6472e46897..5ab82660c452a34893ff127d8ed138eba7fa5924 100644 (file)
@@ -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
index 781f1a59fdc49e037f951e4834a22f739b97acda..051f483c5e30e42230be3b61c2ad8e6265884f38 100755 (executable)
@@ -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")