added my Recipes
This commit is contained in:
@@ -0,0 +1,105 @@
|
||||
From c512c877a7ca933bee980dcc1268a7319f233d59 Mon Sep 17 00:00:00 2001
|
||||
From: Khem Raj <raj.khem@gmail.com>
|
||||
Date: Fri, 2 Sep 2022 00:07:47 -0700
|
||||
Subject: [PATCH] Define prototype for safe_flock
|
||||
|
||||
Upstream-Status: Pending
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
---
|
||||
src/osdep/unix/env_unix.c | 3 +++
|
||||
src/osdep/unix/mbx.c | 2 ++
|
||||
src/osdep/unix/os_lnx.h | 2 ++
|
||||
src/osdep/unix/os_slx.h | 3 +++
|
||||
src/osdep/unix/unix.c | 4 ++++
|
||||
5 files changed, 14 insertions(+)
|
||||
|
||||
diff --git a/src/osdep/unix/env_unix.c b/src/osdep/unix/env_unix.c
|
||||
index 6b2c447..cefefca 100644
|
||||
--- a/src/osdep/unix/env_unix.c
|
||||
+++ b/src/osdep/unix/env_unix.c
|
||||
@@ -59,6 +59,9 @@
|
||||
#define S_IXOTH (S_IEXEC >> 6)
|
||||
#endif
|
||||
|
||||
+
|
||||
+extern int safe_flock (int fd,int op);
|
||||
+
|
||||
/* c-client environment parameters */
|
||||
|
||||
static char *myUserName = NIL; /* user name */
|
||||
diff --git a/src/osdep/unix/mbx.c b/src/osdep/unix/mbx.c
|
||||
index 1ece5d8..c8a45a5 100644
|
||||
--- a/src/osdep/unix/mbx.c
|
||||
+++ b/src/osdep/unix/mbx.c
|
||||
@@ -41,12 +41,14 @@ extern int errno; /* just in case */
|
||||
#include "mail.h"
|
||||
#include "osdep.h"
|
||||
#include <pwd.h>
|
||||
+#include <utime.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/time.h>
|
||||
#include "misc.h"
|
||||
#include "dummy.h"
|
||||
#include "fdstring.h"
|
||||
|
||||
+extern int safe_flock (int fd,int op);
|
||||
|
||||
/* Build parameters */
|
||||
|
||||
diff --git a/src/osdep/unix/os_lnx.h b/src/osdep/unix/os_lnx.h
|
||||
index b5f39ff..22c216b 100644
|
||||
--- a/src/osdep/unix/os_lnx.h
|
||||
+++ b/src/osdep/unix/os_lnx.h
|
||||
@@ -57,6 +57,8 @@
|
||||
|
||||
#define direct dirent
|
||||
|
||||
+extern int safe_flock (int fd,int op);
|
||||
+
|
||||
#define flock safe_flock
|
||||
|
||||
|
||||
diff --git a/src/osdep/unix/os_slx.h b/src/osdep/unix/os_slx.h
|
||||
index b5f39ff..c9adbcd 100644
|
||||
--- a/src/osdep/unix/os_slx.h
|
||||
+++ b/src/osdep/unix/os_slx.h
|
||||
@@ -46,11 +46,14 @@
|
||||
#include <sys/types.h>
|
||||
#include <dirent.h>
|
||||
#include <time.h> /* for struct tm */
|
||||
+#include <utime.h> /* for struct tm */
|
||||
#include <fcntl.h>
|
||||
#include <syslog.h>
|
||||
#include <sys/file.h>
|
||||
|
||||
|
||||
+extern int safe_flock (int fd,int op);
|
||||
+
|
||||
/* Linux gets this wrong */
|
||||
|
||||
#define setpgrp setpgid
|
||||
diff --git a/src/osdep/unix/unix.c b/src/osdep/unix/unix.c
|
||||
index be3c437..86be3f9 100644
|
||||
--- a/src/osdep/unix/unix.c
|
||||
+++ b/src/osdep/unix/unix.c
|
||||
@@ -45,6 +45,7 @@ extern int errno; /* just in case */
|
||||
#include "mail.h"
|
||||
#include "osdep.h"
|
||||
#include <time.h>
|
||||
+#include <utime.h>
|
||||
#include <sys/stat.h>
|
||||
#include "unix.h"
|
||||
#include "pseudo.h"
|
||||
@@ -52,6 +53,9 @@ extern int errno; /* just in case */
|
||||
#include "misc.h"
|
||||
#include "dummy.h"
|
||||
|
||||
+
|
||||
+extern int safe_flock (int fd,int op);
|
||||
+
|
||||
/* UNIX I/O stream local data */
|
||||
|
||||
typedef struct unix_local {
|
||||
--
|
||||
2.37.3
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
From f92becaf97be16a28013693cd99bac92c54074f2 Mon Sep 17 00:00:00 2001
|
||||
From: Khem Raj <raj.khem@gmail.com>
|
||||
Date: Wed, 7 Sep 2022 13:54:58 -0700
|
||||
Subject: [PATCH 1/2] Do not build mtest
|
||||
|
||||
its a test utility which is not generally used. We need to disable it
|
||||
because it uses gets() function which is not available in glibc, if we
|
||||
want to use it then port it to use something like fgets
|
||||
|
||||
Upstream-Status: Pending
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
---
|
||||
Makefile | 2 --
|
||||
1 file changed, 2 deletions(-)
|
||||
|
||||
diff --git a/Makefile b/Makefile
|
||||
index cf6d405..1e2d0fb 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -669,7 +669,6 @@ an ua:
|
||||
$(TOOLS)/$@ "$(LN)" src/ansilib c-client
|
||||
$(TOOLS)/$@ "$(LN)" src/charset c-client
|
||||
$(TOOLS)/$@ "$(LN)" src/osdep/$(SYSTEM) c-client
|
||||
- $(TOOLS)/$@ "$(LN)" src/mtest mtest
|
||||
$(TOOLS)/$@ "$(LN)" src/ipopd ipopd
|
||||
$(TOOLS)/$@ "$(LN)" src/imapd imapd
|
||||
$(TOOLS)/$@ "$(LN)" src/mailutil mailutil
|
||||
@@ -706,7 +705,6 @@ rebuildclean:
|
||||
|
||||
bundled:
|
||||
@echo Building bundled tools...
|
||||
- $(CD) mtest;$(MAKE)
|
||||
$(CD) ipopd;$(MAKE)
|
||||
$(CD) imapd;$(MAKE)
|
||||
$(CD) mailutil;$(MAKE)
|
||||
--
|
||||
2.37.3
|
||||
|
||||
@@ -0,0 +1,178 @@
|
||||
From 3170b245aba99694390c3c87d326639b6685d4dd Mon Sep 17 00:00:00 2001
|
||||
From: Khem Raj <raj.khem@gmail.com>
|
||||
Date: Thu, 19 Jan 2023 14:34:05 -0800
|
||||
Subject: [PATCH] Fix -Wincompatible-function-pointer-types
|
||||
|
||||
Fixes new found errors with clang 16
|
||||
|
||||
news.c:370:36: error: incompatible function pointer types passing 'int (struct dirent *)' to parameter of type 'int (*)(const struct dirent *)' [-Wincompatible-function-pointer-types]
|
||||
if ((nmsgs = scandir (tmp,&names,news_select,news_numsort)) >= 0) {
|
||||
^~~~~~~~~~~
|
||||
/mnt/b/yoe/master/build/tmp/work/riscv64-yoe-linux/uw-imap/2007f-r0/recipe-sysroot/usr/include/dirent.h:259:13: note: passing argument to parameter '__selector' here
|
||||
int (*__selector) (const struct dirent *),
|
||||
^
|
||||
news.c:370:48: error: incompatible function pointer types passing 'int (const void *, const void *)' to parameter of type 'int (*)(const struct dirent **, const struct dirent **)' [-Wincompatible-function-pointer-types]
|
||||
|
||||
Upstream-Status: Pending
|
||||
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
---
|
||||
src/osdep/unix/mh.c | 8 ++++----
|
||||
src/osdep/unix/mix.c | 12 ++++++------
|
||||
src/osdep/unix/mx.c | 8 ++++----
|
||||
src/osdep/unix/news.c | 8 ++++----
|
||||
4 files changed, 18 insertions(+), 18 deletions(-)
|
||||
|
||||
diff --git a/src/osdep/unix/mh.c b/src/osdep/unix/mh.c
|
||||
index 0226b7a..9264624 100644
|
||||
--- a/src/osdep/unix/mh.c
|
||||
+++ b/src/osdep/unix/mh.c
|
||||
@@ -103,8 +103,8 @@ long mh_copy (MAILSTREAM *stream,char *sequence,char *mailbox,
|
||||
long options);
|
||||
long mh_append (MAILSTREAM *stream,char *mailbox,append_t af,void *data);
|
||||
|
||||
-int mh_select (struct direct *name);
|
||||
-int mh_numsort (const void *d1,const void *d2);
|
||||
+int mh_select (const struct direct *name);
|
||||
+int mh_numsort (const struct dirent **d1,const struct dirent **d2);
|
||||
char *mh_file (char *dst,char *name);
|
||||
long mh_canonicalize (char *pattern,char *ref,char *pat);
|
||||
void mh_setdate (char *file,MESSAGECACHE *elt);
|
||||
@@ -1194,7 +1194,7 @@ long mh_append (MAILSTREAM *stream,char *mailbox,append_t af,void *data)
|
||||
* Returns: T to use file name, NIL to skip it
|
||||
*/
|
||||
|
||||
-int mh_select (struct direct *name)
|
||||
+int mh_select (const struct direct *name)
|
||||
{
|
||||
char c;
|
||||
char *s = name->d_name;
|
||||
@@ -1209,7 +1209,7 @@ int mh_select (struct direct *name)
|
||||
* Returns: negative if d1 < d2, 0 if d1 == d2, postive if d1 > d2
|
||||
*/
|
||||
|
||||
-int mh_numsort (const void *d1,const void *d2)
|
||||
+int mh_numsort (const struct dirent **d1,const struct dirent **d2)
|
||||
{
|
||||
return atoi ((*(struct direct **) d1)->d_name) -
|
||||
atoi ((*(struct direct **) d2)->d_name);
|
||||
diff --git a/src/osdep/unix/mix.c b/src/osdep/unix/mix.c
|
||||
index fbf4a02..c2207f6 100644
|
||||
--- a/src/osdep/unix/mix.c
|
||||
+++ b/src/osdep/unix/mix.c
|
||||
@@ -125,7 +125,7 @@ long mix_unsubscribe (MAILSTREAM *stream,char *mailbox);
|
||||
long mix_create (MAILSTREAM *stream,char *mailbox);
|
||||
long mix_delete (MAILSTREAM *stream,char *mailbox);
|
||||
long mix_rename (MAILSTREAM *stream,char *old,char *newname);
|
||||
-int mix_rselect (struct direct *name);
|
||||
+int mix_rselect (const struct direct *name);
|
||||
MAILSTREAM *mix_open (MAILSTREAM *stream);
|
||||
void mix_close (MAILSTREAM *stream,long options);
|
||||
void mix_abort (MAILSTREAM *stream);
|
||||
@@ -140,8 +140,8 @@ THREADNODE *mix_thread (MAILSTREAM *stream,char *type,char *charset,
|
||||
long mix_ping (MAILSTREAM *stream);
|
||||
void mix_check (MAILSTREAM *stream);
|
||||
long mix_expunge (MAILSTREAM *stream,char *sequence,long options);
|
||||
-int mix_select (struct direct *name);
|
||||
-int mix_msgfsort (const void *d1,const void *d2);
|
||||
+int mix_select (const struct direct *name);
|
||||
+int mix_msgfsort (const struct dirent **d1,const struct dirent **d2);
|
||||
long mix_addset (SEARCHSET **set,unsigned long start,unsigned long size);
|
||||
long mix_burp (MAILSTREAM *stream,MIXBURP *burp,unsigned long *reclaimed);
|
||||
long mix_burp_check (SEARCHSET *set,size_t size,char *file);
|
||||
@@ -587,7 +587,7 @@ long mix_rename (MAILSTREAM *stream,char *old,char *newname)
|
||||
* Returns: T if mix file name, NIL otherwise
|
||||
*/
|
||||
|
||||
-int mix_rselect (struct direct *name)
|
||||
+int mix_rselect (const struct direct *name)
|
||||
{
|
||||
return mix_dirfmttest (name->d_name);
|
||||
}
|
||||
@@ -1146,7 +1146,7 @@ long mix_expunge (MAILSTREAM *stream,char *sequence,long options)
|
||||
* ".mix" with no suffix was used by experimental versions
|
||||
*/
|
||||
|
||||
-int mix_select (struct direct *name)
|
||||
+int mix_select (const struct direct *name)
|
||||
{
|
||||
char c,*s;
|
||||
/* make sure name has prefix */
|
||||
@@ -1165,7 +1165,7 @@ int mix_select (struct direct *name)
|
||||
* Returns: -1 if d1 < d2, 0 if d1 == d2, 1 d1 > d2
|
||||
*/
|
||||
|
||||
-int mix_msgfsort (const void *d1,const void *d2)
|
||||
+int mix_msgfsort (const struct dirent **d1,const struct dirent **d2)
|
||||
{
|
||||
char *n1 = (*(struct direct **) d1)->d_name + sizeof (MIXNAME) - 1;
|
||||
char *n2 = (*(struct direct **) d2)->d_name + sizeof (MIXNAME) - 1;
|
||||
diff --git a/src/osdep/unix/mx.c b/src/osdep/unix/mx.c
|
||||
index 4549527..b5c5adf 100644
|
||||
--- a/src/osdep/unix/mx.c
|
||||
+++ b/src/osdep/unix/mx.c
|
||||
@@ -98,8 +98,8 @@ long mx_append (MAILSTREAM *stream,char *mailbox,append_t af,void *data);
|
||||
long mx_append_msg (MAILSTREAM *stream,char *flags,MESSAGECACHE *elt,
|
||||
STRING *st,SEARCHSET *set);
|
||||
|
||||
-int mx_select (struct direct *name);
|
||||
-int mx_numsort (const void *d1,const void *d2);
|
||||
+int mx_select (const struct direct *name);
|
||||
+int mx_numsort (const struct dirent **d1,const struct dirent **d2);
|
||||
char *mx_file (char *dst,char *name);
|
||||
long mx_lockindex (MAILSTREAM *stream);
|
||||
void mx_unlockindex (MAILSTREAM *stream);
|
||||
@@ -1110,7 +1110,7 @@ long mx_append_msg (MAILSTREAM *stream,char *flags,MESSAGECACHE *elt,
|
||||
* Returns: T to use file name, NIL to skip it
|
||||
*/
|
||||
|
||||
-int mx_select (struct direct *name)
|
||||
+int mx_select (const struct direct *name)
|
||||
{
|
||||
char c;
|
||||
char *s = name->d_name;
|
||||
@@ -1125,7 +1125,7 @@ int mx_select (struct direct *name)
|
||||
* Returns: negative if d1 < d2, 0 if d1 == d2, postive if d1 > d2
|
||||
*/
|
||||
|
||||
-int mx_numsort (const void *d1,const void *d2)
|
||||
+int mx_numsort (const struct dirent **d1,const struct dirent **d2)
|
||||
{
|
||||
return atoi ((*(struct direct **) d1)->d_name) -
|
||||
atoi ((*(struct direct **) d2)->d_name);
|
||||
diff --git a/src/osdep/unix/news.c b/src/osdep/unix/news.c
|
||||
index 4cf5bb7..3da5207 100644
|
||||
--- a/src/osdep/unix/news.c
|
||||
+++ b/src/osdep/unix/news.c
|
||||
@@ -76,8 +76,8 @@ long news_create (MAILSTREAM *stream,char *mailbox);
|
||||
long news_delete (MAILSTREAM *stream,char *mailbox);
|
||||
long news_rename (MAILSTREAM *stream,char *old,char *newname);
|
||||
MAILSTREAM *news_open (MAILSTREAM *stream);
|
||||
-int news_select (struct direct *name);
|
||||
-int news_numsort (const void *d1,const void *d2);
|
||||
+int news_select (const struct direct *name);
|
||||
+int news_numsort (const struct dirent ** d1,const struct dirent ** d2);
|
||||
void news_close (MAILSTREAM *stream,long options);
|
||||
void news_fast (MAILSTREAM *stream,char *sequence,long flags);
|
||||
void news_flags (MAILSTREAM *stream,char *sequence,long flags);
|
||||
@@ -402,7 +402,7 @@ MAILSTREAM *news_open (MAILSTREAM *stream)
|
||||
* Returns: T to use file name, NIL to skip it
|
||||
*/
|
||||
|
||||
-int news_select (struct direct *name)
|
||||
+int news_select (const struct direct *name)
|
||||
{
|
||||
char c;
|
||||
char *s = name->d_name;
|
||||
@@ -417,7 +417,7 @@ int news_select (struct direct *name)
|
||||
* Returns: negative if d1 < d2, 0 if d1 == d2, postive if d1 > d2
|
||||
*/
|
||||
|
||||
-int news_numsort (const void *d1,const void *d2)
|
||||
+int news_numsort (const struct dirent ** d1,const struct dirent ** d2)
|
||||
{
|
||||
return atoi ((*(struct direct **) d1)->d_name) -
|
||||
atoi ((*(struct direct **) d2)->d_name);
|
||||
--
|
||||
2.39.1
|
||||
|
||||
@@ -0,0 +1,71 @@
|
||||
From 4c684542816a08b95444b8e2515f24d084e6e3c3 Mon Sep 17 00:00:00 2001
|
||||
From: Khem Raj <raj.khem@gmail.com>
|
||||
Date: Tue, 4 Sep 2018 22:05:17 -0700
|
||||
Subject: [PATCH] Support OpenSSL 1.1
|
||||
|
||||
When building with OpenSSL 1.1 and newer, use the new built-in
|
||||
hostname verification instead of code that doesn't compile due to
|
||||
structs having been made opaque.
|
||||
Bug-Debian: https://bugs.debian.org/828589
|
||||
|
||||
Upstream-Status: Pending [Unknown]
|
||||
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
---
|
||||
src/osdep/unix/ssl_unix.c | 14 +++++++++++++-
|
||||
1 file changed, 13 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/osdep/unix/ssl_unix.c b/src/osdep/unix/ssl_unix.c
|
||||
index 3bfdff3..dec9467 100644
|
||||
--- a/src/osdep/unix/ssl_unix.c
|
||||
+++ b/src/osdep/unix/ssl_unix.c
|
||||
@@ -227,8 +227,16 @@ static char *ssl_start_work (SSLSTREAM *stream,char *host,unsigned long flags)
|
||||
/* disable certificate validation? */
|
||||
if (flags & NET_NOVALIDATECERT)
|
||||
SSL_CTX_set_verify (stream->context,SSL_VERIFY_NONE,NIL);
|
||||
- else SSL_CTX_set_verify (stream->context,SSL_VERIFY_PEER,ssl_open_verify);
|
||||
+ else {
|
||||
+#if OPENSSL_VERSION_NUMBER >= 0x10100000
|
||||
+ X509_VERIFY_PARAM *param = SSL_CTX_get0_param(stream->context);
|
||||
+ X509_VERIFY_PARAM_set_hostflags(param, X509_CHECK_FLAG_NO_PARTIAL_WILDCARDS);
|
||||
+ X509_VERIFY_PARAM_set1_host(param, host, 0);
|
||||
+#endif
|
||||
+
|
||||
+ SSL_CTX_set_verify (stream->context,SSL_VERIFY_PEER,ssl_open_verify);
|
||||
/* set default paths to CAs... */
|
||||
+ }
|
||||
SSL_CTX_set_default_verify_paths (stream->context);
|
||||
/* ...unless a non-standard path desired */
|
||||
if (s = (char *) mail_parameters (NIL,GET_SSLCAPATH,NIL))
|
||||
@@ -266,6 +274,7 @@ static char *ssl_start_work (SSLSTREAM *stream,char *host,unsigned long flags)
|
||||
if (SSL_write (stream->con,"",0) < 0)
|
||||
return ssl_last_error ? ssl_last_error : "SSL negotiation failed";
|
||||
/* need to validate host names? */
|
||||
+#if OPENSSL_VERSION_NUMBER < 0x10100000
|
||||
if (!(flags & NET_NOVALIDATECERT) &&
|
||||
(err = ssl_validate_cert (cert = SSL_get_peer_certificate (stream->con),
|
||||
host))) {
|
||||
@@ -275,6 +284,7 @@ static char *ssl_start_work (SSLSTREAM *stream,char *host,unsigned long flags)
|
||||
sprintf (tmp,"*%.128s: %.255s",err,cert ? cert->name : "???");
|
||||
return ssl_last_error = cpystr (tmp);
|
||||
}
|
||||
+#endif
|
||||
return NIL;
|
||||
}
|
||||
|
||||
@@ -313,6 +323,7 @@ static int ssl_open_verify (int ok,X509_STORE_CTX *ctx)
|
||||
* Returns: NIL if validated, else string of error message
|
||||
*/
|
||||
|
||||
+#if OPENSSL_VERSION_NUMBER < 0x10100000
|
||||
static char *ssl_validate_cert (X509 *cert,char *host)
|
||||
{
|
||||
int i,n;
|
||||
@@ -342,6 +353,7 @@ static char *ssl_validate_cert (X509 *cert,char *host)
|
||||
else ret = "Unable to locate common name in certificate";
|
||||
return ret;
|
||||
}
|
||||
+#endif
|
||||
|
||||
/* Case-independent wildcard pattern match
|
||||
* Accepts: base string
|
||||
@@ -0,0 +1,26 @@
|
||||
From fbd00d93cc07fa5da20414b355fffe628dcd37b3 Mon Sep 17 00:00:00 2001
|
||||
From: Khem Raj <raj.khem@gmail.com>
|
||||
Date: Wed, 7 Sep 2022 13:57:19 -0700
|
||||
Subject: [PATCH 2/2] tmail: Include ctype.h for isdigit
|
||||
|
||||
Upstream-Status: Pending
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
---
|
||||
src/tmail/tmail.c | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/src/tmail/tmail.c b/src/tmail/tmail.c
|
||||
index ed5fc58..a9e3645 100644
|
||||
--- a/src/tmail/tmail.c
|
||||
+++ b/src/tmail/tmail.c
|
||||
@@ -26,6 +26,7 @@
|
||||
* Last Edited: 30 October 2008
|
||||
*/
|
||||
|
||||
+#include <ctype.h> /* for isdigit */
|
||||
#include <stdio.h>
|
||||
#include <pwd.h>
|
||||
#include <errno.h>
|
||||
--
|
||||
2.37.3
|
||||
|
||||
@@ -0,0 +1,82 @@
|
||||
Fix linking libraries built with -fPIC with this library
|
||||
|
||||
Patch borrowed from Fedora
|
||||
|
||||
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
|
||||
|
||||
Upstream-Status: Pending
|
||||
|
||||
diff -up imap-2007e/src/osdep/unix/Makefile.shared imap-2007e/src/osdep/unix/Makefile
|
||||
--- imap-2007e/src/osdep/unix/Makefile.shared 2009-07-07 19:28:02.909755512 -0500
|
||||
+++ imap-2007e/src/osdep/unix/Makefile 2009-07-07 19:29:35.870006799 -0500
|
||||
@@ -170,6 +170,10 @@ BUILD=$(MAKE) build EXTRACFLAGS='$(EXTRA
|
||||
EXTRADRIVERS='$(EXTRADRIVERS)' EXTRAAUTHENTICATORS='$(EXTRAAUTHENTICATORS)'\
|
||||
PASSWDTYPE=$(PASSWDTYPE) SSLTYPE=$(SSLTYPE) IP=$(IP)
|
||||
|
||||
+# Need this for the shared library rule to work correctly
|
||||
+.SUFFIXES: .o .so
|
||||
+SOFILES=${BINARIES:.o=.so}
|
||||
+
|
||||
|
||||
# Here if no make argument established
|
||||
|
||||
@@ -845,18 +849,24 @@ vu2: # VAX Ultrix 2.3, etc.
|
||||
|
||||
# Build it!
|
||||
|
||||
-build: clean once $(ARCHIVE)
|
||||
+build: clean once $(ARCHIVE) $(SHLIBNAME)
|
||||
|
||||
-all: $(ARCHIVE)
|
||||
+all: $(ARCHIVE) $(SHLIBNAME)
|
||||
|
||||
$(ARCHIVE): $(BINARIES)
|
||||
sh -c '$(RM) $(ARCHIVE) || true'
|
||||
@$(CAT) ARCHIVE
|
||||
@$(SH) ARCHIVE
|
||||
|
||||
-.c.o:
|
||||
- `$(CAT) CCTYPE` -c `$(CAT) CFLAGS` $*.c
|
||||
+$(SHLIBNAME): $(SOFILES)
|
||||
+ gcc -shared -Wl,-soname,$(SHLIBNAME) -o $(SHLIBNAME) $(SOFILES) `cat LDFLAGS`
|
||||
+ ln -s $(SHLIBNAME) lib$(SHLIBBASE).so
|
||||
|
||||
+.c.so: osdep.h
|
||||
+ $(CC) -fPIC -DPIC -D_REENTRANT -c `$(CAT) CFLAGS` ${@:.so=.c} -o $@
|
||||
+
|
||||
+.c.o:
|
||||
+ $(CC) -fPIC -DPIC -D_REENTRANT -c `$(CAT) CFLAGS` $*.c
|
||||
|
||||
# Cleanup
|
||||
|
||||
@@ -895,8 +905,7 @@ utf8aux.o: mail.h misc.h osdep.h utf8.h
|
||||
|
||||
|
||||
# OS-dependent
|
||||
-
|
||||
-osdep.o:mail.h misc.h env.h fs.h ftl.h nl.h tcp.h \
|
||||
+OSDEPS= mail.h misc.h env.h fs.h ftl.h nl.h tcp.h \
|
||||
osdep.h env_unix.h tcp_unix.h \
|
||||
osdep.c env_unix.c fs_unix.c ftl_unix.c nl_unix.c tcp_unix.c ip_unix.c\
|
||||
auths.c crexcl.c flockcyg.c flocklnx.c flocksim.c fsync.c \
|
||||
@@ -910,12 +919,19 @@ osdep.o:mail.h misc.h env.h fs.h ftl.h n
|
||||
write.c sslstdio.c \
|
||||
strerror.c strpbrk.c strstr.c strtok.c strtoul.c \
|
||||
OSCFLAGS
|
||||
+
|
||||
+osdep.o: $(OSDEPS)
|
||||
+ $(CC) -fPIC -DPIC -D_REENTRANT `$(CAT) CFLAGS` `$(CAT) OSCFLAGS` -c osdep.c
|
||||
+ @echo ========================================================================
|
||||
@echo Building OS-dependent module
|
||||
@echo If you get No such file error messages for files x509.h, ssl.h,
|
||||
@echo pem.h, buffer.h, bio.h, and crypto.h, that means that OpenSSL
|
||||
@echo is not installed on your system. Either install OpenSSL first
|
||||
@echo or build with command: make `$(CAT) OSTYPE` SSLTYPE=none
|
||||
- `$(CAT) CCTYPE` -c `$(CAT) CFLAGS` `$(CAT) OSCFLAGS` -c osdep.c
|
||||
+ @echo ========================================================================
|
||||
+
|
||||
+osdep.so: $(OSDEPS)
|
||||
+ $(CC) -fPIC -DPIC -D_REENTRANT `$(CAT) CFLAGS` `cat OSCFLAGS` -c osdep.c -o $@
|
||||
|
||||
osdep.c: osdepbas.c osdepckp.c osdeplog.c osdepssl.c
|
||||
$(CAT) osdepbas.c osdepckp.c osdeplog.c osdepssl.c > osdep.c
|
||||
@@ -0,0 +1,20 @@
|
||||
Fix error found with "-Werror=format-security" flag
|
||||
|
||||
Patch borrowed from Fedora
|
||||
|
||||
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
|
||||
|
||||
Upstream-Status: Pending
|
||||
|
||||
diff -Naur imap-2007f.orig/src/osdep/unix/flocklnx.c imap-2007f/src/osdep/unix/flocklnx.c
|
||||
--- imap-2007f.orig/src/osdep/unix/flocklnx.c 2011-07-23 02:20:11.000000000 +0200
|
||||
+++ imap-2007f/src/osdep/unix/flocklnx.c 2014-04-14 19:17:46.429000000 +0200
|
||||
@@ -57,7 +57,7 @@
|
||||
case ENOLCK: /* lock table is full */
|
||||
sprintf (tmp,"File locking failure: %s",strerror (errno));
|
||||
mm_log (tmp,WARN); /* give the user a warning of what happened */
|
||||
- if (!logged++) syslog (LOG_ERR,tmp);
|
||||
+ if (!logged++) syslog (LOG_ERR, "%s", tmp);
|
||||
/* return failure if non-blocking lock */
|
||||
if (op & LOCK_NB) return -1;
|
||||
sleep (5); /* slow down in case it loops */
|
||||
@@ -0,0 +1,12 @@
|
||||
diff -urN imap-2007.orig/Makefile imap-2007/Makefile
|
||||
--- imap-2007.orig/Makefile 2007-12-20 23:11:10.000000000 +0100
|
||||
+++ imap-2007/Makefile 2008-03-19 14:08:47.000000000 +0100
|
||||
@@ -690,7 +690,7 @@
|
||||
@$(SH) -c '(test $(BUILDTYPE) = rebuild -o $(BUILDTYPE) = `$(CAT) OSTYPE`) || (echo Already built for `$(CAT) OSTYPE` -- you must do \"make clean\" first && exit 1)'
|
||||
@echo Rebuilding c-client for `$(CAT) OSTYPE`...
|
||||
@$(TOUCH) SPECIALS
|
||||
- $(CD) c-client;$(MAKE) all CC=`$(CAT) CCTYPE` \
|
||||
+ $(CD) c-client;$(MAKE) all CC="`$(CAT) CCTYPE`" \
|
||||
CFLAGS="`$(CAT) CFLAGS`" `$(CAT) SPECIALS`
|
||||
|
||||
rebuildclean:
|
||||
@@ -0,0 +1,55 @@
|
||||
SUMMARY = "UW c-client library for mail protocols"
|
||||
SECTION = "devel"
|
||||
|
||||
LICENSE = "Apache-2.0"
|
||||
LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=a6a4ddbb7cd2999f6827ee143f6fcd97"
|
||||
|
||||
DEPENDS = "openssl virtual/crypt"
|
||||
|
||||
SRC_URI = "https://fossies.org/linux/misc/old/imap-${PV}.tar.gz \
|
||||
file://quote_cctype.patch \
|
||||
file://imap-2007e-shared.patch \
|
||||
file://imap-2007f-format-security.patch \
|
||||
file://0001-Support-OpenSSL-1.1.patch \
|
||||
file://0001-Define-prototype-for-safe_flock.patch \
|
||||
file://0001-Do-not-build-mtest.patch \
|
||||
file://0002-tmail-Include-ctype.h-for-isdigit.patch \
|
||||
file://0001-Fix-Wincompatible-function-pointer-types.patch \
|
||||
"
|
||||
|
||||
SRC_URI[md5sum] = "2126fd125ea26b73b20f01fcd5940369"
|
||||
SRC_URI[sha256sum] = "53e15a2b5c1bc80161d42e9f69792a3fa18332b7b771910131004eb520004a28"
|
||||
|
||||
S = "${WORKDIR}/imap-${PV}"
|
||||
|
||||
CVE_CHECK_IGNORE += "\
|
||||
CVE-2005-0198 \
|
||||
"
|
||||
|
||||
PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)}"
|
||||
PACKAGECONFIG[pam] = ",,libpam"
|
||||
|
||||
EXTRA_OEMAKE = "CC='${CC} -std=c99 -D_GNU_SOURCE' ARRC='${AR} -rc' RANLIB='${RANLIB}' EXTRACFLAGS='${CFLAGS}'"
|
||||
|
||||
HEADERS = "src/c-client/*.h src/osdep/unix/*.h c-client/auths.c c-client/linkage.c c-client/linkage.h c-client/osdep.h"
|
||||
|
||||
do_compile() {
|
||||
echo "SSLINCLUDE=${STAGING_INCDIR} SSLLIB=${STAGING_LIBDIR}" > ${S}/SPECIALS
|
||||
oe_runmake ${@bb.utils.contains('PACKAGECONFIG', 'pam', 'lnp', 'slx', d)}
|
||||
}
|
||||
|
||||
do_install() {
|
||||
install -d ${D}${includedir}/c-client
|
||||
install ${HEADERS} ${D}${includedir}/c-client
|
||||
install -d ${D}${libdir}
|
||||
install c-client/c-client.a ${D}${libdir}/libc-client.a
|
||||
}
|
||||
|
||||
RPROVIDES:${PN} = "libc-client"
|
||||
RREPLACES:${PN} = "libc-client"
|
||||
RCONFLICTS:${PN} = "libc-client"
|
||||
|
||||
ALLOW_EMPTY:${PN} = "1"
|
||||
|
||||
PARALLEL_MAKE = ""
|
||||
|
||||
Reference in New Issue
Block a user