logo

overlay

My (experimental) gentoo overlay
commit: 8c628abcde2cb0a80e8899f990d4074bff9d4c09
parent: a838c4b14159fd5c40757bcc42db482aad9f15c7
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date:   Sun, 28 Oct 2018 07:06:27 +0100

mail-mta/opensmtpd: Bump to 6.4.0 and 6.0.3

Diffstat:

Amail-mta/opensmtpd/Manifest2++
Amail-mta/opensmtpd/files/smtpd.initd11+++++++++++
Amail-mta/opensmtpd/files/smtpd.pam4++++
Amail-mta/opensmtpd/files/smtpd.service10++++++++++
Amail-mta/opensmtpd/files/smtpd.socket8++++++++
Amail-mta/opensmtpd/metadata.xml11+++++++++++
Amail-mta/opensmtpd/opensmtpd-6.0.3_p1.ebuild94+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Amail-mta/opensmtpd/opensmtpd-6.4.0_p1.ebuild94+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
8 files changed, 234 insertions(+), 0 deletions(-)

diff --git a/mail-mta/opensmtpd/Manifest b/mail-mta/opensmtpd/Manifest @@ -0,0 +1,2 @@ +DIST opensmtpd-6.0.3p1.tar.gz 699702 BLAKE2B 49f08e8329adc049a562b6ef7efa4c0a39cbcfe8a158cb905cfc726a7302ffe9833ccfb52041340767d55d0f2ae2087e8eac92b7359016c6c76b4d963a334558 SHA512 e579818a0ddbe637deb5a4e40f43eaf797783903ceac18fd89a57581b135b9e407d424e1a70ff7b4b06a0ee50bafb6e8ab2451371917887904b06ff1b55d320f +DIST opensmtpd-6.4.0p1.tar.gz 718638 BLAKE2B 23c1c286a865efcbd16461ec8930f5325a6e164a58ceb7bbe0feb9088bcf615b7fd7e2eb6820bcde161864c476087b39c289c75ea5ca0b18c46710f9723b3dd7 SHA512 c60dbac857925041769104adae33393f526a328767e19bc78d06e45a13b7dd50f3eefdaa3811b8da330c24a670e98da74e18af5ac486266dade6255a6f3b5135 diff --git a/mail-mta/opensmtpd/files/smtpd.initd b/mail-mta/opensmtpd/files/smtpd.initd @@ -0,0 +1,11 @@ +#!/sbin/openrc-run +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +command="smtpd" +pidfile="/run/smtpd.pid" +description="SMTP daemon from OpenBSD" + +depend() { + need net +} diff --git a/mail-mta/opensmtpd/files/smtpd.pam b/mail-mta/opensmtpd/files/smtpd.pam @@ -0,0 +1,4 @@ +auth required pam_nologin.so +auth include system-auth +account include system-auth +session include system-auth diff --git a/mail-mta/opensmtpd/files/smtpd.service b/mail-mta/opensmtpd/files/smtpd.service @@ -0,0 +1,10 @@ +[Unit] +Description=OpenSMTPD +After=network.target + +[Service] +Type=forking +ExecStart=/usr/sbin/smtpd + +[Install] +WantedBy=multi-user.target diff --git a/mail-mta/opensmtpd/files/smtpd.socket b/mail-mta/opensmtpd/files/smtpd.socket @@ -0,0 +1,8 @@ +[Unit] +Description=OpenSMTPD Socket + +[Socket] +ListenStream=/var/run/smtpd.sock + +[Install] +WantedBy=sockets.target diff --git a/mail-mta/opensmtpd/metadata.xml b/mail-mta/opensmtpd/metadata.xml @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<maintainer type="person"> + <email>contact@hacktivis.me</email> + <name>Haelwenn (lanodan) Monnier</name> +</maintainer> +<use> +<flag name="mta">Enable this to install as system-wide MTA</flag> +</use> +</pkgmetadata> diff --git a/mail-mta/opensmtpd/opensmtpd-6.0.3_p1.ebuild b/mail-mta/opensmtpd/opensmtpd-6.0.3_p1.ebuild @@ -0,0 +1,94 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +inherit multilib user flag-o-matic eutils pam toolchain-funcs autotools systemd versionator + +DESCRIPTION="Lightweight but featured SMTP daemon from OpenBSD" +HOMEPAGE="https://www.opensmtpd.org" +MY_P="${P}" +if [ $(get_last_version_component_index) -eq 4 ]; then + MY_P="${PN}-$(get_version_component_range 4-)" +fi +SRC_URI="https://www.opensmtpd.org/archives/${MY_P/_}.tar.gz" + +LICENSE="ISC BSD BSD-1 BSD-2 BSD-4" +SLOT="0" +KEYWORDS="~amd64" +IUSE="libressl pam +mta" + +DEPEND="!libressl? ( dev-libs/openssl:0 ) + libressl? ( dev-libs/libressl ) + sys-libs/zlib + pam? ( virtual/pam ) + 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}/${MY_P/_} + +src_prepare() { + # Use /run instead of /var/run + sed -i -e '/pidfile_path/s:_PATH_VARRUN:"/run/":' openbsd-compat/pidfile.c || die + epatch_user + 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 \ + $(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 +} diff --git a/mail-mta/opensmtpd/opensmtpd-6.4.0_p1.ebuild b/mail-mta/opensmtpd/opensmtpd-6.4.0_p1.ebuild @@ -0,0 +1,94 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +inherit multilib user flag-o-matic eutils pam toolchain-funcs autotools systemd versionator + +DESCRIPTION="Lightweight but featured SMTP daemon from OpenBSD" +HOMEPAGE="https://www.opensmtpd.org" +MY_P="${P}" +if [ $(get_last_version_component_index) -eq 4 ]; then + MY_P="${PN}-$(get_version_component_range 4-)" +fi +SRC_URI="https://www.opensmtpd.org/archives/${MY_P/_}.tar.gz" + +LICENSE="ISC BSD BSD-1 BSD-2 BSD-4" +SLOT="0" +KEYWORDS="" +IUSE="libressl pam +mta" + +DEPEND="!libressl? ( dev-libs/openssl:0 ) + libressl? ( dev-libs/libressl ) + sys-libs/zlib + pam? ( virtual/pam ) + 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}/${MY_P/_} + +src_prepare() { + # Use /run instead of /var/run + sed -i -e '/pidfile_path/s:_PATH_VARRUN:"/run/":' openbsd-compat/pidfile.c || die + epatch_user + 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 \ + $(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 +}