summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* docs: Document --http-port/--loopback options in endpoint manpagewip/carlosg/http-endpointCarlos Garnacho2020-12-131-0/+18
|
* tracker: Add --loopback option to "tracker3 endpoint"Carlos Garnacho2020-12-131-0/+30
| | | | | | | | | This combines with --http-port and HTTP endpoints. Allows running the endpoint in a way that only connections via the loopback device are allowed. This might be useful for testing, without maybe leaking undesired details on the outside.
* libtracker-sparql: Add signal to control access to HTTP endpointCarlos Garnacho2020-12-131-0/+37
| | | | | | | This signal is meant for simple access control, and receives the GSocketAddress corresponding to the remote connection. Users may connect a signal handler to block the connection based on that data (e.g. allowing different scopes, loopback connections, local networks, ...).
* tests: Add basic functional test for the HTTP endpointCarlos Garnacho2020-12-132-0/+50
| | | | Test it via the CLI atm, in order to exercise as much as possible.
* tracker: Add --http-port option to "tracker3 endpoint" commandCarlos Garnacho2020-12-131-1/+66
| | | | Let "tracker3 endpoint" expose HTTP endpoints as well as D-Bus ones.
* libtracker-sparql: Add HTTP endpoint implementationCarlos Garnacho2020-12-138-9/+467
| | | | | | | | | | | Implement partially the server-side bits of https://www.w3.org/TR/2013/REC-sparql11-protocol-20130321/, or at least those bits that we handle in our remote connection side. Most notably, we only handle select queries ATM, this means no modifications, no authentication concerns, etc. This implements the necessary bits to have TrackerEndpoint and tracker_sparql_connection_remote_new() understand each other.
* libtracker-sparql: Hook XML/JSON serializers to constructorCarlos Garnacho2020-12-131-1/+19
| | | | So they can be used just giving the expected TrackerSerializerFormat.
* libtracker-sparql: Add private XML serializer taskCarlos Garnacho2020-12-134-1/+299
| | | | | This object takes care of serializing cursors into application/sparql-results+xml format.
* libtracker-sparql: Add private JSON serializer subclassCarlos Garnacho2020-12-134-0/+315
| | | | | This object takes care of translating a cursor into application/sparql-results+json output.
* libtracker-sparql: Add private/abstract TrackerSerializer objectCarlos Garnacho2020-12-135-0/+193
| | | | | | This object is a subclass of GInputStream that takes a SPARQL cursor on construction. It is meant to handle serialization of SPARQL results into text formats.
* Merge branch 'abderrahim/fix-build' into 'master'Abderrahim Kitouni2020-12-131-1/+1
|\ | | | | | | | | build: fix build when using --buildtype=plain See merge request GNOME/tracker!359
| * build: fix build when using --buildtype=plainAbderrahim Kitouni2020-12-131-1/+1
|/ | | | Fixes ca0e860dbc43ad40c38fb05656995c20944b2238
* Update Romanian translationFlorentina Mușat2020-12-121-240/+214
|
* Merge branch 'wip/carlosg/batches-and-resources' into 'master'Sam Thursfield2020-12-111-44/+84
|\ | | | | | | | | TrackerBatch fixes See merge request GNOME/tracker!357
| * libtracker-data: Cluster deletions issued by TrackerResourceCarlos Garnacho2020-12-111-35/+67
| | | | | | | | | | | | | | | | | | | | We need to flush the TrackerData command buffer after deletions, before the insertions and updates might poke the old values. Cluster deletions together for a given TrackerResource, so we just need to flush once between deletes and inserts. Also, bypass property deletes/resets on bnode resources, since those are being freshly inserted they won't have old data to delete.
| * libtracker-data: Remove astray ':'Carlos Garnacho2020-12-111-1/+1
| | | | | | | | | | | | The UUID generation function already uses ':' as the separator, adding it here too means we have "urn:bnode::..." prefix, the double colons are undesired.
| * libtracker-data: Add missing conversion from datetime typesCarlos Garnacho2020-12-111-0/+12
| | | | | | | | | | There was no conversion from TrackerResource properties that have a datetime type.
| * libtracker-data: Fix bnode cache lookupsCarlos Garnacho2020-12-111-2/+2
| | | | | | | | | | We use resource identifiers as the hashtable key, but were looking up on the resource pointer here. Oops.
| * libtracker-data: Perform TrackerResource element deletion at a lower levelCarlos Garnacho2020-12-111-25/+21
|/ | | | | | | | | | | We currently are using APIs from 2 different levels, the tracker_sparql_delete_statement function is very high level, and doesn't get along with get_old_property_values() in the expected formats (most glaring thing is expressing resources as IDs vs URI strings). Use the lowlevel API all through, pretty much like tracker_sparql_delete_statement() does, so resource properties are properly deleted.
* ci: Fix coverity info uploadCarlos Garnacho2020-12-101-1/+1
| | | | | This is now looking in the wrong directory, we are already inside the coverity-build directory there.
* Merge branch 'sam/debug-plain' into 'master'Sam Thursfield2020-12-101-2/+10
|\ | | | | | | | | build: Enable debug if --buildtype=plain See merge request GNOME/tracker!350
| * build: Enable debug if --buildtype=plainsam/debug-plainSam Thursfield2020-12-011-2/+10
| |
* | Merge branch 'strip-punctuation' into 'master'Sam Thursfield2020-12-106-0/+45
|\ \ | | | | | | | | | | | | | | | | | | Strip punctuation Closes #274 See merge request GNOME/tracker!352
| * | tracker:strip-punctuation function createdNishit Patel2020-12-106-0/+45
|/ / | | | | | | | | function will match the regex of punctuation and replace it with empty space
* | Merge branch 'wip/carlosg/ci-unprivileged' into 'master'Sam Thursfield2020-12-101-22/+23
|\ \ | | | | | | | | | | | | CI fixes for unprivileged images See merge request GNOME/tracker!354
| * | ci: Drop dnf callswip/carlosg/ci-unprivilegedCarlos Garnacho2020-12-101-2/+0
| | | | | | | | | | | | | | | We no longer have privileges to do these. Any necessary package should be installed already in our image.
| * | ci: Avoid usage of `su` commandCarlos Garnacho2020-12-101-20/+23
| | | | | | | | | | | | | | | | | | Adapt to https://gitlab.gnome.org/GNOME/tracker-oci-images/-/merge_requests/28. We no longer can (nor need to, really) switch users with `su`. Drop these calls, and account for the changes of $CWD in the course of the issued commands.
* | | Merge branch 'wip/carlosg/fts-with-sqlite-3.34.0' into 'master'Sam Thursfield2020-12-102-2/+5
|\ \ \ | |/ / |/| | | | | | | | libtracker-data: Avoid deletion of empty rows in FTS table See merge request GNOME/tracker!353
| * | libtracker-data: Avoid deletion of empty rows in FTS tablewip/carlosg/fts-with-sqlite-3.34.0Carlos Garnacho2020-12-102-2/+5
|/ / | | | | | | | | | | | | | | | | Starting with SQLite 3.34.0, this turns into a consistency error. Ensure rows being deleted have actually some content before proceeding to deletion, and ensure we don't process individual properties one by one in the course of a whole rdfs:Resource deletion. Fixes: https://bugs.archlinux.org/task/68903
* | Merge branch 'sam/gir-fix' into 'master'Sam Thursfield2020-12-081-1/+2
|\ \ | | | | | | | | | | | | Add missing <package> element to Tracker-3.0.gir See merge request GNOME/tracker!351
| * | Add missing <package> element to Tracker-3.0.girSam Thursfield2020-12-081-1/+2
|/ / | | | | | | See: https://discourse.gnome.org/t/rust-bindings-for-tracker-3-from-gir/4968
* | Merge branch 'wip/carlosg/insert-perf' into 'master'Sam Thursfield2020-12-0112-307/+276
|\ \ | | | | | | | | | | | | Improve insert performance See merge request GNOME/tracker!348
| * | libtracker-data: Avoid varargs function where possiblewip/carlosg/insert-perfCarlos Garnacho2020-12-019-90/+109
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We let tracker_db_interface_create_statement() take varargs, even though most often we have full SQL queries to give. Add a separate tracker_db_interface_create_vstatement() function taking varargs, and let this function go with the given SQL string as is. This avoids needless string copies in fast paths, like executing a TrackerSparqlStatement.
| * | libtracker-data: Cache SQL string in char* formCarlos Garnacho2020-12-011-9/+13
| | | | | | | | | | | | | | | The string builder is a weird intermediate state that still takes some CPU to transform to string. We can do all of that just once.
| * | libtracker-data: Drop unused struct fieldCarlos Garnacho2020-12-011-11/+0
| | | | | | | | | | | | | | | | | | We were just updating this boolean value, without actually using it. The FTS updates are already done based on a boolean field at the TrackerDataUpdateBufferResource struct.
| * | libtracker-data: Add fast path to insert new bnode UUIDsCarlos Garnacho2020-12-012-4/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The way to insert bnodes used to consist of 1) SELECT SparqlBNode() (which may query multiple times for an unused one). 2) SELECT ID FROM Resource WHERE Uri=bnode 3) INSERT INTO Resource(..., bnode) Step 2 no longer applies since earlier commits, but this can be streamlined so we try to insert bnodes until one comes up successful, and it'll usually be on the first try. Make this apply to direct updates from TrackerResource, as that's where it's easiest to pull off.
| * | libtracker-data: Cache set of new IDs in the transactionCarlos Garnacho2020-12-011-2/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Despite adding information for the same resource across several graphs, we can find out that this is a new resource and go through the fast paths that don't query prior info. This makes adding information for a same resource across several graphs cheaper, since we don't query for information we know beforehand is not there.
| * | libtracker-data: Throw away the ontology/regular resource ID distinctionCarlos Garnacho2020-12-013-93/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This only mattered for journals and replays. We don't have that anymore. Furthermore, the split pool of IDs means we don't have one overflow condition but two, and we handle neither well. Letting the ID pool be shared means we may let SQLite pick a ROWID for us, and it will definitely fare better if ROWIDs flipped the counter. It would still result in an unused ROWID, we would badly break.
| * | libtracker-data: Perform creation of base tables a bit earlierCarlos Garnacho2020-12-011-4/+4
| | | | | | | | | | | | | | | Early enough that we will be able to load the ontology without special paths to get resource IDs.
| * | libtracker-data: Unify the code assigning IDs to resourcesCarlos Garnacho2020-12-011-58/+12
| | | | | | | | | | | | | | | We want to get rid of the distinct IDs for ontology vs regular updates. Make them unique, so it's all handled in a single place.
| * | libtracker-data: Expose function internally to insert URI in DBCarlos Garnacho2020-12-012-10/+14
| | | | | | | | | | | | This will be used from other places than tracker-data-update.c.
| * | libtracker-data: Don't pass resource ID to resource_buffer_switch()Carlos Garnacho2020-12-011-17/+8
| | | | | | | | | | | | | | | | | | There's no place where we want to decouple a subject from its ID. Let this function figure out the resource ID by itself, actually reduces the places where we ensure_resource_id().
| * | libtracker-data: Prefer tracker_class_get_id() over queriesCarlos Garnacho2020-12-011-4/+1
| | | | | | | | | | | | | | | | | | | | | Drop one place where we did that, and some vestigial comment about it being done elsewhere in the past. Classes should indeed always have an ID, regardless of being parsed from ontology, retrieved from the database, or retrieved from gvdb.
| * | libtracker-data: Inverse expectations when inserting a resourceCarlos Garnacho2020-12-011-21/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before this change we would first query the ID, and then insert it if non existent. Apply the "better to ask for forgiveness than permission" principle here, and try to always insert the resource. Only resort to queries if there is a constraint violation (meaning the URI already exists). This optimizes insertions over lookups of existing resource IDs, but we have other caching layers for the latter.
| * | libtracker-data: Add internal error code for failed constraintsCarlos Garnacho2020-12-013-1/+8
| |/ | | | | | | | | And add the missing plumbing for TRACKER_SPARQL_ERROR_CONSTRAINT to be a thing.
* | Merge branch 'sam/debugging-faq' into 'master'Sam Thursfield2020-12-011-2/+38
|\ \ | |/ |/| | | | | website: Update FAQ with a brief into to debugging Tracker daemons See merge request GNOME/tracker!347
| * website: Update FAQ with a brief into to debugging Tracker daemonsSam Thursfield2020-12-011-2/+38
|/ | | | | It's nice to have something to link to in bug reports rather than typing out all the commands every time.
* Merge branch 'readme-update' into 'master'Sam Thursfield2020-11-291-2/+2
|\ | | | | | | | | README.md Update See merge request GNOME/tracker!346
| * updated the commands for indexing and querying in tracker3Nishit Patel2020-11-281-2/+2
|/
* Merge branch 'wip/carlosg/batches-and-resources' into 'master'Sam Thursfield2020-11-2729-209/+1680
|\ | | | | | | | | Batches and resources See merge request GNOME/tracker!345