opendmarc -V: show configure args, git hash, and clarify SPF backend - #372
Merged
thegushi merged 2 commits intoMay 28, 2026
Merged
Conversation
Add CONFIGURE_ARGS (captured by autoconf from $ac_configure_args) to the -V output so operators can see exactly how the binary was built. Also clarify the SPF option display: instead of two separate entries (WITH_SPF and WITH_SPF2), emit a single entry that names the backend in use - either "WITH_SPF (libspf2)" or "WITH_SPF (internal)". Mirrors the pattern already used in OpenDKIM.
Three related improvements to -V output, mirroring what was done in OpenDKIM: - CONFIGURE_ARGS: embeds the arguments passed to ./configure in the -V output (via AC_DEFINE_UNQUOTED in configure.ac), so operators can see exactly how the binary was built. - Git hash in version string: configure.ac now runs git describe --tags --dirty and, if the result differs from PACKAGE_VERSION (i.e. the build is not an exact tagged release), uses that as DMARCF_VERSION instead of the plain package version. Tagged release builds and environments without git fall back to the plain version number. All five VERSION references in opendmarc.c replaced with DMARCF_VERSION. - SPF backend clarity: the two separate WITH_SPF / WITH_SPF2 optlist entries are merged into a single "WITH_SPF (libspf2)" or "WITH_SPF (internal)" string.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Three related improvements to
-Voutput, mirroring what was done in OpenDKIM (#366):CONFIGURE_ARGS:./configurearguments are now embedded viaAC_DEFINE_UNQUOTED, so operators can see exactly how the binary was built.configure.acrunsgit describe --tags --dirty; if the result differs fromPACKAGE_VERSION(i.e. the build is not an exact tagged release), it becomesDMARCF_VERSION. Tagged release builds and environments without git fall back to the plain version number. All fiveVERSIONreferences inopendmarc.creplaced withDMARCF_VERSION.WITH_SPF+WITH_SPF2optlist entries are merged into a singleWITH_SPF (libspf2)orWITH_SPF (internal)string.Example output (dev build with SPF + libspf2)
Test plan
1.4.21.4.2-N-gHASH(or-dirtysuffix if tree is modified)Configured with:reflects flags used--with-spf: showsWITH_SPF (internal)--with-spf --with-spf2-include=... --with-spf2-lib=...: showsWITH_SPF (libspf2)