completely up to the client to resolve them, resulting in links that
point somewhere inside the clients filesystem view.</para>
+ <para>Support for <link linkend="spotlight">Spotlight</link> has been
+ added in Netatalk 3.1. See this <link
+ linkend="spotlight_compile">section</link> for information on how to
+ compile Netatalk with Spotlight support.</para>
+
<sect3>
<title>afp.conf</title>
</sect3>
</sect2>
+ <sect2>
+ <title id="spotlight">Spotlight<indexterm>
+ <primary>Spotlight</primary>
+ </indexterm></title>
+
+ <para>Netatalk uses Tracker as the metadata backend. Recent Linux
+ distributions will provide the libtracker-sparql library which is
+ available since Tracker version 0.7. This version is referred to as
+ Tracker SPARQL.</para>
+
+ <para>Other system like FreeBSD, Solaris and systems derived from
+ Solaris will only ship Tracker version 0.6 which only offers a much more
+ restrcited feature set. We refer to this version as Tracker RDF. Solaris
+ users are advised to install Tracker from OpenCSW as this is at least
+ version 0.15 and thus supports SPARQL</para>
+
+ <para>To enable Spotlight put this in your afp.conf:</para>
+
+ <screen>[Global]
+...
+spotlight = yes
+...</screen>
+
+ <para>This will enable Spotlight functionality. For Solaris with Tracker
+ from OpenCSW also add:<screen>dbus daemon = /opt/csw/bin/dbus-daemon</screen></para>
+
+ <sect3>
+ <title>Tracker SPARQL</title>
+
+ <para>Next you must enbale Spotlight indexing on a per volume
+ basis:</para>
+
+ <screen>[foo]
+path = /bar
+spotlight = yes
+...</screen>
+
+ <para>Only volumes with a setting of spotlight = yes will be
+ searchable with Spotlight.</para>
+
+ <warning>
+ <para>All other volumes won't be searchable at all</para>
+ </warning>
+ </sect3>
+
+ <sect3>
+ <title>Tracker RDF</title>
+
+ <para>Add all volume paths that should be searchable to
+ $sysconfdir/tracker/tracker.cfg:<screen>...
+[Watches]
+# List of directory roots to index and watch (separator=;)
+WatchDirectoryRoots=/foo/bar;/another/volume
+...</screen></para>
+ </sect3>
+
+ <sect3>
+ <title>Limitations and notes</title>
+
+ <itemizedlist>
+ <listitem>
+ <para>Large filesystems</para>
+
+ <para>Tracker on Linux uses the inotify Kernel filesystem change
+ event API for tracking filesystem changes. On large filesystems
+ this may be problematic since the inotify API doesn't offer
+ recursive directory watches but instead requires that for every
+ subdirectoy watches must be added individually.</para>
+
+ <para>On Solaris the FEN file event notification system is used.
+ It is unkown which limitations and ressource consumption this
+ Solaris subsystem has,</para>
+ </listitem>
+
+ <listitem>
+ <para>Tracker RDF</para>
+
+ <para>The mapping of certain simple and of complex Spotlight to
+ Tracker RDF queries is imperfect. Also, Tracker RDF filename
+ searches are case sensitive! As a result there are two noticable
+ restrictions:</para>
+
+ <orderedlist>
+ <listitem>
+ <para>On a Mac, a query entered in the Spotlight search menu
+ or in a Finder search toolbar is meant to express "search any
+ metadata field, file name or content for this string". With
+ Netatalk and Tracker RDF only filenames will be
+ searched.</para>
+ </listitem>
+
+ <listitem>
+ <para>Searching files content must be done through explicitly
+ adding a "<emphasis>Contents</emphasis> contains ..."
+ filter.</para>
+ </listitem>
+ </orderedlist>
+
+ <screenshot>
+ <screeninfo>Case sensivity</screeninfo>
+
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="http://netatalk.sourceforge.net/wiki/images/2/2a/Toolbar_search_is_name_search.png" />
+ </imageobject>
+ </mediaobject>
+ </screenshot>
+
+ <screenshot>
+ <screeninfo>Searching metadata</screeninfo>
+
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="http://netatalk.sourceforge.net/wiki/images/0/01/Searching_for_content.png" />
+ </imageobject>
+ </mediaobject>
+ </screenshot>
+ </listitem>
+ </itemizedlist>
+ </sect3>
+
+ <sect3>
+ <title>Supported metadata attributes</title>
+
+ <para>The following list is the complete set of supported metadata
+ attributes in Tracker SPARQL search queries</para>
+
+ <table>
+ <title>Tracker SPARQL</title>
+
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry align="center">Description</entry>
+
+ <entry align="center">Spotlight Key </entry>
+ </row>
+ </thead>
+
+ <tbody>
+ <row>
+ <entry>Name</entry>
+
+ <entry>kMDItemDisplayName, kMDItemFSName</entry>
+ </row>
+
+ <row>
+ <entry>Document content (full text search)</entry>
+
+ <entry>kMDItemTextContent</entry>
+ </row>
+
+ <row>
+ <entry>File type</entry>
+
+ <entry>_kMDItemGroupId, kMDItemContentTypeTree</entry>
+ </row>
+
+ <row>
+ <entry>File modification date</entry>
+
+ <entry>kMDItemFSContentChangeDate,
+ kMDItemContentModificationDate,
+ kMDItemAttributeChangeDate</entry>
+ </row>
+
+ <row>
+ <entry>Content Creation date</entry>
+
+ <entry>kMDItemContentCreationDate</entry>
+ </row>
+
+ <row>
+ <entry>The author, or authors, of the contents of the
+ file</entry>
+
+ <entry>kMDItemAuthors, kMDItemCreator</entry>
+ </row>
+
+ <row>
+ <entry>The name of the country where the item was
+ created</entry>
+
+ <entry>kMDItemCountry</entry>
+ </row>
+
+ <row>
+ <entry>Duration</entry>
+
+ <entry>kMDItemDurationSeconds</entry>
+ </row>
+
+ <row>
+ <entry>Number of pages</entry>
+
+ <entry>kMDItemNumberOfPages</entry>
+ </row>
+
+ <row>
+ <entry>Document title</entry>
+
+ <entry>kMDItemTitle</entry>
+ </row>
+
+ <row>
+ <entry>The width, in pixels, of the contents. For example, the
+ image width or the video frame width</entry>
+
+ <entry>kMDItemPixelWidth</entry>
+ </row>
+
+ <row>
+ <entry>The height, in pixels, of the contents. For example,
+ the image height or the video frame height</entry>
+
+ <entry>kMDItemPixelHeight</entry>
+ </row>
+
+ <row>
+ <entry>The color space model used by the document
+ contents</entry>
+
+ <entry>kMDItemColorSpace</entry>
+ </row>
+
+ <row>
+ <entry>The number of bits per sample</entry>
+
+ <entry>kMDItemBitsPerSample</entry>
+ </row>
+
+ <row>
+ <entry>Focal length of the lens, in millimeters</entry>
+
+ <entry>kMDItemFocalLength</entry>
+ </row>
+
+ <row>
+ <entry>ISO speed</entry>
+
+ <entry>kMDItemISOSpeed</entry>
+ </row>
+
+ <row>
+ <entry>Orientation of the document. Possible values are 0
+ (landscape) and 1 (portrait)</entry>
+
+ <entry>kMDItemOrientation</entry>
+ </row>
+
+ <row>
+ <entry>Resolution width, in DPI</entry>
+
+ <entry>kMDItemResolutionWidthDPI</entry>
+ </row>
+
+ <row>
+ <entry>Resolution height, in DPI</entry>
+
+ <entry>kMDItemResolutionHeightDPI</entry>
+ </row>
+
+ <row>
+ <entry>Exposure time, in seconds</entry>
+
+ <entry>kMDItemExposureTimeSeconds</entry>
+ </row>
+
+ <row>
+ <entry>The composer of the music contained in the audio
+ file</entry>
+
+ <entry>kMDItemComposer</entry>
+ </row>
+
+ <row>
+ <entry>The musical genre of the song or composition</entry>
+
+ <entry>kMDItemMusicalGenre</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+
+ <para>The following list is the complete set of supported metadata
+ attributes in Tracker RDF search queries:<table>
+ <title>Tracker RDF</title>
+
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry align="center">Description</entry>
+
+ <entry align="center">Spotlight Key</entry>
+ </row>
+ </thead>
+
+ <tbody>
+ <row>
+ <entry>Name</entry>
+
+ <entry>kMDItemDisplayName, kMDItemFSName</entry>
+ </row>
+
+ <row>
+ <entry>Document content (full text search)</entry>
+
+ <entry>kMDItemTextContent</entry>
+ </row>
+
+ <row>
+ <entry>File type</entry>
+
+ <entry>_kMDItemGroupId, kMDItemContentTypeTree</entry>
+ </row>
+
+ <row>
+ <entry>File modification date</entry>
+
+ <entry>kMDItemFSContentChangeDate,
+ kMDItemContentModificationDate,
+ kMDItemAttributeChangeDate</entry>
+ </row>
+
+ <row>
+ <entry>Content Creation date</entry>
+
+ <entry>kMDItemContentCreationDate</entry>
+ </row>
+
+ <row>
+ <entry>The author, or authors, of the contents of the
+ file</entry>
+
+ <entry>kMDItemAuthors, kMDItemCreator</entry>
+ </row>
+
+ <row>
+ <entry>The name of the country where the item was
+ created</entry>
+
+ <entry>kMDItemCountry</entry>
+ </row>
+
+ <row>
+ <entry>Duration</entry>
+
+ <entry>kMDItemDurationSeconds</entry>
+ </row>
+
+ <row>
+ <entry>Number of pages</entry>
+
+ <entry>kMDItemNumberOfPages</entry>
+ </row>
+
+ <row>
+ <entry>Document title</entry>
+
+ <entry>kMDItemTitle</entry>
+ </row>
+
+ <row>
+ <entry>The width, in pixels, of the contents. For example,
+ the image width or the video frame width</entry>
+
+ <entry>kMDItemPixelWidth</entry>
+ </row>
+
+ <row>
+ <entry>The height, in pixels, of the contents. For example,
+ the image height or the video frame height</entry>
+
+ <entry>kMDItemPixelHeight</entry>
+ </row>
+
+ <row>
+ <entry>Focal length of the lens, in millimeters</entry>
+
+ <entry>kMDItemFocalLength</entry>
+ </row>
+
+ <row>
+ <entry>ISO speed</entry>
+
+ <entry>kMDItemISOSpeed</entry>
+ </row>
+
+ <row>
+ <entry>Orientation of the document. Possible values are 0
+ (landscape) and 1 (portrait)</entry>
+
+ <entry>kMDItemOrientation</entry>
+ </row>
+
+ <row>
+ <entry>Exposure time, in seconds</entry>
+
+ <entry>kMDItemExposureTimeSeconds</entry>
+ </row>
+
+ <row>
+ <entry>The musical genre of the song or composition</entry>
+
+ <entry>kMDItemMusicalGenre</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table></para>
+ </sect3>
+
+ <sect3>
+ <title>Using Tracker commandline tools on the server</title>
+
+ <para>Netatalk must be running. Then setup relevant environment
+ variables, adjust the prefix /usr/local/netatalk to match your
+ configured paths:<screen>$ su
+****
+# cat trackerenv.sh
+export DBUS_SESSION_BUS_ADDRESS="unix:path=/tmp/spotlight.ipc"
+export XDG_DATA_HOME=/usr/local/netatalk/var/netatalk
+export XDG_CACHE_HOME=/usr/local/netatalk/var/netatalk
+export XDG_CONFIG_HOME=/usr/local/netatalk/etc
+# . trackerenv.sh
+#</screen></para>
+
+ <para>Tracker SPARQL:<screen># tracker-search QUERY
+...
+# tracker-info PATH
+...</screen></para>
+
+ <para>Tracker RDF<screen># cat file.rdf
+<rdfq:Condition>
+ <rdfq:and>
+ <rdfq:contains>
+ <rdfq:Property name="File:Name" />
+ <rdf:String>SEARCHSTRING</rdf:String>
+ </rdfq:contains>
+ </rdfq:and>
+</rdfq:Condition>
+# tracker-query -p file.rdf File:Name
+...
+# tracker-info -m File:Mime PATH
+...</screen></para>
+ </sect3>
+
+ <sect3>
+ <title>References</title>
+
+ <orderedlist>
+ <listitem>
+ <para><ulink
+ url="https://developer.apple.com/library/mac/#documentation/Carbon/Reference/MDItemRef/Reference/reference.html">MDItem</ulink></para>
+ </listitem>
+
+ <listitem>
+ <para><ulink
+ url="https://live.gnome.org/Tracker/Documentation">Tracker</ulink></para>
+ </listitem>
+ </orderedlist>
+ </sect3>
+ </sect2>
+
<sect2 id="CNID-backends">
<title>CNID<indexterm>
<primary>CNID</primary>
When a new object is created inside a directory with a default ACL,
the default ACL is applied to the new object as it's access ACL.
Subdirectories inherit default ACLs from their parent. There are no
- further mechanisms of inheritance control. </para>
+ further mechanisms of inheritance control.</para>
<para>Architectural differences between Posix ACLs and OS X ACLs
especially involve:</para>
<listitem>
<para>afpd silently discard entries which deny a set of
permissions because they they can't be represented within the
- Posix architecture. </para>
+ Posix architecture.</para>
</listitem>
<listitem>
<?xml version="1.0" encoding="UTF-8"?>
<chapter id="installation">
<chapterinfo>
- <date>24.8.2012</date>
+ <date>4.6.2013</date>
</chapterinfo>
<title>Installation</title>
!!!</para>
</warning>
- <para></para>
-
<sect1>
<title>How to obtain Netatalk</title>
</ulink></para>
<para>Solaris package: <ulink
- url="http://www.blastwave.org/">http://www.blastwave.org/
- </ulink></para>
+ url="http://www.blastwave.org/">http://www.opencsw.org/</ulink></para>
<para>FreeBSD ports: <ulink
url="http://www.freebsd.org/ports/index.html">http://www.freebsd.org/ports/index.html
<title>Git</title>
<para>Downloading the Git repository can be done quickly and
- easily.</para>
+ easily:</para>
<orderedlist>
<listitem>
<para>Make sure you have Git installed. <command>which
git</command> should produce a path to git.</para>
- <screen><prompt>$></prompt> <userinput>which git</userinput>
+ <screen><prompt>$ </prompt><userinput>which git</userinput>
<computeroutput>/usr/bin/git</computeroutput></screen>
</listitem>
- <listitem>
- <para>If you don't have one make a source directory.
- <command>cd</command> to this directory.</para>
-
- <screen><prompt>$></prompt> <userinput>mkdir /path/to/new/source/dir</userinput>
-<prompt>$></prompt> <userinput>cd /path/to/new/source/dir</userinput></screen>
- </listitem>
-
<listitem>
<para>Now get the source:</para>
- <screen><prompt>$></prompt> <userinput>git clone git://git.code.sf.net/p/netatalk/code netatalk-code
+ <screen><prompt>$</prompt> <userinput>git clone -b develop git://git.code.sf.net/p/netatalk/code netatalk-code
</userinput><computeroutput>Initialized empty Git repository in /path/to/new/source/dir/netatalk/.git/
remote: Counting objects: 2503, done.
...
</computeroutput></screen>
- <para>This will create a local directory called "netatalk-code"
- containing a complete and fresh copy of the whole Netatalk source
- from the Git repository.</para>
+ <para>This will create a local directory called
+ <filename>netatalk-code</filename> containing a complete and fresh
+ copy of the whole Netatalk source from the Git repository.</para>
</listitem>
<listitem>
<para>In order to keep your repository copy updated, occasionally
run:</para>
- <screen><prompt>$></prompt> <userinput>git pull</userinput></screen>
+ <screen><prompt>$</prompt> <userinput>git pull</userinput></screen>
</listitem>
<listitem>
<filename>configure</filename> script required in the next
step.</para>
- <screen><prompt>$></prompt> <userinput>./bootstrap</userinput></screen>
+ <screen><prompt>$</prompt> <userinput>./bootstrap</userinput></screen>
</listitem>
</orderedlist>
- <para></para>
+ <para>For futher information refer to this <ulink
+ url="http://netatalk.sourceforge.net/wiki/index.php/Developer_Infos">wiki</ulink>
+ page.</para>
</sect3>
</sect2>
</sect1>
it's functionality.</para>
<itemizedlist>
+ <listitem>
+ <para>Tracker for Spotlight<indexterm>
+ <primary>Spotlight</primary>
+ </indexterm> support</para>
+
+ <para>Netatalk uses <ulink
+ url="http://projects.gnome.org/tracker/">Tracker</ulink> as the
+ metadata backend. Recent Linux distributions will provide the
+ libtracker-sparql library which is available since Tracker version
+ 0.7. This version is referred to as Tracker SPARQL.</para>
+
+ <para>Other system like FreeBSD, Solaris and systems derived from
+ Solaris will only ship an older Tracker version 0.6 which only
+ offers a much more restrcited feature set. We refer to this
+ version and its featureset by Tracker RDF. Solaris users are
+ advised to install Tracker from OpenCSW as this is at least
+ version 0.15 and thus supports SPARQL.</para>
+ </listitem>
+
<listitem>
<para>mDNSresponderPOSIX or Avahi for Bonjour (aka
Zeroconf)</para>
<para>Avahi must be build with DBUS support (
<userinput>--enable-dbus</userinput>).</para>
-
- <para>You can download Avahi from: <ulink
- url="http://www.avahi.org/">http://www.avahi.org/</ulink>.</para>
-
- <para>You can download mDNSresponder from: <ulink
- url="http://opensource.apple.com/tarballs/mDNSResponder/">http://opensource.apple.com/tarballs/mDNSResponder/</ulink>.</para>
</listitem>
<listitem>
<para>Security options are: access control per host, domain and/or
service; detection of host name spoofing or host address spoofing;
booby traps to implement an early-warning system.</para>
-
- <para>TCP Wrappers can be downloaded from: <ulink
- url="ftp://ftp.porcupine.org/pub/security">ftp://ftp.porcupine.org/pub/security</ulink>/</para>
</listitem>
<listitem>
</indexterm> Microsystems. Linux-PAM is a suite of shared
libraries that enable the local system administrator to choose how
applications authenticate users.</para>
-
- <para>You can get the Linux PAM documentation and sources from
- <ulink
- url="http://www.kernel.org/pub/linux/libs/pam/">http://www.kernel.org/pub/linux/libs/pam/</ulink>.</para>
</listitem>
<listitem>
built in conversions for, like ISO-8859-1. On glibc systems,
Netatalk can use the glibc provided iconv implementation.
Otherwise you can use the GNU libiconv implementation.</para>
-
- <para>You can download GNU libiconv from: <olink><ulink
- url="http://www.gnu.org/software/libiconv/">http://www.gnu.org/software/libiconv/</ulink></olink>.</para>
</listitem>
</itemizedlist>
</sect3>
automatically configure Netatalk for your operating system. If you
have unusual needs, then you may wish to run</para>
- <screen>$> <userinput>./configure --help</userinput></screen>
+ <screen>$ <userinput>./configure --help</userinput></screen>
<para>to see what special options you can enable.</para>
<para>Now run configure with any options you need</para>
- <screen><prompt>$></prompt> <userinput>./configure [arguments]</userinput></screen>
+ <screen><prompt>$</prompt> <userinput>./configure [arguments]</userinput></screen>
<para>Configure will end up in an overview showing the settings the
Netatalk Makefiles have been created with.</para>
+ </sect3>
- <para>If this step fails please visit the <ulink
- url="http://netatalk.sourceforge.net/wiki/index.php/Troubleshooting">troubleshooting
- guide</ulink>.</para>
+ <sect3>
+ <title>Spotlight<indexterm>
+ <primary>Spotlight</primary>
+ </indexterm></title>
+
+ <para>If not already installed, install the following additional
+ packages: tracker and tracker-devel, on Solaris install OpenCSW and
+ Tracker packages from OpenCSW unstable repository.</para>
+
+ <para>The tracker packages are found via pkg-config, you may have to
+ pass the version suffix as you may have a newer version installed then
+ the default 0.12, eg</para>
+
+ <screen><prompt>$ </prompt><userinput>pkg-config --list-all | grep tracker
+</userinput>tracker-extract-0.16 tracker-extract - Tracker : A library to develop metadata extractors for 3rd party file types.
+tracker-sparql-0.16 tracker-sparql - Tracker : A library to perform SPARQL queries and updates in the Tracker Store
+tracker-miner-0.16 tracker-miner - A library to develop tracker data miners</screen>
+
+ <para>So:</para>
+
+ <screen><prompt>$ </prompt><userinput>./configure --with-tracker-pkgconfig-version=0.16 ...</userinput></screen>
+
+ <para>If you're using Solaris and Tracker from OpenCSW, then you need
+ to set the PKG_CONFIG_PATH environment variable and add the
+ --with-tracker-prefix configure option</para>
+
+ <screen>PKG_CONFIG_PATH=/opt/csw/lib/pkgconfig ./configure --with-tracker-prefix=/opt/csw --with-tracker-pkgconfig-version=0.16 ...</screen>
+
+ <para>Check the configure output whether the Tracker libs were
+ found:</para>
+
+ <screen>checking for TRACKER... yes
+checking for TRACKER_MINER... yes
+...
+Configure summary:
+...
+ AFP:
+ Spotlight: yes (SPARQL)
+...</screen>
+ </sect3>
+
+ <sect3>
+ <title>Compile and install</title>
<para>Next, running</para>
- <screen><prompt>$></prompt> <userinput>make</userinput></screen>
+ <screen><prompt>$</prompt> <userinput>make</userinput></screen>
<para>should produce the Netatalk binaries (this step can take several
minutes to complete).</para>
<para>When the process finished you can use</para>
- <screen><prompt>$></prompt> <userinput>make install</userinput></screen>
+ <screen><prompt>$</prompt> <userinput>make install</userinput></screen>
<para>to install the binaries and documentation (must be done as
"root" when using default locations).</para>