Name: postfix-tlspol Version: 1.12.1 Release: 0%{?dist} Summary: Lightweight MTA-STS + DANE/TLSA resolver and TLS policy server for Postfix, prioritizing DANE License: MIT and GPLv3+ %global common_description %{expand: A lightweight and highly performant MTA-STS + DANE/TLSA resolver and TLS policy socketmap server for Postfix that complies to the standards and prioritizes DANE where possible.} %global debug_package %{nil} %define _unpackaged_files_terminate_build 0 %global goipath github.com/Zuplu/postfix-tlspol %if 0%{?rhel} == 8 %gometa %else %gometa -L -f %endif URL: %{gourl} # Comment to build directly from git source along with lines in %prep section Source0: %{archivename}.tar.gz Source1: README.gf Patch1: postfix-tlspol-1.12.1-config.patch BuildRequires: git golang go-srpm-macros systemd-rpm-macros glibc-devel BuildRequires: pandoc %if 0%{?rhel} >= 9 BuildRequires: go-rpm-macros %endif %description %{common_description} %prep # Uncomment the following to build directly from git source #cd %{_builddir} #git clone %{URL} #mv %{_builddir}/postfix-tlspol %{_builddir}/%{archivename} # # Comment out the line below and Source0 above to build directly from git source %setup %patch1 -p1 -b .config %build # To include CPU detection and optimization and other features, paste script # from the ./scripts/build.sh example here. # Allow golang upgrade to match toolchain version specified in ./go.mod (set # GOTOOLCHAIN=local to disable). export GOTOOLCHAIN=local export CGO_ENABLED=1 printf "Version: %version\n" cd %{_builddir}/%{archivename} mkdir -p build ###### As of 1.9.1 removed netgo and static flags to match CGO_ENABLED=1 above if go build -buildmode=exe -trimpath -ldflags="-s -X 'main.Version=%version'" -o build/postfix-tlspol .; then printf "Build succeeded!\n" else printf "Build failed!\n" exit 1 fi %install install -m 0755 -vd %{buildroot}%{_bindir} %__install -Dm 755 "%{_builddir}/%{archivename}/build/postfix-tlspol" "%{buildroot}%{_bindir}/" %__install -Dm 644 "%{_builddir}/%{archivename}/configs/config.default.yaml" "%{buildroot}%{_sysconfdir}/postfix-tlspol/config.yaml" mkdir -p "%{buildroot}%{_pkgdocdir}" pandoc -f markdown -t plain < "%{_builddir}/%{archivename}/README.md" > "%{buildroot}%{_pkgdocdir}/README" pandoc -f markdown -t plain < "%{_builddir}/%{archivename}/SECURITY.md" > "%{buildroot}%{_pkgdocdir}/SECURITY" pandoc -f markdown -t plain < "%{_builddir}/%{archivename}/CHANGELOG.md" > "%{buildroot}%{_pkgdocdir}/CHANGELOG" %__install -Dm 644 "%{_builddir}/%{archivename}/.github/FUNDING.yaml" "%{buildroot}%{_pkgdocdir}/FUNDING.yaml" %__install -Dm 644 "%{_builddir}/%{archivename}/init/postfix-tlspol.service" "%{buildroot}%{_unitdir}/postfix-tlspol.service" %__install -Dm 644 "%{_builddir}/%{archivename}/LICENSE" "%{buildroot}/usr/share/licenses/postfix-tlspol/LICENSE" %__install -Dm 0644 %{SOURCE1} "%{buildroot}%{_pkgdocdir}/README.gf" %__install -Dm 644 "%{_builddir}/%{archivename}/init/postfix-tlspol.socket" "%{buildroot}%{_unitdir}/postfix-tlspol.socket" ##### As of v1.9.1 new OOMPolicy=continue added to service unit file, but it # only works for EL >= 9 %if 0%{?rhel} < 9 sed -i '/OOMPolicy=continue/s/^/#/' %{buildroot}%{_unitdir}/postfix-tlspol.service %endif %__install -Dm 644 "%{_builddir}/%{archivename}/assets/README.md" "%{buildroot}%{_sysconfdir}/postfix-tlspol/metrics/README.md" %__install -Dm 644 "%{_builddir}/%{archivename}/assets/grafana-postfix-tlspol-dashboard.json" "%{buildroot}%{_sysconfdir}/postfix-tlspol/metrics/grafana-postfix-tlspol-dashboard.json" %post %systemd_post postfix-tlspol.socket postfix-tlspol.service %preun %systemd_preun postfix-tlspol.service postfix-tlspol.socket %postun %systemd_postun_with_restart postfix-tlspol.socket postfix-tlspol.service %files %{_bindir}/postfix-tlspol %{_defaultlicensedir}/postfix-tlspol/LICENSE %config(noreplace) %{_sysconfdir}/postfix-tlspol/config.yaml %{_pkgdocdir}/* %{_unitdir}/postfix-tlspol.service %{_unitdir}/postfix-tlspol.socket %{_sysconfdir}/postfix-tlspol/metrics/* %changelog * Sun Jul 19 2026 Michael Webb 1.12.1-0 - Upstream release: Golang update, code improvements and minor bugfixes * Fri Jul 10 2026 Michael Webb 1.11.0-0 - Upstream release: Golang update, code improvements and minor bugfixes - Remove files wildcards to cleanup folder ownership * Wed Apr 29 2026 Michael Webb 1.10.1-0 - Upstream update release includes - -Error fix in upstream unit file settings. - Include new custom README.gf * Sun Apr 26 2026 Michael Webb 1.9.1-0 - not released - Upstream update release includes - -New optional systemd socket. - -No DNS server default - -New OOMPolicy for EL>8 - -new Prometheus metrics & Grafana dashboard example configs - Maintenance clean up of deprecated script files and folders. - Bugfix. Change build parameters to include gcc * Fri Mar 13 2026 Michael Webb 1.8.27-0 - Upstream release update * Mon Aug 25 2025 Michael Webb 1.8.14-1 - Upstream release update * Wed Aug 20 2025 Michael Webb - 1.8.13-1 - Upstream release update * Wed Jul 30 2025 Peter Ajamian - 1.8.12-3 - Remove version from the spec file name. - Force local go toochain. - Don't use the -L or -f flags for EL8 * Tue Jul 29 2025 Michael Webb - 1.8.12-2 - Preference to reuse same source tarball for rebuild consistency instead of git refresh - Preference to match toolchain specified in go.mod * Mon Jul 28 2025 Michael Webb - 1.8.12-1 - Initial build For EL 9