Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| d154c5a5d8 |
@@ -1,117 +0,0 @@
|
||||
name: Debian Trixie package bundle
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
paths:
|
||||
- ".gitea/workflows/debian-trixie.yml"
|
||||
- "contrib/debian/**"
|
||||
- "debian/**"
|
||||
- "cmake/**"
|
||||
- "src/**"
|
||||
- "CMakeLists.txt"
|
||||
|
||||
jobs:
|
||||
packages:
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: debian:trixie
|
||||
env:
|
||||
GITEA_API: https://gitea.disconnected-by-peer.at/api/v1
|
||||
OWNER: geos_one
|
||||
REPO: bongo
|
||||
defaults:
|
||||
run:
|
||||
shell: bash
|
||||
steps:
|
||||
- name: Bootstrap checkout requirements
|
||||
run: |
|
||||
apt-get update
|
||||
apt-get install -y --no-install-recommends \
|
||||
ca-certificates curl git jq nodejs
|
||||
|
||||
- name: Check out Bongo
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Build patched dependencies and Bongo
|
||||
run: |
|
||||
chmod +x contrib/debian/build-trixie-bundle.sh
|
||||
contrib/debian/build-trixie-bundle.sh \
|
||||
"$GITHUB_WORKSPACE" "$RUNNER_TEMP/bongo-trixie"
|
||||
|
||||
- name: Find development bundle
|
||||
id: bundle
|
||||
run: |
|
||||
set -eu
|
||||
short_sha="$(git rev-parse --short=7 HEAD)"
|
||||
file="$(find "$RUNNER_TEMP/bongo-trixie" -maxdepth 1 -type f \
|
||||
-name "bongo-*-dev${short_sha}-debian-trixie.zip" -print)"
|
||||
test -f "$file"
|
||||
echo "file=$file" >> "$GITHUB_OUTPUT"
|
||||
echo "name=$(basename "$file")" >> "$GITHUB_OUTPUT"
|
||||
|
||||
- name: Create or update development release
|
||||
env:
|
||||
GITEA_TOKEN: ${{ secrets.RELEASE_TOKEN }}
|
||||
REF_NAME: ${{ gitea.ref_name || github.ref_name }}
|
||||
run: |
|
||||
set -eu
|
||||
short_sha="$(git rev-parse --short=7 HEAD)"
|
||||
release_json="$(curl -fsS \
|
||||
-H "Authorization: token ${GITEA_TOKEN}" \
|
||||
"${GITEA_API}/repos/${OWNER}/${REPO}/releases/tags/development" || true)"
|
||||
|
||||
payload="$(jq -n \
|
||||
--arg tag development \
|
||||
--arg name "development (${REF_NAME} @ ${short_sha})" \
|
||||
'{tag_name:$tag,name:$name,draft:false,prerelease:true}')"
|
||||
if [ -z "$release_json" ]; then
|
||||
release_json="$(curl -fsS -X POST \
|
||||
-H "Authorization: token ${GITEA_TOKEN}" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d "$payload" \
|
||||
"${GITEA_API}/repos/${OWNER}/${REPO}/releases")"
|
||||
else
|
||||
release_id="$(printf '%s' "$release_json" | jq -r '.id')"
|
||||
release_json="$(curl -fsS -X PATCH \
|
||||
-H "Authorization: token ${GITEA_TOKEN}" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d "$payload" \
|
||||
"${GITEA_API}/repos/${OWNER}/${REPO}/releases/${release_id}")"
|
||||
fi
|
||||
printf '%s\n' "$release_json" > release.json
|
||||
|
||||
- name: Replace development assets
|
||||
env:
|
||||
GITEA_TOKEN: ${{ secrets.RELEASE_TOKEN }}
|
||||
FILE: ${{ steps.bundle.outputs.file }}
|
||||
NAME: ${{ steps.bundle.outputs.name }}
|
||||
run: |
|
||||
set -eu
|
||||
release_id="$(jq -r '.id' release.json)"
|
||||
curl -fsS \
|
||||
-H "Authorization: token ${GITEA_TOKEN}" \
|
||||
"${GITEA_API}/repos/${OWNER}/${REPO}/releases/${release_id}" \
|
||||
| jq -r '.assets[]? | .id' \
|
||||
| while read -r asset_id; do
|
||||
[ -n "$asset_id" ] || continue
|
||||
curl -fsS -X DELETE \
|
||||
-H "Authorization: token ${GITEA_TOKEN}" \
|
||||
"${GITEA_API}/repos/${OWNER}/${REPO}/releases/${release_id}/assets/${asset_id}"
|
||||
done
|
||||
curl -fsS -X POST \
|
||||
-H "Authorization: token ${GITEA_TOKEN}" \
|
||||
-H "Content-Type: application/octet-stream" \
|
||||
--data-binary @"${FILE}" \
|
||||
"${GITEA_API}/repos/${OWNER}/${REPO}/releases/${release_id}/assets?name=${NAME}"
|
||||
|
||||
- name: Upload Debian Trixie bundle
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ${{ steps.bundle.outputs.name }}
|
||||
path: ${{ steps.bundle.outputs.file }}
|
||||
if-no-files-found: error
|
||||
@@ -1,9 +0,0 @@
|
||||
__pycache__/
|
||||
*.py[cod]
|
||||
|
||||
# Out-of-tree CMake builds are preferred, but keep accidental local builds out.
|
||||
/build/
|
||||
/CMakeFiles/
|
||||
/CMakeCache.txt
|
||||
/cmake_install.cmake
|
||||
/Testing/
|
||||
-168
@@ -1,168 +0,0 @@
|
||||
# Global build file for Bongo
|
||||
cmake_minimum_required(VERSION 3.16)
|
||||
project(bongo VERSION 0.7.0 LANGUAGES C)
|
||||
if(POLICY CMP0177)
|
||||
cmake_policy(SET CMP0177 NEW)
|
||||
endif()
|
||||
include(CTest)
|
||||
|
||||
# set version of cmake required, and module path
|
||||
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/")
|
||||
|
||||
set(BONGO_V_MAJOR "${PROJECT_VERSION_MAJOR}")
|
||||
set(BONGO_V_MINOR "${PROJECT_VERSION_MINOR}")
|
||||
set(BONGO_V_BUILD "${PROJECT_VERSION_PATCH}")
|
||||
set(BONGO_V_PATCH "${PROJECT_VERSION_PATCH}")
|
||||
set(BONGO_V_STR "${PROJECT_VERSION}")
|
||||
|
||||
# arguments we can supply to the build system - TODO
|
||||
set(BONGO_USER "bongo" CACHE STRING "User account Bongo should run under")
|
||||
option(CONN_TRACE "Enable connection tracing" OFF)
|
||||
include(cmake/BongoCompiler.cmake)
|
||||
|
||||
# Modern 32-bit Linux distributions build their libraries with the 64-bit
|
||||
# time and file-offset ABI. Match that ABI and remain safe beyond 2038.
|
||||
if(CMAKE_SYSTEM_NAME STREQUAL "Linux" AND CMAKE_SIZEOF_VOID_P EQUAL 4)
|
||||
add_compile_definitions(_FILE_OFFSET_BITS=64 _TIME_BITS=64)
|
||||
endif()
|
||||
|
||||
# find our various build requirements
|
||||
include(cmake/Requirements.cmake)
|
||||
|
||||
# set up defines for build directories
|
||||
include(cmake/Directories.cmake)
|
||||
include(cmake/DefineInstallationPaths.cmake)
|
||||
|
||||
# define RPATH for debug/etc. builds - allows us to install libraries
|
||||
# in non-system location and the binaries still link to them
|
||||
set(CMAKE_INSTALL_RPATH "${XPL_DEFAULT_LIB_DIR}")
|
||||
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
|
||||
|
||||
# any legacy defines which we want to get rid of eventually
|
||||
include(cmake/Legacy.cmake)
|
||||
|
||||
# output header files etc. specifically configured for this build
|
||||
configure_file(config.h.cmake include/config.h @ONLY)
|
||||
configure_file(src/agents/store/sql/create-store.s.cmake src/agents/store/sql/createstore.s @ONLY)
|
||||
configure_file(src/agents/store/sql/create-cookie-1.s.cmake src/agents/store/sql/createcookie-1.s @ONLY)
|
||||
|
||||
# tell compiler where to find Bongo's header files
|
||||
include_directories(BEFORE ${CMAKE_CURRENT_SOURCE_DIR}/include/)
|
||||
include_directories(BEFORE ${CMAKE_CURRENT_BINARY_DIR}/include/)
|
||||
|
||||
# now build our various libraries, agents, binaries.
|
||||
# DO NOT ALTER (SO)VERSION ON LIBRARIES WITHOUT ASKING!
|
||||
foreach (LIBRARY xpl authsecurity streamio msgapi connio util json cal mailauth sieve sasl collectoraccounts acme scheduler)
|
||||
add_subdirectory (src/libs/${LIBRARY})
|
||||
set(LIBRARY_TARGET bongo${LIBRARY})
|
||||
if(LIBRARY STREQUAL "sieve")
|
||||
set(LIBRARY_TARGET libbongosieve)
|
||||
endif()
|
||||
set_target_properties(${LIBRARY_TARGET} PROPERTIES
|
||||
SOVERSION 0
|
||||
VERSION ${BONGO_V_STR}
|
||||
)
|
||||
endforeach (LIBRARY)
|
||||
|
||||
add_subdirectory(src/libs/python/libbongo)
|
||||
add_subdirectory(src/libs/python/bongo)
|
||||
|
||||
foreach (AGENT antispam avirus collector director imap pop queue rules sieve smtp store worker)
|
||||
add_subdirectory (src/agents/${AGENT})
|
||||
endforeach (AGENT)
|
||||
|
||||
foreach (EXECUTABLE admin config manager testtool queuetool storetool sendmail)
|
||||
add_subdirectory (src/apps/${EXECUTABLE})
|
||||
endforeach (EXECUTABLE)
|
||||
|
||||
# CMake's release configurations define NDEBUG. The legacy test suite uses
|
||||
# assert() for both checks and, in a few cases, the operation under test. Keep
|
||||
# assertions enabled for test sources without changing production binaries.
|
||||
# Apply the option to test targets after all target-owning directories have
|
||||
# been added. This avoids relying on directory-scoped source properties.
|
||||
if(BUILD_TESTING AND NOT MSVC)
|
||||
function(BONGO_COLLECT_TARGETS OUTPUT DIRECTORY)
|
||||
get_property(BONGO_DIRECTORY_TARGETS DIRECTORY "${DIRECTORY}"
|
||||
PROPERTY BUILDSYSTEM_TARGETS)
|
||||
get_property(BONGO_SUBDIRECTORIES DIRECTORY "${DIRECTORY}"
|
||||
PROPERTY SUBDIRECTORIES)
|
||||
foreach(BONGO_SUBDIRECTORY IN LISTS BONGO_SUBDIRECTORIES)
|
||||
BONGO_COLLECT_TARGETS(BONGO_SUBDIRECTORY_TARGETS
|
||||
"${BONGO_SUBDIRECTORY}")
|
||||
list(APPEND BONGO_DIRECTORY_TARGETS
|
||||
${BONGO_SUBDIRECTORY_TARGETS})
|
||||
endforeach()
|
||||
set(${OUTPUT} "${BONGO_DIRECTORY_TARGETS}" PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
||||
BONGO_COLLECT_TARGETS(BONGO_ALL_TARGETS "${CMAKE_CURRENT_SOURCE_DIR}")
|
||||
foreach(BONGO_TARGET IN LISTS BONGO_ALL_TARGETS)
|
||||
if(BONGO_TARGET MATCHES "-test$")
|
||||
target_compile_options(${BONGO_TARGET} PRIVATE -UNDEBUG)
|
||||
endif()
|
||||
endforeach()
|
||||
endif()
|
||||
|
||||
add_subdirectory(src/www)
|
||||
|
||||
add_subdirectory (init)
|
||||
add_subdirectory(man)
|
||||
|
||||
# Developer-only timezone snapshot refresh. This target is deliberately not
|
||||
# part of ALL: normal and distribution builds must remain reproducible and
|
||||
# must not rewrite checked-in source data.
|
||||
set(BONGO_TZDATA_DIR "" CACHE PATH
|
||||
"Path to an unpacked IANA tzdata tree used by the update-zoneinfo target")
|
||||
add_executable(bongo-vzic EXCLUDE_FROM_ALL
|
||||
import/vzic/vzic.c
|
||||
import/vzic/vzic-parse.c
|
||||
import/vzic/vzic-dump.c
|
||||
import/vzic/vzic-output.c)
|
||||
target_include_directories(bongo-vzic PRIVATE import/vzic)
|
||||
target_compile_definitions(bongo-vzic PRIVATE
|
||||
PRODUCT_ID="-//Bongo Project//Bongo 1.0//EN"
|
||||
TZID_PREFIX="/bongo/"
|
||||
CREATE_SYMLINK=0
|
||||
IGNORE_TOP_LEVEL_LINK=0)
|
||||
target_link_libraries(bongo-vzic PRIVATE GLib2::GLib2)
|
||||
|
||||
add_executable(bongo-import-tz EXCLUDE_FROM_ALL src/libs/cal/bongo-import-tz.c)
|
||||
target_include_directories(bongo-import-tz PRIVATE src/libs/cal)
|
||||
target_link_libraries(bongo-import-tz PRIVATE
|
||||
bongocal bongoutil bongomsgapi bongoxpl)
|
||||
|
||||
add_custom_target(update-zoneinfo
|
||||
COMMAND /bin/sh ${CMAKE_CURRENT_SOURCE_DIR}/zoneinfo/update-zoneinfo.sh
|
||||
"${BONGO_TZDATA_DIR}"
|
||||
"$<TARGET_FILE:bongo-vzic>"
|
||||
"$<TARGET_FILE:bongo-import-tz>"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/zoneinfo"
|
||||
DEPENDS bongo-vzic bongo-import-tz
|
||||
USES_TERMINAL
|
||||
COMMENT "Refreshing the checked-in Bongo zoneinfo snapshot")
|
||||
|
||||
# install various other files
|
||||
install(DIRECTORY include/
|
||||
DESTINATION "${CMAKE_INSTALL_PREFIX}/include/bongo"
|
||||
FILES_MATCHING PATTERN "*.h"
|
||||
PATTERN ".svn" EXCLUDE)
|
||||
|
||||
install(DIRECTORY zoneinfo
|
||||
DESTINATION ${XPL_DEFAULT_DATA_DIR}
|
||||
FILES_MATCHING PATTERN "*.zone"
|
||||
PATTERN ".svn" EXCLUDE)
|
||||
install(FILES zoneinfo/IANA_VERSION
|
||||
DESTINATION ${XPL_DEFAULT_DATA_DIR}/zoneinfo)
|
||||
|
||||
install(FILES src/agents/collector/provider-presets.json
|
||||
DESTINATION ${XPL_DEFAULT_DATA_DIR}/providers)
|
||||
|
||||
install(DIRECTORY contrib/antispam/
|
||||
DESTINATION ${DATA_INSTALL_DIR}/examples/antispam)
|
||||
install(DIRECTORY contrib/reverse-proxy/
|
||||
DESTINATION ${DATA_INSTALL_DIR}/examples/reverse-proxy)
|
||||
install(DIRECTORY contrib/acme/
|
||||
DESTINATION ${DATA_INSTALL_DIR}/examples/acme)
|
||||
|
||||
# include rules for make distribution tarballs
|
||||
include(cmake/Distribution.cmake)
|
||||
@@ -1,63 +1,234 @@
|
||||
Initial Build Instructions
|
||||
Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002 Free Software
|
||||
Foundation, Inc.
|
||||
|
||||
This file is free documentation; the Free Software Foundation gives
|
||||
unlimited permission to copy, distribute and modify it.
|
||||
|
||||
Basic Installation
|
||||
==================
|
||||
|
||||
These are generic installation instructions.
|
||||
|
||||
The `configure' shell script attempts to guess correct values for
|
||||
various system-dependent variables used during compilation. It uses
|
||||
those values to create a `Makefile' in each directory of the package.
|
||||
It may also create one or more `.h' files containing system-dependent
|
||||
definitions. Finally, it creates a shell script `config.status' that
|
||||
you can run in the future to recreate the current configuration, and a
|
||||
file `config.log' containing compiler output (useful mainly for
|
||||
debugging `configure').
|
||||
|
||||
It can also use an optional file (typically called `config.cache'
|
||||
and enabled with `--cache-file=config.cache' or simply `-C') that saves
|
||||
the results of its tests to speed up reconfiguring. (Caching is
|
||||
disabled by default to prevent problems with accidental use of stale
|
||||
cache files.)
|
||||
|
||||
If you need to do unusual things to compile the package, please try
|
||||
to figure out how `configure' could check whether to do them, and mail
|
||||
diffs or instructions to the address given in the `README' so they can
|
||||
be considered for the next release. If you are using the cache, and at
|
||||
some point `config.cache' contains results you don't want to keep, you
|
||||
may remove or edit it.
|
||||
|
||||
The file `configure.ac' (or `configure.in') is used to create
|
||||
`configure' by a program called `autoconf'. You only need
|
||||
`configure.ac' if you want to change it or regenerate `configure' using
|
||||
a newer version of `autoconf'.
|
||||
|
||||
The simplest way to compile this package is:
|
||||
|
||||
1. `cd' to the directory containing the package's source code and type
|
||||
`./configure' to configure the package for your system. If you're
|
||||
using `csh' on an old version of System V, you might need to type
|
||||
`sh ./configure' instead to prevent `csh' from trying to execute
|
||||
`configure' itself.
|
||||
|
||||
Running `configure' takes awhile. While running, it prints some
|
||||
messages telling which features it is checking for.
|
||||
|
||||
2. Type `make' to compile the package.
|
||||
|
||||
3. Optionally, type `make check' to run any self-tests that come with
|
||||
the package.
|
||||
|
||||
4. Type `make install' to install the programs and any data files and
|
||||
documentation.
|
||||
|
||||
5. You can remove the program binaries and object files from the
|
||||
source code directory by typing `make clean'. To also remove the
|
||||
files that `configure' created (so you can compile the package for
|
||||
a different kind of computer), type `make distclean'. There is
|
||||
also a `make maintainer-clean' target, but that is intended mainly
|
||||
for the package's developers. If you use it, you may have to get
|
||||
all sorts of other programs in order to regenerate files that came
|
||||
with the distribution.
|
||||
|
||||
Compilers and Options
|
||||
=====================
|
||||
|
||||
Some systems require unusual options for compilation or linking that
|
||||
the `configure' script does not know about. Run `./configure --help'
|
||||
for details on some of the pertinent environment variables.
|
||||
|
||||
You can give `configure' initial values for configuration parameters
|
||||
by setting variables in the command line or in the environment. Here
|
||||
is an example:
|
||||
|
||||
./configure CC=c89 CFLAGS=-O2 LIBS=-lposix
|
||||
|
||||
*Note Defining Variables::, for more details.
|
||||
|
||||
Compiling For Multiple Architectures
|
||||
====================================
|
||||
|
||||
You can compile the package for more than one kind of computer at the
|
||||
same time, by placing the object files for each architecture in their
|
||||
own directory. To do this, you must use a version of `make' that
|
||||
supports the `VPATH' variable, such as GNU `make'. `cd' to the
|
||||
directory where you want the object files and executables to go and run
|
||||
the `configure' script. `configure' automatically checks for the
|
||||
source code in the directory that `configure' is in and in `..'.
|
||||
|
||||
If you have to use a `make' that does not support the `VPATH'
|
||||
variable, you have to compile the package for one architecture at a
|
||||
time in the source code directory. After you have installed the
|
||||
package for one architecture, use `make distclean' before reconfiguring
|
||||
for another architecture.
|
||||
|
||||
Installation Names
|
||||
==================
|
||||
|
||||
By default, `make install' will install the package's files in
|
||||
`/usr/local/bin', `/usr/local/man', etc. You can specify an
|
||||
installation prefix other than `/usr/local' by giving `configure' the
|
||||
option `--prefix=PATH'.
|
||||
|
||||
You can specify separate installation prefixes for
|
||||
architecture-specific files and architecture-independent files. If you
|
||||
give `configure' the option `--exec-prefix=PATH', the package will use
|
||||
PATH as the prefix for installing programs and libraries.
|
||||
Documentation and other data files will still use the regular prefix.
|
||||
|
||||
In addition, if you use an unusual directory layout you can give
|
||||
options like `--bindir=PATH' to specify different values for particular
|
||||
kinds of files. Run `configure --help' for a list of the directories
|
||||
you can set and what kinds of files go in them.
|
||||
|
||||
If the package supports it, you can cause programs to be installed
|
||||
with an extra prefix or suffix on their names by giving `configure' the
|
||||
option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
|
||||
|
||||
Optional Features
|
||||
=================
|
||||
|
||||
Some packages pay attention to `--enable-FEATURE' options to
|
||||
`configure', where FEATURE indicates an optional part of the package.
|
||||
They may also pay attention to `--with-PACKAGE' options, where PACKAGE
|
||||
is something like `gnu-as' or `x' (for the X Window System). The
|
||||
`README' should mention any `--enable-' and `--with-' options that the
|
||||
package recognizes.
|
||||
|
||||
For packages that use the X Window System, `configure' can usually
|
||||
find the X include and library files automatically, but if it doesn't,
|
||||
you can use the `configure' options `--x-includes=DIR' and
|
||||
`--x-libraries=DIR' to specify their locations.
|
||||
|
||||
Specifying the System Type
|
||||
==========================
|
||||
|
||||
For more detailed instructions, you may wish to consult our website at
|
||||
www.bongo-project.org.
|
||||
There may be some features `configure' cannot figure out
|
||||
automatically, but needs to determine by the type of machine the package
|
||||
will run on. Usually, assuming the package is built to be run on the
|
||||
_same_ architectures, `configure' can figure that out, but if it prints
|
||||
a message saying it cannot guess the machine type, give it the
|
||||
`--build=TYPE' option. TYPE can either be a short name for the system
|
||||
type, such as `sun4', or a canonical name which has the form:
|
||||
|
||||
The first thing to do is create a new directory to do the build in: this
|
||||
stops all the build files from littering the source tree. Assuming you're
|
||||
in the Bongo source tree:
|
||||
CPU-COMPANY-SYSTEM
|
||||
|
||||
$ mkdir build
|
||||
$ cd build/
|
||||
where SYSTEM can have one of these forms:
|
||||
|
||||
Now we need to configure the build. There are two ways of doing this, and
|
||||
you can use both! One way is good to start off, the other way is good for
|
||||
tweaking. You’ll see what I mean, but let’s start with the initial
|
||||
configuration. A good invocation might be something like:
|
||||
OS KERNEL-OS
|
||||
|
||||
$ cmake ../ -DCMAKE_INSTALL_PREFIX=/usr/local/bongo -DBONGO_USER=bongo \
|
||||
-DCMAKE_BUILD_TYPE=Debug -DDEBUG=On
|
||||
See the file `config.sub' for the possible values of each field. If
|
||||
`config.sub' isn't included in this package, then this package doesn't
|
||||
need to know the machine type.
|
||||
|
||||
The first argument points to the Bongo source directory. Because we made a
|
||||
‘build’ directory in the source tree and went into it, we’re just pointing at
|
||||
our parent directory. Then come some other options. Every option is prefixed
|
||||
with “-D”, and some of them are CMake options and others are Bongo options.
|
||||
If you are _building_ compiler tools for cross-compiling, you should
|
||||
use the `--target=TYPE' option to select the type of system they will
|
||||
produce code for.
|
||||
|
||||
In full:
|
||||
If you want to _use_ a cross compiler, that generates code for a
|
||||
platform different from the build platform, you should specify the
|
||||
"host" platform (i.e., that on which the generated programs will
|
||||
eventually be run) with `--host=TYPE'.
|
||||
|
||||
* CMAKE_INSTALL_PREFIX: where we want to install to. I use /tmp/build for
|
||||
testing, and /usr/local/bongo when I want to run it in production.
|
||||
* BONGO_USER: which user you want Bongo to run as. I use my user account
|
||||
for testing, “bongo” for production. You can also run as “root” if
|
||||
brave (not recommended!)
|
||||
* CMAKE_BUILD_TYPE: set this to Debug to generate information for gdb,
|
||||
otherwise leave this option out.
|
||||
* DEBUG: enable code paths which generate debugging messages. Both this
|
||||
option and the previous are for either advanced users or developers,
|
||||
really.
|
||||
Sharing Defaults
|
||||
================
|
||||
|
||||
There are other options to the Bongo build, but these are the main ones.
|
||||
However, once you’ve configured Bongo, you may want to tweak something:
|
||||
perhaps turn on debugging, or change one of the file paths, or something
|
||||
different. The easiest way to do that is simply:
|
||||
If you want to set default values for `configure' scripts to share,
|
||||
you can create a site shell script called `config.site' that gives
|
||||
default values for variables like `CC', `cache_file', and `prefix'.
|
||||
`configure' looks for `PREFIX/share/config.site' if it exists, then
|
||||
`PREFIX/etc/config.site' if it exists. Or, you can set the
|
||||
`CONFIG_SITE' environment variable to the location of the site script.
|
||||
A warning: not all `configure' scripts look for a site script.
|
||||
|
||||
$ ccmake ./
|
||||
Defining Variables
|
||||
==================
|
||||
|
||||
Note that it’s “ccmake”, not “cmake”. This starts an interactive application
|
||||
where you can change each configuration item. You point it at the build
|
||||
directory, not the source, and it gives you all the various tweakable options.
|
||||
You’ll see that they are the same options that we pass to cmake - and indeed,
|
||||
you can pass them to cmake!
|
||||
Variables not defined in a site shell script can be set in the
|
||||
environment passed to `configure'. However, some packages may run
|
||||
configure again during the build, and the customized values of these
|
||||
variables may be lost. In order to avoid this problem, you should set
|
||||
them in the `configure' command line, using `VAR=value'. For example:
|
||||
|
||||
There’s even an advanced mode with even more knobs (press ‘t’). When you’re
|
||||
done, press ‘c’ to configure the build and then ‘q’ to quit.
|
||||
./configure CC=/usr/local2/bin/gcc
|
||||
|
||||
Once you have configured the build, you have access to the usual make commands:
|
||||
will cause the specified gcc to be used as the C compiler (unless it is
|
||||
overridden in the site shell script).
|
||||
|
||||
$ make
|
||||
$ make install
|
||||
$ make clean
|
||||
`configure' Invocation
|
||||
======================
|
||||
|
||||
`configure' recognizes the following options to control how it
|
||||
operates.
|
||||
|
||||
`--help'
|
||||
`-h'
|
||||
Print a summary of the options to `configure', and exit.
|
||||
|
||||
`--version'
|
||||
`-V'
|
||||
Print the version of Autoconf used to generate the `configure'
|
||||
script, and exit.
|
||||
|
||||
`--cache-file=FILE'
|
||||
Enable the cache: use and save the results of the tests in FILE,
|
||||
traditionally `config.cache'. FILE defaults to `/dev/null' to
|
||||
disable caching.
|
||||
|
||||
`--config-cache'
|
||||
`-C'
|
||||
Alias for `--cache-file=config.cache'.
|
||||
|
||||
`--quiet'
|
||||
`--silent'
|
||||
`-q'
|
||||
Do not print messages saying which checks are being made. To
|
||||
suppress all normal output, redirect it to `/dev/null' (any error
|
||||
messages will still be shown).
|
||||
|
||||
`--srcdir=DIR'
|
||||
Look for the package's source code in directory DIR. Usually
|
||||
`configure' can determine that directory automatically.
|
||||
|
||||
`--with-audit'
|
||||
Enable logging support for Novell Audit. You will need to provide
|
||||
certificate and private key files "bongocert.pem" and "bongopkey.pem"
|
||||
in SYSCONFDIR/bongo/ for authentication against Audit.
|
||||
|
||||
`configure' also accepts some other, not widely useful, options. Run
|
||||
`configure --help' for more details.
|
||||
|
||||
The first builds Bongo, the second installs it to your prefix, the last
|
||||
removes the intermediate compilation files.
|
||||
|
||||
+213
@@ -0,0 +1,213 @@
|
||||
#
|
||||
# This is a non-recursive (except for imports) automake file.
|
||||
#
|
||||
# The style was inspired by Robert Collins, as mentioned here:
|
||||
#
|
||||
# http://sources.redhat.com/ml/automake/2001-08/msg00061.html
|
||||
#
|
||||
# And the original Recursive Make Considered Harmful:
|
||||
#
|
||||
# http://www.pcug.org.au/~millerp/rmch/recu-make-cons-harm.html
|
||||
#
|
||||
|
||||
AUTOMAKE_OPTIONS := subdir-objects
|
||||
ACLOCAL_AMFLAGS = -I m4 -I macros
|
||||
|
||||
NULL :=
|
||||
|
||||
bin_PROGRAMS :=
|
||||
sbin_PROGRAMS :=
|
||||
noinst_PROGRAMS :=
|
||||
check_PROGRAMS :=
|
||||
|
||||
sbin_SCRIPTS :=
|
||||
|
||||
dist_sbin_SCRIPTS :=
|
||||
dist_noinst_SCRIPTS :=
|
||||
dist_pkglibexec_SCRIPTS :=
|
||||
|
||||
lib_LTLIBRARIES :=
|
||||
|
||||
nobase_dist_pkgdata_DATA :=
|
||||
dist_noinst_DATA :=
|
||||
noinst_DATA :=
|
||||
|
||||
noinst_HEADERS :=
|
||||
|
||||
BUILT_SOURCES :=
|
||||
CLEANFILES :=
|
||||
|
||||
TESTS :=
|
||||
|
||||
AM_CPPFLAGS := $(ALL_CFLAGS) \
|
||||
$(NO_POINTER_SIGN_WARNINGS) \
|
||||
$(PTHREAD_CFLAGS) \
|
||||
-I$(top_srcdir)/include $(GNUTLS_CFLAGS)
|
||||
|
||||
EXTRA_DIST := \
|
||||
config.rpath \
|
||||
bongo.pc.in \
|
||||
HACKING \
|
||||
include/bongo-buildinfo.h \
|
||||
init/bongo.init.fc4.in \
|
||||
init/bongo.init.sles9.in \
|
||||
init/bongo.init.suse10.in \
|
||||
mkinstalldirs
|
||||
|
||||
pkgconfigdir = $(libdir)/pkgconfig
|
||||
pkgconfig_DATA := bongo.pc
|
||||
|
||||
pkglibexecdir = $(libexecdir)/$(PACKAGE)
|
||||
|
||||
install-data-hook::
|
||||
$(mkinstalldirs) $(DESTDIR)$(XPL_DEFAULT_CACHE_DIR)
|
||||
|
||||
SUBDIRS = \
|
||||
$(IMPORT_SUBDIRS) \
|
||||
import/log4c \
|
||||
po
|
||||
|
||||
doxygen/html:
|
||||
if test "$(DOXYGEN)" != NO_DOXYGEN; then \
|
||||
$(DOXYGEN) ./doxygen/doxygen.conf; \
|
||||
else \
|
||||
echo "No doxygen available"; \
|
||||
fi
|
||||
|
||||
docs: doxygen/html
|
||||
|
||||
clean: clean-recursive
|
||||
rm -rf ./doxygen/html ./doxygen/latex
|
||||
|
||||
include_subdirs := \
|
||||
include \
|
||||
src/libs/xpl \
|
||||
src/libs/memmgr \
|
||||
src/libs/bongoutil \
|
||||
src/libs/bongoutil/tests \
|
||||
src/libs/connio \
|
||||
src/libs/connio/tests \
|
||||
src/libs/json \
|
||||
src/libs/mdb \
|
||||
src/libs/mdb-file \
|
||||
src/libs/mdb-xldap \
|
||||
src/libs/logger \
|
||||
src/libs/streamio \
|
||||
src/libs/streamio/codec \
|
||||
src/libs/cal \
|
||||
src/libs/cal/tests \
|
||||
src/libs/nmap \
|
||||
src/libs/management \
|
||||
src/libs/msgapi \
|
||||
src/libs/connmgr \
|
||||
src/libs/calcmd \
|
||||
src/libs/calcmd/tests \
|
||||
src/libs/python \
|
||||
src/libs/python/bongo \
|
||||
src/agents/alarm \
|
||||
src/agents/antispam \
|
||||
src/agents/avirus \
|
||||
src/agents/calcmd \
|
||||
src/agents/collector \
|
||||
src/agents/connmgr \
|
||||
src/agents/connmgr/cmmodules/user \
|
||||
src/agents/connmgr/cmmodules/rbl \
|
||||
src/agents/connmgr/cmmodules/rdns \
|
||||
src/agents/connmgr/cmmodules/lists \
|
||||
src/agents/generic \
|
||||
src/agents/imap \
|
||||
src/agents/imap/tests \
|
||||
src/agents/itip \
|
||||
src/agents/mailprox \
|
||||
src/agents/pluspack \
|
||||
src/agents/pop \
|
||||
src/agents/queue \
|
||||
src/agents/rules \
|
||||
src/agents/smtp \
|
||||
src/agents/store \
|
||||
src/agents/store/tests \
|
||||
src/apps/admin \
|
||||
src/apps/backup \
|
||||
src/apps/config \
|
||||
src/apps/manager \
|
||||
src/apps/sendmail \
|
||||
src/apps/setup \
|
||||
src/apps/mdbtool \
|
||||
src/apps/queuetool \
|
||||
src/apps/storetool \
|
||||
src/apps/storetool/demo \
|
||||
src/www \
|
||||
zoneinfo \
|
||||
man
|
||||
|
||||
# src/apps/migrate
|
||||
|
||||
DIST_SUBDIRS := $(SUBDIRS) $(include_subdirs)
|
||||
|
||||
include include/Bongo.rules
|
||||
include src/libs/xpl/Bongo.rules
|
||||
include src/libs/memmgr/Bongo.rules
|
||||
include src/libs/bongoutil/Bongo.rules
|
||||
include src/libs/bongoutil/tests/Bongo.rules
|
||||
include src/libs/connio/Bongo.rules
|
||||
include src/libs/connio/tests/Bongo.rules
|
||||
include src/libs/json/Bongo.rules
|
||||
include src/libs/mdb/Bongo.rules
|
||||
include src/libs/mdb-file/Bongo.rules
|
||||
include src/libs/mdb-xldap/Bongo.rules
|
||||
include src/libs/logger/Bongo.rules
|
||||
include src/libs/streamio/Bongo.rules
|
||||
include src/libs/streamio/codec/Bongo.rules
|
||||
include src/libs/cal/Bongo.rules
|
||||
include src/libs/cal/tests/Bongo.rules
|
||||
include src/libs/nmap/Bongo.rules
|
||||
include src/libs/management/Bongo.rules
|
||||
include src/libs/msgapi/Bongo.rules
|
||||
include src/libs/connmgr/Bongo.rules
|
||||
include src/libs/calcmd/Bongo.rules
|
||||
include src/libs/calcmd/tests/Bongo.rules
|
||||
include src/libs/python/Bongo.rules
|
||||
include src/libs/python/bongo/Bongo.rules
|
||||
include src/agents/addressbook/Bongo.rules
|
||||
include src/agents/alarm/Bongo.rules
|
||||
include src/agents/antispam/Bongo.rules
|
||||
include src/agents/avirus/Bongo.rules
|
||||
include src/agents/calcmd/Bongo.rules
|
||||
include src/agents/collector/Bongo.rules
|
||||
include src/agents/connmgr/Bongo.rules
|
||||
include src/agents/connmgr/cmmodules/user/Bongo.rules
|
||||
include src/agents/connmgr/cmmodules/rbl/Bongo.rules
|
||||
include src/agents/connmgr/cmmodules/rdns/Bongo.rules
|
||||
include src/agents/connmgr/cmmodules/lists/Bongo.rules
|
||||
include src/agents/generic/Bongo.rules
|
||||
include src/agents/imap/Bongo.rules
|
||||
include src/agents/imap/tests/Bongo.rules
|
||||
include src/agents/itip/Bongo.rules
|
||||
include src/agents/mailprox/Bongo.rules
|
||||
include src/agents/pluspack/Bongo.rules
|
||||
include src/agents/pop/Bongo.rules
|
||||
include src/agents/queue/Bongo.rules
|
||||
include src/agents/rules/Bongo.rules
|
||||
include src/agents/smtp/Bongo.rules
|
||||
include src/agents/store/Bongo.rules
|
||||
include src/agents/store/tests/Bongo.rules
|
||||
include src/apps/admin/Bongo.rules
|
||||
include src/apps/backup/Bongo.rules
|
||||
include src/apps/config/Bongo.rules
|
||||
include src/apps/manager/Bongo.rules
|
||||
include src/apps/sendmail/Bongo.rules
|
||||
include src/apps/setup/Bongo.rules
|
||||
include src/apps/mdbtool/Bongo.rules
|
||||
# include src/apps/migrate/Bongo.rules
|
||||
include src/apps/queuetool/Bongo.rules
|
||||
include src/apps/storetool/Bongo.rules
|
||||
include src/apps/storetool/demo/Bongo.rules
|
||||
include src/www/Bongo.rules
|
||||
include zoneinfo/Bongo.rules
|
||||
include man/Bongo.rules
|
||||
|
||||
update-makefiles:
|
||||
@for dir in $(include_subdirs) ; do \
|
||||
echo " cp $(top_srcdir)/Makefile.am.subdir $(top_srcdir)/$$dir/Makefile.am" ; \
|
||||
cp "$(top_srcdir)/Makefile.am.subdir" "$(top_srcdir)/$$dir/Makefile.am" || exit 1 ; \
|
||||
done
|
||||
@@ -0,0 +1,17 @@
|
||||
# -*- Makefile -*-
|
||||
#
|
||||
# Do not edit!
|
||||
#
|
||||
# (unless this is Makefile.am.subdir)
|
||||
#
|
||||
# This file is a copy of the toplevel Makefile.am.subdir. If changes
|
||||
# need to be made, edit that file, and make update-makefiles, and
|
||||
# check the new files in.
|
||||
#
|
||||
# This is a skeletal automake file. The real automake fules for
|
||||
# building the targets for this directory can be found in the
|
||||
# Bongo.rules file. This file is simply here so that 'make all' can
|
||||
# work in each subdirectory.
|
||||
|
||||
all clean install:
|
||||
@cd $(top_builddir) && $(MAKE) $(MFLAGS) $(subdir)/$@
|
||||
@@ -1,205 +0,0 @@
|
||||
# Bongo
|
||||
|
||||
Bongo is an easy-to-use mail and calendar system, offering a simple yet
|
||||
powerful user interface. The goal is to make sharing, organisation, and
|
||||
communication simpler, quicker, and more useful.
|
||||
|
||||
It is intended for power home users, homelabs, small organisations, and mail
|
||||
service operators who want an integrated server without assembling every
|
||||
basic mail and calendar function from unrelated daemons.
|
||||
|
||||
This repository revives and modernises the original Bongo mail/calendar
|
||||
server. The [upstream GitHub repository](https://github.com/bongo-project/bongo)
|
||||
was archived in January 2025; active development now lives in the
|
||||
[Disconnected by Peer Gitea repository](https://gitea.disconnected-by-peer.at/geos_one/bongo).
|
||||
The historical project site remains available at
|
||||
[bongo-project.org](https://bongo-project.org/).
|
||||
|
||||
## Project status
|
||||
|
||||
Bongo 0.7 is an active development line, not yet a final release. It ports the
|
||||
server and Web interface to current C, CMake, and Python 3 while retaining the
|
||||
small integrated-server design and the familiar Bongo Web appearance. Test a
|
||||
staged installation before exposing it to Internet mail traffic and keep a
|
||||
backup of all mail, account, key, and configuration data.
|
||||
|
||||
The 0.7 mail listeners are IPv4. IPv6 support is planned as one coherent
|
||||
change for 0.9 so authentication, ACLs, SPF, logging, rate limits, and proxy
|
||||
metadata all use the same address representation. JMAP is likewise outside
|
||||
the 0.7 scope.
|
||||
|
||||
## Highlights of the 0.7 development tree
|
||||
|
||||
- SMTP receiving and delivery, authenticated submission, SMTPS, opportunistic
|
||||
outbound STARTTLS, LMTP routing, and a rate-limited trusted-device relay.
|
||||
- IMAP4, IMAP4rev1, and IMAP4rev2 compatibility, IMAPS, POP3/POP3S, and
|
||||
ManageSieve with shared GNU SASL authentication.
|
||||
- Webmail plus CalDAV and CardDAV for mail, calendars, and contacts; the Web
|
||||
service is normally placed behind Apache, nginx, or Nginx Proxy Manager.
|
||||
- Native SPF, DKIM, and DMARC verification, outbound DKIM signing, and SRS
|
||||
forwarding/reversal without depending on a separate filtering service.
|
||||
- Optional ClamAV and SpamAssassin integration. Distribution defaults keep
|
||||
both agents disabled until their services are detected or configured.
|
||||
- Argon2id account passwords, optional TOTP, recovery codes, service-scoped
|
||||
app passwords, and LDAP/Active Directory authentication with a bounded local
|
||||
outage cache.
|
||||
- External POP3/IMAP collection and matching authenticated SMTP identities,
|
||||
Sieve filters, user tasks, signatures, and provider presets.
|
||||
- HAProxy PROXY protocol v1/v2 for trusted TCP4 mail frontends, configurable
|
||||
Web forwarded-address handling, Fail2ban filters, systemd, and OpenRC files.
|
||||
- Native RFC 8555 ACME renewal with HTTP-01 or DNS-01, ARI/Retry-After
|
||||
scheduling, native ldns `nsupdate`/RFC 2136 with TSIG, and a scoped
|
||||
Cloudflare provider plugin.
|
||||
- GCC and Clang builds, split CMake files, CTest coverage, and CPack source and
|
||||
binary packaging.
|
||||
|
||||
## Build requirements
|
||||
|
||||
Bongo requires a C11 compiler, CMake 3.16 or newer, POSIX threads, Gettext,
|
||||
GLib, GMime, libgcrypt, GnuTLS, SQLite, libcurl, ldns, GNU Mailutils with Sieve,
|
||||
GNU GSASL 2.2 or newer, OpenLDAP, libical, liboath, Argon2, libqrencode, libspf2,
|
||||
OpenDKIM (including `opendkim-genkey`), OpenDMARC, libsrs2, libpsl, GnuTLS's
|
||||
`certtool`, and Python 3 with development headers. The Python
|
||||
environment must provide `dnspython`, `python-dateutil`, `nh3`, and `vobject`.
|
||||
CMake reports missing Python modules during configuration; setup reports a
|
||||
missing key-generation tool before changing the operative configuration.
|
||||
|
||||
Build outside the source tree:
|
||||
|
||||
```sh
|
||||
cmake -S . -B build \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_INSTALL_PREFIX=/usr
|
||||
cmake --build build
|
||||
ctest --test-dir build --output-on-failure
|
||||
cmake --install build
|
||||
```
|
||||
|
||||
For a debug installation use `-DCMAKE_BUILD_TYPE=Debug`. Do not work around
|
||||
warnings by disabling them: GCC and Clang should both compile the tree cleanly.
|
||||
|
||||
Create packages with the generated CPack configurations:
|
||||
|
||||
```sh
|
||||
cpack --config build/CPackConfig.cmake
|
||||
cpack --config build/CPackSourceConfig.cmake
|
||||
```
|
||||
|
||||
Source archives are named `bongo-<version>` without a `-linux` suffix.
|
||||
Distribution packages should configure `CMAKE_INSTALL_PREFIX=/usr`; CMake then
|
||||
uses `/etc/bongo` rather than incorrectly installing configuration below
|
||||
`/usr/etc`.
|
||||
|
||||
## Initial setup
|
||||
|
||||
After installing the files, run the scenario-based curses wizard as root:
|
||||
|
||||
```sh
|
||||
bongo-setup
|
||||
```
|
||||
|
||||
`bongo-config wizard` opens the same interface. The wizard asks about the mail
|
||||
identity and domains, reverse proxies, enabled protocols, trusted port 26
|
||||
relay, LDAP, legacy-client TLS, DKIM, public mail DNS, ClamAV, and
|
||||
SpamAssassin, and optional ACME HTTP-01 or DNS-01 renewal. It validates or
|
||||
creates the TLS and per-domain DKIM material,
|
||||
shows exact SPF/DKIM/DMARC records, and records unfinished DNS work in the
|
||||
admin task list. Individual settings retain safe defaults. Passwords and the
|
||||
initial configuration bundle are passed through anonymous file descriptors
|
||||
and do not appear in process arguments.
|
||||
|
||||
The wizard probes local `clamd` and `spamd` services. For an installed but
|
||||
unreachable scanner it offers an explicit local configuration editor: paths
|
||||
and service actions are previewed, unrelated options are preserved, listeners
|
||||
are restricted to loopback, and adjacent `.bongo-setup.bak` files plus a
|
||||
transactional rollback protect the previous setup. Service enable/restart is a
|
||||
separate choice and must pass a protocol probe before the Bongo setup commits.
|
||||
Remote scanners are never edited. Loopback-only scanner fragments and Apache,
|
||||
nginx, Nginx Proxy Manager, and HAProxy examples are installed below
|
||||
`share/bongo/examples`.
|
||||
|
||||
Start Bongo with the service manager used by the host, for example:
|
||||
|
||||
```sh
|
||||
systemctl enable --now bongo.service
|
||||
```
|
||||
|
||||
Use the common editor and validator for later changes:
|
||||
|
||||
```sh
|
||||
bongo-admin config
|
||||
bongo-admin config check
|
||||
```
|
||||
|
||||
Store configuration document names such as `smtp`, `imap`, `antispam`, and
|
||||
`antivirus` deliberately have no `.json` suffix even though their contents are
|
||||
JSON. Source and installed template names use the same convention.
|
||||
|
||||
## Security and compatibility
|
||||
|
||||
TLS 1.3 and TLS 1.2 are the defaults. Older TLS can be enabled only through an
|
||||
explicit compatibility option and should be limited to trusted legacy
|
||||
networks. Internet SMTP delivery remains opportunistic because not every peer
|
||||
offers STARTTLS; certificate verification is enabled when TLS is used, while a
|
||||
separate policy can require TLS for controlled destinations.
|
||||
|
||||
The internal relay is not an open relay. It binds to its own address/port,
|
||||
accepts only configured networks, normalises legacy local senders, and applies
|
||||
connection, message, recipient, and byte limits. PROXY, XCLIENT, XFORWARD, and
|
||||
mail-header client metadata are accepted or emitted only for explicitly
|
||||
trusted peers.
|
||||
|
||||
Before a public deployment, review at least the TLS, authentication, mail-auth,
|
||||
proxy, scanner, and SMTP documentation linked below.
|
||||
|
||||
## Documentation
|
||||
|
||||
- [Documentation index](docs/README.md)
|
||||
- [Architecture and data flow](docs/architecture.md)
|
||||
- [Administration quick reference](docs/administration.md)
|
||||
- [Installation and state directories](docs/directory-layout.md)
|
||||
- [Network ports](docs/ports.md)
|
||||
- [Protocols and client compatibility](docs/protocols.md)
|
||||
- [Storage and backup](docs/storage.md)
|
||||
- [Development and testing](docs/development.md)
|
||||
- [Roadmap to 1.0](docs/roadmap.md)
|
||||
- [Guided setup and configuration](docs/setup-wizard.md)
|
||||
- [TLS policy and legacy-client compatibility](docs/tls.md)
|
||||
- [Authentication, TOTP, app passwords, LDAP, and Fail2ban](docs/authentication.md)
|
||||
- [SMTP, submission, LMTP, internal relay, and proxy metadata](docs/smtp.md)
|
||||
- [IMAP compatibility and internationalised mailboxes](docs/imap.md)
|
||||
- [SPF, DKIM, DMARC, and SRS](docs/mail-authentication.md)
|
||||
- [SpamAssassin and ClamAV](docs/antispam.md)
|
||||
- [HAProxy PROXY protocol](docs/proxy-protocol.md)
|
||||
- [External account collection and sender identities](docs/external-accounts.md)
|
||||
|
||||
The archived
|
||||
[Bongo project documentation](https://github.com/bongo-project/bongo-project/tree/gh-pages/Documentation)
|
||||
preserves the original administration guide, protocol descriptions,
|
||||
architecture notes, and release notes. It is useful for historical context,
|
||||
but its installation paths, dependencies, SSL advice, and feature status do
|
||||
not describe this 0.7 tree and must not be copied into a current deployment.
|
||||
|
||||
Related historical source repositories are also preserved on GitHub:
|
||||
|
||||
- [Dragonfly](https://github.com/bongo-project/dragonfly) contains the original
|
||||
Python/JavaScript Webmail and Hawkeye administration interface. The 0.7 Web
|
||||
service keeps its familiar artwork and CSS where applicable, with maintained
|
||||
Python 3 server code in this repository.
|
||||
|
||||
The maintained roadmap incorporates the still useful historical 1.0 goals.
|
||||
Experimental Ruby rewrites are deliberately not part of the current plan:
|
||||
the server and Web interface remain C and Python 3 respectively.
|
||||
|
||||
The manual pages `bongo-setup(1)`, `bongo-config(1)`, `bongo-admin(1)`,
|
||||
`bongo-manager(1)`, and `bongoagents(8)` document the installed tools.
|
||||
|
||||
## History and licence
|
||||
|
||||
Bongo began as a community continuation of Novell Hula and retains the
|
||||
original copyright notices throughout the source tree. Historical context is
|
||||
preserved in `AUTHORS`, `ChangeLog`, `NEWS`, and the archived upstream
|
||||
repository.
|
||||
|
||||
Bongo is free software under the GNU General Public License version 2. See
|
||||
`COPYING` for the complete licence.
|
||||
|
||||
-182
@@ -1,182 +0,0 @@
|
||||
# Bongo roadmap
|
||||
|
||||
## 0.7.0 implementation status (2026-07-16)
|
||||
|
||||
Completed foundations: CMake/CPack packaging, GCC/Clang warning cleanup,
|
||||
Python 3.14 compatibility, system vobject/dateutil migration, SMTP/IMAP/POP
|
||||
build targets, SPF/DKIM/DMARC/SRS libraries, GNU GSASL PLAIN/LOGIN support,
|
||||
RFC 5228 validation/ManageSieve scaffolding, systemd templates, and sanitizer
|
||||
test coverage. Native external-account collection and provider SMTP routing,
|
||||
the guarded internal relay, persistent user tasks, and personal text/HTML
|
||||
signatures with verified sender identities are also implemented.
|
||||
|
||||
Still required before the 0.7.0 release: persistent user filter editing,
|
||||
complete IMAP/POP/SMTP capability work, TOTP and app passwords, complete
|
||||
CalDAV/CardDAV behavior, interoperability tests, and distribution
|
||||
Ebuilds/packages. No release tag is valid until these items are implemented
|
||||
and tested.
|
||||
|
||||
## Required for Bongo 0.7.0: modern mail protocols
|
||||
|
||||
- Separate SMTP relay on port 25 from authenticated submission on ports 587
|
||||
(STARTTLS) and 465 (implicit TLS). Submission must require authentication by
|
||||
default and use its own relay and sender policies.
|
||||
- Add an optional internal relay listener (port 26 by default) for appliances
|
||||
and trusted services. It must be disabled by default, bind independently and
|
||||
refuse to start without an explicit source-network allowlist.
|
||||
- Configure the internal relay through the installation wizard, the web admin
|
||||
interface and the console configuration tool. All three must share one schema
|
||||
and validation for bind address, networks, normalization domain, explicit
|
||||
device mappings, verified DNS suffixes, TLS compatibility and rate limits.
|
||||
- Add external mail accounts as per-user database objects, never global server
|
||||
configuration. One account combines inbound IMAP/POP collection settings,
|
||||
retention/deletion policy, folder mapping and duplicate tracking with its
|
||||
authenticated outbound SMTP identity. Store provider passwords, app passwords
|
||||
and SMTP tokens only in the encrypted credential store. Users manage their own
|
||||
accounts in web settings; administrators control policy and may assist through
|
||||
admin and console interfaces. Include provider connection tests, certificate
|
||||
verification, secret rotation and explicit Proton Bridge/SMTP-token modes.
|
||||
- Detect mailing lists primarily from RFC 2919 `List-ID` and RFC 2369
|
||||
`List-Post` headers. Expose filter conditions for any mailing list and for a
|
||||
specific canonical List-ID; existing move/copy actions then file messages in
|
||||
a user-selected mail folder.
|
||||
- Show a per-user `!` task when a new List-ID is first detected. From that task
|
||||
the user can create a folder rule, ignore it once, permanently disable future
|
||||
prompts for that List-ID, or delete the task. Deleting a task must never
|
||||
delete its message; message deletion is a separate explicit action. Persist
|
||||
task state by user and canonical List-ID so ignored/disabled prompts do not
|
||||
reappear, and provide equivalent controls in web settings.
|
||||
- Provide a general per-user filter editor. Conditions include sender address,
|
||||
sender domain, recipient, subject, arbitrary headers, message size, mailing
|
||||
list/List-ID and membership of the sender in a contact group (for example,
|
||||
group `Family`). Actions include move/copy to a folder, forward, delete and
|
||||
stop processing. Validate every rule server-side and never grant the web
|
||||
process unrestricted write access to the system configuration store.
|
||||
- Add per-user plain-text and HTML signatures to the restored web composer.
|
||||
Allow multiple signatures and select a default per sender identity or
|
||||
external account. Never append a personal signature a second time to mail
|
||||
composed by IMAP/SMTP clients. Keep PlusPack signatures as a separate,
|
||||
administrator-controlled organization disclaimer feature.
|
||||
- Use RFC 5228 Sieve as the public filter import/export format and provide an
|
||||
RFC 5804 ManageSieve service on port 4190 with STARTTLS and secure SASL.
|
||||
Web filters, imported scripts and ManageSieve must share one parser,
|
||||
capability set, validator and active-script store; unsupported extensions
|
||||
must produce an explicit error rather than being silently discarded.
|
||||
- Provide a native RFC 5230 `vacation` action and RFC 6131
|
||||
`vacation-seconds` for the web out-of-office assistant. Bongo must own
|
||||
sender suppression, loop prevention, rate limiting, reply generation and
|
||||
audit logging; do not execute Mailutils' external vacation delivery module.
|
||||
- Use GNU GSASL as the common authentication mechanism implementation for
|
||||
SMTP submission, IMAP, POP3 and ManageSieve. Keep authorization, app-password
|
||||
policy and auditing in Bongo callbacks; do not duplicate PLAIN, SCRAM or
|
||||
OAUTHBEARER protocol implementations in individual agents.
|
||||
- Support SASL PLAIN and LOGIN over TLS, SASL initial responses, SCRAM-SHA-256,
|
||||
app passwords and optional OAUTHBEARER/EXTERNAL. Never advertise mechanisms
|
||||
that are unavailable or unsafe on the current connection.
|
||||
- Add POP3 SASL and integrate its authentication with app-password policy.
|
||||
- IMAP IDLE is implemented with store-event polling and a 29-minute renewal
|
||||
boundary. UIDPLUS (`APPENDUID`, `COPYUID`, `UID EXPUNGE`) and rollback-safe
|
||||
Store MOVE are implemented while retaining the legacy `IMAP4` capability. Add
|
||||
SPECIAL-USE, LIST-EXTENDED and LITERAL+.
|
||||
- Add IMAP ENABLE and UTF8=ACCEPT, then advertise IMAP4rev2 only after every
|
||||
mandatory rev2 behavior and interoperability test passes.
|
||||
- Implement SMTPUTF8 end to end through submission, relay, LMTP, queue, DSN,
|
||||
DKIM and SRS handling.
|
||||
- Add outbound certificate verification and policy support for DANE, MTA-STS,
|
||||
TLS-RPT and REQUIRETLS.
|
||||
- Add CONDSTORE/QRESYNC, ESEARCH/SEARCHRES, SORT/THREAD, BINARY and APPENDLIMIT.
|
||||
- Cover every advertised capability with protocol tests and Thunderbird
|
||||
interoperability tests.
|
||||
|
||||
## Required for Bongo 0.7.0: authentication hardening
|
||||
|
||||
- Add optional TOTP two-factor authentication for the web interface and
|
||||
administration.
|
||||
- Add single-display recovery codes and a secure recovery/reset workflow.
|
||||
- Add individually revocable app passwords for IMAP, POP3, SMTP submission,
|
||||
CalDAV and CardDAV.
|
||||
- Allow each app password to be restricted by service, expiry time and,
|
||||
optionally, source network.
|
||||
- Store app passwords with Argon2id and encrypt TOTP secrets at rest. Never
|
||||
store or display reusable plaintext credentials.
|
||||
- When 2FA is enabled, allow administrators to require app passwords and
|
||||
disable the account password for non-interactive protocols.
|
||||
- Record creation, last use, service and source address without logging the
|
||||
credential itself.
|
||||
|
||||
Possible implementation dependencies are liboath, libargon2 and optional
|
||||
libqrencode. This work is a release requirement for Bongo 0.7.0 and must be
|
||||
implemented and tested after CalDAV/CardDAV and the web restoration, before
|
||||
packaging and release.
|
||||
|
||||
## Groupware
|
||||
|
||||
- Complete CalDAV event discovery, synchronization and CRUD operations.
|
||||
- Add CardDAV contacts using Bongo's existing address-book store.
|
||||
- Add Thunderbird-oriented setup and RFC 6764 service discovery.
|
||||
- Keep Outlook/MAPI/OpenChange integration deferred until after 0.7.0. Preserve
|
||||
stable service boundaries and identifiers in authentication, contacts,
|
||||
calendars, folders and filters so that a future MAPI compatibility layer can
|
||||
be added without coupling it to the web UI or replacing the core data model.
|
||||
|
||||
## Deferred until after 0.7.0
|
||||
|
||||
The following historical features are useful references, but are explicitly
|
||||
outside the 0.7.0 release scope:
|
||||
|
||||
- Restore iTIP scheduling and invitation processing after CalDAV behavior and
|
||||
interoperability are complete. Reuse the retained `itip` agent only after a
|
||||
security and ownership review.
|
||||
- Restore calendar alarms/reminders as a separately configurable service. The
|
||||
retained `alarm` source is a starting point, not release-ready code.
|
||||
- Consider the old calendar-by-mail `calcmd` feature as an optional component;
|
||||
it must not be enabled by default until its parser and authorization model
|
||||
have been hardened.
|
||||
- Add safe, documented backup, restore and portable user export tooling. Do not
|
||||
resurrect the removed `bongo-backup` or `bongo-migrate` implementations,
|
||||
which were removed as dangerous or obsolete.
|
||||
- Add message full-text search using a maintained backend such as SQLite FTS5
|
||||
or Xapian. Do not restore the removed bundled CLucene snapshot.
|
||||
- Reintroduce selected PlusPack organization policies, including optional
|
||||
organization disclaimers/signatures and attachment rules, separately from
|
||||
users' personal signatures and only as explicit administrator features.
|
||||
- Use the historical Sundial and Hawkeye code only as behavioral and data-model
|
||||
references. Their Python 2 web implementations and obsolete management
|
||||
stack must not return to the build.
|
||||
- Keep Outlook/MAPI compatibility, SMS gateways and other niche connectors as
|
||||
separately evaluated post-0.7 projects rather than implicit core features.
|
||||
- Keep the restored Dragonfly/Bongo appearance and original licensed assets in
|
||||
0.7 while making its layout responsive and accessible. Evaluate a deliberate
|
||||
Material Design refresh for 0.8; do not mix that redesign into the 0.7
|
||||
compatibility work or replace existing artwork with generated icons.
|
||||
- For a 0.8 UI refresh, evaluate a pinned, self-hosted HTMX release with
|
||||
server-rendered HTML fragments instead of adopting a large client-side SPA
|
||||
stack. Never require a public CDN at runtime, and retain a functional
|
||||
hyperlink/form baseline where practical.
|
||||
- Extend external provider accounts beyond mail with optional calendar and
|
||||
contact services. Support read-only private iCalendar feed subscriptions as
|
||||
well as CalDAV/CardDAV synchronization where the provider offers it, and use
|
||||
OAuth instead of stored account passwords where required. Mail, calendar and
|
||||
contacts may share one provider preset and credential grant, but must remain
|
||||
independently enabled and revocable by the user.
|
||||
- Target JMAP Core (RFC 8620), JMAP Mail (RFC 8621) and JMAP Contacts
|
||||
(RFC 9610) for the 0.9 series as the modern primary synchronization API.
|
||||
Keep IMAP4rev1, POP3, CalDAV and CardDAV as compatibility protocols; do not
|
||||
remove them while major clients such as Thunderbird still depend on them.
|
||||
Track JMAP Calendars, but do not advertise its capability until the IETF
|
||||
specification is published and Bongo passes interoperability tests.
|
||||
|
||||
The removed MDB/MDB-XLDAP, DMC/statistics, ConnMgr/NMAP management, legacy
|
||||
logging, old mail proxy and incomplete Dragonfly history code are obsolete
|
||||
architecture and are not candidates for reactivation.
|
||||
|
||||
## External library cleanup
|
||||
|
||||
- Prefer maintained system libraries over historical bundled snapshots.
|
||||
- Keep libical as the native iCalendar parser/converter and update the minimum
|
||||
supported system version after cross-architecture testing.
|
||||
- Bongo 0.7 uses system vobject/python-dateutil, Python's `json` and `email`
|
||||
standard libraries, and no longer ships the historical bundled copies.
|
||||
- SimpleTAL remains temporarily embedded only for the legacy administration
|
||||
templates; replace that layer after the restored web administration UI has
|
||||
equivalent coverage.
|
||||
@@ -0,0 +1,119 @@
|
||||
01: Currently the NetMail agents signal handling for SIGHUP is not
|
||||
fully implemented. We need to establish uniform signal handling
|
||||
for SIGHUP, SIGUSR1 and SIGUSR2 as appropriate.
|
||||
|
||||
02: An MDBPAM driver would be more appropriate than the simple MDBFIle
|
||||
driver.
|
||||
|
||||
03: The MDBFile driver is not multi-app multi-thread safe for read and
|
||||
write access.
|
||||
|
||||
04: The anti-virus agent needs to use an open source anti-virus engine
|
||||
as an example.
|
||||
|
||||
05: Add backwards API compatibility for old SDK based components.
|
||||
|
||||
06: Instrument use of OpenLDAP in place of our old LDAP library.
|
||||
|
||||
07: Run as non-root user.
|
||||
|
||||
08: src/agents/nmap/nmapc.h is empty
|
||||
|
||||
09: The managed client library needs to use the connection manager library.
|
||||
|
||||
10: We need to identify and resolve 'fixme' comments.
|
||||
|
||||
10: The connection management library needs:
|
||||
a: exclusive BUFSIZE defintion as it is defined in most private
|
||||
header files.
|
||||
b: exclusive MTU definition as it is defined in most private
|
||||
header files.
|
||||
|
||||
11: Source code scrubbing definition:
|
||||
: DOS2Unix the source and make files.
|
||||
: Replace TAB characters with 4 spaces.
|
||||
: Ensure that the first directive in the source files is:
|
||||
#include <config.h>
|
||||
: Replace BUFSIZE with CONN_BUFSIZE as defined in connio.h
|
||||
: Remove BUFSIZE definitions from source files.
|
||||
: Replace MTU with CONN_TCP_MTU as defined in connio.h
|
||||
: Remove MTU definitions from source files.
|
||||
: Remove NMLOGID_H_NEED_LOGGING_KEY and NMLOGID_H_NEED_LOGGING_CERT
|
||||
as they are now handled by the logging library.
|
||||
: Re-format the source files.
|
||||
: Defines should be grouped together; preferrable in the private
|
||||
header file as appropriate.
|
||||
: The ChopNL macro is repeatedly defined; this definition exists in
|
||||
connio.h as CHOP_NEWLINE; convert usage.
|
||||
|
||||
Should this macro be in the cross platform headers?
|
||||
: The SetPtrToValue macro is repeatedly defined across binaries;
|
||||
however, it does not appear in any source file?
|
||||
|
||||
This definition exists in connio.h at this time as
|
||||
SET_POINTER_TO_VALUE.
|
||||
|
||||
Should this macro be retained in the cross platform headers?
|
||||
: Strucuture definitions should be grouped together; preferrably in
|
||||
the private header file as appropriate.
|
||||
: Move global variables to a binary name based structure and:
|
||||
If single source file; leave structure definition in that file.
|
||||
|
||||
If multiple source files; move structure definition to the
|
||||
private header file; setup an extern of the structue which
|
||||
should be in the main source file.
|
||||
|
||||
Globals for thread ID's are commonly defined as 'int' and not
|
||||
XplThreadID. Convert definitions such as:
|
||||
|
||||
int Tid;
|
||||
int TGid;
|
||||
|
||||
to:
|
||||
|
||||
struct {
|
||||
XplThreadID main;
|
||||
XplThreadID group;
|
||||
} id;
|
||||
|
||||
Adjust global variable names and usage appropriately.
|
||||
: Base64Chars[], DecodeBase64() and EncodeBase64() are commonly
|
||||
occurring in the binaries. Should this be moved to a utility
|
||||
library?
|
||||
: Remove inappropriate code comments and reformat those left behind
|
||||
as directed.
|
||||
: Convert BUG comments to fixme.
|
||||
: For defined strings; use sizeof(string) - 1 in place of a defined length.
|
||||
: Remove old connection i/o handling routines and definitions as
|
||||
directed (using little optimizations along the way?):
|
||||
|
||||
XPLIPReadSSL
|
||||
|
||||
XPLIPWriteSSL
|
||||
|
||||
IOFuncs
|
||||
|
||||
DoNMAPWrite
|
||||
|
||||
DoNMAPRead
|
||||
|
||||
DoClientWrite
|
||||
|
||||
DoClientRead
|
||||
|
||||
FlushClient
|
||||
|
||||
SendClient
|
||||
|
||||
SendNMAPServer
|
||||
|
||||
GetNMAPAnswer
|
||||
|
||||
GetNMAPAnswerLen
|
||||
|
||||
ConnectUserToNMAPServer
|
||||
|
||||
EndClientConnection
|
||||
12: We need to resolve PRODUCT_VERSION definitions and use.
|
||||
|
||||
13: Improve client connection state processing
|
||||
+216
@@ -0,0 +1,216 @@
|
||||
|
||||
dnl PKG_CHECK_MODULES(GSTUFF, gtk+-2.0 >= 1.3 glib = 1.3.4, action-if, action-not)
|
||||
dnl defines GSTUFF_LIBS, GSTUFF_CFLAGS, see pkg-config man page
|
||||
dnl also defines GSTUFF_PKG_ERRORS on error
|
||||
AC_DEFUN(PKG_CHECK_MODULES, [
|
||||
succeeded=no
|
||||
|
||||
if test -z "$PKG_CONFIG"; then
|
||||
AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
|
||||
fi
|
||||
|
||||
if test "$PKG_CONFIG" = "no" ; then
|
||||
echo "*** The pkg-config script could not be found. Make sure it is"
|
||||
echo "*** in your path, or set the PKG_CONFIG environment variable"
|
||||
echo "*** to the full path to pkg-config."
|
||||
echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config."
|
||||
else
|
||||
PKG_CONFIG_MIN_VERSION=0.9.0
|
||||
if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
|
||||
AC_MSG_CHECKING(for $2)
|
||||
|
||||
if $PKG_CONFIG --exists "$2" ; then
|
||||
AC_MSG_RESULT(yes)
|
||||
succeeded=yes
|
||||
|
||||
AC_MSG_CHECKING($1_CFLAGS)
|
||||
$1_CFLAGS=`$PKG_CONFIG --cflags "$2"`
|
||||
AC_MSG_RESULT($$1_CFLAGS)
|
||||
|
||||
AC_MSG_CHECKING($1_LIBS)
|
||||
$1_LIBS=`$PKG_CONFIG --libs "$2"`
|
||||
AC_MSG_RESULT($$1_LIBS)
|
||||
else
|
||||
$1_CFLAGS=""
|
||||
$1_LIBS=""
|
||||
## If we have a custom action on failure, don't print errors, but
|
||||
## do set a variable so people can do so.
|
||||
$1_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
|
||||
ifelse([$4], ,echo $$1_PKG_ERRORS,)
|
||||
fi
|
||||
|
||||
AC_SUBST($1_CFLAGS)
|
||||
AC_SUBST($1_LIBS)
|
||||
else
|
||||
echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
|
||||
echo "*** See http://www.freedesktop.org/software/pkgconfig"
|
||||
fi
|
||||
fi
|
||||
|
||||
if test $succeeded = yes; then
|
||||
ifelse([$3], , :, [$3])
|
||||
else
|
||||
ifelse([$4], , AC_MSG_ERROR([Library requirements ($2) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them.]), [$4])
|
||||
fi
|
||||
])
|
||||
|
||||
|
||||
|
||||
dnl a macro to check for ability to create python extensions
|
||||
dnl AM_CHECK_PYTHON_HEADERS([ACTION-IF-POSSIBLE], [ACTION-IF-NOT-POSSIBLE])
|
||||
dnl function also defines PYTHON_INCLUDES
|
||||
AC_DEFUN([AM_CHECK_PYTHON_HEADERS],
|
||||
[AC_REQUIRE([AM_PATH_PYTHON])
|
||||
AC_MSG_CHECKING(for headers required to compile python extensions)
|
||||
dnl deduce PYTHON_INCLUDES
|
||||
py_prefix=`$PYTHON -c "import sys; print sys.prefix"`
|
||||
py_exec_prefix=`$PYTHON -c "import sys; print sys.exec_prefix"`
|
||||
PYTHON_INCLUDES="-I${py_prefix}/include/python${PYTHON_VERSION}"
|
||||
if test "$py_prefix" != "$py_exec_prefix"; then
|
||||
PYTHON_INCLUDES="$PYTHON_INCLUDES -I${py_exec_prefix}/include/python${PYTHON_VERSION}"
|
||||
fi
|
||||
AC_SUBST(PYTHON_INCLUDES)
|
||||
dnl check if the headers exist:
|
||||
save_CPPFLAGS="$CPPFLAGS"
|
||||
CPPFLAGS="$CPPFLAGS $PYTHON_INCLUDES"
|
||||
AC_TRY_CPP([#include <Python.h>],dnl
|
||||
[AC_MSG_RESULT(found)
|
||||
$1],dnl
|
||||
[AC_MSG_RESULT(not found)
|
||||
$2])
|
||||
CPPFLAGS="$save_CPPFLAGS"
|
||||
])
|
||||
|
||||
dnl AM_PATH_CHECK([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
|
||||
dnl Test for check, and define CHECK_CFLAGS and CHECK_LIBS
|
||||
dnl
|
||||
|
||||
AC_DEFUN([AM_PATH_CHECK],
|
||||
[
|
||||
AC_ARG_WITH([check],
|
||||
[ --with-check=PATH prefix where check is installed [default=auto]])
|
||||
|
||||
min_check_version=ifelse([$1], ,0.8.2,$1)
|
||||
|
||||
AC_MSG_CHECKING(for check - version >= $min_check_version)
|
||||
|
||||
if test x$with_check = xno; then
|
||||
AC_MSG_RESULT(disabled)
|
||||
ifelse([$3], , AC_MSG_ERROR([disabling check is not supported]), [$3])
|
||||
else
|
||||
if test "x$with_check" != x; then
|
||||
CHECK_CFLAGS="-I$with_check/include"
|
||||
CHECK_LIBS="-L$with_check/lib -lcheck"
|
||||
else
|
||||
CHECK_CFLAGS=""
|
||||
CHECK_LIBS="-lcheck"
|
||||
fi
|
||||
|
||||
ac_save_CFLAGS="$CFLAGS"
|
||||
ac_save_LIBS="$LIBS"
|
||||
|
||||
CFLAGS="$CFLAGS $CHECK_CFLAGS"
|
||||
LIBS="$CHECK_LIBS $LIBS"
|
||||
|
||||
rm -f conf.check-test
|
||||
AC_TRY_RUN([
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include <check.h>
|
||||
|
||||
int main ()
|
||||
{
|
||||
int major, minor, micro;
|
||||
char *tmp_version;
|
||||
|
||||
system ("touch conf.check-test");
|
||||
|
||||
/* HP/UX 9 (%@#!) writes to sscanf strings */
|
||||
tmp_version = strdup("$min_check_version");
|
||||
if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) {
|
||||
printf("%s, bad version string\n", "$min_check_version");
|
||||
return 1;
|
||||
}
|
||||
|
||||
if ((CHECK_MAJOR_VERSION != check_major_version) ||
|
||||
(CHECK_MINOR_VERSION != check_minor_version) ||
|
||||
(CHECK_MICRO_VERSION != check_micro_version))
|
||||
{
|
||||
printf("\n*** The check header file (version %d.%d.%d) does not match\n",
|
||||
CHECK_MAJOR_VERSION, CHECK_MINOR_VERSION, CHECK_MICRO_VERSION);
|
||||
printf("*** the check library (version %d.%d.%d).\n",
|
||||
check_major_version, check_minor_version, check_micro_version);
|
||||
return 1;
|
||||
}
|
||||
|
||||
if ((check_major_version > major) ||
|
||||
((check_major_version == major) && (check_minor_version > minor)) ||
|
||||
((check_major_version == major) && (check_minor_version == minor) && (check_micro_version >= micro)))
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
printf("\n*** An old version of check (%d.%d.%d) was found.\n",
|
||||
check_major_version, check_minor_version, check_micro_version);
|
||||
printf("*** You need a version of check being at least %d.%d.%d.\n", major, minor, micro);
|
||||
printf("***\n");
|
||||
printf("*** If you have already installed a sufficiently new version, this error\n");
|
||||
printf("*** probably means that the wrong copy of the check library and header\n");
|
||||
printf("*** file is being found. Rerun configure with the --with-check=PATH option\n");
|
||||
printf("*** to specify the prefix where the correct version was installed.\n");
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
],, no_check=yes, [echo $ac_n "cross compiling; assumed OK... $ac_c"])
|
||||
|
||||
CFLAGS="$ac_save_CFLAGS"
|
||||
LIBS="$ac_save_LIBS"
|
||||
|
||||
if test "x$no_check" = x ; then
|
||||
AC_MSG_RESULT(yes)
|
||||
ifelse([$2], , :, [$2])
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
if test -f conf.check-test ; then
|
||||
:
|
||||
else
|
||||
echo "*** Could not run check test program, checking why..."
|
||||
CFLAGS="$CFLAGS $CHECK_CFLAGS"
|
||||
LIBS="$CHECK_LIBS $LIBS"
|
||||
AC_TRY_LINK([
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include <check.h>
|
||||
], , [ echo "*** The test program compiled, but did not run. This usually means"
|
||||
echo "*** that the run-time linker is not finding check. You'll need to set your"
|
||||
echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
|
||||
echo "*** to the installed location Also, make sure you have run ldconfig if that"
|
||||
echo "*** is required on your system"
|
||||
echo "***"
|
||||
echo "*** If you have an old version installed, it is best to remove it, although"
|
||||
echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"],
|
||||
[ echo "*** The test program failed to compile or link. See the file config.log for"
|
||||
echo "*** the exact error that occured." ])
|
||||
|
||||
CFLAGS="$ac_save_CFLAGS"
|
||||
LIBS="$ac_save_LIBS"
|
||||
fi
|
||||
|
||||
CHECK_CFLAGS=""
|
||||
CHECK_LIBS=""
|
||||
|
||||
rm -f conf.check-test
|
||||
ifelse([$3], , AC_MSG_ERROR([check not found]), [$3])
|
||||
fi
|
||||
|
||||
AC_SUBST(CHECK_CFLAGS)
|
||||
AC_SUBST(CHECK_LIBS)
|
||||
|
||||
rm -f conf.check-test
|
||||
|
||||
fi
|
||||
])
|
||||
Executable
+460
@@ -0,0 +1,460 @@
|
||||
#!/bin/sh
|
||||
# Run this to generate all the initial makefiles, etc.
|
||||
|
||||
#name of package
|
||||
PKG_NAME=Bongo
|
||||
srcdir=${srcdir:-.}
|
||||
|
||||
# default version requirements ...
|
||||
REQUIRED_AUTOCONF_VERSION=${REQUIRED_AUTOCONF_VERSION:-2.53}
|
||||
REQUIRED_AUTOMAKE_VERSION=${REQUIRED_AUTOMAKE_VERSION:-1.9}
|
||||
REQUIRED_LIBTOOL_VERSION=${REQUIRED_LIBTOOL_VERSION:-1.4.3}
|
||||
REQUIRED_GETTEXT_VERSION=${REQUIRED_GETTEXT_VERSION:-0.10.40}
|
||||
REQUIRED_GLIB_GETTEXT_VERSION=${REQUIRED_GLIB_GETTEXT_VERSION:-2.2.0}
|
||||
REQUIRED_INTLTOOL_VERSION=${REQUIRED_INTLTOOL_VERSION:-0.25}
|
||||
REQUIRED_PKG_CONFIG_VERSION=${REQUIRED_PKG_CONFIG_VERSION:-0.14.0}
|
||||
REQUIRED_GTK_DOC_VERSION=${REQUIRED_GTK_DOC_VERSION:-1.0}
|
||||
REQUIRED_DOC_COMMON_VERSION=${REQUIRED_DOC_COMMON_VERSION:-2.3.0}
|
||||
|
||||
# a list of required m4 macros. Package can set an initial value
|
||||
REQUIRED_M4MACROS=${REQUIRED_M4MACROS:-}
|
||||
FORBIDDEN_M4MACROS=${FORBIDDEN_M4MACROS:-}
|
||||
|
||||
mkdir import/clucene/config 2>/dev/null
|
||||
|
||||
|
||||
# Not all echo versions allow -n, so we check what is possible. This test is
|
||||
# based on the one in autoconf.
|
||||
case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
|
||||
*c*,-n*) ECHO_N= ;;
|
||||
*c*,* ) ECHO_N=-n ;;
|
||||
*) ECHO_N= ;;
|
||||
esac
|
||||
|
||||
# if GNOME2_DIR or GNOME2_PATH is set, modify ACLOCAL_FLAGS ...
|
||||
# NOTE: GNOME2_DIR is deprecated (as of Jan 2004), but is left here for
|
||||
# backwards-compatibility. You should be using GNOME2_PATH, since that is also
|
||||
# understood by libraries such as libgnome.
|
||||
if [ -n "$GNOME2_DIR" ]; then
|
||||
echo "Using GNOME2_DIR is deprecated in gnome-common."
|
||||
echo "Please use GNOME2_PATH instead (for compatibility with other GNOME pieces)."
|
||||
ACLOCAL_FLAGS="-I $GNOME2_DIR/share/aclocal $ACLOCAL_FLAGS"
|
||||
LD_LIBRARY_PATH_ADD=
|
||||
for D in $P/lib* ; do
|
||||
LD_LIBRARY_PATH_ADD="${LD_LIBRARY_PATH_ADD:+$LD_LIBRARY_PATH_ADD:}$GNOME2_DIR"
|
||||
done
|
||||
LD_LIBRARY_PATH="$LD_LIBRARY_PATH_ADD${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}"
|
||||
PATH="$GNOME2_DIR/bin:$PATH"
|
||||
export PATH
|
||||
export LD_LIBRARY_PATH
|
||||
else
|
||||
if [ -n "$GNOME2_PATH" ]; then
|
||||
IFS="$IFS:"
|
||||
LD_LIBRARY_PATH_ADD=
|
||||
for P in $GNOME2_PATH ; do
|
||||
if [ -d $P/share/aclocal ] ; then
|
||||
ACLOCAL_FLAGS="-I $P/share/aclocal $ACLOCAL_FLAGS"
|
||||
fi
|
||||
for D in $P/lib* ; do
|
||||
LD_LIBRARY_PATH_ADD="${LD_LIBRARY_PATH_ADD:+$LD_LIBRARY_PATH_ADD:}$D"
|
||||
done
|
||||
PATH="$P/bin:$PATH"
|
||||
done
|
||||
IFS="${IFS%:}"
|
||||
LD_LIBRARY_PATH="$LD_LIBRARY_PATH_ADD${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}"
|
||||
export PATH
|
||||
export LD_LIBRARY_PATH
|
||||
fi
|
||||
fi
|
||||
|
||||
# some terminal codes ...
|
||||
boldface="`tput bold 2>/dev/null`"
|
||||
normal="`tput sgr0 2>/dev/null`"
|
||||
printbold() {
|
||||
echo $ECHO_N "$boldface"
|
||||
echo "$@"
|
||||
echo $ECHO_N "$normal"
|
||||
}
|
||||
printerr() {
|
||||
echo "$@" >&2
|
||||
}
|
||||
|
||||
# Usage:
|
||||
# compare_versions MIN_VERSION ACTUAL_VERSION
|
||||
# returns true if ACTUAL_VERSION >= MIN_VERSION
|
||||
compare_versions() {
|
||||
ch_min_version=$1
|
||||
ch_actual_version=$2
|
||||
ch_status=0
|
||||
IFS="${IFS= }"; ch_save_IFS="$IFS"; IFS="."
|
||||
set $ch_actual_version
|
||||
for ch_min in $ch_min_version; do
|
||||
ch_cur=`echo $1 | sed 's/[^0-9].*$//'`; shift # remove letter suffixes
|
||||
if [ -z "$ch_min" ]; then break; fi
|
||||
if [ -z "$ch_cur" ]; then ch_status=1; break; fi
|
||||
if [ $ch_cur -gt $ch_min ]; then break; fi
|
||||
if [ $ch_cur -lt $ch_min ]; then ch_status=1; break; fi
|
||||
done
|
||||
IFS="$ch_save_IFS"
|
||||
return $ch_status
|
||||
}
|
||||
|
||||
# Usage:
|
||||
# version_check PACKAGE VARIABLE CHECKPROGS MIN_VERSION SOURCE
|
||||
# checks to see if the package is available
|
||||
version_check() {
|
||||
vc_package=$1
|
||||
vc_variable=$2
|
||||
vc_checkprogs=$3
|
||||
vc_min_version=$4
|
||||
vc_source=$5
|
||||
vc_status=1
|
||||
|
||||
vc_checkprog=`eval echo "\\$$vc_variable"`
|
||||
if [ -n "$vc_checkprog" ]; then
|
||||
printbold "using $vc_checkprog for $vc_package"
|
||||
return 0
|
||||
fi
|
||||
|
||||
printbold "checking for $vc_package >= $vc_min_version..."
|
||||
for vc_checkprog in $vc_checkprogs; do
|
||||
echo $ECHO_N " testing $vc_checkprog... "
|
||||
if $vc_checkprog --version < /dev/null > /dev/null 2>&1; then
|
||||
vc_actual_version=`$vc_checkprog --version | head -n 1 | \
|
||||
sed 's/^.*[ ]\([0-9.]*[a-z]*\).*$/\1/'`
|
||||
if compare_versions $vc_min_version $vc_actual_version; then
|
||||
echo "found $vc_actual_version"
|
||||
# set variable
|
||||
eval "$vc_variable=$vc_checkprog"
|
||||
vc_status=0
|
||||
break
|
||||
else
|
||||
echo "too old (found version $vc_actual_version)"
|
||||
fi
|
||||
else
|
||||
echo "not found."
|
||||
fi
|
||||
done
|
||||
if [ "$vc_status" != 0 ]; then
|
||||
printerr "***Error***: You must have $vc_package >= $vc_min_version installed"
|
||||
printerr " to build $PKG_NAME. Download the appropriate package for"
|
||||
printerr " from your distribution or get the source tarball at"
|
||||
printerr " $vc_source"
|
||||
printerr
|
||||
fi
|
||||
return $vc_status
|
||||
}
|
||||
|
||||
# Usage:
|
||||
# require_m4macro filename.m4
|
||||
# adds filename.m4 to the list of required macros
|
||||
require_m4macro() {
|
||||
case "$REQUIRED_M4MACROS" in
|
||||
$1\ * | *\ $1\ * | *\ $1) ;;
|
||||
*) REQUIRED_M4MACROS="$REQUIRED_M4MACROS $1" ;;
|
||||
esac
|
||||
}
|
||||
|
||||
forbid_m4macro() {
|
||||
case "$FORBIDDEN_M4MACROS" in
|
||||
$1\ * | *\ $1\ * | *\ $1) ;;
|
||||
*) FORBIDDEN_M4MACROS="$FORBIDDEN_M4MACROS $1" ;;
|
||||
esac
|
||||
}
|
||||
|
||||
# Usage:
|
||||
# check_m4macros
|
||||
# Checks that all the requested macro files are in the aclocal macro path
|
||||
# Uses REQUIRED_M4MACROS and ACLOCAL variables.
|
||||
check_m4macros() {
|
||||
# construct list of macro directories
|
||||
cm_macrodirs="`$ACLOCAL --print-ac-dir`"
|
||||
if [ `uname` = "FreeBSD" ]; then
|
||||
ACLOCAL_FLAGS="-I /usr/local/share/aclocal"
|
||||
fi
|
||||
set - $ACLOCAL_FLAGS
|
||||
while [ $# -gt 0 ]; do
|
||||
if [ "$1" = "-I" ]; then
|
||||
cm_macrodirs="$cm_macrodirs $2"
|
||||
shift
|
||||
fi
|
||||
shift
|
||||
done
|
||||
|
||||
cm_status=0
|
||||
if [ -n "$REQUIRED_M4MACROS" ]; then
|
||||
printbold "Checking for required M4 macros..."
|
||||
# check that each macro file is in one of the macro dirs
|
||||
for cm_macro in $REQUIRED_M4MACROS; do
|
||||
cm_macrofound=false
|
||||
for cm_dir in $cm_macrodirs; do
|
||||
if [ -f "$cm_dir/$cm_macro" ]; then
|
||||
cm_macrofound=true
|
||||
break
|
||||
fi
|
||||
# The macro dir in Cygwin environments may contain a file
|
||||
# called dirlist containing other directories to look in.
|
||||
if [ -f "$cm_dir/dirlist" ]; then
|
||||
for cm_otherdir in `cat $cm_dir/dirlist`; do
|
||||
if [ -f "$cm_otherdir/$cm_macro" ]; then
|
||||
cm_macrofound=true
|
||||
break
|
||||
fi
|
||||
done
|
||||
fi
|
||||
done
|
||||
if $cm_macrofound; then
|
||||
:
|
||||
else
|
||||
printerr " $cm_macro not found"
|
||||
cm_status=1
|
||||
fi
|
||||
done
|
||||
fi
|
||||
if [ -n "$FORBIDDEN_M4MACROS" ]; then
|
||||
printbold "Checking for forbidden M4 macros..."
|
||||
# check that each macro file is in one of the macro dirs
|
||||
for cm_macro in $FORBIDDEN_M4MACROS; do
|
||||
cm_macrofound=false
|
||||
for cm_dir in $cm_macrodirs; do
|
||||
if [ -f "$cm_dir/$cm_macro" ]; then
|
||||
cm_macrofound=true
|
||||
break
|
||||
fi
|
||||
done
|
||||
if $cm_macrofound; then
|
||||
printerr " $cm_macro found (should be cleared from macros dir)"
|
||||
cm_status=1
|
||||
fi
|
||||
done
|
||||
fi
|
||||
if [ "$cm_status" != 0 ]; then
|
||||
printerr "***Error***: some autoconf macros required to build $PKG_NAME"
|
||||
printerr " were not found in your aclocal path, or some forbidden"
|
||||
printerr " macros were found. Perhaps you need to adjust your"
|
||||
printerr " ACLOCAL_FLAGS?"
|
||||
printerr
|
||||
fi
|
||||
return $cm_status
|
||||
}
|
||||
|
||||
# try to catch the case where the macros2/ directory hasn't been cleared out.
|
||||
forbid_m4macro gnome-cxx-check.m4
|
||||
|
||||
want_libtool=false
|
||||
want_gettext=false
|
||||
want_glib_gettext=false
|
||||
want_intltool=false
|
||||
want_pkg_config=false
|
||||
want_gtk_doc=false
|
||||
|
||||
configure_files="`find $srcdir -name 'bongo-*' -prune -name '{arch}' -prune -o -name configure.ac -print -o -name configure.in -print`"
|
||||
for configure_ac in $configure_files; do
|
||||
if grep "^A[CM]_PROG_LIBTOOL" $configure_ac >/dev/null; then
|
||||
want_libtool=true
|
||||
fi
|
||||
if grep "^AM_GNU_GETTEXT" $configure_ac >/dev/null; then
|
||||
want_gettext=true
|
||||
fi
|
||||
if grep "^AM_GLIB_GNU_GETTEXT" $configure_ac >/dev/null; then
|
||||
want_glib_gettext=true
|
||||
fi
|
||||
if grep "^AC_PROG_INTLTOOL" $configure_ac >/dev/null; then
|
||||
want_intltool=true
|
||||
fi
|
||||
if grep "^PKG_CHECK_MODULES" $configure_ac >/dev/null; then
|
||||
want_pkg_config=true
|
||||
fi
|
||||
if grep "^GTK_DOC_CHECK" $configure_ac >/dev/null; then
|
||||
want_gtk_doc=true
|
||||
fi
|
||||
done
|
||||
|
||||
DIE=0
|
||||
|
||||
#tell Mandrake autoconf wrapper we want autoconf 2.5x, not 2.13
|
||||
WANT_AUTOCONF_2_5=1
|
||||
export WANT_AUTOCONF_2_5
|
||||
version_check autoconf AUTOCONF 'autoconf2.50 autoconf autoconf-2.59 autoconf259' $REQUIRED_AUTOCONF_VERSION \
|
||||
"http://ftp.gnu.org/pub/gnu/autoconf/autoconf-$REQUIRED_AUTOCONF_VERSION.tar.gz" || DIE=1
|
||||
AUTOHEADER=`echo $AUTOCONF | sed s/autoconf/autoheader/`
|
||||
|
||||
case $REQUIRED_AUTOMAKE_VERSION in
|
||||
1.4*) automake_progs="automake-1.4" ;;
|
||||
1.5*) automake_progs="automake-1.5 automake-1.6 automake-1.7 automake-1.8 automake-1.9 automake19" ;;
|
||||
1.6*) automake_progs="automake-1.6 automake-1.7 automake-1.8 automake-1.9 automake19" ;;
|
||||
1.7*) automake_progs="automake-1.7 automake-1.8 automake-1.9 automake19" ;;
|
||||
1.8*) automake_progs="automake-1.8 automake-1.9 automake19" ;;
|
||||
1.9*) automake_progs="automake-1.9 automake19" ;;
|
||||
esac
|
||||
version_check automake AUTOMAKE "$automake_progs" $REQUIRED_AUTOMAKE_VERSION \
|
||||
"http://ftp.gnu.org/pub/gnu/automake/automake-$REQUIRED_AUTOMAKE_VERSION.tar.gz" || DIE=1
|
||||
ACLOCAL=`echo $AUTOMAKE | sed s/automake/aclocal/`
|
||||
|
||||
if $want_libtool; then
|
||||
version_check libtool LIBTOOLIZE 'libtoolize libtoolize15 glibtoolize' $REQUIRED_LIBTOOL_VERSION \
|
||||
"http://ftp.gnu.org/pub/gnu/libtool/libtool-$REQUIRED_LIBTOOL_VERSION.tar.gz" || DIE=1
|
||||
# if [ `uname` = "FreeBSD" ]; then
|
||||
# require_m4macro libtool15.m4
|
||||
# fi
|
||||
require_m4macro libtool.m4
|
||||
fi
|
||||
|
||||
if $want_gettext; then
|
||||
version_check gettext GETTEXTIZE gettextize $REQUIRED_GETTEXT_VERSION \
|
||||
"http://ftp.gnu.org/pub/gnu/gettext/gettext-$REQUIRED_GETTEXT_VERSION.tar.gz" || DIE=1
|
||||
require_m4macro gettext.m4
|
||||
fi
|
||||
|
||||
if $want_glib_gettext; then
|
||||
version_check glib-gettext GLIB_GETTEXTIZE glib-gettextize $REQUIRED_GLIB_GETTEXT_VERSION \
|
||||
"ftp://ftp.gtk.org/pub/gtk/v2.2/glib-$REQUIRED_GLIB_GETTEXT_VERSION.tar.gz" || DIE=1
|
||||
require_m4macro glib-gettext.m4
|
||||
fi
|
||||
|
||||
if $want_intltool; then
|
||||
version_check intltool INTLTOOLIZE intltoolize $REQUIRED_INTLTOOL_VERSION \
|
||||
"http://ftp.gnome.org/pub/GNOME/sources/intltool/" || DIE=1
|
||||
require_m4macro intltool.m4
|
||||
fi
|
||||
|
||||
if $want_pkg_config; then
|
||||
version_check pkg-config PKG_CONFIG pkg-config $REQUIRED_PKG_CONFIG_VERSION \
|
||||
"'http://www.freedesktop.org/software/pkgconfig/releases/pkgconfig-$REQUIRED_PKG_CONFIG_VERSION.tar.gz" || DIE=1
|
||||
require_m4macro pkg.m4
|
||||
fi
|
||||
|
||||
if $want_gtk_doc; then
|
||||
version_check gtk-doc GTKDOCIZE gtkdocize $REQUIRED_GTK_DOC_VERSION \
|
||||
"http://ftp.gnome.org/pub/GNOME/sources/gtk-doc/" || DIE=1
|
||||
require_m4macro gtk-doc.m4
|
||||
fi
|
||||
|
||||
if [ "x$USE_COMMON_DOC_BUILD" = "xyes" ]; then
|
||||
version_check gnome-common DOC_COMMON gnome-doc-common \
|
||||
$REQUIRED_DOC_COMMON_VERSION " " || DIE=1
|
||||
fi
|
||||
|
||||
check_m4macros || DIE=1
|
||||
|
||||
if [ "$DIE" -eq 1 ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if test -z "$*"; then
|
||||
printerr "**Warning**: I am going to run \`configure' with no arguments."
|
||||
printerr "If you wish to pass any to it, please specify them on the"
|
||||
printerr \`$0\'" command line."
|
||||
printerr
|
||||
fi
|
||||
|
||||
topdir=`pwd`
|
||||
for configure_ac in $configure_files; do
|
||||
dirname=`dirname $configure_ac`
|
||||
basename=`basename $configure_ac`
|
||||
if test -f $dirname/NO-AUTO-GEN; then
|
||||
echo skipping $dirname -- flagged as no auto-gen
|
||||
else
|
||||
printbold "Processing $configure_ac"
|
||||
cd $dirname
|
||||
|
||||
# Note that the order these tools are called should match what
|
||||
# autoconf's "autoupdate" package does. See bug 138584 for
|
||||
# details.
|
||||
|
||||
# programs that might install new macros get run before aclocal
|
||||
if grep "^A[CM]_PROG_LIBTOOL" $basename >/dev/null; then
|
||||
printbold "Running $LIBTOOLIZE..."
|
||||
$LIBTOOLIZE --force || exit 1
|
||||
fi
|
||||
|
||||
if grep "^AM_GLIB_GNU_GETTEXT" $basename >/dev/null; then
|
||||
printbold "Running $GLIB_GETTEXTIZE... Ignore non-fatal messages."
|
||||
echo "no" | $GLIB_GETTEXTIZE --force --copy || exit 1
|
||||
elif grep "^AM_GNU_GETTEXT" $basename >/dev/null; then
|
||||
if grep "^AM_GNU_GETTEXT_VERSION" $basename > /dev/null; then
|
||||
printbold "Running autopoint..."
|
||||
autopoint --force || exit 1
|
||||
else
|
||||
printbold "Running $GETTEXTIZE... Ignore non-fatal messages."
|
||||
echo "no" | $GETTEXTIZE --force --copy --no-changelog || exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
if grep "^AC_PROG_INTLTOOL" $basename >/dev/null; then
|
||||
printbold "Running $INTLTOOLIZE..."
|
||||
$INTLTOOLIZE --force --automake || exit 1
|
||||
fi
|
||||
if grep "^GTK_DOC_CHECK" $basename >/dev/null; then
|
||||
printbold "Running $GTKDOCIZE..."
|
||||
$GTKDOCIZE || exit 1
|
||||
fi
|
||||
|
||||
if [ "x$USE_COMMON_DOC_BUILD" = "xyes" ]; then
|
||||
printbold "Running gnome-doc-common..."
|
||||
gnome-doc-common --copy || exit 1
|
||||
fi
|
||||
|
||||
# Now run aclocal to pull in any additional macros needed
|
||||
aclocalinclude="$ACLOCAL_FLAGS"
|
||||
if test -d m4; then
|
||||
aclocalinclude="$aclocalinclude -I m4"
|
||||
fi
|
||||
if test -d macros; then
|
||||
aclocalinclude="$aclocalinclude -I macros"
|
||||
fi
|
||||
|
||||
echo $aclocalinclude
|
||||
|
||||
printbold "Running $ACLOCAL $aclocalinclude ..."
|
||||
|
||||
$ACLOCAL $aclocalinclude || exit 1
|
||||
|
||||
if grep "GNOME_AUTOGEN_OBSOLETE" aclocal.m4 >/dev/null; then
|
||||
printerr "*** obsolete gnome macros were used in $configure_ac"
|
||||
fi
|
||||
|
||||
# Now that all the macros are sorted, run autoconf and autoheader ...
|
||||
printbold "Running $AUTOCONF..."
|
||||
$AUTOCONF || exit 1
|
||||
if grep "^A[CM]_CONFIG_HEADER" $basename >/dev/null; then
|
||||
printbold "Running $AUTOHEADER..."
|
||||
$AUTOHEADER || exit 1
|
||||
# this prevents automake from thinking config.h.in is out of
|
||||
# date, since autoheader doesn't touch the file if it doesn't
|
||||
# change.
|
||||
test -f config.h.in && touch config.h.in
|
||||
fi
|
||||
|
||||
if test -f Makefile.am; then
|
||||
# Finally, run automake to create the makefiles ...
|
||||
printbold "Running $AUTOMAKE..."
|
||||
$AUTOMAKE --gnu --add-missing || exit 1
|
||||
fi
|
||||
|
||||
cd "$topdir"
|
||||
fi
|
||||
done
|
||||
|
||||
SVNREV=$(svnversion .)
|
||||
if test x$SVNREV = x; then
|
||||
echo Unable to discern build version
|
||||
echo \#define BONGO_BUILD_BRANCH \"unknown\" > ./include/bongo-buildinfo.h
|
||||
echo \#define BONGO_BUILD_VSTR \"\" >> ./include/bongo-buildinfo.h
|
||||
echo \#define BONGO_BUILD_VER \"0\" > ./include/bongo-buildinfo.h
|
||||
else
|
||||
echo SVN Rev at $SVNREV
|
||||
echo \#define BONGO_BUILD_BRANCH \"trunk\" > ./include/bongo-buildinfo.h
|
||||
echo \#define BONGO_BUILD_VSTR \"r\" >> ./include/bongo-buildinfo.h
|
||||
echo \#define BONGO_BUILD_VER \"$SVNREV\" >> ./include/bongo-buildinfo.h
|
||||
fi
|
||||
|
||||
conf_flags="--enable-maintainer-mode"
|
||||
|
||||
if test x$NOCONFIGURE = x; then
|
||||
printbold Running $srcdir/configure $conf_flags "$@" ...
|
||||
$srcdir/configure $conf_flags "$@" \
|
||||
&& echo Now type \`make\' to compile $PKG_NAME || exit 1
|
||||
else
|
||||
echo Skipping configure process.
|
||||
fi
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
prefix=@prefix@
|
||||
exec_prefix=@exec_prefix@
|
||||
libdir=@libdir@
|
||||
includedir=@includedir@/bongo
|
||||
|
||||
Name: Bongo
|
||||
Description: A fast and scalable email and calendar server
|
||||
Version: @VERSION@
|
||||
Libs: -L${libdir} -lbongostreamio -lbongomanagement -lbongonmap -lbongoconnmgr -lbongomsgapi -lbongomdb -lbongologger -lbongoconnio -lbongoutil -lbongomemmgr -lbongoxpl -lbongocalcmd -lbongocal -lbongo-json
|
||||
Cflags: -I${includedir}
|
||||
Requires: gnutls
|
||||
@@ -1,33 +0,0 @@
|
||||
# function to attempt to turn on as many security flags as possible
|
||||
# by default, we turn on as much as possible
|
||||
|
||||
include(CheckCCompilerFlag)
|
||||
|
||||
option(BONGO_SECURITY "Enable compiler flags which help protect against attacks" ON)
|
||||
if (BONGO_SECURITY)
|
||||
# check for -lssp ?
|
||||
|
||||
# check for -fstack-protector
|
||||
check_c_compiler_flag (-fstack-protector-all GCC_STACK_PROTECTOR_ALL)
|
||||
if (GCC_STACK_PROTECTOR_ALL)
|
||||
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fstack-protector-all")
|
||||
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fstack-protector-all")
|
||||
endif (GCC_STACK_PROTECTOR_ALL)
|
||||
endif (BONGO_SECURITY)
|
||||
|
||||
option(DEBUG "Enable debugging infrastructure" OFF)
|
||||
if (DEBUG)
|
||||
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g -g3 -ggdb -O0")
|
||||
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -g3 -ggdb -O0")
|
||||
endif (DEBUG)
|
||||
|
||||
option(STRICTCOMPILE "Enable strict compilation rules" ON)
|
||||
function (StrictCompile)
|
||||
if (STRICTCOMPILE)
|
||||
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -Werror -std=c99 -D_XOPEN_SOURCE=500 -D_POSIX_C_SOURCE=200112 -D_GNU_SOURCE" PARENT_SCOPE)
|
||||
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Werror -std=c++98 -D_XOPEN_SOURCE=500 -D_POSIX_C_SOURCE=200112 -D_GNU_SOURCE" PARENT_SCOPE)
|
||||
else (STRICTCOMPILE)
|
||||
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c99 -D_XOPEN_SOURCE=500 -D_POSIX_C_SOURCE=200112 -D_GNU_SOURCE" PARENT_SCOPE)
|
||||
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++98 -D_XOPEN_SOURCE=500 -D_POSIX_C_SOURCE=200112 -D_GNU_SOURCE" PARENT_SCOPE)
|
||||
endif (STRICTCOMPILE)
|
||||
endfunction (StrictCompile)
|
||||
@@ -1,136 +0,0 @@
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions
|
||||
# are met:
|
||||
#
|
||||
# 1. Redistributions of source code must retain the copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# 2. Redistributions in binary form must reproduce the copyright
|
||||
# notice, this list of conditions and the following disclaimer in the
|
||||
# documentation and/or other materials provided with the distribution.
|
||||
# 3. The name of the author may not be used to endorse or promote products
|
||||
# derived from this software without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
if (UNIX)
|
||||
IF (NOT APPLICATION_NAME)
|
||||
MESSAGE(STATUS "${PROJECT_NAME} is used as APPLICATION_NAME")
|
||||
SET(APPLICATION_NAME ${PROJECT_NAME})
|
||||
ENDIF (NOT APPLICATION_NAME)
|
||||
|
||||
# Suffix for Linux
|
||||
SET(LIB_SUFFIX
|
||||
CACHE STRING "Define suffix of directory name (32/64)"
|
||||
)
|
||||
|
||||
SET(EXEC_INSTALL_PREFIX
|
||||
"${CMAKE_INSTALL_PREFIX}"
|
||||
CACHE PATH "Base directory for executables and libraries"
|
||||
)
|
||||
SET(SHARE_INSTALL_PREFIX
|
||||
"${CMAKE_INSTALL_PREFIX}/share"
|
||||
CACHE PATH "Base directory for files which go to share/"
|
||||
)
|
||||
SET(DATA_INSTALL_PREFIX
|
||||
"${SHARE_INSTALL_PREFIX}/${APPLICATION_NAME}"
|
||||
CACHE PATH "The parent directory where applications can install their data")
|
||||
|
||||
# The following are directories where stuff will be installed to
|
||||
SET(BIN_INSTALL_DIR
|
||||
"${EXEC_INSTALL_PREFIX}/bin"
|
||||
CACHE PATH "The ${APPLICATION_NAME} binary install dir (default prefix/bin)"
|
||||
)
|
||||
SET(SBIN_INSTALL_DIR
|
||||
"${EXEC_INSTALL_PREFIX}/sbin"
|
||||
CACHE PATH "The ${APPLICATION_NAME} sbin install dir (default prefix/sbin)"
|
||||
)
|
||||
SET(LIB_INSTALL_DIR
|
||||
"${EXEC_INSTALL_PREFIX}/${LIB_DIR_NAME}"
|
||||
CACHE STRING "The directory where libraries will be installed (default is prefix/lib)"
|
||||
)
|
||||
SET(LIBEXEC_INSTALL_DIR
|
||||
"${EXEC_INSTALL_PREFIX}/libexec"
|
||||
CACHE PATH "The subdirectory relative to the install prefix where libraries will be installed (default is prefix/libexec)"
|
||||
)
|
||||
SET(PLUGIN_INSTALL_DIR
|
||||
"${LIB_INSTALL_DIR}/${APPLICATION_NAME}"
|
||||
CACHE PATH "The subdirectory relative to the install prefix where plugins will be installed (default is prefix/lib/${APPLICATION_NAME})"
|
||||
)
|
||||
SET(INCLUDE_INSTALL_DIR
|
||||
"${CMAKE_INSTALL_PREFIX}/include"
|
||||
CACHE PATH "The subdirectory to the header prefix (default prefix/include)"
|
||||
)
|
||||
|
||||
SET(DATA_INSTALL_DIR
|
||||
"${DATA_INSTALL_PREFIX}"
|
||||
CACHE PATH "The parent directory where applications can install their data (default prefix/share/${APPLICATION_NAME})"
|
||||
)
|
||||
SET(HTML_INSTALL_DIR
|
||||
"${DATA_INSTALL_PREFIX}/doc/HTML"
|
||||
CACHE PATH "The HTML install dir for documentation (default data/doc/html)"
|
||||
)
|
||||
SET(ICON_INSTALL_DIR
|
||||
"${DATA_INSTALL_PREFIX}/icons"
|
||||
CACHE PATH "The icon install dir (default data/icons/)"
|
||||
)
|
||||
SET(SOUND_INSTALL_DIR
|
||||
"${DATA_INSTALL_PREFIX}/sounds"
|
||||
CACHE PATH "The install dir for sound files (default data/sounds)"
|
||||
)
|
||||
|
||||
SET(LOCALE_INSTALL_DIR
|
||||
"${SHARE_INSTALL_PREFIX}/locale"
|
||||
CACHE PATH "The install dir for translations (default prefix/share/locale)"
|
||||
)
|
||||
|
||||
SET(XDG_APPS_DIR
|
||||
"${SHARE_INSTALL_PREFIX}/applications/"
|
||||
CACHE PATH "The XDG apps dir"
|
||||
)
|
||||
SET(XDG_DIRECTORY_DIR
|
||||
"${SHARE_INSTALL_PREFIX}/desktop-directories"
|
||||
CACHE PATH "The XDG directory"
|
||||
)
|
||||
|
||||
IF (CMAKE_INSTALL_PREFIX STREQUAL "/" OR
|
||||
CMAKE_INSTALL_PREFIX STREQUAL "/usr")
|
||||
SET(_BONGO_SYSCONF_DEFAULT "/etc")
|
||||
ELSE ()
|
||||
SET(_BONGO_SYSCONF_DEFAULT "${EXEC_INSTALL_PREFIX}/etc")
|
||||
ENDIF ()
|
||||
SET(SYSCONF_INSTALL_DIR
|
||||
"${_BONGO_SYSCONF_DEFAULT}"
|
||||
CACHE PATH "The ${APPLICATION_NAME} system configuration install dir"
|
||||
)
|
||||
UNSET(_BONGO_SYSCONF_DEFAULT)
|
||||
SET(MAN_INSTALL_DIR
|
||||
"${SHARE_INSTALL_PREFIX}/man"
|
||||
CACHE PATH "The ${APPLICATION_NAME} man install dir (default prefix/man)"
|
||||
)
|
||||
SET(INFO_INSTALL_DIR
|
||||
"${SHARE_INSTALL_PREFIX}/info"
|
||||
CACHE PATH "The ${APPLICATION_NAME} info install dir (default prefix/info)"
|
||||
)
|
||||
endif (UNIX)
|
||||
|
||||
if (WIN32)
|
||||
# Same same
|
||||
set(BIN_INSTALL_DIR "." CACHE PATH "-")
|
||||
set(SBIN_INSTALL_DIR "." CACHE PATH "-")
|
||||
set(LIB_INSTALL_DIR "lib" CACHE PATH "-")
|
||||
set(INCLUDE_INSTALL_DIR "include" CACHE PATH "-")
|
||||
set(PLUGIN_INSTALL_DIR "plugins" CACHE PATH "-")
|
||||
set(HTML_INSTALL_DIR "doc/HTML" CACHE PATH "-")
|
||||
set(ICON_INSTALL_DIR "." CACHE PATH "-")
|
||||
set(SOUND_INSTALL_DIR "." CACHE PATH "-")
|
||||
set(LOCALE_INSTALL_DIR "lang" CACHE PATH "-")
|
||||
endif (WIN32)
|
||||
@@ -1,83 +0,0 @@
|
||||
# various directory definitions we use throughout Bongo
|
||||
|
||||
if(EXISTS /lib64)
|
||||
set(_LIB_DIR_NAME lib64)
|
||||
else(EXISTS /lib64)
|
||||
set(_LIB_DIR_NAME lib)
|
||||
endif(EXISTS /lib64)
|
||||
|
||||
set(LIB_DIR_NAME ${_LIB_DIR_NAME} CACHE STRING
|
||||
"Name of library location (arch-specific), usually 'lib' or 'lib64'")
|
||||
|
||||
# 'default' locations for where objects get built
|
||||
set(BINDIR ${PROJECT_BINARY_DIR}/bin)
|
||||
set(SBINDIR ${PROJECT_BINARY_DIR}/sbin)
|
||||
set(LIBDIR ${PROJECT_BINARY_DIR}/${LIB_DIR_NAME})
|
||||
set(LIBEXECDIR ${PROJECT_BINARY_DIR}/libexec)
|
||||
set(DATAROOTDIR ${PROJECT_BINARY_DIR}/share)
|
||||
set(DATADIR ${PROJECT_BINARY_DIR}/share)
|
||||
set(LOCALSTATEDIR ${PROJECT_BINARY_DIR}/var)
|
||||
set(INCLUDEDIR ${PROJECT_BINARY_DIR}/include)
|
||||
|
||||
# various paths for where objects get installed / work from
|
||||
set(XPL_DEFAULT_DATA_DIR ${CMAKE_INSTALL_PREFIX}/share/bongo)
|
||||
set(BONGO_STATE_DIR /var/lib/bongo CACHE PATH
|
||||
"Persistent Bongo state directory")
|
||||
set(XPL_DEFAULT_STATE_DIR ${BONGO_STATE_DIR})
|
||||
|
||||
set(XPL_DEFAULT_BIN_DIR ${CMAKE_INSTALL_PREFIX}/sbin)
|
||||
set(XPL_DEFAULT_LIB_DIR ${CMAKE_INSTALL_PREFIX}/${LIB_DIR_NAME})
|
||||
|
||||
# A distribution install below /usr still keeps host configuration in /etc.
|
||||
# A self-contained /usr/local (or another custom-prefix) installation keeps
|
||||
# configuration below that prefix instead.
|
||||
if(CMAKE_INSTALL_PREFIX STREQUAL "/" OR
|
||||
CMAKE_INSTALL_PREFIX STREQUAL "/usr")
|
||||
set(_BONGO_SYSCONF_DEFAULT /etc)
|
||||
else()
|
||||
set(_BONGO_SYSCONF_DEFAULT ${CMAKE_INSTALL_PREFIX}/etc)
|
||||
endif()
|
||||
if(DEFINED SYSCONF_INSTALL_DIR)
|
||||
set(_BONGO_SYSCONF_DEFAULT ${SYSCONF_INSTALL_DIR})
|
||||
endif()
|
||||
set(BONGO_CONFIG_DIR ${_BONGO_SYSCONF_DEFAULT}/bongo CACHE PATH
|
||||
"Bongo configuration directory")
|
||||
unset(_BONGO_SYSCONF_DEFAULT)
|
||||
set(XPL_DEFAULT_CONF_DIR ${BONGO_CONFIG_DIR})
|
||||
set(XPL_DEFAULT_CONFIG_DIR ${BONGO_CONFIG_DIR}/config.d)
|
||||
set(XPL_DEFAULT_ALIASES_DIR ${BONGO_CONFIG_DIR}/aliases.d)
|
||||
set(XPL_DEFAULT_SSL_DIR ${BONGO_CONFIG_DIR}/ssl.d)
|
||||
set(XPL_DEFAULT_DKIM_DIR ${BONGO_CONFIG_DIR}/dkim.d)
|
||||
set(XPL_DEFAULT_DMARC_DIR ${BONGO_CONFIG_DIR}/dmarc.d)
|
||||
set(XPL_DEFAULT_ACME_CONFIG_DIR ${BONGO_CONFIG_DIR}/acme.d)
|
||||
set(XPL_DEFAULT_ACME_PROVIDER_CONFIG ${XPL_DEFAULT_ACME_CONFIG_DIR}/providers)
|
||||
set(XPL_DEFAULT_ACME_DNS_HELPER
|
||||
${CMAKE_INSTALL_PREFIX}/libexec/bongo/bongo-acme-dns-provider)
|
||||
set(XPL_DEFAULT_NLS_DIR ${CMAKE_INSTALL_PREFIX}/share/bongo/nls)
|
||||
|
||||
set(XPL_DEFAULT_DBF_DIR ${XPL_DEFAULT_STATE_DIR}/dbf)
|
||||
set(XPL_DEFAULT_WORK_DIR ${XPL_DEFAULT_STATE_DIR}/work)
|
||||
set(XPL_DEFAULT_CACHE_DIR ${XPL_DEFAULT_STATE_DIR}/cache)
|
||||
set(XPL_DEFAULT_SCMS_DIR ${XPL_DEFAULT_STATE_DIR}/scms)
|
||||
set(XPL_DEFAULT_SPOOL_DIR ${XPL_DEFAULT_STATE_DIR}/spool)
|
||||
set(XPL_DEFAULT_STORE_SYSTEM_DIR ${XPL_DEFAULT_STATE_DIR}/system)
|
||||
set(XPL_DEFAULT_SYSTEM_DIR ${XPL_DEFAULT_STATE_DIR}/system)
|
||||
set(XPL_DEFAULT_MAIL_DIR ${XPL_DEFAULT_STATE_DIR}/users)
|
||||
set(XPL_DEFAULT_COOKIE_DIR ${XPL_DEFAULT_STATE_DIR}/dbf/cookies)
|
||||
set(XPL_DEFAULT_WORKER_DIR ${XPL_DEFAULT_STATE_DIR}/worker)
|
||||
set(XPL_DEFAULT_WORKER_DB ${XPL_DEFAULT_WORKER_DIR}/jobs.sqlite)
|
||||
set(XPL_DEFAULT_ACME_DIR ${XPL_DEFAULT_STATE_DIR}/acme)
|
||||
set(XPL_DEFAULT_ACME_CHALLENGE_DIR ${XPL_DEFAULT_ACME_DIR}/challenges)
|
||||
set(XPL_DEFAULT_ACME_ACCOUNT_KEY ${XPL_DEFAULT_ACME_DIR}/account.key)
|
||||
set(XPL_DEFAULT_ACME_NEXT_KEY ${XPL_DEFAULT_ACME_DIR}/server.key.next)
|
||||
set(XPL_DEFAULT_ACME_NEXT_CERT ${XPL_DEFAULT_ACME_DIR}/server.crt.next)
|
||||
|
||||
set(XPL_DEFAULT_CERT_PATH ${XPL_DEFAULT_SSL_DIR}/server.crt)
|
||||
set(XPL_DEFAULT_RSAPARAMS_PATH ${XPL_DEFAULT_STATE_DIR}/dbf/rsaparams.pem)
|
||||
set(XPL_DEFAULT_DHPARAMS_PATH ${XPL_DEFAULT_STATE_DIR}/dbf/dhparams.pem)
|
||||
set(XPL_DEFAULT_RANDSEED_PATH ${XPL_DEFAULT_STATE_DIR}/dbf/randomseed)
|
||||
set(XPL_DEFAULT_KEY_PATH ${XPL_DEFAULT_SSL_DIR}/server.key)
|
||||
|
||||
# FIXME: where did these get defined before?
|
||||
set(LOCALEDIR ${CMAKE_INSTALL_PREFIX}/share/locale)
|
||||
set(ZONEINFODIR ${XPL_DEFAULT_DATA_DIR}/zoneinfo)
|
||||
@@ -1,54 +0,0 @@
|
||||
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Mail and calendering made simple")
|
||||
set(CPACK_PACKAGE_VENDOR "Bongo Project")
|
||||
set(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/README")
|
||||
set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/COPYING")
|
||||
set(CPACK_PACKAGE_VERSION "${PROJECT_VERSION}")
|
||||
set(CPACK_PACKAGE_VERSION_MAJOR "${PROJECT_VERSION_MAJOR}")
|
||||
set(CPACK_PACKAGE_VERSION_MINOR "${PROJECT_VERSION_MINOR}")
|
||||
set(CPACK_PACKAGE_VERSION_PATCH "${PROJECT_VERSION_PATCH}")
|
||||
set(BONGO_SOURCE_PACKAGE_VERSION "${PROJECT_VERSION}")
|
||||
find_package(Git QUIET)
|
||||
if(Git_FOUND AND EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/.git")
|
||||
execute_process(
|
||||
COMMAND "${GIT_EXECUTABLE}" describe --exact-match --tags
|
||||
--match "${PROJECT_VERSION}" --match "v${PROJECT_VERSION}"
|
||||
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
|
||||
RESULT_VARIABLE BONGO_RELEASE_TAG_RESULT
|
||||
OUTPUT_QUIET
|
||||
ERROR_QUIET)
|
||||
if(NOT BONGO_RELEASE_TAG_RESULT EQUAL 0)
|
||||
execute_process(
|
||||
COMMAND "${GIT_EXECUTABLE}" rev-parse --short=7 HEAD
|
||||
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
|
||||
RESULT_VARIABLE BONGO_GIT_REVISION_RESULT
|
||||
OUTPUT_VARIABLE BONGO_GIT_REVISION
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
ERROR_QUIET)
|
||||
if(BONGO_GIT_REVISION_RESULT EQUAL 0)
|
||||
string(APPEND BONGO_SOURCE_PACKAGE_VERSION
|
||||
"-dev${BONGO_GIT_REVISION}")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
set(CPACK_SOURCE_PACKAGE_FILE_NAME
|
||||
"${PROJECT_NAME}-${BONGO_SOURCE_PACKAGE_VERSION}")
|
||||
set(CPACK_SOURCE_IGNORE_FILES
|
||||
"/\\.git/"
|
||||
"/\\.git$"
|
||||
"/__pycache__/"
|
||||
"\\.py[co]$"
|
||||
"/CMakeFiles/"
|
||||
"/CMakeCache\\.txt$"
|
||||
"/cmake_install\\.cmake$"
|
||||
"/Makefile$"
|
||||
"~$"
|
||||
"\\.sw[op]$")
|
||||
set(CPACK_PACKAGE_INSTALL_DIRECTORY "CMake ${CMake_VERSION_MAJOR}.${CMake_VERSION_MINOR}")
|
||||
|
||||
# Several legacy install rules use absolute destinations derived from
|
||||
# CMAKE_INSTALL_PREFIX. Always stage those paths below CPack's temporary
|
||||
# directory; package generation must never write into the host filesystem.
|
||||
set(CPACK_SET_DESTDIR ON)
|
||||
|
||||
|
||||
include(CPack)
|
||||
@@ -1,39 +0,0 @@
|
||||
# /****************************************************************************
|
||||
# * <Novell-copyright>
|
||||
# * Copyright (c) 2001 Novell, Inc. All Rights Reserved.
|
||||
# *
|
||||
# * This program is free software; you can redistribute it and/or
|
||||
# * modify it under the terms of version 2 of the GNU General Public License
|
||||
# * as published by the Free Software Foundation.
|
||||
# *
|
||||
# * This program is distributed in the hope that it will be useful,
|
||||
# * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# * GNU General Public License for more details.
|
||||
# *
|
||||
# * You should have received a copy of the GNU General Public License
|
||||
# * along with this program; if not, contact Novell, Inc.
|
||||
# *
|
||||
# * To contact Novell about this file by physical or electronic mail, you
|
||||
# * may find current contact information at www.novell.com.
|
||||
# * </Novell-copyright>
|
||||
# ****************************************************************************/
|
||||
|
||||
if(NOT DEFINED INPUT OR NOT DEFINED OUTPUT OR NOT DEFINED SYMBOL)
|
||||
message(FATAL_ERROR "EmbedFile.cmake requires INPUT, OUTPUT and SYMBOL")
|
||||
endif()
|
||||
|
||||
file(READ "${INPUT}" content HEX)
|
||||
string(REGEX MATCHALL ".." bytes "${content}")
|
||||
set(source "unsigned char ${SYMBOL}[] = {\n")
|
||||
set(column 0)
|
||||
foreach(byte IN LISTS bytes)
|
||||
string(APPEND source "0x${byte},")
|
||||
math(EXPR column "${column} + 1")
|
||||
if(column EQUAL 16)
|
||||
string(APPEND source "\n")
|
||||
set(column 0)
|
||||
endif()
|
||||
endforeach()
|
||||
string(APPEND source "0x00\n};\n")
|
||||
file(WRITE "${OUTPUT}" "${source}")
|
||||
@@ -1,36 +0,0 @@
|
||||
# /****************************************************************************
|
||||
# * <Novell-copyright>
|
||||
# * Copyright (c) 2001 Novell, Inc. All Rights Reserved.
|
||||
# *
|
||||
# * This program is free software; you can redistribute it and/or
|
||||
# * modify it under the terms of version 2 of the GNU General Public License
|
||||
# * as published by the Free Software Foundation.
|
||||
# *
|
||||
# * This program is distributed in the hope that it will be useful,
|
||||
# * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# * GNU General Public License for more details.
|
||||
# *
|
||||
# * You should have received a copy of the GNU General Public License
|
||||
# * along with this program; if not, contact Novell, Inc.
|
||||
# *
|
||||
# * To contact Novell about this file by physical or electronic mail, you
|
||||
# * may find current contact information at www.novell.com.
|
||||
# * </Novell-copyright>
|
||||
# ****************************************************************************/
|
||||
|
||||
find_path(Argon2_INCLUDE_DIR NAMES argon2.h)
|
||||
find_library(Argon2_LIBRARY NAMES argon2)
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(Argon2
|
||||
REQUIRED_VARS Argon2_LIBRARY Argon2_INCLUDE_DIR)
|
||||
|
||||
if(Argon2_FOUND AND NOT TARGET Argon2::Argon2)
|
||||
add_library(Argon2::Argon2 UNKNOWN IMPORTED)
|
||||
set_target_properties(Argon2::Argon2 PROPERTIES
|
||||
IMPORTED_LOCATION "${Argon2_LIBRARY}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${Argon2_INCLUDE_DIR}")
|
||||
endif()
|
||||
|
||||
mark_as_advanced(Argon2_INCLUDE_DIR Argon2_LIBRARY)
|
||||
@@ -1,76 +0,0 @@
|
||||
# /****************************************************************************
|
||||
# * <Novell-copyright>
|
||||
# * Copyright (c) 2001 Novell, Inc. All Rights Reserved.
|
||||
# *
|
||||
# * This program is free software; you can redistribute it and/or
|
||||
# * modify it under the terms of version 2 of the GNU General Public License
|
||||
# * as published by the Free Software Foundation.
|
||||
# *
|
||||
# * This program is distributed in the hope that it will be useful,
|
||||
# * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# * GNU General Public License for more details.
|
||||
# *
|
||||
# * You should have received a copy of the GNU General Public License
|
||||
# * along with this program; if not, contact Novell, Inc.
|
||||
# *
|
||||
# * To contact Novell about this file by physical or electronic mail, you
|
||||
# * may find current contact information at www.novell.com.
|
||||
# * </Novell-copyright>
|
||||
# ****************************************************************************/
|
||||
|
||||
find_path(GLib2_INCLUDE_DIR NAMES glib.h PATH_SUFFIXES glib-2.0)
|
||||
find_library(GLib2_LIBRARY NAMES glib-2.0)
|
||||
find_library(GLib2_GOBJECT_LIBRARY NAMES gobject-2.0)
|
||||
|
||||
if(GLib2_LIBRARY)
|
||||
get_filename_component(_GLib2_LIBRARY_DIR "${GLib2_LIBRARY}" DIRECTORY)
|
||||
endif()
|
||||
find_path(GLib2_CONFIG_INCLUDE_DIR NAMES glibconfig.h
|
||||
HINTS "${_GLib2_LIBRARY_DIR}/glib-2.0/include"
|
||||
PATH_SUFFIXES
|
||||
glib-2.0/include
|
||||
lib/glib-2.0/include
|
||||
lib64/glib-2.0/include
|
||||
"lib/${CMAKE_LIBRARY_ARCHITECTURE}/glib-2.0/include")
|
||||
|
||||
if(GLib2_CONFIG_INCLUDE_DIR)
|
||||
file(STRINGS "${GLib2_CONFIG_INCLUDE_DIR}/glibconfig.h"
|
||||
_GLib2_VERSION_LINES
|
||||
REGEX "^#define GLIB_(MAJOR|MINOR|MICRO)_VERSION[ \t]+[0-9]+")
|
||||
foreach(_component MAJOR MINOR MICRO)
|
||||
string(REGEX MATCH "GLIB_${_component}_VERSION[ \t]+([0-9]+)"
|
||||
_GLib2_VERSION_MATCH "${_GLib2_VERSION_LINES}")
|
||||
set(_GLib2_VERSION_${_component} "${CMAKE_MATCH_1}")
|
||||
endforeach()
|
||||
if(DEFINED _GLib2_VERSION_MAJOR AND DEFINED _GLib2_VERSION_MINOR AND
|
||||
DEFINED _GLib2_VERSION_MICRO)
|
||||
set(GLib2_VERSION
|
||||
"${_GLib2_VERSION_MAJOR}.${_GLib2_VERSION_MINOR}.${_GLib2_VERSION_MICRO}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(GLib2
|
||||
REQUIRED_VARS GLib2_LIBRARY GLib2_GOBJECT_LIBRARY GLib2_INCLUDE_DIR
|
||||
GLib2_CONFIG_INCLUDE_DIR
|
||||
VERSION_VAR GLib2_VERSION)
|
||||
|
||||
if(GLib2_FOUND AND NOT TARGET GLib2::GLib2)
|
||||
add_library(GLib2::GLib2 UNKNOWN IMPORTED)
|
||||
set_target_properties(GLib2::GLib2 PROPERTIES
|
||||
IMPORTED_LOCATION "${GLib2_LIBRARY}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES
|
||||
"${GLib2_INCLUDE_DIR};${GLib2_CONFIG_INCLUDE_DIR}")
|
||||
endif()
|
||||
set(GLib2_INCLUDE_DIRS "${GLib2_INCLUDE_DIR};${GLib2_CONFIG_INCLUDE_DIR}")
|
||||
set(GLib2_LIBRARIES "${GLib2_LIBRARY}")
|
||||
if(GLib2_FOUND AND NOT TARGET GLib2::GObject)
|
||||
add_library(GLib2::GObject UNKNOWN IMPORTED)
|
||||
set_target_properties(GLib2::GObject PROPERTIES
|
||||
IMPORTED_LOCATION "${GLib2_GOBJECT_LIBRARY}"
|
||||
INTERFACE_LINK_LIBRARIES GLib2::GLib2)
|
||||
endif()
|
||||
|
||||
mark_as_advanced(GLib2_INCLUDE_DIR GLib2_CONFIG_INCLUDE_DIR GLib2_LIBRARY
|
||||
GLib2_GOBJECT_LIBRARY)
|
||||
@@ -1,55 +0,0 @@
|
||||
# /****************************************************************************
|
||||
# * <Novell-copyright>
|
||||
# * Copyright (c) 2001 Novell, Inc. All Rights Reserved.
|
||||
# *
|
||||
# * This program is free software; you can redistribute it and/or
|
||||
# * modify it under the terms of version 2 of the GNU General Public License
|
||||
# * as published by the Free Software Foundation.
|
||||
# *
|
||||
# * This program is distributed in the hope that it will be useful,
|
||||
# * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# * GNU General Public License for more details.
|
||||
# *
|
||||
# * You should have received a copy of the GNU General Public License
|
||||
# * along with this program; if not, contact Novell, Inc.
|
||||
# *
|
||||
# * To contact Novell about this file by physical or electronic mail, you
|
||||
# * may find current contact information at www.novell.com.
|
||||
# * </Novell-copyright>
|
||||
# ****************************************************************************/
|
||||
|
||||
find_path(GMime_INCLUDE_DIR NAMES gmime/gmime.h
|
||||
PATH_SUFFIXES gmime-3.0 gmime-2.6 gmime-2.4 gmime-2.2 gmime-2.0 gmime)
|
||||
find_library(GMime_LIBRARY NAMES gmime-3.0 gmime-2.6 gmime-2.4 gmime-2.2 gmime-2.0 gmime)
|
||||
|
||||
if(GMime_INCLUDE_DIR AND EXISTS "${GMime_INCLUDE_DIR}/gmime/gmime-version.h")
|
||||
file(STRINGS "${GMime_INCLUDE_DIR}/gmime/gmime-version.h"
|
||||
_GMime_VERSION_LINES
|
||||
REGEX "^#define GMIME_(MAJOR|MINOR|MICRO)_VERSION[ \t]+\\([0-9]+U?\\)")
|
||||
foreach(_component MAJOR MINOR MICRO)
|
||||
string(REGEX MATCH "GMIME_${_component}_VERSION[ \t]+\\(([0-9]+)U?\\)"
|
||||
_GMime_VERSION_MATCH "${_GMime_VERSION_LINES}")
|
||||
set(_GMime_VERSION_${_component} "${CMAKE_MATCH_1}")
|
||||
endforeach()
|
||||
if(DEFINED _GMime_VERSION_MAJOR AND DEFINED _GMime_VERSION_MINOR AND
|
||||
DEFINED _GMime_VERSION_MICRO)
|
||||
set(GMime_VERSION
|
||||
"${_GMime_VERSION_MAJOR}.${_GMime_VERSION_MINOR}.${_GMime_VERSION_MICRO}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(GMime
|
||||
REQUIRED_VARS GMime_LIBRARY GMime_INCLUDE_DIR
|
||||
VERSION_VAR GMime_VERSION)
|
||||
|
||||
if(GMime_FOUND AND NOT TARGET GMime::GMime)
|
||||
add_library(GMime::GMime UNKNOWN IMPORTED)
|
||||
set_target_properties(GMime::GMime PROPERTIES
|
||||
IMPORTED_LOCATION "${GMime_LIBRARY}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${GMime_INCLUDE_DIR}"
|
||||
INTERFACE_LINK_LIBRARIES "GLib2::GObject")
|
||||
endif()
|
||||
|
||||
mark_as_advanced(GMime_INCLUDE_DIR GMime_LIBRARY)
|
||||
@@ -1,57 +0,0 @@
|
||||
# /****************************************************************************
|
||||
# * <Novell-copyright>
|
||||
# * Copyright (c) 2001 Novell, Inc. All Rights Reserved.
|
||||
# *
|
||||
# * This program is free software; you can redistribute it and/or
|
||||
# * modify it under the terms of version 2 of the GNU General Public License
|
||||
# * as published by the Free Software Foundation.
|
||||
# *
|
||||
# * This program is distributed in the hope that it will be useful,
|
||||
# * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# * GNU General Public License for more details.
|
||||
# *
|
||||
# * You should have received a copy of the GNU General Public License
|
||||
# * along with this program; if not, contact Novell, Inc.
|
||||
# *
|
||||
# * To contact Novell about this file by physical or electronic mail, you
|
||||
# * may find current contact information at www.novell.com.
|
||||
# * </Novell-copyright>
|
||||
# ****************************************************************************/
|
||||
|
||||
find_package(PkgConfig QUIET)
|
||||
if(PkgConfig_FOUND)
|
||||
pkg_check_modules(PC_GSASL QUIET libgsasl)
|
||||
endif()
|
||||
|
||||
find_path(GSASL_INCLUDE_DIR NAMES gsasl.h
|
||||
HINTS ${PC_GSASL_INCLUDEDIR} ${PC_GSASL_INCLUDE_DIRS})
|
||||
find_library(GSASL_LIBRARY NAMES gsasl
|
||||
HINTS ${PC_GSASL_LIBDIR} ${PC_GSASL_LIBRARY_DIRS})
|
||||
|
||||
set(GSASL_VERSION "${PC_GSASL_VERSION}")
|
||||
if(GSASL_INCLUDE_DIR AND NOT GSASL_VERSION AND
|
||||
EXISTS "${GSASL_INCLUDE_DIR}/gsasl-version.h")
|
||||
file(STRINGS "${GSASL_INCLUDE_DIR}/gsasl-version.h" _GSASL_VERSION_LINE
|
||||
REGEX "^# *define GSASL_VERSION +\"[0-9]+\\.[0-9]+\\.[0-9]+\"")
|
||||
string(REGEX MATCH "[0-9]+\\.[0-9]+\\.[0-9]+" GSASL_VERSION
|
||||
"${_GSASL_VERSION_LINE}")
|
||||
endif()
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(GSASL
|
||||
REQUIRED_VARS GSASL_LIBRARY GSASL_INCLUDE_DIR
|
||||
VERSION_VAR GSASL_VERSION)
|
||||
|
||||
if(GSASL_FOUND AND NOT TARGET GSASL::GSASL)
|
||||
add_library(GSASL::GSASL UNKNOWN IMPORTED)
|
||||
set_target_properties(GSASL::GSASL PROPERTIES
|
||||
IMPORTED_LOCATION "${GSASL_LIBRARY}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${GSASL_INCLUDE_DIR}")
|
||||
if(PC_GSASL_CFLAGS_OTHER)
|
||||
set_property(TARGET GSASL::GSASL PROPERTY
|
||||
INTERFACE_COMPILE_OPTIONS "${PC_GSASL_CFLAGS_OTHER}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
mark_as_advanced(GSASL_INCLUDE_DIR GSASL_LIBRARY)
|
||||
@@ -1,57 +0,0 @@
|
||||
# /****************************************************************************
|
||||
# * <Novell-copyright>
|
||||
# * Copyright (c) 2001 Novell, Inc. All Rights Reserved.
|
||||
# *
|
||||
# * This program is free software; you can redistribute it and/or
|
||||
# * modify it under the terms of version 2 of the GNU General Public License
|
||||
# * as published by the Free Software Foundation.
|
||||
# *
|
||||
# * This program is distributed in the hope that it will be useful,
|
||||
# * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# * GNU General Public License for more details.
|
||||
# *
|
||||
# * You should have received a copy of the GNU General Public License
|
||||
# * along with this program; if not, contact Novell, Inc.
|
||||
# *
|
||||
# * To contact Novell about this file by physical or electronic mail, you
|
||||
# * may find current contact information at www.novell.com.
|
||||
# * </Novell-copyright>
|
||||
# ****************************************************************************/
|
||||
|
||||
find_package(PkgConfig QUIET)
|
||||
if(PkgConfig_FOUND)
|
||||
pkg_check_modules(PC_LDNS QUIET ldns)
|
||||
endif()
|
||||
|
||||
find_path(LDNS_INCLUDE_DIR NAMES ldns/ldns.h
|
||||
HINTS ${PC_LDNS_INCLUDEDIR} ${PC_LDNS_INCLUDE_DIRS})
|
||||
find_library(LDNS_LIBRARY NAMES ldns
|
||||
HINTS ${PC_LDNS_LIBDIR} ${PC_LDNS_LIBRARY_DIRS})
|
||||
|
||||
set(LDNS_VERSION "${PC_LDNS_VERSION}")
|
||||
if(LDNS_INCLUDE_DIR AND NOT LDNS_VERSION AND
|
||||
EXISTS "${LDNS_INCLUDE_DIR}/ldns/util.h")
|
||||
file(STRINGS "${LDNS_INCLUDE_DIR}/ldns/util.h" _LDNS_VERSION_LINE
|
||||
REGEX "^# *define LDNS_VERSION +\"[0-9]+\\.[0-9]+\\.[0-9]+\"")
|
||||
string(REGEX MATCH "[0-9]+\\.[0-9]+\\.[0-9]+" LDNS_VERSION
|
||||
"${_LDNS_VERSION_LINE}")
|
||||
endif()
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(LDNS
|
||||
REQUIRED_VARS LDNS_LIBRARY LDNS_INCLUDE_DIR
|
||||
VERSION_VAR LDNS_VERSION)
|
||||
|
||||
if(LDNS_FOUND AND NOT TARGET LDNS::LDNS)
|
||||
add_library(LDNS::LDNS UNKNOWN IMPORTED)
|
||||
set_target_properties(LDNS::LDNS PROPERTIES
|
||||
IMPORTED_LOCATION "${LDNS_LIBRARY}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${LDNS_INCLUDE_DIR}")
|
||||
if(PC_LDNS_CFLAGS_OTHER)
|
||||
set_property(TARGET LDNS::LDNS PROPERTY
|
||||
INTERFACE_COMPILE_OPTIONS "${PC_LDNS_CFLAGS_OTHER}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
mark_as_advanced(LDNS_INCLUDE_DIR LDNS_LIBRARY)
|
||||
@@ -1,45 +0,0 @@
|
||||
# /****************************************************************************
|
||||
# * <Novell-copyright>
|
||||
# * Copyright (c) 2001 Novell, Inc. All Rights Reserved.
|
||||
# *
|
||||
# * This program is free software; you can redistribute it and/or
|
||||
# * modify it under the terms of version 2 of the GNU General Public License
|
||||
# * as published by the Free Software Foundation.
|
||||
# *
|
||||
# * This program is distributed in the hope that it will be useful,
|
||||
# * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# * GNU General Public License for more details.
|
||||
# *
|
||||
# * You should have received a copy of the GNU General Public License
|
||||
# * along with this program; if not, contact Novell, Inc.
|
||||
# *
|
||||
# * To contact Novell about this file by physical or electronic mail, you
|
||||
# * may find current contact information at www.novell.com.
|
||||
# * </Novell-copyright>
|
||||
# ****************************************************************************/
|
||||
|
||||
find_path(LibGcrypt_INCLUDE_DIR NAMES gcrypt.h)
|
||||
find_library(LibGcrypt_LIBRARY NAMES gcrypt)
|
||||
|
||||
if(LibGcrypt_INCLUDE_DIR)
|
||||
file(STRINGS "${LibGcrypt_INCLUDE_DIR}/gcrypt.h" _LibGcrypt_VERSION_LINE
|
||||
REGEX "^#define GCRYPT_VERSION[ \t]+\"[0-9]+\\.[0-9]+\\.[0-9]+")
|
||||
string(REGEX MATCH "\"([0-9]+\\.[0-9]+\\.[0-9]+)"
|
||||
_LibGcrypt_VERSION_MATCH "${_LibGcrypt_VERSION_LINE}")
|
||||
set(LibGcrypt_VERSION "${CMAKE_MATCH_1}")
|
||||
endif()
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(LibGcrypt
|
||||
REQUIRED_VARS LibGcrypt_LIBRARY LibGcrypt_INCLUDE_DIR
|
||||
VERSION_VAR LibGcrypt_VERSION)
|
||||
|
||||
if(LibGcrypt_FOUND AND NOT TARGET LibGcrypt::LibGcrypt)
|
||||
add_library(LibGcrypt::LibGcrypt UNKNOWN IMPORTED)
|
||||
set_target_properties(LibGcrypt::LibGcrypt PROPERTIES
|
||||
IMPORTED_LOCATION "${LibGcrypt_LIBRARY}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${LibGcrypt_INCLUDE_DIR}")
|
||||
endif()
|
||||
|
||||
mark_as_advanced(LibGcrypt_INCLUDE_DIR LibGcrypt_LIBRARY)
|
||||
@@ -1,71 +0,0 @@
|
||||
# /****************************************************************************
|
||||
# * <Novell-copyright>
|
||||
# * Copyright (c) 2001 Novell, Inc. All Rights Reserved.
|
||||
# *
|
||||
# * This program is free software; you can redistribute it and/or
|
||||
# * modify it under the terms of version 2 of the GNU General Public License
|
||||
# * as published by the Free Software Foundation.
|
||||
# *
|
||||
# * This program is distributed in the hope that it will be useful,
|
||||
# * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# * GNU General Public License for more details.
|
||||
# *
|
||||
# * You should have received a copy of the GNU General Public License
|
||||
# * along with this program; if not, contact Novell, Inc.
|
||||
# *
|
||||
# * To contact Novell about this file by physical or electronic mail, you
|
||||
# * may find current contact information at www.novell.com.
|
||||
# * </Novell-copyright>
|
||||
# ****************************************************************************/
|
||||
|
||||
if(NOT CMAKE_CROSSCOMPILING)
|
||||
find_package(LibIcal CONFIG QUIET NO_MODULE)
|
||||
endif()
|
||||
|
||||
if(LibIcal_FOUND AND TARGET ical)
|
||||
if(NOT TARGET LibIcal::ical)
|
||||
add_library(LibIcal::ical ALIAS ical)
|
||||
endif()
|
||||
if(NOT LibIcal_INCLUDE_DIR)
|
||||
get_target_property(LibIcal_INCLUDE_DIR ical INTERFACE_INCLUDE_DIRECTORIES)
|
||||
endif()
|
||||
return()
|
||||
endif()
|
||||
|
||||
find_path(LibIcal_INCLUDE_DIR NAMES libical/ical.h ical.h)
|
||||
find_library(LibIcal_LIBRARY NAMES ical)
|
||||
|
||||
if(LibIcal_INCLUDE_DIR)
|
||||
if(EXISTS "${LibIcal_INCLUDE_DIR}/libical/ical.h")
|
||||
set(_LibIcal_VERSION_HEADER "${LibIcal_INCLUDE_DIR}/libical/ical.h")
|
||||
else()
|
||||
set(_LibIcal_VERSION_HEADER "${LibIcal_INCLUDE_DIR}/ical.h")
|
||||
endif()
|
||||
file(STRINGS "${_LibIcal_VERSION_HEADER}" _LibIcal_VERSION_LINES
|
||||
REGEX "^#define ICAL_(MAJOR|MINOR|PATCH)_VERSION[ \t]+\\([0-9]+\\)")
|
||||
foreach(_component MAJOR MINOR PATCH)
|
||||
string(REGEX MATCH "ICAL_${_component}_VERSION[ \t]+\\(([0-9]+)\\)"
|
||||
_LibIcal_VERSION_MATCH "${_LibIcal_VERSION_LINES}")
|
||||
set(_LibIcal_VERSION_${_component} "${CMAKE_MATCH_1}")
|
||||
endforeach()
|
||||
if(DEFINED _LibIcal_VERSION_MAJOR AND DEFINED _LibIcal_VERSION_MINOR AND
|
||||
DEFINED _LibIcal_VERSION_PATCH)
|
||||
set(LibIcal_VERSION
|
||||
"${_LibIcal_VERSION_MAJOR}.${_LibIcal_VERSION_MINOR}.${_LibIcal_VERSION_PATCH}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(LibIcal
|
||||
REQUIRED_VARS LibIcal_LIBRARY LibIcal_INCLUDE_DIR
|
||||
VERSION_VAR LibIcal_VERSION)
|
||||
|
||||
if(LibIcal_FOUND AND NOT TARGET LibIcal::ical)
|
||||
add_library(LibIcal::ical UNKNOWN IMPORTED)
|
||||
set_target_properties(LibIcal::ical PROPERTIES
|
||||
IMPORTED_LOCATION "${LibIcal_LIBRARY}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${LibIcal_INCLUDE_DIR}")
|
||||
endif()
|
||||
|
||||
mark_as_advanced(LibIcal_INCLUDE_DIR LibIcal_LIBRARY)
|
||||
@@ -1,45 +0,0 @@
|
||||
# /****************************************************************************
|
||||
# * <Novell-copyright>
|
||||
# * Copyright (c) 2001 Novell, Inc. All Rights Reserved.
|
||||
# *
|
||||
# * This program is free software; you can redistribute it and/or
|
||||
# * modify it under the terms of version 2 of the GNU General Public License
|
||||
# * as published by the Free Software Foundation.
|
||||
# *
|
||||
# * This program is distributed in the hope that it will be useful,
|
||||
# * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# * GNU General Public License for more details.
|
||||
# *
|
||||
# * You should have received a copy of the GNU General Public License
|
||||
# * along with this program; if not, contact Novell, Inc.
|
||||
# *
|
||||
# * To contact Novell about this file by physical or electronic mail, you
|
||||
# * may find current contact information at www.novell.com.
|
||||
# * </Novell-copyright>
|
||||
# ****************************************************************************/
|
||||
|
||||
find_path(LibPSL_INCLUDE_DIR NAMES libpsl.h)
|
||||
find_library(LibPSL_LIBRARY NAMES psl)
|
||||
|
||||
if(LibPSL_INCLUDE_DIR)
|
||||
file(STRINGS "${LibPSL_INCLUDE_DIR}/libpsl.h" _LibPSL_VERSION_LINE
|
||||
REGEX "^#define PSL_VERSION[ \t]+\"[0-9]+\\.[0-9]+\\.[0-9]+\"")
|
||||
string(REGEX MATCH "\"([0-9]+\\.[0-9]+\\.[0-9]+)\""
|
||||
_LibPSL_VERSION_MATCH "${_LibPSL_VERSION_LINE}")
|
||||
set(LibPSL_VERSION "${CMAKE_MATCH_1}")
|
||||
endif()
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(LibPSL
|
||||
REQUIRED_VARS LibPSL_LIBRARY LibPSL_INCLUDE_DIR
|
||||
VERSION_VAR LibPSL_VERSION)
|
||||
|
||||
if(LibPSL_FOUND AND NOT TARGET LibPSL::LibPSL)
|
||||
add_library(LibPSL::LibPSL UNKNOWN IMPORTED)
|
||||
set_target_properties(LibPSL::LibPSL PROPERTIES
|
||||
IMPORTED_LOCATION "${LibPSL_LIBRARY}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${LibPSL_INCLUDE_DIR}")
|
||||
endif()
|
||||
|
||||
mark_as_advanced(LibPSL_INCLUDE_DIR LibPSL_LIBRARY)
|
||||
@@ -1,53 +0,0 @@
|
||||
# /****************************************************************************
|
||||
# * <Novell-copyright>
|
||||
# * Copyright (c) 2001 Novell, Inc. All Rights Reserved.
|
||||
# *
|
||||
# * This program is free software; you can redistribute it and/or
|
||||
# * modify it under the terms of version 2 of the GNU General Public License
|
||||
# * as published by the Free Software Foundation.
|
||||
# *
|
||||
# * This program is distributed in the hope that it will be useful,
|
||||
# * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# * GNU General Public License for more details.
|
||||
# *
|
||||
# * You should have received a copy of the GNU General Public License
|
||||
# * along with this program; if not, contact Novell, Inc.
|
||||
# *
|
||||
# * To contact Novell about this file by physical or electronic mail, you
|
||||
# * may find current contact information at www.novell.com.
|
||||
# * </Novell-copyright>
|
||||
# ****************************************************************************/
|
||||
|
||||
find_path(Mailutils_INCLUDE_DIR NAMES mailutils/sieve.h)
|
||||
find_library(Mailutils_LIBRARY NAMES mailutils)
|
||||
find_library(Mailutils_SIEVE_LIBRARY NAMES mu_sieve)
|
||||
|
||||
set(Mailutils_Sieve_FOUND FALSE)
|
||||
if(Mailutils_SIEVE_LIBRARY)
|
||||
set(Mailutils_Sieve_FOUND TRUE)
|
||||
endif()
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(Mailutils
|
||||
REQUIRED_VARS Mailutils_LIBRARY Mailutils_INCLUDE_DIR
|
||||
HANDLE_COMPONENTS)
|
||||
|
||||
if(Mailutils_FOUND AND NOT TARGET Mailutils::Mailutils)
|
||||
add_library(Mailutils::Mailutils UNKNOWN IMPORTED)
|
||||
set_target_properties(Mailutils::Mailutils PROPERTIES
|
||||
IMPORTED_LOCATION "${Mailutils_LIBRARY}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${Mailutils_INCLUDE_DIR}")
|
||||
endif()
|
||||
|
||||
if(Mailutils_SIEVE_LIBRARY)
|
||||
if(NOT TARGET Mailutils::Sieve)
|
||||
add_library(Mailutils::Sieve UNKNOWN IMPORTED)
|
||||
set_target_properties(Mailutils::Sieve PROPERTIES
|
||||
IMPORTED_LOCATION "${Mailutils_SIEVE_LIBRARY}"
|
||||
INTERFACE_LINK_LIBRARIES Mailutils::Mailutils
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${Mailutils_INCLUDE_DIR}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
mark_as_advanced(Mailutils_INCLUDE_DIR Mailutils_LIBRARY Mailutils_SIEVE_LIBRARY)
|
||||
@@ -1,44 +0,0 @@
|
||||
# /****************************************************************************
|
||||
# * <Novell-copyright>
|
||||
# * Copyright (c) 2001 Novell, Inc. All Rights Reserved.
|
||||
# *
|
||||
# * This program is free software; you can redistribute it and/or
|
||||
# * modify it under the terms of version 2 of the GNU General Public License
|
||||
# * as published by the Free Software Foundation.
|
||||
# *
|
||||
# * This program is distributed in the hope that it will be useful,
|
||||
# * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# * GNU General Public License for more details.
|
||||
# *
|
||||
# * You should have received a copy of the GNU General Public License
|
||||
# * along with this program; if not, contact Novell, Inc.
|
||||
# *
|
||||
# * To contact Novell about this file by physical or electronic mail, you
|
||||
# * may find current contact information at www.novell.com.
|
||||
# * </Novell-copyright>
|
||||
# ****************************************************************************/
|
||||
|
||||
find_path(OATH_INCLUDE_DIR NAMES liboath/oath.h)
|
||||
find_library(OATH_LIBRARY NAMES oath)
|
||||
|
||||
if(OATH_INCLUDE_DIR)
|
||||
file(STRINGS "${OATH_INCLUDE_DIR}/liboath/oath.h" _OATH_VERSION_LINE
|
||||
REGEX "^# *define OATH_VERSION +\"[0-9]+\\.[0-9]+\\.[0-9]+\"")
|
||||
string(REGEX MATCH "[0-9]+\\.[0-9]+\\.[0-9]+" OATH_VERSION
|
||||
"${_OATH_VERSION_LINE}")
|
||||
endif()
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(OATH
|
||||
REQUIRED_VARS OATH_LIBRARY OATH_INCLUDE_DIR
|
||||
VERSION_VAR OATH_VERSION)
|
||||
|
||||
if(OATH_FOUND AND NOT TARGET OATH::OATH)
|
||||
add_library(OATH::OATH UNKNOWN IMPORTED)
|
||||
set_target_properties(OATH::OATH PROPERTIES
|
||||
IMPORTED_LOCATION "${OATH_LIBRARY}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${OATH_INCLUDE_DIR}")
|
||||
endif()
|
||||
|
||||
mark_as_advanced(OATH_INCLUDE_DIR OATH_LIBRARY)
|
||||
@@ -1,35 +0,0 @@
|
||||
# /****************************************************************************
|
||||
# * <Novell-copyright>
|
||||
# * Copyright (c) 2001 Novell, Inc. All Rights Reserved.
|
||||
# *
|
||||
# * This program is free software; you can redistribute it and/or
|
||||
# * modify it under the terms of version 2 of the GNU General Public License
|
||||
# * as published by the Free Software Foundation.
|
||||
# *
|
||||
# * This program is distributed in the hope that it will be useful,
|
||||
# * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# * GNU General Public License for more details.
|
||||
# *
|
||||
# * You should have received a copy of the GNU General Public License
|
||||
# * along with this program; if not, contact Novell, Inc.
|
||||
# *
|
||||
# * To contact Novell about this file by physical or electronic mail, you
|
||||
# * may find current contact information at www.novell.com.
|
||||
# * </Novell-copyright>
|
||||
# ****************************************************************************/
|
||||
|
||||
find_path(OpenDKIM_INCLUDE_DIR NAMES opendkim/dkim.h)
|
||||
find_library(OpenDKIM_LIBRARY NAMES opendkim)
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(OpenDKIM REQUIRED_VARS OpenDKIM_LIBRARY OpenDKIM_INCLUDE_DIR)
|
||||
|
||||
if(OpenDKIM_FOUND AND NOT TARGET OpenDKIM::OpenDKIM)
|
||||
add_library(OpenDKIM::OpenDKIM UNKNOWN IMPORTED)
|
||||
set_target_properties(OpenDKIM::OpenDKIM PROPERTIES
|
||||
IMPORTED_LOCATION "${OpenDKIM_LIBRARY}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${OpenDKIM_INCLUDE_DIR}")
|
||||
endif()
|
||||
|
||||
mark_as_advanced(OpenDKIM_INCLUDE_DIR OpenDKIM_LIBRARY)
|
||||
@@ -1,35 +0,0 @@
|
||||
# /****************************************************************************
|
||||
# * <Novell-copyright>
|
||||
# * Copyright (c) 2001 Novell, Inc. All Rights Reserved.
|
||||
# *
|
||||
# * This program is free software; you can redistribute it and/or
|
||||
# * modify it under the terms of version 2 of the GNU General Public License
|
||||
# * as published by the Free Software Foundation.
|
||||
# *
|
||||
# * This program is distributed in the hope that it will be useful,
|
||||
# * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# * GNU General Public License for more details.
|
||||
# *
|
||||
# * You should have received a copy of the GNU General Public License
|
||||
# * along with this program; if not, contact Novell, Inc.
|
||||
# *
|
||||
# * To contact Novell about this file by physical or electronic mail, you
|
||||
# * may find current contact information at www.novell.com.
|
||||
# * </Novell-copyright>
|
||||
# ****************************************************************************/
|
||||
|
||||
find_path(OpenDMARC_INCLUDE_DIR NAMES opendmarc/dmarc.h)
|
||||
find_library(OpenDMARC_LIBRARY NAMES opendmarc)
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(OpenDMARC REQUIRED_VARS OpenDMARC_LIBRARY OpenDMARC_INCLUDE_DIR)
|
||||
|
||||
if(OpenDMARC_FOUND AND NOT TARGET OpenDMARC::OpenDMARC)
|
||||
add_library(OpenDMARC::OpenDMARC UNKNOWN IMPORTED)
|
||||
set_target_properties(OpenDMARC::OpenDMARC PROPERTIES
|
||||
IMPORTED_LOCATION "${OpenDMARC_LIBRARY}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${OpenDMARC_INCLUDE_DIR}")
|
||||
endif()
|
||||
|
||||
mark_as_advanced(OpenDMARC_INCLUDE_DIR OpenDMARC_LIBRARY)
|
||||
@@ -1,43 +0,0 @@
|
||||
# Locate the OpenLDAP client libraries without relying on pkg-config.
|
||||
|
||||
find_path(OpenLDAP_INCLUDE_DIR
|
||||
NAMES ldap.h)
|
||||
|
||||
find_library(OpenLDAP_LDAP_LIBRARY
|
||||
NAMES ldap)
|
||||
|
||||
find_library(OpenLDAP_LBER_LIBRARY
|
||||
NAMES lber)
|
||||
|
||||
if(OpenLDAP_INCLUDE_DIR AND EXISTS "${OpenLDAP_INCLUDE_DIR}/ldap_features.h")
|
||||
file(STRINGS "${OpenLDAP_INCLUDE_DIR}/ldap_features.h"
|
||||
_OpenLDAP_VERSION_LINES
|
||||
REGEX "^#define LDAP_VENDOR_VERSION_(MAJOR|MINOR|PATCH) [0-9]+$")
|
||||
foreach(_part MAJOR MINOR PATCH)
|
||||
string(REGEX MATCH
|
||||
"LDAP_VENDOR_VERSION_${_part} ([0-9]+)"
|
||||
_match "${_OpenLDAP_VERSION_LINES}")
|
||||
set(OpenLDAP_VERSION_${_part} "${CMAKE_MATCH_1}")
|
||||
endforeach()
|
||||
if(DEFINED OpenLDAP_VERSION_MAJOR AND
|
||||
DEFINED OpenLDAP_VERSION_MINOR AND
|
||||
DEFINED OpenLDAP_VERSION_PATCH)
|
||||
set(OpenLDAP_VERSION
|
||||
"${OpenLDAP_VERSION_MAJOR}.${OpenLDAP_VERSION_MINOR}.${OpenLDAP_VERSION_PATCH}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(OpenLDAP
|
||||
REQUIRED_VARS OpenLDAP_INCLUDE_DIR OpenLDAP_LDAP_LIBRARY OpenLDAP_LBER_LIBRARY
|
||||
VERSION_VAR OpenLDAP_VERSION)
|
||||
|
||||
if(OpenLDAP_FOUND AND NOT TARGET OpenLDAP::LDAP)
|
||||
add_library(OpenLDAP::LDAP UNKNOWN IMPORTED)
|
||||
set_target_properties(OpenLDAP::LDAP PROPERTIES
|
||||
IMPORTED_LOCATION "${OpenLDAP_LDAP_LIBRARY}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${OpenLDAP_INCLUDE_DIR}"
|
||||
INTERFACE_LINK_LIBRARIES "${OpenLDAP_LBER_LIBRARY}")
|
||||
endif()
|
||||
|
||||
mark_as_advanced(OpenLDAP_INCLUDE_DIR OpenLDAP_LDAP_LIBRARY OpenLDAP_LBER_LIBRARY)
|
||||
@@ -1,36 +0,0 @@
|
||||
# /****************************************************************************
|
||||
# * <Novell-copyright>
|
||||
# * Copyright (c) 2001 Novell, Inc. All Rights Reserved.
|
||||
# *
|
||||
# * This program is free software; you can redistribute it and/or
|
||||
# * modify it under the terms of version 2 of the GNU General Public License
|
||||
# * as published by the Free Software Foundation.
|
||||
# *
|
||||
# * This program is distributed in the hope that it will be useful,
|
||||
# * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# * GNU General Public License for more details.
|
||||
# *
|
||||
# * You should have received a copy of the GNU General Public License
|
||||
# * along with this program; if not, contact Novell, Inc.
|
||||
# *
|
||||
# * To contact Novell about this file by physical or electronic mail, you
|
||||
# * may find current contact information at www.novell.com.
|
||||
# * </Novell-copyright>
|
||||
# ****************************************************************************/
|
||||
|
||||
find_path(QRencode_INCLUDE_DIR NAMES qrencode.h)
|
||||
find_library(QRencode_LIBRARY NAMES qrencode)
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(QRencode
|
||||
REQUIRED_VARS QRencode_LIBRARY QRencode_INCLUDE_DIR)
|
||||
|
||||
if(QRencode_FOUND AND NOT TARGET QRencode::QRencode)
|
||||
add_library(QRencode::QRencode UNKNOWN IMPORTED)
|
||||
set_target_properties(QRencode::QRencode PROPERTIES
|
||||
IMPORTED_LOCATION "${QRencode_LIBRARY}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${QRencode_INCLUDE_DIR}")
|
||||
endif()
|
||||
|
||||
mark_as_advanced(QRencode_INCLUDE_DIR QRencode_LIBRARY)
|
||||
@@ -1,57 +0,0 @@
|
||||
# /****************************************************************************
|
||||
# * <Novell-copyright>
|
||||
# * Copyright (c) 2001 Novell, Inc. All Rights Reserved.
|
||||
# *
|
||||
# * This program is free software; you can redistribute it and/or
|
||||
# * modify it under the terms of version 2 of the GNU General Public License
|
||||
# * as published by the Free Software Foundation.
|
||||
# *
|
||||
# * This program is distributed in the hope that it will be useful,
|
||||
# * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# * GNU General Public License for more details.
|
||||
# *
|
||||
# * You should have received a copy of the GNU General Public License
|
||||
# * along with this program; if not, contact Novell, Inc.
|
||||
# *
|
||||
# * To contact Novell about this file by physical or electronic mail, you
|
||||
# * may find current contact information at www.novell.com.
|
||||
# * </Novell-copyright>
|
||||
# ****************************************************************************/
|
||||
|
||||
find_path(SPF2_INCLUDE_DIR NAMES spf2/spf.h)
|
||||
find_library(SPF2_LIBRARY NAMES spf2)
|
||||
|
||||
include(CheckCSourceCompiles)
|
||||
if(SPF2_INCLUDE_DIR)
|
||||
set(_SPF2_REQUIRED_INCLUDES "${CMAKE_REQUIRED_INCLUDES}")
|
||||
set(CMAKE_REQUIRED_INCLUDES "${SPF2_INCLUDE_DIR}")
|
||||
check_c_source_compiles([=[
|
||||
#include <stddef.h>
|
||||
#include <time.h>
|
||||
#include <netinet/in.h>
|
||||
#include <arpa/inet.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <spf2/spf.h>
|
||||
#ifndef LIBSPF2_RFC7208
|
||||
#error Bongo requires its maintained RFC 7208 libspf2 package
|
||||
#endif
|
||||
int main(void) { return 0; }
|
||||
]=] SPF2_HAS_RFC7208_HARDENING)
|
||||
set(CMAKE_REQUIRED_INCLUDES "${_SPF2_REQUIRED_INCLUDES}")
|
||||
unset(_SPF2_REQUIRED_INCLUDES)
|
||||
endif()
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(SPF2 REQUIRED_VARS
|
||||
SPF2_LIBRARY SPF2_INCLUDE_DIR SPF2_HAS_RFC7208_HARDENING)
|
||||
|
||||
if(SPF2_FOUND AND NOT TARGET SPF2::SPF2)
|
||||
add_library(SPF2::SPF2 UNKNOWN IMPORTED)
|
||||
set_target_properties(SPF2::SPF2 PROPERTIES
|
||||
IMPORTED_LOCATION "${SPF2_LIBRARY}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${SPF2_INCLUDE_DIR}")
|
||||
endif()
|
||||
|
||||
mark_as_advanced(SPF2_INCLUDE_DIR SPF2_LIBRARY)
|
||||
@@ -1,51 +0,0 @@
|
||||
# /****************************************************************************
|
||||
# * <Novell-copyright>
|
||||
# * Copyright (c) 2001 Novell, Inc. All Rights Reserved.
|
||||
# *
|
||||
# * This program is free software; you can redistribute it and/or
|
||||
# * modify it under the terms of version 2 of the GNU General Public License
|
||||
# * as published by the Free Software Foundation.
|
||||
# *
|
||||
# * This program is distributed in the hope that it will be useful,
|
||||
# * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# * GNU General Public License for more details.
|
||||
# *
|
||||
# * You should have received a copy of the GNU General Public License
|
||||
# * along with this program; if not, contact Novell, Inc.
|
||||
# *
|
||||
# * To contact Novell about this file by physical or electronic mail, you
|
||||
# * may find current contact information at www.novell.com.
|
||||
# * </Novell-copyright>
|
||||
# ****************************************************************************/
|
||||
|
||||
find_path(SRS2_INCLUDE_DIR NAMES srs2.h)
|
||||
find_library(SRS2_LIBRARY NAMES srs2)
|
||||
|
||||
include(CheckCSourceCompiles)
|
||||
if(SRS2_INCLUDE_DIR)
|
||||
set(_SRS2_REQUIRED_INCLUDES "${CMAKE_REQUIRED_INCLUDES}")
|
||||
set(CMAKE_REQUIRED_INCLUDES "${SRS2_INCLUDE_DIR}")
|
||||
check_c_source_compiles([=[
|
||||
#include <srs2.h>
|
||||
#ifndef SRS2_SECURE_FREE_SECRETS
|
||||
#error Bongo requires its maintained libsrs2 security patch
|
||||
#endif
|
||||
int main(void) { return 0; }
|
||||
]=] SRS2_HAS_SECURE_FREE_SECRETS)
|
||||
set(CMAKE_REQUIRED_INCLUDES "${_SRS2_REQUIRED_INCLUDES}")
|
||||
unset(_SRS2_REQUIRED_INCLUDES)
|
||||
endif()
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(SRS2 REQUIRED_VARS
|
||||
SRS2_LIBRARY SRS2_INCLUDE_DIR SRS2_HAS_SECURE_FREE_SECRETS)
|
||||
|
||||
if(SRS2_FOUND AND NOT TARGET SRS2::SRS2)
|
||||
add_library(SRS2::SRS2 UNKNOWN IMPORTED)
|
||||
set_target_properties(SRS2::SRS2 PROPERTIES
|
||||
IMPORTED_LOCATION "${SRS2_LIBRARY}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${SRS2_INCLUDE_DIR}")
|
||||
endif()
|
||||
|
||||
mark_as_advanced(SRS2_INCLUDE_DIR SRS2_LIBRARY)
|
||||
@@ -1,17 +0,0 @@
|
||||
|
||||
set(PACKAGE CMAKE_PROJECT_NAME)
|
||||
|
||||
set(LINUX TRUE)
|
||||
|
||||
if(HAVE_TIME_H)
|
||||
set(HAVE_NANOSLEEP 1)
|
||||
endif(HAVE_TIME_H)
|
||||
|
||||
set(_BONGO_XPL_BIG_ENDIAN FALSE)
|
||||
set(_BONGO_XPL_LITTLE_ENDIAN TRUE)
|
||||
set(_BONGO_HAVE_DLFCN_H TRUE)
|
||||
|
||||
|
||||
set(BONGO_BUILD_BRANCH "trunk")
|
||||
set(BONGO_BUILD_VSTR "r")
|
||||
set(BONGO_BUILD_VER "10")
|
||||
@@ -1,163 +0,0 @@
|
||||
# include here the requirements to build Bongo
|
||||
# anything which isn't necessary should be marked [optional]
|
||||
|
||||
include(CheckIncludeFile)
|
||||
include(CheckCSourceCompiles)
|
||||
|
||||
# look for header files we need first
|
||||
check_include_file(inttypes.h HAVE_INTTYPES_H)
|
||||
check_include_file(sys/kstat.h HAVE_KSTAT_H)
|
||||
check_include_file(sys/vfs.h HAVE_SYS_VFS_H)
|
||||
check_include_file(sys/stat.h HAVE_SYS_STAT_H)
|
||||
check_include_file(sys/statvfs.h HAVE_SYS_STATVFS_H)
|
||||
check_include_file(time.h HAVE_TIME_H)
|
||||
check_include_file(semaphore.h HAVE_SEMAPHORE_H)
|
||||
|
||||
# look for PThreads
|
||||
include(FindThreads)
|
||||
if (NOT CMAKE_USE_PTHREADS_INIT)
|
||||
message(FATAL_ERROR "Bongo requires a platform with PThreads")
|
||||
endif (NOT CMAKE_USE_PTHREADS_INIT)
|
||||
|
||||
# GCC and Clang provide the __atomic builtins used by XplAtomic. Some older
|
||||
# 32-bit targets (including ARM) need libatomic for the same operations, while
|
||||
# others emit them inline. Detect that at link time instead of assuming the
|
||||
# build host's behaviour.
|
||||
set(_BONGO_ATOMIC_TEST_SOURCE "
|
||||
int main(void)
|
||||
{
|
||||
int value = 0;
|
||||
__atomic_fetch_add(&value, 1, __ATOMIC_SEQ_CST);
|
||||
return __atomic_load_n(&value, __ATOMIC_SEQ_CST) != 1;
|
||||
}")
|
||||
check_c_source_compiles("${_BONGO_ATOMIC_TEST_SOURCE}"
|
||||
BONGO_ATOMICS_LINK_WITHOUT_LIBRARY)
|
||||
add_library(BongoAtomic INTERFACE)
|
||||
add_library(Bongo::Atomic ALIAS BongoAtomic)
|
||||
if(NOT BONGO_ATOMICS_LINK_WITHOUT_LIBRARY)
|
||||
set(CMAKE_REQUIRED_LIBRARIES atomic)
|
||||
check_c_source_compiles("${_BONGO_ATOMIC_TEST_SOURCE}"
|
||||
BONGO_ATOMICS_LINK_WITH_LIBATOMIC)
|
||||
unset(CMAKE_REQUIRED_LIBRARIES)
|
||||
if(NOT BONGO_ATOMICS_LINK_WITH_LIBATOMIC)
|
||||
message(FATAL_ERROR
|
||||
"The compiler cannot link the atomic operations required by Bongo")
|
||||
endif()
|
||||
target_link_libraries(BongoAtomic INTERFACE atomic)
|
||||
endif()
|
||||
unset(_BONGO_ATOMIC_TEST_SOURCE)
|
||||
|
||||
# check for gettext
|
||||
check_include_file(libintl.h HAVE_LIBINTL_H)
|
||||
include (FindGettext)
|
||||
if (NOT GETTEXT_FOUND)
|
||||
message(FATAL_ERROR "Bongo needs Gettext developer support available")
|
||||
endif (NOT GETTEXT_FOUND)
|
||||
|
||||
check_include_file(kstat.h HAVE_KSTAT_H)
|
||||
|
||||
# check for glib
|
||||
find_package(GLib2 2.10 REQUIRED)
|
||||
# memmgr.h is a public legacy header and includes glib.h directly.
|
||||
include_directories(AFTER ${GLib2_INCLUDE_DIRS})
|
||||
|
||||
# check for GMime
|
||||
find_package(GMime 2.6 REQUIRED)
|
||||
|
||||
# check for gcrypt
|
||||
find_package(LibGcrypt 1.6 REQUIRED)
|
||||
# connio.h and xplhash.h are public legacy headers and include gcrypt.h.
|
||||
include_directories(AFTER ${LibGcrypt_INCLUDE_DIR})
|
||||
|
||||
# check for gnutls
|
||||
find_package(GnuTLS REQUIRED)
|
||||
|
||||
# check for sqlite3
|
||||
find_package(SQLite3 REQUIRED)
|
||||
if(NOT TARGET SQLite3::SQLite3)
|
||||
add_library(SQLite3::SQLite3 ALIAS SQLite::SQLite3)
|
||||
endif()
|
||||
|
||||
# Secure IMAP, POP3 and SMTP client transport.
|
||||
find_package(CURL 7.61 REQUIRED)
|
||||
|
||||
# Native DNS queries, authoritative propagation checks and RFC 2136 updates
|
||||
# used by ACME DNS-01 providers.
|
||||
find_package(LDNS 1.8 REQUIRED)
|
||||
|
||||
# RFC 5228 Sieve parser and validator used by the filter UI and ManageSieve.
|
||||
find_package(Mailutils REQUIRED COMPONENTS Sieve)
|
||||
|
||||
# Shared SASL implementation for SMTP, IMAP, POP3 and ManageSieve.
|
||||
find_package(GSASL 2.2.0 REQUIRED)
|
||||
|
||||
# Primary directory authentication with a short-lived local offline cache.
|
||||
find_package(OpenLDAP 2.4 REQUIRED)
|
||||
|
||||
# TOTP, recovery codes and service-scoped app passwords.
|
||||
find_package(OATH 2.6 REQUIRED)
|
||||
find_package(Argon2 REQUIRED)
|
||||
|
||||
# QR codes for enrolling authenticator applications in the web interface.
|
||||
find_package(QRencode REQUIRED)
|
||||
|
||||
# Native mail authentication. Bongo links to the protocol libraries directly;
|
||||
# it does not require the corresponding milter daemons at runtime.
|
||||
find_package(SPF2 REQUIRED)
|
||||
find_package(OpenDKIM REQUIRED)
|
||||
find_package(OpenDMARC REQUIRED)
|
||||
find_package(SRS2 REQUIRED)
|
||||
find_package(LibPSL 0.21 REQUIRED)
|
||||
|
||||
# check for libical
|
||||
find_package(LibIcal REQUIRED)
|
||||
if(EXISTS "${LibIcal_INCLUDE_DIR}/libical/ical.h")
|
||||
set(HAVE_ICAL_H 1)
|
||||
else()
|
||||
set(HAVE_OLD_ICAL_H 1)
|
||||
endif()
|
||||
|
||||
# check for Python
|
||||
find_package(Python3 COMPONENTS Interpreter Development REQUIRED)
|
||||
set(PYTHON_EXECUTABLE "${Python3_EXECUTABLE}")
|
||||
set(PYTHON_LIBRARIES "${Python3_LIBRARIES}")
|
||||
set(PYTHON_INCLUDE_DIRS "${Python3_INCLUDE_DIRS}")
|
||||
set(PYTHON_INCLUDE_PATH "${Python3_INCLUDE_DIRS}")
|
||||
function(python_add_module target)
|
||||
add_library(${target} MODULE ${ARGN})
|
||||
endfunction()
|
||||
if (NOT Python3_Development_FOUND)
|
||||
message(FATAL_ERROR "Bongo requires Python development libraries installed")
|
||||
endif ()
|
||||
|
||||
execute_process(
|
||||
COMMAND "${Python3_EXECUTABLE}" -c "import dateutil, dns.resolver, nh3, vobject"
|
||||
RESULT_VARIABLE PYTHON_NH3_FOUND
|
||||
)
|
||||
if (NOT PYTHON_NH3_FOUND EQUAL 0)
|
||||
message(FATAL_ERROR "Bongo requires the Python dateutil, dnspython, nh3, and vobject modules")
|
||||
endif ()
|
||||
|
||||
execute_process(COMMAND "${Python3_EXECUTABLE}" -c "import sysconfig; print(sysconfig.get_path('purelib', vars={'base':'', 'platbase':''}))"
|
||||
RESULT_VARIABLE PYTHON_SITEPACKAGES_FOUND
|
||||
OUTPUT_VARIABLE PYTHON_SITEPACKAGES_PATH_RAW
|
||||
)
|
||||
string(STRIP "${PYTHON_SITEPACKAGES_PATH_RAW}" PYTHON_SITEPACKAGES_PATH_RAW)
|
||||
|
||||
execute_process(COMMAND "${Python3_EXECUTABLE}" -c "import sysconfig; print(sysconfig.get_path('platlib', vars={'base':'', 'platbase':''}))"
|
||||
RESULT_VARIABLE PYTHON_SITELIB_FOUND
|
||||
OUTPUT_VARIABLE PYTHON_SITELIB_PATH_RAW
|
||||
)
|
||||
string(STRIP "${PYTHON_SITELIB_PATH_RAW}" PYTHON_SITELIB_PATH_RAW)
|
||||
|
||||
if (PYTHON_SITEPACKAGES_FOUND EQUAL 0)
|
||||
# sysconfig returns paths relative to an empty base with a leading slash.
|
||||
# Prefix them exactly once so /usr/local never becomes /usr/local/usr.
|
||||
set(PYTHON_SITEPACKAGES_PATH "${CMAKE_INSTALL_PREFIX}${PYTHON_SITEPACKAGES_PATH_RAW}")
|
||||
set(PYTHON_SITELIB_PATH "${CMAKE_INSTALL_PREFIX}${PYTHON_SITELIB_PATH_RAW}")
|
||||
else (PYTHON_SITEPACKAGES_FOUND EQUAL 0)
|
||||
message(FATAL_ERROR "Couldn't determine where to install Python modules")
|
||||
endif (PYTHON_SITEPACKAGES_FOUND EQUAL 0)
|
||||
|
||||
# check for Doxygen [optional]
|
||||
include(FindDoxygen)
|
||||
-101
@@ -1,101 +0,0 @@
|
||||
/* The username which bongo runs as. */
|
||||
#cmakedefine BONGO_USER "@BONGO_USER@"
|
||||
|
||||
// our package name
|
||||
#cmakedefine PACKAGE "@CMAKE_PROJECT_NAME@"
|
||||
#define BONGO_VERSION "@PROJECT_VERSION@"
|
||||
|
||||
// the way we do includes on the python code seems to cause problems
|
||||
// with the cmake style of defines.
|
||||
// include defines
|
||||
#ifndef HAVE_INTTYPES_H
|
||||
#cmakedefine HAVE_INTTYPES_H
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_SYS_STATVFS_H
|
||||
#cmakedefine HAVE_SYS_STATVFS_H
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_SYS_STAT_H
|
||||
#cmakedefine HAVE_SYS_STAT_H
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_SYS_VFS_H
|
||||
#cmakedefine HAVE_SYS_VFS_H
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_KSTAT_H
|
||||
#cmakedefine HAVE_KSTAT_H
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_SEMAPHORE_H
|
||||
#cmakedefine HAVE_SEMAPHORE_H
|
||||
#endif// Directories.txt
|
||||
|
||||
#cmakedefine HAVE_ICAL_H 1
|
||||
#cmakedefine HAVE_OLD_ICAL_H 1
|
||||
|
||||
#cmakedefine BINDIR "@BINDIR@"
|
||||
#cmakedefine SBINDIR "@SBINDIR@"
|
||||
#cmakedefine LIBDIR "@LIBDIR@"
|
||||
#cmakedefine LIBEXECDIR "@LIBEXECDIR@"
|
||||
#cmakedefine DATAROOTDIR "@DATAROOTDIR@"
|
||||
#cmakedefine DATADIR "@DATADIR@"
|
||||
#cmakedefine LOCALSTATEDIR "@LOCALSTATEDIR@"
|
||||
#cmakedefine INCLUDEDIR "@INCLUDEDIR@"
|
||||
|
||||
#cmakedefine XPL_DEFAULT_DATA_DIR "@XPL_DEFAULT_DATA_DIR@"
|
||||
#cmakedefine XPL_DEFAULT_STATE_DIR "@XPL_DEFAULT_STATE_DIR@"
|
||||
|
||||
#cmakedefine XPL_DEFAULT_BIN_DIR "@XPL_DEFAULT_BIN_DIR@"
|
||||
#cmakedefine XPL_DEFAULT_LIB_DIR "@XPL_DEFAULT_LIB_DIR@"
|
||||
#cmakedefine XPL_DEFAULT_CONF_DIR "@XPL_DEFAULT_CONF_DIR@"
|
||||
#cmakedefine XPL_DEFAULT_CONFIG_DIR "@XPL_DEFAULT_CONFIG_DIR@"
|
||||
#cmakedefine XPL_DEFAULT_ALIASES_DIR "@XPL_DEFAULT_ALIASES_DIR@"
|
||||
#cmakedefine XPL_DEFAULT_SSL_DIR "@XPL_DEFAULT_SSL_DIR@"
|
||||
#cmakedefine XPL_DEFAULT_DKIM_DIR "@XPL_DEFAULT_DKIM_DIR@"
|
||||
#cmakedefine XPL_DEFAULT_DMARC_DIR "@XPL_DEFAULT_DMARC_DIR@"
|
||||
#cmakedefine XPL_DEFAULT_ACME_CONFIG_DIR "@XPL_DEFAULT_ACME_CONFIG_DIR@"
|
||||
#cmakedefine XPL_DEFAULT_ACME_PROVIDER_CONFIG "@XPL_DEFAULT_ACME_PROVIDER_CONFIG@"
|
||||
#cmakedefine XPL_DEFAULT_ACME_DNS_HELPER "@XPL_DEFAULT_ACME_DNS_HELPER@"
|
||||
#cmakedefine XPL_DEFAULT_NLS_DIR "@XPL_DEFAULT_NLS_DIR@"
|
||||
|
||||
#cmakedefine XPL_DEFAULT_DBF_DIR "@XPL_DEFAULT_DBF_DIR@"
|
||||
#cmakedefine XPL_DEFAULT_WORK_DIR "@XPL_DEFAULT_WORK_DIR@"
|
||||
#cmakedefine XPL_DEFAULT_CACHE_DIR "@XPL_DEFAULT_CACHE_DIR@"
|
||||
#cmakedefine XPL_DEFAULT_SCMS_DIR "@XPL_DEFAULT_SCMS_DIR@"
|
||||
#cmakedefine XPL_DEFAULT_STORE_SYSTEM_DIR "@XPL_DEFAULT_STORE_SYSTEM_DIR@"
|
||||
#cmakedefine XPL_DEFAULT_SPOOL_DIR "@XPL_DEFAULT_SPOOL_DIR@"
|
||||
#cmakedefine XPL_DEFAULT_SYSTEM_DIR "@XPL_DEFAULT_SYSTEM_DIR@"
|
||||
#cmakedefine XPL_DEFAULT_MAIL_DIR "@XPL_DEFAULT_MAIL_DIR@"
|
||||
#cmakedefine XPL_DEFAULT_COOKIE_DIR "@XPL_DEFAULT_COOKIE_DIR@"
|
||||
#cmakedefine XPL_DEFAULT_WORKER_DIR "@XPL_DEFAULT_WORKER_DIR@"
|
||||
#cmakedefine XPL_DEFAULT_WORKER_DB "@XPL_DEFAULT_WORKER_DB@"
|
||||
#cmakedefine XPL_DEFAULT_ACME_DIR "@XPL_DEFAULT_ACME_DIR@"
|
||||
#cmakedefine XPL_DEFAULT_ACME_CHALLENGE_DIR "@XPL_DEFAULT_ACME_CHALLENGE_DIR@"
|
||||
#cmakedefine XPL_DEFAULT_ACME_ACCOUNT_KEY "@XPL_DEFAULT_ACME_ACCOUNT_KEY@"
|
||||
#cmakedefine XPL_DEFAULT_ACME_NEXT_KEY "@XPL_DEFAULT_ACME_NEXT_KEY@"
|
||||
#cmakedefine XPL_DEFAULT_ACME_NEXT_CERT "@XPL_DEFAULT_ACME_NEXT_CERT@"
|
||||
|
||||
#cmakedefine XPL_DEFAULT_CERT_PATH "@XPL_DEFAULT_CERT_PATH@"
|
||||
#cmakedefine XPL_DEFAULT_RSAPARAMS_PATH "@XPL_DEFAULT_RSAPARAMS_PATH@"
|
||||
#cmakedefine XPL_DEFAULT_DHPARAMS_PATH "@XPL_DEFAULT_DHPARAMS_PATH@"
|
||||
#cmakedefine XPL_DEFAULT_RANDSEED_PATH "@XPL_DEFAULT_RANDSEED_PATH@"
|
||||
#cmakedefine XPL_DEFAULT_KEY_PATH "@XPL_DEFAULT_KEY_PATH@"
|
||||
|
||||
#cmakedefine LOCALEDIR "@LOCALEDIR@"
|
||||
#cmakedefine ZONEINFODIR "@ZONEINFODIR@"
|
||||
|
||||
#cmakedefine BONGO_BUILD_BRANCH "@BONGO_BUILD_BRANCH@"
|
||||
#cmakedefine BONGO_BUILD_VSTR "@BONGO_BUILD_VSTR@"
|
||||
#cmakedefine BONGO_BUILD_VER "@BONGO_BUILD_VER@"
|
||||
|
||||
// Legacy defines below
|
||||
#cmakedefine LINUX
|
||||
#cmakedefine UNIX
|
||||
#ifndef HAVE_NANOSLEEP
|
||||
#cmakedefine HAVE_NANOSLEEP 1
|
||||
#endif
|
||||
#cmakedefine _BONGO_XPL_BIG_ENDIAN
|
||||
#cmakedefine _BONGO_XPL_LITTLE_ENDIAN
|
||||
#cmakedefine _BONGO_HAVE_DLFCN_H
|
||||
Executable
+571
@@ -0,0 +1,571 @@
|
||||
#! /bin/sh
|
||||
# Output a system dependent set of variables, describing how to set the
|
||||
# run time search path of shared libraries in an executable.
|
||||
#
|
||||
# Copyright 1996-2005 Free Software Foundation, Inc.
|
||||
# Taken from GNU libtool, 2001
|
||||
# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
|
||||
#
|
||||
# This file is free software; the Free Software Foundation gives
|
||||
# unlimited permission to copy and/or distribute it, with or without
|
||||
# modifications, as long as this notice is preserved.
|
||||
#
|
||||
# The first argument passed to this file is the canonical host specification,
|
||||
# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
|
||||
# or
|
||||
# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
|
||||
# The environment variables CC, GCC, LDFLAGS, LD, with_gnu_ld
|
||||
# should be set by the caller.
|
||||
#
|
||||
# The set of defined variables is at the end of this script.
|
||||
|
||||
# Known limitations:
|
||||
# - On IRIX 6.5 with CC="cc", the run time search patch must not be longer
|
||||
# than 256 bytes, otherwise the compiler driver will dump core. The only
|
||||
# known workaround is to choose shorter directory names for the build
|
||||
# directory and/or the installation directory.
|
||||
|
||||
# All known linkers require a `.a' archive for static linking (except M$VC,
|
||||
# which needs '.lib').
|
||||
libext=a
|
||||
shrext=.so
|
||||
|
||||
host="$1"
|
||||
host_cpu=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
|
||||
host_vendor=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
|
||||
host_os=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
|
||||
|
||||
cc_basename=`echo "$CC" | sed -e 's%^.*/%%'`
|
||||
|
||||
# Code taken from libtool.m4's AC_LIBTOOL_PROG_COMPILER_PIC.
|
||||
|
||||
wl=
|
||||
if test "$GCC" = yes; then
|
||||
wl='-Wl,'
|
||||
else
|
||||
case "$host_os" in
|
||||
aix*)
|
||||
wl='-Wl,'
|
||||
;;
|
||||
darwin*)
|
||||
case "$cc_basename" in
|
||||
xlc*)
|
||||
wl='-Wl,'
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
mingw* | pw32* | os2*)
|
||||
;;
|
||||
hpux9* | hpux10* | hpux11*)
|
||||
wl='-Wl,'
|
||||
;;
|
||||
irix5* | irix6* | nonstopux*)
|
||||
wl='-Wl,'
|
||||
;;
|
||||
newsos6)
|
||||
;;
|
||||
linux*)
|
||||
case $cc_basename in
|
||||
icc* | ecc*)
|
||||
wl='-Wl,'
|
||||
;;
|
||||
pgcc | pgf77 | pgf90)
|
||||
wl='-Wl,'
|
||||
;;
|
||||
ccc*)
|
||||
wl='-Wl,'
|
||||
;;
|
||||
como)
|
||||
wl='-lopt='
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
osf3* | osf4* | osf5*)
|
||||
wl='-Wl,'
|
||||
;;
|
||||
sco3.2v5*)
|
||||
;;
|
||||
solaris*)
|
||||
wl='-Wl,'
|
||||
;;
|
||||
sunos4*)
|
||||
wl='-Qoption ld '
|
||||
;;
|
||||
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
|
||||
wl='-Wl,'
|
||||
;;
|
||||
sysv4*MP*)
|
||||
;;
|
||||
unicos*)
|
||||
wl='-Wl,'
|
||||
;;
|
||||
uts4*)
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
# Code taken from libtool.m4's AC_LIBTOOL_PROG_LD_SHLIBS.
|
||||
|
||||
hardcode_libdir_flag_spec=
|
||||
hardcode_libdir_separator=
|
||||
hardcode_direct=no
|
||||
hardcode_minus_L=no
|
||||
|
||||
case "$host_os" in
|
||||
cygwin* | mingw* | pw32*)
|
||||
# FIXME: the MSVC++ port hasn't been tested in a loooong time
|
||||
# When not using gcc, we currently assume that we are using
|
||||
# Microsoft Visual C++.
|
||||
if test "$GCC" != yes; then
|
||||
with_gnu_ld=no
|
||||
fi
|
||||
;;
|
||||
openbsd*)
|
||||
with_gnu_ld=no
|
||||
;;
|
||||
esac
|
||||
|
||||
ld_shlibs=yes
|
||||
if test "$with_gnu_ld" = yes; then
|
||||
case "$host_os" in
|
||||
aix3* | aix4* | aix5*)
|
||||
# On AIX/PPC, the GNU linker is very broken
|
||||
if test "$host_cpu" != ia64; then
|
||||
ld_shlibs=no
|
||||
fi
|
||||
;;
|
||||
amigaos*)
|
||||
hardcode_libdir_flag_spec='-L$libdir'
|
||||
hardcode_minus_L=yes
|
||||
# Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
|
||||
# that the semantics of dynamic libraries on AmigaOS, at least up
|
||||
# to version 4, is to share data among multiple programs linked
|
||||
# with the same dynamic library. Since this doesn't match the
|
||||
# behavior of shared libraries on other platforms, we cannot use
|
||||
# them.
|
||||
ld_shlibs=no
|
||||
;;
|
||||
beos*)
|
||||
if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
|
||||
:
|
||||
else
|
||||
ld_shlibs=no
|
||||
fi
|
||||
;;
|
||||
cygwin* | mingw* | pw32*)
|
||||
# hardcode_libdir_flag_spec is actually meaningless, as there is
|
||||
# no search path for DLLs.
|
||||
hardcode_libdir_flag_spec='-L$libdir'
|
||||
if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
|
||||
:
|
||||
else
|
||||
ld_shlibs=no
|
||||
fi
|
||||
;;
|
||||
netbsd*)
|
||||
;;
|
||||
solaris* | sysv5*)
|
||||
if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
|
||||
ld_shlibs=no
|
||||
elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
|
||||
:
|
||||
else
|
||||
ld_shlibs=no
|
||||
fi
|
||||
;;
|
||||
sunos4*)
|
||||
hardcode_direct=yes
|
||||
;;
|
||||
linux*)
|
||||
if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
|
||||
:
|
||||
else
|
||||
ld_shlibs=no
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
|
||||
:
|
||||
else
|
||||
ld_shlibs=no
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
if test "$ld_shlibs" = yes; then
|
||||
# Unlike libtool, we use -rpath here, not --rpath, since the documented
|
||||
# option of GNU ld is called -rpath, not --rpath.
|
||||
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
|
||||
fi
|
||||
else
|
||||
case "$host_os" in
|
||||
aix3*)
|
||||
# Note: this linker hardcodes the directories in LIBPATH if there
|
||||
# are no directories specified by -L.
|
||||
hardcode_minus_L=yes
|
||||
if test "$GCC" = yes; then
|
||||
# Neither direct hardcoding nor static linking is supported with a
|
||||
# broken collect2.
|
||||
hardcode_direct=unsupported
|
||||
fi
|
||||
;;
|
||||
aix4* | aix5*)
|
||||
if test "$host_cpu" = ia64; then
|
||||
# On IA64, the linker does run time linking by default, so we don't
|
||||
# have to do anything special.
|
||||
aix_use_runtimelinking=no
|
||||
else
|
||||
aix_use_runtimelinking=no
|
||||
# Test if we are trying to use run time linking or normal
|
||||
# AIX style linking. If -brtl is somewhere in LDFLAGS, we
|
||||
# need to do runtime linking.
|
||||
case $host_os in aix4.[23]|aix4.[23].*|aix5*)
|
||||
for ld_flag in $LDFLAGS; do
|
||||
if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
|
||||
aix_use_runtimelinking=yes
|
||||
break
|
||||
fi
|
||||
done
|
||||
esac
|
||||
fi
|
||||
hardcode_direct=yes
|
||||
hardcode_libdir_separator=':'
|
||||
if test "$GCC" = yes; then
|
||||
case $host_os in aix4.[012]|aix4.[012].*)
|
||||
collect2name=`${CC} -print-prog-name=collect2`
|
||||
if test -f "$collect2name" && \
|
||||
strings "$collect2name" | grep resolve_lib_name >/dev/null
|
||||
then
|
||||
# We have reworked collect2
|
||||
hardcode_direct=yes
|
||||
else
|
||||
# We have old collect2
|
||||
hardcode_direct=unsupported
|
||||
hardcode_minus_L=yes
|
||||
hardcode_libdir_flag_spec='-L$libdir'
|
||||
hardcode_libdir_separator=
|
||||
fi
|
||||
esac
|
||||
fi
|
||||
# Begin _LT_AC_SYS_LIBPATH_AIX.
|
||||
echo 'int main () { return 0; }' > conftest.c
|
||||
${CC} ${LDFLAGS} conftest.c -o conftest
|
||||
aix_libpath=`dump -H conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
|
||||
}'`
|
||||
if test -z "$aix_libpath"; then
|
||||
aix_libpath=`dump -HX64 conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
|
||||
}'`
|
||||
fi
|
||||
if test -z "$aix_libpath"; then
|
||||
aix_libpath="/usr/lib:/lib"
|
||||
fi
|
||||
rm -f conftest.c conftest
|
||||
# End _LT_AC_SYS_LIBPATH_AIX.
|
||||
if test "$aix_use_runtimelinking" = yes; then
|
||||
hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
|
||||
else
|
||||
if test "$host_cpu" = ia64; then
|
||||
hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
|
||||
else
|
||||
hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
amigaos*)
|
||||
hardcode_libdir_flag_spec='-L$libdir'
|
||||
hardcode_minus_L=yes
|
||||
# see comment about different semantics on the GNU ld section
|
||||
ld_shlibs=no
|
||||
;;
|
||||
bsdi[45]*)
|
||||
;;
|
||||
cygwin* | mingw* | pw32*)
|
||||
# When not using gcc, we currently assume that we are using
|
||||
# Microsoft Visual C++.
|
||||
# hardcode_libdir_flag_spec is actually meaningless, as there is
|
||||
# no search path for DLLs.
|
||||
hardcode_libdir_flag_spec=' '
|
||||
libext=lib
|
||||
;;
|
||||
darwin* | rhapsody*)
|
||||
hardcode_direct=no
|
||||
if test "$GCC" = yes ; then
|
||||
:
|
||||
else
|
||||
case "$cc_basename" in
|
||||
xlc*)
|
||||
;;
|
||||
*)
|
||||
ld_shlibs=no
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
;;
|
||||
dgux*)
|
||||
hardcode_libdir_flag_spec='-L$libdir'
|
||||
;;
|
||||
freebsd1*)
|
||||
ld_shlibs=no
|
||||
;;
|
||||
freebsd2.2*)
|
||||
hardcode_libdir_flag_spec='-R$libdir'
|
||||
hardcode_direct=yes
|
||||
;;
|
||||
freebsd2*)
|
||||
hardcode_direct=yes
|
||||
hardcode_minus_L=yes
|
||||
;;
|
||||
freebsd* | kfreebsd*-gnu | dragonfly*)
|
||||
hardcode_libdir_flag_spec='-R$libdir'
|
||||
hardcode_direct=yes
|
||||
;;
|
||||
hpux9*)
|
||||
hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
|
||||
hardcode_libdir_separator=:
|
||||
hardcode_direct=yes
|
||||
# hardcode_minus_L: Not really in the search PATH,
|
||||
# but as the default location of the library.
|
||||
hardcode_minus_L=yes
|
||||
;;
|
||||
hpux10* | hpux11*)
|
||||
if test "$with_gnu_ld" = no; then
|
||||
case "$host_cpu" in
|
||||
hppa*64*)
|
||||
hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
|
||||
hardcode_libdir_separator=:
|
||||
hardcode_direct=no
|
||||
;;
|
||||
ia64*)
|
||||
hardcode_libdir_flag_spec='-L$libdir'
|
||||
hardcode_direct=no
|
||||
# hardcode_minus_L: Not really in the search PATH,
|
||||
# but as the default location of the library.
|
||||
hardcode_minus_L=yes
|
||||
;;
|
||||
*)
|
||||
hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
|
||||
hardcode_libdir_separator=:
|
||||
hardcode_direct=yes
|
||||
# hardcode_minus_L: Not really in the search PATH,
|
||||
# but as the default location of the library.
|
||||
hardcode_minus_L=yes
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
;;
|
||||
irix5* | irix6* | nonstopux*)
|
||||
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
|
||||
hardcode_libdir_separator=:
|
||||
;;
|
||||
netbsd*)
|
||||
hardcode_libdir_flag_spec='-R$libdir'
|
||||
hardcode_direct=yes
|
||||
;;
|
||||
newsos6)
|
||||
hardcode_direct=yes
|
||||
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
|
||||
hardcode_libdir_separator=:
|
||||
;;
|
||||
openbsd*)
|
||||
hardcode_direct=yes
|
||||
if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
|
||||
hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
|
||||
else
|
||||
case "$host_os" in
|
||||
openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
|
||||
hardcode_libdir_flag_spec='-R$libdir'
|
||||
;;
|
||||
*)
|
||||
hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
;;
|
||||
os2*)
|
||||
hardcode_libdir_flag_spec='-L$libdir'
|
||||
hardcode_minus_L=yes
|
||||
;;
|
||||
osf3*)
|
||||
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
|
||||
hardcode_libdir_separator=:
|
||||
;;
|
||||
osf4* | osf5*)
|
||||
if test "$GCC" = yes; then
|
||||
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
|
||||
else
|
||||
# Both cc and cxx compiler support -rpath directly
|
||||
hardcode_libdir_flag_spec='-rpath $libdir'
|
||||
fi
|
||||
hardcode_libdir_separator=:
|
||||
;;
|
||||
sco3.2v5*)
|
||||
;;
|
||||
solaris*)
|
||||
hardcode_libdir_flag_spec='-R$libdir'
|
||||
;;
|
||||
sunos4*)
|
||||
hardcode_libdir_flag_spec='-L$libdir'
|
||||
hardcode_direct=yes
|
||||
hardcode_minus_L=yes
|
||||
;;
|
||||
sysv4)
|
||||
case $host_vendor in
|
||||
sni)
|
||||
hardcode_direct=yes # is this really true???
|
||||
;;
|
||||
siemens)
|
||||
hardcode_direct=no
|
||||
;;
|
||||
motorola)
|
||||
hardcode_direct=no #Motorola manual says yes, but my tests say they lie
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
sysv4.3*)
|
||||
;;
|
||||
sysv4*MP*)
|
||||
if test -d /usr/nec; then
|
||||
ld_shlibs=yes
|
||||
fi
|
||||
;;
|
||||
sysv4.2uw2*)
|
||||
hardcode_direct=yes
|
||||
hardcode_minus_L=no
|
||||
;;
|
||||
sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[78]* | unixware7*)
|
||||
;;
|
||||
sysv5*)
|
||||
hardcode_libdir_flag_spec=
|
||||
;;
|
||||
uts4*)
|
||||
hardcode_libdir_flag_spec='-L$libdir'
|
||||
;;
|
||||
*)
|
||||
ld_shlibs=no
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
# Check dynamic linker characteristics
|
||||
# Code taken from libtool.m4's AC_LIBTOOL_SYS_DYNAMIC_LINKER.
|
||||
libname_spec='lib$name'
|
||||
case "$host_os" in
|
||||
aix3*)
|
||||
;;
|
||||
aix4* | aix5*)
|
||||
;;
|
||||
amigaos*)
|
||||
;;
|
||||
beos*)
|
||||
;;
|
||||
bsdi[45]*)
|
||||
;;
|
||||
cygwin* | mingw* | pw32*)
|
||||
shrext=.dll
|
||||
;;
|
||||
darwin* | rhapsody*)
|
||||
shrext=.dylib
|
||||
;;
|
||||
dgux*)
|
||||
;;
|
||||
freebsd1*)
|
||||
;;
|
||||
kfreebsd*-gnu)
|
||||
;;
|
||||
freebsd*)
|
||||
;;
|
||||
gnu*)
|
||||
;;
|
||||
hpux9* | hpux10* | hpux11*)
|
||||
case "$host_cpu" in
|
||||
ia64*)
|
||||
shrext=.so
|
||||
;;
|
||||
hppa*64*)
|
||||
shrext=.sl
|
||||
;;
|
||||
*)
|
||||
shrext=.sl
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
irix5* | irix6* | nonstopux*)
|
||||
case "$host_os" in
|
||||
irix5* | nonstopux*)
|
||||
libsuff= shlibsuff=
|
||||
;;
|
||||
*)
|
||||
case $LD in
|
||||
*-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= ;;
|
||||
*-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 ;;
|
||||
*-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 ;;
|
||||
*) libsuff= shlibsuff= ;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
linux*oldld* | linux*aout* | linux*coff*)
|
||||
;;
|
||||
linux*)
|
||||
;;
|
||||
knetbsd*-gnu)
|
||||
;;
|
||||
netbsd*)
|
||||
;;
|
||||
newsos6)
|
||||
;;
|
||||
nto-qnx*)
|
||||
;;
|
||||
openbsd*)
|
||||
;;
|
||||
os2*)
|
||||
libname_spec='$name'
|
||||
shrext=.dll
|
||||
;;
|
||||
osf3* | osf4* | osf5*)
|
||||
;;
|
||||
sco3.2v5*)
|
||||
;;
|
||||
solaris*)
|
||||
;;
|
||||
sunos4*)
|
||||
;;
|
||||
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
|
||||
;;
|
||||
sysv4*MP*)
|
||||
;;
|
||||
uts4*)
|
||||
;;
|
||||
esac
|
||||
|
||||
sed_quote_subst='s/\(["`$\\]\)/\\\1/g'
|
||||
escaped_wl=`echo "X$wl" | sed -e 's/^X//' -e "$sed_quote_subst"`
|
||||
shlibext=`echo "$shrext" | sed -e 's,^\.,,'`
|
||||
escaped_hardcode_libdir_flag_spec=`echo "X$hardcode_libdir_flag_spec" | sed -e 's/^X//' -e "$sed_quote_subst"`
|
||||
|
||||
LC_ALL=C sed -e 's/^\([a-zA-Z0-9_]*\)=/acl_cv_\1=/' <<EOF
|
||||
|
||||
# How to pass a linker flag through the compiler.
|
||||
wl="$escaped_wl"
|
||||
|
||||
# Static library suffix (normally "a").
|
||||
libext="$libext"
|
||||
|
||||
# Shared library suffix (normally "so").
|
||||
shlibext="$shlibext"
|
||||
|
||||
# Flag to hardcode \$libdir into a binary during linking.
|
||||
# This must work even if \$libdir does not exist.
|
||||
hardcode_libdir_flag_spec="$escaped_hardcode_libdir_flag_spec"
|
||||
|
||||
# Whether we need a single -rpath flag with a separated argument.
|
||||
hardcode_libdir_separator="$hardcode_libdir_separator"
|
||||
|
||||
# Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
|
||||
# resulting binary.
|
||||
hardcode_direct="$hardcode_direct"
|
||||
|
||||
# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
|
||||
# resulting binary.
|
||||
hardcode_minus_L="$hardcode_minus_L"
|
||||
|
||||
EOF
|
||||
+730
@@ -0,0 +1,730 @@
|
||||
dnl -*- mode: m4 -*-
|
||||
AC_PREREQ(2.52)
|
||||
|
||||
AC_INIT(src/libs/msgapi/msgapi.c)
|
||||
|
||||
AM_INIT_AUTOMAKE(bongo, 0.1.0)
|
||||
|
||||
# this space is here to trick autogen.sh
|
||||
AM_GNU_GETTEXT([external])
|
||||
AM_CONDITIONAL(USE_NLS,test "$USE_NLS" = "yes")
|
||||
|
||||
AM_CONFIG_HEADER(config.h)
|
||||
AX_PREFIX_CONFIG_H([include/bongo-config.h], _BONGO, [config.h])
|
||||
|
||||
# Honor aclocal flags
|
||||
ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS"
|
||||
|
||||
GETTEXT_PACKAGE=bongo
|
||||
AC_SUBST(GETTEXT_PACKAGE)
|
||||
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE",[The name of the gettext domain])
|
||||
|
||||
## must come before we use the $USE_MAINTAINER_MODE variable later
|
||||
AM_MAINTAINER_MODE
|
||||
|
||||
AC_PROG_CC
|
||||
AM_PROG_CC_C_O
|
||||
AC_PROG_CXX
|
||||
AC_ISC_POSIX
|
||||
AC_HEADER_STDC
|
||||
AC_C_BIGENDIAN
|
||||
|
||||
# Check taken from glib
|
||||
AC_MSG_CHECKING(for the suffix of shared libraries)
|
||||
case "$host_os" in
|
||||
hpux9* | hpux10* | hpux11*) # taken from ltconfig
|
||||
glib_gmodule_suffix='sl'
|
||||
;;
|
||||
cygwin* | mingw*)
|
||||
glib_gmodule_suffix='dll'
|
||||
;;
|
||||
aix*)
|
||||
glib_gmodule_suffix='a'
|
||||
;;
|
||||
*)
|
||||
glib_gmodule_suffix='so'
|
||||
;;
|
||||
esac
|
||||
AC_MSG_RESULT(.$glib_gmodule_suffix)
|
||||
SHARED_POSTFIX=".$glib_gmodule_suffix"
|
||||
AC_SUBST(SHARED_POSTFIX)
|
||||
|
||||
#### gcc warning flags
|
||||
|
||||
NO_POINTER_SIGN_WARNINGS=
|
||||
|
||||
if test "x$GCC" = "xyes"; then
|
||||
changequote(,)dnl
|
||||
case " $CFLAGS " in
|
||||
*[\ \ ]-Wall[\ \ ]*) ;;
|
||||
*) CFLAGS="$CFLAGS -Wall" ;;
|
||||
esac
|
||||
|
||||
case " $CFLAGS " in
|
||||
*[\ \ ]-Wchar-subscripts[\ \ ]*) ;;
|
||||
*) CFLAGS="$CFLAGS -Wchar-subscripts" ;;
|
||||
esac
|
||||
|
||||
case " $CFLAGS " in
|
||||
*[\ \ ]-Wmissing-declarations[\ \ ]*) ;;
|
||||
*) CFLAGS="$CFLAGS -Wmissing-declarations" ;;
|
||||
esac
|
||||
|
||||
case " $CFLAGS " in
|
||||
*[\ \ ]-Wmissing-prototypes[\ \ ]*) ;;
|
||||
*) CFLAGS="$CFLAGS -Wmissing-prototypes" ;;
|
||||
esac
|
||||
|
||||
case " $CFLAGS " in
|
||||
*[\ \ ]-Wnested-externs[\ \ ]*) ;;
|
||||
*) CFLAGS="$CFLAGS -Wnested-externs" ;;
|
||||
esac
|
||||
|
||||
case " $CFLAGS " in
|
||||
*[\ \ ]-Wpointer-arith[\ \ ]*) ;;
|
||||
*) CFLAGS="$CFLAGS -Wpointer-arith" ;;
|
||||
esac
|
||||
|
||||
case " $CFLAGS " in
|
||||
*[\ \ ]-Wcast-align[\ \ ]*) ;;
|
||||
*) CFLAGS="$CFLAGS -Wcast-align" ;;
|
||||
esac
|
||||
|
||||
case " $CFLAGS " in
|
||||
*[\ \ ]-Wsign-compare[\ \ ]*) ;;
|
||||
*) CFLAGS="$CFLAGS -Wsign-compare" ;;
|
||||
esac
|
||||
|
||||
if test "x$enable_ansi" = "xyes"; then
|
||||
case " $CFLAGS " in
|
||||
*[\ \ ]-ansi[\ \ ]*) ;;
|
||||
*) CFLAGS="$CFLAGS -ansi" ;;
|
||||
esac
|
||||
|
||||
case " $CFLAGS " in
|
||||
*[\ \ ]-D_POSIX_C_SOURCE*) ;;
|
||||
*) CFLAGS="$CFLAGS -D_POSIX_C_SOURCE=199309L" ;;
|
||||
esac
|
||||
|
||||
case " $CFLAGS " in
|
||||
*[\ \ ]-D_BSD_SOURCE[\ \ ]*) ;;
|
||||
*) CFLAGS="$CFLAGS -D_BSD_SOURCE" ;;
|
||||
esac
|
||||
|
||||
case " $CFLAGS " in
|
||||
*[\ \ ]-pedantic[\ \ ]*) ;;
|
||||
*) CFLAGS="$CFLAGS -pedantic" ;;
|
||||
esac
|
||||
fi
|
||||
if test x$enable_gcov = xyes; then
|
||||
case " $CFLAGS " in
|
||||
*[\ \ ]-fprofile-arcs[\ \ ]*) ;;
|
||||
*) CFLAGS="$CFLAGS -fprofile-arcs" ;;
|
||||
esac
|
||||
case " $CFLAGS " in
|
||||
*[\ \ ]-ftest-coverage[\ \ ]*) ;;
|
||||
*) CFLAGS="$CFLAGS -ftest-coverage" ;;
|
||||
esac
|
||||
|
||||
## remove optimization
|
||||
CFLAGS=`echo "$CFLAGS" | sed -e 's/-O[0-9]*//g'`
|
||||
fi
|
||||
|
||||
if test -z "$ac_cv_prog_CC"; then
|
||||
our_gcc="$CC"
|
||||
else
|
||||
our_gcc="$ac_cv_prog_CC"
|
||||
fi
|
||||
case `$our_gcc --version | sed -e 's,\..*,.,' -e q` in
|
||||
*4.) NO_POINTER_SIGN_WARNINGS=-Wno-pointer-sign ;;
|
||||
*) NO_POINTER_SIGN_WARNINGS="" ;;
|
||||
esac
|
||||
|
||||
changequote([,])dnl
|
||||
fi
|
||||
|
||||
AC_SUBST(NO_POINTER_SIGN_WARNINGS)
|
||||
|
||||
AM_PROG_LIBTOOL
|
||||
|
||||
#
|
||||
# Make libtool use --silent when --silent is passed to make
|
||||
#
|
||||
changequote(,)dnl
|
||||
LIBTOOL="${LIBTOOL} \$(shell echo \"\$(MFLAGS)\" | awk '/^[^ ]*s/ { print \"--silent\" }')"
|
||||
changequote([,])dnl
|
||||
|
||||
AC_DEFINE_UNQUOTED(LINUX, "1", [Badly named building-under-autoconf variable])
|
||||
|
||||
#####3 Directory management - from dbus' configure.in
|
||||
|
||||
#### Have to go $localstatedir->$prefix/var->/usr/local/var
|
||||
#### someone please fix this a better way...
|
||||
|
||||
#### find the actual value for $prefix that we'll end up with
|
||||
## (I know this is broken and should be done in the Makefile, but
|
||||
## that's a major pain and almost nobody actually seems to care)
|
||||
REAL_PREFIX=
|
||||
if test "x$prefix" = "xNONE"; then
|
||||
REAL_PREFIX=$ac_default_prefix
|
||||
else
|
||||
REAL_PREFIX=$prefix
|
||||
fi
|
||||
|
||||
## temporarily change prefix and exec_prefix
|
||||
old_prefix=$prefix
|
||||
prefix=$REAL_PREFIX
|
||||
|
||||
if test "x$exec_prefix" = xNONE ; then
|
||||
REAL_EXEC_PREFIX=$REAL_PREFIX
|
||||
else
|
||||
REAL_EXEC_PREFIX=$exec_prefix
|
||||
fi
|
||||
old_exec_prefix=$exec_prefix
|
||||
exec_prefix=$REAL_EXEC_PREFIX
|
||||
|
||||
## eval everything
|
||||
LOCALSTATEDIR_TMP="$localstatedir"
|
||||
EXPANDED_LOCALSTATEDIR=`eval echo $LOCALSTATEDIR_TMP`
|
||||
AC_SUBST(EXPANDED_LOCALSTATEDIR)
|
||||
|
||||
PKGLIBEXECDIR_TMP="$libexecdir/$PACKAGE"
|
||||
EXPANDED_PKGLIBEXECDIR=`eval echo $PKGLIBEXECDIR_TMP`
|
||||
AC_SUBST(EXPANDED_PKGLIBEXECDIR)
|
||||
|
||||
# hack. $datadir by default doesn't get expanded, you're supposed to
|
||||
# fiddle with it at make time, not configure. See autoconf manual,
|
||||
# "Installation Directory Variables"
|
||||
#DATADIR_TMP="$datadir"
|
||||
DATADIR_TMP="$prefix/share"
|
||||
EXPANDED_DATADIR=`eval echo $DATADIR_TMP`
|
||||
AC_SUBST(EXPANDED_DATADIR)
|
||||
|
||||
SYSCONFDIR_TMP="$sysconfdir"
|
||||
EXPANDED_SYSCONFDIR=`eval echo $SYSCONFDIR_TMP`
|
||||
AC_SUBST(EXPANDED_SYSCONFDIR)
|
||||
|
||||
BINDIR_TMP="$bindir"
|
||||
EXPANDED_BINDIR=`eval echo $BINDIR_TMP`
|
||||
AC_SUBST(EXPANDED_BINDIR)
|
||||
|
||||
SBINDIR_TMP="$sbindir"
|
||||
EXPANDED_SBINDIR=`eval echo $SBINDIR_TMP`
|
||||
AC_SUBST(EXPANDED_SBINDIR)
|
||||
|
||||
LIBDIR_TMP="$libdir"
|
||||
EXPANDED_LIBDIR=`eval echo $LIBDIR_TMP`
|
||||
AC_SUBST(EXPANDED_LIBDIR)
|
||||
|
||||
## put prefix and exec_prefix back
|
||||
prefix=$old_prefix
|
||||
exec_prefix=$old_exec_prefix
|
||||
|
||||
### Paths
|
||||
|
||||
XPL_DEFAULT_DATA_DIR=${EXPANDED_DATADIR}/bongo
|
||||
AC_SUBST(XPL_DEFAULT_DATA_DIR)
|
||||
AC_DEFINE_UNQUOTED(XPL_DEFAULT_DATA_DIR, "$XPL_DEFAULT_DATA_DIR", [Default data directory])
|
||||
|
||||
XPL_DEFAULT_STATE_DIR=${EXPANDED_LOCALSTATEDIR}/bongo
|
||||
AC_SUBST(XPL_DEFAULT_STATE_DIR)
|
||||
AC_DEFINE_UNQUOTED(XPL_DEFAULT_STATE_DIR, "$XPL_DEFAULT_STATE_DIR", [Default state directory])
|
||||
|
||||
XPL_DEFAULT_WORK_DIR=${XPL_DEFAULT_STATE_DIR}/work
|
||||
AC_SUBST(XPL_DEFAULT_WORK_DIR)
|
||||
AC_DEFINE_UNQUOTED(XPL_DEFAULT_WORK_DIR, "$XPL_DEFAULT_WORK_DIR", [Default work directory])
|
||||
|
||||
XPL_DEFAULT_DBF_DIR=${XPL_DEFAULT_STATE_DIR}/dbf
|
||||
AC_SUBST(XPL_DEFAULT_DBF_DIR)
|
||||
AC_DEFINE_UNQUOTED(XPL_DEFAULT_DBF_DIR, "$XPL_DEFAULT_DBF_DIR", [Default dbf directory])
|
||||
|
||||
XPL_DEFAULT_CACHE_DIR=${XPL_DEFAULT_STATE_DIR}/cache
|
||||
AC_SUBST(XPL_DEFAULT_CACHE_DIR)
|
||||
AC_DEFINE_UNQUOTED(XPL_DEFAULT_CACHE_DIR, "$XPL_DEFAULT_CACHE_DIR", [Default cache directory])
|
||||
|
||||
XPL_DEFAULT_BIN_DIR=${EXPANDED_SBINDIR}
|
||||
AC_SUBST(XPL_DEFAULT_BIN_DIR)
|
||||
AC_DEFINE_UNQUOTED(XPL_DEFAULT_BIN_DIR, "$XPL_DEFAULT_BIN_DIR", [Default binary directory])
|
||||
|
||||
XPL_DEFAULT_LIB_DIR=${EXPANDED_LIBDIR}
|
||||
AC_SUBST(XPL_DEFAULT_LIB_DIR)
|
||||
AC_DEFINE_UNQUOTED(XPL_DEFAULT_LIB_DIR, "$XPL_DEFAULT_LIB_DIR", [Default library directory])
|
||||
|
||||
XPL_DEFAULT_CONF_DIR=${EXPANDED_SYSCONFDIR}/bongo
|
||||
AC_SUBST(XPL_DEFAULT_CONF_DIR)
|
||||
AC_DEFINE_UNQUOTED(XPL_DEFAULT_CONF_DIR, "$XPL_DEFAULT_CONF_DIR", [Default config directory])
|
||||
|
||||
XPL_DEFAULT_NLS_DIR=${EXPANDED_DATADIR}/bongo/nls
|
||||
AC_SUBST(XPL_DEFAULT_NLS_DIR)
|
||||
AC_DEFINE_UNQUOTED(XPL_DEFAULT_NLS_DIR, "$XPL_DEFAULT_NLS_DIR", [Default nls directory])
|
||||
|
||||
XPL_DEFAULT_SCMS_DIR=${XPL_DEFAULT_STATE_DIR}/scms
|
||||
AC_SUBST(XPL_DEFAULT_SCMS_DIR)
|
||||
AC_DEFINE_UNQUOTED(XPL_DEFAULT_SCMS_DIR, "$XPL_DEFAULT_SCMS_DIR", [Default scms directory])
|
||||
|
||||
XPL_DEFAULT_SPOOL_DIR=${XPL_DEFAULT_STATE_DIR}/spool
|
||||
AC_SUBST(XPL_DEFAULT_SPOOL_DIR)
|
||||
AC_DEFINE_UNQUOTED(XPL_DEFAULT_SPOOL_DIR, "$XPL_DEFAULT_SPOOL_DIR", [Default spool directory])
|
||||
|
||||
XPL_DEFAULT_STORE_SYSTEM_DIR=${XPL_DEFAULT_STATE_DIR}/system
|
||||
AC_SUBST(XPL_DEFAULT_STORE_SYSTEM_DIR)
|
||||
AC_DEFINE_UNQUOTED(XPL_DEFAULT_STORE_SYSTEM_DIR, "$XPL_DEFAULT_STORE_SYSTEM_DIR", [Default store system directory])
|
||||
|
||||
XPL_DEFAULT_MAIL_DIR=${XPL_DEFAULT_STATE_DIR}/users
|
||||
AC_SUBST(XPL_DEFAULT_MAIL_DIR)
|
||||
AC_DEFINE_UNQUOTED(XPL_DEFAULT_MAIL_DIR, "$XPL_DEFAULT_MAIL_DIR", [Default mail directory])
|
||||
|
||||
XPL_DEFAULT_CERT_PATH=${XPL_DEFAULT_STATE_DIR}/dbf/osslcert.pem
|
||||
AC_SUBST(XPL_DEFAULT_CERT_PATH)
|
||||
AC_DEFINE_UNQUOTED(XPL_DEFAULT_CERT_PATH, "$XPL_DEFAULT_CERT_PATH", [Default cert path])
|
||||
|
||||
XPL_DEFAULT_RSAPARAMS_PATH=${XPL_DEFAULT_STATE_DIR}/dbf/rsaparams.pem
|
||||
AC_SUBST(XPL_DEFAULT_RSAPARAMS_PATH)
|
||||
AC_DEFINE_UNQUOTED(XPL_DEFAULT_RSAPARAMS_PATH, "$XPL_DEFAULT_RSAPARAMS_PATH", [Default path for RSA parameters])
|
||||
|
||||
XPL_DEFAULT_DHPARAMS_PATH=${XPL_DEFAULT_STATE_DIR}/dbf/dhparams.pem
|
||||
AC_SUBST(XPL_DEFAULT_DHPARAMS_PATH)
|
||||
AC_DEFINE_UNQUOTED(XPL_DEFAULT_DHPARAMS_PATH, "$XPL_DEFAULT_DHPARAMS_PATH", [Default path for DH parameters])
|
||||
|
||||
XPL_DEFAULT_RANDSEED_PATH=${XPL_DEFAULT_STATE_DIR}/dbf/randomseed
|
||||
AC_SUBST(XPL_DEFAULT_RANDSEED_PATH)
|
||||
AC_DEFINE_UNQUOTED(XPL_DEFAULT_RANDSEED_PATH, "$XPL_DEFAULT_RANDSEED_PATH", [Default path for seed to RNG])
|
||||
|
||||
XPL_DEFAULT_KEY_PATH=${XPL_DEFAULT_STATE_DIR}/dbf/osslpriv.pem
|
||||
AC_SUBST(XPL_DEFAULT_KEY_PATH)
|
||||
AC_DEFINE_UNQUOTED(XPL_DEFAULT_KEY_PATH, "$XPL_DEFAULT_KEY_PATH", [Default key path])
|
||||
|
||||
SAVE_LIBS=$LIBS
|
||||
LIBS=
|
||||
|
||||
AC_CHECK_LIB(resolv, res_init,
|
||||
[],
|
||||
[
|
||||
AC_CHECK_LIB(resolv, __res_init)
|
||||
]
|
||||
)
|
||||
|
||||
RESOLV_LIBS=$LIBS
|
||||
LIBS=$SAVE_LIBS
|
||||
|
||||
AC_SUBST(RESOLV_LIBS)
|
||||
|
||||
have_ldap="no"
|
||||
AC_CHECK_HEADER(ldap.h,[
|
||||
AC_CHECK_LIB(ldap, ldap_init,[
|
||||
LDAP_LIBS="-lldap"
|
||||
have_ldap="yes"
|
||||
])
|
||||
])
|
||||
AM_CONDITIONAL(HAVE_LDAP,test "$have_ldap" = "yes")
|
||||
AC_SUBST(LDAP_LIBS)
|
||||
|
||||
AM_PROG_LEX
|
||||
AC_PROG_YACC
|
||||
|
||||
AC_CHECK_FUNCS(strcasecmp strncasecmp stricmp strnicmp gettimeofday vsnprintf _vsnprintf consoleprintf ungetcharacter RingTheBell dlopen dlsym _commit fsync FEFlushWrite dos2calendar _ConvertDOSTimeToCalendar delay statfs statvfs getpwnam_r snprintf _snprintf gmtime_r localtime_r usleep nanosleep)
|
||||
|
||||
AC_CHECK_HEADERS(syslog.h sys/param.h sys/sys/mount.h semaphore.h sys/socket.h netinet/in.h resolv.h sys/sysinfo.h)
|
||||
|
||||
AC_CHECK_HEADERS(sys/mount.h sys/statvfs.h sys/vfs.h alloca.h)
|
||||
|
||||
AC_CHECK_DECLS([ns_c_in],,,[#include <arpa/nameser.h>])
|
||||
|
||||
ALL_CFLAGS='-I$(top_srcdir)/import/log4c -I$(top_srcdir)/import/libical/src -I$(top_builddir)/import/libical/src -I$(top_srcdir)/import/libical/src/libical -I$(top_builddir)/import/libical/src/libical'
|
||||
ALL_LIBS=
|
||||
|
||||
AC_SUBST(ALL_CFLAGS)
|
||||
AC_SUBST(ALL_LIBS)
|
||||
|
||||
DL_LIBS=
|
||||
AC_CHECK_LIB(c, dlopen, DL_LIBS="", [AC_CHECK_LIB(dl, dlopen, DL_LIBS="-ldl")])
|
||||
AC_SUBST(DL_LIBS)
|
||||
|
||||
AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
|
||||
if test "x$PKG_CONFIG" = "xno"; then
|
||||
AC_MSG_ERROR([Bongo requires pkg-config to be installed])
|
||||
fi
|
||||
|
||||
have_check=no
|
||||
AM_PATH_CHECK(0.9.0,
|
||||
[
|
||||
have_check=yes
|
||||
AC_DEFINE(BONGO_HAVE_CHECK, [], [Controls how tests that depend on check compile.])
|
||||
],
|
||||
[
|
||||
AC_MSG_WARN([The check C unit testing framework is not installed,])
|
||||
AC_MSG_WARN([or is not sufficiently up to date.])
|
||||
AC_MSG_WARN([Tests relying on it in the make check target will not run.])
|
||||
]
|
||||
)
|
||||
AM_CONDITIONAL(HAVE_CHECK, test x$have_check = xyes)
|
||||
|
||||
dnl The "manual" configuration is because a couple of old distros don't have
|
||||
dnl the GNUTLS m4 thing. Centos 4, RHEL 4, Mandriva 2006(?)
|
||||
PKG_CHECK_MODULES(GNUTLS, gnutls,
|
||||
echo Using pkg-config GNUTLS configuration,
|
||||
echo Trying to configure GNUTLS manually
|
||||
GNUTLS_LIBS="-lgnutls"
|
||||
GNUTLS_CFLAGS=""
|
||||
)
|
||||
|
||||
AM_PATH_LIBGCRYPT()
|
||||
|
||||
AM_PATH_PYTHON(2.3)
|
||||
PYTHON_INST_PREFIX=`$PYTHON -c 'import sys; print sys.prefix'`
|
||||
PYTHON_CPPFLAGS="-I$PYTHON_INST_PREFIX/include/python$PYTHON_VERSION"
|
||||
case "$host" in
|
||||
*darwin*)
|
||||
PYTHON_LIBS="-framework Python"
|
||||
;;
|
||||
*)
|
||||
# this is the correct way to find the python libdir, but
|
||||
# people should just set LDFLAGS or whatever instead:
|
||||
# PYTHON_LIBS=`$PYTHON -c 'import sys
|
||||
#try:
|
||||
# print sys.lib
|
||||
#except:
|
||||
# print "lib"
|
||||
#'`
|
||||
# PYTHON_LIBS="-L$PYTHON_INST_PREFIX/$PYTHON_LIBS -lpython$PYTHON_VERSION"
|
||||
PYTHON_LIBS="-lpython$PYTHON_VERSION"
|
||||
;;
|
||||
esac
|
||||
|
||||
LIBS_save="$LIBS"
|
||||
CPPFLAGS_save="$CPPFLAGS"
|
||||
|
||||
LIBS="$LIBS $PYTHON_LIBS"
|
||||
CPPFLAGS="$CPPFLAGS $PYTHON_CPPFLAGS"
|
||||
|
||||
have_python="no"
|
||||
AC_CHECK_FUNC(PyArg_Parse, [
|
||||
AC_CHECK_HEADERS(Python.h, [have_python="yes"])
|
||||
])
|
||||
if test x$have_python != xyes ; then
|
||||
AC_MSG_ERROR([Dragonfly requires python-devel, or python built with shared library support (--enable-shared)])
|
||||
fi
|
||||
|
||||
LIBS="$LIBS_save"
|
||||
CPPFLAGS="$CPPFLAGS_save"
|
||||
|
||||
AC_SUBST(CFLAGS_save)
|
||||
|
||||
AC_SUBST(PYTHON_LIBS)
|
||||
AC_SUBST(PYTHON_CPPFLAGS)
|
||||
|
||||
# Get a pre-expanded version of $pythondir and $top_srcdir so we can
|
||||
# substitute them into generated files
|
||||
EXPANDED_PYTHONDIR=`eval echo $pythondir`
|
||||
EXPANDED_TOP_SRCDIR=`pwd`
|
||||
AC_SUBST(EXPANDED_PYTHONDIR)
|
||||
AC_SUBST(EXPANDED_TOP_SRCDIR)
|
||||
|
||||
# Check for openldap's slapd
|
||||
AC_ARG_WITH([slapd],
|
||||
AC_HELP_STRING([--with-slapd=FILE],
|
||||
[Path to slapd binary]),
|
||||
[DEFAULT_SLAPD_PATH="$with_slapd"],
|
||||
[AC_PATH_PROG(DEFAULT_SLAPD_PATH,[slapd],[/usr/libexec/slapd],[$PATH:/sbin:/usr/sbin:/usr/libexec:/usr/lib/openldap:/usr/local/libexec])])
|
||||
|
||||
# Check for openldap's schema files
|
||||
AC_ARG_WITH([slapd-schema],
|
||||
AC_HELP_STRING([--with-slapd-schema=DIR],
|
||||
[Path to slapd schema directory]),
|
||||
[DEFAULT_SLAPD_SCHEMA_DIR=$withval],
|
||||
[
|
||||
for dir in /etc/openldap/schema /etc/ldap/schema /usr/local/etc/openldap/schema; do
|
||||
DEFAULT_SLAPD_SCHEMA_DIR="${dir}/core.schema"
|
||||
if test -e ${DEFAULT_SLAPD_SCHEMA_DIR}; then
|
||||
break 2
|
||||
fi
|
||||
done
|
||||
])
|
||||
|
||||
if echo $DEFAULT_SLAPD_SCHEMA_DIR |grep "/core.schema$" >/dev/null 2>&1; then
|
||||
DEFAULT_SLAPD_SCHEMA_DIR=`dirname $DEFAULT_SLAPD_SCHEMA_DIR`
|
||||
fi
|
||||
|
||||
AC_SUBST(DEFAULT_SLAPD_SCHEMA_DIR)
|
||||
|
||||
# Look for apache's module dir
|
||||
AC_ARG_WITH([apache-modules],
|
||||
AC_HELP_STRING([--with-apache-modules=DIR],
|
||||
[Path to apache module directory]),
|
||||
[APACHE_MOD_DIR=$withval],
|
||||
[
|
||||
for apache in apache2 apache; do
|
||||
for lib in lib64 lib; do
|
||||
APACHE_MOD_DIR="/usr/${lib}/${apache}"
|
||||
if test -d ${APACHE_MOD_DIR}; then
|
||||
break 2
|
||||
fi
|
||||
done
|
||||
done
|
||||
])
|
||||
AC_SUBST(APACHE_MOD_DIR)
|
||||
AC_MSG_CHECKING([for Apache module directory])
|
||||
AC_MSG_RESULT([$APACHE_MOD_DIR])
|
||||
|
||||
htl10n_jsfiles=
|
||||
for lang in en `sed -e "/^#/d" -e "s/#.*//" "$srcdir/po/LINGUAS"`; do
|
||||
htl10n_jsfiles="$htl10n_jsfiles src/www/l10n/$lang.js"
|
||||
done
|
||||
AC_SUBST(htl10n_jsfiles)
|
||||
|
||||
PTHREAD_CFLAGS=
|
||||
PTHREAD_LIBS=
|
||||
# Check taken from glib
|
||||
AC_MSG_NOTICE(for pthread flags)
|
||||
|
||||
PTHREAD_LIBS="-pthread -lpthread"
|
||||
|
||||
case "$host" in
|
||||
*-freebsd*)
|
||||
AC_MSG_CHECKING(FreeBSD Release Date)
|
||||
if test -x /sbin/sysctl; then
|
||||
os_version=`/sbin/sysctl -n kern.osreldate`
|
||||
else
|
||||
os_version=000000
|
||||
fi
|
||||
AC_MSG_RESULT($os_version)
|
||||
# 502102 is when libc_r switched to libpthread (aka libkse).
|
||||
if test $os_version -ge "502102"; then
|
||||
PTHREAD_CFLAGS="-pthread"
|
||||
PTHREAD_LIBS="-pthread -lpthread"
|
||||
else
|
||||
PTHREAD_CFLAGS="-pthread -D_THREAD_SAFE -D_REENTRANT"
|
||||
PTHREAD_LIBS="-pthread -lc_r"
|
||||
fi
|
||||
;;
|
||||
*darwin*)
|
||||
#As of 10.4.2, POSIX Unnamed Semaphores are not implemented, use Carbon Semaphores instead
|
||||
PTHREAD_LIBS="-lpthread -Wl,-framework -Wl,Carbon"
|
||||
PTHREAD_CFLAGS="-I/System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.framework/Headers"
|
||||
CFLAGS="$CFLAGS -DMACOSX -I/opt/local/include"
|
||||
;;
|
||||
esac
|
||||
AC_MSG_CHECKING(pthread cflags)
|
||||
AC_MSG_RESULT($PTHREAD_CFLAGS)
|
||||
AC_MSG_CHECKING(pthread libs)
|
||||
AC_MSG_RESULT($PTHREAD_LIBS)
|
||||
|
||||
AC_SUBST(PTHREAD_CFLAGS)
|
||||
AC_SUBST(PTHREAD_LIBS)
|
||||
|
||||
case xyes in
|
||||
x$ac_cv_c_bigendian)
|
||||
XPL_BIG_ENDIAN=1
|
||||
XPL_LITTLE_ENDIAN=0
|
||||
;;
|
||||
*)
|
||||
XPL_BIG_ENDIAN=0
|
||||
XPL_LITTLE_ENDIAN=1
|
||||
;;
|
||||
esac
|
||||
|
||||
AC_DEFINE_UNQUOTED(XPL_BIG_ENDIAN, $XPL_BIG_ENDIAN, [Whether the system is big endian])
|
||||
AC_DEFINE_UNQUOTED(XPL_LITTLE_ENDIAN, $XPL_LITTLE_ENDIAN, [Whether the system is little endian])
|
||||
|
||||
AC_ARG_WITH([user],
|
||||
AC_HELP_STRING([--with-user=USERNAME],
|
||||
[run bongo as unprivileged user USERNAME]))
|
||||
BONGO_USER="$with_user"
|
||||
AC_DEFINE_UNQUOTED(BONGO_USER,"$BONGO_USER", [The username which bongo runs as.])
|
||||
AC_SUBST(BONGO_USER)
|
||||
|
||||
AC_ARG_WITH([audit],
|
||||
AC_HELP_STRING([--with-audit],
|
||||
[enable logging to Novell Audit @<:@default=disabled@:>@])],
|
||||
[],[with_audit=no])
|
||||
LIBLOGEVENT=
|
||||
AS_IF([test "x$with_audit" != xno],
|
||||
[AC_CHECK_LIB(logevent, LogEvent,
|
||||
[AC_SUBST(LIBLOGEVENT, "-llogevent")
|
||||
AC_DEFINE_UNQUOTED(HAVE_LIBLOGEVENT, 1, [Define if you have liblogevent])
|
||||
],
|
||||
[AC_MSG_FAILURE([--with-audit was given, but test for Audit failed])]
|
||||
)])
|
||||
|
||||
AC_ARG_ENABLE([conntrace],
|
||||
AC_HELP_STRING([--enable-conntrace],
|
||||
[enable verbose connection tracing]),
|
||||
[if test "x$enableval" != "x"; then
|
||||
AC_DEFINE_UNQUOTED([CONN_TRACE], [1], [enable verbose connection tracing])
|
||||
fi])
|
||||
|
||||
AC_ARG_ENABLE([memmgrleakreporting],
|
||||
AC_HELP_STRING([--enable-memmgrleakreporting],
|
||||
[enable leak tracking and reporting in memmgr]),
|
||||
[if test "x$enableval" != "x"; then
|
||||
AC_DEFINE_UNQUOTED([MEMMGR_DEBUG], [1], [enable leak tracking and reporting in memmgr])
|
||||
fi])
|
||||
|
||||
AC_ARG_ENABLE([mdbdebug],
|
||||
AC_HELP_STRING([--enable-mdbdebug],
|
||||
[enable highly insecure protocol commands that can be used to scale test mdb]),
|
||||
[if test "x$enableval" != "x"; then
|
||||
AC_DEFINE_UNQUOTED([MDB_DEBUG], [1], [enable highly insecure protocol commands that can be used to scale test mdb])
|
||||
fi])
|
||||
|
||||
AC_ARG_ENABLE([system-malloc],
|
||||
AC_HELP_STRING ([--enable-system-malloc],
|
||||
[do not use memmgr pools]),
|
||||
[if test "x$enableval" != "x"; then
|
||||
AC_DEFINE_UNQUOTED([SYSTEM_MALLOC], [1], [do not use memmgr pools])
|
||||
fi])
|
||||
|
||||
AC_ARG_ENABLE([debug-cflags],
|
||||
AC_HELP_STRING([--enable-debug-cflags],
|
||||
[enable compile flags that make things work better in gdb]),
|
||||
[if test "x$enableval" != "x"; then
|
||||
# this may need to switch on the operating system to set the
|
||||
# appropriate flags on non-Linux systems
|
||||
CFLAGS="$CFLAGS -g -g3 -O0 -gdwarf-2" ; export CFLAGS
|
||||
CXXFLAGS="$CXXFLAGS -g -g3 -O0 -gdwarf-2" ; export CXXFLAGS
|
||||
fi])
|
||||
|
||||
AC_CHECK_SIZEOF(char*)
|
||||
AC_CHECK_SIZEOF(void*)
|
||||
AC_CHECK_SIZEOF(int)
|
||||
AC_CHECK_SIZEOF(long)
|
||||
|
||||
AC_DEFINE_UNQUOTED(SQLITE_PTR_SZ, $ac_cv_sizeof_charp, [Size of a char *])
|
||||
|
||||
case $ac_cv_sizeof_voidp in
|
||||
$ac_cv_sizeof_long) pi_cast='(long)' pui_cast='(unsigned long)' ;;
|
||||
*) pi_cast='' pui_cast='' ;;
|
||||
esac
|
||||
AC_MSG_RESULT($pi_cast $pui_cast)
|
||||
|
||||
AC_DEFINE_UNQUOTED(XPL_POINTER_TO_INT_CAST, $pi_cast, [How to cast a pointer to an int])
|
||||
AC_DEFINE_UNQUOTED(XPL_POINTER_TO_UINT_CAST, $pui_cast, [How to cast an unsigned pointer to an int])
|
||||
|
||||
# import libraries
|
||||
|
||||
ACX_CLUCENE()
|
||||
if test "x$CLUCENE_LIBS" = "x"; then
|
||||
AC_MSG_RESULT(Using imported CLucene)
|
||||
AC_CONFIG_SUBDIRS([import/clucene])
|
||||
AC_SUBST(CLUCENE_BONGO_API, "1")
|
||||
AC_SUBST(CLUCENE_LIBS, "\$(top_srcdir)/import/clucene/src/libclucene.la")
|
||||
AC_SUBST(CLUCENE_CXXFLAGS, "-I\$(top_srcdir)/import/clucene/src")
|
||||
else
|
||||
AC_MSG_RESULT(Using system CLucene)
|
||||
fi
|
||||
|
||||
AC_CHECK_HEADER(curl/curl.h,
|
||||
[
|
||||
AC_MSG_RESULT(Using system CURL)
|
||||
LIBCURL_CHECK_CONFIG()
|
||||
LIBCURL_CFLAGS=$LIBCURL_CPPFLAGS
|
||||
LIBCURL_LIBS=$LIBCURL
|
||||
AC_SUBST(LIBCURL_CFLAGS)
|
||||
AC_SUBST(LIBCURL_LIBS)
|
||||
],
|
||||
[
|
||||
AC_MSG_RESULT(Using import CURL)
|
||||
AC_CONFIG_SUBDIRS([import/curl])
|
||||
AC_SUBST(LIBCURL_CFLAGS, "")
|
||||
AC_SUBST(LIBCURL_LIBS, "\$(top_srcdir)/import/curl/lib/libbongocurl.la")
|
||||
]
|
||||
)
|
||||
|
||||
AC_CHECK_HEADER(sqlite3.h,
|
||||
[
|
||||
AC_MSG_RESULT(Using system SQLite)
|
||||
AC_CHECK_SQLITE3()
|
||||
],
|
||||
[
|
||||
AC_MSG_RESULT(Using import SQLite)
|
||||
AC_CONFIG_SUBDIRS([import/sqlite3])
|
||||
AC_SUBST(SQLITE_CFLAGS, "-I\$(top_srcdir)/import/sqlite3")
|
||||
AC_SUBST(SQLITE_LIBS, "\$(top_srcdir)/import/sqlite3/libbongosqlite3.la")
|
||||
]
|
||||
)
|
||||
|
||||
AC_CONFIG_SUBDIRS([import/libical])
|
||||
AC_SUBST(IMPORT_SUBDIRS, $subdirs)
|
||||
|
||||
# check for doxygen
|
||||
AC_PATH_PROG(DOXYGEN, doxygen, NO_DOXYGEN)
|
||||
if test "$DOXYGEN" = NO_DOXYGEN; then
|
||||
AC_MSG_NOTICE([Couldn't find Doxygen - documentation cannot be built])
|
||||
fi
|
||||
|
||||
ac_configure_args="$ac_configure_args --enable-threadsafe --enable-cross-thread-connections --disable-tcl"
|
||||
|
||||
AC_OUTPUT([
|
||||
Makefile
|
||||
bongo.pc
|
||||
import/log4c/Makefile
|
||||
import/log4c/sd/Makefile
|
||||
import/log4c/log4c/Makefile
|
||||
include/Makefile
|
||||
init/bongo.init.fc4
|
||||
init/bongo.init.sles9
|
||||
init/bongo.init.suse10
|
||||
po/Makefile.in
|
||||
src/agents/alarm/Makefile
|
||||
src/agents/antispam/Makefile
|
||||
src/agents/avirus/Makefile
|
||||
src/agents/calcmd/Makefile
|
||||
src/agents/collector/Makefile
|
||||
src/agents/connmgr/Makefile
|
||||
src/agents/connmgr/cmmodules/lists/Makefile
|
||||
src/agents/connmgr/cmmodules/rbl/Makefile
|
||||
src/agents/connmgr/cmmodules/rdns/Makefile
|
||||
src/agents/connmgr/cmmodules/user/Makefile
|
||||
src/agents/generic/Makefile
|
||||
src/agents/imap/Makefile
|
||||
src/agents/imap/tests/Makefile
|
||||
src/agents/itip/Makefile
|
||||
src/agents/mailprox/Makefile
|
||||
src/agents/pluspack/Makefile
|
||||
src/agents/pop/Makefile
|
||||
src/agents/queue/Makefile
|
||||
src/agents/smtp/Makefile
|
||||
src/agents/store/Makefile
|
||||
src/agents/store/tests/Makefile
|
||||
src/agents/rules/Makefile
|
||||
src/apps/setup/Makefile
|
||||
src/apps/setup/bongo-setup.xml
|
||||
src/apps/manager/Makefile
|
||||
src/apps/admin/Makefile
|
||||
src/apps/config/Makefile
|
||||
src/apps/sendmail/Makefile
|
||||
src/apps/backup/Makefile
|
||||
src/apps/mdbtool/Makefile
|
||||
src/apps/queuetool/Makefile
|
||||
src/apps/storetool/Makefile
|
||||
src/apps/storetool/demo/Makefile
|
||||
src/libs/cal/Makefile
|
||||
src/libs/cal/tests/Makefile
|
||||
src/libs/calcmd/Makefile
|
||||
src/libs/calcmd/tests/Makefile
|
||||
src/libs/connio/Makefile
|
||||
src/libs/connio/tests/Makefile
|
||||
src/libs/json/Makefile
|
||||
src/libs/streamio/Makefile
|
||||
src/libs/streamio/codec/Makefile
|
||||
src/libs/logger/Makefile
|
||||
src/libs/management/Makefile
|
||||
src/libs/mdb/Makefile
|
||||
src/libs/mdb-file/Makefile
|
||||
src/libs/mdb-xldap/Makefile
|
||||
src/libs/memmgr/Makefile
|
||||
src/libs/msgapi/Makefile
|
||||
src/libs/nmap/Makefile
|
||||
src/libs/python/Makefile
|
||||
src/libs/python/bongo-python-wrapper
|
||||
src/libs/python/bongo/Makefile
|
||||
src/libs/python/bongo/Xpl.py
|
||||
src/libs/bongoutil/Makefile
|
||||
src/libs/bongoutil/tests/Makefile
|
||||
src/libs/xpl/Makefile
|
||||
src/libs/connmgr/Makefile
|
||||
src/www/Makefile
|
||||
src/www/bongo.conf
|
||||
zoneinfo/Makefile
|
||||
man/Makefile
|
||||
])
|
||||
@@ -1,36 +0,0 @@
|
||||
# ACME DNS-01 providers
|
||||
|
||||
Bongo reads provider credentials from `/etc/bongo/acme.d/providers`. The file
|
||||
is suffixless JSON and must be a root-owned regular file with mode `0640` or
|
||||
stricter; the group may be `bongo`. The setup wizard writes this file safely.
|
||||
|
||||
`type: "nsupdate"` is the standard native RFC 2136 provider. `rfc2136` is an
|
||||
accepted compatibility alias. Bongo uses ldns directly, so the external
|
||||
`nsupdate` command is neither invoked nor required. Omit `server` to discover
|
||||
the zone's SOA primary. TSIG is optional, but unauthenticated updates should
|
||||
only be used for a deliberately restricted local update service.
|
||||
|
||||
Cloudflare is the first HTTPS provider plugin. Use an API token scoped to
|
||||
`DNS:Edit` for only the required zone and provide its explicit zone id. Bongo
|
||||
stores the record id returned by the create request and deletes exactly that
|
||||
record after validation.
|
||||
|
||||
Each certificate name is matched using the longest `match_zone` (or `zone`
|
||||
when `match_zone` is absent). A delegated challenge can therefore use:
|
||||
|
||||
```json
|
||||
{
|
||||
"name": "delegated-nsupdate",
|
||||
"type": "nsupdate",
|
||||
"match_zone": "example.org",
|
||||
"challenge_alias": "_acme-challenge.validation.example.net",
|
||||
"zone": "validation.example.net",
|
||||
"server": "ns1.example.net",
|
||||
"port": 53
|
||||
}
|
||||
```
|
||||
|
||||
Additional HTTPS providers are installed as trusted modules named
|
||||
`bongo.acme.providers.<type>`. A module implements `present()` and `cleanup()`;
|
||||
credentials remain in the provider document and are never passed in command
|
||||
arguments. Do not install provider modules from untrusted sources.
|
||||
@@ -1,12 +0,0 @@
|
||||
{
|
||||
"version": 1,
|
||||
"providers": [
|
||||
{
|
||||
"name": "cloudflare-example-org",
|
||||
"type": "cloudflare",
|
||||
"zone": "example.org",
|
||||
"zone_id": "REPLACE_WITH_CLOUDFLARE_ZONE_ID",
|
||||
"api_token": "REPLACE_WITH_SCOPED_API_TOKEN"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,15 +0,0 @@
|
||||
{
|
||||
"version": 1,
|
||||
"providers": [
|
||||
{
|
||||
"name": "nsupdate-example-org",
|
||||
"type": "nsupdate",
|
||||
"zone": "example.org",
|
||||
"server": "ns1.example.org",
|
||||
"port": 53,
|
||||
"key_name": "bongo-acme.example.org",
|
||||
"key_algorithm": "hmac-sha256",
|
||||
"key_secret": "REPLACE_WITH_BASE64_TSIG_SECRET"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,18 +0,0 @@
|
||||
# Local ClamAV and SpamAssassin
|
||||
|
||||
`bongo-setup` probes `127.0.0.1:3310` with the clamd `PING` command and
|
||||
`127.0.0.1:783` with the spamd `PING` command. It enables the matching Bongo
|
||||
agent only after a valid response. The probe does not start a service or edit
|
||||
files owned by another package.
|
||||
|
||||
`clamd.conf` and `spamd.options` are safe loopback-only fragments. Merge the
|
||||
applicable settings into the distribution's existing configuration, restart
|
||||
the scanner, rerun `bongo-admin config`, and enable `bongoavirus` or
|
||||
`bongoantispam`. Bongo's Store documents remain named `antivirus` and
|
||||
`antispam`; they are JSON objects even though Bongo configuration document
|
||||
names do not carry a `.json` suffix.
|
||||
|
||||
For a remote scanner, replace the host in Bongo's `antivirus.hosts` or
|
||||
`antispam.hosts` list and protect the scanner network independently. clamd and
|
||||
spamd do not become safe Internet services merely because Bongo can use a
|
||||
remote endpoint.
|
||||
@@ -1,14 +0,0 @@
|
||||
# Minimal clamd fragment for a scanner on the same host as Bongo.
|
||||
# Merge these settings into the distribution's clamd.conf; do not replace
|
||||
# database, log, user, or update settings supplied by the package.
|
||||
|
||||
TCPAddr 127.0.0.1
|
||||
TCPSocket 3310
|
||||
|
||||
# Bongo's default scanner limit is 50 MiB. Keep clamd at least as large.
|
||||
StreamMaxLength 50M
|
||||
ReadTimeout 120
|
||||
CommandReadTimeout 30
|
||||
MaxConnectionQueueLength 30
|
||||
|
||||
# Never expose the unauthenticated clamd TCP protocol beyond loopback.
|
||||
@@ -1,11 +0,0 @@
|
||||
# Command-line options for a local SpamAssassin spamd used by Bongo.
|
||||
# Add these options to /etc/conf.d/spamd (Gentoo), /etc/default/spamassassin
|
||||
# (Debian-family), or the distribution's systemd override.
|
||||
|
||||
--listen-ip=127.0.0.1
|
||||
--port=783
|
||||
--max-children=5
|
||||
--helper-home-dir
|
||||
|
||||
# Do not expose spamd outside loopback unless transport ACLs and
|
||||
# authentication are configured separately.
|
||||
@@ -1,336 +0,0 @@
|
||||
#!/bin/sh
|
||||
set -eu
|
||||
|
||||
SOURCE_DIR=${1:-$(pwd)}
|
||||
WORK_DIR=${2:-/tmp/bongo-trixie-build}
|
||||
CONTRIB="$SOURCE_DIR/contrib/debian"
|
||||
DOWNLOADS="$WORK_DIR/downloads"
|
||||
BUILDS="$WORK_DIR/builds"
|
||||
|
||||
export DEBIAN_FRONTEND=noninteractive
|
||||
export DEB_BUILD_OPTIONS=${DEB_BUILD_OPTIONS:-parallel=$(nproc)}
|
||||
|
||||
die()
|
||||
{
|
||||
echo "build-trixie-bundle: $*" >&2
|
||||
exit 1
|
||||
}
|
||||
|
||||
verify_file()
|
||||
{
|
||||
expected=$1
|
||||
file=$2
|
||||
actual=$(sha256sum "$file" | awk '{print $1}')
|
||||
[ "$actual" = "$expected" ] ||
|
||||
die "SHA-256 mismatch for ${file##*/}: $actual"
|
||||
}
|
||||
|
||||
fetch()
|
||||
{
|
||||
url=$1
|
||||
hash=$2
|
||||
file="$DOWNLOADS/${url##*/}"
|
||||
curl --fail --location --retry 4 --output "$file" "$url"
|
||||
verify_file "$hash" "$file"
|
||||
}
|
||||
|
||||
install_build_dependencies()
|
||||
{
|
||||
tree=$1
|
||||
(cd "$tree" &&
|
||||
mk-build-deps --install --remove \
|
||||
--tool 'apt-get -y --no-install-recommends' debian/control)
|
||||
}
|
||||
|
||||
apply_quilt_patch()
|
||||
{
|
||||
tree=$1
|
||||
patch_file=$2
|
||||
patch_name=${patch_file##*/}
|
||||
install -m 0644 "$patch_file" "$tree/debian/patches/$patch_name"
|
||||
printf '%s\n' "$patch_name" >> "$tree/debian/patches/series"
|
||||
(cd "$tree" &&
|
||||
QUILT_PATCHES=debian/patches quilt push -a &&
|
||||
QUILT_PATCHES=debian/patches quilt refresh)
|
||||
}
|
||||
|
||||
binary_package_split()
|
||||
{
|
||||
awk '/^Package:/ { print $2 }' "$1/debian/control" | LC_ALL=C sort
|
||||
}
|
||||
|
||||
assert_unchanged_split()
|
||||
{
|
||||
before=$1
|
||||
tree=$2
|
||||
after=$(binary_package_split "$tree")
|
||||
[ "$before" = "$after" ] || {
|
||||
echo "Official binary package split:" >&2
|
||||
printf '%s\n' "$before" >&2
|
||||
echo "Patched binary package split:" >&2
|
||||
printf '%s\n' "$after" >&2
|
||||
die "Debian binary package split changed in ${tree##*/}"
|
||||
}
|
||||
}
|
||||
|
||||
assert_split_with_additions()
|
||||
{
|
||||
before=$1
|
||||
tree=$2
|
||||
shift 2
|
||||
expected=$(printf '%s\n%s\n' "$before" "$*" | tr ' ' '\n' |
|
||||
sed '/^$/d' | LC_ALL=C sort -u)
|
||||
after=$(binary_package_split "$tree")
|
||||
[ "$expected" = "$after" ] || {
|
||||
echo "Expected binary package split:" >&2
|
||||
printf '%s\n' "$expected" >&2
|
||||
echo "Patched binary package split:" >&2
|
||||
printf '%s\n' "$after" >&2
|
||||
die "unexpected Debian binary package split in ${tree##*/}"
|
||||
}
|
||||
}
|
||||
|
||||
build_source_and_binary()
|
||||
{
|
||||
tree=$1
|
||||
(cd "$tree" && dpkg-buildpackage -us -uc -S)
|
||||
(cd "$tree" && dpkg-buildpackage -us -uc -b)
|
||||
}
|
||||
|
||||
copy_artifacts()
|
||||
{
|
||||
parent=$1
|
||||
destination=$2
|
||||
shift 2
|
||||
mkdir -p "$destination"
|
||||
for pattern in "$@"; do
|
||||
for file in "$parent"/$pattern; do
|
||||
[ -f "$file" ] || continue
|
||||
cp -a "$file" "$destination/"
|
||||
done
|
||||
done
|
||||
}
|
||||
|
||||
run_mailutils_test()
|
||||
{
|
||||
cc -O2 -g -Wall -Wextra -Werror \
|
||||
"$CONTRIB/mailutils/tests/sieve-ownership-regression.c" \
|
||||
-o "$WORK_DIR/mailutils-sieve-regression" \
|
||||
-lmu_sieve -lmailutils
|
||||
valgrind --quiet --error-exitcode=97 --leak-check=full \
|
||||
--show-leak-kinds=definite,indirect \
|
||||
"$WORK_DIR/mailutils-sieve-regression"
|
||||
}
|
||||
|
||||
run_libspf2_test()
|
||||
{
|
||||
cc -O2 -g -Wall -Wextra -Werror \
|
||||
"$CONTRIB/libspf2/tests/rfc7208-regression.c" \
|
||||
-o "$WORK_DIR/libspf2-rfc7208-regression" -lspf2
|
||||
"$WORK_DIR/libspf2-rfc7208-regression"
|
||||
}
|
||||
|
||||
run_libsrs2_test()
|
||||
{
|
||||
cc -O2 -g -Wall -Wextra -Werror \
|
||||
"$CONTRIB/libsrs2/tests/security-regression.c" \
|
||||
-o "$WORK_DIR/libsrs2-security-regression" -lsrs2
|
||||
valgrind --quiet --error-exitcode=98 --leak-check=full \
|
||||
--show-leak-kinds=definite,indirect \
|
||||
"$WORK_DIR/libsrs2-security-regression"
|
||||
}
|
||||
|
||||
[ "$(id -u)" -eq 0 ] || die "run inside the root Gitea job container"
|
||||
[ -f "$SOURCE_DIR/CMakeLists.txt" ] || die "Bongo source tree not found"
|
||||
. /etc/os-release
|
||||
[ "${ID:-}" = debian ] && [ "${VERSION_CODENAME:-}" = trixie ] ||
|
||||
die "the build container must be Debian Trixie"
|
||||
|
||||
apt-get update
|
||||
apt-get install -y --no-install-recommends \
|
||||
build-essential ca-certificates curl devscripts dpkg-dev equivs git \
|
||||
lintian patch quilt valgrind xz-utils zip
|
||||
git config --global --add safe.directory "$SOURCE_DIR"
|
||||
SOURCE_COMMIT=$(git -C "$SOURCE_DIR" rev-parse HEAD)
|
||||
SHORT_COMMIT=$(printf '%s' "$SOURCE_COMMIT" | cut -c1-7)
|
||||
DEVELOPMENT_ID="dev${SHORT_COMMIT}"
|
||||
BONGO_VERSION=$(sed -n \
|
||||
's/^[[:space:]]*project([^)]*VERSION[[:space:]]*\([0-9][0-9.]*\).*$/\1/p' \
|
||||
"$SOURCE_DIR/CMakeLists.txt" | head -n 1)
|
||||
[ -n "$BONGO_VERSION" ] || die "cannot read project version from CMakeLists.txt"
|
||||
BONGO_DEBIAN_VERSION="${BONGO_VERSION}-1"
|
||||
BONGO_BUILD_DIR="$BUILDS/bongo-${BONGO_VERSION}"
|
||||
BONGO_ORIG_TARBALL="$BUILDS/bongo_${BONGO_VERSION}.orig.tar.xz"
|
||||
BUNDLE="$WORK_DIR/bongo-${BONGO_VERSION}-${DEVELOPMENT_ID}-debian-trixie"
|
||||
|
||||
rm -rf "$WORK_DIR"
|
||||
mkdir -p "$DOWNLOADS" "$BUILDS" "$BUNDLE/packages" "$BUNDLE/sources"
|
||||
|
||||
# GNU Mailutils 3.19 from Debian Trixie.
|
||||
MAILUTILS_URL=https://deb.debian.org/debian/pool/main/m/mailutils
|
||||
fetch "$MAILUTILS_URL/mailutils_3.19.orig.tar.xz" \
|
||||
50230d20036c5b8ad8c96b0d996177f1f133fba4c7c7e3b462d39eeb30849f45
|
||||
fetch "$MAILUTILS_URL/mailutils_3.19.orig.tar.xz.asc" \
|
||||
4a7560b5a716a04e57b88ae312fe879b6f702c960ae9c7df6e15d7d172fbfd4b
|
||||
fetch "$MAILUTILS_URL/mailutils_3.19-1.debian.tar.xz" \
|
||||
181de5e8c4f5a35e6a749c4a0d9143199c4374cd1887aaf19940dc31a4f7bd16
|
||||
fetch "$MAILUTILS_URL/mailutils_3.19-1.dsc" \
|
||||
079dcec1749fe025b55686b439c99cf710d8c6524b3cc991060f4c97fcc44d9a
|
||||
dpkg-source -x "$DOWNLOADS/mailutils_3.19-1.dsc" "$BUILDS/mailutils-3.19"
|
||||
mailutils_split=$(binary_package_split "$BUILDS/mailutils-3.19")
|
||||
patch -d "$BUILDS/mailutils-3.19" -p1 < \
|
||||
"$CONTRIB/mailutils/patches/0002-debian-trixie.patch"
|
||||
apply_quilt_patch "$BUILDS/mailutils-3.19" \
|
||||
"$CONTRIB/mailutils/patches/0001-sieve-parser-ownership.patch"
|
||||
assert_unchanged_split "$mailutils_split" "$BUILDS/mailutils-3.19"
|
||||
install_build_dependencies "$BUILDS/mailutils-3.19"
|
||||
build_source_and_binary "$BUILDS/mailutils-3.19"
|
||||
apt-get install -y \
|
||||
"$BUILDS"/libmailutils9t64_3.19-1+bongo1_*.deb \
|
||||
"$BUILDS"/libmu-dbm9t64_3.19-1+bongo1_*.deb \
|
||||
"$BUILDS"/mailutils-common_3.19-1+bongo1_all.deb \
|
||||
"$BUILDS"/libmailutils-dev_3.19-1+bongo1_*.deb
|
||||
run_mailutils_test
|
||||
copy_artifacts "$BUILDS" "$BUNDLE/sources/mailutils" \
|
||||
'mailutils_3.19-1+bongo1*.dsc' 'mailutils_3.19-1+bongo1*.tar.*' \
|
||||
'mailutils_3.19-1+bongo1*_source.changes' \
|
||||
'mailutils_3.19-1+bongo1*_source.buildinfo' \
|
||||
'mailutils_3.19.orig.tar.xz' 'mailutils_3.19.orig.tar.xz.asc'
|
||||
copy_artifacts "$BUILDS" "$BUNDLE/packages" \
|
||||
'*_3.19-1+bongo1_*.deb'
|
||||
|
||||
# libspf2 1.2.10 from Debian Trixie.
|
||||
LIBSPF2_URL=https://deb.debian.org/debian/pool/main/libs/libspf2
|
||||
fetch "$LIBSPF2_URL/libspf2_1.2.10.orig.tar.gz" \
|
||||
d91e3de81ae287a2976c44f60283bd3000d720e6a112dc7142eedf1831b821c9
|
||||
fetch "$LIBSPF2_URL/libspf2_1.2.10-8.3.debian.tar.xz" \
|
||||
93bafe87a7cd8d4a194c54abb75f35b1f6d81148c71fb30616754590826105cd
|
||||
fetch "$LIBSPF2_URL/libspf2_1.2.10-8.3.dsc" \
|
||||
8a1e838866a5d6bde2e3668adc19ef502287e578efe18c3c912f38cf55bcbdf5
|
||||
dpkg-source -x "$DOWNLOADS/libspf2_1.2.10-8.3.dsc" \
|
||||
"$BUILDS/libspf2-1.2.10"
|
||||
libspf2_split=$(binary_package_split "$BUILDS/libspf2-1.2.10")
|
||||
patch -d "$BUILDS/libspf2-1.2.10" -p1 < \
|
||||
"$CONTRIB/libspf2/patches/0002-debian-trixie.patch"
|
||||
apply_quilt_patch "$BUILDS/libspf2-1.2.10" \
|
||||
"$CONTRIB/libspf2/patches/0001-rfc7208-hardening.patch"
|
||||
assert_unchanged_split "$libspf2_split" "$BUILDS/libspf2-1.2.10"
|
||||
install_build_dependencies "$BUILDS/libspf2-1.2.10"
|
||||
build_source_and_binary "$BUILDS/libspf2-1.2.10"
|
||||
apt-get install -y \
|
||||
"$BUILDS"/libspf2-2t64_1.2.10-8.3+bongo1_*.deb \
|
||||
"$BUILDS"/libspf2-dev_1.2.10-8.3+bongo1_*.deb
|
||||
run_libspf2_test
|
||||
copy_artifacts "$BUILDS" "$BUNDLE/sources/libspf2" \
|
||||
'libspf2_1.2.10-8.3+bongo1*.dsc' \
|
||||
'libspf2_1.2.10-8.3+bongo1*.tar.*' \
|
||||
'libspf2_1.2.10-8.3+bongo1*_source.changes' \
|
||||
'libspf2_1.2.10-8.3+bongo1*_source.buildinfo' \
|
||||
'libspf2_1.2.10.orig.tar.gz'
|
||||
copy_artifacts "$BUILDS" "$BUNDLE/packages" \
|
||||
'*_1.2.10-8.3+bongo1_*.deb'
|
||||
|
||||
# libsrs2 is absent from Trixie. Rebuild the archived Debian source only;
|
||||
# never copy an archived binary package into the bundle.
|
||||
LIBSRS2_URL=https://mirror.truenetwork.ru/debian-archive/debian/pool/main/libs/libsrs2
|
||||
fetch "$LIBSRS2_URL/libsrs2_1.0.18.orig.tar.gz" \
|
||||
68d534105c4b0f5956cf4a711f681536d6f721c404726da15664565db0d0b862
|
||||
fetch "$LIBSRS2_URL/libsrs2_1.0.18-4.diff.gz" \
|
||||
055f17c08122c763f5dd015c5aa3e3f8fdd307a2ca5533d5762899bb712acd3b
|
||||
fetch "$LIBSRS2_URL/libsrs2_1.0.18-4.dsc" \
|
||||
d098988df52a92eb362c287a05ad9d748b8e2c896a6800be57b6eda0855504c5
|
||||
dpkg-source -x "$DOWNLOADS/libsrs2_1.0.18-4.dsc" \
|
||||
"$BUILDS/libsrs2-1.0.18"
|
||||
libsrs2_split=$(binary_package_split "$BUILDS/libsrs2-1.0.18")
|
||||
patch -d "$BUILDS/libsrs2-1.0.18" -p1 < \
|
||||
"$CONTRIB/libsrs2/patches/0003-debian-trixie.patch"
|
||||
assert_split_with_additions "$libsrs2_split" \
|
||||
"$BUILDS/libsrs2-1.0.18" srs2
|
||||
tar -xOf "$DOWNLOADS/libsrs2_1.0.18.orig.tar.gz" \
|
||||
libsrs2-1.0.18.orig/libsrs2/win32.h > \
|
||||
"$BUILDS/libsrs2-1.0.18/libsrs2/win32.h"
|
||||
install -m 0644 "$CONTRIB/libsrs2/patches/0001-build-modernization.patch" \
|
||||
"$BUILDS/libsrs2-1.0.18/debian/patches/0001-build-modernization.patch"
|
||||
install -m 0644 "$CONTRIB/libsrs2/patches/0002-security-hardening.patch" \
|
||||
"$BUILDS/libsrs2-1.0.18/debian/patches/0002-security-hardening.patch"
|
||||
install_build_dependencies "$BUILDS/libsrs2-1.0.18"
|
||||
build_source_and_binary "$BUILDS/libsrs2-1.0.18"
|
||||
apt-get install -y \
|
||||
"$BUILDS"/libsrs2-0_1.0.18-4+bongo1_*.deb \
|
||||
"$BUILDS"/libsrs2-dev_1.0.18-4+bongo1_*.deb
|
||||
run_libsrs2_test
|
||||
copy_artifacts "$BUILDS" "$BUNDLE/sources/libsrs2" \
|
||||
'libsrs2_1.0.18-4+bongo1*.dsc' 'libsrs2_1.0.18-4+bongo1*.tar.*' \
|
||||
'libsrs2_1.0.18-4+bongo1*_source.changes' \
|
||||
'libsrs2_1.0.18-4+bongo1*_source.buildinfo' \
|
||||
'libsrs2_1.0.18.orig.tar.gz'
|
||||
copy_artifacts "$BUILDS" "$BUNDLE/packages" \
|
||||
'*_1.0.18-4+bongo1_*.deb'
|
||||
|
||||
# Build Bongo as a normal non-native Debian source package.
|
||||
mkdir -p "$BONGO_BUILD_DIR"
|
||||
(cd "$SOURCE_DIR" &&
|
||||
git archive --format=tar --prefix="bongo-${BONGO_VERSION}/" HEAD -- \
|
||||
. ':(exclude)debian' | xz -T0 > "$BONGO_ORIG_TARBALL")
|
||||
tar -xJf "$BONGO_ORIG_TARBALL" -C "$BUILDS"
|
||||
cp -a "$SOURCE_DIR/debian" "$BONGO_BUILD_DIR/"
|
||||
[ "$(dpkg-parsechangelog -l"$BONGO_BUILD_DIR/debian/changelog" \
|
||||
-SVersion)" = "$BONGO_DEBIAN_VERSION" ] ||
|
||||
die "debian/changelog version does not match CMake project version"
|
||||
|
||||
# Keep a human-facing source archive whose name and top-level directory
|
||||
# identify the exact development revision. The canonical Debian orig tarball
|
||||
# above remains available because dpkg-source requires its fixed filename.
|
||||
mkdir -p "$BUNDLE/sources/bongo"
|
||||
(cd "$SOURCE_DIR" &&
|
||||
git archive --format=tar \
|
||||
--prefix="bongo-${BONGO_VERSION}-${DEVELOPMENT_ID}/" HEAD | \
|
||||
xz -T0 > \
|
||||
"$BUNDLE/sources/bongo/bongo-${BONGO_VERSION}-${DEVELOPMENT_ID}.tar.xz")
|
||||
|
||||
install_build_dependencies "$BONGO_BUILD_DIR"
|
||||
build_source_and_binary "$BONGO_BUILD_DIR"
|
||||
lintian --fail-on error \
|
||||
"$BUILDS"/bongo_"${BONGO_DEBIAN_VERSION}"_*.changes
|
||||
apt-get install -y "$BUILDS"/bongo_"${BONGO_DEBIAN_VERSION}"_*.deb
|
||||
"$BONGO_BUILD_DIR/debian/tests/installed-smoke"
|
||||
|
||||
for requirement in \
|
||||
'libmailutils9t64=1:3.19-1+bongo1' \
|
||||
'mailutils-common=1:3.19-1+bongo1' \
|
||||
'libspf2-2t64=1.2.10-8.3+bongo1' \
|
||||
'libsrs2-0=1.0.18-4+bongo1'; do
|
||||
package=${requirement%%=*}
|
||||
expected=${requirement#*=}
|
||||
actual=$(dpkg-query -W -f='${Version}' "$package")
|
||||
[ "$actual" = "$expected" ] ||
|
||||
die "$package: expected $expected after Bongo install, found $actual"
|
||||
done
|
||||
|
||||
copy_artifacts "$BUILDS" "$BUNDLE/sources/bongo" \
|
||||
"bongo_${BONGO_DEBIAN_VERSION}*.dsc" \
|
||||
"bongo_${BONGO_DEBIAN_VERSION}*.tar.*" \
|
||||
"bongo_${BONGO_DEBIAN_VERSION}*_source.changes" \
|
||||
"bongo_${BONGO_DEBIAN_VERSION}*_source.buildinfo" \
|
||||
"bongo_${BONGO_VERSION}.orig.tar.xz"
|
||||
copy_artifacts "$BUILDS" "$BUNDLE/packages" \
|
||||
"bongo_${BONGO_DEBIAN_VERSION}_*.deb"
|
||||
|
||||
install -m 0755 "$CONTRIB/bundle/install.sh" "$BUNDLE/install.sh"
|
||||
install -m 0644 "$CONTRIB/bundle/README.md" "$BUNDLE/README.md"
|
||||
cat > "$BUNDLE/BUILD-MANIFEST.txt" <<EOF
|
||||
Bongo source commit: $SOURCE_COMMIT
|
||||
Bongo development identifier: $DEVELOPMENT_ID
|
||||
Bongo CMake project version: $BONGO_VERSION
|
||||
Build distribution: Debian Trixie
|
||||
Mailutils source version: 1:3.19-1+bongo1
|
||||
libspf2 source version: 1.2.10-8.3+bongo1
|
||||
libsrs2 source version: 1.0.18-4+bongo1
|
||||
Bongo source version: $BONGO_DEBIAN_VERSION
|
||||
EOF
|
||||
(cd "$BUNDLE" &&
|
||||
find packages sources -type f -print | LC_ALL=C sort |
|
||||
xargs sha256sum > SHA256SUMS)
|
||||
(cd "$WORK_DIR" && zip -9 -r "${BUNDLE##*/}.zip" "${BUNDLE##*/}")
|
||||
|
||||
echo "Bundle created: $WORK_DIR/${BUNDLE##*/}.zip"
|
||||
@@ -1,31 +0,0 @@
|
||||
# Installing the Debian Trixie bundle
|
||||
|
||||
The release ZIP contains packages built together from the recorded source
|
||||
inputs. On a fresh Debian Trixie host, inspect the package list and run:
|
||||
|
||||
```sh
|
||||
sudo ./install.sh
|
||||
sudo bongo-setup
|
||||
sudo systemctl enable --now bongo.service
|
||||
```
|
||||
|
||||
The installer verifies `SHA256SUMS`, refuses a non-Trixie system, checks that
|
||||
all patched libraries carry a `+bongo` version, installs the required runtime
|
||||
libraries before Bongo, and verifies the installed versions. It then holds
|
||||
only these patched dependency packages:
|
||||
|
||||
- `libmailutils9t64`, `libmu-dbm9t64`, and their version-coupled
|
||||
`mailutils-common` data
|
||||
- `libspf2-2t64`
|
||||
- `libsrs2-0`
|
||||
|
||||
Bongo itself is not held and can be upgraded normally. Before deliberately
|
||||
replacing the patched libraries, run:
|
||||
|
||||
```sh
|
||||
sudo ./install.sh --unhold
|
||||
```
|
||||
|
||||
Review the next Bongo bundle's manifest and installer before upgrading and
|
||||
let that bundle establish its new library holds. Do not use `dpkg --force-*`
|
||||
to bypass an MTA conflict: remove or migrate the old MTA deliberately.
|
||||
@@ -1,124 +0,0 @@
|
||||
#!/bin/sh
|
||||
set -eu
|
||||
|
||||
PROGRAM=${0##*/}
|
||||
ROOT=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)
|
||||
PACKAGE_DIR="$ROOT/packages"
|
||||
HOLD_PACKAGES="libmailutils9t64 libmu-dbm9t64 mailutils-common libspf2-2t64 libsrs2-0"
|
||||
|
||||
die()
|
||||
{
|
||||
echo "$PROGRAM: $*" >&2
|
||||
exit 1
|
||||
}
|
||||
|
||||
need_root()
|
||||
{
|
||||
[ "$(id -u)" -eq 0 ] || die "run this installer as root"
|
||||
}
|
||||
|
||||
check_target()
|
||||
{
|
||||
[ -r /etc/os-release ] || die "cannot identify the operating system"
|
||||
. /etc/os-release
|
||||
[ "${ID:-}" = debian ] || die "this bundle targets Debian"
|
||||
[ "${VERSION_CODENAME:-}" = trixie ] ||
|
||||
die "this bundle targets Debian Trixie, found ${VERSION_CODENAME:-unknown}"
|
||||
command -v apt-get >/dev/null || die "apt-get is required"
|
||||
command -v apt-mark >/dev/null || die "apt-mark is required"
|
||||
command -v dpkg-deb >/dev/null || die "dpkg-deb is required"
|
||||
}
|
||||
|
||||
verify_bundle()
|
||||
{
|
||||
[ -f "$ROOT/SHA256SUMS" ] || die "SHA256SUMS is missing"
|
||||
(cd "$ROOT" && sha256sum -c SHA256SUMS)
|
||||
}
|
||||
|
||||
find_package_file()
|
||||
{
|
||||
wanted=$1
|
||||
found=
|
||||
for file in "$PACKAGE_DIR"/*.deb; do
|
||||
[ -f "$file" ] || continue
|
||||
package=$(dpkg-deb -f "$file" Package)
|
||||
if [ "$package" = "$wanted" ]; then
|
||||
[ -z "$found" ] || die "more than one $wanted package is present"
|
||||
found=$file
|
||||
fi
|
||||
done
|
||||
[ -n "$found" ] || die "required package $wanted is absent"
|
||||
printf '%s\n' "$found"
|
||||
}
|
||||
|
||||
patched_version()
|
||||
{
|
||||
file=$(find_package_file "$1")
|
||||
version=$(dpkg-deb -f "$file" Version)
|
||||
case $version in
|
||||
*+bongo*) ;;
|
||||
*) die "$1 does not carry a Bongo patched version: $version" ;;
|
||||
esac
|
||||
printf '%s\n' "$version"
|
||||
}
|
||||
|
||||
unhold()
|
||||
{
|
||||
need_root
|
||||
present=
|
||||
for package in $HOLD_PACKAGES; do
|
||||
if dpkg-query -W -f='${Status}\n' "$package" 2>/dev/null |
|
||||
grep -q '^install ok installed$'; then
|
||||
present="$present $package"
|
||||
fi
|
||||
done
|
||||
[ -z "$present" ] || apt-mark unhold $present
|
||||
echo "Bongo patched-library holds removed."
|
||||
}
|
||||
|
||||
install_bundle()
|
||||
{
|
||||
need_root
|
||||
check_target
|
||||
verify_bundle
|
||||
|
||||
install_files=
|
||||
for package in $HOLD_PACKAGES; do
|
||||
version=$(patched_version "$package")
|
||||
file=$(find_package_file "$package")
|
||||
echo "Selected $package $version"
|
||||
install_files="$install_files $file"
|
||||
done
|
||||
|
||||
bongo_file=$(find_package_file bongo)
|
||||
echo "Selected bongo $(dpkg-deb -f "$bongo_file" Version)"
|
||||
install_files="$install_files $bongo_file"
|
||||
|
||||
# apt resolves ordinary Trixie dependencies and displays any MTA package
|
||||
# replacement before it proceeds. Bongo itself intentionally remains
|
||||
# outside the hold set so subsequent Bongo releases remain upgradeable.
|
||||
apt-get install $install_files
|
||||
|
||||
for package in $HOLD_PACKAGES; do
|
||||
expected=$(patched_version "$package")
|
||||
installed=$(dpkg-query -W -f='${Version}' "$package")
|
||||
[ "$installed" = "$expected" ] ||
|
||||
die "$package version mismatch: expected $expected, found $installed"
|
||||
done
|
||||
apt-mark hold $HOLD_PACKAGES
|
||||
|
||||
echo
|
||||
echo "Bongo and its patched libraries are installed."
|
||||
echo "Bongo remains upgradeable; only patched libraries are held."
|
||||
echo "Run '$PROGRAM --unhold' before deliberately replacing those libraries."
|
||||
echo "Run 'bongo-setup' before enabling bongo.service on a new server."
|
||||
}
|
||||
|
||||
case ${1:-install} in
|
||||
install) install_bundle ;;
|
||||
--unhold) unhold ;;
|
||||
--help|-h)
|
||||
echo "Usage: $PROGRAM [install|--unhold]"
|
||||
;;
|
||||
*) die "unknown option: $1" ;;
|
||||
esac
|
||||
@@ -1,53 +0,0 @@
|
||||
# libspf2 packages for Debian Trixie
|
||||
|
||||
Bongo rebuilds Debian Trixie's libspf2 1.2.10 source with its maintained RFC
|
||||
7208 compatibility and hardening patch. Public headers and the existing
|
||||
shared-library ABI remain compatible with other libspf2 consumers.
|
||||
|
||||
## Source inputs
|
||||
|
||||
Download these files from
|
||||
`https://deb.debian.org/debian/pool/main/libs/libspf2/`:
|
||||
|
||||
| File | SHA-256 |
|
||||
| --- | --- |
|
||||
| `libspf2_1.2.10.orig.tar.gz` | `d91e3de81ae287a2976c44f60283bd3000d720e6a112dc7142eedf1831b821c9` |
|
||||
| `libspf2_1.2.10-8.3.debian.tar.xz` | `93bafe87a7cd8d4a194c54abb75f35b1f6d81148c71fb30616754590826105cd` |
|
||||
| `libspf2_1.2.10-8.3.dsc` | `8a1e838866a5d6bde2e3668adc19ef502287e578efe18c3c912f38cf55bcbdf5` |
|
||||
|
||||
The workflow verifies these hashes before extraction.
|
||||
|
||||
The official Debian binary-package split is retained: the rebuilt source
|
||||
still produces `libspf2-2t64`, `libspf2-dev`, `spfquery`, and
|
||||
`libmail-spf-xs-perl` (plus automatic debug-symbol packages). All freshly
|
||||
built packages go into the release ZIP; Bongo's installer selects only the
|
||||
runtime library.
|
||||
|
||||
## Patch order
|
||||
|
||||
After `dpkg-source -x libspf2_1.2.10-8.3.dsc`, install
|
||||
`0001-rfc7208-hardening.patch` as the final quilt patch and apply
|
||||
`0002-debian-trixie.patch` directly to the Debian packaging. The latter adds
|
||||
only the IDN2 build dependency required by the source change and identifies
|
||||
the rebuilt package as `1.2.10-8.3+bongo1`. It does not alter any binary
|
||||
package stanza, package name, install list, dependency split, or ABI package
|
||||
name from Debian Trixie.
|
||||
|
||||
The source patch enforces RFC 7208 lookup and recursion limits, preserves
|
||||
temporary versus permanent DNS failures, selects TXT records, hardens request
|
||||
state and allocations, and accepts internationalised input through IDNA while
|
||||
retaining the old C API.
|
||||
|
||||
## Build and verification
|
||||
|
||||
Build both source and binary artifacts on Trixie:
|
||||
|
||||
```sh
|
||||
dpkg-buildpackage -us -uc -S
|
||||
dpkg-buildpackage -us -uc -b
|
||||
```
|
||||
|
||||
Compile and run `tests/rfc7208-regression.c` against the newly built library.
|
||||
The release ZIP contains the complete rebuilt source package and its binary
|
||||
packages. Bongo must link to `libspf2-2t64` version
|
||||
`1.2.10-8.3+bongo1`, not the runner's distribution copy.
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,33 +0,0 @@
|
||||
diff --git a/debian/changelog b/debian/changelog
|
||||
index 3be3494..209d6ef 100644
|
||||
--- a/debian/changelog
|
||||
+++ b/debian/changelog
|
||||
@@ -1,3 +1,10 @@
|
||||
+libspf2 (1.2.10-8.3+bongo1) trixie; urgency=medium
|
||||
+
|
||||
+ * Rebuild the Debian Trixie source with maintained RFC 7208 processing
|
||||
+ limits, TXT-only selection, EAI domain support, and memory hardening.
|
||||
+
|
||||
+ -- Bongo Project <bongo-dev@disconnected-by-peer.at> Mon, 20 Jul 2026 12:30:00 +0200
|
||||
+
|
||||
libspf2 (1.2.10-8.3) unstable; urgency=medium
|
||||
|
||||
* Non-maintainer upload.
|
||||
@@ -388,4 +395,3 @@ libspf2 (1.0.3-1) unstable; urgency=low
|
||||
* Initial release. (Closes: #257644)
|
||||
|
||||
-- Eric Dorland <eric@debian.org> Fri, 2 Jul 2004 00:00:19 -0400
|
||||
-
|
||||
diff --git a/debian/control b/debian/control
|
||||
index 8413fa0..4f3bed8 100644
|
||||
--- a/debian/control
|
||||
+++ b/debian/control
|
||||
@@ -3,7 +3,7 @@ Priority: optional
|
||||
Section: libs
|
||||
Maintainer: Magnus Holmgren <holmgren@debian.org>
|
||||
Build-Depends: dpkg-dev (>= 1.22.5), dpkg-dev (>= 1.15.7), debhelper-compat (= 12),
|
||||
- perl, libstring-escape-perl
|
||||
+ perl, libstring-escape-perl, libidn2-dev
|
||||
Standards-Version: 3.9.7
|
||||
Vcs-Svn: svn://svn.kibibyte.se/libspf2/trunk
|
||||
Vcs-Browser: http://svn.kibibyte.se/libspf2
|
||||
@@ -1,272 +0,0 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <time.h>
|
||||
#include <netinet/in.h>
|
||||
#include <arpa/inet.h>
|
||||
|
||||
#include <spf2/spf.h>
|
||||
#include <spf2/spf_dns_zone.h>
|
||||
|
||||
static int failures;
|
||||
|
||||
static void
|
||||
check_result(const char *name, SPF_server_t *server, const char *ip,
|
||||
const char *helo, const char *mail_from, SPF_result_t expected)
|
||||
{
|
||||
SPF_request_t *request = SPF_request_new(server);
|
||||
SPF_response_t *response = NULL;
|
||||
SPF_errcode_t error;
|
||||
SPF_result_t actual = SPF_RESULT_INVALID;
|
||||
|
||||
if (request == NULL ||
|
||||
(strchr(ip, ':') != NULL
|
||||
? SPF_request_set_ipv6_str(request, ip)
|
||||
: SPF_request_set_ipv4_str(request, ip)) != SPF_E_SUCCESS ||
|
||||
SPF_request_set_helo_dom(request, helo) != SPF_E_SUCCESS ||
|
||||
SPF_request_set_env_from(request, mail_from) != SPF_E_SUCCESS) {
|
||||
fprintf(stderr, "%s: request setup failed\n", name);
|
||||
failures++;
|
||||
if (request != NULL)
|
||||
SPF_request_free(request);
|
||||
return;
|
||||
}
|
||||
|
||||
error = SPF_request_query_mailfrom(request, &response);
|
||||
if (response != NULL)
|
||||
actual = SPF_response_result(response);
|
||||
if (actual != expected) {
|
||||
fprintf(stderr, "%s: expected %s, got %s (error %d)\n", name,
|
||||
SPF_strresult(expected), SPF_strresult(actual), (int)error);
|
||||
failures++;
|
||||
}
|
||||
|
||||
SPF_response_free(response);
|
||||
if (request != NULL)
|
||||
SPF_request_free(request);
|
||||
}
|
||||
|
||||
static SPF_server_t *
|
||||
new_server(void)
|
||||
{
|
||||
SPF_server_t *server = SPF_server_new(SPF_DNS_ZONE, 0);
|
||||
if (server == NULL) {
|
||||
fputs("cannot create SPF server\n", stderr);
|
||||
exit(2);
|
||||
}
|
||||
if (SPF_server_set_rec_dom(server, "receiver.example") != SPF_E_SUCCESS) {
|
||||
fputs("cannot set receiver domain\n", stderr);
|
||||
exit(2);
|
||||
}
|
||||
return server;
|
||||
}
|
||||
|
||||
static void
|
||||
add(SPF_server_t *server, const char *name, ns_type type, const char *value)
|
||||
{
|
||||
if (SPF_dns_zone_add_str(server->resolver, name, type, NETDB_SUCCESS,
|
||||
value) != SPF_E_SUCCESS) {
|
||||
fprintf(stderr, "cannot add DNS record for %s\n", name);
|
||||
exit(2);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
test_txt_only(void)
|
||||
{
|
||||
SPF_server_t *server = new_server();
|
||||
add(server, "type99.example", ns_t_spf, "v=spf1 +all");
|
||||
check_result("TXT-only record selection", server, "192.0.2.1",
|
||||
"mx.example", "sender@type99.example", SPF_RESULT_NONE);
|
||||
SPF_server_free(server);
|
||||
}
|
||||
|
||||
static void
|
||||
test_nested_lookup_limit(void)
|
||||
{
|
||||
SPF_server_t *server = new_server();
|
||||
char domain[64];
|
||||
char next[128];
|
||||
int i;
|
||||
|
||||
for (i = 0; i < 11; i++) {
|
||||
snprintf(domain, sizeof(domain), "n%d.example", i);
|
||||
snprintf(next, sizeof(next), "v=spf1 include:n%d.example -all", i + 1);
|
||||
add(server, domain, ns_t_txt, next);
|
||||
}
|
||||
add(server, "n11.example", ns_t_txt, "v=spf1 +all");
|
||||
check_result("global nested DNS-term limit", server, "192.0.2.1",
|
||||
"mx.example", "sender@n0.example", SPF_RESULT_PERMERROR);
|
||||
SPF_server_free(server);
|
||||
|
||||
server = new_server();
|
||||
for (i = 0; i < 10; i++) {
|
||||
snprintf(domain, sizeof(domain), "ok%d.example", i);
|
||||
snprintf(next, sizeof(next), "v=spf1 include:ok%d.example -all", i + 1);
|
||||
add(server, domain, ns_t_txt, next);
|
||||
}
|
||||
add(server, "ok10.example", ns_t_txt, "v=spf1 +all");
|
||||
check_result("ten nested DNS terms remain valid", server, "192.0.2.1",
|
||||
"mx.example", "sender@ok0.example", SPF_RESULT_PASS);
|
||||
SPF_server_free(server);
|
||||
}
|
||||
|
||||
static void
|
||||
test_void_lookup_limit(void)
|
||||
{
|
||||
SPF_server_t *server = new_server();
|
||||
add(server, "void.example", ns_t_txt,
|
||||
"v=spf1 exists:one.invalid exists:two.invalid exists:three.invalid -all");
|
||||
check_result("third void lookup", server, "192.0.2.1", "mx.example",
|
||||
"sender@void.example", SPF_RESULT_PERMERROR);
|
||||
SPF_server_free(server);
|
||||
|
||||
server = new_server();
|
||||
add(server, "two-void.example", ns_t_txt,
|
||||
"v=spf1 exists:one.invalid exists:two.invalid -all");
|
||||
check_result("two void lookups remain valid", server, "192.0.2.1",
|
||||
"mx.example", "sender@two-void.example", SPF_RESULT_FAIL);
|
||||
SPF_server_free(server);
|
||||
}
|
||||
|
||||
static void
|
||||
test_mx_limits(void)
|
||||
{
|
||||
SPF_server_t *server = new_server();
|
||||
char address[32];
|
||||
int i;
|
||||
|
||||
add(server, "mx-address.example", ns_t_txt, "v=spf1 mx -all");
|
||||
add(server, "mx-address.example", ns_t_mx, "10 mail.mx-address.example");
|
||||
for (i = 1; i <= 11; i++) {
|
||||
snprintf(address, sizeof(address), "198.51.100.%d", i);
|
||||
add(server, "mail.mx-address.example", ns_t_a, address);
|
||||
}
|
||||
check_result("MX address record limit", server, "198.51.100.1",
|
||||
"mx.example", "sender@mx-address.example",
|
||||
SPF_RESULT_PERMERROR);
|
||||
SPF_server_free(server);
|
||||
|
||||
server = new_server();
|
||||
add(server, "mx-host.example", ns_t_txt, "v=spf1 mx -all");
|
||||
for (i = 1; i <= 11; i++) {
|
||||
snprintf(address, sizeof(address), "%d mail%d.mx-host.example", i, i);
|
||||
add(server, "mx-host.example", ns_t_mx, address);
|
||||
}
|
||||
check_result("MX host record limit", server, "198.51.100.1",
|
||||
"mx.example", "sender@mx-host.example", SPF_RESULT_PERMERROR);
|
||||
SPF_server_free(server);
|
||||
}
|
||||
|
||||
static void
|
||||
test_identities_and_addresses(void)
|
||||
{
|
||||
SPF_server_t *server = new_server();
|
||||
add(server, "helo.example", ns_t_txt, "v=spf1 ip4:192.0.2.10 -all");
|
||||
check_result("null sender uses HELO identity", server, "192.0.2.10",
|
||||
"helo.example", "", SPF_RESULT_PASS);
|
||||
SPF_server_free(server);
|
||||
|
||||
server = new_server();
|
||||
add(server, "ipv6.example", ns_t_txt, "v=spf1 ip6:2001:db8::/32 -all");
|
||||
check_result("IPv6 SPF", server, "2001:db8::1", "helo.example",
|
||||
"sender@ipv6.example", SPF_RESULT_PASS);
|
||||
SPF_server_free(server);
|
||||
|
||||
server = new_server();
|
||||
add(server, "multiple.example", ns_t_txt, "v=spf1 +all");
|
||||
add(server, "multiple.example", ns_t_txt, "v=spf1 -all");
|
||||
check_result("multiple SPF TXT records", server, "192.0.2.1",
|
||||
"helo.example", "sender@multiple.example",
|
||||
SPF_RESULT_PERMERROR);
|
||||
SPF_server_free(server);
|
||||
}
|
||||
|
||||
static void
|
||||
test_open_pull_request_regressions(void)
|
||||
{
|
||||
SPF_server_t *server = new_server();
|
||||
|
||||
add(server, "redirect-order.example", ns_t_txt,
|
||||
"v=spf1 redirect=redirect-target.example ip4:192.0.2.44");
|
||||
add(server, "redirect-target.example", ns_t_txt, "v=spf1 -all");
|
||||
check_result("redirect is evaluated after mechanisms", server,
|
||||
"192.0.2.44", "helo.example",
|
||||
"sender@redirect-order.example", SPF_RESULT_PASS);
|
||||
SPF_server_free(server);
|
||||
|
||||
server = new_server();
|
||||
add(server, "duplicate-redirect.example", ns_t_txt,
|
||||
"v=spf1 redirect=one.example redirect=two.example");
|
||||
check_result("duplicate redirect modifier", server, "192.0.2.1",
|
||||
"helo.example", "sender@duplicate-redirect.example",
|
||||
SPF_RESULT_PERMERROR);
|
||||
SPF_server_free(server);
|
||||
|
||||
server = new_server();
|
||||
add(server, "macro.example", ns_t_txt,
|
||||
"v=spf1 exists:%{l1}.macro.example -all");
|
||||
add(server, "alice.macro.example", ns_t_a, "192.0.2.1");
|
||||
check_result("macro truncation without delimiter", server, "192.0.2.1",
|
||||
"helo.example", "alice@macro.example", SPF_RESULT_PASS);
|
||||
SPF_server_free(server);
|
||||
}
|
||||
|
||||
static void
|
||||
test_eai_domains(void)
|
||||
{
|
||||
SPF_server_t *server = new_server();
|
||||
SPF_request_t *request;
|
||||
SPF_response_t *response = NULL;
|
||||
SPF_errcode_t error;
|
||||
|
||||
add(server, "xn--mnchen-3ya.example", ns_t_txt,
|
||||
"v=spf1 ip4:192.0.2.60 -all");
|
||||
check_result("EAI MAIL FROM domain", server, "192.0.2.60",
|
||||
"helo.example", "b\303\274ro@m\303\274nchen.example",
|
||||
SPF_RESULT_PASS);
|
||||
check_result("EAI HELO with null sender", server, "192.0.2.60",
|
||||
"m\303\274nchen.example", "", SPF_RESULT_PASS);
|
||||
|
||||
add(server, "xn--mnchen-3ya.example", ns_t_mx,
|
||||
"10 mail.xn--mnchen-3ya.example");
|
||||
add(server, "mail.xn--mnchen-3ya.example", ns_t_a, "192.0.2.60");
|
||||
request = SPF_request_new(server);
|
||||
if (request == NULL ||
|
||||
SPF_request_set_ipv4_str(request, "192.0.2.60") != SPF_E_SUCCESS ||
|
||||
SPF_request_set_helo_dom(request, "helo.example") != SPF_E_SUCCESS) {
|
||||
fputs("EAI RCPT TO: request setup failed\n", stderr);
|
||||
failures++;
|
||||
}
|
||||
else {
|
||||
error = SPF_request_query_rcptto(request, &response,
|
||||
"postmaster@m\303\274nchen.example");
|
||||
if (error != SPF_E_SUCCESS || response == NULL ||
|
||||
SPF_response_result(response) != SPF_RESULT_PASS) {
|
||||
fprintf(stderr, "EAI RCPT TO: expected pass (error %d)\n",
|
||||
(int)error);
|
||||
failures++;
|
||||
}
|
||||
}
|
||||
SPF_response_free(response);
|
||||
if (request != NULL)
|
||||
SPF_request_free(request);
|
||||
SPF_server_free(server);
|
||||
}
|
||||
|
||||
int
|
||||
main(void)
|
||||
{
|
||||
#ifndef LIBSPF2_RFC7208
|
||||
fputs("RFC 7208 package marker missing\n", stderr);
|
||||
return 2;
|
||||
#endif
|
||||
test_txt_only();
|
||||
test_nested_lookup_limit();
|
||||
test_void_lookup_limit();
|
||||
test_mx_limits();
|
||||
test_identities_and_addresses();
|
||||
test_open_pull_request_regressions();
|
||||
test_eai_domains();
|
||||
return failures == 0 ? 0 : 1;
|
||||
}
|
||||
@@ -1,68 +0,0 @@
|
||||
# libsrs2 packages for Debian Trixie
|
||||
|
||||
Bongo uses the archived Debian `libsrs2` 1.0.18 source, rebuilds it on
|
||||
Debian Trixie, and never ships the historical binary packages.
|
||||
|
||||
## Source inputs
|
||||
|
||||
Download these files from
|
||||
`https://mirror.truenetwork.ru/debian-archive/debian/pool/main/libs/libsrs2/`:
|
||||
|
||||
| File | SHA-256 |
|
||||
| --- | --- |
|
||||
| `libsrs2_1.0.18.orig.tar.gz` | `68d534105c4b0f5956cf4a711f681536d6f721c404726da15664565db0d0b862` |
|
||||
| `libsrs2_1.0.18-4.diff.gz` | `055f17c08122c763f5dd015c5aa3e3f8fdd307a2ca5533d5762899bb712acd3b` |
|
||||
| `libsrs2_1.0.18-4.dsc` | `d098988df52a92eb362c287a05ad9d748b8e2c896a6800be57b6eda0855504c5` |
|
||||
|
||||
The old `.dsc` uses weak historical checksums and cannot normally be
|
||||
signature-verified without its retired Debian archive key. The release job
|
||||
must therefore verify all three SHA-256 values above before extraction.
|
||||
|
||||
## Patch order
|
||||
|
||||
After `dpkg-source -x libsrs2_1.0.18-4.dsc`, apply only the Debian
|
||||
packaging conversion directly:
|
||||
|
||||
```sh
|
||||
patch -d libsrs2-1.0.18 -p1 < patches/0003-debian-trixie.patch
|
||||
# The historical 1.0 diff only converted win32.h from CRLF to LF. Restore the
|
||||
# byte-identical upstream file so it is not an untracked 3.0 (quilt) change.
|
||||
tar -xOf libsrs2_1.0.18.orig.tar.gz \
|
||||
libsrs2-1.0.18.orig/libsrs2/win32.h \
|
||||
> libsrs2-1.0.18/libsrs2/win32.h
|
||||
install -Dm0644 patches/0001-build-modernization.patch \
|
||||
libsrs2-1.0.18/debian/patches/0001-build-modernization.patch
|
||||
install -Dm0644 patches/0002-security-hardening.patch \
|
||||
libsrs2-1.0.18/debian/patches/0002-security-hardening.patch
|
||||
```
|
||||
|
||||
`debian/patches/series` then applies the source changes in this order:
|
||||
|
||||
1. `0001-build-modernization.patch`
|
||||
2. `0002-security-hardening.patch`
|
||||
|
||||
The first patch includes Gentoo's parallel-build correction. The second is
|
||||
shared with the Gentoo overlay and fixes bounded formatting, allocation and
|
||||
secret cleanup, long-HMAC handling, 64-bit SHA-1 out-of-bounds reads, Unix
|
||||
socket bounds, and daemon I/O. The third converts the archived Debian package
|
||||
from source format 1.0 and CDBS/debhelper 5 to source format `3.0 (quilt)`,
|
||||
debhelper 13, and proper Multi-Arch paths.
|
||||
|
||||
## Build and verification
|
||||
|
||||
Build both source and binary artifacts on Trixie:
|
||||
|
||||
```sh
|
||||
dpkg-buildpackage -us -uc -S
|
||||
dpkg-buildpackage -us -uc -b
|
||||
```
|
||||
|
||||
Compile `tests/security-regression.c` against the newly built library. It
|
||||
checks an RFC 2202 HMAC-SHA1 vector, a long secret, SRS forward/reverse,
|
||||
bounded output, and the allocation API. Release builds must also confirm that
|
||||
Bongo links against these newly built packages.
|
||||
|
||||
The release ZIP contains the resulting Trixie binary packages and the full
|
||||
source package (`.dsc`, upstream tarball, Debian tarball, and source changes
|
||||
file). It must not contain an archived pre-Trixie `.deb` or the historical
|
||||
Debian `.diff.gz`.
|
||||
@@ -1,81 +0,0 @@
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -1,24 +1,17 @@
|
||||
dnl Process this file with autoconf to produce a configure script.
|
||||
|
||||
-AC_INIT(libsrs2/srs2.h)
|
||||
-AM_INIT_AUTOMAKE(libsrs2, 1.0.18)
|
||||
-
|
||||
-dnl Weird Unix variants
|
||||
-AC_AIX
|
||||
-AC_MINIX
|
||||
+AC_INIT([libsrs2], [1.0.18])
|
||||
+AC_CONFIG_SRCDIR([libsrs2/srs2.h])
|
||||
+AC_CONFIG_HEADERS([config.h])
|
||||
+AC_USE_SYSTEM_EXTENSIONS
|
||||
+AM_INIT_AUTOMAKE([foreign])
|
||||
|
||||
dnl Checks for programs.
|
||||
AC_PROG_CC
|
||||
AC_PROG_INSTALL
|
||||
AC_PROG_MAKE_SET
|
||||
-AC_PROG_RANLIB
|
||||
-AC_PROG_LIBTOOL
|
||||
-
|
||||
-dnl More weird Unix variants
|
||||
-AC_ISC_POSIX
|
||||
+LT_INIT
|
||||
|
||||
-AC_C_CONST
|
||||
-AC_C_INLINE
|
||||
AC_TYPE_PID_T
|
||||
AC_TYPE_SIZE_T
|
||||
AC_C_VOLATILE
|
||||
@@ -29,7 +22,6 @@
|
||||
AC_CHECK_SIZEOF(unsigned long)
|
||||
|
||||
dnl Checks for header files.
|
||||
-AC_HEADER_STDC
|
||||
AC_CHECK_HEADERS(strings.h time.h sys/time.h sys/types.h unistd.h)
|
||||
AC_CHECK_HEADERS(errno.h sys/select.h sys/socket.h stdarg.h getopt.h)
|
||||
AC_CHECK_HEADERS(alloca.h)
|
||||
@@ -52,8 +44,6 @@
|
||||
|
||||
dnl Checks for typedefs, structures, and compiler characteristics.
|
||||
AC_C_CONST
|
||||
-AC_TYPE_SIZE_T
|
||||
-AC_HEADER_TIME
|
||||
|
||||
dnl Checks for library functions.
|
||||
AC_CHECK_FUNCS(strdup strstr)
|
||||
@@ -64,5 +54,5 @@
|
||||
|
||||
AC_CHECK_FUNCS(getopt_long)
|
||||
|
||||
-AM_CONFIG_HEADER(config.h)
|
||||
-AC_OUTPUT(libsrs2/Makefile tools/Makefile Makefile)
|
||||
+AC_CONFIG_FILES([libsrs2/Makefile tools/Makefile Makefile])
|
||||
+AC_OUTPUT
|
||||
--- a/libsrs2/Makefile.am
|
||||
+++ b/libsrs2/Makefile.am
|
||||
@@ -1,11 +1,8 @@
|
||||
-CFLAGS = -Wall @CFLAGS@
|
||||
+AM_CFLAGS = -Wall
|
||||
|
||||
include_HEADERS = srs2.h
|
||||
noinst_HEADERS = win32.h
|
||||
|
||||
-lib_LIBRARIES = libsrs2.a
|
||||
-libsrs2_a_SOURCES = srs2.c sha1.c
|
||||
-
|
||||
lib_LTLIBRARIES = libsrs2.la
|
||||
libsrs2_la_LDFLAGS = -version-info 0:0:0
|
||||
libsrs2_la_SOURCES = srs2.c sha1.c
|
||||
--- a/tools/Makefile.am
|
||||
+++ b/tools/Makefile.am
|
||||
@@ -1,4 +1,4 @@
|
||||
-CFLAGS = -g -Wall @CFLAGS@
|
||||
+AM_CFLAGS = -g -Wall
|
||||
|
||||
bin_PROGRAMS = srs
|
||||
|
||||
@@ -1,813 +0,0 @@
|
||||
--- a/libsrs2/srs2.c
|
||||
+++ b/libsrs2/srs2.c
|
||||
@@ -13,14 +13,16 @@
|
||||
|
||||
#undef USE_OPENSSL
|
||||
|
||||
-#include <stdio.h>
|
||||
-#include <stdlib.h>
|
||||
-#include <ctype.h>
|
||||
-
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "../config.h"
|
||||
#endif
|
||||
|
||||
+#include <stdio.h>
|
||||
+#include <stdlib.h>
|
||||
+#include <ctype.h>
|
||||
+#include <limits.h>
|
||||
+#include <stdint.h>
|
||||
+
|
||||
#ifdef _WIN32
|
||||
#include "win32.h"
|
||||
#endif
|
||||
@@ -45,6 +47,10 @@
|
||||
#include <string.h> /* memcpy, strcpy, memset */
|
||||
#endif
|
||||
|
||||
+#ifdef HAVE_STRINGS_H
|
||||
+#include <strings.h> /* strcasecmp, strncasecmp */
|
||||
+#endif
|
||||
+
|
||||
#ifdef HAVE_ALLOCA_H
|
||||
#include <alloca.h>
|
||||
#endif
|
||||
@@ -80,9 +86,39 @@
|
||||
static srs_realloc_t srs_f_realloc = realloc;
|
||||
static srs_free_t srs_f_free = free;
|
||||
|
||||
+static void
|
||||
+srs_clear(void *ptr, size_t len)
|
||||
+{
|
||||
+ volatile unsigned char *p = ptr;
|
||||
+
|
||||
+ while (len-- > 0)
|
||||
+ *p++ = 0;
|
||||
+}
|
||||
+
|
||||
+static int
|
||||
+srs_format(char *buf, int buflen, const char *format, ...)
|
||||
+{
|
||||
+ va_list ap;
|
||||
+ int len;
|
||||
+
|
||||
+ if (buf == NULL || buflen <= 0)
|
||||
+ return SRS_EBUFTOOSMALL;
|
||||
+
|
||||
+ va_start(ap, format);
|
||||
+ len = vsnprintf(buf, (size_t)buflen, format, ap);
|
||||
+ va_end(ap);
|
||||
+ if (len < 0 || len >= buflen) {
|
||||
+ buf[0] = '\0';
|
||||
+ return SRS_EBUFTOOSMALL;
|
||||
+ }
|
||||
+ return SRS_SUCCESS;
|
||||
+}
|
||||
+
|
||||
int
|
||||
srs_set_malloc(srs_malloc_t m, srs_realloc_t r, srs_free_t f)
|
||||
{
|
||||
+ if (m == NULL || r == NULL || f == NULL)
|
||||
+ return SRS_EINVAL;
|
||||
srs_f_malloc = m;
|
||||
srs_f_realloc = r;
|
||||
srs_f_free = f;
|
||||
@@ -110,6 +146,10 @@
|
||||
return "No at sign in sender address";
|
||||
case SRS_EBUFTOOSMALL:
|
||||
return "Buffer too small.";
|
||||
+ case SRS_ENOMEM:
|
||||
+ return "Unable to allocate memory.";
|
||||
+ case SRS_EINVAL:
|
||||
+ return "Invalid argument.";
|
||||
|
||||
/* Syntax errors */
|
||||
case SRS_ENOSRS0HOST:
|
||||
@@ -146,6 +186,8 @@
|
||||
srs_new()
|
||||
{
|
||||
srs_t *srs = (srs_t *)srs_f_malloc(sizeof(srs_t));
|
||||
+ if (srs == NULL)
|
||||
+ return NULL;
|
||||
srs_init(srs);
|
||||
return srs;
|
||||
}
|
||||
@@ -153,6 +195,8 @@
|
||||
void
|
||||
srs_init(srs_t *srs)
|
||||
{
|
||||
+ if (srs == NULL)
|
||||
+ return;
|
||||
memset(srs, 0, sizeof(srs_t));
|
||||
srs->secrets = NULL;
|
||||
srs->numsecrets = 0;
|
||||
@@ -167,27 +211,57 @@
|
||||
srs_free(srs_t *srs)
|
||||
{
|
||||
int i;
|
||||
+
|
||||
+ if (srs == NULL)
|
||||
+ return;
|
||||
for (i = 0; i < srs->numsecrets; i++) {
|
||||
- memset(srs->secrets[i], 0, strlen(srs->secrets[i]));
|
||||
+ if (srs->secrets[i] == NULL)
|
||||
+ continue;
|
||||
+ srs_clear(srs->secrets[i], strlen(srs->secrets[i]));
|
||||
srs_f_free(srs->secrets[i]);
|
||||
- srs->secrets[i] = '\0';
|
||||
+ srs->secrets[i] = NULL;
|
||||
}
|
||||
+ srs_f_free(srs->secrets);
|
||||
+ srs_clear(srs, sizeof(*srs));
|
||||
srs_f_free(srs);
|
||||
}
|
||||
|
||||
int
|
||||
srs_add_secret(srs_t *srs, const char *secret)
|
||||
{
|
||||
- int newlen = (srs->numsecrets + 1) * sizeof(char *);
|
||||
- srs->secrets = (char **)srs_f_realloc(srs->secrets, newlen);
|
||||
- srs->secrets[srs->numsecrets++] = strdup(secret);
|
||||
+ char **newsecrets;
|
||||
+ char *newsecret;
|
||||
+ size_t secretlen;
|
||||
+ size_t count;
|
||||
+
|
||||
+ if (srs == NULL || secret == NULL || srs->numsecrets < 0)
|
||||
+ return SRS_EINVAL;
|
||||
+ count = (size_t)srs->numsecrets + 1;
|
||||
+ if (count > SIZE_MAX / sizeof(*newsecrets))
|
||||
+ return SRS_ENOMEM;
|
||||
+ secretlen = strlen(secret);
|
||||
+ if (secretlen == SIZE_MAX)
|
||||
+ return SRS_ENOMEM;
|
||||
+ newsecret = srs_f_malloc(secretlen + 1);
|
||||
+ if (newsecret == NULL)
|
||||
+ return SRS_ENOMEM;
|
||||
+ memcpy(newsecret, secret, secretlen + 1);
|
||||
+ newsecrets = srs_f_realloc(srs->secrets,
|
||||
+ count * sizeof(*newsecrets));
|
||||
+ if (newsecrets == NULL) {
|
||||
+ srs_clear(newsecret, secretlen);
|
||||
+ srs_f_free(newsecret);
|
||||
+ return SRS_ENOMEM;
|
||||
+ }
|
||||
+ srs->secrets = newsecrets;
|
||||
+ srs->secrets[srs->numsecrets++] = newsecret;
|
||||
return SRS_SUCCESS;
|
||||
}
|
||||
|
||||
const char *
|
||||
srs_get_secret(srs_t *srs, int idx)
|
||||
{
|
||||
- if (idx < srs->numsecrets)
|
||||
+ if (srs != NULL && idx >= 0 && idx < srs->numsecrets)
|
||||
return srs->secrets[idx];
|
||||
return NULL;
|
||||
}
|
||||
@@ -239,6 +313,7 @@
|
||||
int
|
||||
srs_timestamp_create(srs_t *srs, char *buf, time_t now)
|
||||
{
|
||||
+ (void)srs;
|
||||
now = now / SRS_TIME_PRECISION;
|
||||
buf[1] = SRS_TIME_BASECHARS[now & ((1 << SRS_TIME_BASEBITS) - 1)];
|
||||
now = now >> SRS_TIME_BASEBITS;
|
||||
@@ -251,7 +326,7 @@
|
||||
srs_timestamp_check(srs_t *srs, const char *stamp)
|
||||
{
|
||||
const char *sp;
|
||||
- char *bp;
|
||||
+ const char *bp;
|
||||
int off;
|
||||
time_t now;
|
||||
time_t then;
|
||||
@@ -259,7 +334,7 @@
|
||||
/* We had better go around this loop exactly twice! */
|
||||
then = 0;
|
||||
for (sp = stamp; *sp; sp++) {
|
||||
- bp = strchr(SRS_TIME_BASECHARS, toupper(*sp));
|
||||
+ bp = strchr(SRS_TIME_BASECHARS, toupper((unsigned char)*sp));
|
||||
if (bp == NULL)
|
||||
return SRS_EBADTIMESTAMPCHAR;
|
||||
off = bp - SRS_TIME_BASECHARS;
|
||||
@@ -315,7 +390,7 @@
|
||||
lcdata = alloca(len + 1);
|
||||
for (j = 0; j < len; j++) {
|
||||
if (isupper(data[j]))
|
||||
- lcdata[j] = tolower(data[j]);
|
||||
+ lcdata[j] = tolower((unsigned char)data[j]);
|
||||
else
|
||||
lcdata[j] = data[j];
|
||||
}
|
||||
@@ -424,7 +499,6 @@
|
||||
const char *aliashost) {
|
||||
char *srshash;
|
||||
char srsstamp[SRS_TIME_SIZE + 1];
|
||||
- int len;
|
||||
int ret;
|
||||
|
||||
/* This never happens if we get called from guarded() */
|
||||
@@ -438,14 +512,6 @@
|
||||
return SRS_ENOSRS0USER;
|
||||
}
|
||||
|
||||
- len = strlen(SRS0TAG) + 1 +
|
||||
- srs->hashlength + 1 +
|
||||
- SRS_TIME_SIZE + 1 +
|
||||
- strlen(sendhost) + 1 + strlen(senduser)
|
||||
- + 1 + strlen(aliashost);
|
||||
- if (len >= buflen)
|
||||
- return SRS_EBUFTOOSMALL;
|
||||
-
|
||||
ret = srs_timestamp_create(srs, srsstamp, time(NULL));
|
||||
if (ret != SRS_SUCCESS)
|
||||
return ret;
|
||||
@@ -454,12 +520,11 @@
|
||||
if (ret != SRS_SUCCESS)
|
||||
return ret;
|
||||
|
||||
- sprintf(buf, SRS0TAG "%c%s%c%s%c%s%c%s@%s", srs->separator,
|
||||
+ return srs_format(buf, buflen,
|
||||
+ SRS0TAG "%c%s%c%s%c%s%c%s@%s", srs->separator,
|
||||
srshash, SRSSEP, srsstamp, SRSSEP,
|
||||
sendhost, SRSSEP, senduser,
|
||||
aliashost);
|
||||
-
|
||||
- return SRS_SUCCESS;
|
||||
}
|
||||
|
||||
int
|
||||
@@ -470,7 +535,6 @@
|
||||
char *srshost;
|
||||
char *srsuser;
|
||||
char *srshash;
|
||||
- int len;
|
||||
int ret;
|
||||
|
||||
if ((strncasecmp(senduser, SRS1TAG, 4) == 0) &&
|
||||
@@ -492,17 +556,11 @@
|
||||
ret = srs_hash_create(srs, srshash, 2, srshost, srsuser);
|
||||
if (ret != SRS_SUCCESS)
|
||||
return ret;
|
||||
- len = strlen(SRS1TAG) + 1 +
|
||||
- srs->hashlength + 1 +
|
||||
- strlen(srshost) + 1 + strlen(srsuser)
|
||||
- + 1 + strlen(aliashost);
|
||||
- if (len >= buflen)
|
||||
- return SRS_EBUFTOOSMALL;
|
||||
- sprintf(buf, SRS1TAG "%c%s%c%s%c%s@%s", srs->separator,
|
||||
+ return srs_format(buf, buflen,
|
||||
+ SRS1TAG "%c%s%c%s%c%s@%s", srs->separator,
|
||||
srshash, SRSSEP,
|
||||
srshost, SRSSEP, srsuser,
|
||||
aliashost);
|
||||
- return SRS_SUCCESS;
|
||||
}
|
||||
else if ((strncasecmp(senduser, SRS0TAG, 4) == 0) &&
|
||||
(strchr(srs_separators, senduser[4]) != NULL)) {
|
||||
@@ -512,13 +570,8 @@
|
||||
ret = srs_hash_create(srs, srshash, 2, srshost, srsuser);
|
||||
if (ret != SRS_SUCCESS)
|
||||
return ret;
|
||||
- len = strlen(SRS1TAG) + 1 +
|
||||
- srs->hashlength + 1 +
|
||||
- strlen(srshost) + 1 + strlen(srsuser)
|
||||
- + 1 + strlen(aliashost);
|
||||
- if (len >= buflen)
|
||||
- return SRS_EBUFTOOSMALL;
|
||||
- sprintf(buf, SRS1TAG "%c%s%c%s%c%s@%s", srs->separator,
|
||||
+ return srs_format(buf, buflen,
|
||||
+ SRS1TAG "%c%s%c%s%c%s@%s", srs->separator,
|
||||
srshash, SRSSEP,
|
||||
srshost, SRSSEP, srsuser,
|
||||
aliashost);
|
||||
@@ -527,8 +580,6 @@
|
||||
return srs_compile_shortcut(srs, buf, buflen,
|
||||
sendhost, senduser, aliashost);
|
||||
}
|
||||
-
|
||||
- return SRS_SUCCESS;
|
||||
}
|
||||
|
||||
int
|
||||
@@ -563,8 +614,7 @@
|
||||
srshost, srsuser);
|
||||
if (ret != SRS_SUCCESS)
|
||||
return ret;
|
||||
- sprintf(buf, "%s@%s", srsuser, srshost);
|
||||
- return SRS_SUCCESS;
|
||||
+ return srs_format(buf, buflen, "%s@%s", srsuser, srshost);
|
||||
}
|
||||
|
||||
return SRS_ENOTSRSADDRESS;
|
||||
@@ -593,8 +643,8 @@
|
||||
ret = srs_hash_check(srs, srshash, 2, srshost, srsuser);
|
||||
if (ret != SRS_SUCCESS)
|
||||
return ret;
|
||||
- sprintf(buf, SRS0TAG "%s@%s", srsuser, srshost);
|
||||
- return SRS_SUCCESS;
|
||||
+ return srs_format(buf, buflen, SRS0TAG "%s@%s", srsuser,
|
||||
+ srshost);
|
||||
}
|
||||
else {
|
||||
return srs_parse_shortcut(srs, buf, buflen, senduser);
|
||||
@@ -608,40 +658,52 @@
|
||||
char *senduser;
|
||||
char *sendhost;
|
||||
char *tmp;
|
||||
- int len;
|
||||
+ const char *at;
|
||||
+ size_t len;
|
||||
+ int ret;
|
||||
+
|
||||
+ if (srs == NULL || buf == NULL || sender == NULL || alias == NULL ||
|
||||
+ buflen <= 0)
|
||||
+ return SRS_EBUFTOOSMALL;
|
||||
|
||||
if (srs->noforward)
|
||||
return SRS_ENOTREWRITTEN;
|
||||
|
||||
/* This is allowed to be a plain domain */
|
||||
- while ((tmp = strchr(alias, '@')) != NULL)
|
||||
- alias = tmp + 1;
|
||||
+ while ((at = strchr(alias, '@')) != NULL)
|
||||
+ alias = at + 1;
|
||||
|
||||
- tmp = strchr(sender, '@');
|
||||
- if (tmp == NULL)
|
||||
+ at = strchr(sender, '@');
|
||||
+ if (at == NULL)
|
||||
return SRS_ENOSENDERATSIGN;
|
||||
- sendhost = tmp + 1;
|
||||
+ sendhost = (char *)at + 1;
|
||||
|
||||
len = strlen(sender);
|
||||
+ if (len >= INT_MAX)
|
||||
+ return SRS_EBUFTOOSMALL;
|
||||
|
||||
if (! srs->alwaysrewrite) {
|
||||
if (strcasecmp(sendhost, alias) == 0) {
|
||||
- if (strlen(sender) >= buflen)
|
||||
+ if (strlen(sender) >= (size_t)buflen)
|
||||
return SRS_EBUFTOOSMALL;
|
||||
- strcpy(buf, sender);
|
||||
+ memcpy(buf, sender, strlen(sender) + 1);
|
||||
return SRS_SUCCESS;
|
||||
}
|
||||
}
|
||||
|
||||
- /* Reconstruct the whole show into our alloca() buffer. */
|
||||
- senduser = alloca(len + 1);
|
||||
- strcpy(senduser, sender);
|
||||
- tmp = (senduser + (tmp - sender));
|
||||
+ /* The sender is untrusted input; do not copy it to the process stack. */
|
||||
+ senduser = srs_f_malloc(len + 1);
|
||||
+ if (senduser == NULL)
|
||||
+ return SRS_ENOMEM;
|
||||
+ memcpy(senduser, sender, len + 1);
|
||||
+ tmp = senduser + (at - sender);
|
||||
sendhost = tmp + 1;
|
||||
*tmp = '\0';
|
||||
|
||||
- return srs_compile_guarded(srs, buf, buflen,
|
||||
+ ret = srs_compile_guarded(srs, buf, buflen,
|
||||
sendhost, senduser, alias);
|
||||
+ srs_f_free(senduser);
|
||||
+ return ret;
|
||||
}
|
||||
|
||||
int
|
||||
@@ -649,10 +711,15 @@
|
||||
const char *sender, const char *alias)
|
||||
{
|
||||
char *buf;
|
||||
- int slen;
|
||||
- int alen;
|
||||
- int len;
|
||||
+ size_t slen;
|
||||
+ size_t alen;
|
||||
+ size_t len;
|
||||
int ret;
|
||||
+ size_t overhead;
|
||||
+
|
||||
+ if (srs == NULL || sptr == NULL || sender == NULL || alias == NULL)
|
||||
+ return SRS_EBUFTOOSMALL;
|
||||
+ *sptr = NULL;
|
||||
|
||||
if (srs->noforward)
|
||||
return SRS_ENOTREWRITTEN;
|
||||
@@ -661,10 +728,18 @@
|
||||
alen = strlen(alias);
|
||||
|
||||
/* strlen(SRSxTAG) + strlen("====+@") < 64 */
|
||||
- len = slen + alen + srs->hashlength + SRS_TIME_SIZE + 64;
|
||||
+ if (srs->hashlength < 0)
|
||||
+ return SRS_EBUFTOOSMALL;
|
||||
+ overhead = (size_t)srs->hashlength + SRS_TIME_SIZE + 64;
|
||||
+ if (slen > (size_t)INT_MAX - overhead ||
|
||||
+ alen > (size_t)INT_MAX - overhead - slen)
|
||||
+ return SRS_EBUFTOOSMALL;
|
||||
+ len = slen + alen + overhead;
|
||||
buf = (char *)srs_f_malloc(len);
|
||||
+ if (buf == NULL)
|
||||
+ return SRS_ENOMEM;
|
||||
|
||||
- ret = srs_forward(srs, buf, len, sender, alias);
|
||||
+ ret = srs_forward(srs, buf, (int)len, sender, alias);
|
||||
|
||||
if (ret == SRS_SUCCESS)
|
||||
*sptr = buf;
|
||||
@@ -679,7 +754,11 @@
|
||||
{
|
||||
char *senduser;
|
||||
char *tmp;
|
||||
- int len;
|
||||
+ size_t len;
|
||||
+ int ret;
|
||||
+
|
||||
+ if (srs == NULL || buf == NULL || sender == NULL || buflen <= 0)
|
||||
+ return SRS_EBUFTOOSMALL;
|
||||
|
||||
if (!SRS_IS_SRS_ADDRESS(sender))
|
||||
return SRS_ENOTSRSADDRESS;
|
||||
@@ -688,25 +767,31 @@
|
||||
return SRS_ENOTREWRITTEN;
|
||||
|
||||
len = strlen(sender);
|
||||
- if (len >= buflen)
|
||||
+ if (len >= (size_t)buflen || len >= INT_MAX)
|
||||
return SRS_EBUFTOOSMALL;
|
||||
- senduser = alloca(len + 1);
|
||||
- strcpy(senduser, sender);
|
||||
+ senduser = srs_f_malloc(len + 1);
|
||||
+ if (senduser == NULL)
|
||||
+ return SRS_ENOMEM;
|
||||
+ memcpy(senduser, sender, len + 1);
|
||||
|
||||
/* We don't really care about the host for reversal. */
|
||||
tmp = strchr(senduser, '@');
|
||||
if (tmp != NULL)
|
||||
*tmp = '\0';
|
||||
- return srs_parse_guarded(srs, buf, buflen, senduser);
|
||||
+ ret = srs_parse_guarded(srs, buf, buflen, senduser);
|
||||
+ srs_f_free(senduser);
|
||||
+ return ret;
|
||||
}
|
||||
|
||||
int
|
||||
srs_reverse_alloc(srs_t *srs, char **sptr, const char *sender)
|
||||
{
|
||||
char *buf;
|
||||
- int len;
|
||||
+ size_t len;
|
||||
int ret;
|
||||
|
||||
+ if (srs == NULL || sptr == NULL || sender == NULL)
|
||||
+ return SRS_EBUFTOOSMALL;
|
||||
*sptr = NULL;
|
||||
|
||||
if (!SRS_IS_SRS_ADDRESS(sender))
|
||||
@@ -715,10 +800,15 @@
|
||||
if (srs->noreverse)
|
||||
return SRS_ENOTREWRITTEN;
|
||||
|
||||
- len = strlen(sender) + 1;
|
||||
+ len = strlen(sender);
|
||||
+ if (len >= INT_MAX)
|
||||
+ return SRS_EBUFTOOSMALL;
|
||||
+ len++;
|
||||
buf = (char *)srs_f_malloc(len);
|
||||
+ if (buf == NULL)
|
||||
+ return SRS_ENOMEM;
|
||||
|
||||
- ret = srs_reverse(srs, buf, len, sender);
|
||||
+ ret = srs_reverse(srs, buf, (int)len, sender);
|
||||
|
||||
if (ret == SRS_SUCCESS)
|
||||
*sptr = buf;
|
||||
--- a/libsrs2/srs2.h
|
||||
+++ b/libsrs2/srs2.h
|
||||
@@ -14,6 +14,15 @@
|
||||
#ifndef __SRS2_H__
|
||||
#define __SRS2_H__
|
||||
|
||||
+#include <stddef.h>
|
||||
+#include <string.h>
|
||||
+#ifndef _WIN32
|
||||
+#include <strings.h>
|
||||
+#endif
|
||||
+#include <time.h>
|
||||
+
|
||||
+#define SRS2_SECURE_FREE_SECRETS 1
|
||||
+
|
||||
#ifndef __BEGIN_DECLS
|
||||
#define __BEGIN_DECLS
|
||||
#define __END_DECLS
|
||||
@@ -57,6 +66,8 @@
|
||||
|
||||
#define SRS_ENOSENDERATSIGN (SRS_ERRTYPE_INPUT | 1)
|
||||
#define SRS_EBUFTOOSMALL (SRS_ERRTYPE_INPUT | 2)
|
||||
+#define SRS_ENOMEM (SRS_ERRTYPE_INPUT | 3)
|
||||
+#define SRS_EINVAL (SRS_ERRTYPE_INPUT | 4)
|
||||
|
||||
#define SRS_ENOSRS0HOST (SRS_ERRTYPE_SYNTAX | 1)
|
||||
#define SRS_ENOSRS0USER (SRS_ERRTYPE_SYNTAX | 2)
|
||||
--- a/libsrs2/sha1.c
|
||||
+++ b/libsrs2/sha1.c
|
||||
@@ -114,63 +114,15 @@
|
||||
|
||||
dp = sha_info->data;
|
||||
|
||||
-/*
|
||||
-the following makes sure that at least one code block below is
|
||||
-traversed or an error is reported, without the necessity for nested
|
||||
-preprocessor if/else/endif blocks, which are a great pain in the
|
||||
-nether regions of the anatomy...
|
||||
-*/
|
||||
-#undef SWAP_DONE
|
||||
-
|
||||
-#if BYTEORDER == 0x1234
|
||||
-#define SWAP_DONE
|
||||
- /* assert(sizeof(ULONG) == 4); */
|
||||
- for (i = 0; i < 16; ++i) {
|
||||
- T = *((ULONG *) dp);
|
||||
- dp += 4;
|
||||
- W[i] = ((T << 24) & 0xff000000) | ((T << 8) & 0x00ff0000) |
|
||||
- ((T >> 8) & 0x0000ff00) | ((T >> 24) & 0x000000ff);
|
||||
- }
|
||||
-#endif
|
||||
-
|
||||
-#if BYTEORDER == 0x4321
|
||||
-#define SWAP_DONE
|
||||
- /* assert(sizeof(ULONG) == 4); */
|
||||
+ /* SHA-1 consumes big-endian 32-bit words. Assemble them byte by
|
||||
+ * byte so this remains aligned and in bounds when ULONG is 64 bits. */
|
||||
for (i = 0; i < 16; ++i) {
|
||||
- T = *((ULONG *) dp);
|
||||
+ W[i] = ((ULONG)dp[0] << 24) |
|
||||
+ ((ULONG)dp[1] << 16) |
|
||||
+ ((ULONG)dp[2] << 8) |
|
||||
+ (ULONG)dp[3];
|
||||
dp += 4;
|
||||
- W[i] = T32(T);
|
||||
- }
|
||||
-#endif
|
||||
-
|
||||
-#if BYTEORDER == 0x12345678
|
||||
-#define SWAP_DONE
|
||||
- /* assert(sizeof(ULONG) == 8); */
|
||||
- for (i = 0; i < 16; i += 2) {
|
||||
- T = *((ULONG *) dp);
|
||||
- dp += 8;
|
||||
- W[i] = ((T << 24) & 0xff000000) | ((T << 8) & 0x00ff0000) |
|
||||
- ((T >> 8) & 0x0000ff00) | ((T >> 24) & 0x000000ff);
|
||||
- T >>= 32;
|
||||
- W[i+1] = ((T << 24) & 0xff000000) | ((T << 8) & 0x00ff0000) |
|
||||
- ((T >> 8) & 0x0000ff00) | ((T >> 24) & 0x000000ff);
|
||||
}
|
||||
-#endif
|
||||
-
|
||||
-#if BYTEORDER == 0x87654321
|
||||
-#define SWAP_DONE
|
||||
- /* assert(sizeof(ULONG) == 8); */
|
||||
- for (i = 0; i < 16; i += 2) {
|
||||
- T = *((ULONG *) dp);
|
||||
- dp += 8;
|
||||
- W[i] = T32(T >> 32);
|
||||
- W[i+1] = T32(T);
|
||||
- }
|
||||
-#endif
|
||||
-
|
||||
-#ifndef SWAP_DONE
|
||||
-#error Unknown byte order -- you need to add code here
|
||||
-#endif /* SWAP_DONE */
|
||||
|
||||
for (i = 16; i < 80; ++i) {
|
||||
W[i] = W[i-3] ^ W[i-8] ^ W[i-14] ^ W[i-16];
|
||||
@@ -240,7 +192,7 @@
|
||||
/* update the SHA digest */
|
||||
|
||||
static void
|
||||
-sha_update(SHA_INFO *sha_info, sha_byte *buffer, int count)
|
||||
+sha_update(SHA_INFO *sha_info, const sha_byte *buffer, int count)
|
||||
{
|
||||
int i;
|
||||
ULONG clo;
|
||||
@@ -353,7 +305,7 @@
|
||||
*/
|
||||
|
||||
static void
|
||||
-sha_digest(char *out, char *data, int len)
|
||||
+sha_digest(unsigned char *out, const unsigned char *data, int len)
|
||||
{
|
||||
SHA_INFO ctx;
|
||||
sha_init(&ctx);
|
||||
@@ -364,13 +316,13 @@
|
||||
void
|
||||
srs_hmac_init(srs_hmac_ctx_t *ctx, char *secret, int len)
|
||||
{
|
||||
- char sbuf[SHA_BLOCKSIZE];
|
||||
+ unsigned char sbuf[SHA_BLOCKSIZE];
|
||||
int i;
|
||||
|
||||
if (len > SHA_BLOCKSIZE) {
|
||||
- sha_digest(sbuf, secret, len);
|
||||
- secret = sbuf;
|
||||
- len = strlen(sbuf); /* SHA_BLOCKSIZE? */
|
||||
+ sha_digest(sbuf, (const unsigned char *)secret, len);
|
||||
+ secret = (char *)sbuf;
|
||||
+ len = SHA_DIGESTSIZE;
|
||||
}
|
||||
|
||||
memset(ctx->ipad, 0x36, SHA_BLOCKSIZE);
|
||||
@@ -383,23 +335,23 @@
|
||||
memset(sbuf, 0, SHA_BLOCKSIZE);
|
||||
|
||||
sha_init(&ctx->sctx);
|
||||
- sha_update(&ctx->sctx, ctx->ipad, SHA_BLOCKSIZE);
|
||||
+ sha_update(&ctx->sctx, (const unsigned char *)ctx->ipad, SHA_BLOCKSIZE);
|
||||
}
|
||||
|
||||
void
|
||||
srs_hmac_update(srs_hmac_ctx_t *ctx, char *data, int len)
|
||||
{
|
||||
- sha_update(&ctx->sctx, data, len);
|
||||
+ sha_update(&ctx->sctx, (const unsigned char *)data, len);
|
||||
}
|
||||
|
||||
void
|
||||
srs_hmac_fini(srs_hmac_ctx_t *ctx, char *out)
|
||||
{
|
||||
- char buf[SHA_DIGESTSIZE + 1];
|
||||
+ unsigned char buf[SHA_DIGESTSIZE];
|
||||
|
||||
sha_final(buf, &ctx->sctx);
|
||||
sha_init(&ctx->sctx);
|
||||
- sha_update(&ctx->sctx, ctx->opad, SHA_BLOCKSIZE);
|
||||
+ sha_update(&ctx->sctx, (const unsigned char *)ctx->opad, SHA_BLOCKSIZE);
|
||||
sha_update(&ctx->sctx, buf, SHA_DIGESTSIZE);
|
||||
- sha_final(out, &ctx->sctx);
|
||||
+ sha_final((unsigned char *)out, &ctx->sctx);
|
||||
}
|
||||
--- a/tools/srs.c
|
||||
+++ b/tools/srs.c
|
||||
@@ -133,6 +133,27 @@
|
||||
}
|
||||
|
||||
static int
|
||||
+write_all(int fd, const char *buf, size_t len)
|
||||
+{
|
||||
+ while (len > 0) {
|
||||
+ ssize_t written = write(fd, buf, len);
|
||||
+
|
||||
+ if (written < 0) {
|
||||
+ if (errno == EINTR)
|
||||
+ continue;
|
||||
+ return -1;
|
||||
+ }
|
||||
+ if (written == 0) {
|
||||
+ errno = EIO;
|
||||
+ return -1;
|
||||
+ }
|
||||
+ buf += written;
|
||||
+ len -= (size_t)written;
|
||||
+ }
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static int
|
||||
listen_socket(char *path)
|
||||
{
|
||||
struct sockaddr_un addr;
|
||||
@@ -144,7 +165,12 @@
|
||||
}
|
||||
memset(&addr, 0, sizeof(addr));
|
||||
addr.sun_family = AF_UNIX;
|
||||
- strcpy(addr.sun_path, path);
|
||||
+ if (strlen(path) >= sizeof(addr.sun_path)) {
|
||||
+ errno = ENAMETOOLONG;
|
||||
+ perror("socket path");
|
||||
+ SRS_DIE();
|
||||
+ }
|
||||
+ memcpy(addr.sun_path, path, strlen(path) + 1);
|
||||
if (unlink(path) < 0) {
|
||||
if (errno != ENOENT) {
|
||||
perror("unlink");
|
||||
@@ -174,8 +200,9 @@
|
||||
int sock;
|
||||
int maxfd;
|
||||
int fd;
|
||||
- char line[BUFSIZ];
|
||||
- int len;
|
||||
+ int client_fd;
|
||||
+ char line[BUFSIZ + 1];
|
||||
+ ssize_t len;
|
||||
char buf[BUFSIZ];
|
||||
char *cp;
|
||||
char *address;
|
||||
@@ -190,8 +217,8 @@
|
||||
FD_SET(sock, &readfds_sv);
|
||||
maxfd = sock + 1;
|
||||
|
||||
-#define FINISH(fd) close(fd); FD_CLR(fd, &readfds_sv)
|
||||
-#define SKIPWHITE(cp) while (isspace(*cp)) cp++;
|
||||
+#define FINISH(fd) do { close(fd); FD_CLR(fd, &readfds_sv); } while (0)
|
||||
+#define SKIPWHITE(cp) while (isspace((unsigned char)*(cp))) (cp)++;
|
||||
|
||||
if (!(daemonflags & DF_NOFORK)) {
|
||||
if (daemon(0, 0) < 0)
|
||||
@@ -201,19 +228,31 @@
|
||||
for (;;) {
|
||||
memcpy(&readfds, &readfds_sv, sizeof(fd_set));
|
||||
|
||||
- select(maxfd, &readfds, NULL, NULL, NULL);
|
||||
+ ret = select(maxfd, &readfds, NULL, NULL, NULL);
|
||||
+ if (ret < 0) {
|
||||
+ if (errno == EINTR)
|
||||
+ continue;
|
||||
+ perror("select");
|
||||
+ break;
|
||||
+ }
|
||||
for (fd = 0; fd < maxfd; fd++) {
|
||||
if (FD_ISSET(fd, &readfds)) {
|
||||
if (fd == sock) {
|
||||
- fd = accept(sock, (struct sockaddr*)&addr,&addrlen);
|
||||
- if (fd < 0) {
|
||||
+ addrlen = sizeof(addr);
|
||||
+ client_fd = accept(sock, (struct sockaddr *)&addr,
|
||||
+ &addrlen);
|
||||
+ if (client_fd < 0) {
|
||||
perror("accept");
|
||||
continue;
|
||||
}
|
||||
- FD_SET(fd, &readfds_sv);
|
||||
- if (fd >= maxfd)
|
||||
- maxfd = fd + 1;
|
||||
- fprintf(stderr, "Accept %d\n", fd);
|
||||
+ if (client_fd >= FD_SETSIZE) {
|
||||
+ close(client_fd);
|
||||
+ continue;
|
||||
+ }
|
||||
+ FD_SET(client_fd, &readfds_sv);
|
||||
+ if (client_fd >= maxfd)
|
||||
+ maxfd = client_fd + 1;
|
||||
+ fprintf(stderr, "Accept %d\n", client_fd);
|
||||
continue;
|
||||
}
|
||||
else {
|
||||
@@ -225,12 +264,13 @@
|
||||
FINISH(fd);
|
||||
continue;
|
||||
}
|
||||
+ line[len] = '\0';
|
||||
line[strcspn(line, "\r\n")] = '\0';
|
||||
fprintf(stderr, "%d: %s\n", fd, line);
|
||||
|
||||
if (strncasecmp(line, "forward ", 8) == 0) {
|
||||
cp = line + 8;
|
||||
- while (isspace(*cp))
|
||||
+ while (isspace((unsigned char)*cp))
|
||||
cp++;
|
||||
address = cp;
|
||||
cp = strchr(address, ' ');
|
||||
@@ -241,7 +281,7 @@
|
||||
continue;
|
||||
}
|
||||
*cp++ = '\0';
|
||||
- while (isspace(*cp))
|
||||
+ while (isspace((unsigned char)*cp))
|
||||
cp++;
|
||||
alias = cp;
|
||||
ret = srs_forward(srs, buf, BUFSIZ,
|
||||
@@ -254,14 +294,15 @@
|
||||
}
|
||||
fprintf(stderr, "Forward %s, %s -> %s\n",
|
||||
address, alias, buf);
|
||||
- write(fd, buf, strlen(buf));
|
||||
- write(fd, "\n", 1);
|
||||
+ if (write_all(fd, buf, strlen(buf)) < 0 ||
|
||||
+ write_all(fd, "\n", 1) < 0)
|
||||
+ perror("write");
|
||||
FINISH(fd);
|
||||
continue;
|
||||
}
|
||||
else if (strncasecmp(line, "reverse ", 8) == 0) {
|
||||
cp = line + 8;
|
||||
- while (isspace(*cp))
|
||||
+ while (isspace((unsigned char)*cp))
|
||||
cp++;
|
||||
address = cp;
|
||||
ret = srs_reverse(srs, buf, BUFSIZ, address);
|
||||
@@ -273,8 +314,9 @@
|
||||
}
|
||||
fprintf(stderr, "Reverse %s -> %s\n",
|
||||
address, buf);
|
||||
- write(fd, buf, strlen(buf));
|
||||
- write(fd, "\n", 1);
|
||||
+ if (write_all(fd, buf, strlen(buf)) < 0 ||
|
||||
+ write_all(fd, "\n", 1) < 0)
|
||||
+ perror("write");
|
||||
FINISH(fd);
|
||||
continue;
|
||||
}
|
||||
@@ -1,135 +0,0 @@
|
||||
--- a/debian/changelog
|
||||
+++ b/debian/changelog
|
||||
@@ -1,3 +1,18 @@
|
||||
+libsrs2 (1.0.18-4+bongo1) trixie; urgency=medium
|
||||
+
|
||||
+ * Rebuild the archived source for Debian Trixie.
|
||||
+ * Update debhelper compatibility and multiarch library paths.
|
||||
+ * Apply Gentoo's parallel-build fix and regenerate the Autotools files.
|
||||
+ * Modernize obsolete Autoconf macros and preserve caller compiler flags.
|
||||
+ * Harden bounded formatting and long Unix-socket path handling.
|
||||
+ * Correct binary SHA-1 digest handling for HMAC keys over one block.
|
||||
+ * Eliminate unaligned and out-of-bounds SHA-1 reads on 64-bit systems.
|
||||
+ * Remove attacker-sized stack allocations and fix secret allocation leaks.
|
||||
+ * Harden the srs daemon's socket, read, and partial-write handling.
|
||||
+ * Resolve GCC 14 signedness and format-overflow diagnostics.
|
||||
+
|
||||
+ -- Bongo Project <bongo-dev@disconnected-by-peer.at> Sun, 19 Jul 2026 19:00:00 +0200
|
||||
+
|
||||
libsrs2 (1.0.18-4) unstable; urgency=low
|
||||
|
||||
* Reupload this to Debian.
|
||||
@@ -62,4 +77,3 @@
|
||||
* Initial Release.
|
||||
|
||||
-- Shevek <srs@anarres.org> Sat, 5 Jun 2004 22:48:16 +0100
|
||||
-
|
||||
--- a/debian/control
|
||||
+++ b/debian/control
|
||||
@@ -1,13 +1,15 @@
|
||||
Source: libsrs2
|
||||
Priority: optional
|
||||
-Maintainer: Pierre Habouzit <madcoder@debian.org>
|
||||
-Build-Depends: debhelper (>= 5), cdbs, file, autotools-dev
|
||||
-Standards-Version: 3.7.2
|
||||
+Maintainer: Bongo Project <bongo-dev@disconnected-by-peer.at>
|
||||
+Build-Depends: debhelper-compat (= 13), dh-autoreconf, file
|
||||
+Standards-Version: 4.7.2
|
||||
+Rules-Requires-Root: no
|
||||
|
||||
Package: libsrs2-dev
|
||||
Section: libdevel
|
||||
Architecture: any
|
||||
-Depends: libsrs2-0 (= ${binary:Version})
|
||||
+Multi-Arch: same
|
||||
+Depends: libsrs2-0 (= ${binary:Version}), ${misc:Depends}
|
||||
Provides: libsrs-dev
|
||||
Description: Development tools for the libsrs2
|
||||
libsrs2 is the next generation SRS library. SPF verifies that the
|
||||
@@ -20,7 +22,8 @@
|
||||
Package: libsrs2-0
|
||||
Section: libs
|
||||
Architecture: any
|
||||
-Depends: ${shlibs:Depends}
|
||||
+Multi-Arch: same
|
||||
+Depends: ${shlibs:Depends}, ${misc:Depends}
|
||||
Description: SRS email address rewriting engine
|
||||
libsrs2 is the next generation SRS library. SPF verifies that the
|
||||
Sender address of a mail matches (according to some policy) the
|
||||
@@ -28,3 +31,11 @@
|
||||
the sender address must be rewritten to comply with SPF policy. The
|
||||
Sender Rewriting Scheme, or SRS, provides a standard for this
|
||||
rewriting which is not vulnerable to attacks by spammers.
|
||||
+
|
||||
+Package: srs2
|
||||
+Section: mail
|
||||
+Architecture: any
|
||||
+Depends: libsrs2-0 (= ${binary:Version}), ${shlibs:Depends}, ${misc:Depends}
|
||||
+Description: Command-line Sender Rewriting Scheme utility
|
||||
+ This package contains the srs command-line utility for forwarding and
|
||||
+ reversing envelope sender addresses using the Sender Rewriting Scheme.
|
||||
--- a/debian/rules
|
||||
+++ b/debian/rules
|
||||
@@ -1,9 +1,17 @@
|
||||
#!/usr/bin/make -f
|
||||
|
||||
-include /usr/share/cdbs/1/class/autotools.mk
|
||||
-include /usr/share/cdbs/1/rules/debhelper.mk
|
||||
+include /usr/share/dpkg/architecture.mk
|
||||
|
||||
-DEB_DH_MAKESHLIBS_ARGS_ALL := -V
|
||||
+export DEB_BUILD_MAINT_OPTIONS = hardening=+all
|
||||
|
||||
-clean::
|
||||
- $(RM) config.log
|
||||
+%:
|
||||
+ dh $@ --with autoreconf
|
||||
+
|
||||
+override_dh_auto_configure:
|
||||
+ dh_auto_configure -- --libdir=/usr/lib/$(DEB_HOST_MULTIARCH)
|
||||
+
|
||||
+override_dh_auto_test:
|
||||
+ @echo "libsrs2 has no upstream test suite"
|
||||
+
|
||||
+override_dh_makeshlibs:
|
||||
+ dh_makeshlibs -V
|
||||
--- a/debian/libsrs2-0.install
|
||||
+++ b/debian/libsrs2-0.install
|
||||
@@ -1 +1 @@
|
||||
-debian/tmp/usr/lib/*.so.* usr/lib
|
||||
+usr/lib/*/libsrs2.so.*
|
||||
--- a/debian/libsrs2-dev.install
|
||||
+++ b/debian/libsrs2-dev.install
|
||||
@@ -1,4 +1,3 @@
|
||||
-debian/tmp/usr/lib/*.so usr/lib
|
||||
-debian/tmp/usr/lib/*.a usr/lib
|
||||
-debian/tmp/usr/lib/*.la usr/lib
|
||||
-debian/tmp/usr/include/* usr/include
|
||||
+usr/lib/*/libsrs2.so
|
||||
+usr/lib/*/libsrs2.a
|
||||
+usr/include/*
|
||||
--- a/debian/compat
|
||||
+++ /dev/null
|
||||
@@ -1 +0,0 @@
|
||||
-5
|
||||
--- /dev/null
|
||||
+++ b/debian/not-installed
|
||||
@@ -0,0 +1 @@
|
||||
+usr/lib/*/libsrs2.la
|
||||
--- /dev/null
|
||||
+++ b/debian/patches/series
|
||||
@@ -0,0 +1,2 @@
|
||||
+0001-build-modernization.patch
|
||||
+0002-security-hardening.patch
|
||||
--- /dev/null
|
||||
+++ b/debian/source/format
|
||||
@@ -0,0 +1 @@
|
||||
+3.0 (quilt)
|
||||
--- /dev/null
|
||||
+++ b/debian/srs2.install
|
||||
@@ -0,0 +1 @@
|
||||
+usr/bin/srs
|
||||
--- /dev/null
|
||||
+++ b/debian/srs2.manpages
|
||||
@@ -0,0 +1 @@
|
||||
+debian/srs.1
|
||||
@@ -1,53 +0,0 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "srs2.h"
|
||||
|
||||
int main(void)
|
||||
{
|
||||
srs_t *srs = srs_new();
|
||||
char long_secret[129];
|
||||
char encoded[512];
|
||||
char decoded[512];
|
||||
char tiny[8];
|
||||
char *allocated = NULL;
|
||||
srs_hmac_ctx_t hmac;
|
||||
unsigned char hmac_key[20];
|
||||
unsigned char digest[SHA_DIGESTSIZE];
|
||||
static const unsigned char expected[SHA_DIGESTSIZE] = {
|
||||
0xb6, 0x17, 0x31, 0x86, 0x55, 0x05, 0x72, 0x64, 0xe2, 0x8b,
|
||||
0xc0, 0xb6, 0xfb, 0x37, 0x8c, 0x8e, 0xf1, 0x46, 0xbe, 0x00
|
||||
};
|
||||
int rc;
|
||||
|
||||
memset(long_secret, 's', sizeof(long_secret) - 1);
|
||||
long_secret[sizeof(long_secret) - 1] = '\0';
|
||||
if (srs == NULL || srs_add_secret(srs, long_secret) != SRS_SUCCESS)
|
||||
return 1;
|
||||
rc = srs_forward(srs, encoded, sizeof(encoded),
|
||||
"sender@example.net", "forward.example.org");
|
||||
if (rc != SRS_SUCCESS)
|
||||
return 2;
|
||||
rc = srs_reverse(srs, decoded, sizeof(decoded), encoded);
|
||||
if (rc != SRS_SUCCESS || strcmp(decoded, "sender@example.net") != 0)
|
||||
return 3;
|
||||
if (srs_forward(srs, tiny, sizeof(tiny),
|
||||
"sender@example.net", "forward.example.org") !=
|
||||
SRS_EBUFTOOSMALL)
|
||||
return 4;
|
||||
rc = srs_forward_alloc(srs, &allocated, "sender@example.net",
|
||||
"forward.example.org");
|
||||
if (rc != SRS_SUCCESS || allocated == NULL)
|
||||
return 5;
|
||||
free(allocated);
|
||||
memset(hmac_key, 0x0b, sizeof(hmac_key));
|
||||
srs_hmac_init(&hmac, (char *)hmac_key, sizeof(hmac_key));
|
||||
srs_hmac_update(&hmac, "Hi There", 8);
|
||||
srs_hmac_fini(&hmac, (char *)digest);
|
||||
if (memcmp(digest, expected, sizeof(expected)) != 0)
|
||||
return 6;
|
||||
srs_free(srs);
|
||||
puts("libsrs2 security regression test: PASS");
|
||||
return 0;
|
||||
}
|
||||
@@ -1,54 +0,0 @@
|
||||
# Mailutils packages for Debian Trixie
|
||||
|
||||
Bongo rebuilds Debian Trixie's Mailutils 3.19 source with the Sieve ownership
|
||||
repair required by its native filtering and ManageSieve implementation. The
|
||||
release bundle never substitutes an unpatched runner copy.
|
||||
|
||||
## Source inputs
|
||||
|
||||
Download these files from
|
||||
`https://deb.debian.org/debian/pool/main/m/mailutils/`:
|
||||
|
||||
| File | SHA-256 |
|
||||
| --- | --- |
|
||||
| `mailutils_3.19.orig.tar.xz` | `50230d20036c5b8ad8c96b0d996177f1f133fba4c7c7e3b462d39eeb30849f45` |
|
||||
| `mailutils_3.19.orig.tar.xz.asc` | `4a7560b5a716a04e57b88ae312fe879b6f702c960ae9c7df6e15d7d172fbfd4b` |
|
||||
| `mailutils_3.19-1.debian.tar.xz` | `181de5e8c4f5a35e6a749c4a0d9143199c4374cd1887aaf19940dc31a4f7bd16` |
|
||||
| `mailutils_3.19-1.dsc` | `079dcec1749fe025b55686b439c99cf710d8c6524b3cc991060f4c97fcc44d9a` |
|
||||
|
||||
The workflow verifies these hashes before `dpkg-source` reads any input.
|
||||
|
||||
The Debian binary-package split is retained without modification. The build
|
||||
therefore still produces `libmailutils9t64`, `libmu-dbm9t64`,
|
||||
`libmailutils-dev`, `mailutils`, `mailutils-common`, `mailutils-comsatd`,
|
||||
`mailutils-doc`, `mailutils-guile`, `mailutils-imap4d`, `mailutils-mda`,
|
||||
`mailutils-mh`, `mailutils-pop3d`, and `python3-mailutils`. The release ZIP
|
||||
contains all of those freshly rebuilt packages, while Bongo's installer
|
||||
selects only the runtime libraries and common data it needs.
|
||||
|
||||
## Patch order
|
||||
|
||||
After `dpkg-source -x mailutils_3.19-1.dsc`, install
|
||||
`0001-sieve-parser-ownership.patch` as the final quilt patch and apply
|
||||
`0002-debian-trixie.patch` directly to the Debian changelog. The official
|
||||
Trixie `debian/control`, package names, install lists, and dependencies are not
|
||||
changed.
|
||||
|
||||
The source patch gives Bison destructors to discarded identifiers and syntax
|
||||
trees, and destroys the Sieve checker list on the successful path. Both are
|
||||
ownership fixes: malformed or repeatedly validated scripts must not retain
|
||||
parser or checker allocations.
|
||||
|
||||
## Build and verification
|
||||
|
||||
Build both source and binary artifacts on Trixie:
|
||||
|
||||
```sh
|
||||
dpkg-buildpackage -us -uc -S
|
||||
dpkg-buildpackage -us -uc -b
|
||||
```
|
||||
|
||||
Compile `tests/sieve-ownership-regression.c` against the newly built library
|
||||
and run it under Valgrind or LeakSanitizer. The release ZIP contains the
|
||||
complete rebuilt source package and its binary packages. Bongo must link to
|
||||
the `1:3.19-1+bongo1` library produced by this build.
|
||||
@@ -1,55 +0,0 @@
|
||||
diff --git a/libmu_sieve/prog.c b/libmu_sieve/prog.c
|
||||
--- a/libmu_sieve/prog.c
|
||||
+++ b/libmu_sieve/prog.c
|
||||
@@ -317,2 +317,4 @@ mu_i_sv_lint_command (struct mu_sieve_machine *mach,
|
||||
err = mu_list_foreach (chk_list, _run_checker, &chk_arg);
|
||||
}
|
||||
+
|
||||
+ mu_list_destroy (&chk_list);
|
||||
diff --git a/libmu_sieve/sieve-gram.y b/libmu_sieve/sieve-gram.y
|
||||
--- a/libmu_sieve/sieve-gram.y
|
||||
+++ b/libmu_sieve/sieve-gram.y
|
||||
@@ -35,2 +35,3 @@ static struct mu_sieve_node *node_alloc (enum mu_sieve_node_type,
|
||||
static void node_list_add (struct mu_sieve_node_list *list,
|
||||
struct mu_sieve_node *node);
|
||||
+static void tree_free (struct mu_sieve_node **tree);
|
||||
@@ -77 +78,6 @@ static void node_list_add (struct mu_sieve_node_list *list,
|
||||
+/* Reclaim partially built syntax trees if error recovery discards their
|
||||
+ semantic values. Lexer identifiers are owned by the machine pool. */
|
||||
+%destructor { tree_free (&$$); } <node>
|
||||
+%destructor { tree_free (&$$.head); } <node_list>
|
||||
+
|
||||
%%
|
||||
@@ -1455,10 +1461,10 @@ with_machine (mu_sieve_machine_t mach, int (*thunk) (void *), void *data)
|
||||
mu_sieve_stream_save (mach);
|
||||
rc = thunk (data);
|
||||
- mu_sieve_stream_restore (mach);
|
||||
-
|
||||
- mu_stream_unref (save_errstr);
|
||||
- mu_strerr = save_errstr;
|
||||
- mu_stream_unref (mu_strerr);
|
||||
}
|
||||
else
|
||||
mach->state = mu_sieve_state_error;
|
||||
+
|
||||
+ mu_sieve_stream_restore (mach);
|
||||
+ mu_stream_unref (mu_strerr);
|
||||
+ mu_strerr = save_errstr;
|
||||
+ mu_stream_unref (save_errstr);
|
||||
diff --git a/libmu_sieve/sieve-lex.l b/libmu_sieve/sieve-lex.l
|
||||
--- a/libmu_sieve/sieve-lex.l
|
||||
+++ b/libmu_sieve/sieve-lex.l
|
||||
@@ -585,12 +585,7 @@ multiline_finish (void)
|
||||
static void
|
||||
ident (const char *text)
|
||||
{
|
||||
- yylval.string = strdup (text);
|
||||
- if (!yylval.string)
|
||||
- {
|
||||
- mu_sieve_yyerror (_("not enough memory"));
|
||||
- exit (1);
|
||||
- }
|
||||
+ yylval.string = mu_sieve_strdup (mu_sieve_machine, text);
|
||||
}
|
||||
|
||||
static mu_i_sv_interp_t string_interpreter;
|
||||
@@ -1,15 +0,0 @@
|
||||
diff --git a/debian/changelog b/debian/changelog
|
||||
index e01e7a1..4bfb44e 100644
|
||||
--- a/debian/changelog
|
||||
+++ b/debian/changelog
|
||||
@@ -1,3 +1,10 @@
|
||||
+mailutils (1:3.19-1+bongo1) trixie; urgency=medium
|
||||
+
|
||||
+ * Rebuild the Debian Trixie source with the maintained Sieve parser and
|
||||
+ checker-list ownership fixes used by Bongo.
|
||||
+
|
||||
+ -- Bongo Project <bongo-dev@disconnected-by-peer.at> Mon, 20 Jul 2026 12:45:00 +0200
|
||||
+
|
||||
mailutils (1:3.19-1) unstable; urgency=medium
|
||||
|
||||
* New upstream release.
|
||||
@@ -1,53 +0,0 @@
|
||||
#include <mailutils/mailutils.h>
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
int
|
||||
main(int argc, char **argv)
|
||||
{
|
||||
static const char malformed[] =
|
||||
"require [\"fileinto\"];\n"
|
||||
"if anyof (header :contains \"subject\" [\"test\"], true {\n"
|
||||
" fileinto \"Broken\";\n";
|
||||
static const char checker_error[] =
|
||||
"require [\"fileinto\"];\n"
|
||||
"fileinto :copy;\n";
|
||||
struct mu_locus_point locus = MU_LOCUS_POINT_INITIALIZER;
|
||||
mu_stream_t sink = NULL;
|
||||
unsigned int iteration;
|
||||
|
||||
(void)argc;
|
||||
mu_set_program_name(argv[0]);
|
||||
mu_stdstream_setup(MU_STDSTREAM_RESET_NONE);
|
||||
if (mu_locus_point_set_file(&locus, "sieve-ownership-regression") != 0)
|
||||
return 1;
|
||||
if (mu_nullstream_create(&sink, MU_STREAM_WRITE) != 0)
|
||||
return 2;
|
||||
|
||||
for (iteration = 0; iteration < 1000; iteration++) {
|
||||
mu_sieve_machine_t machine = NULL;
|
||||
|
||||
if (mu_sieve_machine_create(&machine) != 0 || machine == NULL)
|
||||
return 3;
|
||||
mu_sieve_set_diag_stream(machine, sink);
|
||||
mu_sieve_set_dbg_stream(machine, sink);
|
||||
if (mu_sieve_compile_text(machine, malformed, strlen(malformed),
|
||||
&locus) == 0)
|
||||
return 4;
|
||||
mu_sieve_machine_destroy(&machine);
|
||||
|
||||
if (mu_sieve_machine_create(&machine) != 0 || machine == NULL)
|
||||
return 5;
|
||||
mu_sieve_set_diag_stream(machine, sink);
|
||||
mu_sieve_set_dbg_stream(machine, sink);
|
||||
(void)mu_sieve_compile_text(machine, checker_error,
|
||||
strlen(checker_error), &locus);
|
||||
mu_sieve_machine_destroy(&machine);
|
||||
}
|
||||
|
||||
mu_stream_destroy(&sink);
|
||||
mu_locus_point_deinit(&locus);
|
||||
puts("Mailutils Sieve ownership regression test: PASS");
|
||||
return 0;
|
||||
}
|
||||
@@ -1,30 +0,0 @@
|
||||
# Load proxy, proxy_http, headers, ssl, rewrite, and http2 in Apache.
|
||||
# Bongo Web itself listens on 127.0.0.1:8080.
|
||||
|
||||
<VirtualHost *:443>
|
||||
ServerName mail.example.net
|
||||
|
||||
SSLEngine on
|
||||
SSLCertificateFile /etc/letsencrypt/live/mail.example.net/fullchain.pem
|
||||
SSLCertificateKeyFile /etc/letsencrypt/live/mail.example.net/privkey.pem
|
||||
|
||||
ProxyRequests Off
|
||||
ProxyPreserveHost On
|
||||
ProxyPass / http://127.0.0.1:8080/ connectiontimeout=5 timeout=60
|
||||
ProxyPassReverse / http://127.0.0.1:8080/
|
||||
|
||||
RequestHeader set X-Forwarded-Proto "https"
|
||||
RequestHeader set X-Forwarded-Port "443"
|
||||
|
||||
Header always set Strict-Transport-Security "max-age=31536000"
|
||||
Header always set X-Content-Type-Options "nosniff"
|
||||
Header always set Referrer-Policy "same-origin"
|
||||
|
||||
ErrorLog ${APACHE_LOG_DIR}/bongo-error.log
|
||||
CustomLog ${APACHE_LOG_DIR}/bongo-access.log combined
|
||||
</VirtualHost>
|
||||
|
||||
<VirtualHost *:80>
|
||||
ServerName mail.example.net
|
||||
Redirect permanent / https://mail.example.net/
|
||||
</VirtualHost>
|
||||
@@ -1,66 +0,0 @@
|
||||
# Replace 172.16.11.14 with the Bongo host. Each backend sends PROXY v2;
|
||||
# configure the HAProxy source network in every corresponding Bongo document.
|
||||
|
||||
frontend fe_bongo_smtp
|
||||
bind :25
|
||||
mode tcp
|
||||
default_backend be_bongo_smtp
|
||||
backend be_bongo_smtp
|
||||
mode tcp
|
||||
server bongo 172.16.11.14:25 check send-proxy-v2
|
||||
|
||||
frontend fe_bongo_submission
|
||||
bind :587
|
||||
mode tcp
|
||||
default_backend be_bongo_submission
|
||||
backend be_bongo_submission
|
||||
mode tcp
|
||||
server bongo 172.16.11.14:587 check send-proxy-v2
|
||||
|
||||
frontend fe_bongo_submissions
|
||||
bind :465
|
||||
mode tcp
|
||||
default_backend be_bongo_submissions
|
||||
backend be_bongo_submissions
|
||||
mode tcp
|
||||
server bongo 172.16.11.14:465 check send-proxy-v2
|
||||
|
||||
frontend fe_bongo_imap
|
||||
bind :143
|
||||
mode tcp
|
||||
default_backend be_bongo_imap
|
||||
backend be_bongo_imap
|
||||
mode tcp
|
||||
server bongo 172.16.11.14:143 check send-proxy-v2
|
||||
|
||||
frontend fe_bongo_imaps
|
||||
bind :993
|
||||
mode tcp
|
||||
default_backend be_bongo_imaps
|
||||
backend be_bongo_imaps
|
||||
mode tcp
|
||||
server bongo 172.16.11.14:993 check send-proxy-v2
|
||||
|
||||
frontend fe_bongo_pop3
|
||||
bind :110
|
||||
mode tcp
|
||||
default_backend be_bongo_pop3
|
||||
backend be_bongo_pop3
|
||||
mode tcp
|
||||
server bongo 172.16.11.14:110 check send-proxy-v2
|
||||
|
||||
frontend fe_bongo_pop3s
|
||||
bind :995
|
||||
mode tcp
|
||||
default_backend be_bongo_pop3s
|
||||
backend be_bongo_pop3s
|
||||
mode tcp
|
||||
server bongo 172.16.11.14:995 check send-proxy-v2
|
||||
|
||||
frontend fe_bongo_sieve
|
||||
bind :4190
|
||||
mode tcp
|
||||
default_backend be_bongo_sieve
|
||||
backend be_bongo_sieve
|
||||
mode tcp
|
||||
server bongo 172.16.11.14:4190 check send-proxy-v2
|
||||
@@ -1,30 +0,0 @@
|
||||
server {
|
||||
listen 80;
|
||||
server_name mail.example.net;
|
||||
return 308 https://$host$request_uri;
|
||||
}
|
||||
|
||||
server {
|
||||
listen 443 ssl http2;
|
||||
server_name mail.example.net;
|
||||
|
||||
ssl_certificate /etc/letsencrypt/live/mail.example.net/fullchain.pem;
|
||||
ssl_certificate_key /etc/letsencrypt/live/mail.example.net/privkey.pem;
|
||||
|
||||
client_max_body_size 10m;
|
||||
|
||||
location / {
|
||||
proxy_pass http://127.0.0.1:8080;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto https;
|
||||
proxy_set_header X-Forwarded-Port 443;
|
||||
proxy_connect_timeout 5s;
|
||||
proxy_read_timeout 60s;
|
||||
}
|
||||
|
||||
add_header Strict-Transport-Security "max-age=31536000" always;
|
||||
add_header X-Content-Type-Options "nosniff" always;
|
||||
add_header Referrer-Policy "same-origin" always;
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
# Nginx Proxy Manager
|
||||
|
||||
Create one Proxy Host for the Bongo hostname. Use `http` as the forwarding
|
||||
scheme, the mail host as the forwarding hostname/IP, and port `8080` when NPM
|
||||
talks directly to Bongo Web. Enable the public certificate, HTTP/2, and
|
||||
"Force SSL". Websocket support is harmless but is not required by Bongo 0.7.
|
||||
|
||||
In Bongo, select the Nginx Proxy Manager deployment and add only the actual NPM
|
||||
container/host address or CIDR to `web.trusted_proxies`. Do not use
|
||||
`0.0.0.0/0`. Bongo accepts `X-Forwarded-For` only while the immediate peer is
|
||||
trusted, and peels trusted proxy hops from the right side of the chain.
|
||||
|
||||
If NPM forwards first to Apache on the mail host and Apache then forwards to
|
||||
Bongo, configure both NPM's source network and Apache's address as trusted
|
||||
proxies. Apache must preserve the incoming `X-Forwarded-For` chain.
|
||||
|
||||
NPM's normal Proxy Host is HTTP-only. Publish SMTP, submission, IMAP, POP3,
|
||||
and ManageSieve with a TCP proxy such as HAProxy and enable Bongo's PROXY
|
||||
protocol only for that proxy's source network. See `haproxy-bongo.cfg`.
|
||||
Vendored
-17
@@ -1,17 +0,0 @@
|
||||
#!/bin/sh
|
||||
set -e
|
||||
|
||||
if [ "$1" = configure ]; then
|
||||
if command -v systemd-sysusers >/dev/null 2>&1; then
|
||||
systemd-sysusers bongo-user.conf
|
||||
elif ! getent passwd bongo >/dev/null 2>&1; then
|
||||
adduser --system --group --home /var/lib/bongo --no-create-home bongo
|
||||
fi
|
||||
if command -v systemd-tmpfiles >/dev/null 2>&1; then
|
||||
systemd-tmpfiles --create bongo.conf
|
||||
fi
|
||||
fi
|
||||
|
||||
#DEBHELPER#
|
||||
|
||||
exit 0
|
||||
Vendored
-6
@@ -1,6 +0,0 @@
|
||||
bongo (0.7.0-1) trixie; urgency=medium
|
||||
|
||||
* Package the revived Bongo mail and calendar server for Debian Trixie.
|
||||
* Build against the Bongo-maintained Mailutils, libspf2 and libsrs2 packages.
|
||||
|
||||
-- Bongo Project <bongo-dev@disconnected-by-peer.at> Mon, 20 Jul 2026 13:30:00 +0200
|
||||
Vendored
-63
@@ -1,63 +0,0 @@
|
||||
Source: bongo
|
||||
Section: mail
|
||||
Priority: optional
|
||||
Maintainer: Bongo Project <bongo-dev@disconnected-by-peer.at>
|
||||
Build-Depends:
|
||||
debhelper-compat (= 13),
|
||||
dh-python,
|
||||
cmake (>= 3.16),
|
||||
ninja-build,
|
||||
pkgconf,
|
||||
gettext,
|
||||
python3-dev,
|
||||
python3-dateutil,
|
||||
python3-dnspython,
|
||||
python3-nh3,
|
||||
python3-vobject,
|
||||
libglib2.0-dev,
|
||||
libgmime-3.0-dev,
|
||||
libgcrypt20-dev,
|
||||
libgnutls28-dev,
|
||||
libsqlite3-dev,
|
||||
libcurl4-gnutls-dev,
|
||||
libldns-dev,
|
||||
libmailutils-dev (>= 1:3.19-1+bongo1),
|
||||
libgsasl-dev (>= 2.2.0),
|
||||
libldap2-dev,
|
||||
liboath-dev,
|
||||
libargon2-dev,
|
||||
libqrencode-dev,
|
||||
libspf2-dev (>= 1.2.10-8.3+bongo1),
|
||||
libopendkim-dev,
|
||||
libopendmarc-dev,
|
||||
libsrs2-dev (>= 1.0.18-4+bongo1),
|
||||
libpsl-dev,
|
||||
libical-dev,
|
||||
libicu-dev
|
||||
Standards-Version: 4.7.2
|
||||
Homepage: https://gitea.disconnected-by-peer.at/geos_one/bongo
|
||||
Vcs-Git: https://gitea.disconnected-by-peer.at/geos_one/bongo.git
|
||||
Vcs-Browser: https://gitea.disconnected-by-peer.at/geos_one/bongo
|
||||
Rules-Requires-Root: no
|
||||
|
||||
Package: bongo
|
||||
Architecture: any
|
||||
Depends:
|
||||
${misc:Depends},
|
||||
${python3:Depends},
|
||||
${shlibs:Depends},
|
||||
adduser,
|
||||
python3-dateutil,
|
||||
python3-dnspython,
|
||||
python3-nh3,
|
||||
python3-vobject
|
||||
Recommends: clamav-daemon, spamassassin, fail2ban
|
||||
Suggests: apache2 | nginx, mailman3
|
||||
Provides: mail-transport-agent
|
||||
Conflicts: mail-transport-agent
|
||||
Replaces: bongo-server (<< 0.7.0)
|
||||
Description: simple integrated mail, calendar and contacts server
|
||||
Bongo provides SMTP submission and transport, IMAP, POP3, ManageSieve,
|
||||
CalDAV, CardDAV, a Web client, administration tools, filtering, and a
|
||||
message store in one integrated server. It is the maintained continuation
|
||||
of the historical Bongo Project code base.
|
||||
Vendored
-19
@@ -1,19 +0,0 @@
|
||||
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
|
||||
Upstream-Name: Bongo
|
||||
Source: https://gitea.disconnected-by-peer.at/geos_one/bongo
|
||||
|
||||
Files: *
|
||||
Copyright: 2001-2007 Novell, Inc.
|
||||
2007-2008 Bongo Project contributors
|
||||
2026 Bongo Project contributors
|
||||
License: GPL-2
|
||||
This program is free software; you can redistribute it and/or modify it
|
||||
under the terms of version 2 of the GNU General Public License.
|
||||
.
|
||||
On Debian systems, the complete text of the GNU General Public License
|
||||
version 2 can be found in /usr/share/common-licenses/GPL-2.
|
||||
|
||||
Files: src/libs/python/bongo/external/simpletal/*
|
||||
Copyright: SimpleTAL contributors
|
||||
License: BSD-3-clause
|
||||
See the notices retained in the corresponding source files.
|
||||
Vendored
-5
@@ -1,5 +0,0 @@
|
||||
README
|
||||
docs/administration.md
|
||||
docs/development.md
|
||||
docs/directory-layout.md
|
||||
docs/release-testing-0.7.md
|
||||
Vendored
-33
@@ -1,33 +0,0 @@
|
||||
#!/usr/bin/make -f
|
||||
|
||||
include /usr/share/dpkg/architecture.mk
|
||||
|
||||
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
|
||||
export DEB_CFLAGS_MAINT_APPEND = -Wall -Wextra
|
||||
|
||||
BONGO_TEST_LIBRARY_PATH = $(shell find \
|
||||
$(CURDIR)/obj-$(DEB_HOST_GNU_TYPE)/src/libs -type d -print 2>/dev/null | \
|
||||
paste -sd:)
|
||||
|
||||
%:
|
||||
dh $@ --buildsystem=cmake+ninja --with python3
|
||||
|
||||
override_dh_auto_configure:
|
||||
dh_auto_configure -- \
|
||||
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
|
||||
-DBUILD_TESTING=ON \
|
||||
-DLIB_DIR_NAME=lib/$(DEB_HOST_MULTIARCH) \
|
||||
-DCMAKE_SKIP_RPATH=ON \
|
||||
-DSYSTEMD_SYSTEM_UNIT_DIR=lib/systemd/system \
|
||||
-DSYSTEMD_TMPFILES_DIR=lib/tmpfiles.d \
|
||||
-DSYSTEMD_SYSUSERS_DIR=lib/sysusers.d
|
||||
|
||||
override_dh_auto_test:
|
||||
LD_LIBRARY_PATH="$(BONGO_TEST_LIBRARY_PATH)$${LD_LIBRARY_PATH:+:$${LD_LIBRARY_PATH}}" \
|
||||
dh_auto_test --no-parallel
|
||||
|
||||
override_dh_installsystemd:
|
||||
dh_installsystemd --no-enable --no-start
|
||||
|
||||
override_dh_missing:
|
||||
dh_missing --fail-missing
|
||||
Vendored
-1
@@ -1 +0,0 @@
|
||||
3.0 (quilt)
|
||||
Vendored
-3
@@ -1,3 +0,0 @@
|
||||
Tests: installed-smoke
|
||||
Depends: @, python3
|
||||
Restrictions: superficial
|
||||
Vendored
-9
@@ -1,9 +0,0 @@
|
||||
#!/bin/sh
|
||||
set -eu
|
||||
|
||||
test -x /usr/sbin/bongo-manager
|
||||
test -x /usr/sbin/bongo-admin
|
||||
test -x /usr/sbin/bongo-config
|
||||
python3 -c 'import bongo, bongo_web, libbongo'
|
||||
test -f /lib/systemd/system/bongo.service ||
|
||||
test -f /usr/lib/systemd/system/bongo.service
|
||||
@@ -1,60 +0,0 @@
|
||||
# Bongo documentation
|
||||
|
||||
This directory is the maintained documentation for the Bongo development
|
||||
tree. It replaces operational advice from the archived project website where
|
||||
paths, dependencies, security policy, or implementation status no longer
|
||||
match the current code.
|
||||
|
||||
Bongo 0.7 is still under development. A feature listed here is available in
|
||||
the tree, but a public server should be staged and tested before it replaces
|
||||
an existing mail system. The [roadmap](roadmap.md) distinguishes completed,
|
||||
partial, and planned work.
|
||||
|
||||
## Start here
|
||||
|
||||
- [Architecture](architecture.md) describes the agents and data flow.
|
||||
- [Administration](administration.md) covers setup, validation, services,
|
||||
accounts, and routine checks.
|
||||
- [Directory layout](directory-layout.md) lists current FHS paths.
|
||||
- [Ports](ports.md) distinguishes public, private, and optional listeners.
|
||||
- [Protocols](protocols.md) gives the supported protocol overview.
|
||||
- [Client compatibility](client-compatibility.md) describes realistic client
|
||||
expectations.
|
||||
- [Storage and backup](storage.md) explains where mail and metadata live.
|
||||
- [Development](development.md) covers CMake, tests, sanitizers, and timezone
|
||||
maintenance.
|
||||
- [Bongo 0.7.0 release test matrix](release-testing-0.7.md) is the mandatory
|
||||
three-pass gate before the 0.7.0 tag.
|
||||
- [Roadmap](roadmap.md) merges the useful historical 1.0 goals with the
|
||||
current 0.7 through 1.0 plan.
|
||||
|
||||
## Security and mail operation
|
||||
|
||||
- [Guided setup](setup-wizard.md)
|
||||
- [TLS policy](tls.md)
|
||||
- [Authentication, TOTP, LDAP, and app passwords](authentication.md)
|
||||
- [SMTP, submission, LMTP, and trusted relay](smtp.md)
|
||||
- [IMAP compatibility](imap.md)
|
||||
- [SPF, DKIM, DMARC, and SRS](mail-authentication.md)
|
||||
- [SpamAssassin and ClamAV](antispam.md)
|
||||
- [HAProxy PROXY protocol](proxy-protocol.md)
|
||||
- [External account collection](external-accounts.md)
|
||||
|
||||
Installed manual pages document individual commands and agents. Begin with
|
||||
`bongo-setup(1)`, `bongo-config(1)`, `bongo-admin(1)`, `bongo-manager(1)`, and
|
||||
`bongoagents(8)`.
|
||||
|
||||
## Historical material
|
||||
|
||||
The archived
|
||||
[Bongo project documentation](https://github.com/bongo-project/bongo-project/tree/gh-pages/Documentation)
|
||||
is a provenance source for the architecture and original 1.0 product goals.
|
||||
The current roadmap retains goals which are still useful, including virtual
|
||||
domains, calendar sharing, internationalisation, administration, diagnostics,
|
||||
and a formal security review.
|
||||
|
||||
Do not use the historical site as an installation manual. Its Autotools,
|
||||
Python 2/mod_python, managed LDAP, filesystem, browser, and SSL instructions
|
||||
are obsolete. The current implementation remains a C server with a Python 3
|
||||
Web interface. Experimental Ruby rewrites are not part of the product or its
|
||||
roadmap.
|
||||
@@ -1,138 +0,0 @@
|
||||
# Administration quick reference
|
||||
|
||||
This guide assumes a distribution installation with
|
||||
`CMAKE_INSTALL_PREFIX=/usr`. Such an installation stores configuration in
|
||||
`/etc/bongo` and persistent state in `/var/lib/bongo`.
|
||||
|
||||
## Initial setup
|
||||
|
||||
Run the guided setup as root from an interactive terminal:
|
||||
|
||||
```sh
|
||||
bongo-setup
|
||||
```
|
||||
|
||||
The equivalent command is `bongo-config wizard`. The wizard asks only
|
||||
deployment-level questions and supplies conservative defaults for individual
|
||||
protocol limits. Review the resulting configuration before exposing a public
|
||||
listener.
|
||||
|
||||
Start and inspect the systemd service with:
|
||||
|
||||
```sh
|
||||
systemctl enable --now bongo.service
|
||||
systemctl status bongo.service
|
||||
journalctl -u bongo.service
|
||||
```
|
||||
|
||||
OpenRC installations use the installed `bongo` service. Agents are normally
|
||||
started by `bongo-manager`, never one by one from a login shell.
|
||||
|
||||
## Configuration
|
||||
|
||||
Use the validated editor for normal changes:
|
||||
|
||||
```sh
|
||||
bongo-admin config
|
||||
bongo-admin config check
|
||||
bongo-admin config sync
|
||||
```
|
||||
|
||||
The Store is the operative configuration. The editor reads it and commits a
|
||||
validated transaction to both the Store and `/etc/bongo/config.d`. The latter
|
||||
is the administrator- and configuration-management-friendly representation.
|
||||
`config check` validates those local files without changing the Store;
|
||||
`config sync` validates them and asks the running manager to apply them. The
|
||||
manager performs the same synchronization at startup. Listener changes still
|
||||
require the affected agents to be restarted.
|
||||
|
||||
Aliases and virtual domains are split into suffixless JSON fragments below
|
||||
`/etc/bongo/aliases.d`. Every fragment may contain `aliases`, `domains`, or
|
||||
both. The required `default_config` supplies global aliases; a full source
|
||||
address overrides one domain only:
|
||||
|
||||
```json
|
||||
{
|
||||
"aliases": {
|
||||
"postmaster": "admin",
|
||||
"dmarc-reports": "admin",
|
||||
"dmarc-reports@example.org": "dmarc"
|
||||
},
|
||||
"domains": {
|
||||
"old.example.org": "example.org",
|
||||
"special.example.org": {
|
||||
"target": "example.org",
|
||||
"recipient_mapping": "full-address"
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
`recipient_mapping` accepts `local-part`, `full-address`, or `domain-name`.
|
||||
The normal `local-part` mode is implicit in the short string form. Internally
|
||||
the manager translates these names to the historical Store representation.
|
||||
It also resolves `dmarc-reports` independently for every hosted domain and
|
||||
maintains the DMARC-folder rule on the actual target account.
|
||||
|
||||
Configuration names such as `smtp`, `imap`, `antispam`, and the local `web`
|
||||
file contain JSON but deliberately have no `.json` filename suffix.
|
||||
|
||||
Pre-0.7 files are never loaded as runtime fallbacks. Import them explicitly
|
||||
once with `bongo-admin migrate` while the existing Store is reachable; the
|
||||
command writes the new layout and moves the consumed files below
|
||||
`/etc/bongo/migration-backup/pre-0.7`. Review the result before restarting the
|
||||
manager. If the old manager is already stopped, run only the Store for the
|
||||
duration of this offline administrative migration.
|
||||
|
||||
## Accounts and authentication
|
||||
|
||||
Common account operations are:
|
||||
|
||||
```sh
|
||||
bongo-admin user list
|
||||
bongo-admin user add USER
|
||||
bongo-admin user password USER
|
||||
bongo-admin user info USER
|
||||
bongo-admin user rename OLD_NAME NEW_NAME
|
||||
```
|
||||
|
||||
Passwords are prompted for without echo and are not accepted as command-line
|
||||
arguments. Renaming a user disconnects active sessions, moves the per-user
|
||||
data, and retains the old name as a login and delivery alias so clients can be
|
||||
migrated. The Web task list reports clients which still use the old name.
|
||||
|
||||
LDAP can authenticate and auto-provision permitted directory users. Cached
|
||||
credentials keep mail access available for a bounded directory outage. During
|
||||
a confirmed outage an administrator can inspect and extend every existing
|
||||
cache entry:
|
||||
|
||||
```sh
|
||||
bongo-admin ldap-cache status
|
||||
bongo-admin ldap-cache extend-all 72
|
||||
```
|
||||
|
||||
This does not provision new users and must not become a substitute for
|
||||
restoring the directory. Optional TOTP affects the interactive master login;
|
||||
service-scoped app passwords are the preferred credentials for IMAP, POP3,
|
||||
SMTP, and ManageSieve when two-factor authentication is enabled.
|
||||
|
||||
## Routine checks
|
||||
|
||||
- Run `bongo-admin config check` and then `bongo-admin config sync` after
|
||||
editing files or applying an automation change.
|
||||
- Check the system journal and Bongo authentication log for repeated errors.
|
||||
- Confirm certificate and DKIM key expiry/rotation before it becomes urgent.
|
||||
- Test SMTP submission, Internet receipt, outbound delivery, IMAP, and the Web
|
||||
login after protocol or reverse-proxy changes.
|
||||
- Verify that SpamAssassin and ClamAV are reachable before enabling their
|
||||
agents; scanner failure policy must be deliberate. The Bongo worker checks
|
||||
extra-channel DNS serials but intentionally does not install updates. When
|
||||
KAM or Heinlein is selected, inspect the hourly updater with
|
||||
`systemctl status bongo-spamassassin-update.timer` and
|
||||
`journalctl -u bongo-spamassassin-update.service`.
|
||||
- Keep Store and Queue ports private and audit trusted relay and proxy CIDRs.
|
||||
- Test restores, not only backup creation.
|
||||
|
||||
See [storage.md](storage.md) for backup scope, [ports.md](ports.md) before
|
||||
changing firewall rules, and the protocol-specific documents before enabling
|
||||
legacy compatibility.
|
||||
@@ -1,109 +0,0 @@
|
||||
# Spam and malware scanning
|
||||
|
||||
Bongo uses two independent scanners. `bongoantispam` sends mail to a standard
|
||||
SpamAssassin `spamd` service for content classification. `bongoavirus` uses
|
||||
ClamAV for malware detection. Neither service replaces the other.
|
||||
|
||||
The antispam agent is fail-open: a connection failure, malformed response or
|
||||
configured size limit leaves the original message available for normal
|
||||
delivery and records the problem in the log. It never sends a rejection or
|
||||
bounce to the apparent sender. A successful SpamAssassin `PROCESS` response
|
||||
replaces the queued copy with the processed message containing the normal
|
||||
`X-Spam-*` headers and marks the envelope as already checked.
|
||||
|
||||
The default `antispam` JSON configuration is:
|
||||
|
||||
```json
|
||||
{
|
||||
"version": 1,
|
||||
"enabled": false,
|
||||
"timeout": 15,
|
||||
"maximum_message_size": 52428800,
|
||||
"maximum_response_size": 53477376,
|
||||
"hosts": ["127.0.0.1"]
|
||||
}
|
||||
```
|
||||
|
||||
`hosts` accepts the existing `host:port:weight` syntax and can list several
|
||||
`spamd` servers. Port 783 is used when no port is specified. The response limit
|
||||
must be at least as large as the input limit because SpamAssassin adds headers.
|
||||
Both scanner agents are disabled in the distribution defaults. `bongo-setup`
|
||||
probes each matching local service with a protocol `PING`. It can explicitly
|
||||
enable an unreachable endpoint without touching the scanner package, or—with
|
||||
a second opt-in—safely edit a detected local scanner configuration, enable and
|
||||
restart its service, and require the expected `PONG`. The local editor uses
|
||||
loopback-only listeners, preserves unrelated options, writes an adjacent
|
||||
`.bongo-setup.bak`, and rolls files and service state back on failure.
|
||||
On systemd installations where clamd receives sockets from
|
||||
`clamav-daemon.socket`, setup adds a drop-in for the loopback TCP socket while
|
||||
preserving the distribution's Unix socket.
|
||||
If SpamAssassin is installed without an initial rule set, setup shows this in
|
||||
the preview, downloads the official Apache update key over HTTPS, verifies its
|
||||
complete fingerprint `5E541DC959CB8BAC7C78DFDC4056A61A5244EC45`, imports it
|
||||
into the `sa-update` keyring, and runs the distribution's `sa-update` before
|
||||
touching scanner configuration. The downloaded channel is signature-checked
|
||||
by SpamAssassin and must pass `spamassassin --lint`; otherwise setup stops
|
||||
before editing files or services. Rule data installed successfully by
|
||||
`sa-update` is retained like an antivirus signature update even if a later,
|
||||
unrelated setup step is rolled back.
|
||||
|
||||
The scanner wizard also offers two independent third-party channels:
|
||||
|
||||
- the signed KAM channel `kam.sa-channels.mcgrail.com`; setup downloads its
|
||||
public key over HTTPS and checks the complete fingerprint
|
||||
`21D97142272C9066FCAA792B4A156DA524C063D8` before importing it;
|
||||
- `spamassassin.heinlein-support.de`, which is unsigned and therefore remains
|
||||
an explicit, warned opt-in using `sa-update --nogpg`.
|
||||
|
||||
Third-party channels are disabled by default. Setup never enables
|
||||
`sa-update --allowplugins` for downloaded rules. Every selected update must
|
||||
pass `spamassassin --lint` before spamd is restarted. Selection is persisted
|
||||
in `/etc/bongo/spamassassin.d/channels`, and setup enables the
|
||||
`bongo-spamassassin-update.timer`. The timer runs hourly with a small random
|
||||
delay. It invokes KAM with its pinned signing key and Heinlein in a separate,
|
||||
explicit `--nogpg` process, so the unsigned-channel exception can never
|
||||
disable verification for KAM. If rules changed and passed lint, the active
|
||||
`spamassassin.service` or `spamd.service` is reloaded or restarted.
|
||||
If an official or KAM signing key changes, setup reports both fingerprints and
|
||||
stops before editing or restarting the scanner. Existing rules and the running
|
||||
service remain active until an administrator verifies the upstream rotation
|
||||
and installs a Bongo update containing the new trust anchor. The difference is
|
||||
also recorded below the Bongo state directory and displayed on every
|
||||
`bongo-admin config` TUI start until a matching trusted key is imported.
|
||||
`bongo-admin config` can configure remote endpoints explicitly; setup never
|
||||
attempts to edit a remote scanner.
|
||||
|
||||
Run `bongo-setup scanners` to repeat only the local scanner editor after a
|
||||
package update or service change. This maintenance mode does not rerun initial
|
||||
Bongo setup. After each selected endpoint returns the expected `PONG`, it sets
|
||||
the loopback endpoint in Bongo's `antispam` or `antivirus` document, enables
|
||||
`bongoantispam` or `bongoavirus` in the manager document, synchronizes the
|
||||
files with the Store, and reloads the manager. Scanner files, service state,
|
||||
and Bongo documents are rolled back together if activation fails. An edited
|
||||
but unverified endpoint remains disabled in Bongo.
|
||||
|
||||
Spam folder rules should match SpamAssassin's `X-Spam-Status` header. A high
|
||||
score quarantine is deliberately not implemented through the historical
|
||||
global quarantine queue: quarantine state belongs to the recipient and must be
|
||||
visible and releasable through that user's task list. Until that per-user path
|
||||
is active, mail is tagged and can be filed by Sieve without being destroyed.
|
||||
|
||||
The Bongo systemd unit only orders Bongo after common ClamAV and SpamAssassin
|
||||
unit names when those services are present. It does not pull either scanner in,
|
||||
so remote scanners and installations without one of the optional services
|
||||
remain supported. The opt-in setup editor understands systemd and OpenRC; it
|
||||
does not make scanner packages unconditional Bongo dependencies.
|
||||
|
||||
The enabled `scanner-health` worker runs every six hours. It checks the age and
|
||||
availability of ClamAV daily signatures and the availability of compiled
|
||||
SpamAssassin rule files. It also runs Bongo's extra-channel helper in
|
||||
`--checkonly` mode, where `sa-update` compares the DNS serial numbers without
|
||||
installing data. SpamAssassin rules deliberately have no age limit because a
|
||||
valid channel may remain unchanged for months. Missing data, ClamAV data older
|
||||
than the default 48 hours, an available extra-channel update, or a failed
|
||||
channel check creates a deduplicated administrator task. Healthy data and
|
||||
current serial numbers complete the matching task. The Worker never installs
|
||||
rules or invokes a service manager. The hourly root-owned systemd oneshot is
|
||||
the only Bongo component that updates the opted-in KAM and Heinlein channels.
|
||||
The distribution remains responsible for its official Apache SpamAssassin
|
||||
channel and FreshClam.
|
||||
@@ -1,88 +0,0 @@
|
||||
# Architecture
|
||||
|
||||
Bongo is an integrated but modular mail, calendar, and contact server. A
|
||||
small manager supervises specialised agents which share the Bongo Store and
|
||||
Queue instead of combining every protocol in one process.
|
||||
|
||||
## Message flow
|
||||
|
||||
A typical Internet message follows this path:
|
||||
|
||||
1. `bongosmtp` accepts SMTP and applies listener, relay, TLS, authentication,
|
||||
and message-size policy.
|
||||
2. `bongoqueue` records and routes the message through enabled filtering
|
||||
agents.
|
||||
3. SPF, DKIM, DMARC, SRS, SpamAssassin, ClamAV, and Sieve processing run where
|
||||
configured.
|
||||
4. Local delivery commits the message through `bongostore`; remote delivery
|
||||
is performed by `bongosmtpc` or a configured LMTP/SMTP transport.
|
||||
5. Users read the same stored data through IMAP, POP3, or the Web interface.
|
||||
|
||||
External account collection enters the same delivery path: `bongocollector`
|
||||
fetches a user's remote POP3 or IMAP account and submits the message to the
|
||||
mailbox selected by that user. Sending with a matching external identity is
|
||||
handled by the authenticated outbound SMTP path.
|
||||
|
||||
## Components
|
||||
|
||||
| Component | Responsibility |
|
||||
| --- | --- |
|
||||
| `bongo-manager` | Starts the Store first, then enabled agents in priority order. |
|
||||
| `bongostore` | Owns per-user mail, calendar, contact, and metadata storage. |
|
||||
| `bongoqueue` | Spools, filters, and routes messages. |
|
||||
| `bongosmtp` | Receives SMTP, submission, and trusted-device relay traffic. |
|
||||
| `bongosmtpc` | Sends SMTP and LMTP deliveries. |
|
||||
| `bongoimap` | Provides IMAP4rev2, IMAP4rev1, and legacy IMAP4 access. |
|
||||
| `bongopop3` | Provides POP3 and POP3S access. |
|
||||
| `bongosieve` | Provides the ManageSieve protocol. |
|
||||
| `bongorules` | Executes Sieve filtering and vacation actions. |
|
||||
| `bongocollector` | Fetches user-configured external accounts. |
|
||||
| `bongoantispam` | Connects to SpamAssassin when enabled. |
|
||||
| `bongoavirus` | Connects to ClamAV when enabled. |
|
||||
| Bongo Web | Python 3 Webmail, account settings, CalDAV, and CardDAV. |
|
||||
| `bongo-setup` / `bongo-admin` | Guided initial setup and validated administration. |
|
||||
|
||||
Agents use common C libraries for configuration, logging, authentication,
|
||||
TLS, protocol I/O, Store access, and Queue access. GNU GSASL is shared by the
|
||||
mail protocols; its direct Bongo verification callback does not create or
|
||||
consult a second user database.
|
||||
|
||||
## Internal interfaces
|
||||
|
||||
The Store protocol on TCP 689 and Queue protocol on TCP 8670 are private
|
||||
service interfaces. They are not substitutes for IMAP, SMTP, or a public API
|
||||
and must not be exposed to untrusted networks. The manager and local tools use
|
||||
them to coordinate the agents.
|
||||
|
||||
The Web process talks to the maintained Python 3 bindings and Store services.
|
||||
Its HTTP listener defaults to loopback because TLS is normally terminated by
|
||||
Apache, nginx, or another trusted reverse proxy. This does not hard-code an
|
||||
external `http://` URL: `public_base_url`, forwarded-address trust, and HTTPS
|
||||
status are explicit deployment settings.
|
||||
|
||||
Direct HTTPS is also supported. The Web agent binds port 443, loads the
|
||||
configured certificate and private key, binds port 80 for an HTTPS-only
|
||||
redirect, and then permanently changes its real and effective UID/GID to the
|
||||
configured `bongo` service account before accepting either HTTP listener.
|
||||
|
||||
## Configuration model
|
||||
|
||||
Agent settings are operative suffixless JSON Store documents such as `smtp`,
|
||||
`imap`, `queue`, `web`, `authentication`, and `manager`. Their declarative
|
||||
counterparts live below `/etc/bongo/config.d`; alias fragments live below
|
||||
`/etc/bongo/aliases.d`. The manager validates and imports the files only after
|
||||
the Store starts, so agents always consume one coherent Store-facing model
|
||||
and never fall back to a second runtime configuration source.
|
||||
|
||||
`bongo-admin config` reads the Store and writes Store plus files as one
|
||||
rollback-capable operation. Use `bongo-admin config check` for a read-only
|
||||
file validation and `bongo-admin config sync` after direct or automated file
|
||||
changes. Pre-0.7 layouts require the explicit one-time migration command.
|
||||
|
||||
## Design direction
|
||||
|
||||
The original Dragonfly artwork and layout remain the visual basis for the 0.7
|
||||
Web interface. The implementation is maintained Python 3 and JavaScript; no
|
||||
Ruby runtime or Ruby rewrite is planned. A later responsive redesign should
|
||||
preserve the simple integrated product rather than introduce a second server
|
||||
stack.
|
||||
@@ -1,135 +0,0 @@
|
||||
# Authentication security
|
||||
|
||||
Bongo stores new account passwords with Argon2id. Existing PBKDF2 and legacy
|
||||
password records remain usable and are upgraded to Argon2id after a successful
|
||||
login. There is no default administrator password.
|
||||
|
||||
Time-based two-factor authentication is optional per account. A user enables
|
||||
it under **Settings → Two-factor authentication** by confirming the account
|
||||
password, scanning the QR code with an authenticator application and entering
|
||||
the current six-digit code. When two-factor authentication is disabled, the
|
||||
web login does not display or request a second field. When it is enabled, the
|
||||
second field appears only after the account password has been accepted.
|
||||
|
||||
Enabling TOTP creates ten one-time recovery codes. They are displayed only
|
||||
once and can be copied together with **Copy all recovery codes**. Copying puts
|
||||
the codes in the operating system clipboard; clear that clipboard after the
|
||||
codes have been placed in a password manager or another protected location.
|
||||
Bongo stores only Argon2id hashes of recovery codes. Each code is invalidated
|
||||
atomically when used.
|
||||
|
||||
The TOTP secret is encrypted with AES-256-GCM in `userdb.sqlite`. Its dedicated
|
||||
master key is `auth.key` in Bongo's DBF directory. The database and key are
|
||||
restricted to the Bongo service account and must be backed up together. The QR
|
||||
image is generated in memory and is not written to disk or included in logs.
|
||||
|
||||
App passwords use a random lookup identifier and an independently generated
|
||||
secret. Only the Argon2id hash is retained. They can be limited to IMAP, POP3,
|
||||
SMTP, ManageSieve, CalDAV or CardDAV, and optionally to an expiry time and a
|
||||
source IPv4 or IPv6 network. Requiring app passwords remains a separate,
|
||||
explicit per-user policy; enabling TOTP does not silently change mail-client
|
||||
authentication.
|
||||
|
||||
SMTP submission, IMAP, POP3 and ManageSieve use one GNU GSASL server layer.
|
||||
Its direct `GSASL_VALIDATE_SIMPLE` callback applies the same account lookup,
|
||||
service-specific app-password policy, source-network restriction and
|
||||
authentication audit trail to every protocol. Bongo does not configure a
|
||||
GSASL password-property fallback or a separate SASL user database.
|
||||
Password-bearing mechanisms are advertised only after TLS and the advertised
|
||||
list is generated from mechanisms that are both available in GSASL and enabled
|
||||
by Bongo. Clients cannot select an available mechanism that Bongo did not
|
||||
advertise. Bongo 0.7 enables `PLAIN` and `LOGIN` for TLS-protected compatibility
|
||||
clients; adding a mechanism requires implementing its credential callback,
|
||||
stored key material and policy first, not merely enabling another mechanism.
|
||||
|
||||
## LDAP master authentication
|
||||
|
||||
LDAP can be enabled as the primary source for normal account passwords. It is
|
||||
independent of Bongo app passwords: service-scoped `bap-...` credentials are
|
||||
always verified locally first, while only a normal master password is sent to
|
||||
LDAP. Local Bongo users still need to be provisioned because their mailboxes,
|
||||
settings and security policy remain in Bongo.
|
||||
|
||||
When two-factor authentication is disabled, the LDAP master password is also
|
||||
accepted by IMAP, POP3, SMTP, ManageSieve, CalDAV and CardDAV. With TOTP
|
||||
enabled this remains possible until the user explicitly enables the separate
|
||||
"require app passwords" policy. That policy is unavailable while TOTP is off,
|
||||
so enabling LDAP alone cannot accidentally lock older mail clients out.
|
||||
|
||||
After a successful LDAP bind Bongo stores only a new Argon2id hash of that
|
||||
password, never the LDAP password itself. The hash may be used while LDAP is
|
||||
actually unavailable for a configurable period (48 hours by default). A
|
||||
definitive LDAP rejection never falls back to the cache. If LDAP rejects the
|
||||
same password that is currently cached, that cached credential is invalidated.
|
||||
Configuration and TLS errors also fail closed rather than enabling offline
|
||||
login.
|
||||
|
||||
Set the following properties in `/etc/bongo/config.d/authentication`:
|
||||
|
||||
AuthLdapEnabled = true
|
||||
AuthLdapUri = ldaps://ldap.example.net
|
||||
AuthLdapBaseDn = ou=people,dc=example,dc=net
|
||||
AuthLdapUserAttribute = uid
|
||||
AuthLdapTimeoutSeconds = 10
|
||||
AuthLdapOfflineCacheHours = 48
|
||||
|
||||
For `ldap://` URIs, StartTLS is required by default. Set
|
||||
`AuthLdapStartTls = false` only for a protected compatibility environment.
|
||||
Server certificates are verified. A private CA can be selected with
|
||||
`AuthLdapCaFile`. Directory search may be anonymous; otherwise set
|
||||
`AuthLdapBindDn` and put only the bind password in the file named by
|
||||
`AuthLdapBindPasswordFile`. That file must be a regular, non-symlink file with
|
||||
no group or world permissions. Setting `AuthLdapOfflineCacheHours = 0`
|
||||
disables and removes the offline cache after the next successful LDAP login.
|
||||
|
||||
If an Active Directory, Azure-hosted directory or another LDAP service remains
|
||||
offline longer than planned, a local administrator can inspect and atomically
|
||||
extend every existing user cache:
|
||||
|
||||
bongo-admin ldap-cache status
|
||||
bongo-admin ldap-cache extend-all
|
||||
bongo-admin ldap-cache extend-all 72
|
||||
|
||||
The default extension is another 48 hours. Each invocation is limited to 744
|
||||
hours, requires local root privileges and writes an authentication notice to
|
||||
the system log. Valid caches are extended from their current expiry; expired
|
||||
caches are deliberately reactivated from the current time. The operation does
|
||||
not create cache entries, change passwords or affect any app password. Users
|
||||
who have never completed a successful LDAP login remain unavailable until the
|
||||
directory returns.
|
||||
|
||||
## Reverse proxies and Fail2ban
|
||||
|
||||
Bongo emits one structured log entry for every rejected Web, POP3, IMAP, SMTP
|
||||
or ManageSieve authentication attempt. The installed `bongo-auth` Fail2ban
|
||||
filter recognizes those entries. Its jail template is deliberately disabled
|
||||
until the administrator has reviewed `ignoreip`, especially on installations
|
||||
that provide a compatibility listener for trusted legacy devices.
|
||||
|
||||
On systemd systems, edit `/etc/fail2ban/jail.d/bongo-auth.conf`, review the
|
||||
trusted networks, set `enabled = true`, and reload Fail2ban. On an OpenRC
|
||||
system using a traditional syslog file, put these overrides in
|
||||
`/etc/fail2ban/jail.d/bongo-auth.local`:
|
||||
|
||||
[bongo-auth]
|
||||
enabled = true
|
||||
backend = auto
|
||||
logpath = /var/log/messages
|
||||
|
||||
The Web service may listen on any unprivileged local port and can run behind
|
||||
Apache, nginx, or a chain of both. `trusted_proxies` in
|
||||
`/etc/bongo/config.d/web`
|
||||
accepts individual IPv4/IPv6 addresses and CIDR networks. Forwarded client
|
||||
addresses are ignored unless the direct peer is trusted. Proxy chains are
|
||||
processed from the trusted end so a client-supplied prefix cannot bypass the
|
||||
login limiter or cause Fail2ban to block an unrelated address.
|
||||
|
||||
The forwarded address header defaults to `X-Forwarded-For`. Load balancers
|
||||
using a single-address header can be configured, for example:
|
||||
|
||||
"trusted_proxies": ["127.0.0.0/8", "10.20.0.0/16"],
|
||||
"client_ip_header": "X-Real-IP"
|
||||
|
||||
Other common values are `CF-Connecting-IP` and `True-Client-IP`. Configure the
|
||||
proxy to replace or correctly append that header and never trust proxy ranges
|
||||
that can contain ordinary clients.
|
||||
@@ -1,57 +0,0 @@
|
||||
# Client compatibility
|
||||
|
||||
Bongo implements open mail, calendar, and contact protocols. Compatibility
|
||||
depends on the client using those protocols; Bongo 0.7 does not emulate an
|
||||
Exchange server.
|
||||
|
||||
## Modern clients
|
||||
|
||||
Thunderbird can use authenticated SMTP submission and IMAP, with POP3 as an
|
||||
alternative. CalDAV and CardDAV accounts expose Bongo calendars and contacts.
|
||||
A ManageSieve-capable Thunderbird extension or another Sieve editor can
|
||||
upload the user's filter scripts on port 4190.
|
||||
|
||||
Other standards-based desktop and mobile clients should use:
|
||||
|
||||
- IMAPS on 993 or IMAP with STARTTLS on 143;
|
||||
- submission on 587 with STARTTLS or implicit TLS on 465;
|
||||
- POP3S on 995 only when POP3 is required;
|
||||
- CalDAV and CardDAV through the external HTTPS Web URL.
|
||||
|
||||
Outlook can use generic IMAP/POP3 and SMTP accounts. Native MAPI/Exchange
|
||||
mailboxes, ActiveSync, and Exchange calendar semantics are not implemented.
|
||||
Some Outlook versions require a separate CalDAV/CardDAV connector.
|
||||
|
||||
## Web browsers
|
||||
|
||||
The Bongo Web interface retains the classic Dragonfly appearance but runs on
|
||||
maintained Python 3 code and current browser APIs. It is not targeted at
|
||||
historical Firefox 1.x or Internet Explorer versions. JavaScript, secure
|
||||
cookies, a correct external HTTPS URL, and accurate trusted-proxy handling are
|
||||
required for a public deployment.
|
||||
|
||||
## Legacy mail clients
|
||||
|
||||
The server retains classic IMAP4, POP3, SMTP `HELO`, and clear protocol ports
|
||||
where practical. Old clients which do not understand modern capability names
|
||||
can therefore continue to perform basic mail operations.
|
||||
|
||||
Legacy TLS is never a global default. If a Windows 98-era client or embedded
|
||||
device cannot negotiate TLS 1.2, place it on a trusted network and enable the
|
||||
smallest listener-specific compatibility policy which works. Prefer the
|
||||
rate-limited port 26 relay for printers, UPS devices, access points, cron jobs,
|
||||
and management controllers which cannot authenticate safely. Sender
|
||||
normalisation and DNS/address mapping can then turn local device identities
|
||||
into valid Internet senders.
|
||||
|
||||
Do not expose a compatibility listener to the Internet and do not disable
|
||||
modern TLS on the normal user listeners. See [tls.md](tls.md) and
|
||||
[smtp.md](smtp.md).
|
||||
|
||||
## Future clients
|
||||
|
||||
JMAP is scheduled for 0.9 and will use the same Store rather than replace
|
||||
IMAP. Exchange/MAPI compatibility remains later research and is not a 1.0
|
||||
release requirement. External provider OAuth and an optional OIDC/Authelia
|
||||
master-login source are 1.0 roadmap items; service-scoped app passwords remain
|
||||
the stable protocol credential model.
|
||||
@@ -1,118 +0,0 @@
|
||||
# Development and testing
|
||||
|
||||
Bongo uses CMake throughout the source tree. Individual libraries, agents,
|
||||
applications, tests, manual pages, and packaging rules keep their own
|
||||
`CMakeLists.txt`; the root file coordinates them.
|
||||
|
||||
## Build
|
||||
|
||||
Use an out-of-tree build:
|
||||
|
||||
```sh
|
||||
cmake -S . -B build \
|
||||
-DCMAKE_BUILD_TYPE=Debug \
|
||||
-DCMAKE_INSTALL_PREFIX=/usr
|
||||
cmake --build build -j
|
||||
ctest --test-dir build --output-on-failure
|
||||
```
|
||||
|
||||
GCC and Clang are supported. To keep warnings actionable, fix their cause in
|
||||
the code instead of adding flags which hide them. Portable code must not
|
||||
assume that pointers, `long`, or `size_t` are 64-bit or that the host is
|
||||
x86-64; 32-bit and ARM cross-builds are release validation targets.
|
||||
|
||||
Important cache variables include `BONGO_USER`, `BONGO_STATE_DIR`,
|
||||
`BONGO_CONFIG_DIR`, `SYSCONF_INSTALL_DIR`, `BONGO_TZDATA_DIR`, and
|
||||
`CONN_TRACE`. Connection tracing may expose plaintext or already-decrypted
|
||||
credentials and message data; enable it only in an isolated test environment.
|
||||
|
||||
## Sanitizers and debuggers
|
||||
|
||||
An AddressSanitizer/UndefinedBehaviorSanitizer build can be configured with:
|
||||
|
||||
```sh
|
||||
cmake -S . -B build-asan \
|
||||
-DCMAKE_BUILD_TYPE=Debug \
|
||||
-DCMAKE_C_FLAGS="-fsanitize=address,undefined -fno-omit-frame-pointer" \
|
||||
-DCMAKE_EXE_LINKER_FLAGS="-fsanitize=address,undefined" \
|
||||
-DCMAKE_SHARED_LINKER_FLAGS="-fsanitize=address,undefined"
|
||||
cmake --build build-asan -j
|
||||
ctest --test-dir build-asan --output-on-failure
|
||||
```
|
||||
|
||||
Run long-lived agents under GDB or a sanitizer only on an isolated instance
|
||||
with disposable mail and credentials. ThreadSanitizer requires its own build;
|
||||
do not combine it with AddressSanitizer. Leak checks need realistic protocol
|
||||
sessions in addition to the unit tests.
|
||||
|
||||
## Staged installation and packages
|
||||
|
||||
Test installation paths without modifying the host:
|
||||
|
||||
```sh
|
||||
DESTDIR=/tmp/bongo-stage cmake --install build
|
||||
find /tmp/bongo-stage -print
|
||||
```
|
||||
|
||||
For a `/usr` prefix, reject any staged `/usr/etc` or `/usr/var` path. Runtime
|
||||
directories belong to tmpfiles or setup, not the package image.
|
||||
|
||||
Generate binary and source packages separately:
|
||||
|
||||
```sh
|
||||
cpack --config build/CPackConfig.cmake
|
||||
cpack --config build/CPackSourceConfig.cmake
|
||||
```
|
||||
|
||||
Source packages are named `bongo-<version>` without a platform suffix such as
|
||||
`-linux`. They contain the maintained Markdown documentation and exclude VCS
|
||||
metadata and build trees.
|
||||
|
||||
## Timezone snapshot
|
||||
|
||||
Normal builds are reproducible and never download data. To refresh the
|
||||
checked-in zone snapshot, unpack a reviewed IANA tzdata release, configure its
|
||||
directory, and call the explicit target:
|
||||
|
||||
```sh
|
||||
cmake -S . -B build-zoneinfo -DBONGO_TZDATA_DIR=/path/to/tzdata
|
||||
cmake --build build-zoneinfo --target update-zoneinfo
|
||||
```
|
||||
|
||||
Review the generated diff and calendar tests before committing it. The
|
||||
`tzcache` administration command rebuilds the runtime cache from the installed
|
||||
snapshot; it does not fetch a new upstream release.
|
||||
|
||||
## Source conventions
|
||||
|
||||
New C and C header files use the same licence/copyright header style as the
|
||||
surrounding subsystem. Generated data and suffixless JSON configuration
|
||||
templates do not need a C source header. Add focused tests beside the
|
||||
subsystem's existing `tests` directory and register them with CTest.
|
||||
|
||||
## Collector protocol integration tests
|
||||
|
||||
The normal test suite has no Java dependency. An optional integration test
|
||||
uses the archived Apache-2.0-licensed `vtestmail-core` 1.0.0 artifact as an
|
||||
in-memory POP3 and IMAP peer. The artifact is test-only, its SHA-256 is
|
||||
pinned by CMake, and it is never linked into or installed with Bongo.
|
||||
|
||||
Download the immutable Maven Central artifact and enable the fixture explicitly:
|
||||
|
||||
```sh
|
||||
curl -fL \
|
||||
https://repo.maven.apache.org/maven2/net/markwalder/vtestmail-core/1.0.0/vtestmail-core-1.0.0.jar \
|
||||
-o /tmp/vtestmail-core-1.0.0.jar
|
||||
cmake -S . -B build-vtestmail \
|
||||
-DBUILD_TESTING=ON \
|
||||
-DBONGO_VTESTMAIL_JAR=/tmp/vtestmail-core-1.0.0.jar
|
||||
cmake --build build-vtestmail
|
||||
ctest --test-dir build-vtestmail -R collector-vtestmail --output-on-failure
|
||||
```
|
||||
|
||||
The test exercises authenticated POP3 and IMAP listing, fetching and deletion
|
||||
over STLS/STARTTLS with certificate and hostname verification enabled.
|
||||
vtestmail 1.0.0 does not implement the IMAP `UID SEARCH`, `UID FETCH` and
|
||||
`UID STORE` subset needed by the Collector, so Bongo registers those three
|
||||
minimal commands inside its isolated Java fixture. The upstream jar remains
|
||||
unchanged.
|
||||
@@ -1,70 +0,0 @@
|
||||
# Directory layout
|
||||
|
||||
Bongo follows FHS-style paths for distribution installs. Configure a package
|
||||
build with `CMAKE_INSTALL_PREFIX=/usr`; CMake then deliberately keeps host
|
||||
configuration under `/etc`, not `/usr/etc`.
|
||||
|
||||
## Distribution installation
|
||||
|
||||
| Path | Contents |
|
||||
| --- | --- |
|
||||
| `/etc/bongo` | Administrator-managed configuration and protected key directories. |
|
||||
| `/etc/bongo/config.d` | Suffixless JSON mirrors for every operative Store configuration document. |
|
||||
| `/etc/bongo/aliases.d` | Mergeable suffixless alias and virtual-domain JSON fragments. |
|
||||
| `/etc/bongo/ssl.d` | TLS certificates and private keys managed by setup or an ACME deploy hook. |
|
||||
| `/etc/bongo/dkim.d` | Per-domain DKIM keys and related material. |
|
||||
| `/etc/bongo/dmarc.d` | DMARC setup state and report-processing policy. |
|
||||
| `/etc/bongo/acme.d` | Root-owned ACME DNS-provider credentials and policy. |
|
||||
| `/etc/bongo/migration-backup` | Files consumed by an explicit one-time legacy migration. |
|
||||
| `/var/lib/bongo` | Persistent Bongo state. |
|
||||
| `/var/lib/bongo/users` | Per-user stores and message documents. |
|
||||
| `/var/lib/bongo/system` | System Store and Store configuration documents. |
|
||||
| `/var/lib/bongo/spool` | Queue spool. |
|
||||
| `/var/lib/bongo/dbf` | Account database, random seed, protocol parameters, and runtime credentials. |
|
||||
| `/var/lib/bongo/web` | Web session, task, and identity databases. |
|
||||
| `/var/lib/bongo/work` | Runtime work area. |
|
||||
| `/var/lib/bongo/cache` | Regenerable caches. |
|
||||
| `/usr/sbin` | Server agents and administration programs. |
|
||||
| `/usr/libexec/bongo` | Private administration helpers. |
|
||||
| `/usr/share/bongo` | Web assets, providers, zone snapshot, templates, and examples. |
|
||||
| `/usr/share/man` | Manual pages. |
|
||||
| `/usr/lib/systemd/system` | systemd service unit. |
|
||||
| `/usr/lib/tmpfiles.d` | Runtime-directory declaration. |
|
||||
| `/usr/lib/sysusers.d` | Distribution-neutral service account declaration. |
|
||||
| `/etc/fail2ban` | Bongo filter and disabled jail template, when enabled at build time. |
|
||||
|
||||
Distribution packaging may override the systemd, tmpfiles, sysusers, and
|
||||
Fail2ban destinations with the documented CMake cache variables.
|
||||
|
||||
## Other prefixes
|
||||
|
||||
A self-contained install with `CMAKE_INSTALL_PREFIX=/usr/local` uses
|
||||
`/usr/local/etc/bongo`. Executables, data, and libraries follow the selected
|
||||
prefix, while persistent state remains `/var/lib/bongo` unless
|
||||
`BONGO_STATE_DIR` is explicitly changed.
|
||||
|
||||
Useful configure-time overrides include:
|
||||
|
||||
```sh
|
||||
cmake -S . -B build \
|
||||
-DCMAKE_INSTALL_PREFIX=/opt/bongo \
|
||||
-DSYSCONF_INSTALL_DIR=/etc \
|
||||
-DBONGO_CONFIG_DIR=/etc/bongo \
|
||||
-DBONGO_STATE_DIR=/srv/bongo
|
||||
```
|
||||
|
||||
Absolute paths are compiled into agents and generated service/configuration
|
||||
files. Do not move an installed state tree without reconfiguring and rebuilding
|
||||
or supplying matching package overrides.
|
||||
|
||||
## Runtime directories
|
||||
|
||||
Packages should not ship a populated `/var/run` tree. systemd-tmpfiles or the
|
||||
service script creates volatile directories at boot. Persistent empty
|
||||
directories below `/var/lib/bongo` are created during setup or package
|
||||
installation with the appropriate owner.
|
||||
|
||||
TLS, DKIM, DMARC and SRS material below `/etc/bongo` must be included in backup
|
||||
and permission reviews. ACME deployments may point configuration at paths
|
||||
managed by their deploy hook instead. Runtime credentials required to access
|
||||
the Store remain protected state below `/var/lib/bongo`.
|
||||
@@ -1,27 +0,0 @@
|
||||
# External mail accounts
|
||||
|
||||
External IMAP and POP3 credentials are stored in
|
||||
`external-accounts.sqlite`. Credential values are encrypted with AES-256-GCM;
|
||||
the per-installation master key is stored separately as
|
||||
`external-accounts.key` in Bongo's DBF directory. Both files are restricted to
|
||||
the Bongo service account.
|
||||
|
||||
Back up the database and master key together. A database backup without the
|
||||
matching key cannot decrypt external-account credentials. Do not copy the key
|
||||
to another installation unless the associated database is moved as well.
|
||||
|
||||
The collector verifies TLS certificates and host names by default. Provider
|
||||
passwords are never included in URLs or log messages. Existing plaintext
|
||||
credential records from early 0.7 development versions are encrypted
|
||||
automatically the next time they are read.
|
||||
|
||||
For an internal provider signed by a private certificate authority, set
|
||||
`BONGO_COLLECTOR_CAINFO` in the Collector service environment to the absolute
|
||||
path of a PEM CA bundle. Certificate and host-name verification remain
|
||||
enabled. Prefer installing a site-wide CA through the operating system trust
|
||||
store when possible.
|
||||
|
||||
Remote deletion policies are `never`, `after_import`, and `after_days`.
|
||||
Messages are recorded as imported only after the Bongo store accepts them over
|
||||
NMAP. A failed remote deletion does not cause the message to be delivered
|
||||
again; the collector retries the deletion during a later poll.
|
||||
@@ -1,45 +0,0 @@
|
||||
# IMAP compatibility and international mail
|
||||
|
||||
Bongo 0.7 advertises `IMAP4rev2`, `IMAP4rev1`, and the original `IMAP4`
|
||||
capability. The compatibility capabilities are intentional: clients which do
|
||||
not understand rev2 can continue to use the older command and mailbox-name
|
||||
rules. Existing modified UTF-7 mailbox names therefore remain supported until
|
||||
the client explicitly enables UTF-8.
|
||||
|
||||
The server also advertises the extensions it implements, including `ENABLE`,
|
||||
`ID`, `IDLE`, `NAMESPACE`, `UIDPLUS`, `MOVE`, `SPECIAL-USE`,
|
||||
`CREATE-SPECIAL-USE`, `LIST-EXTENDED`, `LIST-STATUS`, `STATUS=SIZE`,
|
||||
`LITERAL+`, `APPENDLIMIT`, and `UTF8=ACCEPT`. Capability tests keep this list
|
||||
in step with the command handlers; an extension must not be advertised merely
|
||||
because a client might expect it.
|
||||
|
||||
Modern clients can issue `ENABLE UTF8=ACCEPT` in the authenticated state.
|
||||
After that command Bongo accepts normalized UTF-8 mailbox names and UTF-8 in
|
||||
quoted strings, returns UTF-8 mailbox names from LIST, LSUB and STATUS, and
|
||||
rejects malformed UTF-8. Control, delete, line-separator and
|
||||
paragraph-separator code points are forbidden in mailbox names. SEARCH with
|
||||
an explicit CHARSET is rejected after UTF-8 has been enabled, as required by
|
||||
the extension.
|
||||
|
||||
Internationalized messages are appended with the RFC 6855 `UTF8 (~{size})`
|
||||
data form. Bongo buffers at most the advertised `APPENDLIMIT`, validates the
|
||||
header before committing the message to the store, and rejects malformed
|
||||
UTF-8. A normal APPEND containing an eight-bit header receives `NO [CANNOT]`;
|
||||
the UTF8 data form is accepted only after `ENABLE UTF8=ACCEPT`.
|
||||
|
||||
A legacy client never receives raw internationalized header fields in an
|
||||
IMAP response. Safe metadata such as UID, flags, internal date and message
|
||||
size remains available. A request that would expose a UTF-8 header receives
|
||||
`NO [CANNOT]` with an instruction to enable UTF-8. This explicit policy avoids
|
||||
silently corrupting addresses or invalidating DKIM signatures through an
|
||||
ad-hoc downgrade.
|
||||
|
||||
AUTH capabilities are generated from the GNU GSASL mechanisms which Bongo
|
||||
has actually enabled. Password mechanisms are advertised only on a TLS
|
||||
connection; unencrypted connections offer STARTTLS and keep LOGIN disabled.
|
||||
|
||||
Relevant standards are [RFC 9051](https://www.rfc-editor.org/rfc/rfc9051.html),
|
||||
[RFC 3501](https://www.rfc-editor.org/rfc/rfc3501.html),
|
||||
[RFC 5161](https://www.rfc-editor.org/rfc/rfc5161.html),
|
||||
[RFC 5198](https://www.rfc-editor.org/rfc/rfc5198.html), and
|
||||
[RFC 6855](https://www.rfc-editor.org/rfc/rfc6855.html).
|
||||
@@ -1,56 +0,0 @@
|
||||
# Mail authentication
|
||||
|
||||
Bongo 0.7 uses separate, established libraries for each mail-authentication
|
||||
job:
|
||||
|
||||
* libspf2 checks the SMTP client and envelope identity on incoming mail.
|
||||
* OpenDKIM verifies incoming signatures and signs outgoing mail.
|
||||
* OpenDMARC evaluates SPF and all DKIM results against the single RFC5322
|
||||
`From` domain.
|
||||
* GNU Mailutils parses the RFC5322 `From` field; it is not an SPF, DKIM or
|
||||
DMARC engine.
|
||||
* libsrs2 rewrites the envelope sender when mail is forwarded and reverses the
|
||||
resulting SRS recipient when a bounce returns.
|
||||
|
||||
Incoming checks run on unauthenticated external SMTP sessions. Authenticated
|
||||
submission and the restricted internal-relay listener are not rejected by
|
||||
DMARC. Bongo writes the local SPF, DKIM and DMARC decisions into one
|
||||
`Authentication-Results` field before handing the message to the queue.
|
||||
At that trust boundary, all incoming `Authentication-Results` fields are
|
||||
removed because an unauthenticated sender can forge them. Bongo then adds one
|
||||
fresh local result field after verification.
|
||||
|
||||
The relevant `smtp` configuration keys are:
|
||||
|
||||
* `spf_verify`, `dkim_verify`, and `dmarc_verify` enable the incoming checks.
|
||||
* `dmarc_enforce` defers temporary lookup failures and rejects messages when a
|
||||
sampled `p=reject` policy applies. A `p=quarantine` result remains accepted
|
||||
and is recorded for later filtering; it is never treated as `reject`.
|
||||
* `dkim_sign_outgoing`, `dkim_key_directory`, `dkim_selector`, and
|
||||
`dkim_signing_domain` control outgoing DKIM signatures.
|
||||
* `srs_forward`, `srs_reverse`, `srs_domain`, and `srs_secret_file` control
|
||||
SRS forwarding and bounce reversal.
|
||||
|
||||
The SRS secret and DKIM private keys must not be readable by other users. SRS
|
||||
addresses are envelope addresses such as `SRS0=...@example.org`; SRS is not a
|
||||
message-header format.
|
||||
|
||||
SPF and DMARC are DNS policies rather than per-message signatures. The setup
|
||||
wizard validates their DNS records, while the SMTP agents only evaluate them
|
||||
at delivery time. It writes public-key hints below
|
||||
`/etc/bongo/dkim.d/DOMAIN` and suffixless per-domain check state below
|
||||
`/etc/bongo/dmarc.d`.
|
||||
|
||||
The generated starting policy is deliberately conservative:
|
||||
|
||||
```text
|
||||
DOMAIN TXT v=spf1 ip4:PUBLIC_IPV4 -all
|
||||
SELECTOR._domainkey.DOMAIN TXT v=DKIM1; k=rsa; p=PUBLIC_KEY
|
||||
_dmarc.DOMAIN TXT v=DMARC1; p=none; rua=mailto:dmarc-reports@DOMAIN
|
||||
```
|
||||
|
||||
If no public outbound IPv4 address is supplied, the SPF suggestion uses `mx`
|
||||
and is marked for review. Bongo follows SPF RFC 7208, DKIM RFC 6376, current
|
||||
DMARC RFC 9989, and aggregate-report RFC 9990. RFC 9989 removed the historical
|
||||
`pct` tag; use `t=y` while testing a stricter policy. Start with `p=none`,
|
||||
review reports, then deliberately progress to `quarantine` or `reject`.
|
||||
@@ -1,48 +0,0 @@
|
||||
# Network ports
|
||||
|
||||
The table lists the current defaults. Every listener is configurable, and an
|
||||
entry being compiled does not mean that it is enabled in a particular
|
||||
installation.
|
||||
|
||||
| Port | Protocol | Default exposure | Notes |
|
||||
| ---: | --- | --- | --- |
|
||||
| 25/TCP | SMTP | Public when receiving Internet mail | Opportunistic STARTTLS; relay policy applies. |
|
||||
| 26/TCP | Trusted-device SMTP relay | Disabled | Restricted IPv4/CIDR allowlist and rate limits; never an open relay. |
|
||||
| 465/TCP | Implicit-TLS SMTP submission | Optional | Authenticated clients; configured as the implicit submission listener. |
|
||||
| 587/TCP | SMTP submission | Wizard-enabled | STARTTLS and authentication for user clients. |
|
||||
| 110/TCP | POP3 | Optional | Prefer STLS or port 995; clear-text compatibility needs explicit policy. |
|
||||
| 995/TCP | POP3S | Optional | Implicit TLS. |
|
||||
| 143/TCP | IMAP | Enabled by the base template | STARTTLS; login is disabled before TLS under the secure default. |
|
||||
| 993/TCP | IMAPS | Enabled by the base template | Implicit TLS. |
|
||||
| 4190/TCP | ManageSieve | Wizard-enabled | STARTTLS plus SASL; may be limited to the user network. |
|
||||
| 80/TCP | Bongo Web redirect | Direct-HTTPS mode only | Permanently redirects to the configured public HTTPS URL. |
|
||||
| 443/TCP | Bongo Web HTTPS | Direct-HTTPS mode only | Binds and loads the private key before permanently dropping to the `bongo` user. |
|
||||
| 8080/TCP | Bongo Web | Loopback only | Normally proxied by Apache or nginx with external HTTPS. |
|
||||
| 689/TCP | Bongo Store protocol | Private | Internal agent interface; do not expose. |
|
||||
| 8670/TCP | Bongo Queue protocol | Private | Internal agent interface; do not expose. |
|
||||
|
||||
ClamAV port 3310 and SpamAssassin port 783 belong to those external scanner
|
||||
services, not to Bongo. Keep them on loopback or a tightly controlled service
|
||||
network.
|
||||
|
||||
## Firewall and NAT
|
||||
|
||||
NAT may map the same internal server address to public SMTP, submission,
|
||||
IMAP, POP3, and Web ports. It does not change Bongo's listener policy. For
|
||||
example, public port 25 and private port 26 can both reach the same server IP
|
||||
because they are separate TCP listeners with separate trust rules.
|
||||
|
||||
Expose only the protocols required by the deployment. A common public set is
|
||||
25, 465 or 587, and 993. Port 443 normally terminates at the chosen Web
|
||||
reverse proxy; the proxy then connects to Bongo's loopback port 8080. In
|
||||
direct-HTTPS mode Bongo binds 443 itself and also binds port 80 solely for a
|
||||
safe redirect to the configured `public_base_url`. POP3 and ManageSieve can
|
||||
remain private when no client needs them.
|
||||
|
||||
If HAProxy or another TCP load balancer fronts mail listeners, enable PROXY
|
||||
protocol only for its exact source addresses. If the proxy cannot speak PROXY
|
||||
protocol, do not trust a client-supplied mail header as an equivalent. See
|
||||
[proxy-protocol.md](proxy-protocol.md).
|
||||
|
||||
Bongo 0.7 mail listeners are IPv4. Opening IPv6 firewall rules does not add
|
||||
IPv6 support; coherent IPv6 handling is scheduled for 0.9.
|
||||
@@ -1,75 +0,0 @@
|
||||
# Protocol overview
|
||||
|
||||
Bongo keeps compatibility with older standards where that can be done without
|
||||
weakening the default policy, while advertising modern extensions only when
|
||||
their handlers and tests are present.
|
||||
|
||||
## Mail transport
|
||||
|
||||
The SMTP server supports classic SMTP and ESMTP with `SIZE`, `PIPELINING`,
|
||||
`8BITMIME`, DSN, `CHUNKING`/bounded `BDAT`, optional `SMTPUTF8`, STARTTLS,
|
||||
SASL authentication, and `REQUIRETLS` on TLS-capable listeners. `BINARYMIME`
|
||||
is deliberately not advertised or accepted. Authenticated submission and
|
||||
implicit TLS use listener-specific policy; Internet delivery uses
|
||||
opportunistic STARTTLS unless a destination policy requires TLS.
|
||||
|
||||
LMTP transports are available for local downstream services such as Mailman.
|
||||
Trusted SMTP/LMTP peers can receive original-client metadata through
|
||||
negotiated `XCLIENT` or `XFORWARD`, or through explicitly configured fallback
|
||||
headers. Incoming HAProxy PROXY v1/v2 is a separate, source-restricted
|
||||
connection feature.
|
||||
|
||||
See [smtp.md](smtp.md), [tls.md](tls.md), and
|
||||
[mail-authentication.md](mail-authentication.md).
|
||||
|
||||
## Mail access
|
||||
|
||||
IMAP advertises `IMAP4rev2`, `IMAP4rev1`, and legacy `IMAP4`, plus the
|
||||
implemented capabilities documented in [imap.md](imap.md). This preserves
|
||||
basic access for old clients while allowing modern UTF-8 mailbox and message
|
||||
handling after `ENABLE UTF8=ACCEPT`.
|
||||
|
||||
POP3 implements the normal transaction commands and advertises `TOP`,
|
||||
`RESP-CODES`, `AUTH-RESP-CODE`, `PIPELINING`, `EXPIRE NEVER`, `UIDL`, and
|
||||
`UTF8`. STLS is offered before authentication; SASL and password login are
|
||||
advertised only according to the TLS policy. POP3S provides implicit TLS.
|
||||
|
||||
## Server-side filtering
|
||||
|
||||
ManageSieve uses TCP 4190 and implements the RFC 5804 management commands,
|
||||
including script upload, activation, listing, retrieval, rename, deletion,
|
||||
space checks, and syntax checks. The Sieve engine reports `fileinto`,
|
||||
`envelope`, `body`, `variables`, `vacation`, and `vacation-seconds` support.
|
||||
Authentication mechanisms are obtained from the shared GNU GSASL policy and
|
||||
are offered after TLS.
|
||||
|
||||
Thunderbird and other ManageSieve clients can update the active script
|
||||
without depending on the Web interface. Later interfaces, including a future
|
||||
JMAP implementation, must operate on the same user filter model rather than
|
||||
inventing incompatible rules.
|
||||
|
||||
## Web, calendars, and contacts
|
||||
|
||||
The Python 3 Web service provides Webmail and user settings. CalDAV exposes
|
||||
calendars using iCalendar data, and CardDAV exposes address books using vCard
|
||||
data. External HTTPS is normally supplied by a reverse proxy; the Bongo Web
|
||||
listener itself defaults to HTTP on loopback.
|
||||
|
||||
JMAP and Exchange/MAPI protocols are not part of Bongo 0.7. JMAP is planned
|
||||
for 0.9 after the mail protocols and Store API are stable. Native
|
||||
Exchange/Outlook compatibility remains research beyond that milestone.
|
||||
|
||||
## Private Bongo protocols
|
||||
|
||||
The Store and Queue protocols coordinate local Bongo agents. They are not
|
||||
public client protocols and have no Internet compatibility promise. Bind them
|
||||
to a private interface and firewall ports 689 and 8670 from clients.
|
||||
|
||||
## Authentication and message security
|
||||
|
||||
Mail protocols share GNU GSASL and the same Bongo account/app-password
|
||||
policy. Password mechanisms are not exposed on an unencrypted connection.
|
||||
Optional TOTP protects the master login; app passwords keep non-interactive
|
||||
clients usable. SPF, DKIM, and DMARC authenticate incoming domain claims;
|
||||
outgoing DKIM and SRS cover signing and forwarding. None of these replaces TLS
|
||||
or user authentication.
|
||||
@@ -1,63 +0,0 @@
|
||||
# HAProxy PROXY protocol
|
||||
|
||||
Bongo accepts HAProxy PROXY protocol version 1 and version 2 on its mail
|
||||
client listeners. It is disabled by default and is available for SMTP,
|
||||
submission, the internal SMTP relay, SMTPS, IMAP/IMAPS, POP3/POP3S, and
|
||||
ManageSieve. The header is consumed before an application greeting and before
|
||||
an implicit TLS handshake.
|
||||
|
||||
Enable it separately in each applicable service configuration. For example,
|
||||
if HAProxy connects to Bongo from `172.16.11.7`:
|
||||
|
||||
```json
|
||||
"proxy_protocol_enabled": true,
|
||||
"proxy_protocol_networks": ["172.16.11.7/32"]
|
||||
```
|
||||
|
||||
The networks contain the addresses of the trusted HAProxy instances as seen by
|
||||
Bongo, not the addresses of mail clients. A connection from a configured proxy
|
||||
must provide a complete, valid PROXY header within five seconds. Bongo closes
|
||||
the connection otherwise. Connections from other source addresses remain
|
||||
normal native-protocol connections and cannot submit a trusted PROXY header.
|
||||
|
||||
A minimal HAProxy TCP backend looks like this:
|
||||
|
||||
```haproxy
|
||||
frontend smtp_in
|
||||
mode tcp
|
||||
bind :25
|
||||
default_backend bongo_smtp
|
||||
|
||||
backend bongo_smtp
|
||||
mode tcp
|
||||
server bongo 172.16.11.14:25 check send-proxy-v2
|
||||
```
|
||||
|
||||
TLS passthrough uses the same arrangement. HAProxy places the PROXY block
|
||||
before the untouched TLS stream:
|
||||
|
||||
```haproxy
|
||||
frontend imaps_in
|
||||
mode tcp
|
||||
bind :993
|
||||
default_backend bongo_imaps
|
||||
|
||||
backend bongo_imaps
|
||||
mode tcp
|
||||
server bongo 172.16.11.14:993 check send-proxy-v2
|
||||
```
|
||||
|
||||
For SMTP on port 26, `internal_relay_networks` continues to describe the
|
||||
original devices which may relay. Bongo applies the PROXY address first and
|
||||
then performs the internal-relay ACL, device mapping, DNS identification, and
|
||||
per-client rate limiting.
|
||||
|
||||
Bongo 0.7 supports the `TCP4` address family as well as the v1 `UNKNOWN` and
|
||||
v2 `LOCAL`/`UNSPEC` passthrough forms. A header carrying `TCP6` is rejected
|
||||
explicitly. Native IPv6 listeners and PROXY-provided IPv6 identities are
|
||||
planned together for Bongo 0.9 so every authentication, SPF, logging, ACL, and
|
||||
rate-limit path uses the same IPv6-capable address representation.
|
||||
|
||||
The web application is normally served by Apache or another HTTP reverse
|
||||
proxy. Configure PROXY protocol or forwarded headers at that HTTP layer;
|
||||
Bongo's mail-listener setting does not alter HTTP handling.
|
||||
@@ -1,283 +0,0 @@
|
||||
# Bongo 0.7.0 release test matrix
|
||||
|
||||
This matrix is the release gate for the 0.7.0 tag. A feature is not treated
|
||||
as working merely because it builds, appears in documentation, or is listed in
|
||||
a protocol capability response.
|
||||
|
||||
## Test-run rules
|
||||
|
||||
Three ordered passes are required. Use `PASS`, `FAIL`, or `N/A: reason` in
|
||||
every result cell; an empty cell is untested. `N/A` is allowed only for a
|
||||
genuinely optional deployment mode and never for a feature advertised by the
|
||||
tested configuration.
|
||||
|
||||
R1 is the implementation and repair pass. Test every row in order. When a row
|
||||
fails, fix it, add automated regression coverage where practical, reinstall,
|
||||
and repeat that row until it passes. Earlier R1 results remain useful; R1 is
|
||||
complete only after every row has produced at least one passing result.
|
||||
|
||||
R2 starts from the first row only after R1 is entirely green. Its purpose is
|
||||
to find regressions introduced while fixing later R1 rows. A failure is fixed
|
||||
and retested, then R2 continues. R3 starts only after R2 is entirely green and
|
||||
is the final complete regression pass. The 0.7.0 tag requires every applicable
|
||||
R3 row to pass.
|
||||
|
||||
Each result links to evidence recording the Git commit, package build,
|
||||
configuration checksum, compiler, machine, and date used for that individual
|
||||
test. Therefore fixes during R1 or R2 remain traceable without pretending the
|
||||
whole pass used one immutable source snapshot.
|
||||
|
||||
| Pass | Started | Finished | Evidence index | Result |
|
||||
| --- | --- | --- | --- | --- |
|
||||
| R1 implementation/repair | 2026-07-19 | | [R1 evidence](test-evidence/0.7-r1.md) | In progress |
|
||||
| R2 regression | | | | |
|
||||
| R3 final regression | | | | |
|
||||
|
||||
The disposable test domain, users, passwords, private keys, captured messages,
|
||||
and scanner samples must not be reused in production. Secret material belongs
|
||||
only in the pass evidence directory, which must not be committed.
|
||||
|
||||
## Build, portability, and packages
|
||||
|
||||
| ID | Test | R1 | R2 | R3 |
|
||||
| --- | --- | --- | --- | --- |
|
||||
| BLD-01 | Clean GCC debug build with actionable warnings enabled | [PASS](test-evidence/0.7-r1.md#bld-01) | | |
|
||||
| BLD-02 | Complete GCC CTest suite | [PASS](test-evidence/0.7-r1.md#bld-02) | | |
|
||||
| BLD-03 | Clean Clang debug build with the same feature set | [PASS](test-evidence/0.7-r1.md#bld-03) | | |
|
||||
| BLD-04 | Complete Clang CTest suite | [PASS](test-evidence/0.7-r1.md#bld-04) | | |
|
||||
| BLD-05 | ASan and UBSan build plus unit and protocol sessions | [PASS](test-evidence/0.7-r1.md#bld-05) | | |
|
||||
| BLD-06 | LeakSanitizer run over startup, delivery, access, and shutdown | [PASS](test-evidence/0.7-r1.md#bld-06) | | |
|
||||
| BLD-07 | Separate ThreadSanitizer concurrency run | [PASS](test-evidence/0.7-r1.md#bld-07) | | |
|
||||
| BLD-08 | 32-bit x86 build and tests without pointer/size truncation | [PASS](test-evidence/0.7-r1.md#bld-08) | | |
|
||||
| BLD-09 | ARMv5 build with the supported baseline toolchain | [PASS](test-evidence/0.7-r1.md#bld-09) | | |
|
||||
| BLD-10 | ARMv7 hard-float build and tests | [PASS](test-evidence/0.7-r1.md#bld-10) | | |
|
||||
| BLD-11 | AArch64 build and tests | [PASS](test-evidence/0.7-r1.md#bld-11) | | |
|
||||
| BLD-12 | CPack binary packages install into a clean staging root | [PASS](test-evidence/0.7-r1.md#bld-12) | | |
|
||||
| BLD-13 | CPack source archive has no `-linux`, VCS, build, or private files | [PASS](test-evidence/0.7-r1.md#bld-13) | | |
|
||||
| BLD-14 | Gentoo live ebuild builds, tests, installs, and passes package QA | [PASS](test-evidence/0.7-r1.md#bld-14) | | |
|
||||
| BLD-15 | Debian package builds and installs on the target Debian release | | | |
|
||||
| BLD-16 | `/usr`, `/usr/local`, lib/lib64, sysconf, state, and runtime paths follow FHS | | | |
|
||||
| BLD-17 | Install, upgrade, reinstall, and uninstall preserve/remove documented state | | | |
|
||||
| BLD-18 | Installed shared libraries have complete dependencies and valid SONAMEs | | | |
|
||||
| BLD-19 | Man pages, translations, Web assets, docs, units, and examples are installed | | | |
|
||||
|
||||
### Debian Trixie release bundle
|
||||
|
||||
The Gitea release workflow must not silently use an unpatched distribution
|
||||
Mailutils or an arbitrary system copy of libsrs2. It must fetch the source for
|
||||
both dependencies, apply the maintained Mailutils Sieve repair, and rebuild
|
||||
both as native Debian Trixie source and binary packages. In particular, the
|
||||
archived historical libsrs2 `.deb` files must never be copied into the release
|
||||
bundle. They are input references for compatibility testing only; the release
|
||||
packages must be newly produced from the archived libsrs2 source on Trixie.
|
||||
The workflow then installs those freshly built development packages before
|
||||
configuring Bongo and builds Bongo against those exact headers and libraries.
|
||||
|
||||
The Trixie release ZIP must contain the resulting Mailutils and libsrs2 binary
|
||||
packages as well as their complete Debian source-package artifacts (`.dsc`,
|
||||
upstream source archive, Debian patch archive, and `.changes`/`.buildinfo` where
|
||||
produced). BLD-15 fails if an old libsrs2 binary package is bundled, if either
|
||||
dependency was obtained only from the runner filesystem, if the Bongo link
|
||||
step resolves a different copy, or if any of these redistributable build
|
||||
inputs and outputs is absent from the ZIP.
|
||||
|
||||
## Setup, configuration, and service lifecycle
|
||||
|
||||
| ID | Test | R1 | R2 | R3 |
|
||||
| --- | --- | --- | --- | --- |
|
||||
| CFG-01 | Fresh curses setup with sane defaults and correctly placed prompts | | | |
|
||||
| CFG-02 | Setup is safe and idempotent when repeated | | | |
|
||||
| CFG-03 | `bongo-admin config check`, edit, sync, rollback, and manager reload | | | |
|
||||
| CFG-04 | Suffixless config, alias, SSL, DKIM, DMARC, and ACME directory layout | | | |
|
||||
| CFG-05 | One-shot migration recognises historical names and visibly moves old files | | | |
|
||||
| CFG-06 | Alias fragments support aliases only, domains only, or both | | | |
|
||||
| CFG-07 | Scanner editor preserves unrelated settings and restores on failure | | | |
|
||||
| CFG-08 | Reverse-proxy, HAProxy, direct HTTP, and direct HTTPS validation paths | | | |
|
||||
| CFG-09 | Self-signed GnuTLS certificate/key generation and permission checks | | | |
|
||||
| CFG-10 | Existing certificate/key validation and safe rejection of broken pairs | | | |
|
||||
| CFG-11 | DKIM/SPF/DMARC discovery, key import/generation, DNS hints, and task | | | |
|
||||
| CFG-12 | Manager start, reload, restart, clean stop, stale PID, and crash recovery | | | |
|
||||
| CFG-13 | Every agent starts as intended and drops privileges | | | |
|
||||
| CFG-14 | tmpfiles creates runtime paths; package contains no runtime PID directories | | | |
|
||||
| CFG-15 | systemd ordering, hardening, scanner timer, and worker scheduling | | | |
|
||||
| CFG-16 | Timezone cache rebuild uses the installed checked-in snapshot | | | |
|
||||
|
||||
## Store and Queue
|
||||
|
||||
| ID | Test | R1 | R2 | R3 |
|
||||
| --- | --- | --- | --- | --- |
|
||||
| STQ-01 | New users receive independent stores and standard folders | | | |
|
||||
| STQ-02 | Local message survives Queue-to-Store delivery byte-for-byte | | | |
|
||||
| STQ-03 | Queue free-space calculation is correct on 32/64-bit and reserves space | | | |
|
||||
| STQ-04 | Full-disk and unreadable-spool failures defer safely without mail loss | | | |
|
||||
| STQ-05 | Retry, expiry, bounce, listing, hold/release, and deletion | | | |
|
||||
| STQ-06 | Concurrent delivery/read/move/delete/restart preserves integrity | | | |
|
||||
| STQ-07 | Backup/export and restore reproduce mail, metadata, contacts, calendars | | | |
|
||||
| STQ-08 | Invalid commands, oversized lines, and unauthorised access fail safely | | | |
|
||||
|
||||
## SMTP receive, submission, and delivery
|
||||
|
||||
| ID | Test | R1 | R2 | R3 |
|
||||
| --- | --- | --- | --- | --- |
|
||||
| SMTP-01 | Port 25 greeting, HELO, EHLO, NOOP, RSET, HELP, VRFY policy, QUIT | | | |
|
||||
| SMTP-02 | Port 587 STARTTLS submission with shared GSASL authentication | | | |
|
||||
| SMTP-03 | Port 465 implicit TLS submission | | | |
|
||||
| SMTP-04 | Trusted port 26 accepts only configured networks and applies limits | | | |
|
||||
| SMTP-05 | Internal sender/domain normalisation uses peer DNS/IP mapping safely | | | |
|
||||
| SMTP-06 | Local authenticated delivery from test1 to test2 | | | |
|
||||
| SMTP-07 | Internet delivery prefers STARTTLS and follows opportunistic fallback | | | |
|
||||
| SMTP-08 | Required TLS and `REQUIRETLS` defer rather than downgrade | | | |
|
||||
| SMTP-09 | Relayhost hostname, port, TLS, authentication, failure, and recovery | | | |
|
||||
| SMTP-10 | Open-relay tests reject unauthenticated/untrusted third-party relay | | | |
|
||||
| SMTP-11 | `SIZE` exact limit, over-limit, absent size, and disk-space responses | | | |
|
||||
| SMTP-12 | `PIPELINING` ordering and error recovery | | | |
|
||||
| SMTP-13 | `8BITMIME` remains byte-correct | | | |
|
||||
| SMTP-14 | DSN `RET`, `ENVID`, `NOTIFY`, and `ORCPT` cases | | | |
|
||||
| SMTP-15 | `CHUNKING`/bounded `BDAT`, including zero/last and malformed chunks | | | |
|
||||
| SMTP-16 | `BINARYMIME` remains unadvertised and rejected | | | |
|
||||
| SMTP-17 | `SMTPUTF8` delivery and invalid UTF-8 rejection | | | |
|
||||
| SMTP-18 | Recipient validation, multiple recipients, partial refusal, aliases | | | |
|
||||
| SMTP-19 | Domain/address aliases, forwarding loops, and SRS forwarding | | | |
|
||||
| SMTP-20 | LMTP client uses a disposable status-aware LMTP test daemon | | | |
|
||||
| SMTP-21 | LMTP per-recipient 2xx, 4xx, 5xx, retry, and duplicate prevention | | | |
|
||||
| SMTP-22 | XCLIENT/XFORWARD negotiation only to trusted destinations | | | |
|
||||
| SMTP-23 | Fallback client-address header only for configured trusted peers | | | |
|
||||
| SMTP-24 | Incoming PROXY v1/v2 only from configured proxy networks | | | |
|
||||
| SMTP-25 | Malformed commands, long lines, floods, timeout, and disconnect | | | |
|
||||
|
||||
## IMAP4rev2, IMAP4rev1, and legacy IMAP4
|
||||
|
||||
| ID | Test | R1 | R2 | R3 |
|
||||
| --- | --- | --- | --- | --- |
|
||||
| IMAP-01 | Capability list matches implemented rev2/rev1/legacy behaviour | | | |
|
||||
| IMAP-02 | Port 143 STARTTLS and pre-TLS `LOGINDISABLED` | | | |
|
||||
| IMAP-03 | Port 993 TLS, LOGIN, SASL PLAIN, and SASL LOGIN | | | |
|
||||
| IMAP-04 | CAPABILITY, NOOP, LOGOUT, ID, and NAMESPACE | | | |
|
||||
| IMAP-05 | LIST, LSUB, extended LIST, LIST-STATUS, hierarchy quoting | | | |
|
||||
| IMAP-06 | CREATE, DELETE, RENAME, SUBSCRIBE, UNSUBSCRIBE | | | |
|
||||
| IMAP-07 | SELECT, EXAMINE, STATUS/SIZE, CHECK, CLOSE, UNSELECT | | | |
|
||||
| IMAP-08 | APPEND, LITERAL+, APPENDLIMIT, flags/date, oversized literals | | | |
|
||||
| IMAP-09 | FETCH/UID FETCH body, headers, partials, flags, envelope, binary | | | |
|
||||
| IMAP-10 | STORE/UID STORE add/remove/replace flags and silent variants | | | |
|
||||
| IMAP-11 | COPY/UID COPY/MOVE/UID MOVE and UIDPLUS response codes | | | |
|
||||
| IMAP-12 | EXPUNGE/UID EXPUNGE preserve sequence and UID semantics | | | |
|
||||
| IMAP-13 | SEARCH/UID SEARCH sets, flags, dates, sizes, HEADER/SUBJECT/FROM/TO | | | |
|
||||
| IMAP-14 | SEARCH BODY/TEXT/NOT/OR/CHARSET, ESEARCH RETURN, saved `$` set | | | |
|
||||
| IMAP-15 | IDLE notifications and DONE with concurrent delivery/disconnect | | | |
|
||||
| IMAP-16 | ENABLE UTF8=ACCEPT and UTF-8 mailbox/message names | | | |
|
||||
| IMAP-17 | SPECIAL-USE and CREATE-SPECIAL-USE folders | | | |
|
||||
| IMAP-18 | Old-client plain IMAP4 subset without rev1/rev2 assumptions | | | |
|
||||
| IMAP-19 | Invalid states, malformed sets/literals, oversized/pipelined input | | | |
|
||||
| IMAP-20 | Reconnect, simultaneous clients, restart, mailbox consistency | | | |
|
||||
|
||||
## POP3 and ManageSieve
|
||||
|
||||
| ID | Test | R1 | R2 | R3 |
|
||||
| --- | --- | --- | --- | --- |
|
||||
| POP-01 | Port 110 CAPA/STLS; credentials unavailable before TLS | | | |
|
||||
| POP-02 | Port 995 TLS with USER/PASS and shared GSASL mechanisms | | | |
|
||||
| POP-03 | STAT, LIST, UIDL, RETR, TOP, and dot transparency | | | |
|
||||
| POP-04 | DELE, RSET, NOOP, QUIT commit, and disconnect rollback | | | |
|
||||
| POP-05 | UTF8, PIPELINING, response codes, malformed input, timeout | | | |
|
||||
| SIEVE-01 | Port 4190 greeting, STARTTLS, and GSASL authentication | | | |
|
||||
| SIEVE-02 | CAPABILITY, HAVESPACE, PUT/CHECK/LIST/GETSCRIPT | | | |
|
||||
| SIEVE-03 | SETACTIVE, RENAME, DELETE, LOGOUT, and persistence | | | |
|
||||
| SIEVE-04 | fileinto, envelope, body, variables, vacation extensions | | | |
|
||||
| SIEVE-05 | Invalid syntax, quota/size, duplicate names, traversal, auth | | | |
|
||||
|
||||
## Authentication and identity
|
||||
|
||||
| ID | Test | R1 | R2 | R3 |
|
||||
| --- | --- | --- | --- | --- |
|
||||
| AUTH-01 | New Argon2id and successful PBKDF2/legacy upgrade | | | |
|
||||
| AUTH-02 | Wrong password, disabled user, throttling, constant-time failure | | | |
|
||||
| AUTH-03 | Optional TOTP enable/login/disable; field hidden when disabled | | | |
|
||||
| AUTH-04 | Valid in-memory QR data never written or logged | | | |
|
||||
| AUTH-05 | Recovery copy-all, one-time atomic use, regeneration | | | |
|
||||
| AUTH-06 | App-password expiry/revocation/service/network scope | | | |
|
||||
| AUTH-07 | App-password requirement cannot be enabled while TOTP is off | | | |
|
||||
| AUTH-08 | Local/LDAP master password follows documented protocol policy | | | |
|
||||
| AUTH-09 | LDAP/AD lookup, group provisioning, adoption, rejection | | | |
|
||||
| AUTH-10 | LDAP StartTLS/LDAPS validation and secure bind-secret file | | | |
|
||||
| AUTH-11 | LDAP outage cache only for outages and expires as configured | | | |
|
||||
| AUTH-12 | Admin cache status/extend-all audits every user safely | | | |
|
||||
| AUTH-13 | Rename, aliases, forced logout, and old-name warning task | | | |
|
||||
| AUTH-14 | Client inventory records useful metadata without secrets | | | |
|
||||
|
||||
## Mail authentication, filtering, antivirus, and antispam
|
||||
|
||||
| ID | Test | R1 | R2 | R3 |
|
||||
| --- | --- | --- | --- | --- |
|
||||
| MAILAUTH-01 | SPF pass/fail/softfail/neutral/none/temp/permerror | | | |
|
||||
| MAILAUTH-02 | Incoming DKIM valid/invalid/multiple/modified/DNS error | | | |
|
||||
| MAILAUTH-03 | DMARC alignment and none/quarantine/reject/temp policies | | | |
|
||||
| MAILAUTH-04 | Forged Authentication-Results removed; local result added | | | |
|
||||
| MAILAUTH-05 | Temporary key signs outbound; independent verification passes | | | |
|
||||
| MAILAUTH-06 | Missing/unreadable/mismatched/rotated DKIM key safety | | | |
|
||||
| MAILAUTH-07 | SRS encode/decode/tamper/expiry/bounce/loop handling | | | |
|
||||
| SCAN-01 | ClamAV clean and EICAR paths | | | |
|
||||
| SCAN-02 | SpamAssassin ham/spam and score/header handling | | | |
|
||||
| SCAN-03 | Scanner unavailable/timeout/malformed/restart policy | | | |
|
||||
| SCAN-04 | Official/KAM/Heinlein channels, signatures, lint, timer | | | |
|
||||
| SCAN-05 | Worker detects ClamAV/SA data faults without SA-age false alarm | | | |
|
||||
| SCAN-06 | Filters, mailing-list detection, folders, vacation, loop prevention | | | |
|
||||
| SCAN-07 | Quarantine/task creation, ignore, retry, delete, audit | | | |
|
||||
|
||||
## Web, DAV, and external accounts
|
||||
|
||||
| ID | Test | R1 | R2 | R3 |
|
||||
| --- | --- | --- | --- | --- |
|
||||
| WEB-01 | Classic login/assets render in current Firefox/Chromium | | | |
|
||||
| WEB-02 | Login/logout/session/CSRF/cookies/brute-force limiting | | | |
|
||||
| WEB-03 | Trusted proxy/header chain resists client-address spoofing | | | |
|
||||
| WEB-04 | Folders/read/compose/reply/forward/attachments/move/delete | | | |
|
||||
| WEB-05 | HTML sanitisation keeps safe images and blocks active tracking | | | |
|
||||
| WEB-06 | Identities, external senders, signatures, SMTP selection | | | |
|
||||
| WEB-07 | Filters/tasks/quarantine/external accounts/app passwords/2FA | | | |
|
||||
| WEB-08 | English, German, and every installed gettext catalogue load | | | |
|
||||
| DAV-01 | CalDAV discovery, CRUD, sync, ETag, and iCalendar | | | |
|
||||
| DAV-02 | CardDAV discovery, CRUD, sync, ETag, and vCard | | | |
|
||||
| DAV-03 | DAV master/app-password scope and TLS/proxy policy | | | |
|
||||
| EXT-01 | Provider presets and manual configuration validation | | | |
|
||||
| EXT-02 | POP3 collection keep/delete and INBOX/custom target | | | |
|
||||
| EXT-03 | IMAP collection keep/delete and INBOX/custom target | | | |
|
||||
| EXT-04 | Multiple accounts and identities stay isolated per user | | | |
|
||||
| EXT-05 | Matching external SMTP identity from Web and SMTP client | | | |
|
||||
| EXT-06 | Collector TLS/failure/retry/deduplication/secret-safe logs | | | |
|
||||
|
||||
## ACME, administration, observability, and security
|
||||
|
||||
| ID | Test | R1 | R2 | R3 |
|
||||
| --- | --- | --- | --- | --- |
|
||||
| ACME-01 | HTTP-01 order/challenge/renew/deploy/agent reload | | | |
|
||||
| ACME-02 | DNS-01 nsupdate with TSIG and cleanup | | | |
|
||||
| ACME-03 | DNS-01 Cloudflare and generic provider contract | | | |
|
||||
| ACME-04 | Multi-domain/wildcard, CA retry limits, failure/rollback | | | |
|
||||
| ADM-01 | Admin/config/queue/store tools, TUI, help, man pages agree | | | |
|
||||
| ADM-02 | User/domain/alias/password/rename/config/scanner validation | | | |
|
||||
| ADM-03 | Structured Web/SMTP/IMAP/POP3/Sieve auth-failure logs | | | |
|
||||
| ADM-04 | Fail2ban matches failures and not successful logins | | | |
|
||||
| SEC-01 | No secrets in argv, diagnostics, normal logs, Web responses | | | |
|
||||
| SEC-02 | Safe modes for auth/TLS/DKIM/SRS/ACME/provider secrets | | | |
|
||||
| SEC-03 | Secure TLS default; explicit legacy mode isolated/logged | | | |
|
||||
| SEC-04 | Malformed corpus, limits, traversal, injection, smuggling | | | |
|
||||
| SEC-05 | Connection/auth/message rate limits resist floods | | | |
|
||||
| SEC-06 | Restarts during pipeline cause no loss or duplicates | | | |
|
||||
| SEC-07 | Dependency/CVE/source review has no 0.7 blockers | | | |
|
||||
|
||||
## Required integration fixtures
|
||||
|
||||
- two disposable local users and at least two hosted/alias domains;
|
||||
- local DNS able to publish temporary SPF, DKIM, and DMARC records;
|
||||
- temporary GnuTLS certificates and a temporary OpenDKIM signing key;
|
||||
- ClamAV, SpamAssassin, EICAR, and deterministic ham/spam mail;
|
||||
- Xeams DevNull SMTP for captured outbound relay messages;
|
||||
- a status-aware LMTP daemon which records envelope/message and can return
|
||||
per-recipient 2xx, 4xx, and 5xx responses;
|
||||
- vtestmail for external POP3/IMAP collection tests;
|
||||
- disposable LDAP/AD-compatible and ACME/DNS challenge fixtures;
|
||||
- old and current client probes, including a basic legacy IMAP4 path.
|
||||
|
||||
DevNull and LMTP captures are checked for exact envelope, headers, body, DKIM
|
||||
signature, SRS address, client metadata, and duplicate or missing deliveries.
|
||||
Merely receiving a TCP connection is not a pass.
|
||||
-165
@@ -1,165 +0,0 @@
|
||||
# Roadmap to Bongo 1.0
|
||||
|
||||
This roadmap combines the still useful goals from the historical Bongo 1.0
|
||||
plan with the work in the maintained tree. It describes release intent, not a
|
||||
promise that an unfinished item is already safe for production.
|
||||
|
||||
The guiding constraints are:
|
||||
|
||||
- keep Bongo an integrated, understandable server for power users, homelabs,
|
||||
and small organisations;
|
||||
- preserve open protocols and old-client interoperability where it does not
|
||||
weaken secure defaults;
|
||||
- use one Store, account model, filter model, and administration path;
|
||||
- retain the familiar Web design through 0.7, then redesign from the complete
|
||||
feature set rather than inventing a second product;
|
||||
- keep the server in C and the Web interface in Python 3; no Ruby rewrite is
|
||||
part of the plan.
|
||||
|
||||
## 0.7.0: modernised, testable foundation
|
||||
|
||||
The 0.7 release line finishes the forward port before a final tag is made:
|
||||
|
||||
- CMake/CPack packaging split by subtree, FHS paths, systemd/OpenRC support,
|
||||
current dependencies, GCC/Clang warning cleanup, sanitizer runs, and
|
||||
32-bit/ARM portability checks;
|
||||
- SMTP receive/send, submission, LMTP, opportunistic and required TLS policy,
|
||||
trusted port 26 device relay, PROXY v1/v2, XCLIENT/XFORWARD, and explicit
|
||||
fallback client-address headers;
|
||||
- IMAP4rev2, IMAP4rev1, legacy IMAP4, POP3/POP3S, ManageSieve, UTF-8 handling,
|
||||
and Store operations required by those protocols;
|
||||
- SPF, DKIM, DMARC, SRS, ClamAV, SpamAssassin, Sieve, vacation, and structured
|
||||
authentication logs suitable for Fail2ban;
|
||||
- Argon2id passwords, optional TOTP and recovery codes, app passwords, LDAP/AD
|
||||
authentication and provisioning, outage cache administration, aliases, and
|
||||
safe user rename;
|
||||
- Python 3 Webmail, restored classic assets, safe HTML mail rendering,
|
||||
CalDAV/CardDAV, user tasks, filters, signatures, identities, and external
|
||||
POP3/IMAP account collection with matching SMTP relays;
|
||||
- guided curses setup, validated curses administration, provider presets,
|
||||
reverse-proxy/scanner examples, manual pages, and maintained documentation.
|
||||
|
||||
The tag is gated on a clean local staged installation, agent startup, account
|
||||
setup, end-to-end local delivery, public SMTP scenarios, IMAP/POP3/ManageSieve,
|
||||
Web/CalDAV/CardDAV, scanner failure modes, upgrade handling, GCC and Clang,
|
||||
sanitizers, and package QA. IPv6 and JMAP are intentionally not 0.7 features.
|
||||
|
||||
`CHUNKING`/`BDAT` is supported for normal MIME messages. `BINARYMIME` remains
|
||||
unadvertised until Queue, Store, authentication/filter agents, and outbound
|
||||
delivery have an end-to-end binary-safe path and interoperability tests.
|
||||
|
||||
## 0.8: complete and reorganise the Web experience
|
||||
|
||||
0.8 uses the feature-complete 0.7 interface as the inventory for a responsive,
|
||||
simple redesign:
|
||||
|
||||
- organise account, identity, external-provider, filter, signature, TOTP,
|
||||
app-password, task, quarantine, calendar, and contact settings coherently;
|
||||
- complete the user and Web administration surfaces without replacing the
|
||||
validated command-line/TUI tools;
|
||||
- improve the composer, quoting, contact selection, mailing-list actions,
|
||||
search, timezone handling, diagnostics, and accessible error messages;
|
||||
- complete calendar sharing, invitations, free/busy, delegation, and resource
|
||||
calendars such as rooms;
|
||||
- provide clear restart/reload indications, service health, queue summaries,
|
||||
scanner state, useful logs, and safe certificate deployment hooks;
|
||||
- finish maintained translations and the gettext workflow.
|
||||
|
||||
The classic Bongo/Dragonfly visual identity and usable existing artwork stay
|
||||
available. A small progressive-enhancement library such as HTMX may be used
|
||||
only when its stable release, licence, packaging, and long-term maintenance
|
||||
fit Bongo; it is not a reason to rewrite working server code.
|
||||
|
||||
## 0.9: new protocol and network generation
|
||||
|
||||
0.9 introduces changes which must be coherent across the whole server:
|
||||
|
||||
- IPv6 for listeners, ACLs, rate limits, DNS, SPF, logs, PROXY metadata,
|
||||
trusted relay mapping, Fail2ban, and setup validation;
|
||||
- JMAP mail, submission, contacts, and calendars backed by the existing Store,
|
||||
while retaining IMAP/POP3/SMTP for old and current clients;
|
||||
- scheduled external CalDAV calendar subscriptions and provider calendar sync,
|
||||
reusing the external-account identity and credential model;
|
||||
- stable migration and compatibility APIs needed by the Web redesign and
|
||||
future clients.
|
||||
|
||||
Native Exchange/MAPI or ActiveSync compatibility remains research after the
|
||||
open-protocol work. It is not a 0.9 or 1.0 release gate.
|
||||
|
||||
## 1.0: product readiness and federation-friendly identity
|
||||
|
||||
1.0 closes the historical product goals and makes the supported deployment
|
||||
contract explicit:
|
||||
|
||||
- complete virtual-domain, domain-alias, address-alias, forwarding, shared
|
||||
mailbox, calendar-sharing, resource, and delegation administration;
|
||||
- finish full Web and TUI administration for accounts, agents, listeners,
|
||||
certificates, domains, aliases, queue state, logs, health, and upgrades;
|
||||
- provide reproducible migration, backup, restore, disaster-recovery, and
|
||||
large-mailbox procedures with performance and integrity tests;
|
||||
- run protocol interoperability, malformed-input, open-relay, authentication,
|
||||
mail-authentication, fuzzing, sanitizer, and external mail-server test suites;
|
||||
- redesign the complete message pipeline for arbitrary binary payloads and
|
||||
enable SMTP `BINARYMIME` only after receive, Queue, Store, filters, signing,
|
||||
and outbound `BDAT` delivery pass byte-for-byte interoperability tests;
|
||||
- complete a documented security review and threat model before the stable
|
||||
release;
|
||||
- stabilise configuration schemas, Store-facing APIs, upgrade rules, and
|
||||
distribution packages.
|
||||
|
||||
### OAuth for external mail providers
|
||||
|
||||
User-configured freemail accounts gain OAuth 2.0 provider linking in addition
|
||||
to password authentication. Provider presets describe authorization, token,
|
||||
revocation, IMAP/POP3, and SMTP endpoints and required scopes. The Web flow
|
||||
uses Authorization Code with PKCE; encrypted refresh tokens are rotated and
|
||||
revocable. Mail connections use provider-supported SASL `OAUTHBEARER` or
|
||||
`XOAUTH2`, with a clear per-provider fallback only when OAuth is unavailable.
|
||||
No provider password or token appears in a command line or log.
|
||||
|
||||
Incoming collection and outgoing identity stay coupled to the same user-owned
|
||||
external account, including mailbox target, source-deletion policy, sender
|
||||
verification, and task/error reporting. OAuth support is implemented as part
|
||||
of Bongo's account model, not by requiring Fetchmail or a separate relay
|
||||
service.
|
||||
|
||||
### Authelia and OIDC master login
|
||||
|
||||
Authelia can be selected as an optional OpenID Connect source for the Bongo
|
||||
master login alongside local and LDAP authentication. Integration uses OIDC
|
||||
discovery, Authorization Code with PKCE, strict issuer/audience/redirect
|
||||
validation, signed state and nonce values, and explicit group/claim mapping
|
||||
for account provisioning and administrator roles.
|
||||
|
||||
OIDC supplies an interactive master sign-in; Bongo does not collect or relay
|
||||
the Authelia password. IMAP, POP3, SMTP, and ManageSieve continue to use
|
||||
service-scoped Bongo app passwords, so mail remains available during a bounded
|
||||
identity-provider outage. Recovery, cache lifetime, forced revocation, and
|
||||
local emergency-administrator policy must be configurable and audited. TOTP at
|
||||
Authelia and Bongo must not accidentally require two redundant second-factor
|
||||
prompts unless the administrator explicitly chooses that policy.
|
||||
|
||||
## Historical 1.0 goals retained
|
||||
|
||||
| Historical milestone or requirement | Current destination |
|
||||
| --- | --- |
|
||||
| Antispam, antivirus, CLI configuration, and reviewed logging | 0.7 foundation; 1.0 operational/security validation |
|
||||
| Web administration, command tools, virtual domains, aliases, and forwarding | 0.7 TUI/base model; 0.8 UI; 1.0 completion |
|
||||
| CalDAV and internationalisation | 0.7 base protocol; 0.8 sharing/UI/translations |
|
||||
| Calendar sharing, invitations, free/busy, and resource calendars | 0.8 and 1.0 completion |
|
||||
| User preferences, better composer, contacts, search, and mailing-list actions | 0.7 base features; 0.8 UX completion |
|
||||
| Useful diagnostics, queue management, service statistics, and logs | 0.7 tools; 0.8 UI; 1.0 operational gate |
|
||||
| Security review before stable release | Mandatory 1.0 gate |
|
||||
|
||||
The old milestone labels and dates were planning history, not current release
|
||||
dates. Their product goals remain where they still make sense; obsolete
|
||||
implementation advice does not.
|
||||
|
||||
## Explicitly excluded directions
|
||||
|
||||
- no WeBongo/RBongo or other Ruby rewrite;
|
||||
- no return to Python 2, mod_python, Autotools, or a bundled managed slapd;
|
||||
- no insecure SSL/TLS protocol enabled by default;
|
||||
- no dependency on Rspamd, Fetchmail, Postfix, or Dovecot for core advertised
|
||||
Bongo features;
|
||||
- no claim of an extension merely because another server implements it.
|
||||
@@ -1,108 +0,0 @@
|
||||
# Guided setup and configuration
|
||||
|
||||
Run `bongo-setup` (or `bongo-config wizard`) as root for a new installation.
|
||||
The curses wizard asks deployment-level questions: server identity and hosted
|
||||
domains, Web reverse proxy or direct-HTTPS mode, optional HAProxy mail
|
||||
frontend, enabled mail protocols, internal port 26 relay, LDAP, legacy TLS
|
||||
compatibility, mail authentication, and local mail scanners. Direct HTTPS
|
||||
defaults to `/etc/bongo/ssl.d/server.crt` and `server.key`, listens on 443,
|
||||
and reserves port 80 for the automatic HTTPS redirect. Individual protocol
|
||||
limits retain safe defaults.
|
||||
|
||||
Automatic ACME is optional. HTTP-01 uses the built-in Web challenge endpoint;
|
||||
the public reverse proxy must route `/.well-known/acme-challenge/` to Bongo.
|
||||
DNS-01 supports wildcard certificates and asks for one provider per DNS zone.
|
||||
The first provider choice is native `nsupdate`/RFC 2136 with optional TSIG;
|
||||
Cloudflare with a zone-scoped API token is also included. Provider secrets are
|
||||
stored in `/etc/bongo/acme.d/providers` as `0640 root:bongo` and never appear
|
||||
in process arguments. The wizard enables the renewal worker only after the CA
|
||||
terms have been accepted.
|
||||
|
||||
For every hosted domain the wizard queries the currently published SPF,
|
||||
selector-specific DKIM, and DMARC TXT records. It reuses a valid local DKIM
|
||||
key, can import an existing unencrypted RSA key, or creates a new 2048-bit key
|
||||
with `opendkim-genkey`. Private keys are installed root-owned and readable by
|
||||
the Bongo group only. The wizard prints the exact DNS records which still need
|
||||
to be published and creates a warning task for the account reached through
|
||||
that domain's `dmarc-reports` alias. DNS timeouts are reported as a task and do
|
||||
not prevent a safe local installation.
|
||||
|
||||
The initial certificate is created directly through the GnuTLS API as a
|
||||
3072-bit RSA self-signed server certificate. An
|
||||
existing complete, safe, matching certificate/key pair is validated and kept;
|
||||
an incomplete, invalid, or carelessly permissioned pair stops setup. ACME can
|
||||
replace the pair later through a deploy hook.
|
||||
|
||||
The admin password and generated configuration bundle are passed to
|
||||
`bongo-config` through inherited anonymous file descriptors. They do not
|
||||
appear in process arguments and no named password file is created.
|
||||
|
||||
The wizard first probes clamd and spamd without changing either service. A
|
||||
reachable scanner can be enabled immediately. If an installed local scanner is
|
||||
unreachable, the administrator may explicitly opt into the scanner editor.
|
||||
The editor recognizes the usual Gentoo/OpenRC, Debian/systemd and compatible
|
||||
configuration locations, shows every path before making a change, preserves
|
||||
unrelated package options, and restricts the TCP listener to loopback.
|
||||
|
||||
Before changing an existing scanner file it creates a one-time adjacent
|
||||
`.bongo-setup.bak`. The administrator separately decides whether setup may
|
||||
enable and restart the detected service. When service management is allowed,
|
||||
setup requires a successful protocol `PONG` before it installs the Bongo
|
||||
configuration. A failed write, service command, probe, or later Bongo setup
|
||||
step restores the scanner files and their prior enabled/running state. If
|
||||
service management is declined or no supported unit is found, setup edits only
|
||||
the approved file and reports that a manual restart and check are required.
|
||||
Remote scanners are never reconfigured. Loopback-only example fragments are
|
||||
installed below `share/bongo/examples/antispam`; reverse proxy examples are
|
||||
installed below `share/bongo/examples/reverse-proxy`.
|
||||
|
||||
An installation that contains SpamAssassin but no rules is detected before
|
||||
the preview. With the administrator's scanner-edit confirmation, setup runs
|
||||
the signed `sa-update` channel followed by `spamassassin --lint`. On a fresh
|
||||
Gentoo installation it first obtains the Apache update key over HTTPS and
|
||||
checks its complete fingerprint before import. A download or lint failure
|
||||
happens before configuration files are edited. Successfully installed rule
|
||||
data is retained as updated scanner data.
|
||||
|
||||
The scanner editor can additionally select the signed KAM rules or the
|
||||
unsigned Heinlein Support rules. Both are off by default. KAM's complete
|
||||
OpenPGP fingerprint is verified before key import. Heinlein is shown with an
|
||||
explicit authenticity warning because its documented setup requires
|
||||
`--nogpg`. Downloaded channels are never permitted to load plugins. On a
|
||||
systemd installation, selecting either channel writes the protected
|
||||
`/etc/bongo/spamassassin.d/channels` file and enables the hourly
|
||||
`bongo-spamassassin-update.timer`. KAM and Heinlein are always updated in
|
||||
separate processes so Heinlein's unsigned exception does not affect KAM.
|
||||
|
||||
`bongo-setup scanners` runs only this local scanner editor, service check, and
|
||||
matching Bongo-agent activation. It is suitable after scanner package upgrades
|
||||
and does not repeat initial Bongo setup. A verified SpamAssassin endpoint
|
||||
enables `antispam.enabled` and `bongoantispam`; a verified ClamAV endpoint
|
||||
enables `bongoavirus`. Both use loopback endpoints. The suffixless documents
|
||||
below `/etc/bongo/config.d` and the operative Store are updated together, the
|
||||
manager is reloaded, and every scanner and Bongo change is rolled back if a
|
||||
later activation step fails.
|
||||
|
||||
The default scanner-health worker checks daily ClamAV signatures and the
|
||||
presence of compiled SpamAssassin rules every six hours. It reports missing
|
||||
data and stale ClamAV signatures in an administrator task. SpamAssassin rule
|
||||
age is not treated as an error because upstream channels may legitimately
|
||||
remain unchanged for months. For selected extra channels the Worker uses
|
||||
`sa-update --checkonly`; its fast DNS serial lookup reports a genuinely
|
||||
available update without modifying the rules. The Bongo systemd timer installs
|
||||
KAM/Heinlein updates hourly, while the distribution's normal update mechanism
|
||||
continues to own the official SpamAssassin channel and FreshClam.
|
||||
|
||||
For an installed server, use `bongo-admin config` to edit every Store, Web, and
|
||||
LDAP configuration document. A save updates the operative Store and the
|
||||
suffixless files below `/etc/bongo/config.d` together, serializes concurrent
|
||||
admin changes, and rolls back prior writes if a later write fails.
|
||||
`bongo-admin config check` validates files without changing the Store;
|
||||
`bongo-admin config sync` transactionally writes validated file changes and
|
||||
new template defaults to the Store, then asks the running manager to reload.
|
||||
Alias and virtual-domain fragments are kept separately in
|
||||
`/etc/bongo/aliases.d` and are synchronized by the same manager operation.
|
||||
|
||||
Configuration names such as `smtp`, `imap`, `antispam`, `antivirus`, `web`,
|
||||
and `authentication` have no `.json` suffix, although their contents are
|
||||
JSON. The source and installed template names follow the same convention.
|
||||
@@ -1,60 +0,0 @@
|
||||
# SMTP extensions
|
||||
|
||||
Bongo keeps the classic `HELO`/`MAIL`/`RCPT`/`DATA` path for old clients and
|
||||
advertises ESMTP extensions after `EHLO`. The server advertises `8BITMIME` and
|
||||
`SMTPUTF8` only when the corresponding configuration is enabled. `SMTPUTF8`
|
||||
is accepted as a `MAIL FROM` parameter only after `EHLO`; non-ASCII envelope
|
||||
addresses require it and are validated as UTF-8.
|
||||
|
||||
`BODY=8BITMIME` is recorded with the queued message and is sent to a remote
|
||||
peer only when that peer advertises `8BITMIME`. Bongo implements bounded
|
||||
`BDAT` chunks and advertises `CHUNKING`; chunk and complete-message limits are
|
||||
enforced before a message is committed. `BINARYMIME` remains unsupported, so
|
||||
`BODY=BINARYMIME` is rejected explicitly instead of silently treating binary
|
||||
data as a normal `DATA` message.
|
||||
|
||||
Outgoing SMTP uses the peer's advertised `SIZE`, `8BITMIME` and `SMTPUTF8`
|
||||
capabilities. Internationalized domains are converted to their DNS
|
||||
ASCII-compatible form for MX lookup while the original UTF-8 address remains
|
||||
in the SMTP envelope. External SMTP relays use libcurl and receive the same
|
||||
`SMTPUTF8`/`BODY=8BITMIME` envelope parameters.
|
||||
|
||||
Relevant standards are [RFC 6531](https://www.rfc-editor.org/rfc/rfc6531.html),
|
||||
[RFC 3030](https://www.rfc-editor.org/rfc/rfc3030.html) and
|
||||
[RFC 3461](https://www.rfc-editor.org/rfc/rfc3461.html).
|
||||
|
||||
## Trusted downstream proxy metadata
|
||||
|
||||
Bongo can preserve the original SMTP client's connection address when it
|
||||
delivers mail to a trusted downstream SMTP or LMTP service. All three options
|
||||
below are empty by default. Their entries match an exact transport hostname,
|
||||
an exact IPv4 address, or an IPv4 CIDR such as `172.16.11.0/24`:
|
||||
|
||||
```json
|
||||
"xclient_trusted_destinations": ["smtp-filter.example.test"],
|
||||
"xforward_trusted_destinations": ["172.16.11.20"],
|
||||
"proxy_header_trusted_destinations": ["172.16.11.0/24"]
|
||||
```
|
||||
|
||||
`xclient_trusted_destinations` and `xforward_trusted_destinations` permit the
|
||||
Postfix `XCLIENT` and `XFORWARD` protocol extensions. Bongo still sends either
|
||||
command only when the connected peer advertises the extension and its
|
||||
supported attributes. These options name destination servers, not networks
|
||||
from which SMTP clients are accepted.
|
||||
|
||||
`proxy_header_trusted_destinations` is the compatibility fallback for servers
|
||||
which cannot negotiate either extension. For a matching destination Bongo
|
||||
adds `X-Client-Addr` and `X-Forwarded-Addr` to that delivery only. The fallback
|
||||
headers are suppressed when the original address was already transferred by
|
||||
`XCLIENT` or `XFORWARD`. User-supplied copies of these headers are removed on
|
||||
SMTP input, so the downstream service receives only Bongo-generated values.
|
||||
|
||||
Do not configure Internet destinations or a catch-all network such as
|
||||
`0.0.0.0/0`. The metadata exposes the original client address and downstream
|
||||
software may treat it as trusted. This fallback applies to Bongo's direct
|
||||
SMTP/LMTP delivery path; authenticated external-account relay providers never
|
||||
receive these headers.
|
||||
|
||||
These outgoing metadata options are independent of incoming HAProxy PROXY
|
||||
protocol. See [proxy-protocol.md](proxy-protocol.md) when a TCP load balancer
|
||||
must preserve the client address before Bongo accepts the SMTP connection.
|
||||
@@ -1,71 +0,0 @@
|
||||
# Storage and backup
|
||||
|
||||
Bongo does not put every message in one global SQLite database. The Store
|
||||
uses a per-user layout so a large account does not lock or enlarge the
|
||||
metadata database of every other account.
|
||||
|
||||
## Store layout
|
||||
|
||||
Each account below `/var/lib/bongo/users` has its own `store.db` SQLite
|
||||
metadata database and Maildir-like collection directories containing the
|
||||
document payloads. Mail, calendar objects, and contacts use the Store's common
|
||||
object and collection model. The SQLite database tracks collections, UIDs,
|
||||
flags, properties, and indexes; message bodies remain separate files.
|
||||
|
||||
The system Store below `/var/lib/bongo/system` contains server configuration
|
||||
documents and other system-owned objects. The Queue spool below
|
||||
`/var/lib/bongo/spool` contains messages which have been accepted but not yet
|
||||
fully delivered.
|
||||
|
||||
Other SQLite databases serve separate purposes:
|
||||
|
||||
- `/var/lib/bongo/dbf/userdb.sqlite` stores local authentication records,
|
||||
Argon2id password hashes, encrypted TOTP secrets, recovery codes, app
|
||||
passwords, login aliases, and LDAP cache metadata.
|
||||
- `/var/lib/bongo/dbf/sieve.sqlite` stores ManageSieve scripts and vacation
|
||||
state.
|
||||
- `/var/lib/bongo/dbf/external-accounts.sqlite` stores external account
|
||||
schedules, identities, encrypted credentials, and import state.
|
||||
- `/var/lib/bongo/web/sessions.db`, `tasks.db`, and `identities.db` store the
|
||||
corresponding Web data.
|
||||
|
||||
SQLite write-ahead-log and sidecar files are part of a live database state;
|
||||
copying only the main `.db` file while Bongo is writing is not a reliable
|
||||
backup.
|
||||
|
||||
## Backup scope
|
||||
|
||||
A complete backup includes at least:
|
||||
|
||||
- `/etc/bongo`;
|
||||
- all of `/var/lib/bongo`, including Store payloads, metadata, Queue spool,
|
||||
account and Web databases;
|
||||
- TLS, DKIM, SRS, external-account encryption, TOTP encryption, and ACME hook
|
||||
keys wherever the configuration points to them;
|
||||
- distribution service overrides and reverse-proxy configuration needed to
|
||||
reproduce the deployment.
|
||||
|
||||
For a simple consistent filesystem backup, stop Bongo, confirm that its
|
||||
agents have exited, snapshot or copy the entire state and configuration tree,
|
||||
then restart it. A storage snapshot is acceptable only when the filesystem
|
||||
and SQLite state are captured atomically. Online backup tooling must use the
|
||||
SQLite backup API or checkpoint/locking rules and coordinate Store payload
|
||||
creation; a file-by-file copy is insufficient.
|
||||
|
||||
`bongo-storetool` can import and export mailbox data in mbox or Maildir form.
|
||||
That is useful for migration and recovery of mail content, but it is not a
|
||||
replacement for a complete server backup because it does not preserve every
|
||||
account, key, configuration, calendar, contact, task, and protocol state.
|
||||
|
||||
## Restore testing
|
||||
|
||||
Restore into an isolated host with the same or a newer compatible Bongo build.
|
||||
Check database integrity, ownership and permissions, then validate the
|
||||
configuration before starting the agents. Test login, message counts, flags,
|
||||
folder hierarchy, calendar/contact access, queued delivery, app passwords,
|
||||
and a signed outbound message.
|
||||
|
||||
Large-store and migration benchmarks are part of the 1.0 release work. The
|
||||
per-user metadata design avoids a single database bottleneck, but it does not
|
||||
remove the need to test filesystem inode usage, indexes, backup duration,
|
||||
search performance, and recovery with realistically large mailboxes.
|
||||
@@ -1,507 +0,0 @@
|
||||
# Bongo 0.7.0 R1 test evidence
|
||||
|
||||
R1 is the implementation and repair pass defined by the
|
||||
[release test matrix](../release-testing-0.7.md). This index contains
|
||||
non-secret, reproducible evidence. Disposable credentials, private keys,
|
||||
captured mail, and complete runtime configurations remain outside Git.
|
||||
|
||||
## Environment
|
||||
|
||||
- Date started: 2026-07-19
|
||||
- Source: `50a38f2325293278e3f5e56a4a831c11bf0bc150`
|
||||
- Host: `tiulk`, x86-64
|
||||
- Kernel: `7.1.3-xanmod1-dist`
|
||||
- CMake: 4.3.4
|
||||
- Ninja: 1.13.2
|
||||
|
||||
## BLD-01
|
||||
|
||||
Result: **PASS**
|
||||
|
||||
Clean GCC 15.3.0 debug configuration and all 360 build steps completed without
|
||||
a compiler warning or link failure.
|
||||
|
||||
```sh
|
||||
cmake -S . -B /tmp/bongo-0.7-r1-gcc -G Ninja \
|
||||
-DCMAKE_BUILD_TYPE=Debug -DBUILD_TESTING=ON
|
||||
cmake --build /tmp/bongo-0.7-r1-gcc --parallel 12
|
||||
```
|
||||
|
||||
- CMake cache SHA-256:
|
||||
`286ff1fcbc8b0fdc2949ee1624296bbb79bdc934ddec6eabcde39ae48e6e8a49`
|
||||
- Runtime configuration: not applicable to this compile-only test.
|
||||
|
||||
## BLD-04
|
||||
|
||||
Result: **PASS**
|
||||
|
||||
All 51 CTest tests passed against the Clang-built binaries.
|
||||
|
||||
```sh
|
||||
ctest --test-dir /tmp/bongo-0.7-r1-clang --output-on-failure --parallel 12
|
||||
```
|
||||
|
||||
- Result: 51 passed, 0 failed
|
||||
- Elapsed test time: 4.43 seconds
|
||||
- Source and CMake cache: identical to BLD-03
|
||||
- Runtime configuration: isolated fixtures supplied by the tests; no live
|
||||
Bongo configuration was used.
|
||||
|
||||
## BLD-02
|
||||
|
||||
Result: **PASS**
|
||||
|
||||
All 59 GCC CTest tests passed. The suite covered authentication, SQLite
|
||||
transactions, StreamIO search, TLS and PROXY protocol, mail authentication,
|
||||
Sieve, ACME, collector accounts and transport, IMAP, POP3, SMTP, worker jobs,
|
||||
configuration, and Web/DAV discovery.
|
||||
|
||||
```sh
|
||||
ctest --test-dir /tmp/bongo-0.7-r1-gcc --output-on-failure --parallel 12
|
||||
```
|
||||
|
||||
- Result: 59 passed, 0 failed
|
||||
- Elapsed test time: 2.66 seconds
|
||||
- Source: `ea1e1610a670b233f7e57157d597f0f888282d27` plus the R1 portability
|
||||
repairs recorded by BLD-09.
|
||||
- CMake cache SHA-256:
|
||||
`9292384a8e8b073e11c3abc01e5d698ccba449ef625246c0dd120c71ec60fab2`
|
||||
- Runtime configuration: isolated fixtures supplied by the tests; no live
|
||||
Bongo configuration was used.
|
||||
|
||||
## BLD-03
|
||||
|
||||
Result: **PASS**
|
||||
|
||||
Clean Clang 22.1.8 debug configuration with the same discovered dependencies
|
||||
and all 360 build steps completed without a compiler warning or link failure.
|
||||
|
||||
```sh
|
||||
CC=clang cmake -S . -B /tmp/bongo-0.7-r1-clang -G Ninja \
|
||||
-DCMAKE_BUILD_TYPE=Debug -DBUILD_TESTING=ON
|
||||
cmake --build /tmp/bongo-0.7-r1-clang --parallel 12
|
||||
```
|
||||
|
||||
- CMake cache SHA-256:
|
||||
`9f8ca3b62e88c57e9cfd13ed0d6e0072c71dc47cb4fa1a420e329e14bb050920`
|
||||
- Runtime configuration: not applicable to this compile-only test.
|
||||
|
||||
## BLD-05
|
||||
|
||||
Result: **PASS**
|
||||
|
||||
Commit `ed6fc871e344fc7c9a5cd5b6d8ec90486dfca13c` was built with GCC,
|
||||
AddressSanitizer, UndefinedBehaviorSanitizer, frame pointers, and the complete
|
||||
test feature set. The installed tree and disposable state/configuration roots
|
||||
were placed below `/tmp`; the normal `bongo.service` remained stopped. The
|
||||
protocol session ran as root inside a private user and network namespace, so
|
||||
the real Bongo ports could be exercised without touching host listeners.
|
||||
|
||||
```sh
|
||||
cmake -S . -B /tmp/bongo-0.7-r1-asan-live -G Ninja \
|
||||
-DCMAKE_BUILD_TYPE=Debug -DBUILD_TESTING=ON \
|
||||
-DCMAKE_C_FLAGS='-fsanitize=address,undefined -fno-omit-frame-pointer' \
|
||||
-DCMAKE_INSTALL_PREFIX=/tmp/bongo-0.7-r1-asan-root/usr \
|
||||
-DBONGO_CONFIG_DIR=/tmp/bongo-0.7-r1-asan-config \
|
||||
-DBONGO_STATE_DIR=/tmp/bongo-0.7-r1-asan-state -DBONGO_USER=root
|
||||
```
|
||||
|
||||
- CMake cache SHA-256:
|
||||
`7425b6570598d6bb107066fc6f38b2207731ff12088b965a58d7f3e3c5517296`
|
||||
- Configuration-set SHA-256:
|
||||
`3f4e84d45cd706cca9bf970419750d0f15bb80addacf884898c5527cb7c344a2`
|
||||
- CTest: 53 passed, 0 failed in 6.44 seconds.
|
||||
- Protocol session: SMTP submission with STARTTLS, SMTPS, IMAPS delivery and
|
||||
`SUBJECT` search, IMAP STARTTLS, POP3 STLS, and POP3S all passed.
|
||||
- The manager and every tested native agent log contained no ASan or UBSan
|
||||
diagnostic. Leak detection was deliberately disabled here because BLD-06
|
||||
is the separate LeakSanitizer gate.
|
||||
- The Web subprocess cannot drop supplementary groups inside the unprivileged
|
||||
user namespace, so it was excluded from this native-agent protocol session;
|
||||
its Python/Web/DAV paths were covered by the sanitizer-loaded CTest suite.
|
||||
|
||||
The repair loop found and fixed: empty-array `qsort`/`bsearch` undefined
|
||||
behaviour, width-incorrect and unaligned generic JSON integer writes, installed
|
||||
state paths hardcoded outside the configured prefix, incorrect Store-to-IMAP
|
||||
UID mapping for search hits, and a signed high-bit shift in IMAP `FETCH` flags.
|
||||
Regression tests were added for integer widths, empty arrays, relocated Web
|
||||
state, and Store search-hit parsing.
|
||||
|
||||
## BLD-06
|
||||
|
||||
Result: **PASS**
|
||||
|
||||
Commit `3e9b934ec471ec75f3872558d58f25c710064dab` was tested with
|
||||
LeakSanitizer enabled together with ASan and UBSan. Leak detection remained
|
||||
enabled during startup, SMTP delivery, IMAP and POP access, and the complete
|
||||
manager/agent shutdown. The host `bongo.service` stayed stopped; the protocol
|
||||
session ran in the same private user/network namespace described in BLD-05.
|
||||
|
||||
```sh
|
||||
ASAN_OPTIONS=halt_on_error=1:abort_on_error=1:detect_leaks=1:\
|
||||
fast_unwind_on_malloc=0:malloc_context_size=50 \
|
||||
UBSAN_OPTIONS=halt_on_error=1:print_stacktrace=1 \
|
||||
LSAN_OPTIONS=exitcode=23:report_objects=1 \
|
||||
ctest --test-dir /tmp/bongo-0.7-r1-asan-live \
|
||||
--output-on-failure -E '^python-'
|
||||
|
||||
LD_PRELOAD=/usr/lib/gcc/x86_64-pc-linux-gnu/15/libasan.so \
|
||||
ASAN_OPTIONS=halt_on_error=1:abort_on_error=1:detect_leaks=1:\
|
||||
fast_unwind_on_malloc=0:malloc_context_size=50 \
|
||||
LSAN_OPTIONS=exitcode=23:report_objects=1 \
|
||||
ctest --test-dir /tmp/bongo-0.7-r1-asan-live \
|
||||
--output-on-failure -R '^python-'
|
||||
|
||||
unshare --user --map-root-user --net \
|
||||
/tmp/bongo-0.7-r1-asan-session.sh
|
||||
```
|
||||
|
||||
- Native CTest: 55 passed, 0 failed. This includes the full Mailutils Sieve
|
||||
syntax/error path and the queue-registration cancellation regression test.
|
||||
- Python C-extension CTest: 2 passed, 0 failed with the ASan runtime loaded
|
||||
before CPython.
|
||||
- Protocol session: SMTP submission with STARTTLS, SMTPS, IMAPS delivery and
|
||||
search, IMAP STARTTLS, POP3 STLS, and POP3S passed.
|
||||
- Manager and agents stopped normally; no process reached the manager's
|
||||
forced-kill deadline.
|
||||
- No LeakSanitizer, AddressSanitizer, UBSan, or runtime-error diagnostic was
|
||||
present in the test output or manager/agent log.
|
||||
- CMake cache SHA-256:
|
||||
`9696f8805c0f7c50c50ee4e2828600bd8f110b266e49cb72f2a188584f424e4f`
|
||||
- Configuration-set SHA-256:
|
||||
`d6de90aed16ac5c1407fc6dce9a4ee08740c6971d174436eb563df832ec82eed`
|
||||
|
||||
The repair pass fixed real ownership and lifecycle defects rather than adding
|
||||
sanitizer suppressions: Mailutils Sieve parser/checker lists, Bongo Sieve and
|
||||
GMime objects, Store parser child termination, configuration/JSON/stream
|
||||
allocations, libcurl global cleanup, detached thread-pool lifetime, monitor
|
||||
shutdown, the IMAP busy-thread count, and cancellation of Queue registration
|
||||
while the Queue server is going away. The Mailutils 3.21 fix is carried by the
|
||||
Bongo overlay as commit `61670a4` and was installed for this run.
|
||||
|
||||
## BLD-07
|
||||
|
||||
Result: **PASS**
|
||||
|
||||
Commit `3e9b934ec471ec75f3872558d58f25c710064dab` was built with Clang 22.1.8
|
||||
and ThreadSanitizer. The
|
||||
installed tree used the same private configuration/state roots and isolated
|
||||
user/network namespace as the ASan/LSan protocol session.
|
||||
|
||||
```sh
|
||||
CC=clang cmake -S . -B /tmp/bongo-0.7-r1-tsan-live -G Ninja \
|
||||
-DCMAKE_BUILD_TYPE=Debug -DBUILD_TESTING=ON \
|
||||
-DCMAKE_C_FLAGS='-fsanitize=thread -fno-omit-frame-pointer' \
|
||||
-DCMAKE_EXE_LINKER_FLAGS='-fsanitize=thread' \
|
||||
-DCMAKE_SHARED_LINKER_FLAGS='-fsanitize=thread' \
|
||||
-DCMAKE_INSTALL_PREFIX=/tmp/bongo-0.7-r1-tsan-root/usr \
|
||||
-DBONGO_CONFIG_DIR=/tmp/bongo-0.7-r1-asan-config \
|
||||
-DBONGO_STATE_DIR=/tmp/bongo-0.7-r1-asan-state -DBONGO_USER=root
|
||||
|
||||
TSAN_OPTIONS=halt_on_error=1 \
|
||||
ctest --test-dir /tmp/bongo-0.7-r1-tsan-live \
|
||||
--output-on-failure -E '^python-'
|
||||
|
||||
LD_PRELOAD=/usr/lib/clang/22/lib/linux/libclang_rt.tsan-x86_64.so \
|
||||
TSAN_OPTIONS=halt_on_error=1 \
|
||||
ctest --test-dir /tmp/bongo-0.7-r1-tsan-live \
|
||||
--output-on-failure -R '^python-'
|
||||
|
||||
unshare --user --map-root-user --net \
|
||||
/tmp/bongo-0.7-r1-tsan-session.sh
|
||||
```
|
||||
|
||||
- Native CTest: 55 passed, 0 failed, including the concurrent atomic and
|
||||
Store logical-lock regression tests.
|
||||
- Python C-extension CTest: 2 passed, 0 failed with the Clang TSan runtime
|
||||
loaded before the uninstrumented CPython executable.
|
||||
- Protocol session: SMTP submission with STARTTLS, SMTPS, IMAPS delivery and
|
||||
search, IMAP STARTTLS, POP3 STLS, and POP3S passed.
|
||||
- Every listener and worker stopped normally. No ThreadSanitizer diagnostic
|
||||
remained in test output or manager/agent logs.
|
||||
- CMake cache SHA-256:
|
||||
`d20e5508f082782b8867520f3123171de74e76ac2c0004e1f16fa274c1a9f468`
|
||||
- Configuration-set SHA-256:
|
||||
`d6de90aed16ac5c1407fc6dce9a4ee08740c6971d174436eb563df832ec82eed`
|
||||
|
||||
The repair loop found and fixed real concurrency defects: an AB/BA Store lock
|
||||
order, non-atomic shared agent and listener state, Queue worker teardown while
|
||||
shared tables were still in use, listener socket ownership during shutdown,
|
||||
SMTP client-pool lifetime accounting, the legacy thread-group macro writing to
|
||||
shared caller state, and POP3 freeing a shared GnuTLS context while a worker
|
||||
was still negotiating. The portable atomic implementation is selected through
|
||||
GCC/Clang builtins and CMake links `libatomic` automatically on targets that
|
||||
require it, including older 32-bit architectures.
|
||||
|
||||
After those repairs, the complete ASan/UBSan/LeakSanitizer CTest and live
|
||||
protocol session were repeated successfully. This confirms that the
|
||||
concurrency fixes did not regress the Mailutils Sieve leak repair or introduce
|
||||
new ownership errors.
|
||||
|
||||
## BLD-08
|
||||
|
||||
Result: **PASS**
|
||||
|
||||
Commit `f7baf37515d7f963042abd61e00f8a571bb694be` was configured and built
|
||||
natively inside an isolated Debian Trixie i386 root with GCC 14.2.0 and GMime
|
||||
3.2.15. This was a genuine
|
||||
i386 userland rather than an x86-64 build using only `-m32`. The build used the
|
||||
patched Mailutils 3.21 libraries and archived Debian libsrs2 1.0.18-4 i386
|
||||
packages. Those historical binaries are test fixtures only; the Trixie release
|
||||
workflow must rebuild libsrs2 from source as specified by BLD-15.
|
||||
|
||||
```sh
|
||||
cmake -S /src -B /build -G Ninja \
|
||||
-DCMAKE_BUILD_TYPE=Debug -DBUILD_TESTING=ON
|
||||
cmake --build /build --parallel 12
|
||||
ctest --test-dir /build --output-on-failure --parallel 2
|
||||
```
|
||||
|
||||
- CTest: 57 passed, 0 failed.
|
||||
- CMake cache SHA-256:
|
||||
`aed777cda210cc229fac4693e719f4e8c08a685c05c0da99cfdc295062a65a88`
|
||||
- `bongoimap`, `bongopop3`, `bongosmtp`, `bongostore`, the Python extension,
|
||||
patched `libmu_sieve`, and archived `libsrs2` were verified as Intel i386
|
||||
ELF32 objects.
|
||||
- The same source then rebuilt without warnings on the x86-64 host against
|
||||
GMime 2.6 with GCC and Clang; both complete CTest runs passed 57/57. This
|
||||
verifies that the GMime 3 compatibility work did not drop GMime 2 support.
|
||||
- Valgrind on the i386 Sieve test reported zero errors and no definite,
|
||||
indirect, or possible leaks. The repair fixed a real double-free after
|
||||
`mu_message_set_stream()` transferred stream ownership; it did not add a
|
||||
suppression.
|
||||
|
||||
The repair pass also corrected IMAP header-size conversions so a 64-bit
|
||||
message size is never silently narrowed to the `int` count accepted by the
|
||||
connection API, and made the HTML sanitizer compatible with Trixie's nh3
|
||||
0.2.18 while retaining conservative inline-style filtering.
|
||||
|
||||
## BLD-09
|
||||
|
||||
Result: **PASS**
|
||||
|
||||
The complete source was cross-compiled with Clang 22.1.8 for the ARMv5TE
|
||||
soft-float ABI against an isolated Debian Trixie armel sysroot. This is a
|
||||
genuine ARM EABI5 build, not a host build with architecture macros overridden.
|
||||
The sysroot used freshly cross-built copies of the overlay's patched libspf2
|
||||
and libsrs2 sources. Their `LIBSPF2_RFC7208` and
|
||||
`SRS2_HAS_SECURE_FREE_SECRETS` feature probes both passed during configuration.
|
||||
|
||||
```sh
|
||||
cmake -S /home/dbp/bongo-server -B /tmp/bongo-armv5-cross-r1 -G Ninja \
|
||||
-DCMAKE_TOOLCHAIN_FILE=/tmp/armv5-bongo-toolchain.cmake \
|
||||
-DCMAKE_BUILD_TYPE=Debug -DBUILD_TESTING=ON
|
||||
cmake --build /tmp/bongo-armv5-cross-r1 --parallel 12
|
||||
QEMU_LD_PREFIX=/tmp/bongo-armv5-root2 \
|
||||
ctest --test-dir /tmp/bongo-armv5-cross-r1 \
|
||||
--output-on-failure --parallel 4
|
||||
```
|
||||
|
||||
- Build: all 380 steps completed without a compiler warning or link failure.
|
||||
- CTest through QEMU user emulation: 58 passed, 0 failed in 32.41 seconds.
|
||||
- CMake cache SHA-256:
|
||||
`8660c5d56d91f58e26aca3d103861adfb42f0a1573fe0d124c26d1998a560969`
|
||||
- `readelf -A` reports `Tag_CPU_arch: v5TE`, ARM ISA, Thumb-1, and the
|
||||
EABI 8-byte alignment rules for the tested server binaries.
|
||||
- Source: `ea1e1610a670b233f7e57157d597f0f888282d27` plus the documented R1
|
||||
ARM portability repairs.
|
||||
- Runtime configuration: isolated fixtures supplied by the tests; no live
|
||||
Bongo configuration was used.
|
||||
|
||||
This pass found and fixed cross-build leakage from LibIcal's host-side CMake
|
||||
package, unsafe packed DNS-result members on strict-alignment ARM, truncated
|
||||
IMAP body offsets on ILP32, and format-width errors in IMAP and Queue. It also
|
||||
enables the 64-bit `time_t` and `off_t` ABI on 32-bit Linux, matching modern
|
||||
Trixie armel dependencies and keeping dates beyond 2038 and large mail stores
|
||||
correct.
|
||||
|
||||
## BLD-10
|
||||
|
||||
Result: **PASS**
|
||||
|
||||
ARMv6 soft-float was replaced by ARMv7 hard-float in the release matrix because
|
||||
it exercises a materially different ABI rather than making only a marginal
|
||||
code-generation change from the already tested ARMv5 soft-float baseline. The
|
||||
complete source was cross-compiled with GCC 15.3.0 for ARMv7-A, VFPv3-D16 and
|
||||
the hard-float procedure-call standard against an isolated Debian Trixie
|
||||
`armhf` sysroot.
|
||||
|
||||
The Trixie sysroot was resolved and extracted without installing target
|
||||
packages on the host. Since Trixie no longer supplies libsrs2, the overlay's
|
||||
patched libsrs2 source and patched libspf2 source were both cross-built for the
|
||||
same ARM hard-float ABI. Their security feature probes passed during the Bongo
|
||||
configuration.
|
||||
|
||||
```sh
|
||||
cmake -S /home/dbp/bongo-server -B /tmp/bongo-armv7hf-cross-r1 -G Ninja \
|
||||
-DCMAKE_TOOLCHAIN_FILE=/tmp/armv7-bongo-toolchain.cmake \
|
||||
-DCMAKE_BUILD_TYPE=Debug -DBUILD_TESTING=ON
|
||||
cmake --build /tmp/bongo-armv7hf-cross-r1 --parallel 12
|
||||
QEMU_LD_PREFIX=/tmp/bongo-armv7-root \
|
||||
LD_LIBRARY_PATH=/tmp/libspf2-armv7-stage:/tmp/libsrs2-armv7-stage \
|
||||
ctest --test-dir /tmp/bongo-armv7hf-cross-r1 \
|
||||
--output-on-failure --parallel 4
|
||||
```
|
||||
|
||||
- Build: all 380 steps completed without a compiler warning or link failure.
|
||||
- CTest through QEMU user emulation: 58 passed, 0 failed in 35.80 seconds.
|
||||
- CMake cache SHA-256:
|
||||
`8b12f27d448d8de3c7f1b4592b347ea1d8ed7d3f38b705551d8dd345b80b0c16`
|
||||
- `bongoimap`, `bongosmtp`, and `bongostore` are ELF32 ARM EABI5 PIEs using
|
||||
`/lib/ld-linux-armhf.so.3`.
|
||||
- `readelf -A` reports ARMv7-A, Thumb-2, VFPv3-D16, and
|
||||
`Tag_ABI_VFP_args: VFP registers` for Bongo, patched libspf2, and patched
|
||||
libsrs2.
|
||||
- Source: `ea1e1610a670b233f7e57157d597f0f888282d27` plus the documented R1
|
||||
portability repairs.
|
||||
- Runtime configuration: isolated fixtures supplied by the tests; no live
|
||||
Bongo configuration was used.
|
||||
|
||||
## BLD-11
|
||||
|
||||
Result: **PASS**
|
||||
|
||||
The complete source was cross-compiled with GCC 15.3.0 for AArch64 against an
|
||||
isolated Debian Trixie `arm64` sysroot. Trixie does not provide libsrs2, so the
|
||||
overlay's patched libsrs2 and libspf2 sources were both cross-built for the
|
||||
same AArch64 ABI. Their security feature probes passed during Bongo
|
||||
configuration.
|
||||
|
||||
```sh
|
||||
cmake -S /home/dbp/bongo-server -B /tmp/bongo-aarch64-cross-r1 -G Ninja \
|
||||
-DCMAKE_TOOLCHAIN_FILE=/tmp/aarch64-bongo-toolchain.cmake \
|
||||
-DCMAKE_BUILD_TYPE=Debug -DBUILD_TESTING=ON
|
||||
cmake --build /tmp/bongo-aarch64-cross-r1 --parallel 12
|
||||
QEMU_LD_PREFIX=/tmp/bongo-aarch64-root \
|
||||
LD_LIBRARY_PATH=/tmp/libspf2-aarch64-stage:/tmp/libsrs2-aarch64-stage \
|
||||
ctest --test-dir /tmp/bongo-aarch64-cross-r1 \
|
||||
--output-on-failure --parallel 4
|
||||
```
|
||||
|
||||
- Build: all 380 steps completed without a compiler warning or link failure.
|
||||
- CTest through QEMU user emulation: 58 passed, 0 failed in 20.76 seconds.
|
||||
- CMake cache SHA-256:
|
||||
`97a2c242b187c4d2f3a1f9b7d67addd8e248cd37e27ef12b7857e85a03ab9ab2`
|
||||
- `bongoimap`, `bongosmtp`, and `bongostore` are ELF64 AArch64 PIEs using
|
||||
`/lib/ld-linux-aarch64.so.1`; patched libspf2 and libsrs2 are ELF64 AArch64
|
||||
shared libraries.
|
||||
- Source: `ea1e1610a670b233f7e57157d597f0f888282d27` plus the documented R1
|
||||
portability repairs.
|
||||
- Runtime configuration: isolated fixtures supplied by the tests; no live
|
||||
Bongo configuration was used.
|
||||
|
||||
## BLD-12
|
||||
|
||||
Result: **PASS**
|
||||
|
||||
CPack generated the native TGZ binary package, which was extracted into a
|
||||
new empty staging root. Its `/usr/local` tree and a disposable
|
||||
`/var/lib/bongo` were then mounted only inside a private user/mount namespace
|
||||
so the installed Python extensions could be loaded at their configured paths
|
||||
without modifying the host installation.
|
||||
|
||||
```sh
|
||||
cpack -G TGZ --config /tmp/bongo-0.7-r1-gcc/CPackConfig.cmake \
|
||||
-B /tmp/bongo-cpack-r1-fixed
|
||||
mkdir -p /tmp/bongo-cpack-r1-root3
|
||||
tar -xzf /tmp/bongo-cpack-r1-fixed/bongo-0.7.0-Linux.tar.gz \
|
||||
-C /tmp/bongo-cpack-r1-root3
|
||||
unshare --user --map-root-user --mount \
|
||||
/bin/sh /tmp/bongo-cpack-stage-smoke.sh
|
||||
```
|
||||
|
||||
- Package: `bongo-0.7.0-Linux.tar.gz`, 1,035 regular files.
|
||||
- Package SHA-256:
|
||||
`af00479ac617f98c95be4739e3d74c8cc8ef381b5733e5bda363b1bccf8a33c9`
|
||||
- CMake cache SHA-256:
|
||||
`9292384a8e8b073e11c3abc01e5d698ccba449ef625246c0dd120c71ec60fab2`
|
||||
- All 1,115 archive members use relative, non-traversing paths.
|
||||
- All 24 symbolic links resolve inside the staged installation.
|
||||
- All 37 ELF objects have a complete dependency tree when the staged Bongo
|
||||
library directory is used; none resolves a Bongo library from the host.
|
||||
- The staged `bongo`, `bongo.configuration`, `bongo_web`, `libbongo`, calendar,
|
||||
external-account, QR-code, and authentication-security Python modules load
|
||||
successfully without writing bytecode into the package tree.
|
||||
- Source: commit `9b3c958c` plus the XPL initialization repair described below.
|
||||
- Runtime configuration: disposable state only; no live Bongo configuration
|
||||
or service was used.
|
||||
|
||||
The first staging run found that importing `_calendar` and
|
||||
`_external_accounts` in one process called `XplInit()` twice. libgcrypt rejects
|
||||
changing its seed-file configuration after initialization and aborted. XPL
|
||||
initialization is now guarded by `pthread_once`, detects libgcrypt initialized
|
||||
by another library, and has a dedicated repeat-initialization regression test.
|
||||
The complete host suite passed 59/59 after the repair.
|
||||
|
||||
## BLD-13
|
||||
|
||||
Result: **PASS**
|
||||
|
||||
CPack generated a source-only TXZ named `bongo-0.7.0.tar.xz`; neither the
|
||||
archive nor its single top-level directory contains `-Linux` or `-linux`.
|
||||
The archive was extracted into a new directory and configured and compiled
|
||||
from that extracted copy to prove that the filtering did not remove a required
|
||||
source.
|
||||
|
||||
```sh
|
||||
cpack -G TXZ \
|
||||
--config /tmp/bongo-0.7-r1-gcc/CPackSourceConfig.cmake \
|
||||
-B /tmp/bongo-source-r1
|
||||
tar -xJf /tmp/bongo-source-r1/bongo-0.7.0.tar.xz \
|
||||
-C /tmp/bongo-source-r1-root
|
||||
cmake -S /tmp/bongo-source-r1-root/bongo-0.7.0 \
|
||||
-B /tmp/bongo-source-r1-build -G Ninja \
|
||||
-DCMAKE_BUILD_TYPE=Debug -DBUILD_TESTING=OFF
|
||||
cmake --build /tmp/bongo-source-r1-build --parallel 12
|
||||
```
|
||||
|
||||
- Source archive SHA-256:
|
||||
`c11c4baaacdc0205d02a846277883c3223795c3b4d521f9fe1f7c4d212acd635`
|
||||
- Extracted-build CMake cache SHA-256:
|
||||
`61bf4b5f556b5c7c9c51f67eeac7754d0a29cd902f3a8aa639146d3092819072`
|
||||
- Archive contents: 1,880 members, 1,752 regular files, one top-level
|
||||
directory, and no symbolic links.
|
||||
- No absolute or parent-traversing archive paths were present.
|
||||
- No Git/SVN/Hg, Codex/agent, CMake build/cache, Python cache, private-key,
|
||||
credential-token, database, core, or log artifacts matched the release
|
||||
checks.
|
||||
- The extracted source completed all 244 non-test build steps without a
|
||||
compiler warning or link failure.
|
||||
- Source: commit `9b3c958c` plus the XPL initialization repair recorded by
|
||||
BLD-12.
|
||||
- Runtime configuration: not applicable to this source-package test.
|
||||
|
||||
## BLD-14
|
||||
|
||||
Result: **PASS**
|
||||
|
||||
The Gentoo live ebuild was rebuilt from commit
|
||||
`806bdf789d79f41031f14aeb1a40264ac7fa07ee`, ran its test phase, and merged
|
||||
successfully on the native amd64 test host. The active package configuration
|
||||
was `debug fail2ban test` with Python 3.14.
|
||||
|
||||
```sh
|
||||
emerge --oneshot '=mail-mta/bongo-9999::bongo'
|
||||
pkgcheck scan --cache-dir /tmp/pkgcheck-bongo \
|
||||
--exit error '=mail-mta/bongo-9999'
|
||||
qcheck -v mail-mta/bongo
|
||||
```
|
||||
|
||||
- The test-enabled build, install, and merge completed without a Portage QA
|
||||
notice or internal package collision.
|
||||
- `pkgcheck` completed with status zero for the live ebuild.
|
||||
- `qcheck` verified all 1,445 installed package entries.
|
||||
- The installed image contains 303 compiled Python bytecode files as well as
|
||||
the systemd units, tmpfiles configuration, man pages, translations, Web
|
||||
assets, Fail2ban files, zone information, and examples.
|
||||
- No package entry is installed below `/usr/var`, `/usr/etc`, or `/var/run`.
|
||||
- The `sendmail`, `mailq`, `newaliases`, and `/usr/lib/sendmail` compatibility
|
||||
links are all owned by `mail-mta/bongo-9999` and resolve to
|
||||
`bongo-sendmail`.
|
||||
- `scanelf` found no unresolved dependency among the installed Bongo server
|
||||
executables and versioned shared libraries.
|
||||
- `bongo.service` remained inactive throughout package QA, as required for
|
||||
this non-lifecycle test.
|
||||
|
||||
Runtime configuration: the installed development configuration was not
|
||||
started or modified by this package test.
|
||||
-49
@@ -1,49 +0,0 @@
|
||||
# TLS policy
|
||||
|
||||
Bongo offers TLS 1.3 and TLS 1.2 by default. Older protocol versions are only
|
||||
available on listeners whose explicit legacy-TLS option is enabled. Keep those
|
||||
listeners restricted to trusted legacy networks; do not expose them directly
|
||||
to the Internet.
|
||||
|
||||
The SMTP delivery agent uses opportunistic STARTTLS. When a peer offers
|
||||
STARTTLS, `outbound_tls_verify` verifies its certificate chain against the
|
||||
system trust store and verifies the connected MX or configured LMTP host name.
|
||||
It defaults to `true`. Set it to `false` only for a peer whose certificate
|
||||
cannot yet be repaired.
|
||||
|
||||
`outbound_tls_required` defaults to `false`, so delivery remains possible to
|
||||
SMTP servers which do not offer STARTTLS. Enabling it defers mail instead of
|
||||
sending plaintext. It is a global policy and should only be enabled when every
|
||||
configured destination is known to support TLS. A later policy layer may apply
|
||||
per-domain DANE or MTA-STS requirements.
|
||||
|
||||
External-account collection and submission use libcurl and independently
|
||||
verify certificates and host names by default. See `external-accounts.md` for
|
||||
the credential and provider policy.
|
||||
|
||||
Initial setup stores the default certificate and key as
|
||||
`/etc/bongo/ssl.d/server.crt` and `/etc/bongo/ssl.d/server.key`. The key is
|
||||
root-owned, group-readable by Bongo, and never world-readable. Setup creates a
|
||||
3072-bit RSA self-signed certificate only when no pair exists. A complete
|
||||
existing pair is parsed and checked for a matching key before reuse; unsafe,
|
||||
invalid, or incomplete material fails closed.
|
||||
|
||||
The `bongoworker` ACME job implements RFC 8555 directly. It honors CA
|
||||
`Retry-After` limits and renewal information, writes candidate material first,
|
||||
validates the complete certificate/key pair, then deploys it atomically and
|
||||
signals the manager to reload TLS listeners. HTTP-01 is the default. DNS-01
|
||||
publishes `base64url(SHA-256(keyAuthorization))`, waits for the exact TXT value
|
||||
through ldns, and removes only the value created for that authorization.
|
||||
|
||||
For DNS-01, `/etc/bongo/acme.d/providers` selects the longest matching zone.
|
||||
Use `type: "nsupdate"` for the native RFC 2136 adapter; `rfc2136` is an alias.
|
||||
No external `nsupdate` process is used. The adapter supports SOA-primary
|
||||
discovery, explicit IPv4/IPv6 or host-name servers, non-default ports, and
|
||||
TSIG HMAC algorithms. Delegated CNAME challenges use `match_zone`,
|
||||
`challenge_alias`, and the provider's target `zone`. Installed examples are
|
||||
in `/usr/share/bongo/examples/acme`.
|
||||
|
||||
`bongo-admin migrate` moves the historical `osslcert.pem` and `osslpriv.pem`
|
||||
pair from the state database directory into `ssl.d` only when both files are
|
||||
present and the destination is empty. ACME deployments should atomically
|
||||
install a complete pair and reload or restart the affected Bongo agents.
|
||||
+46
-56
@@ -1,4 +1,4 @@
|
||||
# Doxyfile 1.5.2
|
||||
# Doxyfile 1.4.7
|
||||
|
||||
# This file describes the settings to be used by the documentation system
|
||||
# doxygen (www.doxygen.org) for a project
|
||||
@@ -14,14 +14,6 @@
|
||||
# Project related configuration options
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
# This tag specifies the encoding used for all characters in the config file that
|
||||
# follow. The default is UTF-8 which is also the encoding used for all text before
|
||||
# the first occurrence of this tag. Doxygen uses libiconv (or the iconv built into
|
||||
# libc) for the transcoding. See http://www.gnu.org/software/libiconv for the list of
|
||||
# possible encodings.
|
||||
|
||||
DOXYFILE_ENCODING = UTF-8
|
||||
|
||||
# The PROJECT_NAME tag is a single word (or a sequence of words surrounded
|
||||
# by quotes) that should identify the project.
|
||||
|
||||
@@ -38,7 +30,7 @@ PROJECT_NUMBER = 0.1.0
|
||||
# If a relative path is entered, it will be relative to the location
|
||||
# where doxygen was started. If left blank the current directory will be used.
|
||||
|
||||
OUTPUT_DIRECTORY = ./doxygen/
|
||||
OUTPUT_DIRECTORY = ./doxygen/
|
||||
|
||||
# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create
|
||||
# 4096 sub-directories (in 2 levels) under the output directory of each output
|
||||
@@ -53,14 +45,24 @@ CREATE_SUBDIRS = NO
|
||||
# documentation generated by doxygen is written. Doxygen will use this
|
||||
# information to generate all constant output in the proper language.
|
||||
# The default language is English, other supported languages are:
|
||||
# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional,
|
||||
# Croatian, Czech, Danish, Dutch, Finnish, French, German, Greek, Hungarian,
|
||||
# Italian, Japanese, Japanese-en (Japanese with English messages), Korean,
|
||||
# Korean-en, Lithuanian, Norwegian, Polish, Portuguese, Romanian, Russian,
|
||||
# Serbian, Slovak, Slovene, Spanish, Swedish, and Ukrainian.
|
||||
# Brazilian, Catalan, Chinese, Chinese-Traditional, Croatian, Czech, Danish,
|
||||
# Dutch, Finnish, French, German, Greek, Hungarian, Italian, Japanese,
|
||||
# Japanese-en (Japanese with English messages), Korean, Korean-en, Norwegian,
|
||||
# Polish, Portuguese, Romanian, Russian, Serbian, Slovak, Slovene, Spanish,
|
||||
# Swedish, and Ukrainian.
|
||||
|
||||
OUTPUT_LANGUAGE = English
|
||||
|
||||
# This tag can be used to specify the encoding used in the generated output.
|
||||
# The encoding is not always determined by the language that is chosen,
|
||||
# but also whether or not the output is meant for Windows or non-Windows users.
|
||||
# In case there is a difference, setting the USE_WINDOWS_ENCODING tag to YES
|
||||
# forces the Windows encoding (this is the default for the Windows binary),
|
||||
# whereas setting the tag to NO uses a Unix-style encoding (the default for
|
||||
# all platforms other than Windows).
|
||||
|
||||
USE_WINDOWS_ENCODING = NO
|
||||
|
||||
# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will
|
||||
# include brief member descriptions after the members that are listed in
|
||||
# the file and class documentation (similar to JavaDoc).
|
||||
@@ -202,11 +204,6 @@ OPTIMIZE_OUTPUT_JAVA = NO
|
||||
|
||||
BUILTIN_STL_SUPPORT = NO
|
||||
|
||||
# If you use Microsoft's C++/CLI language, you should set this option to YES to
|
||||
# enable parsing support.
|
||||
|
||||
CPP_CLI_SUPPORT = NO
|
||||
|
||||
# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC
|
||||
# tag is set to YES, then doxygen will reuse the documentation of the first
|
||||
# member in the group (if any) for the other members of the group. By default
|
||||
@@ -462,15 +459,7 @@ WARN_LOGFILE =
|
||||
# directories like "/usr/src/myproject". Separate the files or directories
|
||||
# with spaces.
|
||||
|
||||
INPUT = ./src/ \
|
||||
./include/
|
||||
|
||||
# This tag can be used to specify the character encoding of the source files that
|
||||
# doxygen parses. Internally doxygen uses the UTF-8 encoding, which is also the default
|
||||
# input encoding. Doxygen uses libiconv (or the iconv built into libc) for the transcoding.
|
||||
# See http://www.gnu.org/software/libiconv for the list of possible encodings.
|
||||
|
||||
INPUT_ENCODING = UTF-8
|
||||
INPUT = ./src/ ./include/
|
||||
|
||||
# If the value of the INPUT tag contains directories, you can use the
|
||||
# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
|
||||
@@ -479,11 +468,7 @@ INPUT_ENCODING = UTF-8
|
||||
# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx
|
||||
# *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.py
|
||||
|
||||
FILE_PATTERNS = *.c \
|
||||
*.cpp \
|
||||
*.h \
|
||||
*.js \
|
||||
*.py
|
||||
FILE_PATTERNS = *.c *.cpp *.h *.js *.py
|
||||
|
||||
# The RECURSIVE tag can be used to turn specify whether or not subdirectories
|
||||
# should be searched for input files as well. Possible values are YES and NO.
|
||||
@@ -511,13 +496,6 @@ EXCLUDE_SYMLINKS = NO
|
||||
|
||||
EXCLUDE_PATTERNS = *test*
|
||||
|
||||
# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names
|
||||
# (namespaces, classes, functions, etc.) that should be excluded from the output.
|
||||
# The symbol name can be a fully qualified name, a word, or if the wildcard * is used,
|
||||
# a substring. Examples: ANamespace, AClass, AClass::ANamespace, ANamespace::*Test
|
||||
|
||||
EXCLUDE_SYMBOLS =
|
||||
|
||||
# The EXAMPLE_PATH tag can be used to specify one or more files or
|
||||
# directories that contain example code fragments that are included (see
|
||||
# the \include command).
|
||||
@@ -681,7 +659,7 @@ HTML_HEADER =
|
||||
HTML_FOOTER =
|
||||
|
||||
# The HTML_STYLESHEET tag can be used to specify a user-defined cascading
|
||||
# style sheet that is used by each HTML page. It can be used to
|
||||
# style sheet that is used by each HTML page. *It can be used to
|
||||
# fine-tune the look of the HTML output. If the tag is left blank doxygen
|
||||
# will generate a default style sheet. Note that doxygen will try to copy
|
||||
# the style sheet file to the HTML output directory, so don't put your own
|
||||
@@ -1107,14 +1085,6 @@ PERL_PATH = /usr/bin/perl
|
||||
|
||||
CLASS_DIAGRAMS = YES
|
||||
|
||||
# You can define message sequence charts within doxygen comments using the \msc
|
||||
# command. Doxygen will then run the mscgen tool (see http://www.mcternan.me.uk/mscgen/) to
|
||||
# produce the chart and insert it in the documentation. The MSCGEN_PATH tag allows you to
|
||||
# specify the directory where the mscgen tool resides. If left empty the tool is assumed to
|
||||
# be found in the default search path.
|
||||
|
||||
MSCGEN_PATH =
|
||||
|
||||
# If set to YES, the inheritance and collaboration graphs will hide
|
||||
# inheritance and usage relations if the target is undocumented
|
||||
# or is not a class.
|
||||
@@ -1217,13 +1187,33 @@ DOT_PATH =
|
||||
|
||||
DOTFILE_DIRS =
|
||||
|
||||
# The MAX_DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of
|
||||
# nodes that will be shown in the graph. If the number of nodes in a graph
|
||||
# becomes larger than this value, doxygen will truncate the graph, which is
|
||||
# visualized by representing a node as a red box. Note that doxygen will always
|
||||
# show the root nodes and its direct children regardless of this setting.
|
||||
# The MAX_DOT_GRAPH_WIDTH tag can be used to set the maximum allowed width
|
||||
# (in pixels) of the graphs generated by dot. If a graph becomes larger than
|
||||
# this value, doxygen will try to truncate the graph, so that it fits within
|
||||
# the specified constraint. Beware that most browsers cannot cope with very
|
||||
# large images.
|
||||
|
||||
DOT_GRAPH_MAX_NODES = 50
|
||||
MAX_DOT_GRAPH_WIDTH = 1024
|
||||
|
||||
# The MAX_DOT_GRAPH_HEIGHT tag can be used to set the maximum allows height
|
||||
# (in pixels) of the graphs generated by dot. If a graph becomes larger than
|
||||
# this value, doxygen will try to truncate the graph, so that it fits within
|
||||
# the specified constraint. Beware that most browsers cannot cope with very
|
||||
# large images.
|
||||
|
||||
MAX_DOT_GRAPH_HEIGHT = 1024
|
||||
|
||||
# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the
|
||||
# graphs generated by dot. A depth value of 3 means that only nodes reachable
|
||||
# from the root by following a path via at most 3 edges will be shown. Nodes
|
||||
# that lay further from the root node will be omitted. Note that setting this
|
||||
# option to 1 or 2 may greatly reduce the computation time needed for large
|
||||
# code bases. Also note that a graph may be further truncated if the graph's
|
||||
# image dimensions are not sufficient to fit the graph (see MAX_DOT_GRAPH_WIDTH
|
||||
# and MAX_DOT_GRAPH_HEIGHT). If 0 is used for the depth value (the default),
|
||||
# the graph is not depth-constrained.
|
||||
|
||||
MAX_DOT_GRAPH_DEPTH = 0
|
||||
|
||||
# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent
|
||||
# background. This is disabled by default, which results in a white background.
|
||||
|
||||
@@ -0,0 +1,201 @@
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright [yyyy] [name of copyright owner]
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
@@ -0,0 +1,22 @@
|
||||
As with most development projects, contributions come from many people and in
|
||||
many forms. The CLucene project would like to thank it's many contributors.
|
||||
Omissions are merely accidental, please e-mail ustramooner@users.sourceforge.net
|
||||
if you have been left out or a contribution is not mentioned.
|
||||
|
||||
CLucene was originally ported to C++ by Ben van Klinken (ustramooner@users.sourceforge.net)
|
||||
from Doug Cutting's popular java search engine, Lucene (see http://lucene.apache.org).
|
||||
|
||||
Here is a list of contributors. Please send me an email at ustramooner@users.sourceforge.net
|
||||
if I have left you out.
|
||||
|
||||
Doug Cutting cutting@users.sourceforge.net
|
||||
John Wheeler j_wheeler@users.sourceforge.net
|
||||
Robert G. Ristroph rgristroph@users.sourceforge.net
|
||||
David Rushby woodsplitter@users.sourceforge.net
|
||||
Jimmy Pritts jpritts@sdf.lonestar.org
|
||||
Peter Edwards peter@dragonstaff.co.uk
|
||||
Jorge Sabater Redondo jsabater@elderecho.com
|
||||
Daniel Glassey danglassey@ntlworld.com
|
||||
Peter Gladkikh batyi@mail.ru
|
||||
Pedja amigo@max3d.com
|
||||
Peter Hodges hodges.peter@gmail.com
|
||||
@@ -0,0 +1,69 @@
|
||||
License
|
||||
|
||||
The CLucene Core Library uses a dual license strategy for the source code.
|
||||
These licenses are the GNU Lesser General Public License (LGPL) and the Apache
|
||||
License (Version 2.0). Users can choose the license they wish to distribute
|
||||
their software under. This means that you do not need to abide by *both*
|
||||
licenses, but rather than you can choose the license which most suits your
|
||||
needs.
|
||||
|
||||
To rephrase this and to make it perfectly clear:
|
||||
CLucene is distributed under the GNU Lesser General Public License (LGPL)
|
||||
*or*
|
||||
the Apache License, Version 2.0
|
||||
|
||||
However, we are an open source project, and we encourage users to use the LGPL
|
||||
license and participate fully in the free software community. Dual licensing
|
||||
of the CLucene source code provides open and free access to the technology both
|
||||
for the GPL community and for other developers or companies that cannot use the
|
||||
GPL.
|
||||
|
||||
You can freely modify, extend, and improve the CLucene source code. The only
|
||||
question is whether or not you must provide the source code and contribute
|
||||
modifications to the community. The GNU and Apache licenses allow different
|
||||
ranges of flexibility in this regard, but in the end, regardless of the license
|
||||
used, we highly recommend that you submit any bugs, incompatibilities or
|
||||
added features.
|
||||
|
||||
Note that this same license does *not* apply to the CLucene Contributions
|
||||
package. You should read the COPYING file in that directory or package for
|
||||
more information.
|
||||
|
||||
|
||||
CLUCENE SUBCOMPONENTS:
|
||||
|
||||
CLucene includes a number of subcomponents with separate copyright
|
||||
notices and license terms. Your use of the source code for the
|
||||
these subcomponents is subject to the terms and conditions of the
|
||||
following licenses.
|
||||
|
||||
For the src\CLucene\util\MD5Digester.cpp component:
|
||||
/*
|
||||
* This is work is derived from material Copyright RSA Data Security, Inc.
|
||||
*
|
||||
* The RSA copyright statement and Licence for that original material is
|
||||
* included below. This is followed by the Apache copyright statement and
|
||||
* licence for the modifications made to that material.
|
||||
*/
|
||||
/* Copyright (C) 1991-2, RSA Data Security, Inc. Created 1991. All
|
||||
rights reserved.
|
||||
|
||||
License to copy and use this software is granted provided that it
|
||||
is identified as the "RSA Data Security, Inc. MD5 Message-Digest
|
||||
Algorithm" in all material mentioning or referencing this software
|
||||
or this function.
|
||||
|
||||
License is also granted to make and use derivative works provided
|
||||
that such works are identified as "derived from the RSA Data
|
||||
Security, Inc. MD5 Message-Digest Algorithm" in all material
|
||||
mentioning or referencing the derived work.
|
||||
|
||||
RSA Data Security, Inc. makes no representations concerning either
|
||||
the merchantability of this software or the suitability of this
|
||||
software for any particular purpose. It is provided "as is"
|
||||
without express or implied warranty of any kind.
|
||||
|
||||
These notices must be retained in any copies of any part of this
|
||||
documentation and/or software.
|
||||
*/
|
||||
|
||||
@@ -0,0 +1,977 @@
|
||||
# Doxyfile 1.2.18
|
||||
|
||||
# This file describes the settings to be used by the documentation system
|
||||
# doxygen (www.doxygen.org) for a project
|
||||
#
|
||||
# All text after a hash (#) is considered a comment and will be ignored
|
||||
# The format is:
|
||||
# TAG = value [value, ...]
|
||||
# For lists items can also be appended using:
|
||||
# TAG += value [value, ...]
|
||||
# Values that contain spaces should be placed between quotes (" ")
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# General configuration options
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
# The PROJECT_NAME tag is a single word (or a sequence of words surrounded
|
||||
# by quotes) that should identify the project.
|
||||
|
||||
PROJECT_NAME = @PACKAGE@
|
||||
|
||||
# The PROJECT_NUMBER tag can be used to enter a project or revision number.
|
||||
# This could be handy for archiving the generated documentation or
|
||||
# if some version control system is used.
|
||||
|
||||
PROJECT_NUMBER = @VERSION@
|
||||
|
||||
# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
|
||||
# base path where the generated documentation will be put.
|
||||
# If a relative path is entered, it will be relative to the location
|
||||
# where doxygen was started. If left blank the current directory will be used.
|
||||
|
||||
OUTPUT_DIRECTORY = ./doc
|
||||
|
||||
# The OUTPUT_LANGUAGE tag is used to specify the language in which all
|
||||
# documentation generated by doxygen is written. Doxygen will use this
|
||||
# information to generate all constant output in the proper language.
|
||||
# The default language is English, other supported languages are:
|
||||
# Brazilian, Catalan, Chinese, Chinese-Traditional, Croatian, Czech, Danish, Dutch,
|
||||
# Finnish, French, German, Greek, Hungarian, Italian, Japanese, Japanese-en
|
||||
# (Japanese with english messages), Korean, Norwegian, Polish, Portuguese,
|
||||
# Romanian, Russian, Serbian, Slovak, Slovene, Spanish, Swedish and Ukrainian.
|
||||
|
||||
OUTPUT_LANGUAGE = English
|
||||
|
||||
# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in
|
||||
# documentation are documented, even if no documentation was available.
|
||||
# Private class members and static file members will be hidden unless
|
||||
# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES
|
||||
|
||||
EXTRACT_ALL = YES
|
||||
|
||||
# If the EXTRACT_PRIVATE tag is set to YES all private members of a class
|
||||
# will be included in the documentation.
|
||||
|
||||
EXTRACT_PRIVATE = NO
|
||||
|
||||
# If the EXTRACT_STATIC tag is set to YES all static members of a file
|
||||
# will be included in the documentation.
|
||||
|
||||
EXTRACT_STATIC = YES
|
||||
|
||||
# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs)
|
||||
# defined locally in source files will be included in the documentation.
|
||||
# If set to NO only classes defined in header files are included.
|
||||
|
||||
EXTRACT_LOCAL_CLASSES = NO
|
||||
|
||||
# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all
|
||||
# undocumented members of documented classes, files or namespaces.
|
||||
# If set to NO (the default) these members will be included in the
|
||||
# various overviews, but no documentation section is generated.
|
||||
# This option has no effect if EXTRACT_ALL is enabled.
|
||||
|
||||
HIDE_UNDOC_MEMBERS = NO
|
||||
|
||||
# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all
|
||||
# undocumented classes that are normally visible in the class hierarchy.
|
||||
# If set to NO (the default) these class will be included in the various
|
||||
# overviews. This option has no effect if EXTRACT_ALL is enabled.
|
||||
|
||||
HIDE_UNDOC_CLASSES = NO
|
||||
|
||||
# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all
|
||||
# friend (class|struct|union) declarations.
|
||||
# If set to NO (the default) these declarations will be included in the
|
||||
# documentation.
|
||||
|
||||
HIDE_FRIEND_COMPOUNDS = NO
|
||||
|
||||
# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will
|
||||
# include brief member descriptions after the members that are listed in
|
||||
# the file and class documentation (similar to JavaDoc).
|
||||
# Set to NO to disable this.
|
||||
|
||||
BRIEF_MEMBER_DESC = YES
|
||||
|
||||
# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend
|
||||
# the brief description of a member or function before the detailed description.
|
||||
# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the
|
||||
# brief descriptions will be completely suppressed.
|
||||
|
||||
REPEAT_BRIEF = YES
|
||||
|
||||
# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then
|
||||
# Doxygen will generate a detailed section even if there is only a brief
|
||||
# description.
|
||||
|
||||
ALWAYS_DETAILED_SEC = NO
|
||||
|
||||
# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all inherited
|
||||
# members of a class in the documentation of that class as if those members were
|
||||
# ordinary class members. Constructors, destructors and assignment operators of
|
||||
# the base classes will not be shown.
|
||||
|
||||
INLINE_INHERITED_MEMB = NO
|
||||
|
||||
# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full
|
||||
# path before files name in the file list and in the header files. If set
|
||||
# to NO the shortest path that makes the file name unique will be used.
|
||||
|
||||
FULL_PATH_NAMES = NO
|
||||
|
||||
# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag
|
||||
# can be used to strip a user defined part of the path. Stripping is
|
||||
# only done if one of the specified strings matches the left-hand part of
|
||||
# the path. It is allowed to use relative paths in the argument list.
|
||||
|
||||
STRIP_FROM_PATH =
|
||||
|
||||
# The INTERNAL_DOCS tag determines if documentation
|
||||
# that is typed after a \internal command is included. If the tag is set
|
||||
# to NO (the default) then the documentation will be excluded.
|
||||
# Set it to YES to include the internal documentation.
|
||||
|
||||
INTERNAL_DOCS = NO
|
||||
|
||||
# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct
|
||||
# doxygen to hide any special comment blocks from generated source code
|
||||
# fragments. Normal C and C++ comments will always remain visible.
|
||||
|
||||
STRIP_CODE_COMMENTS = YES
|
||||
|
||||
# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate
|
||||
# file names in lower case letters. If set to YES upper case letters are also
|
||||
# allowed. This is useful if you have classes or files whose names only differ
|
||||
# in case and if your file system supports case sensitive file names. Windows
|
||||
# users are adviced to set this option to NO.
|
||||
|
||||
CASE_SENSE_NAMES = YES
|
||||
|
||||
# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter
|
||||
# (but less readable) file names. This can be useful is your file systems
|
||||
# doesn't support long names like on DOS, Mac, or CD-ROM.
|
||||
|
||||
SHORT_NAMES = NO
|
||||
|
||||
# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen
|
||||
# will show members with their full class and namespace scopes in the
|
||||
# documentation. If set to YES the scope will be hidden.
|
||||
|
||||
HIDE_SCOPE_NAMES = NO
|
||||
|
||||
# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen
|
||||
# will generate a verbatim copy of the header file for each class for
|
||||
# which an include is specified. Set to NO to disable this.
|
||||
|
||||
VERBATIM_HEADERS = YES
|
||||
|
||||
# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen
|
||||
# will put list of the files that are included by a file in the documentation
|
||||
# of that file.
|
||||
|
||||
SHOW_INCLUDE_FILES = YES
|
||||
|
||||
# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen
|
||||
# will interpret the first line (until the first dot) of a JavaDoc-style
|
||||
# comment as the brief description. If set to NO, the JavaDoc
|
||||
# comments will behave just like the Qt-style comments (thus requiring an
|
||||
# explict @brief command for a brief description.
|
||||
|
||||
JAVADOC_AUTOBRIEF = YES
|
||||
|
||||
# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen
|
||||
# treat a multi-line C++ special comment block (i.e. a block of //! or ///
|
||||
# comments) as a brief description. This used to be the default behaviour.
|
||||
# The new default is to treat a multi-line C++ comment block as a detailed
|
||||
# description. Set this tag to YES if you prefer the old behaviour instead.
|
||||
|
||||
MULTILINE_CPP_IS_BRIEF = NO
|
||||
|
||||
# If the DETAILS_AT_TOP tag is set to YES then Doxygen
|
||||
# will output the detailed description near the top, like JavaDoc.
|
||||
# If set to NO, the detailed description appears after the member
|
||||
# documentation.
|
||||
|
||||
DETAILS_AT_TOP = NO
|
||||
|
||||
# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented
|
||||
# member inherits the documentation from any documented member that it
|
||||
# reimplements.
|
||||
|
||||
INHERIT_DOCS = YES
|
||||
|
||||
# If the INLINE_INFO tag is set to YES (the default) then a tag [inline]
|
||||
# is inserted in the documentation for inline members.
|
||||
|
||||
INLINE_INFO = YES
|
||||
|
||||
# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen
|
||||
# will sort the (detailed) documentation of file and class members
|
||||
# alphabetically by member name. If set to NO the members will appear in
|
||||
# declaration order.
|
||||
|
||||
SORT_MEMBER_DOCS = YES
|
||||
|
||||
# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC
|
||||
# tag is set to YES, then doxygen will reuse the documentation of the first
|
||||
# member in the group (if any) for the other members of the group. By default
|
||||
# all members of a group must be documented explicitly.
|
||||
|
||||
DISTRIBUTE_GROUP_DOC = NO
|
||||
|
||||
# The TAB_SIZE tag can be used to set the number of spaces in a tab.
|
||||
# Doxygen uses this value to replace tabs by spaces in code fragments.
|
||||
|
||||
TAB_SIZE = 8
|
||||
|
||||
# The GENERATE_TODOLIST tag can be used to enable (YES) or
|
||||
# disable (NO) the todo list. This list is created by putting \todo
|
||||
# commands in the documentation.
|
||||
|
||||
GENERATE_TODOLIST = YES
|
||||
|
||||
# The GENERATE_TESTLIST tag can be used to enable (YES) or
|
||||
# disable (NO) the test list. This list is created by putting \test
|
||||
# commands in the documentation.
|
||||
|
||||
GENERATE_TESTLIST = YES
|
||||
|
||||
# The GENERATE_BUGLIST tag can be used to enable (YES) or
|
||||
# disable (NO) the bug list. This list is created by putting \bug
|
||||
# commands in the documentation.
|
||||
|
||||
GENERATE_BUGLIST = YES
|
||||
|
||||
# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or
|
||||
# disable (NO) the deprecated list. This list is created by putting \deprecated commands in the documentation.
|
||||
|
||||
GENERATE_DEPRECATEDLIST= YES
|
||||
|
||||
# This tag can be used to specify a number of aliases that acts
|
||||
# as commands in the documentation. An alias has the form "name=value".
|
||||
# For example adding "sideeffect=\par Side Effects:\n" will allow you to
|
||||
# put the command \sideeffect (or @sideeffect) in the documentation, which
|
||||
# will result in a user defined paragraph with heading "Side Effects:".
|
||||
# You can put \n's in the value part of an alias to insert newlines.
|
||||
|
||||
ALIASES =
|
||||
|
||||
# The ENABLED_SECTIONS tag can be used to enable conditional
|
||||
# documentation sections, marked by \if sectionname ... \endif.
|
||||
|
||||
ENABLED_SECTIONS =
|
||||
|
||||
# The MAX_INITIALIZER_LINES tag determines the maximum number of lines
|
||||
# the initial value of a variable or define consist of for it to appear in
|
||||
# the documentation. If the initializer consists of more lines than specified
|
||||
# here it will be hidden. Use a value of 0 to hide initializers completely.
|
||||
# The appearance of the initializer of individual variables and defines in the
|
||||
# documentation can be controlled using \showinitializer or \hideinitializer
|
||||
# command in the documentation regardless of this setting.
|
||||
|
||||
MAX_INITIALIZER_LINES = 30
|
||||
|
||||
# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources
|
||||
# only. Doxygen will then generate output that is more tailored for C.
|
||||
# For instance some of the names that are used will be different. The list
|
||||
# of all members will be omitted, etc.
|
||||
|
||||
OPTIMIZE_OUTPUT_FOR_C = NO
|
||||
|
||||
# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java sources
|
||||
# only. Doxygen will then generate output that is more tailored for Java.
|
||||
# For instance namespaces will be presented as packages, qualified scopes
|
||||
# will look different, etc.
|
||||
|
||||
OPTIMIZE_OUTPUT_JAVA = NO
|
||||
|
||||
# Set the SHOW_USED_FILES tag to NO to disable the list of files generated
|
||||
# at the bottom of the documentation of classes and structs. If set to YES the
|
||||
# list will mention the files that were used to generate the documentation.
|
||||
|
||||
SHOW_USED_FILES = YES
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to warning and progress messages
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
# The QUIET tag can be used to turn on/off the messages that are generated
|
||||
# by doxygen. Possible values are YES and NO. If left blank NO is used.
|
||||
|
||||
QUIET = NO
|
||||
|
||||
# The WARNINGS tag can be used to turn on/off the warning messages that are
|
||||
# generated by doxygen. Possible values are YES and NO. If left blank
|
||||
# NO is used.
|
||||
|
||||
WARNINGS = YES
|
||||
|
||||
# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings
|
||||
# for undocumented members. If EXTRACT_ALL is set to YES then this flag will
|
||||
# automatically be disabled.
|
||||
|
||||
WARN_IF_UNDOCUMENTED = YES
|
||||
|
||||
# The WARN_FORMAT tag determines the format of the warning messages that
|
||||
# doxygen can produce. The string should contain the $file, $line, and $text
|
||||
# tags, which will be replaced by the file and line number from which the
|
||||
# warning originated and the warning text.
|
||||
|
||||
WARN_FORMAT = "$file:$line: $text"
|
||||
|
||||
# The WARN_LOGFILE tag can be used to specify a file to which warning
|
||||
# and error messages should be written. If left blank the output is written
|
||||
# to stderr.
|
||||
|
||||
WARN_LOGFILE =
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the input files
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
# The INPUT tag can be used to specify the files and/or directories that contain
|
||||
# documented source files. You may enter file names like "myfile.cpp" or
|
||||
# directories like "/usr/src/myproject". Separate the files or directories
|
||||
# with spaces.
|
||||
|
||||
INPUT = ./src/CLucene
|
||||
|
||||
# If the value of the INPUT tag contains directories, you can use the
|
||||
# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
|
||||
# and *.h) to filter out the source-files in the directories. If left
|
||||
# blank the following patterns are tested:
|
||||
# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx *.hpp
|
||||
# *.h++ *.idl *.odl
|
||||
|
||||
FILE_PATTERNS = *.h
|
||||
|
||||
# The RECURSIVE tag can be used to turn specify whether or not subdirectories
|
||||
# should be searched for input files as well. Possible values are YES and NO.
|
||||
# If left blank NO is used.
|
||||
|
||||
RECURSIVE = YES
|
||||
|
||||
# The EXCLUDE tag can be used to specify files and/or directories that should
|
||||
# excluded from the INPUT source files. This way you can easily exclude a
|
||||
# subdirectory from a directory tree whose root is specified with the INPUT tag.
|
||||
|
||||
EXCLUDE = CLBackwards.h mem.h
|
||||
|
||||
# The EXCLUDE_SYMLINKS tag can be used select whether or not files or directories
|
||||
# that are symbolic links (a Unix filesystem feature) are excluded from the input.
|
||||
|
||||
EXCLUDE_SYMLINKS = NO
|
||||
|
||||
# If the value of the INPUT tag contains directories, you can use the
|
||||
# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude
|
||||
# certain files from those directories.
|
||||
|
||||
EXCLUDE_PATTERNS = "**/config/**"
|
||||
|
||||
# The EXAMPLE_PATH tag can be used to specify one or more files or
|
||||
# directories that contain example code fragments that are included (see
|
||||
# the \include command).
|
||||
|
||||
EXAMPLE_PATH =
|
||||
|
||||
# If the value of the EXAMPLE_PATH tag contains directories, you can use the
|
||||
# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
|
||||
# and *.h) to filter out the source-files in the directories. If left
|
||||
# blank all files are included.
|
||||
|
||||
EXAMPLE_PATTERNS =
|
||||
|
||||
# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be
|
||||
# searched for input files to be used with the \include or \dontinclude
|
||||
# commands irrespective of the value of the RECURSIVE tag.
|
||||
# Possible values are YES and NO. If left blank NO is used.
|
||||
|
||||
EXAMPLE_RECURSIVE = NO
|
||||
|
||||
# The IMAGE_PATH tag can be used to specify one or more files or
|
||||
# directories that contain image that are included in the documentation (see
|
||||
# the \image command).
|
||||
|
||||
IMAGE_PATH =
|
||||
|
||||
# The INPUT_FILTER tag can be used to specify a program that doxygen should
|
||||
# invoke to filter for each input file. Doxygen will invoke the filter program
|
||||
# by executing (via popen()) the command <filter> <input-file>, where <filter>
|
||||
# is the value of the INPUT_FILTER tag, and <input-file> is the name of an
|
||||
# input file. Doxygen will then use the output that the filter program writes
|
||||
# to standard output.
|
||||
|
||||
INPUT_FILTER =
|
||||
|
||||
# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using
|
||||
# INPUT_FILTER) will be used to filter the input files when producing source
|
||||
# files to browse (i.e. when SOURCE_BROWSER is set to YES).
|
||||
|
||||
FILTER_SOURCE_FILES = NO
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to source browsing
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
# If the SOURCE_BROWSER tag is set to YES then a list of source files will
|
||||
# be generated. Documented entities will be cross-referenced with these sources.
|
||||
|
||||
SOURCE_BROWSER = NO
|
||||
|
||||
# Setting the INLINE_SOURCES tag to YES will include the body
|
||||
# of functions and classes directly in the documentation.
|
||||
|
||||
INLINE_SOURCES = NO
|
||||
|
||||
# If the REFERENCED_BY_RELATION tag is set to YES (the default)
|
||||
# then for each documented function all documented
|
||||
# functions referencing it will be listed.
|
||||
|
||||
REFERENCED_BY_RELATION = YES
|
||||
|
||||
# If the REFERENCES_RELATION tag is set to YES (the default)
|
||||
# then for each documented function all documented entities
|
||||
# called/used by that function will be listed.
|
||||
|
||||
REFERENCES_RELATION = YES
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the alphabetical class index
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index
|
||||
# of all compounds will be generated. Enable this if the project
|
||||
# contains a lot of classes, structs, unions or interfaces.
|
||||
|
||||
ALPHABETICAL_INDEX = NO
|
||||
|
||||
# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then
|
||||
# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns
|
||||
# in which this list will be split (can be a number in the range [1..20])
|
||||
|
||||
COLS_IN_ALPHA_INDEX = 5
|
||||
|
||||
# In case all classes in a project start with a common prefix, all
|
||||
# classes will be put under the same header in the alphabetical index.
|
||||
# The IGNORE_PREFIX tag can be used to specify one or more prefixes that
|
||||
# should be ignored while generating the index headers.
|
||||
|
||||
IGNORE_PREFIX =
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the HTML output
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
# If the GENERATE_HTML tag is set to YES (the default) Doxygen will
|
||||
# generate HTML output.
|
||||
|
||||
GENERATE_HTML = YES
|
||||
|
||||
# The HTML_OUTPUT tag is used to specify where the HTML docs will be put.
|
||||
# If a relative path is entered the value of OUTPUT_DIRECTORY will be
|
||||
# put in front of it. If left blank `html' will be used as the default path.
|
||||
|
||||
HTML_OUTPUT = html
|
||||
|
||||
# The HTML_FILE_EXTENSION tag can be used to specify the file extension for
|
||||
# each generated HTML page (for example: .htm,.php,.asp). If it is left blank
|
||||
# doxygen will generate files with .html extension.
|
||||
|
||||
HTML_FILE_EXTENSION = .html
|
||||
|
||||
# The HTML_HEADER tag can be used to specify a personal HTML header for
|
||||
# each generated HTML page. If it is left blank doxygen will generate a
|
||||
# standard header.
|
||||
|
||||
HTML_HEADER = ./doc/helpheader.htm
|
||||
|
||||
# The HTML_FOOTER tag can be used to specify a personal HTML footer for
|
||||
# each generated HTML page. If it is left blank doxygen will generate a
|
||||
# standard footer.
|
||||
|
||||
HTML_FOOTER = ./doc/helpfooter.htm
|
||||
|
||||
# The HTML_STYLESHEET tag can be used to specify a user defined cascading
|
||||
# style sheet that is used by each HTML page. It can be used to
|
||||
# fine-tune the look of the HTML output. If the tag is left blank doxygen
|
||||
# will generate a default style sheet
|
||||
|
||||
HTML_STYLESHEET =
|
||||
|
||||
# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes,
|
||||
# files or namespaces will be aligned in HTML using tables. If set to
|
||||
# NO a bullet list will be used.
|
||||
|
||||
HTML_ALIGN_MEMBERS = YES
|
||||
|
||||
# If the GENERATE_HTMLHELP tag is set to YES, additional index files
|
||||
# will be generated that can be used as input for tools like the
|
||||
# Microsoft HTML help workshop to generate a compressed HTML help file (.chm)
|
||||
# of the generated HTML documentation.
|
||||
|
||||
GENERATE_HTMLHELP = NO
|
||||
|
||||
# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can
|
||||
# be used to specify the file name of the resulting .chm file. You
|
||||
# can add a path in front of the file if the result should not be
|
||||
# written to the html output dir.
|
||||
|
||||
CHM_FILE =
|
||||
|
||||
# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can
|
||||
# be used to specify the location (absolute path including file name) of
|
||||
# the HTML help compiler (hhc.exe). If non empty doxygen will try to run
|
||||
# the html help compiler on the generated index.hhp.
|
||||
|
||||
HHC_LOCATION =
|
||||
|
||||
# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag
|
||||
# controls if a separate .chi index file is generated (YES) or that
|
||||
# it should be included in the master .chm file (NO).
|
||||
|
||||
GENERATE_CHI = NO
|
||||
|
||||
# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag
|
||||
# controls whether a binary table of contents is generated (YES) or a
|
||||
# normal table of contents (NO) in the .chm file.
|
||||
|
||||
BINARY_TOC = NO
|
||||
|
||||
# The TOC_EXPAND flag can be set to YES to add extra items for group members
|
||||
# to the contents of the Html help documentation and to the tree view.
|
||||
|
||||
TOC_EXPAND = NO
|
||||
|
||||
# The DISABLE_INDEX tag can be used to turn on/off the condensed index at
|
||||
# top of each HTML page. The value NO (the default) enables the index and
|
||||
# the value YES disables it.
|
||||
|
||||
DISABLE_INDEX = NO
|
||||
|
||||
# This tag can be used to set the number of enum values (range [1..20])
|
||||
# that doxygen will group on one line in the generated HTML documentation.
|
||||
|
||||
ENUM_VALUES_PER_LINE = 4
|
||||
|
||||
# If the GENERATE_TREEVIEW tag is set to YES, a side panel will be
|
||||
# generated containing a tree-like index structure (just like the one that
|
||||
# is generated for HTML Help). For this to work a browser that supports
|
||||
# JavaScript and frames is required (for instance Mozilla, Netscape 4.0+,
|
||||
# or Internet explorer 4.0+). Note that for large projects the tree generation
|
||||
# can take a very long time. In such cases it is better to disable this feature.
|
||||
# Windows users are probably better off using the HTML help feature.
|
||||
|
||||
GENERATE_TREEVIEW = NO
|
||||
|
||||
# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be
|
||||
# used to set the initial width (in pixels) of the frame in which the tree
|
||||
# is shown.
|
||||
|
||||
TREEVIEW_WIDTH = 250
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the LaTeX output
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will
|
||||
# generate Latex output.
|
||||
|
||||
GENERATE_LATEX = NO
|
||||
|
||||
# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put.
|
||||
# If a relative path is entered the value of OUTPUT_DIRECTORY will be
|
||||
# put in front of it. If left blank `latex' will be used as the default path.
|
||||
|
||||
LATEX_OUTPUT = latex
|
||||
|
||||
# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be invoked. If left blank `latex' will be used as the default command name.
|
||||
|
||||
LATEX_CMD_NAME = latex
|
||||
|
||||
# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to
|
||||
# generate index for LaTeX. If left blank `makeindex' will be used as the
|
||||
# default command name.
|
||||
|
||||
MAKEINDEX_CMD_NAME = makeindex
|
||||
|
||||
# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact
|
||||
# LaTeX documents. This may be useful for small projects and may help to
|
||||
# save some trees in general.
|
||||
|
||||
COMPACT_LATEX = NO
|
||||
|
||||
# The PAPER_TYPE tag can be used to set the paper type that is used
|
||||
# by the printer. Possible values are: a4, a4wide, letter, legal and
|
||||
# executive. If left blank a4wide will be used.
|
||||
|
||||
PAPER_TYPE = a4wide
|
||||
|
||||
# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX
|
||||
# packages that should be included in the LaTeX output.
|
||||
|
||||
EXTRA_PACKAGES =
|
||||
|
||||
# The LATEX_HEADER tag can be used to specify a personal LaTeX header for
|
||||
# the generated latex document. The header should contain everything until
|
||||
# the first chapter. If it is left blank doxygen will generate a
|
||||
# standard header. Notice: only use this tag if you know what you are doing!
|
||||
|
||||
LATEX_HEADER =
|
||||
|
||||
# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated
|
||||
# is prepared for conversion to pdf (using ps2pdf). The pdf file will
|
||||
# contain links (just like the HTML output) instead of page references
|
||||
# This makes the output suitable for online browsing using a pdf viewer.
|
||||
|
||||
PDF_HYPERLINKS = NO
|
||||
|
||||
# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of
|
||||
# plain latex in the generated Makefile. Set this option to YES to get a
|
||||
# higher quality PDF documentation.
|
||||
|
||||
USE_PDFLATEX = NO
|
||||
|
||||
# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode.
|
||||
# command to the generated LaTeX files. This will instruct LaTeX to keep
|
||||
# running if errors occur, instead of asking the user for help.
|
||||
# This option is also used when generating formulas in HTML.
|
||||
|
||||
LATEX_BATCHMODE = NO
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the RTF output
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output
|
||||
# The RTF output is optimised for Word 97 and may not look very pretty with
|
||||
# other RTF readers or editors.
|
||||
|
||||
GENERATE_RTF = NO
|
||||
|
||||
# The RTF_OUTPUT tag is used to specify where the RTF docs will be put.
|
||||
# If a relative path is entered the value of OUTPUT_DIRECTORY will be
|
||||
# put in front of it. If left blank `rtf' will be used as the default path.
|
||||
|
||||
RTF_OUTPUT = rtf
|
||||
|
||||
# If the COMPACT_RTF tag is set to YES Doxygen generates more compact
|
||||
# RTF documents. This may be useful for small projects and may help to
|
||||
# save some trees in general.
|
||||
|
||||
COMPACT_RTF = NO
|
||||
|
||||
# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated
|
||||
# will contain hyperlink fields. The RTF file will
|
||||
# contain links (just like the HTML output) instead of page references.
|
||||
# This makes the output suitable for online browsing using WORD or other
|
||||
# programs which support those fields.
|
||||
# Note: wordpad (write) and others do not support links.
|
||||
|
||||
RTF_HYPERLINKS = NO
|
||||
|
||||
# Load stylesheet definitions from file. Syntax is similar to doxygen's
|
||||
# config file, i.e. a series of assigments. You only have to provide
|
||||
# replacements, missing definitions are set to their default value.
|
||||
|
||||
RTF_STYLESHEET_FILE =
|
||||
|
||||
# Set optional variables used in the generation of an rtf document.
|
||||
# Syntax is similar to doxygen's config file.
|
||||
|
||||
RTF_EXTENSIONS_FILE =
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the man page output
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
# If the GENERATE_MAN tag is set to YES (the default) Doxygen will
|
||||
# generate man pages
|
||||
|
||||
GENERATE_MAN = NO
|
||||
|
||||
# The MAN_OUTPUT tag is used to specify where the man pages will be put.
|
||||
# If a relative path is entered the value of OUTPUT_DIRECTORY will be
|
||||
# put in front of it. If left blank `man' will be used as the default path.
|
||||
|
||||
MAN_OUTPUT = man
|
||||
|
||||
# The MAN_EXTENSION tag determines the extension that is added to
|
||||
# the generated man pages (default is the subroutine's section .3)
|
||||
|
||||
MAN_EXTENSION = .3
|
||||
|
||||
# If the MAN_LINKS tag is set to YES and Doxygen generates man output,
|
||||
# then it will generate one additional man file for each entity
|
||||
# documented in the real man page(s). These additional files
|
||||
# only source the real man page, but without them the man command
|
||||
# would be unable to find the correct page. The default is NO.
|
||||
|
||||
MAN_LINKS = NO
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the XML output
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
# If the GENERATE_XML tag is set to YES Doxygen will
|
||||
# generate an XML file that captures the structure of
|
||||
# the code including all documentation. Note that this
|
||||
# feature is still experimental and incomplete at the
|
||||
# moment.
|
||||
|
||||
GENERATE_XML = NO
|
||||
|
||||
# The XML_SCHEMA tag can be used to specify an XML schema,
|
||||
# which can be used by a validating XML parser to check the
|
||||
# syntax of the XML files.
|
||||
|
||||
XML_SCHEMA =
|
||||
|
||||
# The XML_DTD tag can be used to specify an XML DTD,
|
||||
# which can be used by a validating XML parser to check the
|
||||
# syntax of the XML files.
|
||||
|
||||
XML_DTD =
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options for the AutoGen Definitions output
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will
|
||||
# generate an AutoGen Definitions (see autogen.sf.net) file
|
||||
# that captures the structure of the code including all
|
||||
# documentation. Note that this feature is still experimental
|
||||
# and incomplete at the moment.
|
||||
|
||||
GENERATE_AUTOGEN_DEF = NO
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration options related to the preprocessor
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will
|
||||
# evaluate all C-preprocessor directives found in the sources and include
|
||||
# files.
|
||||
|
||||
ENABLE_PREPROCESSING = YES
|
||||
|
||||
# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro
|
||||
# names in the source code. If set to NO (the default) only conditional
|
||||
# compilation will be performed. Macro expansion can be done in a controlled
|
||||
# way by setting EXPAND_ONLY_PREDEF to YES.
|
||||
|
||||
MACRO_EXPANSION = YES
|
||||
|
||||
# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES
|
||||
# then the macro expansion is limited to the macros specified with the
|
||||
# PREDEFINED and EXPAND_AS_PREDEFINED tags.
|
||||
|
||||
EXPAND_ONLY_PREDEF = YES
|
||||
|
||||
# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files
|
||||
# in the INCLUDE_PATH (see below) will be search if a #include is found.
|
||||
|
||||
SEARCH_INCLUDES = YES
|
||||
|
||||
# The INCLUDE_PATH tag can be used to specify one or more directories that
|
||||
# contain include files that are not input files but should be processed by
|
||||
# the preprocessor.
|
||||
|
||||
INCLUDE_PATH = ./src/
|
||||
|
||||
# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard
|
||||
# patterns (like *.h and *.hpp) to filter out the header-files in the
|
||||
# directories. If left blank, the patterns specified with FILE_PATTERNS will
|
||||
# be used.
|
||||
|
||||
INCLUDE_FILE_PATTERNS =
|
||||
|
||||
# The PREDEFINED tag can be used to specify one or more macro names that
|
||||
# are defined before the preprocessor is started (similar to the -D option of
|
||||
# gcc). The argument of the tag is a list of macros of the form: name
|
||||
# or name=definition (no spaces). If the definition and the = are
|
||||
# omitted =1 is assumed.
|
||||
|
||||
PREDEFINED = "_MSC_VER=1400"
|
||||
PREDEFINED += "WIN32"
|
||||
PREDEFINED += "LUCENE_HIDE_INTERNAL"
|
||||
|
||||
#namespaces
|
||||
PREDEFINED += "CL_NS(sub)=lucene::sub"
|
||||
PREDEFINED += "CL_NS2(sub,sub2)=lucene::sub:sub2"
|
||||
PREDEFINED += "CL_NS_DEF(sub)=namespace lucene{ namespace sub{"
|
||||
PREDEFINED += "CL_NS_DEF2(sub,sub2)=namespace lucene{ namespace sub{ namespace sub2 {"
|
||||
PREDEFINED += "CL_NS_END=}}"
|
||||
PREDEFINED += "CL_NS_END2=}}}"
|
||||
PREDEFINED += "CL_NS_USE(sub)=using namespace lucene::sub"
|
||||
PREDEFINED += "CL_NS_USE2(sub,sub2)=using namespace lucene::sub::sub2"
|
||||
PREDEFINED += "CL_NS_STD(func)=std::func"
|
||||
PREDEFINED += "CL_NS_HASHING(func)=std::func"
|
||||
|
||||
PREDEFINED += "LUCENE_BASE=public CL_NS(debug)::LuceneBase"
|
||||
PREDEFINED += "LUCENE_POOLEDBASE(sc)=LUCENE_BASE"
|
||||
PREDEFINED += "LUCENE_REFBASE=public CL_NS(debug)::LuceneBase"
|
||||
|
||||
|
||||
# If the MACRO_EXPANSION and EXPAND_PREDEF_ONLY tags are set to YES then
|
||||
# this tag can be used to specify a list of macro names that should be expanded.
|
||||
# The macro definition that is found in the sources will be used.
|
||||
# Use the PREDEFINED tag if you want to use a different macro definition.
|
||||
|
||||
EXPAND_AS_DEFINED =
|
||||
|
||||
# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then
|
||||
# doxygen's preprocessor will remove all function-like macros that are alone
|
||||
# on a line, have an all uppercase name, and do not end with a semicolon. Such
|
||||
# function macros are typically used for boiler-plate code, and will confuse the
|
||||
# parser if not removed.
|
||||
|
||||
SKIP_FUNCTION_MACROS = YES
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration::addtions related to external references
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
# The TAGFILES tag can be used to specify one or more tagfiles.
|
||||
|
||||
TAGFILES =
|
||||
|
||||
# When a file name is specified after GENERATE_TAGFILE, doxygen will create
|
||||
# a tag file that is based on the input files it reads.
|
||||
|
||||
GENERATE_TAGFILE =
|
||||
|
||||
# If the ALLEXTERNALS tag is set to YES all external classes will be listed
|
||||
# in the class index. If set to NO only the inherited external classes
|
||||
# will be listed.
|
||||
|
||||
ALLEXTERNALS = NO
|
||||
|
||||
# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed
|
||||
# in the modules index. If set to NO, only the current project's groups will
|
||||
# be listed.
|
||||
|
||||
EXTERNAL_GROUPS = YES
|
||||
|
||||
# The PERL_PATH should be the absolute path and name of the perl script
|
||||
# interpreter (i.e. the result of `which perl').
|
||||
|
||||
PERL_PATH = /usr/bin/perl
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration options related to the dot tool
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will
|
||||
# generate a inheritance diagram (in Html, RTF and LaTeX) for classes with base or
|
||||
# super classes. Setting the tag to NO turns the diagrams off. Note that this
|
||||
# option is superceded by the HAVE_DOT option below. This is only a fallback. It is
|
||||
# recommended to install and use dot, since it yield more powerful graphs.
|
||||
|
||||
CLASS_DIAGRAMS = YES
|
||||
|
||||
# If set to YES, the inheritance and collaboration graphs will hide
|
||||
# inheritance and usage relations if the target is undocumented
|
||||
# or is not a class.
|
||||
|
||||
HIDE_UNDOC_RELATIONS = YES
|
||||
|
||||
# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is
|
||||
# available from the path. This tool is part of Graphviz, a graph visualization
|
||||
# toolkit from AT&T and Lucent Bell Labs. The other options in this section
|
||||
# have no effect if this option is set to NO (the default)
|
||||
|
||||
HAVE_DOT = @enable_dot@
|
||||
|
||||
# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen
|
||||
# will generate a graph for each documented class showing the direct and
|
||||
# indirect inheritance relations. Setting this tag to YES will force the
|
||||
# the CLASS_DIAGRAMS tag to NO.
|
||||
|
||||
CLASS_GRAPH = YES
|
||||
|
||||
# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen
|
||||
# will generate a graph for each documented class showing the direct and
|
||||
# indirect implementation dependencies (inheritance, containment, and
|
||||
# class references variables) of the class with other documented classes.
|
||||
|
||||
COLLABORATION_GRAPH = YES
|
||||
|
||||
# If set to YES, the inheritance and collaboration graphs will show the
|
||||
# relations between templates and their instances.
|
||||
|
||||
TEMPLATE_RELATIONS = YES
|
||||
|
||||
# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT
|
||||
# tags are set to YES then doxygen will generate a graph for each documented
|
||||
# file showing the direct and indirect include dependencies of the file with
|
||||
# other documented files.
|
||||
|
||||
INCLUDE_GRAPH = YES
|
||||
|
||||
# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and
|
||||
# HAVE_DOT tags are set to YES then doxygen will generate a graph for each
|
||||
# documented header file showing the documented files that directly or
|
||||
# indirectly include this file.
|
||||
|
||||
INCLUDED_BY_GRAPH = YES
|
||||
|
||||
# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen
|
||||
# will graphical hierarchy of all classes instead of a textual one.
|
||||
|
||||
GRAPHICAL_HIERARCHY = YES
|
||||
|
||||
# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images
|
||||
# generated by dot. Possible values are png, jpg, or gif
|
||||
# If left blank png will be used.
|
||||
|
||||
DOT_IMAGE_FORMAT = png
|
||||
|
||||
# The tag DOT_PATH can be used to specify the path where the dot tool can be
|
||||
# found. If left blank, it is assumed the dot tool can be found on the path.
|
||||
|
||||
DOT_PATH =
|
||||
|
||||
# The DOTFILE_DIRS tag can be used to specify one or more directories that
|
||||
# contain dot files that are included in the documentation (see the
|
||||
# \dotfile command).
|
||||
|
||||
DOTFILE_DIRS =
|
||||
|
||||
# The MAX_DOT_GRAPH_WIDTH tag can be used to set the maximum allowed width
|
||||
# (in pixels) of the graphs generated by dot. If a graph becomes larger than
|
||||
# this value, doxygen will try to truncate the graph, so that it fits within
|
||||
# the specified constraint. Beware that most browsers cannot cope with very
|
||||
# large images.
|
||||
|
||||
MAX_DOT_GRAPH_WIDTH = 1024
|
||||
|
||||
# The MAX_DOT_GRAPH_HEIGHT tag can be used to set the maximum allows height
|
||||
# (in pixels) of the graphs generated by dot. If a graph becomes larger than
|
||||
# this value, doxygen will try to truncate the graph, so that it fits within
|
||||
# the specified constraint. Beware that most browsers cannot cope with very
|
||||
# large images.
|
||||
|
||||
MAX_DOT_GRAPH_HEIGHT = 1024
|
||||
|
||||
# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will
|
||||
# generate a legend page explaining the meaning of the various boxes and
|
||||
# arrows in the dot generated graphs.
|
||||
|
||||
GENERATE_LEGEND = YES
|
||||
|
||||
# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will
|
||||
# remove the intermedate dot files that are used to generate
|
||||
# the various graphs.
|
||||
|
||||
DOT_CLEANUP = YES
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration::addtions related to the search engine
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
# The SEARCHENGINE tag specifies whether or not a search engine should be
|
||||
# used. If set to NO the values of all tags below this one will be ignored.
|
||||
|
||||
SEARCHENGINE = NO
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user