19.05.2025 – Linux/Build_recent_SOGo_on_debian_bookworm.md

Build Recent SOGo on Debian Bookworm

Debian Bookworm ships with SOGo 5.8.0. To use newly added features such as OpenID authentication in SOGo, a more recent version is required. Before building SOGo, SOPE must be built and installed first.

The following bash script builds SOPE 5.12.1. Execute it in an empty directory:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/bin/bash

rm -fr *.deb
rm -fr build/

mkdir build/ && cd build/

git clone https://salsa.debian.org/debian/sope.git

cd sope/

git checkout tags/debian/5.8.0-1  # Last bookworm compatible version
cp -a debian ../

git checkout tags/debian/5.12.1-1  # Adjust to most recent or desired version
rm -r debian/
mv ../debian/ .

# Decrement version to ensure proper upgrade when switching to Trixie
DEBEMAIL=john.doe@example.net DEBFULLNAME="John Doe" dch -v "5.12.1-0.1" -D stable "Automated bookworm build"

debuild -uc -us -b

mv ../libsope1_*.deb ../../
mv ../libsope-dev_*.deb ../../
mv ../sope-bin_*.deb ../../

Install SOPE using: dpkg -i libsope1_*.deb libsope-dev_*.deb sope-bin_*.deb

The following bash script builds SOGo 5.12.1. Execute it in an empty directory:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/bin/bash

rm -fr *.deb
rm -fr build/

mkdir build/ && cd build/

git clone https://salsa.debian.org/debian/sogo.git

cd sogo/

git checkout tags/debian/5.8.0-1  # Last bookworm compatible version
cp -a debian ../

git checkout tags/debian/5.12.1-1  # Adjust to most recent or desired version
rm -r debian/
mv ../debian/ .

sed -i 's/JWT.h/SOGoAdmin.h/g' debian/patches/0005-Remove-build-date.patch
sed -i 's/inverse.ca/sogo.nu/g' debian/patches/0005-Remove-build-date.patch
sed -i 's/COOKIE_USERKEY_LEN[[:space:]]\+2096/COOKIE_USERKEY_LEN    2560/' SoObjects/SOGo/SOGoWebAuthenticator.m

# Decrement version to ensure proper upgrade when switching to Trixie
DEBEMAIL=john.doe@example.net DEBFULLNAME="John Doe" dch -v "5.12.1-0.1" -D stable "Automated bookworm build"

debuild -uc -us -b

mv ../sogo_*.deb ../../
mv ../sogo-activesync_*.deb ../../
mv ../sogo-common_*.deb ../../

Finally, install SOGo using: dpkg -i sogo_*.deb sogo-common_*.deb

Optionally, install the ActiveSync module with: dpkg -i sogo-activesync_*.deb