Added patch for dietlibc.

Added patched version of mail-filter/libspf2.
This commit is contained in:
László Valkó 2017-04-24 00:25:01 +02:00
parent bb76d85794
commit ea3065f490
8 changed files with 154 additions and 6 deletions

View file

@ -1,4 +1,4 @@
AUX dietlibc_makefile_uname.patch 528 SHA256 f029f7256e0f1d0c8900a7da6b47dcdf281ca13c7337f1cc8e856471d2de7b46 SHA512 25a5bb2aad451542936f1f8189a4378e1debeb6b38489c5c246246a12c5317f620f86ed5396264a20d178d50703a9454968fa529980c3324d7741e75da9baf31 WHIRLPOOL bb1d5cfdc258a395d0b9034b61b46ba9c33b59325a8351a376a1dc941649926c79aa6cd9af3cbdf3ea7613d12c816d0446b7f19e053ff46896032d6e2fead657
AUX dietlibc-0.34-makefile-uname.patch 528 SHA256 f029f7256e0f1d0c8900a7da6b47dcdf281ca13c7337f1cc8e856471d2de7b46 SHA512 25a5bb2aad451542936f1f8189a4378e1debeb6b38489c5c246246a12c5317f620f86ed5396264a20d178d50703a9454968fa529980c3324d7741e75da9baf31 WHIRLPOOL bb1d5cfdc258a395d0b9034b61b46ba9c33b59325a8351a376a1dc941649926c79aa6cd9af3cbdf3ea7613d12c816d0446b7f19e053ff46896032d6e2fead657
DIST dietlibc-0.34_pre20140729.tar.bz2 670195 SHA256 d6693610c756dbfc070c0ffed5a75e1ddab8d119394962ca1ed4d42f34b57318 SHA512 a0bb5465f7fc985fd074dfcc4039003ec26b6b5fde5f2ccc53322067bd1a6459e742c9debeffda0b5146e287baa8e49f74f4a8ffafdf1daacacec4768d13db36 WHIRLPOOL 566e505a65e3f81c5507fc494324b4f48e5af27683d69c443cf7d2380599a24bbc984d7d430acb25bc0d28baa924565ee513c8217dd2eb6a960c70d6d2a7e1b7
EBUILD dietlibc-0.34_pre20140729.ebuild 1641 SHA256 245cd4b7eb0d465fe09c0f0fe35873b271d4be7bb7412d453f57369a0e305467 SHA512 8384efcf28b715ab6da6a2765b723a39a955e4d258bd477c7e6b3eef638ff4d65235f9c2142364618cd890980cf7e83ca7c8c9614886f6f9a6e9d9bcfd9abdc4 WHIRLPOOL 67e154c09c59af7ded47d8c30d610db8823498efcf20fa899e6c766eb1082da5559b4d459dc7c21f0623463b013c3f5f78f51f5519ec93ee54888f32464c5805
EBUILD dietlibc-0.34_pre20140729.ebuild 1638 SHA256 025112c6905d48c0449cecb44764c93feab7433b69e1c126bbb3a53f82a1a689 SHA512 b4b10179f2c57248ac08471f4ab467f1bd39f185bf217f808da97c354c775ad703eb5754db45d157b08f71c7537d4d7de20f4dbf85f15592ff5f69b3e84741b7 WHIRLPOOL 79cc10342388266e6ea848f1d45c0e54842fa55a3b2d4108865bb7c7f4032c4972edc860c70779488d6b85562f3fb70ff3299967fdfba87f56c9314e922c771c
MISC metadata.xml 416 SHA256 d95b607d6ec29573cd92ab2edf016985e1bb9894b5e619870e63fa2c77056b16 SHA512 7d39c127ffecbfc46fc6987189f2d28e92b35effbd71d4aadc465ac5fe1e47d088574700b26bb0bc27f1fd17b3487de85317f34a87393597f99b38a9be3c0c0d WHIRLPOOL da62dae0ece9c8392b2756c64e474b568e65aa8924d0178cd7ea166c31bdd84b7595296029a0bb526762a5d23e9302730f88368f2bec3019f82615c4720c3ca7

View file

