logo

overlay

My own overlay for experimentations, use with caution, no support is provided
commit: 90861b2f2fe8a0fb4a16a4b92ba8c3f526164b56
parent: 0aedc34ec5960ee28aac57ecef83a0f3c28eb973
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date:   Thu, 30 Jan 2020 20:04:42 +0100

mail-mta/opensmtpd: Clean version, 6.4.0_p1

Diffstat:

Mmail-mta/opensmtpd/Manifest1-
Dmail-mta/opensmtpd/files/opensmtpd-6.4.0_p1_missing_object_file_smtpctl.patch33---------------------------------
Dmail-mta/opensmtpd/opensmtpd-6.4.2_p1-r1.ebuild109-------------------------------------------------------------------------------
3 files changed, 0 insertions(+), 143 deletions(-)

diff --git a/mail-mta/opensmtpd/Manifest b/mail-mta/opensmtpd/Manifest @@ -1,2 +1 @@ -DIST opensmtpd-6.4.2p1.tar.gz 720987 BLAKE2B 27d55aff097fe4fb0f086f021506d0969d54d8143ad89aea508e8afc76b5aef520eb0168a5c6327732660220c1d950141d93fb74c88dcfda123f8d5d3d34d659 SHA512 45b071523a46c441fd436acee44ea841a88ebe93f6b76284ef948fc97535cf73a2962b9a030bffa288227ab8ef90944755748d0036f919df9493d562c1afb694 DIST opensmtpd-6.6.2p1.tar.gz 777422 BLAKE2B e372a10f618e83ccb6c782d056750f89a5224898a28957509ab306fbe8bb4ea94462c1bbccbbe9c0dea64623c250d9fe9f3b74f2e26eda5d6c232bec50bff1d0 SHA512 b0f7ea94514a4a1880a22996064caa7da0a15e6453236ca2f004402125affa80e9d8c25d3e63826b45045305851959bc58c2c855829e46d6967bf6cd13bd1e91 diff --git a/mail-mta/opensmtpd/files/opensmtpd-6.4.0_p1_missing_object_file_smtpctl.patch b/mail-mta/opensmtpd/files/opensmtpd-6.4.0_p1_missing_object_file_smtpctl.patch @@ -1,33 +0,0 @@ -From 70995e4e0a96799a8610fd67b0c874f3f2d9621c Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?L=C3=A9o=20Gaspard?= <leo@gaspard.io> -Date: Sat, 27 Oct 2018 11:53:28 +0900 -Subject: [PATCH] Add missing object file for smtpctl - -With this change and addition of `CFLAGS=-ffunction-sections` and -`LDFLAGS=-Wl,--gc-sections`, it now builds. - -`purge_config` is defined in `config.c` but used in `parse.y`, making -`config.c` mandatory. But `config.c` requires lots of functions from -other files in other unrelated functions, meaning that these unrelated -(and unused in `smtpctl`) functions need to be garbage-collected. - -This is a workaround, a better way would likely be to refactor -`purge_config` and `config_default` out of `config.c`, but I don't want -to push for a change that would separate the portable version and the -OpenBSD version too much. ---- - mk/smtpctl/Makefile.am | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/mk/smtpctl/Makefile.am b/mk/smtpctl/Makefile.am -index 5af0b713..55795920 100644 ---- a/mk/smtpctl/Makefile.am -+++ b/mk/smtpctl/Makefile.am -@@ -4,6 +4,7 @@ sbin_PROGRAMS= smtpctl - - smtpctl_SOURCES= $(smtpd_srcdir)/enqueue.c - smtpctl_SOURCES+= $(smtpd_srcdir)/parser.c -+smtpctl_SOURCES+= $(smtpd_srcdir)/config.c - smtpctl_SOURCES+= $(smtpd_srcdir)/log.c - smtpctl_SOURCES+= $(smtpd_srcdir)/envelope.c - smtpctl_SOURCES+= $(smtpd_srcdir)/queue_backend.c diff --git a/mail-mta/opensmtpd/opensmtpd-6.4.2_p1-r1.ebuild b/mail-mta/opensmtpd/opensmtpd-6.4.2_p1-r1.ebuild @@ -1,109 +0,0 @@ -# Copyright 1999-2018 Gentoo Foundation -# Copyright 2018-2019 Haelwenn (lanodan) Monnier <contact@hacktivis.me> -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -inherit multilib user flag-o-matic pam toolchain-funcs autotools systemd - -DESCRIPTION="Lightweight but featured SMTP daemon from OpenBSD" -HOMEPAGE="https://www.opensmtpd.org" -SRC_URI="https://www.opensmtpd.org/archives/${P/_}.tar.gz" - -LICENSE="ISC BSD BSD-1 BSD-2 BSD-4" -SLOT="0" -KEYWORDS="~amd64" -IUSE="libressl pam mdoc +mta" - -DEPEND=" - !libressl? ( dev-libs/openssl:0 ) - libressl? ( dev-libs/libressl ) - sys-libs/zlib - pam? ( sys-libs/pam ) - elibc_musl? ( - sys-libs/fts-standalone - sys-libs/queue-standalone - ) - sys-libs/db:= - dev-libs/libevent - app-misc/ca-certificates - net-mail/mailbase - net-libs/libasr - !mail-mta/courier - !mail-mta/esmtp - !mail-mta/exim - !mail-mta/mini-qmail - !mail-mta/msmtp[mta] - !mail-mta/netqmail - !mail-mta/nullmailer - !mail-mta/postfix - !mail-mta/qmail-ldap - !mail-mta/sendmail - !mail-mta/ssmtp[mta] -" -RDEPEND="${DEPEND}" - -S=${WORKDIR}/${P/_} - -# PATCHES=( "${FILESDIR}/opensmtpd-6.4.0_p1_missing_object_file_smtpctl.patch" ) - -src_prepare() { - default - - # Use /run instead of /var/run - sed -i -e '/pidfile_path/s:_PATH_VARRUN:"/run/":' openbsd-compat/pidfile.c || die - sed -i -e 's;/usr/libexec/;/usr/libexec/opensmtpd/;g' smtpd/parse.y || die - - append-cflags "-ffunction-sections" - append-ldflags "-Wl,--gc-sections" - - eautoreconf -} - -src_configure() { - tc-export AR - AR="$(which "$AR")" econf \ - --with-table-db \ - --with-user-smtpd=smtpd \ - --with-user-queue=smtpq \ - --with-group-queue=smtpq \ - --with-path-socket=/run \ - --with-path-CAfile=/etc/ssl/certs/ca-certificates.crt \ - --sysconfdir=/etc/opensmtpd \ - --with-mantype=$(usex mdoc doc man) \ - $(use_with pam auth-pam) -} - -src_install() { - default - - newinitd "${FILESDIR}"/smtpd.initd smtpd - systemd_dounit "${FILESDIR}"/smtpd.{service,socket} - - use pam && newpamd "${FILESDIR}"/smtpd.pam smtpd - - dosym /usr/sbin/smtpctl /usr/sbin/makemap - dosym /usr/sbin/smtpctl /usr/sbin/newaliases - - if use mta ; then - dodir /usr/sbin - dosym /usr/sbin/smtpctl /usr/sbin/sendmail - dosym /usr/sbin/smtpctl /usr/bin/sendmail - dosym /usr/sbin/smtpctl /usr/$(get_libdir)/sendmail - fi -} - -pkg_preinst() { - enewgroup smtpd 25 - enewuser smtpd 25 -1 /var/empty smtpd - enewgroup smtpq 252 - enewuser smtpq 252 -1 /var/empty smtpq -} - -pkg_postinst() { - einfo - einfo "Plugins for SQLite, MySQL, PostgreSQL, LDAP, socketmaps," - einfo "Redis, and many other useful addons and filters are" - einfo "available in the mail-filter/opensmtpd-extras package." - einfo -}