Page MenuHomeFreeBSD

databases/akonadi: Build all backends, but don't runtime-depend on them.
ClosedPublic

Authored by arrowd on Jan 17 2023, 6:34 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Dec 15, 7:27 AM
Unknown Object (File)
Tue, Dec 3, 5:37 AM
Unknown Object (File)
Sun, Dec 1, 11:07 PM
Unknown Object (File)
Fri, Nov 29, 7:12 AM
Unknown Object (File)
Mon, Nov 25, 8:36 AM
Unknown Object (File)
Mon, Nov 25, 6:26 AM
Unknown Object (File)
Mon, Nov 25, 6:00 AM
Unknown Object (File)
Mon, Nov 25, 1:16 AM

Details

Test Plan

poudriere testport

Diff Detail

Repository
R11 FreeBSD ports repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

  • Restore OPTIONS.
  • Make Sqlite default.
fluffy added a subscriber: fluffy.

Ship it!

This revision is now accepted and ready to land.Jan 24 2023, 4:54 PM

I am think this is fine. But it likely could need some documentation in UPDATING,

As it might break mail for people that are using mysql for the alonadi storage.

So that makes me a bit fearful of the change.

As far as I remember akonadi devs were strongly against using sqlite back in kde4 days. mysql_embedded was a compromise between akonadi requirements and users experience. I doubt anything has changed since then.

Make note in UPDATING and pkg-message

This revision now requires review to proceed.Jan 25 2023, 3:04 PM

As it might break mail for people that are using mysql for the alonadi storage.
So that makes me a bit fearful of the change.

Yes, but we now have a warning in UPDATING, a warning in pkg-message on upgrade and also Akonadi saves last used backend in its configuration file. This means that it won't silently switch to sqlite, but will give a error to the user.

As far as I remember akonadi devs were strongly against using sqlite back in kde4 days. mysql_embedded was a compromise between akonadi requirements and users experience. I doubt anything has changed since then.

True, but there are also scenarios when Akonadi isn't actually used, but gets pulled in by pkg install kde5 or even pkg install plasma5-plasma. If the user doesn't plan to use Akonadi at all, there is no need in pulling MySQL server.

As far as I remember akonadi devs were strongly against using sqlite back in kde4 days. mysql_embedded was a compromise between akonadi requirements and users experience. I doubt anything has changed since then.

True, but there are also scenarios when Akonadi isn't actually used, but gets pulled in by pkg install kde5 or even pkg install plasma5-plasma. If the user doesn't plan to use Akonadi at all, there is no need in pulling MySQL server.

I have not idea how many users use Akonadi, users are not aware whether they use Akonadi or not. They just run KMail or Akregator and expect it to work. In FreeBSD we already have a problem with KDirWatch (see bugs/258974 for example), which makes user experience with KDE less pleasant, switching to sqlite definitely won't make it better. If novice FreeBSD user installs KDE Plasma and a bit later has to figure out how to reconfigure Akonadi with mysql โ€” this is not nice from our side. Is mysql-server really a big problem? How much do we gain if we switch to sqlite and how much do we lose?

Set defaults to ease new users to setup their systems. Once they are got experienced they could use options to customize it to their needs.

UPDATING
17 โ†—(On Diff #115718)

Not, it is not sufficient, the corresponding version of mysql-server is also required. Users don't need to configure sql server themselves, akonadi does the work for them.

  • Brind back runtime deps.
  • Enable sqlite backend unconditionally.

All right then, let's keep these changes minimal.

The port still defaults to MySQL, I only removed SQLITE option and enabled it unconditionally. This at least allows switching backends without recompiling.

Bump. This is now non-invasive change, please review.

databases/akonadi/Makefile
50โ€“51

^ looking at the CMakeLists.txt, it looks like that will only set the default backend?
And it is not well defined what will happen to be the default when both options of the port are toggled on, I think. (Not sure that there is a good solution for this).

databases/akonadi/Makefile
50โ€“51

^ looking at the CMakeLists.txt, it looks like that will only set the default backend?

That's correct.

And it is not well defined what will happen to be the default when both options of the port are toggled on

Not at all. When both options are selected only the first .if will be evaluated - the second one is inside .else (which can be converted to .elif, BTW!).

So, this follows upstream in preferring MySQL in all cases, except when only PostgreSQL is selected.

  • Convert .else + .if into .elif.

I think as this keeps the status quo with having mysql as the default it is save to go in.

This revision is now accepted and ready to land.Feb 9 2023, 9:51 AM

Hm, are you guys aware that this commit removes the default dependency on MySQL when no specific options are set?
That means users of akonadi in its standard setup will now render their existing installations unusable by a package upgrade.
I was lucky to catch this when doing pkg autoremove, but not everybody knows about that.

Oops, that wasn't intended. I will fix it ASAP, sorry for this.