@ -20,11 +20,9 @@ DIETHOME=/usr/diet
S=${WORKDIR}/dietlibc
PATCHES=(
"${FILESDIR}"/dietlibc_makefile_uname.patch
)
src_prepare() {
epatch "${FILESDIR}/${PN}-0.34-makefile-uname.patch"
# Replace sparc64 related C[XX]FLAGS (see bug #45716)
use sparc && replace-sparc64-flags

View file

@ -0,0 +1,5 @@
AUX libspf2-1.2.10-varargs.patch 1385 SHA256 1396d155665f52748cfc7e06e01a92cc98c65193f36e807b8b1de4fb31d4caec SHA512 886a347c6526c4e81bc035d7e0069f72aaa5ad2103f0e035e46dbd7e1e5f328ebbbc81842fd32397d195a5b18cf841784455a4142291276c1be8942a1c753b4d WHIRLPOOL eb897431cf595de05f00aa784bddd226ec712c99759b8e62dc03485f3fb12d4ed64c107b7e4d1d4d4aa7afdb4242f92173d53e67e708dbc3a52fc29205853176
AUX libspf2-1.2.9-ipv6.patch 1796 SHA256 0c879a8d0daa40083f8cf757c674e5a7ddab38f727f33807e750beca52b1066f SHA512 d79187ba3bdf6f093600f5ad9a530e17791689e141861b09486ee4a54a9c54d9c100c19ab45839c28aa8535fb6af9b2bbcac937a2b4b2519feaff52d51515ded WHIRLPOOL e332c5fc47e2e1fbf0e4891d50e142c615ab7b574ac032b62d4f7c8294ada7a6c3a0744decb4d912d700beaf55ecf560b4bccac5670acf7847f209570bd428f5
DIST libspf2-1.2.10.tar.gz 508842 SHA256 d91e3de81ae287a2976c44f60283bd3000d720e6a112dc7142eedf1831b821c9 SHA512 162ce382628c6fcadac3e11f5a12442db622bb23f7ec503e16f5ba7fc88afdd777bce6b093c12a58210355985fd11b74b140f08fab347334d82d953dd183b130 WHIRLPOOL 0bc14a6c3e6ddf431cc98ed4b9dbd4e2ca381f6e408c8ea57d9a74d55a6079731d42644f6e60a3138996a9728137721cfb438463b36c18e89c7c381f9ed18e69
EBUILD libspf2-1.2.10.ebuild 1228 SHA256 6a81d618d27b3a07fa43b0557a83b847d68075eb13c7534b4b556e3b557990c7 SHA512 1e761d185ed2d0076e30358e68ae66f9e7a8ef38c7e0b30f7bec6b0f26ebca740bbd62157fad60c7c23672171319657093a82df1216ec852338332824b9146dd WHIRLPOOL 76ac0019d7bf6f6972b5af0b13f203077c2b794488c2655ff871b1f6854ef354de4106254865ae302996a315a0de93c8c521f0fca7af5d0a4dcc3d83022b8e19
MISC metadata.xml 662 SHA256 2b86ae94fcec53501c78b4a05d2228519c67f71fbf70bc932c63bec95d7470bc SHA512 255a23e45243c57a00be6d18c487a0574c92b16110d31352f83529bbb7fa5386354a4e5b7f5a3575596fa7cb701ddfb4408077393576e60537b6b70c9bda89a3 WHIRLPOOL 92d8087cee04de48152fb94754d677a14f13cd40a3977de90f16fb4dbbf63735a98b3e796daa739f81fc8a9aeed180555f11e0cff4499fd17d6284976ef44b4e

View file

@ -0,0 +1,29 @@
From 5852828582f556e73751076ad092f72acf7fc8b6 Mon Sep 17 00:00:00 2001
From: Shevek <shevek@anarres.org>
Date: Tue, 23 Sep 2014 01:03:00 -0700
Subject: [PATCH] Fix #4: Use gcc trick for variadic macros. Does this break
anyone else?
---
src/include/spf_log.h | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/include/spf_log.h b/src/include/spf_log.h
index 0d2adeb..9b09714 100644
--- a/src/include/spf_log.h
+++ b/src/include/spf_log.h
@@ -60,10 +60,10 @@ void SPF_debugv( const char *file, int line, const char *format, va_list ap ) __
#if defined( __STDC_VERSION__ ) && __STDC_VERSION__ >= 199901L
-#define SPF_errorf(format, ... ) SPF_errorx( __FILE__, __LINE__, format, __VA_ARGS__ )
-#define SPF_warningf(format, ... ) SPF_warningx( __FILE__, __LINE__, format, __VA_ARGS__ )
-#define SPF_infof(format, ... ) SPF_infox( __FILE__, __LINE__, format, __VA_ARGS__ )
-#define SPF_debugf(format, ... ) SPF_debugx( __FILE__, __LINE__, format, __VA_ARGS__ )
+#define SPF_errorf(format, ... ) SPF_errorx( __FILE__, __LINE__, format, ##__VA_ARGS__ )
+#define SPF_warningf(format, ... ) SPF_warningx( __FILE__, __LINE__, format, ##__VA_ARGS__ )
+#define SPF_infof(format, ... ) SPF_infox( __FILE__, __LINE__, format, ##__VA_ARGS__ )
+#define SPF_debugf(format, ... ) SPF_debugx( __FILE__, __LINE__, format, ##__VA_ARGS__ )
#elif defined( __GNUC__ )

View file

@ -0,0 +1,61 @@
$NetBSD: patch-aa,v 1.1 2009/09/08 10:36:27 tron Exp $
Fix an abort() caused by miscalculating the size of an internal buffer.
This can crash applications using "libspf2" (e.g. "milter-greylist")
in an e-mail gets delivered via SMTP over IPv6 depending on the
remote machine's IPv6 address.
--- src/libspf2/spf_expand.c.orig 2008-11-03 21:29:00.000000000 +0000
+++ src/libspf2/spf_expand.c 2009-09-08 11:27:52.000000000 +0100
@@ -245,7 +245,7 @@
case PARM_CLIENT_IP: /* SMTP client IP */
#ifdef COMPUTE
if (compute_length) {
- len = sizeof(ip6_buf);
+ len = sizeof(ip6_rbuf);
if (d->dv.url_encode)
len *= 3;
buflen += len;
http://www.gossamer-threads.com/lists/spf/devel/35098
--- src/libspf2/spf_compile.c 2008-11-03 15:37:33.000000000 -0500
+++ src/libspf2/spf_compile.c 2009-09-07 23:46:02.000000000 -0400
@@ -778,7 +778,7 @@
const char *end;
const char *p;
- char buf[ INET_ADDRSTRLEN ];
+ char buf[ INET6_ADDRSTRLEN ];
size_t len;
int err;
--- src/libspf2/spf_interpret.c 2008-10-22 11:47:43.000000000 -0400
+++ src/libspf2/spf_interpret.c 2009-09-08 00:42:25.000000000 -0400
@@ -505,7 +505,7 @@
char dst_ip6_buf[ INET6_ADDRSTRLEN ];
struct in6_addr src_ipv6;
- int cidr, mask;
+ int cidr, cidr_save, mask;
int i;
int match;
@@ -517,6 +517,7 @@
cidr = SPF_i_mech_cidr(spf_request, mech);
if ( cidr == 0 )
cidr = 128;
+ cidr_save = cidr;
match = TRUE;
for( i = 0; i < array_elem( ipv6.s6_addr ) && match; i++ )
@@ -538,7 +539,7 @@
INET_NTOP(AF_INET6, &ipv6.s6_addr,
dst_ip6_buf, sizeof(dst_ip6_buf));
SPF_debugf( "ip_match: %s == %s (/%d): %d",
- src_ip6_buf, dst_ip6_buf, cidr, match );
+ src_ip6_buf, dst_ip6_buf, cidr_save, match );
}
return match;

