Merge pull request #265641 from vifino/opensmtpd-7.4.0p0

opensmtpd: 6.8.0p2 -> 7.4.0p0
This commit is contained in:
Fabián Heredia Montiel 2023-11-14 21:24:05 -06:00 committed by GitHub
commit 486911d064
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,30 +1,40 @@
{ lib, stdenv, fetchurl, autoconf, automake, libtool, bison { lib
, libasr, libevent, zlib, libressl, db, pam, libxcrypt, nixosTests , stdenv
, fetchurl
, autoreconfHook
, autoconf-archive
, pkgconf
, libtool
, bison
, libasr
, libevent
, zlib
, libressl
, db
, pam
, libxcrypt
, nixosTests
}: }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "opensmtpd"; pname = "opensmtpd";
version = "6.8.0p2"; version = "7.4.0p0";
nativeBuildInputs = [ autoconf automake libtool bison ]; nativeBuildInputs = [ autoreconfHook autoconf-archive pkgconf libtool bison ];
buildInputs = [ libasr libevent zlib libressl db pam libxcrypt ]; buildInputs = [ libevent zlib libressl db pam libxcrypt ];
src = fetchurl { src = fetchurl {
url = "https://www.opensmtpd.org/archives/${pname}-${version}.tar.gz"; url = "https://www.opensmtpd.org/archives/${pname}-${version}.tar.gz";
sha256 = "05sd7bmq29ibnqbl2z53hiyprfxzf0qydfdaixs68rz55wqhbgsi"; hash = "sha256-wYHMw0NKEeWDYZ4AAoUg1Ff+Bi403AO+6jWAeCIM43Q=";
}; };
patches = [ patches = [
./proc_path.diff # TODO: upstream to OpenSMTPD, see https://github.com/NixOS/nixpkgs/issues/54045 ./proc_path.diff # TODO: upstream to OpenSMTPD, see https://github.com/NixOS/nixpkgs/issues/54045
./cross_fix.diff # TODO: remove when https://github.com/OpenSMTPD/OpenSMTPD/pull/1177 will have made it into a release
]; ];
# See https://github.com/OpenSMTPD/OpenSMTPD/issues/885 for the `sh bootstrap`
# requirement
postPatch = '' postPatch = ''
substituteInPlace mk/smtpctl/Makefile.am --replace "chgrp" "true" substituteInPlace mk/smtpctl/Makefile.am --replace "chgrp" "true"
substituteInPlace mk/smtpctl/Makefile.am --replace "chmod 2555" "chmod 0555" substituteInPlace mk/smtpctl/Makefile.am --replace "chmod 2555" "chmod 0555"
sh bootstrap
''; '';
configureFlags = [ configureFlags = [
@ -43,9 +53,6 @@ stdenv.mkDerivation rec {
"--with-table-db" "--with-table-db"
]; ];
# See https://github.com/OpenSMTPD/OpenSMTPD/pull/884
makeFlags = [ "CFLAGS=-ffunction-sections" "LDFLAGS=-Wl,--gc-sections" ];
installFlags = [ installFlags = [
"sysconfdir=\${out}/etc" "sysconfdir=\${out}/etc"
"localstatedir=\${TMPDIR}" "localstatedir=\${TMPDIR}"
@ -59,7 +66,7 @@ stdenv.mkDerivation rec {
''; '';
license = licenses.isc; license = licenses.isc;
platforms = platforms.linux; platforms = platforms.linux;
maintainers = with maintainers; [ obadz ekleog ]; maintainers = with maintainers; [ obadz ekleog vifino ];
}; };
passthru.tests = { passthru.tests = {
basic-functionality-and-dovecot-interaction = nixosTests.opensmtpd; basic-functionality-and-dovecot-interaction = nixosTests.opensmtpd;