Commits (418)
......@@ -30,9 +30,6 @@ depcomp
gtk-doc.make
install-sh
install.rdf
intltool-extract.in
intltool-merge.in
intltool-update.in
libtool
ltmain.sh
missing
......
stages:
- test
test-autotools-fedora-latest:
test-fedora-latest:
stage: test
image: registry.gitlab.gnome.org/sthursfield/tracker-oci-images/amd64/fedora:latest
script:
- su tracker -c './autogen.sh --prefix=/usr'
- su tracker -c 'make -j'
- LANG=en_US.UTF8 VERBOSE=1 su tracker -c 'dbus-launch make check'
- su tracker -c 'make functional-test'
test-meson-fedora-latest:
stage: test
image: registry.gitlab.gnome.org/sthursfield/tracker-oci-images/amd64/fedora:latest
image: registry.gitlab.gnome.org/gnome/tracker-oci-images/amd64/fedora:latest
script:
- su tracker -c 'mkdir build'
- su tracker -c 'cd build; meson ..'
- su tracker -c 'cd build; meson .. -Db_lto=true'
- su tracker -c 'cd build; ninja'
- |
# Remove the many "CI_" variables from the environment. Meson dumps the
......@@ -25,4 +15,9 @@ test-meson-fedora-latest:
# screenful of junk each time unless we strip these.
unset $(env|grep -o '^CI_[^=]*')
su tracker -c 'cd build; LANG=en_US.UTF8 dbus-launch meson test --print-errorlogs'
su tracker -c 'cd build; meson test --print-errorlogs'
artifacts:
when: always
paths:
- build/meson-logs/testlog.txt
include $(top_srcdir)/Makefile.decl
SUBDIRS = src docs po utils examples
if HAVE_UNIT_TESTS
SUBDIRS += tests
endif
#if ENABLE_GCOV
.PHONY: coverage coverage-report
coverage:
find $(top_srcdir) -name "*.gcda" | xargs rm -f
$(MAKE) $(AM_MAKEFLAGS) test
coverage-report: coverage
lcov --directory $(top_srcdir)/src --capture --output-file $(top_builddir)/lcov.info
lcov --directory $(top_srcdir)/src --output-file $(top_builddir)/lcov.info --remove $(top_builddir)/lcov.info \
tracker-sparql-builder.c \
tracker-sparql-expression.c \
tracker-sparql-pattern.c \
tracker-sparql-query.c \
tracker-sparql-scanner.c \
tracker-turtle-reader.c \
tracker-turtle-writer.c \
libtracker-bus/tracker-array-cursor.c \
libtracker-bus/tracker-bus-fd-cursor.c \
libtracker-bus/tracker-bus.c \
libtracker-direct/tracker-direct.c \
libtracker-miner/tracker-storage.c \
libtracker-miner/tracker-dbus.c \
libtracker-miner/tracker-miner-fs.c \
libtracker-miner/tracker-miner-object.c \
libtracker-miner/tracker-miner-web.c \
libtracker-miner/tracker-network-provider.c \
libtracker-miner/tracker-network-provider-network-manager.c \
libtracker-sparql/tracker-builder.c \
libtracker-sparql/tracker-connection.c \
libtracker-sparql/tracker-cursor.c \
libtracker-sparql/tracker-plugin-loader.c \
libtracker-sparql/tracker-utils.c \
libtracker-sparql-backend/tracker-backend.c \
tracker-store/tracker-backup.c \
tracker-store/tracker-dbus.c \
tracker-store/tracker-main.c \
tracker-store/tracker-resources.c \
tracker-store/tracker-statistics.c \
tracker-store/tracker-status.c \
tracker-store/tracker-steroids.c \
tracker-store/tracker-store.c \
tracker-control/* \
libstemmer/stem_UTF_8_* \
tracker-control/tracker-miner-files-index-client.h \
"*.vapi" \
rm -rf $(top_builddir)/coverage
$(MKDIR_P) $(top_builddir)/coverage
genhtml --title "@PACKAGE_STRING@" --output-directory $(top_builddir)/coverage $(top_builddir)/lcov.info
#endif
distclean-local:
if test "x$(srcdir)" = "x."; then :; else \
rm -f ChangeLog; \
fi
.PHONY: ChangeLog
gen_start_date = 2009-04-10
ChangeLog:
$(AM_V_GEN) if test -d "$(srcdir)/.git"; then \
$(top_srcdir)/gitlog-to-changelog --since=$(gen_start_date) > $@.tmp \
&& mv -f $@.tmp $@ \
|| ($(RM) $@.tmp; \
echo Failed to generate ChangeLog, your ChangeLog may be outdated >&2; \
(test -f $@ || echo git-log is required to generate this file >> $@)); \
else \
test -f $@ || \
(echo A git checkout and git-log is required to generate ChangeLog >&2 && \
echo A git checkout and git-log is required to generate this file >> $@); \
fi
functional-test:
cd tests/functional-tests/ && $(MAKE) $(AM_MAKEFLAGS) $@
EXTRA_DIST += \
config.h.meson.in \
ChangeLog.pre-0-6-93 \
COPYING.GPL \
COPYING.LGPL \
gitlog-to-changelog \
intltool-extract.in \
intltool-merge.in \
intltool-update.in \
po/meson.build \
meson.build \
meson_options.txt \
tracker.doap \
tap-driver.sh \
tap-test
DISTCLEANFILES += \
intltool-extract \
intltool-merge \
intltool-update
DISTCHECK_CONFIGURE_FLAGS = \
--with-session-bus-services-dir="\$(datadir)"/dbus-1/services \
--with-bash-completion-dir="\$(datadir)"/bash-completion/ \
--disable-nautilus-extension \
--enable-unit-tests \
--enable-functional-tests \
--enable-gtk-doc \
--enable-introspection \
--disable-miner-rss \
--disable-miner-evolution \
--disable-miner-thunderbird \
--disable-miner-firefox \
--enable-poppler \
--enable-exempi \
--enable-libiptcdata \
--enable-libjpeg \
--enable-libtiff \
--enable-libvorbis \
--enable-libflac \
--enable-libgsf \
--enable-playlist \
--enable-tracker-preferences \
--enable-enca
ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
TESTS_ENVIRONMENT= \
G_TEST_SRCDIR="$(abs_srcdir)" \
G_TEST_BUILDDIR="$(abs_builddir)" \
G_DEBUG=gc-friendly \
MALLOC_CHECK_=2 \
MALLOC_PERTURB_=$$(($${RANDOM:-256} % 256))
LOG_DRIVER = env AM_TAP_AWK='$(AWK)' $(SHELL) $(top_srcdir)/tap-driver.sh
LOG_COMPILER = $(top_srcdir)/tap-test
NULL =
# initialize variables for unconditional += appending
BUILT_SOURCES =
BUILT_EXTRA_DIST =
CLEANFILES = *.log *.trs
DISTCLEANFILES =
MAINTAINERCLEANFILES =
EXTRA_DIST =
TESTS =
installed_test_LTLIBRARIES =
installed_test_PROGRAMS =
installed_test_SCRIPTS =
nobase_installed_test_DATA =
noinst_LTLIBRARIES =
noinst_PROGRAMS =
noinst_SCRIPTS =
noinst_DATA =
check_LTLIBRARIES =
check_PROGRAMS =
check_SCRIPTS =
check_DATA =
# We support a fairly large range of possible variables. It is expected that all types of files in a test suite
# will belong in exactly one of the following variables.
#
# First, we support the usual automake suffixes, but in lowercase, with the customary meaning:
#
# test_programs, test_scripts, test_data, test_ltlibraries
#
# The above are used to list files that are involved in both uninstalled and installed testing. The
# test_programs and test_scripts are taken to be actual testcases and will be run as part of the test suite.
# Note that _data is always used with the nobase_ automake variable name to ensure that installed test data is
# installed in the same way as it appears in the package layout.
#
# In order to mark a particular file as being only for one type of testing, use 'installed' or 'uninstalled',
# like so:
#
# installed_test_programs, uninstalled_test_programs
# installed_test_scripts, uninstalled_test_scripts
# installed_test_data, uninstalled_test_data
# installed_test_ltlibraries, uninstalled_test_ltlibraries
#
# Additionally, we support 'extra' infixes for programs and scripts. This is used for support programs/scripts
# that should not themselves be run as testcases (but exist to be used from other testcases):
#
# test_extra_programs, installed_test_extra_programs, uninstalled_test_extra_programs
# test_extra_scripts, installed_test_extra_scripts, uninstalled_test_extra_scripts
#
# Additionally, for _scripts and _data, we support the customary dist_ prefix so that the named script or data
# file automatically end up in the tarball.
#
# dist_test_scripts, dist_test_data, dist_test_extra_scripts
# dist_installed_test_scripts, dist_installed_test_data, dist_installed_test_extra_scripts
# dist_uninstalled_test_scripts, dist_uninstalled_test_data, dist_uninstalled_test_extra_scripts
#
# Note that no file is automatically disted unless it appears in one of the dist_ variables. This follows the
# standard automake convention of not disting programs scripts or data by default.
#
# test_programs, test_scripts, uninstalled_test_programs and uninstalled_test_scripts (as well as their disted
# variants) will be run as part of the in-tree 'make check'. These are all assumed to be runnable under
# gtester. That's a bit strange for scripts, but it's possible.
TESTS += $(test_programs) $(test_scripts) $(uninstalled_test_programs) $(uninstalled_test_scripts) \
$(dist_test_scripts) $(dist_uninstalled_test_scripts)
# Note: build even the installed-only targets during 'make check' to ensure that they still work.
# We need to do a bit of trickery here and manage disting via EXTRA_DIST instead of using dist_ prefixes to
# prevent automake from mistreating gmake functions like $(wildcard ...) and $(addprefix ...) as if they were
# filenames, including removing duplicate instances of the opening part before the space, eg. '$(addprefix'.
all_test_programs = $(test_programs) $(uninstalled_test_programs) $(installed_test_programs) \
$(test_extra_programs) $(uninstalled_test_extra_programs) $(installed_test_extra_programs)
all_test_scripts = $(test_scripts) $(uninstalled_test_scripts) $(installed_test_scripts) \
$(test_extra_scripts) $(uninstalled_test_extra_scripts) $(installed_test_extra_scripts)
all_dist_test_scripts = $(dist_test_scripts) $(dist_uninstalled_test_scripts) $(dist_installed_test_scripts) \
$(dist_test_extra_scripts) $(dist_uninstalled_test_extra_scripts) $(dist_installed_test_extra_scripts)
all_test_scripts += $(all_dist_test_scripts)
EXTRA_DIST += $(all_dist_test_scripts)
all_test_data = $(test_data) $(uninstalled_test_data) $(installed_test_data)
all_dist_test_data = $(dist_test_data) $(dist_uninstalled_test_data) $(dist_installed_test_data)
all_test_data += $(all_dist_test_data)
EXTRA_DIST += $(all_dist_test_data)
all_test_ltlibs = $(test_ltlibraries) $(uninstalled_test_ltlibraries) $(installed_test_ltlibraries)
if ENABLE_ALWAYS_BUILD_TESTS
noinst_LTLIBRARIES += $(all_test_ltlibs)
noinst_PROGRAMS += $(all_test_programs)
noinst_SCRIPTS += $(all_test_scripts)
noinst_DATA += $(all_test_data)
else
check_LTLIBRARIES += $(all_test_ltlibs)
check_PROGRAMS += $(all_test_programs)
check_SCRIPTS += $(all_test_scripts)
check_DATA += $(all_test_data)
endif
if ENABLE_INSTALLED_TESTS
installed_test_PROGRAMS += $(test_programs) $(installed_test_programs) \
$(test_extra_programs) $(installed_test_extra_programs)
installed_test_SCRIPTS += $(test_scripts) $(installed_test_scripts) \
$(test_extra_scripts) $(test_installed_extra_scripts)
installed_test_SCRIPTS += $(dist_test_scripts) $(dist_test_extra_scripts) \
$(dist_installed_test_scripts) $(dist_installed_test_extra_scripts)
nobase_installed_test_DATA += $(test_data) $(installed_test_data)
nobase_installed_test_DATA += $(dist_test_data) $(dist_installed_test_data)
installed_test_LTLIBRARIES += $(test_ltlibraries) $(installed_test_ltlibraries)
installed_testcases = $(test_programs) $(installed_test_programs) \
$(test_scripts) $(installed_test_scripts) \
$(dist_test_scripts) $(dist_installed_test_scripts)
installed_test_meta_DATA = $(installed_testcases:=.test)
%.test: %$(EXEEXT) Makefile
$(AM_V_GEN) (echo '[Test]' > $@.tmp; \
echo 'Type=session' >> $@.tmp; \
echo 'Exec=$(installed_testdir)/$(notdir $<) --tap' >> $@.tmp; \
echo 'Output=TAP' >> $@.tmp; \
mv $@.tmp $@)
CLEANFILES += $(installed_test_meta_DATA)
endif
NEW in 2.2.99.0 - 2019-08-07
============================
* Support for storing Musicbrainz metadata in the multimedia ontology.
* Doc cleanups
* Test suite improvements
* Build fixes
* Fix detection of files that need writeback
* Fix crashes and invalid memory writes
NEW in 2.2.2 - 2019-05-02
=========================
* Fixed initialization of virtual tables
* Fixed segmentation fault in libtracker-miner
* Don't try to create JSON-LD nodes with unsigned integers
* Handle correctly backreferences in TrackerResource tree
* Many documentation fixes
* Fixed handling doubles with exponents in SPARQL
* Don't limit to specific desktop environments
* Build and test fixes
Translations: hr
NEW in 2.2.1 - 2019-03-06
=========================
* Fix unichar unescaping
* Correctly Handle BIND in first place of a triples block
* Fix possible deadlock on WAL checkpoint
* Fix some double values not being deleted
* Fixed CHANGES_DONE_HINT handling in TrackerMonitor
* Ported data generator utilities to python3
* Ported functional tests to python3, reformatted to PEP-8
* Correctly apply ignored-directories-with-content filter on monitor updates
* Build and test fixes
Translations: de, eo, fur, fr, it, ko, lv, nl, ru, sr
NEW in 2.2.0 - 2019-02-20
=========================
* Multiple memory leak and corruption fixes
* Bumped glib minimum version to 2.46, it already was in practical terms
* Test suite improvements
* Restore log domain
Translations: ca, cs, da, kk, lt, pt_BR, sv, zh_TW
Highlighted changes since 2.1.x:
--------------------------------
* New SPARQL parser, able to generate SQL that is generally more readable
and at places performs better. Multiple buglets fixed in the process
* Much improved support of SPARQL1.1 features and syntax that was missing:
- Property paths: Allowing to match connectivity between two resources
by an arbitrary length path. There is a number of supported operators
(alternative, sequence, oneOrMany, ...) that can be combined, e.g:
SELECT ?s ?p { ?s ^(nfo:belongsToContainer*)/(nie:url|nie:title) ?p }
Only the negated path operator (!) is not supported at the moment.
- Support for fully unrestricted queries, eg:
SELECT ?s ?p ?o { ?s ?p ?o } ORDER BY ?o ?p ?s
Queries with unrestricted predicate (?p in the example above) were
just supported in a very restricted set of situations. All those
limitations are gone.
- MINUS allows subtracting the solutions that match the given triples
template, eg:
SELECT ?s { ?s a nfo:Media } MINUS { ?s a nfo:MusicPiece }
* Support for prepared statements. TrackerSparqlStatement can be built
with SELECT queries containing (custom) ~var syntax, and updating
their values before obtaining a cursor.
* Many tests were added, and Tracker is generally much better tested thanks
to CI.
* tracker-store now automatically shuts down on inactivity.
NOTE TO PACKAGERS: This release might trigger ABI checks, as
TrackerSparqlConnectionClass struct size grew. This object can only
be subclassed within Tracker and instantiated through Tracker API, so
the change is inconsequential.
NEW in 2.2.0-alpha2 - 2019-02-06
================================
* More property paths supported, new operators supported are *, +, ? and |,
only the ! operator is not supported yet.
* Multiple fixes to the new sparql parser.
* Improve error handling in DBus backend
* Many improvements and additions to the test suite
* Fixed potential crash in TrackerMonitor.
Translations: el, es, fur, fr, gl, id, pl, ro, sl, sv, tr
NEW in 2.2.0-alpha1 - 2018-11-13
================================
* New SPARQL parser, able to support more 1.1 features and generating
friendlier SQL at places. There is initial support for property
paths (/ and ^), and other missing 1.1 syntax (MINUS, SHA384, ...).
More improvements are expected to happen in the future thanks to this.
* Support for prepared statements. TrackerSparqlStatement can be built
with SELECT queries containing (custom) ~var syntax, and updating
their values before obtaining a cursor.
* Added global libtracker-sparql call to change the used DBus connection
at runtime.
* Made tracker-store to automatically shutdown when unneeded.
* Fixed ontology updates to work with behavioral changes in
sqlite >=3.25.
* Support for building through autotools has been removed.
* Other many build and code cleanups and fixes
Translations: pl, sl, sr
NEW in 2.1.4 - 2018-09-04
=========================
......
1 Introduction
Tracker is a search engine and that allows the user to find their
data as fast as possible. Users can search for their files and
search for content in their files too.
Tracker is a semantic data storage for desktop and mobile devices.
Tracker uses W3C standards for RDF ontologies using Nepomuk with
SPARQL to query and update the data.
Tracker is a central repository of user information, that provides
two big benefits for the desktop; shared data between applications
and information which is relational to other information (for
example: mixing contacts with files, locations, activities and
etc.).
This central repository works with a well defined data model that
applications can rely on to store and recover their information.
That data model is defined using a semantic web artifact called
ontology. An ontology defines the relationships between the
information stored in the repository.
An EU-funded project called Nepomuk was started to define some of
the core ontologies to be modeled on the Desktop. Tracker uses this
to define the data's relationships in a database.
All discussion related to tracker happens on the Tracker
mailing list
http://mail.gnome.org/mailman/listinfo/tracker-list
IRC channel #tracker on:
irc.gimp.net
Bugs and feature requests should be filed at:
http://bugzilla.gnome.org
More infomation on Tracker can be found at:
http://wiki.gnome.org/Projects/Tracker
Repository (first is read-only, second is write access):
git://git.gnome.org/tracker
ssh://<user>@git.gnome.org/git/tracker
The official RoadMap (aka TODO) can be found at:
http://wiki.gnome.org/Projects/Tracker/Roadmap
2 Use Cases
Tracker is the most powerful open source metadata database and
indexer framework currently available and because it is built
around a combination indexer and SQL database and not a
dedicated indexer, it has much more powerful use cases:
* Provide search and indexing facilities similar to those on
other systems (Windows Vista and Mac OS X).
* Common database storage for all first class objects (e.g. a
common music/photo/contacts/email/bookmarks/history database)
complete with additional metadata and tags/keywords.
* Comprehensive one stop solution for all applications needing
an object database, powerful search (via RDF Query), first class
methods, related metadata and user-definable metadata/tags.
* Can provide a full semantic desktop with metadata everywhere.
* Can provide powerful criteria-based searching suitable for
creating smart file dialogs and vfolder systems.
* Can provide a more intelligent desktop using statistical
metadata.
3 Features
* Desktop-neutral design (it's a freedesktop product built
around other freedesktop technologies like D-Bus and XDGMime
but contains no GNOME-specific dependencies besides GLib).
* Very memory efficient. Unlike some other indexers, Tracker is
designed and built to run well on mobile and desktop systems with
lower memory (256MB or less).
* Non-bloated and written in C for maximum efficiency.
* Small size and minimal dependencies makes it easy to bundle
into various distros, including live CDs.
* Provides option to disable indexing when running on battery.
* Provides option to index removable devices.
* Implements the freedesktop specification for metadata
(http://freedesktop.org/wiki/Standards/shared-filemetadata-spec).
* Extracts embedded File, Image, Document and Audio type
metadata from files.
* Supports the WC3's RDF Query syntax for querying metadata.
* Provides support for both free text search (like Beagle/Google)
as well as structured searches using RDF Query.
* Responds in real time to file system changes to keep its
metadata database up to date and in sync.
* Fully extensible with custom metadata - you can store,
retrieve, register and search via RDF Query all your own custom
metadata.
* Can extract a file's contents as plain text and index them.
* Can provide thumbnailing on the fly.
* It auto-pauses indexing when running low on diskspace.
4 Compilation
The git repository contains input to the GNU Autotools however a
number of commands need to be run to initialize GNU Autotools in the
project directory. To setup the project for compilation after
checking it out from the git repository, use:
./autogen.sh --prefix=/usr --sysconfdir=/etc --localstatedir=/var
Or if you don't have autogen.sh (i.e. you are using the released
tarball), you can use:
./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var
To start compiling the project use:
make
sudo make install
If you install using any other prefix, you might have problems
with files not being installed correctly. (You may need to copy
and amend the dbus service file to the correct directory and/or
might need to update ld_conf if you install into non-standard
directories.)
4.1 Notes on Solaris
To compile Tracker with GCC on Solaris uses the following
commands :
CFLAGS="-D_POSIX_PTHREAD_SEMANTICS" ./configure \
--prefix=/usr \
--sysconfdir=/etc \
--localstatedir=/var \
--with-pic
make
sudo make install
To compile Tracker with SUN Studio on Solaris uses the
following commands, because there are some problems to compile
exiv2 using SUN C++ compiler :
CFLAGS="-D_POSIX_PTHREAD_SEMANTICS" ./configure \
--prefix=/usr \
--sysconfdir=/etc \
--localstatedir=/var \
--with-pic \
--disable-exiv2
make
sudo make install
4.2 Compile Options
Tracker has several compiler options to enable/disable certain
features. You can get a full listing by running
./configure --help
5 Running Tracker
5.1 Usage
Tracker normally starts itself when users log in. You can indexing by running:
$prefix/libexec/tracker-miner-fs
You can configure how this works using:
$prefix/bin/tracker-preferences
You can monitor data miners using:
$prefix/bin/tracker-status-icon
You can do simple searching using an applet:
$prefix/libexec/tracker-search-bar
You can do more extensive searching using:
$prefix/bin/tracker-search-tool
5.2 Setting Inotify Watch Limit
When watching large numbers of folders, its possible to exceed
the default number of inotify watches. In order to get real time
updates when this value is exceeded it is necessary to increase
the number of allowed watches. This can be done as follows:
1. Add this line to /etc/sysctl.conf:
"fs.inotify.max_user_watches = (number of folders to be
watched; default used to be 8192 and now is 524288)"
2. Reboot the system OR (on a Debian-like system) run
"sudo /etc/init.d/procps restart"
6 Further Help
6.1 Man pages
Every config file and every binary has a man page. If you start with
tracker-store, you should be able to find out about most other
commands on the SEE ALSO section.
6.2 Utilities
There are a range of tracker utilities that help you query for data.
# Tracker
Tracker is an efficient search engine and
[triplestore](https://en.wikipedia.org/wiki/Triplestore) for desktop, embedded
and mobile.
The Tracker project is divided into two main repositories:
* [Tracker core](https://gitlab.gnome.org/GNOME/tracker) contains the database
(*tracker-store*), the database ontologies, the commandline user
interface (`tracker`), and several support libraries.
* [Tracker Miners](https://gitlab.gnome.org/GNOME/tracker-miners) contains
the indexer daemon (*tracker-miner-fs*) and tools to extract metadata
from many different filetypes.
More information on Tracker can be found at:
* <https://wiki.gnome.org/Projects/Tracker>
Source code and issue tracking:
* <https://gitlab.gnome.org/GNOME/tracker>
All discussion related to Tracker happens on:
* <https://mail.gnome.org/mailman/listinfo/tracker-list>
IRC channel #tracker on:
* [irc.gimp.net](irc://irc.gimp.net)
Related projects:
* [GNOME Online Miners](https://gitlab.gnome.org/GNOME/gnome-online-miners/)
extends Tracker to allow searching and indexing some kinds of online
content.
# Developing Tracker
If you want to help develop and improve Tracker, great! Remember that Tracker
is a middleware component, designed to be integrated into larger codebases. To
fully test a change you may need to build and test Tracker as part of another
project.
For the GNOME desktop, consider using the documented [Building a System
Component](https://wiki.gnome.org/Newcomers/BuildSystemComponent) workflow.
It's also possible to build Tracker on its own and install it inside your home
directory for testing purposes. Read on for instructions on how to do this.
## Compilation
Tracker uses the [Meson build system](http://mesonbuild.com), which you must
have installed in order to build Tracker.
We recommend that you build tracker core as a subproject of tracker-miners.
You can do this by cloning both repos, then creating a symlink in the
`subprojects/` directory of tracker-miners.git to the tracker.git checkout.
git clone https://gitlab.gnome.org/GNOME/tracker.git
git clone https://gitlab.gnome.org/GNOME/tracker-miners.git
mkdir tracker-miners/subprojects
ln -s ../../tracker tracker-miners/subprojects/
Now you can run the commands below to build Tracker and install it in a
new, isolated prefix named `opt/tracker` inside your home folder.
> NOTE: If you see 'dependency not found' errors from Meson, that means there
> is a package missing on your computer that you need to install so you can
> compile Tracker. On Ubuntu/Debian, you can run `apt build-dep tracker-miners`
> and on Fedora `dnf build-dep tracker-miners` to install all the necessary
> packages.
cd tracker-miners
meson ./build --prefix=$HOME/opt/tracker -Dtracker_core=subproject
cd build
ninja install
## Running the testsuite
At this point you can run the Tracker test suite from the `build` directory:
meson test --print-errorlogs
## Developing with tracker-sandbox
Tracker normally runs automatically, indexing content in the background so that
search results are available quickly when needed.
When developing and testing Tracker you will normally want it to run in the
foreground instead. The `tracker-sandbox` tool exists to help with this.
You can run the tool directly from the tracker.git source tree. Ensure you are
in the top of the tracker source tree and type this to see the --help output:
./utils/sandbox/tracker-sandbox.py --help
You should always pass the `--prefix` option, which should be the same as the
--prefix argument you passed to Meson. You also need to use `--index` which
controls where internal state files like the database are kept. You may also
want to pass `--debug` to see detailed log output.
Now you can index some files using `--update` mode. Here's how to index files
in `~/Documents` for example:
./utils/sandbox/tracker-sandbox.py --prefix ~/opt/tracker --index ~/tracker-content \
--update --content ~/Documents
You can then list the files that have been indexed...
./utils/sandbox/tracker-sandbox.py --prefix ~/opt/tracker --index ~/tracker-content \
--list-files
... run a full-text search ...
./utils/sandbox/tracker-sandbox.py --prefix ~/opt/tracker --index ~/tracker-content \
--search "bananas"
... or run a SPARQL query on the content:
./utils/sandbox/tracker-sandbox.py --prefix ~/opt/tracker --index ~/tracker-content \
--sparql "SELECT ?url { ?resource a nfo:FileDataObject ; nie:url ?url . }"
You can also open a shell inside the sandbox environment. From here you can run
the `tracker` commandline tool, and you can run the Tracker daemons manually
under a debugger such as GDB.
For more information about developing Tracker, look at
https://wiki.gnome.org/Projects/Tracker.
#!/bin/sh
# Run this to generate all the initial makefiles, etc.
test -n "$srcdir" || srcdir=$(dirname "$0")
test -n "$srcdir" || srcdir=.
olddir=$(pwd)
cd $srcdir
(test -f configure.ac) || {
echo "*** ERROR: Directory '$srcdir' does not look like the top-level project directory ***"
exit 1
}
# shellcheck disable=SC2016
PKG_NAME=$(autoconf --trace 'AC_INIT:$1' configure.ac)
aclocal --install || exit 1
gtkdocize --copy || exit 1
intltoolize --force --copy --automake || exit 1
autoreconf --verbose --force --install || exit 1
cd "$olddir"
if [ "$NOCONFIGURE" = "" ]; then
# If no arguments are given, use those used with distcheck
# equally, use the JHBuild prefix if it is available otherwise fall
# back to the default (/usr/local)
if [ $# -eq 0 ] ; then
echo "Using distcheck arguments, none were supplied..."
if test -n "$JHBUILD_PREFIX" ; then
echo "Using JHBuild prefix ('$JHBUILD_PREFIX')"
NEW_PREFIX="--prefix $JHBUILD_PREFIX --with-bash-completion-dir=$JHBUILD_PREFIX/share/bash-completion/completions"
fi
NEW_ARGS="\
--disable-nautilus-extension \
--enable-unit-tests \
--enable-functional-tests \
--enable-gtk-doc \
--enable-introspection \
--disable-miner-rss \
--disable-miner-evolution \
--disable-miner-thunderbird \
--disable-miner-firefox \
--enable-poppler \
--enable-exempi \
--enable-libiptcdata \
--enable-libjpeg \
--enable-libtiff \
--enable-libvorbis \
--enable-libflac \
--enable-libgsf \
--enable-playlist \
--enable-tracker-preferences \
--enable-enca"
set -- $NEW_PREFIX $NEW_ARGS
fi
$srcdir/configure "$@" || exit 1
if [ "$1" = "--help" ]; then exit 0 else
echo "Now type 'make' to compile $PKG_NAME" || exit 1
fi
else
echo "Skipping configure process."
fi
This diff is collapsed.
tracker_gsettings_schemas = files([
'org.freedesktop.Tracker.DB.gschema.xml',
'org.freedesktop.Tracker.FTS.gschema.xml',
'org.freedesktop.Tracker.gschema.xml',
'org.freedesktop.Tracker.Store.gschema.xml'
])
foreach schema : tracker_gsettings_schemas
schemas = configure_file(
input: schema,
output: '@PLAINNAME@',
copy: true,
install: true,
install_dir: gsettings_schema_dir)
endforeach
tracker_store_settings_enums = custom_target('tracker-store-settings-enums',
input: tracker_common_enums_header,
output: 'org.freedesktop.Tracker.enums.xml',
command: [glib_mkenums,
'--comments', '<!-- @comment@ -->',
'--fhead', '<schemalist>',
'--vhead', '<@type@ id="org.freedesktop.Tracker.@EnumName@">',
'--vprod', ' <value nick="@valuenick@" value="@valuenum@"/>',
'--vtail', ' </@type@>',
'--ftail', '</schemalist>', '@INPUT@'],
capture: true,
install: true,
install_dir: gsettings_schema_dir)
# Compile schemas locally so that the functional-tests can use them without
# them being installed into /usr.
#
custom_target('compile-schemas',
output: 'gschemas.compiled',
command: [glib_compile_schemas, meson.current_build_dir()],
build_by_default: true,
depends: tracker_store_settings_enums)
tracker_uninstalled_gsettings_schema_dir = meson.current_build_dir()
......@@ -21,13 +21,13 @@ Boston, MA 02110-1301, USA.
<schema id="org.freedesktop.Tracker.DB" path="/org/freedesktop/tracker/db/" gettext-domain="tracker">
<key name="journal-chunk-size" type="i">
<default>50</default>
<_summary>Maximum size of journal</_summary>
<_description>Size of the journal at rotation in MB. Use -1 to disable rotating.</_description>
<summary>Maximum size of journal</summary>
<description>Size of the journal at rotation in MB. Use -1 to disable rotating.</description>
</key>
<key name="journal-rotate-destination" type="s">
<default>''</default>
<_summary>Location of journal pieces</_summary>
<_description>Where to store a journal chunk when it hits the max size.</_description>
<summary>Location of journal pieces</summary>
<description>Where to store a journal chunk when it hits the max size.</description>
</key>
</schema>
</schemalist>
......@@ -23,37 +23,37 @@ Boston, MA 02110-1301, USA.
<key name="max-word-length" type="i">
<default>30</default>
<range min="0" max="200"/>
<_summary>Maximum length of a word to be indexed</_summary>
<_description>Words with more characters than this length will be ignored by the indexer.</_description>
<summary>Maximum length of a word to be indexed</summary>
<description>Words with more characters than this length will be ignored by the indexer.</description>
</key>
<key name="max-words-to-index" type="i">
<default>10000</default>
<_summary>Maximum number of words to index in a document</_summary>
<_description>Indexer will read only this maximum number of words from a single document.</_description>
<summary>Maximum number of words to index in a document</summary>
<description>Indexer will read only this maximum number of words from a single document.</description>
</key>
<key name="enable-stemmer" type="b">
<_summary>Enable stemmer</_summary>
<_description>Simplify the words to their root to provide more results. E.g. “shelves” and “shelf” to “shel”</_description>
<summary>Enable stemmer</summary>
<description>Simplify the words to their root to provide more results. E.g. “shelves” and “shelf” to “shel”</description>
<default>false</default>
</key>
<key name="enable-unaccent" type="b">
<_summary>Enable unaccent</_summary>
<_description>Translate accented characters to the equivalent unaccented. E.g. “Idéa” to “Idea” for improved matching. </_description>
<summary>Enable unaccent</summary>
<description>Translate accented characters to the equivalent unaccented. E.g. “Idéa” to “Idea” for improved matching. </description>
<default>true</default>
</key>
<key name="ignore-numbers" type="b">
<_summary>Ignore numbers</_summary>
<_description>If enabled, numbers will not be indexed.</_description>
<summary>Ignore numbers</summary>
<description>If enabled, numbers will not be indexed.</description>
<default>true</default>
</key>
<key name="ignore-stop-words" type="b">
<_summary>Ignore stop words</_summary>
<_description>If enabled, the words listed in the stop-words list are ignored. E.g. common words like “the”, “yes”, “no”, etc.</_description>
<summary>Ignore stop words</summary>
<description>If enabled, the words listed in the stop-words list are ignored. E.g. common words like “the”, “yes”, “no”, etc.</description>
<default>true</default>
</key>
......
......@@ -21,13 +21,13 @@ Boston, MA 02110-1301, USA.
<schema id="org.freedesktop.Tracker.Store" path="/org/freedesktop/tracker/store/" gettext-domain="tracker">