View file

@ -0,0 +1,46 @@
# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=5
inherit autotools
DESCRIPTION="libspf2 implements the Sender Policy Framework, a part of the SPF/SRS protocol pair"
HOMEPAGE="http://www.libspf2.org"
SRC_URI="http://www.libspf2.org/spf/libspf2-${PV}.tar.gz"
LICENSE="|| ( LGPL-2.1 BSD-2 )"
SLOT="0"
KEYWORDS="alpha amd64 ~arm hppa ia64 ppc ppc64 sparc x86 ~x86-fbsd"
IUSE="static static-libs"
DEPEND=""
RDEPEND="!dev-perl/Mail-SPF-Query"
REQUIRED_USE="static? ( static-libs )"
src_prepare() {
epatch "${FILESDIR}/${PN}-1.2.10-varargs.patch"
if ! use static; then
sed -i -e '/bin_PROGRAMS/s/spfquery_static//' src/spfquery/Makefile.am \
-e '/bin_PROGRAMS/s/spftest_static//' src/spftest/Makefile.am \
-e '/bin_PROGRAMS/s/spfd_static//' src/spfd/Makefile.am \
-e '/bin_PROGRAMS/s/spf_example_static//' src/spf_example/Makefile.am \
|| die
#eautoreconf
fi
sed -i 's/AM_CONFIG_HEADER/AC_CONFIG_HEADERS/' configure.ac || die
eautoreconf
}
src_configure() {
econf \
$(use_enable static-libs static)
}
src_install() {
emake DESTDIR="${D}" install
dodoc README TODO INSTALL
use static-libs || rm -f "${D}"/usr/lib*/libspf2.la
}

View file

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="project">
<email>net-mail@gentoo.org</email>
<name>Net-Mail</name>
</maintainer>
<longdescription>libspf2 implements the Sender Policy Framework, a part of the SPF/SRS protocol pair. libspf2 is a library which allows email systems such as Sendmail, Postfix, Exim, Zmailer and MS Exchange to check SPF records and make sure that the email is authorized by the domain name that it is coming from. This prevents email forgery, commonly used by spammers, scammers and email viruses/worms.</longdescription>
</pkgmetadata>