I am attaching a patch to make Netatalk able to optionally build and run with Tracker (miners) 3.x, while preserving compatibility with older versions. From the patch commit subject:
Spotlight: Allow building with Tracker 3.x This recent Tracker series contain some changes wrt the older versions, notably to netatalk: - The TrackerSparqlConnection constructor changed, it is no longer a singleton. - The topology of the data graph is slightly different (even though it conforms to the same ontology/schema). Tracker data is now split between "physical" (e.g. a file in a filesystem) and "logical" (e.g. a representation of the content) interrelated with each other. Before, both aspects would be conflated in a single resource. For the former, handle this new constructor if built with Tracker 3.x, accessing the tracker-miner-fs instance specifically. For the latter, adapt the SPARQL query so it works correctly on both 3.x and prior versions, despite the difference.
I am attempting to use this patch for netatalk package in fedora repos, but the build fails:
tracker-miner.h is not part of tracker3-devel package. I am not familiar with the tracker API so any help to fix this would be appreciated.
Oops, thanks for spotting! That #include can be safely removed, I'll update the patch doing that.
Thanks for the assist. Note I also needed to patch configure.ac to look for tracker3 binary. Your call if you want to add it to your patch or leave separate.
https://github.com/knight-of-ni/Netatalk/commit/dca1ebd6a8af9f258e8aaf6931af9ba870b9e252
Indeed, I missed the .m4 checks :). I have included your changes in the patch, I hope you don't mind. The new patch is attached.
OK, almost have it. With a few more changes, I got the patch to build.
This line in the patch fails:
AC_DEFINE(HAVE_TRACKER3, [test x"$ac_cv_tracker_pkg_version" = x"3.0"], [Define if Tracker3 is used])
Autotools takes that test and stuffs it into config.h verbatim:
#define HAVE_TRACKER3 test x"$ac_cv_tracker_pkg_version" = x"3.0"
Gcc doesn't know how to handle this and throws an error.
The following change allows the build to complete:
AX_COMPARE_VERSION([$ac_cv_tracker_pkg_version], [ge], [3.0], AC_DEFINE(HAVE_TRACKER3, 1, [Define if Tracker3 is used]),)
However, that uses an additional AX_COMPARE_VERSION macro. There might be a better/simpler way. My autotools is rusty.
There are two places that use HAVE_TRACKER3:
#if HAVE_TRACKER3
should be changed to:
#ifdef HAVE_TRACKER3
It keeps the compiler from throwing warnings.
I reworked the patch again. This time I didn't use AX_COMPARE_VERSION and after further testing here is what works for me:
https://github.com/knight-of-ni/Netatalk/commit/a7ff155b4a907af0cb979863758137aa5f8dce3f
This patch was tested on Fedora 33 and then on CentOS 7 to verify backwards compatibility.
I'm running into a different problem on fedora rawhide, but it might not have anything to do with this patch...
The problem on fedora rawhide was unrelated and has been resolved. A new netatalk package has been built for fedora rawhide repos: https://koji.fedoraproject.org/koji/taskinfo?taskID=63712482
Thanks for your initial patch and followup.
Thanks for contributing the patch! I've raised a PR on github: https://github.com/Netatalk/Netatalk/pull/202
Ah, right. That's the patch I re-worked and have been using for netatalk in fedora branches.
Seems I forgot to submit it upstream. Thanks for catching that.
Thanks,
Andy
No Trees were killed in the sending of this message.
However, a large number of electrons were terribly inconvenienced.
From: patches@netatalk.p.re.sourceforge.net patches@netatalk.p.re.sourceforge.net on behalf of Daniel Markstedt himasaram@users.sourceforge.net
Sent: Saturday, February 11, 2023 3:45 PM
To: [netatalk:patches] 147@patches.netatalk.p.re.sourceforge.net
Subject: [netatalk:patches] #147 Handle Tracker 3.x API changes
Thanks for contributing the patch! I've raised a PR on github: https://github.com/Netatalk/Netatalk/pull/202
[patches:#147]https://sourceforge.net/p/netatalk/patches/147/ Handle Tracker 3.x API changes
Status: open
Group:
Created: Fri Feb 05, 2021 06:50 PM UTC by Carlos Garnacho
Last Updated: Sat Mar 13, 2021 08:39 PM UTC
Owner: nobody
Attachments:
I am attaching a patch to make Netatalk able to optionally build and run with Tracker (miners) 3.x, while preserving compatibility with older versions. From the patch commit subject:
Spotlight: Allow building with Tracker 3.x
This recent Tracker series contain some changes wrt the older versions,
notably to netatalk:
- The TrackerSparqlConnection constructor changed, it is no longer
a singleton.
- The topology of the data graph is slightly different (even though
it conforms to the same ontology/schema). Tracker data is now split
between "physical" (e.g. a file in a filesystem) and "logical" (e.g.
a representation of the content) interrelated with each other. Before,
both aspects would be conflated in a single resource.
For the former, handle this new constructor if built with Tracker 3.x,
accessing the tracker-miner-fs instance specifically. For the latter,
adapt the SPARQL query so it works correctly on both 3.x and prior
versions, despite the difference.
Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/netatalk/patches/147/
To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/
Related
Patches:
#147My pleasure! I've been doing some housekeeping on the tracker and stumbled on this ticket.
So you're saying that this patch has been part of the downstream Fedora packages for a few years, right?
Hi Daniel,
Yes, I have been using that patch with Netatalk since Fedora 33. If I recall that is when tracker 3 was introduced to Fedora. I am fairly sure netatalk would not build without that patch.
Thanks,
Andy
No Trees were killed in the sending of this message.
However, a large number of electrons were terribly inconvenienced.
From: patches@netatalk.p.re.sourceforge.net patches@netatalk.p.re.sourceforge.net on behalf of Daniel Markstedt himasaram@users.sourceforge.net
Sent: Saturday, February 11, 2023 7:23 PM
To: [netatalk:patches] 147@patches.netatalk.p.re.sourceforge.net
Subject: [netatalk:patches] Re: #147 Handle Tracker 3.x API changes
My pleasure! I've been doing some housekeeping on the tracker and stumbled on this ticket.
So you're saying that this patch has been part of the downstream Fedora packages for a few years, right?
[patches:#147]https://sourceforge.net/p/netatalk/patches/147/ Handle Tracker 3.x API changes
Status: open
Group:
Created: Fri Feb 05, 2021 06:50 PM UTC by Carlos Garnacho
Last Updated: Sat Feb 11, 2023 09:45 PM UTC
Owner: nobody
Attachments:
I am attaching a patch to make Netatalk able to optionally build and run with Tracker (miners) 3.x, while preserving compatibility with older versions. From the patch commit subject:
Spotlight: Allow building with Tracker 3.x
This recent Tracker series contain some changes wrt the older versions,
notably to netatalk:
- The TrackerSparqlConnection constructor changed, it is no longer
a singleton.
- The topology of the data graph is slightly different (even though
it conforms to the same ontology/schema). Tracker data is now split
between "physical" (e.g. a file in a filesystem) and "logical" (e.g.
a representation of the content) interrelated with each other. Before,
both aspects would be conflated in a single resource.
For the former, handle this new constructor if built with Tracker 3.x,
accessing the tracker-miner-fs instance specifically. For the latter,
adapt the SPARQL query so it works correctly on both 3.x and prior
versions, despite the difference.
Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/netatalk/patches/147/
To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/
Related
Patches:
#147Thank you @himasaram and @knnniggett for following up!
I also have the user handle "@garnacho" at github, if there's any questions about this patch, or Tracker integration generally.
The patch has been merged to upstream 3.1. Closing this ticket!