On 11/6/25 4:23 PM, Thore Bödecker wrote:
The reason for the conflict is pretty simple:
Both packages provide a rather large common set of binaries,
libraries, manpages, etc.

Without putting*a ton* of work into making these packages
co-existable, they will always conflict.
Even when they would be able to co-exist, you'd then have to modify
all your downstream tooling to use /usr/bin/doveadm23,
/usr/bin/dovecot23, /usr/lib/dovecot23/dovecot-lda, etc.

Yes, and the effort to provide dovecot23 is much appreciated. It was one package replacing the other where the need for the "conflict" didn't make sense to me. You either install dovecot or install dovecot23, but not both -- no conflict.


For a simple alternative package version, it's definitely preferred to
keep the overall packaging process as similar as possible, just built
from a different source version.

To circumvent your issue, you'd just have to perform
'pacman -R --noconfirm dovecot'
followed by
'pacman -S --noconfirm dovecot23'
or vice-versa.


Smacks self. Sometimes it's just the forest for the trees that gets you. I had my mind set on -U instead of -R and then install. Thank you!

By default, no package removal or installation will stop or start
services automatically.
Thus, even after e.g. removing 'dovecot' and installing 'dovecot23',
the dovecot.service should still be running from the 2.4 binary.
Although that might not last for lang depending on what it tries to
do.

That part I had covered:

#!/bin/bash

## usage unction shows optional message "$1", followed by brief usage
#  information exiting with an optional error code "$2" [default 0]
usage() {
  # local ecode=${2:-0}
  ecode=${2:-0}   ## make POSIX compliant

  test -n "$1" && printf "\n  %s\n" "$1" >&2

  printf "\n  usage: %s dovecot_version [23,24]\n\n" "${0##*/}"

  exit "$ecode"
}

## initialize variables (default dovecot 2.4) and validate version given
pkgcache="${2:-/var/cache/pacman/pkg}"
# valkyrie has package cacse in non-standard location to free space on /
[ "$HOSTNAME" = "valkyrie" ] && pkgcache="/home/data/valkyrie/var/cache/pacman/pkg"
conf23="/home/david/cnf/valkyrie/dovecot-23"
conf24="/home/david/cnf/valkyrie/dovecot-24"
conf="$conf24"

pkg23="$pkgcache/dovecot23-2.3.21.1-3-x86_64.pkg.tar.zst"
pkg24="$pkgcache/dovecot-2.4.2-3-x86_64.pkg.tar.zst"
pkg="$pkg24"

[ -z "$1" ] && {
  usage "error: insufficient input" 1
}

[ "$1" != "23" ] && [ "$1" != "24" ] && {
  usage "error: incorrect version, must be '23' or '24'" 1
}

ver="$1"

## set config and package for dovecot 2.3
if [ "$ver" = "23" ]; then
  conf="$conf23"
  pkg="$pkg23"
fi

printf '\nconf : %s\npkg  : %s\nver  : %s\n\n' "$conf" "$pkg" "$ver"

if [ $UID -eq 0 ]; then
  systemctl stop dovecot
  pacman -U --noconfirm "$pkg"
  cp -a "$conf/dovecot.conf" /etc/dovecot/
  cp -a "$conf/conf.d/10-ssl.conf" /etc/dovecot/conf.d/
  if systemctl start dovecot; then
    printf '\nSUCCESS\n\n'
  else
    printf '\nERROR: dovecot failed to start\n\n' >&2
  fi
else
  sudo systemctl stop dovecot
  sudo pacman -U --noconfirm "$pkg"
  sudo cp -a "$conf/dovecot.conf" /etc/dovecot/
  sudo cp -a "$conf/conf.d/10-ssl.conf" /etc/dovecot/conf.d/
  if sudo systemctl start dovecot; then
    printf '\nSUCCESS\n\n'
  else
    printf '\nERROR: dovecot failed to start\n\n' >&2
  fi
fi


--
David C. Rankin, J.D.,P.E.

Reply via email to