summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPacho Ramos <pacho@gentoo.org>2018-04-02 12:16:41 +0200
committerPacho Ramos <pacho@gentoo.org>2018-04-02 12:16:41 +0200
commita7136e6b9a688c12dd808dabae5c873b2a1328cb (patch)
treef79977cb252eb0b4736cf9185da3e5d83fb0ab1c /mail-filter
parentnet-dialup/rp-l2tp: Fix parallel build (#567744 by Felix Janda) (diff)
downloadgentoo-a7136e6b9a688c12dd808dabae5c873b2a1328cb.tar.gz
gentoo-a7136e6b9a688c12dd808dabae5c873b2a1328cb.tar.bz2
gentoo-a7136e6b9a688c12dd808dabae5c873b2a1328cb.zip
mail-filter/libdkim: Fix patch (#568632 by Kai Peter)
Package-Manager: Portage-2.3.27, Repoman-2.3.9
Diffstat (limited to 'mail-filter')
-rw-r--r--mail-filter/libdkim/files/libdkim-1.0.21-gcc6.patch4
-rw-r--r--mail-filter/libdkim/files/libdkim-extra-options-r1.patch87
-rw-r--r--mail-filter/libdkim/files/patches/fix_warnings.patch48
-rw-r--r--mail-filter/libdkim/files/patches/strtok_r.patch4
-rw-r--r--mail-filter/libdkim/libdkim-1.0.21-r4.ebuild53
5 files changed, 168 insertions, 28 deletions
diff --git a/mail-filter/libdkim/files/libdkim-1.0.21-gcc6.patch b/mail-filter/libdkim/files/libdkim-1.0.21-gcc6.patch
index 087e731d02cd..d449ce95e480 100644
--- a/mail-filter/libdkim/files/libdkim-1.0.21-gcc6.patch
+++ b/mail-filter/libdkim/files/libdkim-1.0.21-gcc6.patch
@@ -1,5 +1,5 @@
---- a/src/dkimverify.cpp
-+++ b/src/dkimverify.cpp
+--- src/dkimverify.cpp
++++ src/dkimverify.cpp
@@ -211,14 +211,14 @@
unsigned DecodeBase64(char *ptr)
{
diff --git a/mail-filter/libdkim/files/libdkim-extra-options-r1.patch b/mail-filter/libdkim/files/libdkim-extra-options-r1.patch
new file mode 100644
index 000000000000..abedbaa8a0bc
--- /dev/null
+++ b/mail-filter/libdkim/files/libdkim-extra-options-r1.patch
@@ -0,0 +1,87 @@
+diff -Naur libdkim.orig/src/libdkimtest.cpp libdkim/src/libdkimtest.cpp
+--- src/libdkimtest.cpp 2009-03-13 16:17:45.000000000 -0500
++++ src/libdkimtest.cpp 2009-03-13 16:26:02.000000000 -0500
+@@ -55,8 +55,23 @@
+ return 0;
+ }
+
++void usage()
++{
+
+-
++ printf( "usage: libdkimtest [-b<allman|ietf|both>] [-c<r|s|t|u>] [-d<domain>] [-l] [-h] [-i<you@yourdomain.com>] [-q] [-s] [-t] [-v] [-x<expire time>] [-z<hash>] <msgfile> <privkeyfile> <outfile>\n");
++ printf( "-b<standard> 1=allman, 2=ietf or 3=both\n");
++ printf( "-c<canonicalization> r=relaxed [DEFAULT], s=simple, t=relaxed/simple, u=simple/relaxed\n");
++ printf( "-d<domain> the domain tag, if not provided it will be determined from the sender/from header\n");
++ printf( "-l include body length tag\n");
++ printf( "-h this help\n");
++ printf( "-i<identity> the identity, if not provided it will not be included\n");
++ printf( "-s sign the message\n");
++ printf( "-t include a timestamp tag\n");
++ printf( "-v verify the message\n");
++ printf( "-x<expire_time> the expire time in seconds since epoch ( DEFAULT = current time + 604800)\n\t\t if set to - then it will not be included\n");
++ printf( "-z<hash> 1=sha1, 2=sha256, 3=both\n");
++ printf( "-y<selector> selector tag DEFAULT=default\n");
++}
+ int main(int argc, char* argv[])
+ {
+ int n;
+@@ -77,7 +92,7 @@
+ time(&t);
+
+ opts.nCanon = DKIM_SIGN_RELAXED;
+- opts.nIncludeBodyLengthTag = 1;
++ opts.nIncludeBodyLengthTag = 0;
+ opts.nIncludeQueryMethod = 0;
+ opts.nIncludeTimeStamp = 0;
+ opts.expireTime = t + 604800; // expires in 1 week
+@@ -92,6 +107,11 @@
+ int nArgParseState = 0;
+ bool bSign = true;
+
++ if(argc<2){
++ usage();
++ exit(1);
++ }
++
+ for( n = 1; n < argc; n++ )
+ {
+ if( argv[n][0] == '-' && strlen(argv[n]) > 1 )
+@@ -121,14 +141,16 @@
+ }
+ break;
+
+-
++ case 'd':
++ strncpy(opts.szDomain,(const char*)(argv[n]+2),sizeof(opts.szDomain)-1);
++ break;
+ case 'l': // body length tag
+ opts.nIncludeBodyLengthTag = 1;
+ break;
+
+
+ case 'h':
+- printf( "usage: \n" );
++ usage();
+ return 0;
+
+ case 'i': // identity
+@@ -138,7 +160,7 @@
+ }
+ else
+ {
+- strcpy( opts.szIdentity, argv[n] + 2 );
++ strncpy( opts.szIdentity, argv[n] + 2,sizeof(opts.szIdentity)-1 );
+ }
+ break;
+
+@@ -169,6 +191,9 @@
+ }
+ break;
+
++ case 'y':
++ strncpy( opts.szSelector, argv[n]+2, sizeof(opts.szSelector)-1);
++ break;
+
+ case 'z': // sign w/ sha1, sha256 or both
+ opts.nHash = atoi( &argv[n][2] );
diff --git a/mail-filter/libdkim/files/patches/fix_warnings.patch b/mail-filter/libdkim/files/patches/fix_warnings.patch
index 56ed6ffc8a1d..84704290a60a 100644
--- a/mail-filter/libdkim/files/patches/fix_warnings.patch
+++ b/mail-filter/libdkim/files/patches/fix_warnings.patch
@@ -5,9 +5,9 @@
@DPATCH@
-diff -ru libdkim-1.0.19.orig/src/dkim.cpp libdkim-1.0.19/src/dkim.cpp
---- libdkim-1.0.19.orig/src/dkim.cpp 2008-05-12 20:07:32.000000000 +1000
-+++ libdkim-1.0.19/src/dkim.cpp 2009-04-15 19:38:08.000000000 +1000
+diff -ru src/dkim.cpp src/dkim.cpp
+--- src/dkim.cpp 2008-05-12 20:07:32.000000000 +1000
++++ src/dkim.cpp 2009-04-15 19:38:08.000000000 +1000
@@ -172,7 +172,7 @@
}
@@ -42,9 +42,9 @@ diff -ru libdkim-1.0.19.orig/src/dkim.cpp libdkim-1.0.19/src/dkim.cpp
{
if (ErrorCode >= 0 || ErrorCode <= DKIM_MAX_ERROR)
return "Unknown";
-diff -ru libdkim-1.0.19.orig/src/dkim.h libdkim-1.0.19/src/dkim.h
---- libdkim-1.0.19.orig/src/dkim.h 2009-04-15 19:37:48.000000000 +1000
-+++ libdkim-1.0.19/src/dkim.h 2009-04-15 19:38:08.000000000 +1000
+diff -ru src/dkim.h src/dkim.h
+--- src/dkim.h 2009-04-15 19:37:48.000000000 +1000
++++ src/dkim.h 2009-04-15 19:38:08.000000000 +1000
@@ -155,14 +155,14 @@
void DKIM_CALL DKIMSignFree( DKIMContext* pSignContext );
@@ -63,9 +63,9 @@ diff -ru libdkim-1.0.19.orig/src/dkim.h libdkim-1.0.19/src/dkim.h
#ifdef __cplusplus
}
-diff -ru libdkim-1.0.19.orig/src/dkimbase.cpp libdkim-1.0.19/src/dkimbase.cpp
---- libdkim-1.0.19.orig/src/dkimbase.cpp 2008-05-12 20:07:36.000000000 +1000
-+++ libdkim-1.0.19/src/dkimbase.cpp 2009-04-15 19:49:32.000000000 +1000
+diff -ru src/dkimbase.cpp src/dkimbase.cpp
+--- src/dkimbase.cpp 2008-05-12 20:07:36.000000000 +1000
++++ src/dkimbase.cpp 2009-04-15 19:49:32.000000000 +1000
@@ -118,10 +118,10 @@
// Process - split buffers into lines without any CRs or LFs at the end.
//
@@ -102,9 +102,9 @@ diff -ru libdkim-1.0.19.orig/src/dkimbase.cpp libdkim-1.0.19/src/dkimbase.cpp
{
// no colon?!
}
-diff -ru libdkim-1.0.19.orig/src/dkimbase.h libdkim-1.0.19/src/dkimbase.h
---- libdkim-1.0.19.orig/src/dkimbase.h 2008-05-12 20:07:24.000000000 +1000
-+++ libdkim-1.0.19/src/dkimbase.h 2009-04-15 19:49:32.000000000 +1000
+diff -ru src/dkimbase.h src/dkimbase.h
+--- src/dkimbase.h 2008-05-12 20:07:24.000000000 +1000
++++ src/dkimbase.h 2009-04-15 19:49:32.000000000 +1000
@@ -41,7 +41,7 @@
int Init(void);
@@ -114,9 +114,9 @@ diff -ru libdkim-1.0.19.orig/src/dkimbase.h libdkim-1.0.19/src/dkimbase.h
int ProcessFinal(void);
int Alloc( char*& szBuffer, int nRequiredSize );
-diff -ru libdkim-1.0.19.orig/src/dkimsign.cpp libdkim-1.0.19/src/dkimsign.cpp
---- libdkim-1.0.19.orig/src/dkimsign.cpp 2008-05-12 20:07:46.000000000 +1000
-+++ libdkim-1.0.19/src/dkimsign.cpp 2009-04-15 19:49:32.000000000 +1000
+diff -ru src/dkimsign.cpp src/dkimsign.cpp
+--- src/dkimsign.cpp 2008-05-12 20:07:46.000000000 +1000
++++ src/dkimsign.cpp 2009-04-15 19:49:32.000000000 +1000
@@ -144,7 +144,7 @@
fwrite( szBuffer, 1, nBufLength, fpdebug );
@@ -183,9 +183,9 @@ diff -ru libdkim-1.0.19.orig/src/dkimsign.cpp libdkim-1.0.19/src/dkimsign.cpp
{
OPENSSL_free(sig);
BIO_free_all(b64);
-diff -ru libdkim-1.0.19.orig/src/dkimsign.h libdkim-1.0.19/src/dkimsign.h
---- libdkim-1.0.19.orig/src/dkimsign.h 2008-05-12 20:07:58.000000000 +1000
-+++ libdkim-1.0.19/src/dkimsign.h 2009-04-15 19:49:32.000000000 +1000
+diff -ru src/dkimsign.h src/dkimsign.h
+--- src/dkimsign.h 2008-05-12 20:07:58.000000000 +1000
++++ src/dkimsign.h 2009-04-15 19:49:32.000000000 +1000
@@ -32,7 +32,7 @@
int Init( DKIMSignOptions* pOptions );
@@ -206,9 +206,9 @@ diff -ru libdkim-1.0.19.orig/src/dkimsign.h libdkim-1.0.19/src/dkimsign.h
void AddInterTagSpace( int nSizeOfNextTag );
void AddFoldedValueToSig( const string &sValue, char cbrk );
-diff -ru libdkim-1.0.19.orig/src/dkimverify.cpp libdkim-1.0.19/src/dkimverify.cpp
---- libdkim-1.0.19.orig/src/dkimverify.cpp 2009-04-15 19:37:48.000000000 +1000
-+++ libdkim-1.0.19/src/dkimverify.cpp 2009-04-15 19:49:32.000000000 +1000
+diff -ru src/dkimverify.cpp src/dkimverify.cpp
+--- src/dkimverify.cpp 2009-04-15 19:37:48.000000000 +1000
++++ src/dkimverify.cpp 2009-04-15 19:49:32.000000000 +1000
@@ -440,7 +440,7 @@
{
ProcessFinal();
@@ -275,9 +275,9 @@ diff -ru libdkim-1.0.19.orig/src/dkimverify.cpp libdkim-1.0.19/src/dkimverify.cp
{
if (values[j] != NULL && values[j] < values[0])
{
-diff -ru libdkim-1.0.19.orig/src/libdkimtest.cpp libdkim-1.0.19/src/libdkimtest.cpp
---- libdkim-1.0.19.orig/src/libdkimtest.cpp 2008-05-12 20:08:54.000000000 +1000
-+++ libdkim-1.0.19/src/libdkimtest.cpp 2009-04-15 19:38:08.000000000 +1000
+diff -ru src/libdkimtest.cpp src/libdkimtest.cpp
+--- src/libdkimtest.cpp 2008-05-12 20:08:54.000000000 +1000
++++ src/libdkimtest.cpp 2009-04-15 19:38:08.000000000 +1000
@@ -60,9 +60,9 @@
int main(int argc, char* argv[])
{
diff --git a/mail-filter/libdkim/files/patches/strtok_r.patch b/mail-filter/libdkim/files/patches/strtok_r.patch
index b3b4999aaf5f..13acc585a075 100644
--- a/mail-filter/libdkim/files/patches/strtok_r.patch
+++ b/mail-filter/libdkim/files/patches/strtok_r.patch
@@ -6,8 +6,8 @@
@DPATCH@
diff -ru libdkim-1.0.19/src/dkimverify.cpp libdkim-1.0.19-new/src/dkimverify.cpp
---- libdkim-1.0.19/src/dkimverify.cpp 2008-05-12 20:08:06.000000000 +1000
-+++ libdkim-1.0.19-new/src/dkimverify.cpp 2009-06-11 18:28:10.000000000 +1000
+--- src/dkimverify.cpp 2008-05-12 20:08:06.000000000 +1000
++++ src/dkimverify.cpp 2009-06-11 18:28:10.000000000 +1000
@@ -855,6 +855,9 @@
////////////////////////////////////////////////////////////////////////////////
int CDKIMVerify::ParseDKIMSignature( const string& sHeader, SignatureInfo &sig )
diff --git a/mail-filter/libdkim/libdkim-1.0.21-r4.ebuild b/mail-filter/libdkim/libdkim-1.0.21-r4.ebuild
new file mode 100644
index 000000000000..9c1009fae2ba
--- /dev/null
+++ b/mail-filter/libdkim/libdkim-1.0.21-r4.ebuild
@@ -0,0 +1,53 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit autotools toolchain-funcs vcs-clean
+
+DESCRIPTION="DomainKeys Identified Mail library from Alt-N Inc"
+HOMEPAGE="http://libdkim.sourceforge.net"
+SRC_URI="mirror://sourceforge/${PN}/${P}.zip"
+
+LICENSE="Apache-2.0 yahoo-patent-license-1.2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="libressl static-libs"
+
+RDEPEND="
+ !libressl? ( dev-libs/openssl:0= )
+ libressl? ( dev-libs/libressl:0= )
+ !mail-filter/libdkim-exim
+"
+DEPEND="${RDEPEND}
+ app-arch/unzip
+"
+
+S="${WORKDIR}/${PN}/src"
+
+src_prepare() {
+ default
+
+ ecvs_clean
+ cp "${FILESDIR}"/debianize/* "${S}" || die
+ eapply "${FILESDIR}"/patches/*.patch
+ eapply "${FILESDIR}"/libdkim-extra-options-r1.patch
+ eapply "${FILESDIR}"/${P}-gcc6.patch
+
+ # Bug 476772
+ if ! use static-libs; then
+ sed -i \
+ -e '/^TARGETS/s/libdkim.a//' \
+ -e '/install -m 644 libdkim.a/d' \
+ Makefile.in || die 'sed on Makefile.in failed'
+ fi
+
+ # Bug 476770
+ tc-export AR
+
+ eautoreconf
+}
+
+src_install() {
+ default
+ dodoc ../README
+}