Files could not be expanded: conflict in file dovecot23.spec

IMAP and POP3 Server Written Primarily with Security in Mind

Edit Package dovecot23

Dovecot is an IMAP and POP3 server for Linux and UNIX-like systems,
written primarily with security in mind. Although it is written in C,
it uses several coding techniques to avoid most of the common pitfalls.

Dovecot can work with standard mbox and maildir formats and is fully
compatible with UW-IMAP and Courier IMAP servers as well as mail
clients accessing the mailboxes directly.

Refresh
Refresh
Source Files

Sources could not be expanded: conflict in file dovecot23.spec

Show unmerged sources

Comments 7

Johannes Nohl's avatar

Could you build dovecot23 with options --with-stemmer and --with-textcat (requires snowball libstemmer0d libexttextcat and to compile snowball-devel libexttextcat-devel) as these are necessary for dovecot23-fts-flatcurve.

https://github.com/slusarz/dovecot-fts-flatcurve/

Flatcurve just recently reached version 1.0.0 and will be, according to official dovecot documentation, included in dovecot 2.4. However, as a final version it is available since dovecot 2.3.17.


Christian Wittmer's avatar

I am preparing an update ... here:
https://build.opensuse.org/package/show/home:computersalat:devel:mail/dovecot23
did build the plugin here:
https://build.opensuse.org/package/show/server:mail/dovecot23-fts-flatcurve
kindly test if that works for you ...


Marcus Rueckert's avatar

why not just submit the packages from my home? I mean your fts-flatcurve package looks like a copy of mine anyway?


Johannes Nohl's avatar

Unfortunately your builds do NOT work, for the reasons stated initially.

indexer-worker(testbox)<11615><4KumDl0To2VfLQAA0J78UA>: Error: fts: Failed to initialize backend 'flatcurve': fts-flatcurve: Invalid settings
indexer-worker(testbox)<11615><4KumDl0To2VfLQAA0J78UA>: Error: fts-flatcurve: fts_filter_snowball: Snowball support not built in

I guess if you add Snowball support textcat support would fail, too ;-)

After I rebuild your dovecot32 packages with stemmer- and textcat-support, everything works as expected. Strangely my packages are 45 MiB bigger than yours?!

Your/darix's dovecot23-fts-flatcurve package works well, however. So in conclusion, it can only exist where also snowball and textcat-libraries are available (at least leap 15.5).


Johannes Nohl's avatar

Please also consider AppArmor. Here I can recommend:

Add in /etc/apparmor.d/usr.sbin.dovecot (indexer is only for dispatching, does not need its own profile imho):

 /usr/lib/dovecot/indexer mrix,
  /usr/lib/dovecot/indexer-worker mrPx,

And accordingly a new file in /etc/apparmor.d/usr.lib.dovecot.indexer-worker like this:

# ------------------------------------------------------------------
#
#    Copyright (C) 2023 Johannes Nohl
#
# ------------------------------------------------------------------
# vim: ft=apparmor

abi <abi/3.0>,

include <tunables/global>
include <tunables/dovecot>

profile dovecot-indexer-worker /usr/lib/dovecot/indexer-worker {
  include <abstractions/base>
  include <abstractions/nameservice>
  include <abstractions/dovecot-common>

  capability setuid,
  capability sys_chroot,
  capability sys_resource,
  capability dac_read_search,
  capability dac_override,

  @{DOVECOT_MAILSTORE}/** r,
  @{DOVECOT_MAILSTORE}/*/Maildir/** rl,
  @{DOVECOT_MAILSTORE}/*/Maildir/**dovecot-uidlist* rwk,
  @{DOVECOT_MAILSTORE}/*/Indizes/** rwlk,

  /etc/dovecot/dovecot.conf r,
  /etc/dovecot/{auth,conf}.d/*.conf r,

  @{PROC}/@{pid}/{stat,io} r,

  /usr/lib/dovecot/indexer-worker rmix,
  /usr/share/libexttextcat/** r,
  /usr/share/icu/** r,
  /usr/share/dovecot/stopwords/** r,

  # Site-specific additions and overrides. See local/README for details.
  include if exists <local/usr.lib.dovecot.indexer-worker>
}

^^ The path Indizes/ above is specific for me as tunables/dovecot does not consider a separate folder for that.


Marcus Rueckert's avatar

we can not globally turn on the stemmer/textcat option because the libraries are not available on older distros.


Johannes Nohl's avatar

Sorry if I get it wrong totally if that's not possible with packaging. But why not ship a different /usr/lib64/dovecot-fts.so with package dovecot23-fts-flatcurve that overwrites the one from package dovecot23?

Thus, nobody would be bothered if not using flatcurve. Also the package might be 45 MiB smaller for users of dovecot23-fts-* packages (or I am simply not good in compiling). Please see:

nm /usr/lib64/dovecot/libdovecot-fts.so* | grep snowball
nm /usr/lib64/dovecot/libdovecot-fts.so* | grep textcat
openSUSE Build Service is sponsored by