From: Frank Lahm Date: Mon, 28 Oct 2013 09:34:25 +0000 (+0100) Subject: Merge remote-tracking branch 'origin/branch-netatalk-3-0' into develop X-Git-Url: https://arthur.barton.de/gitweb/?a=commitdiff_plain;h=8c25635e752ff3cf4d9abb6965363627d1cab4d7;hp=71d10aa713b9ba555f1fc962de2dd0c83253609e;p=netatalk.git Merge remote-tracking branch 'origin/branch-netatalk-3-0' into develop Conflicts: NEWS VERSION doc/www/ReleaseNotes --- diff --git a/.gitignore b/.gitignore index f9ba2b20..cecdf4e2 100644 --- a/.gitignore +++ b/.gitignore @@ -19,6 +19,7 @@ ltconfig ltmain.sh autom4te.cache autoscan.log +ylwrap *.rpm *.deb *.dsc diff --git a/NEWS b/NEWS index 8a8fb779..cd9e90d3 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,17 @@ +Changes in 3.1.0 +================ +* NEW: AFP Spotlight support with Gnome Tracker +* NEW: New option "spotlight" (G/V) +* NEW: Configure option --with-tracker-pkgconfig-version +* NEW: Configure option --with-tracker-prefix +* NEW: If Spotlight is enabled, launch our own dbus instance +* NEW: New option "dbus daemon" (G) +* UPD: Add configure option --with-afpstats for overriding the + result of autodetecting dbus-glib presence +* NEW: Add recvfile support with splice() on Linux. New global options + "recvfile" (default: no) and "splice size" (default 64k). +* NEW: CNID backend "mysql" for use with a MySQL server + Changes in 3.0.7 ================ * FIX: Build fixes for the Kerberos UAM diff --git a/VERSION b/VERSION index 37e82cad..327e66a7 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -3.0.7dev \ No newline at end of file +3.1-beta2 \ No newline at end of file diff --git a/bin/ad/Makefile.am b/bin/ad/Makefile.am index 5c3f47b6..e7b2c147 100644 --- a/bin/ad/Makefile.am +++ b/bin/ad/Makefile.am @@ -18,8 +18,7 @@ ad_SOURCES = \ ad_CFLAGS = -D_PATH_AD=\"$(bindir)/ad\" ad_LDADD = \ - $(top_builddir)/libatalk/cnid/libcnid.la \ $(top_builddir)/libatalk/libatalk.la \ - @ACL_LIBS@ + @ACL_LIBS@ @MYSQL_LIBS@ endif diff --git a/bin/ad/ad.h b/bin/ad/ad.h index 3195641f..9155900c 100644 --- a/bin/ad/ad.h +++ b/bin/ad/ad.h @@ -69,7 +69,6 @@ extern int ad_find(int argc, char **argv, AFPObj *obj); /* ad_util.c */ extern int openvol(AFPObj *obj, const char *path, afpvol_t *vol); extern void closevol(afpvol_t *vol); -extern cnid_t cnid_for_path(const afpvol_t *vol, const char *path, cnid_t *did); extern cnid_t cnid_for_paths_parent(const afpvol_t *vol, const char *path, cnid_t *did); extern char *utompath(const struct vol *, const char *); extern int convert_dots_encoding(const afpvol_t *svol, const afpvol_t *dvol, char *path, size_t buflen); diff --git a/bin/ad/ad_cp.c b/bin/ad/ad_cp.c index 239936dc..5cefe964 100644 --- a/bin/ad/ad_cp.c +++ b/bin/ad/ad_cp.c @@ -509,7 +509,7 @@ static int copy(const char *path, /* Get CNID of Parent and add new childir to CNID database */ ppdid = pdid; - if ((did = cnid_for_path(&dvolume, to.p_path, &pdid)) == CNID_INVALID) { + if ((did = cnid_for_path(dvolume.vol->v_cdb, dvolume.vol->v_path, to.p_path, &pdid)) == CNID_INVALID) { SLOG("Error resolving CNID for %s", to.p_path); badcp = rval = 1; return -1; @@ -577,7 +577,7 @@ static int copy(const char *path, /* Get CNID of Parent and add new childir to CNID database */ pdid = did; cnid_t cnid; - if ((cnid = cnid_for_path(&dvolume, to.p_path, &did)) == CNID_INVALID) { + if ((cnid = cnid_for_path(dvolume.vol->v_cdb, dvolume.vol->v_path, to.p_path, &did)) == CNID_INVALID) { SLOG("Error resolving CNID for %s", to.p_path); badcp = rval = 1; return -1; diff --git a/bin/ad/ad_find.c b/bin/ad/ad_find.c index 88a46752..093414a1 100644 --- a/bin/ad/ad_find.c +++ b/bin/ad/ad_find.c @@ -27,7 +27,7 @@ #include #include -#include +#include #include #include #include diff --git a/bin/ad/ad_mv.c b/bin/ad/ad_mv.c index 72698f73..3fdf1ea9 100644 --- a/bin/ad/ad_mv.c +++ b/bin/ad/ad_mv.c @@ -278,7 +278,7 @@ static int do_move(const char *from, const char *to) cnid_t cnid = 0; if (!mustcopy) { - if ((cnid = cnid_for_path(&svolume, from, &did)) == CNID_INVALID) { + if ((cnid = cnid_for_path(svolume.vol->v_cdb, svolume.vol->v_path, from, &did)) == CNID_INVALID) { SLOG("Couldn't resolve CNID for %s", from); return -1; } diff --git a/bin/ad/ad_rm.c b/bin/ad/ad_rm.c index 195fee06..b32e659f 100644 --- a/bin/ad/ad_rm.c +++ b/bin/ad/ad_rm.c @@ -211,7 +211,7 @@ static int rm(const char *path, /* Get CNID of Parent and add new childir to CNID database */ pdid = did; - if ((cnid = cnid_for_path(&volume, path, &did)) == CNID_INVALID) { + if ((cnid = cnid_for_path(volume.vol->v_cdb, volume.vol->v_path, path, &did)) == CNID_INVALID) { SLOG("Error resolving CNID for %s", path); return -1; } @@ -247,7 +247,7 @@ static int rm(const char *path, } /* Get CNID of Parent and add new childir to CNID database */ - if ((did = cnid_for_path(&volume, path, &pdid)) == CNID_INVALID) { + if ((did = cnid_for_path(volume.vol->v_cdb, volume.vol->v_path, path, &pdid)) == CNID_INVALID) { SLOG("Error resolving CNID for %s", path); return -1; } @@ -293,7 +293,7 @@ static int rm(const char *path, /* Get CNID of Parent and add new childir to CNID database */ pdid = did; - if ((cnid = cnid_for_path(&volume, path, &did)) == CNID_INVALID) { + if ((cnid = cnid_for_path(volume.vol->v_cdb, volume.vol->v_path, path, &did)) == CNID_INVALID) { SLOG("Error resolving CNID for %s", path); return -1; } diff --git a/bin/ad/ad_util.c b/bin/ad/ad_util.c index 340dc568..782bbffa 100644 --- a/bin/ad/ad_util.c +++ b/bin/ad/ad_util.c @@ -129,7 +129,8 @@ int openvol(AFPObj *obj, const char *path, afpvol_t *vol) "dbd", flags, vol->vol->v_cnidserver, - vol->vol->v_cnidport)) == NULL) + vol->vol->v_cnidport, + NULL, NULL)) == NULL) ERROR("Cant initialize CNID database connection for %s", vol->vol->v_path); cnid_getstamp(vol->vol->v_cdb, @@ -236,73 +237,6 @@ int convert_dots_encoding(const afpvol_t *svol, const afpvol_t *dvol, char *path return 0; } -/*! - * ResolvesCNID of a given paths - * - * path might be: - * (a) relative: - * "dir/subdir" with cwd: "/afp_volume/topdir" - * (b) absolute: - * "/afp_volume/dir/subdir" - * - * path MUST be pointing inside vol, this is usually the case as vol has been build from - * path using loadvolinfo and friends. - * - * @param vol (r) pointer to afpvol_t - * @param path (r) path, see above - * @param did (rw) parent CNID of returned CNID - * - * @returns CNID of path - */ -cnid_t cnid_for_path(const afpvol_t *vol, - const char *path, - cnid_t *did) -{ - EC_INIT; - - cnid_t cnid; - bstring rpath = NULL; - bstring statpath = NULL; - struct bstrList *l = NULL; - struct stat st; - - cnid = htonl(2); - - EC_NULL(rpath = rel_path_in_vol(path, vol->vol->v_path)); - EC_NULL(statpath = bfromcstr(vol->vol->v_path)); - EC_ZERO(bcatcstr(statpath, "/")); - - l = bsplit(rpath, '/'); - for (int i = 0; i < l->qty ; i++) { - *did = cnid; - - EC_ZERO(bconcat(statpath, l->entry[i])); - EC_ZERO_LOGSTR(lstat(cfrombstr(statpath), &st), - "lstat(rpath: %s, elem: %s): %s: %s", - cfrombstr(rpath), cfrombstr(l->entry[i]), - cfrombstr(statpath), strerror(errno)); - - if ((cnid = cnid_add(vol->vol->v_cdb, - &st, - *did, - cfrombstr(l->entry[i]), - blength(l->entry[i]), - 0)) == CNID_INVALID) { - EC_FAIL; - } - EC_ZERO(bcatcstr(statpath, "/")); - } - -EC_CLEANUP: - bdestroy(rpath); - bstrListDestroy(l); - bdestroy(statpath); - if (ret != 0) - return CNID_INVALID; - - return cnid; -} - /*! * Resolves CNID of a given paths parent directory * diff --git a/bin/afppasswd/Makefile.am b/bin/afppasswd/Makefile.am index cab2df66..578eac1b 100644 --- a/bin/afppasswd/Makefile.am +++ b/bin/afppasswd/Makefile.am @@ -9,7 +9,7 @@ bin_PROGRAMS = endif afppasswd_SOURCES = afppasswd.c -afppasswd_LDADD = $(top_builddir)/libatalk/libatalk.la @SSL_LIBS@ +afppasswd_LDADD = $(top_builddir)/libatalk/libatalk.la @SSL_LIBS@ @MYSQL_LIBS@ AM_CFLAGS = @SSL_CFLAGS@ -I$(top_srcdir)/sys \ -D_PATH_AFPDPWFILE=\"$(pkgconfdir)/afppasswd\" diff --git a/bin/misc/Makefile.am b/bin/misc/Makefile.am index 5b2fd4e3..2cbb8d0a 100644 --- a/bin/misc/Makefile.am +++ b/bin/misc/Makefile.am @@ -6,18 +6,18 @@ bin_PROGRAMS = noinst_PROGRAMS = netacnv logger_test fce netacnv_SOURCES = netacnv.c -netacnv_LDADD = $(top_builddir)/libatalk/libatalk.la +netacnv_LDADD = $(top_builddir)/libatalk/libatalk.la @MYSQL_LIBS@ logger_test_SOURCES = logger_test.c -logger_test_LDADD = $(top_builddir)/libatalk/libatalk.la +logger_test_LDADD = $(top_builddir)/libatalk/libatalk.la @MYSQL_LIBS@ fce_SOOURCE = fce.c -fce_LDADD = $(top_builddir)/libatalk/libatalk.la +fce_LDADD = $(top_builddir)/libatalk/libatalk.la @MYSQL_LIBS@ fce_CFLAGS = -I$(top_srcdir)/include bin_PROGRAMS += afpldaptest afpldaptest_SOURCES = uuidtest.c afpldaptest_CFLAGS = -D_PATH_CONFDIR=\"$(pkgconfdir)/\" @LDAP_CFLAGS@ afpldaptest_LDFLAGS = @LDAP_LDFLAGS@ -afpldaptest_LDADD = $(top_builddir)/libatalk/libatalk.la +afpldaptest_LDADD = $(top_builddir)/libatalk/libatalk.la @MYSQL_LIBS@ diff --git a/bin/uniconv/Makefile.am b/bin/uniconv/Makefile.am index 202e7227..58bbd0be 100644 --- a/bin/uniconv/Makefile.am +++ b/bin/uniconv/Makefile.am @@ -5,4 +5,4 @@ INCLUDES = -I$(top_srcdir)/include -I$(top_srcdir)/sys bin_PROGRAMS = uniconv uniconv_SOURCES = uniconv.c iso8859_1_adapted.c -uniconv_LDADD = $(top_builddir)/libatalk/cnid/libcnid.la $(top_builddir)/libatalk/libatalk.la +uniconv_LDADD = $(top_builddir)/libatalk/libatalk.la @MYSQL_LIBS@ diff --git a/bin/uniconv/iso8859_1_adapted.c b/bin/uniconv/iso8859_1_adapted.c index 7cdd43c3..96cfcf58 100644 --- a/bin/uniconv/iso8859_1_adapted.c +++ b/bin/uniconv/iso8859_1_adapted.c @@ -27,8 +27,7 @@ #include #include - -#include "../../libatalk/unicode/byteorder.h" +#include static size_t iso8859_adapted_pull(void *,char **, size_t *, char **, size_t *); static size_t iso8859_adapted_push(void *,char **, size_t *, char **, size_t *); diff --git a/bin/uniconv/uniconv.c b/bin/uniconv/uniconv.c index 8a786a60..93439cef 100644 --- a/bin/uniconv/uniconv.c +++ b/bin/uniconv/uniconv.c @@ -389,7 +389,7 @@ static int init(char* path) { DIR* startdir; - if (NULL == (cdb = cnid_open (path, 0, cnid_type, 0, "localhost", "4700")) ) { + if (NULL == (cdb = cnid_open (path, 0, cnid_type, 0, "localhost", "4700", NULL, NULL)) ) { fprintf (stderr, "ERROR: cannot open CNID database in '%s'\n", path); fprintf (stderr, "ERROR: check the logs for reasons, aborting\n"); return -1; diff --git a/config/.gitignore b/config/.gitignore index ec0b4097..f6ebd89c 100644 --- a/config/.gitignore +++ b/config/.gitignore @@ -2,3 +2,4 @@ Makefile Makefile.in *.o afp.conf +dbus-session.conf diff --git a/config/Makefile.am b/config/Makefile.am index e72c38f3..5003de1b 100644 --- a/config/Makefile.am +++ b/config/Makefile.am @@ -3,10 +3,10 @@ SUBDIRS = pam SUFFIXES = .tmpl . -TMPLFILES = afp.conf.tmpl -GENFILES = afp.conf +TMPLFILES = afp.conf.tmpl dbus-session.conf.tmpl +GENFILES = afp.conf dbus-session.conf CLEANFILES = $(GENFILES) -EXTRA_DIST = afp.conf.tmpl extmap.conf netatalk-dbus.conf +EXTRA_DIST = $(TMPLFILES) extmap.conf netatalk-dbus.conf OVERWRITE_CONFIG = @OVERWRITE_CONFIG@ @@ -28,6 +28,7 @@ endif -e s@:ETCDIR:@${pkgconfdir}@ \ -e s@:COMPILED_BACKENDS:@"$(compiled_backends)"@ \ -e s@:DEFAULT_CNID_SCHEME:@$(DEFAULT_CNID_SCHEME)@ \ + -e s@:LOCALSTATEDIR:@"$(localstatedir)"@ \ <$< >$@ # @@ -41,10 +42,11 @@ install-data-local: install-config-files $(INSTALL_DATA) $(srcdir)/README $(DESTDIR)$(localstatedir)/netatalk/CNID/ uninstall-local: - for f in $(CONFFILES) $(GENFILES); do \ + @for f in $(CONFFILES) $(GENFILES); do \ echo rm -f $(DESTDIR)$(pkgconfdir)/$$f; \ rm -f $(DESTDIR)$(pkgconfdir)/$$f; \ done + rm -f $(DESTDIR)$(pkgconfdir)/dbus-session.conf rm -f $(DESTDIR)$(localstatedir)/netatalk/README rm -f $(DESTDIR)$(localstatedir)/netatalk/CNID/README if USE_DEBIAN @@ -53,7 +55,7 @@ endif install-config-files: $(CONFFILES) $(GENFILES) $(mkinstalldirs) $(DESTDIR)$(pkgconfdir) - for f in $(CONFFILES) ; do \ + @for f in $(CONFFILES) ; do \ if test "x$(OVERWRITE_CONFIG)" = "xyes" -o ! -f $(DESTDIR)$(pkgconfdir)/$$f; then \ echo "$(INSTALL_DATA) $$f $(DESTDIR)$(pkgconfdir)"; \ $(INSTALL_DATA) $(srcdir)/$$f $(DESTDIR)$(pkgconfdir); \ @@ -61,7 +63,7 @@ install-config-files: $(CONFFILES) $(GENFILES) echo "not overwriting $$f"; \ fi; \ done - for f in $(GENFILES); do \ + @for f in $(GENFILES); do \ if test "x$(OVERWRITE_CONFIG)" = "xyes" -o ! -f $(DESTDIR)$(pkgconfdir)/$$f; then \ echo "$(INSTALL_DATA) $$f $(DESTDIR)$(pkgconfdir)"; \ $(INSTALL_DATA) $$f $(DESTDIR)$(pkgconfdir); \ diff --git a/config/dbus-session.conf.tmpl b/config/dbus-session.conf.tmpl new file mode 100644 index 00000000..f84b9239 --- /dev/null +++ b/config/dbus-session.conf.tmpl @@ -0,0 +1,45 @@ + + + + session + + + + + unix:path=:LOCALSTATEDIR:/netatalk/spotlight.ipc + + + + + + + + + + + + + + + 1000000000 + 1000000000 + 1000000000 + 120000 + 240000 + 100000 + 10000 + 100000 + 10000 + 50000 + 50000 + 50000 + + diff --git a/configure.ac b/configure.ac index 6f56cdc3..8902ae1e 100644 --- a/configure.ac +++ b/configure.ac @@ -25,6 +25,8 @@ AC_PROG_PS AM_PROG_CC_C_O AC_C_BIGENDIAN AC_C_INLINE +AC_PROG_LEX +AC_PROG_YACC dnl Check if we can use attribute unused (gcc only) from ethereal AC_MSG_CHECKING(to see if we can add '__attribute__((unused))' to CFLAGS) @@ -74,7 +76,7 @@ AC_CHECK_MEMBERS(struct tm.tm_gmtoff,,, [#include ]) dnl these tests have been comfirmed to be needed in 2011 AC_CHECK_FUNCS(backtrace_symbols dirfd getusershell pread pwrite pselect) -AC_CHECK_FUNCS(setlinebuf strlcat strlcpy strnlen mempcpy) +AC_CHECK_FUNCS(setlinebuf strlcat strlcpy strnlen mempcpy vasprintf) AC_CHECK_FUNCS(mmap utime getpagesize) dnl needed by tbd dnl search for necessary libraries @@ -178,6 +180,7 @@ AC_NETATALK_REALPATH dnl Check for sendfile() AC_NETATALK_SENDFILE +AC_NETATALK_RECVFILE dnl Check whether bundled libevent shall not be used AC_NETATALK_LIBEVENT @@ -185,6 +188,9 @@ AC_NETATALK_LIBEVENT dnl Check whether bundled tdb shall be used AC_NETATALK_TDB +dnl Check for Tracker +AC_NETATALK_SPOTLIGHT + dnl libatalk API checks AC_DEVELOPER @@ -266,6 +272,7 @@ AC_OUTPUT([Makefile etc/afpd/Makefile etc/cnid_dbd/Makefile etc/netatalk/Makefile + etc/spotlight/Makefile etc/uams/Makefile include/Makefile include/atalk/Makefile @@ -278,9 +285,11 @@ AC_OUTPUT([Makefile libatalk/cnid/last/Makefile libatalk/cnid/dbd/Makefile libatalk/cnid/tdb/Makefile + libatalk/cnid/mysql/Makefile libatalk/compat/Makefile libatalk/dsi/Makefile libatalk/iniparser/Makefile + libatalk/talloc/Makefile libatalk/tdb/Makefile libatalk/unicode/Makefile libatalk/unicode/charsets/Makefile diff --git a/doc/Makefile.am b/doc/Makefile.am index c44790fa..f8ccbb76 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -6,4 +6,4 @@ release-notes: www/ReleaseNotes cd www && ./create-relnotes.sh upload-release-notes: release-notes - scp www/ReleaseNotes.html $$USER,netatalk@web.sourceforge.net:/home/project-web/netatalk/htdocs/3.0/ReleaseNotes$(VERSION).html + scp www/ReleaseNotes.html $$USER,netatalk@web.sourceforge.net:/home/project-web/netatalk/htdocs/3.1/ReleaseNotes$(VERSION).html diff --git a/doc/manpages/man5/afp.conf.5.xml b/doc/manpages/man5/afp.conf.5.xml index 026fef0f..e0c485c5 100644 --- a/doc/manpages/man5/afp.conf.5.xml +++ b/doc/manpages/man5/afp.conf.5.xml @@ -713,6 +713,24 @@ + + recvfile = BOOLEAN (default: + no) (G) + + + Whether to use splice() on Linux for receiving data. + + + + + splice size = number (default: + 64k) (G) + + + Maximum number of bytes spliced. + + + use sendfile = BOOLEAN (default: yes) (G) @@ -724,6 +742,7 @@ + zeroconf = BOOLEAN (default: yes) (G) @@ -799,6 +818,44 @@ + + cnid mysql host = MySQL server address + (G) + + + name or address of a MySQL server for use with the mysql CNID + backend. + + + + + cnid mysql user = MySQL user + (G) + + + MySQL user for authentication with the server. + + + + + cnid mysql pw = password + (G) + + + Password for MySQL server. + + + + + cnid mysql db = database name + (G) + + + Name of an existing database for which the specified user + has full privileges. + + + cnid server = ipaddress[:port] (G)/(V) @@ -875,7 +932,7 @@ Speficy a set of file and directory attributes that shall - be ignored by the server, all includes all + be ignored by the server, includes all the other options. In OS X when the Finder sets a lock on a file/directory or you set the BSD uchg flag in the Terminal, all three attributes are @@ -923,6 +980,18 @@ + + spotlight = + BOOLEAN (default: + no) (G)/(V) + + + Whether to enable Spotlight searches. Note: once the global + option is enabled, any volume that is not enabled won't be + searchable at all. + + + veto message = BOOLEAN (default: no) (G) @@ -1143,7 +1212,7 @@ mode. You can adjust this behaviour with the configuration option : - + map acls = none|rights|mode (G) diff --git a/doc/manual/Makefile.am b/doc/manual/Makefile.am index 0b3141ab..64870a52 100644 --- a/doc/manual/Makefile.am +++ b/doc/manual/Makefile.am @@ -58,6 +58,6 @@ html-local: $(XML_PAGES) @xsltproc $(HTML_STYLESHEET) manual.xml html-upload: html-local - scp $(HTML_PAGES) $$USER,netatalk@web.sourceforge.net:/home/project-web/netatalk/htdocs/3.0/htmldocs/ + scp $(HTML_PAGES) $$USER,netatalk@web.sourceforge.net:/home/project-web/netatalk/htdocs/3.1/htmldocs/ endif diff --git a/doc/manual/configuration.xml b/doc/manual/configuration.xml index 3bf6e0ff..535dd5f8 100644 --- a/doc/manual/configuration.xml +++ b/doc/manual/configuration.xml @@ -31,6 +31,12 @@ configuration file is afp.conf. It uses a ini style configuration syntax. + Support for Spotlight + Spotlight + has been added in Netatalk 3.1. See this section for information on how to + compile Netatalk with Spotlight support. + Mac OS X 10.5 (Leopard) added support for Time Machine backups over AFP. Two new functions ensure that backups are written to spinning disk, not just in the server's cache. Different host operating systems @@ -280,6 +286,16 @@ basedir regex = /usr/home only mode automatically. This is useful e.g. for CD-ROMs. + + + mysql<indexterm> + <primary>MySQL</primary> + + <secondary>"mysql" CNID backend</secondary> + </indexterm> + + CNID backend using a MySQL server. + @@ -1321,7 +1337,7 @@ aclmode = passthrough 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. + further mechanisms of inheritance control. Architectural differences between Posix ACLs and OS X ACLs especially involve: @@ -1419,7 +1435,7 @@ aclmode = passthrough afpd silently discard entries which deny a set of permissions because they they can't be represented within the - Posix architecture. + Posix architecture. @@ -1511,6 +1527,367 @@ aclmode = passthrough + + Spotlight<indexterm> + <primary>Spotlight</primary> + </indexterm> + + Starting with version 3.1 Netatalk supports Spotlight searching. + Netatalk uses Gnome Tracker as metadata store, + indexer and search engine. + + + Configuration + + You can enable Spotlight and indexing either globally or on a per + volume basis with the option. + + + Once Spotlight is enable for a single volume, all other volumes + for which spotlight is disabled won't be searchable at all. + + + In case the dbus-daemon binary is not installed + at the path /bin/dbus-daemon, you must use the + global option to point to the path, eg for + Solaris with Tracker from OpenCSW: dbus daemon = /opt/csw/bin/dbus-daemon + + + + Limitations and notes + + + + Large filesystems + + 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. + + On Solaris the FEN file event notification system is used. It + is unkown which limitations and ressource consumption this Solaris + subsystem may have. + + We therefor recommend to disable live filesystem monitoring + and let Tracker periodically scan filesystems for changes instead, + see the Tracker configuration options enable-monitors and crawling-interval below. + + + + + + Using Tracker commandline tools on the server + + Netatalk must be running, commands must be executed as root and + some environent variables must be set up (adjust PREFIX to point to + the base directory Netatalk in installed to):$ su +# cat .tracker_profile +PREFIX="/" +export XDG_DATA_HOME="$PREFIX/var/netatalk/" +export XDG_CACHE_HOME="$PREFIX/var/netatalk/" +export DBUS_SESSION_BUS_ADDRESS="unix:path=$PREFIX/var/netatalk/spotlight.ipc" +# . .tracker_profile +# + + + When using Tracker from OpenCSW you must also update your + PATH:# export PATH=/opt/csw/bin:$PATH + + + Starting and stopping Tracker + + + + Querying Tracker status + + + # tracker-control -S + + + + + Stop Tracker + + + # tracker-control -t + + + + + Start Tracker status + + + # tracker-control -s + + + + + + + Reindex directory + + # tracker-control -f PATH + + + + Query Tracker for information about a file or directory + + # tracker-info PATH + + + + Search Tracker + + # tracker-search QUERY + + + + + Advanced Tracker command line configuration + + Tracker stores its configuration via Gnome dconf backend which can + be modified with the command gsettings. + + Gnome dconf settings are per-user settings, so, as Netatalk runs + the Tracker processes as root, the settings are stored in the root user + context and reading or changing these settings must be perfomed as root + and Netatalk must be running (and again the enviroment must be set up + as shown above). + + # gsettings list-recursively | grep Tracker +org.freedesktop.Tracker.Writeback verbosity 'debug' +... + + The following list describes some important Tracker options and + their default settings. + + + + org.freedesktop.Tracker.Miner.Files + index-recursive-directories + + + This option controls which directories Tracker will index. + Don't change this option manually as it is automatically set by + Netatalk reflecting the setting of the + option of Netatalk volumes. + + + + + org.freedesktop.Tracker.Miner.Files + enable-monitors true + + + The value controls whether Tracker watches all configured + paths for modification. Depending on the filesystem modification + backend (FAM on Linux, FEN on Solaris), this feature may not work + as reliable as one might wish, so it may be safer to disable it + and instead rely on periodic crawling of Tracker itself. See aslo + the option . + + + + + org.freedesktop.Tracker.Miner.Files + crawling-interval -1 + + + Interval in days to check the filesystem is up to date in + the database, maximum is 365, default is -1. -2 = crawling is + disabled entirely, -1 = crawling *may* occur on startup (if not + cleanly shutdown), 0 = crawling is forced + + + + + + + Supported metadata attributes + + The following table lists the supported Spotlight metadata + attributes + + + Supported Spotlight metadata attributes + + + + + Description + + Spotlight Key + + + + + + Name + + kMDItemDisplayName, kMDItemFSName + + + + Document content (full text search) + + kMDItemTextContent + + + + File type + + _kMDItemGroupId, kMDItemContentTypeTree + + + + File modification date + + kMDItemFSContentChangeDate, + kMDItemContentModificationDate, + kMDItemAttributeChangeDate + + + + Content Creation date + + kMDItemContentCreationDate + + + + The author, or authors, of the contents of the + file + + kMDItemAuthors, kMDItemCreator + + + + The name of the country where the item was + created + + kMDItemCountry + + + + Duration + + kMDItemDurationSeconds + + + + Number of pages + + kMDItemNumberOfPages + + + + Document title + + kMDItemTitle + + + + The width, in pixels, of the contents. For example, the + image width or the video frame width + + kMDItemPixelWidth + + + + The height, in pixels, of the contents. For example, the + image height or the video frame height + + kMDItemPixelHeight + + + + The color space model used by the document + contents + + kMDItemColorSpace + + + + The number of bits per sample + + kMDItemBitsPerSample + + + + Focal length of the lens, in millimeters + + kMDItemFocalLength + + + + ISO speed + + kMDItemISOSpeed + + + + Orientation of the document. Possible values are 0 + (landscape) and 1 (portrait) + + kMDItemOrientation + + + + Resolution width, in DPI + + kMDItemResolutionWidthDPI + + + + Resolution height, in DPI + + kMDItemResolutionHeightDPI + + + + Exposure time, in seconds + + kMDItemExposureTimeSeconds + + + + The composer of the music contained in the audio + file + + kMDItemComposer + + + + The musical genre of the song or composition + + kMDItemMusicalGenre + + + +
+ +
+ + + References + + + + MDItem + + + + Tracker + + + +
+ Starting and stopping Netatalk diff --git a/doc/manual/install.xml b/doc/manual/install.xml index a64b3846..74de545b 100644 --- a/doc/manual/install.xml +++ b/doc/manual/install.xml @@ -1,7 +1,7 @@ - 24.8.2012 + 4.8.2013 Installation @@ -12,8 +12,6 @@ !!! - - How to obtain Netatalk @@ -54,8 +52,7 @@ Solaris package: http://www.blastwave.org/ - + url="http://www.opencsw.org/packages/CSWnetatalk/">http://www.opencsw.org/ FreeBSD ports: http://www.freebsd.org/ports/index.html @@ -99,44 +96,36 @@ Git Downloading the Git repository can be done quickly and - easily. + easily: Make sure you have Git installed. which git should produce a path to git. - $> which git + $ which git /usr/bin/git - - If you don't have one make a source directory. - cd to this directory. - - $> mkdir /path/to/new/source/dir -$> cd /path/to/new/source/dir - - Now get the source: - $> git clone git://git.code.sf.net/p/netatalk/code netatalk-code + $ git clone -b develop git://git.code.sf.net/p/netatalk/code netatalk-code Initialized empty Git repository in /path/to/new/source/dir/netatalk/.git/ remote: Counting objects: 2503, done. ... - This will create a local directory called "netatalk-code" - containing a complete and fresh copy of the whole Netatalk source - from the Git repository. + This will create a local directory called + netatalk-code containing a complete and fresh + copy of the whole Netatalk source from the Git repository. In order to keep your repository copy updated, occasionally run: - $> git pull + $ git pull @@ -145,11 +134,13 @@ remote: Counting objects: 2503, done. configure script required in the next step. - $> ./bootstrap + $ ./bootstrap - + For futher information refer to this wiki + page. @@ -167,28 +158,9 @@ remote: Counting objects: 2503, done. Berkeley DB BDB - Berkeley DB . - - At the time of writing, the following versions are - supported: - - - - minimum 4.6.x - - - - In case Berkeley DB is not installed on your system, please - download it from: - - - http://www.oracle.com/technetwork/products/berkeleydb/downloads/index.html - - and follow the installation - instructions. + At the time of writing you need at least version 4.6. @@ -211,6 +183,18 @@ remote: Counting objects: 2503, done. it's functionality. + + Tracker for Spotlight + Spotlight + support + + Netatalk uses Tracker as the + metadata backend. Recent Linux distributions will provide the + libtracker-sparql library which is available since Tracker version + 0.7. + + mDNSresponderPOSIX or Avahi for Bonjour (aka Zeroconf) @@ -220,12 +204,6 @@ remote: Counting objects: 2503, done. Avahi must be build with DBUS support ( --enable-dbus). - - You can download Avahi from: http://www.avahi.org/. - - You can download mDNSresponder from: http://opensource.apple.com/tarballs/mDNSResponder/. @@ -237,9 +215,6 @@ remote: Counting objects: 2503, done. 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. - - TCP Wrappers can be downloaded from: ftp://ftp.porcupine.org/pub/security/ @@ -257,10 +232,6 @@ remote: Counting objects: 2503, done. Microsystems. Linux-PAM is a suite of shared libraries that enable the local system administrator to choose how applications authenticate users. - - You can get the Linux PAM documentation and sources from - http://www.kernel.org/pub/linux/libs/pam/. @@ -271,9 +242,6 @@ remote: Counting objects: 2503, done. 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. - - You can download GNU libiconv from: http://www.gnu.org/software/libiconv/. @@ -294,7 +262,7 @@ remote: Counting objects: 2503, done. automatically configure Netatalk for your operating system. If you have unusual needs, then you may wish to run - $> ./configure --help + $ ./configure --help to see what special options you can enable. @@ -319,25 +287,72 @@ remote: Counting objects: 2503, done. Now run configure with any options you need - $> ./configure [arguments] + $ ./configure [arguments] Configure will end up in an overview showing the settings the Netatalk Makefiles have been created with. + + + + Spotlight<indexterm> + <primary>Spotlight</primary> + </indexterm> + + Netatalk uses Gnome Tracker as the + metadata backend. The minimum required version is 0.7 as that's the + first version to support SPARQL. + + If not already installed, install the packages + tracker and tracker-devel, + on Solaris install OpenCSW and then install + the Tracker package from the OpenCSW unstable repository. + + 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 + + $ pkg-config --list-all | grep tracker +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 + + So: - If this step fails please visit the troubleshooting - guide. + $ ./configure --with-tracker-pkgconfig-version=0.16 ... + + If you're using Solaris and Tracker from OpenCSW, then you need + to set the PKG_CONFIG_PATH environment variable, add the + --with-tracker-prefix configure option and add + LDFLAGS="-R/opt/csw/lib" + + PKG_CONFIG_PATH=/opt/csw/lib/pkgconfig LDFLAGS="-R/opt/csw/lib" ./configure --with-tracker-prefix=/opt/csw --with-tracker-pkgconfig-version=0.16 ... + + Check the configure output whether the Tracker libs were + found: + + checking for TRACKER... yes +checking for TRACKER_MINER... yes +... +Configure summary: +... + AFP: + Spotlight: yes +... + + + + Compile and install Next, running - $> make + $ make should produce the Netatalk binaries (this step can take several minutes to complete). When the process finished you can use - $> make install + $ make install to install the binaries and documentation (must be done as "root" when using default locations). diff --git a/doc/manual/manual.xml.in b/doc/manual/manual.xml.in index 64ebd6c7..7c067efb 100644 --- a/doc/manual/manual.xml.in +++ b/doc/manual/manual.xml.in @@ -28,10 +28,10 @@ ]> - Netatalk 3.0 Manual + Netatalk 3.1 Manual - 03-24-2013 + 07-01-2013 @NETATALK_VERSION@ diff --git a/doc/manual/netatalk.html b/doc/manual/netatalk.html index b0b7904b..0c7e3371 100644 --- a/doc/manual/netatalk.html +++ b/doc/manual/netatalk.html @@ -4,7 +4,7 @@