diff --git a/mailx-12.2-mime.dif b/mailx-12.2-mime.dif deleted file mode 100644 index 74bb9b8..0000000 --- a/mailx-12.2-mime.dif +++ /dev/null @@ -1,186 +0,0 @@ ---- def.h -+++ def.h 2007-04-17 11:32:43.960721000 +0000 -@@ -142,7 +142,8 @@ enum mimeclean { - MIME_LONGLINES = 002, /* has lines too long for RFC 2822 */ - MIME_CTRLCHAR = 004, /* contains control characters */ - MIME_HASNUL = 010, /* contains \0 characters */ -- MIME_NOTERMNL = 020 /* lacks a terminating newline */ -+ MIME_NOTERMNL = 020, /* lacks a terminating newline */ -+ MIME_UTF8 = 040 /* UTF-8 high bit characters */ - }; - - enum tdflags { ---- mime.c -+++ mime.c 2007-04-17 13:08:06.352702764 +0000 -@@ -258,7 +258,10 @@ getcharset(int isclean) - if (isclean & (MIME_CTRLCHAR|MIME_HASNUL)) - charset = NULL; - else if (isclean & MIME_HIGHBIT) { -- charset = wantcharset ? wantcharset : value("charset"); -+ if (isclean & MIME_UTF8) -+ charset = defcharset; -+ if (charset == NULL) -+ charset = wantcharset ? wantcharset : value("charset"); - if (charset == NULL) { - char *t = value("ttycharset"); - if (t == NULL || (ascncasecmp("ANSI_X3.4", t, 9) == 0)) -@@ -742,6 +745,7 @@ mime_isclean(FILE *f) - lastc = c; - c = getc(f); - curlen++; -+ check: - if (c == '\n' || c == EOF) { - /* - * RFC 821 imposes a maximum line length of 1000 -@@ -754,10 +758,38 @@ mime_isclean(FILE *f) - curlen = 1; - } else if (c & 0200) { - isclean |= MIME_HIGHBIT; -+ if (c & 0100) { -+ int n, follow; -+ -+ if ((c & 040) == 0) /* 110xxxxx */ -+ follow = 1; -+ else if ((c & 020) == 0) /* 1110xxxx */ -+ follow = 2; -+ else if ((c & 010) == 0) /* 11110xxx */ -+ follow = 3; -+ else if ((c & 004) == 0) /* 111110xx */ -+ follow = 4; -+ else if ((c & 002) == 0) /* 1111110x */ -+ follow = 5; -+ else -+ continue; -+ -+ for (n = 0; n < follow; n++) { -+ lastc = c; -+ c = getc(f); -+ -+ if ((c & 0200) == 0 || (c & 0100) || -+ (c == '\0') || (c == '\n') || (c == EOF)) { -+ curlen += n; -+ goto check; -+ } -+ } -+ isclean |= MIME_UTF8; -+ } - } else if (c == '\0') { - isclean |= MIME_HASNUL; - break; -- } else if ((c < 040 && (c != '\t' && c != '\f')) || c == 0177) { -+ } else if ((c < 040 && (c != '\t' && c != '\f' && c != '\b')) || c == 0177) { - isclean |= MIME_CTRLCHAR; - } - } while (c != EOF); -@@ -826,13 +858,16 @@ get_mime_convert(FILE *fp, char **conten - * ^I or ^L in text/plain bodies. However, some - * obscure character sets actually contain these - * characters, so the content type can be set. -+ * Beside ^I or ^L from RFC 2046 we accept also -+ * backspace ^H often used in enhanced text. - */ - if ((*contenttype = value("contenttype-cntrl")) == NULL) - *contenttype = "application/octet-stream"; - } else - *contenttype = "text/plain"; - *charset = getcharset(*isclean); -- } -+ } else if (ascncasecmp(*contenttype, "text/", 5) == 0) -+ *charset = getcharset(*isclean); - return convert; - } - ---- sendout.c -+++ sendout.c 2007-04-17 13:11:40.576871634 +0000 -@@ -206,7 +206,7 @@ attach_file(struct attachment *ap, FILE - size_t bufsize, count; - int lastc = EOF; - #ifdef HAVE_ICONV -- char *tcs; -+ char *tcs = NULL; - #endif - - if ((fi = Fopen(ap->a_name, "r")) == NULL) { -@@ -231,8 +231,16 @@ attach_file(struct attachment *ap, FILE - send_boundary, contenttype); - if (charset == NULL) - putc('\n', fo); -- else -- fprintf(fo, ";\n charset=%s\n", charset); -+ else { -+#ifdef HAVE_ICONV -+ if (wantcharset && ascncasecmp(wantcharset, "ANSI_X3.4", 9)) -+ tcs = wantcharset; -+ if (tcs) -+ fprintf(fo, ";\n charset=%s\n", tcs); -+ else -+#endif -+ fprintf(fo, ";\n charset=%s\n", charset); -+ } - if (ap->a_content_disposition == NULL) - ap->a_content_disposition = "attachment"; - fprintf(fo, "Content-Transfer-Encoding: %s\n" -@@ -254,16 +262,15 @@ attach_file(struct attachment *ap, FILE - iconv_close(iconvd); - iconvd = (iconv_t)-1; - } -- tcs = gettcharset(); - if ((isclean & (MIME_HASNUL|MIME_CTRLCHAR)) == 0 && - ascncasecmp(contenttype, "text/", 5) == 0 && - isclean & MIME_HIGHBIT && -- charset != NULL && asccasecmp(charset, tcs)) { -- if ((iconvd = iconv_open_ft(charset, tcs)) == (iconv_t)-1 && -+ charset != NULL && tcs != NULL && asccasecmp(charset, tcs)) { -+ if ((iconvd = iconv_open_ft(tcs, charset)) == (iconv_t)-1 && - errno != 0) { - if (errno == EINVAL) - fprintf(stderr, catgets(catd, CATSET, 179, -- "Cannot convert from %s to %s\n"), tcs, charset); -+ "Cannot convert from %s to %s\n"), charset, tcs); - else - perror("iconv_open"); - Fclose(fi); -@@ -467,6 +474,7 @@ infix(struct header *hp, FILE *fi, int d - } - if ((isclean & (MIME_HASNUL|MIME_CTRLCHAR)) == 0 && - ascncasecmp(contenttype, "text/", 5) == 0 && -+ ascncasecmp(tcs, "ANSI_X3.4", 9) && - isclean & MIME_HIGHBIT && - charset != NULL && asccasecmp(charset, tcs)) { - if (iconvd != (iconv_t)-1) -@@ -1162,8 +1170,9 @@ puthead(struct header *hp, FILE *fo, enu - return 1; - if ((addr = hp->h_organization) != NULL || - (addr = value("ORGANIZATION")) != NULL) { -+ size_t len = strlen(addr); - fwrite("Organization: ", sizeof (char), 14, fo); -- if (mime_write(addr, sizeof *addr, strlen(addr), fo, -+ if (len && mime_write(addr, sizeof *addr, len, fo, - action == SEND_TODISP ? - CONV_NONE:CONV_TOHDR, - action == SEND_TODISP ? -@@ -1208,9 +1217,10 @@ puthead(struct header *hp, FILE *fo, enu - if (hp->h_subject != NULL && w & GSUBJECT) { - fwrite("Subject: ", sizeof (char), 9, fo); - if (ascncasecmp(hp->h_subject, "re: ", 4) == 0) { -+ size_t len = strlen(hp->h_subject + 4); - fwrite("Re: ", sizeof (char), 4, fo); -- if (mime_write(hp->h_subject + 4, sizeof *hp->h_subject, -- strlen(hp->h_subject + 4), -+ if (len && mime_write(hp->h_subject + 4, -+ sizeof *hp->h_subject, len, - fo, action == SEND_TODISP ? - CONV_NONE:CONV_TOHDR, - action == SEND_TODISP ? -@@ -1218,8 +1228,9 @@ puthead(struct header *hp, FILE *fo, enu - NULL, (size_t)0) == 0) - return 1; - } else if (*hp->h_subject) { -- if (mime_write(hp->h_subject, sizeof *hp->h_subject, -- strlen(hp->h_subject), -+ size_t len = strlen(hp->h_subject); -+ if (len && mime_write(hp->h_subject, -+ sizeof *hp->h_subject, len, - fo, action == SEND_TODISP ? - CONV_NONE:CONV_TOHDR, - action == SEND_TODISP ? diff --git a/mailx-12.2.tar.bz2 b/mailx-12.2.tar.bz2 deleted file mode 100644 index 755b4eb..0000000 --- a/mailx-12.2.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:bc2a2031e31c10f82cf4b60fe9228707ad41c3c2c32a695de3fa19a95fc38e63 -size 269281 diff --git a/mailx-12.5-mime.dif b/mailx-12.5-mime.dif new file mode 100644 index 0000000..db4e731 --- /dev/null +++ b/mailx-12.5-mime.dif @@ -0,0 +1,116 @@ +--- def.h ++++ def.h 2011-05-13 11:04:51.779926337 +0000 +@@ -142,7 +142,8 @@ enum mimeclean { + MIME_LONGLINES = 002, /* has lines too long for RFC 2822 */ + MIME_CTRLCHAR = 004, /* contains control characters */ + MIME_HASNUL = 010, /* contains \0 characters */ +- MIME_NOTERMNL = 020 /* lacks a terminating newline */ ++ MIME_NOTERMNL = 020, /* lacks a terminating newline */ ++ MIME_UTF8 = 040 /* UTF-8 high bit characters */ + }; + + enum tdflags { +--- mime.c ++++ mime.c 2011-05-13 11:04:51.779926337 +0000 +@@ -258,8 +258,11 @@ getcharset(int isclean) + if (isclean & (MIME_CTRLCHAR|MIME_HASNUL)) + charset = NULL; + else if (isclean & MIME_HIGHBIT) { +- charset = (wantcharset && wantcharset != (char *)-1) ? +- wantcharset : value("charset"); ++ if (isclean & MIME_UTF8) ++ charset = defcharset; ++ if (charset == NULL) ++ charset = (wantcharset && wantcharset != (char *)-1) ? ++ wantcharset : value("charset"); + if (charset == NULL) { + char *t = value("ttycharset"); + if (t == NULL || (ascncasecmp("ANSI_X3.4", t, 9) == 0)) +@@ -737,6 +740,7 @@ mime_isclean(FILE *f) + lastc = c; + c = getc(f); + curlen++; ++ check: + if (c == '\n' || c == EOF) { + /* + * RFC 821 imposes a maximum line length of 1000 +@@ -749,10 +753,38 @@ mime_isclean(FILE *f) + curlen = 1; + } else if (c & 0200) { + isclean |= MIME_HIGHBIT; ++ if (c & 0100) { ++ int n, follow; ++ ++ if ((c & 040) == 0) /* 110xxxxx */ ++ follow = 1; ++ else if ((c & 020) == 0) /* 1110xxxx */ ++ follow = 2; ++ else if ((c & 010) == 0) /* 11110xxx */ ++ follow = 3; ++ else if ((c & 004) == 0) /* 111110xx */ ++ follow = 4; ++ else if ((c & 002) == 0) /* 1111110x */ ++ follow = 5; ++ else ++ continue; ++ ++ for (n = 0; n < follow; n++) { ++ lastc = c; ++ c = getc(f); ++ ++ if ((c & 0200) == 0 || (c & 0100) || ++ (c == '\0') || (c == '\n') || (c == EOF)) { ++ curlen += n; ++ goto check; ++ } ++ } ++ isclean |= MIME_UTF8; ++ } + } else if (c == '\0') { + isclean |= MIME_HASNUL; + break; +- } else if ((c < 040 && (c != '\t' && c != '\f')) || c == 0177) { ++ } else if ((c < 040 && (c != '\t' && c != '\f' && c != '\b')) || c == 0177) { + isclean |= MIME_CTRLCHAR; + } + } while (c != EOF); +@@ -826,12 +858,15 @@ get_mime_convert(FILE *fp, char **conten + * ^I or ^L in text/plain bodies. However, some + * obscure character sets actually contain these + * characters, so the content type can be set. ++ * Beside ^I or ^L from RFC 2046 we accept also ++ * backspace ^H often used in enhanced text. + */ + if ((*contenttype = value("contenttype-cntrl")) == NULL) + *contenttype = "application/octet-stream"; + } else if (*contenttype == NULL) + *contenttype = "text/plain"; +- } ++ } else if (ascncasecmp(*contenttype, "text/", 5) == 0) ++ *charset = getcharset(*isclean); + return convert; + } + +--- sendout.c ++++ sendout.c 2011-05-13 11:07:31.623926237 +0000 +@@ -230,6 +230,11 @@ attach_file1(struct attachment *ap, FILE + "\n--%s\n" + "Content-Type: %s", + send_boundary, contenttype); ++ tcs = gettcharset(); ++#ifdef HAVE_ICONV ++ if (wantcharset && ascncasecmp(wantcharset, "ANSI_X3.4", 9)) ++ charset = wantcharset; ++#endif + if (charset == NULL) + putc('\n', fo); + else +@@ -259,7 +264,7 @@ attach_file1(struct attachment *ap, FILE + if ((isclean & (MIME_HASNUL|MIME_CTRLCHAR)) == 0 && + ascncasecmp(contenttype, "text/", 5) == 0 && + isclean & MIME_HIGHBIT && +- charset != NULL) { ++ charset != NULL && tcs != NULL && asccasecmp(charset, tcs)) { + if ((iconvd = iconv_open_ft(charset, tcs)) == (iconv_t)-1 && + errno != 0) { + if (errno == EINVAL) diff --git a/mailx-12.1-replyto.patch b/mailx-12.5-replyto.patch similarity index 62% rename from mailx-12.1-replyto.patch rename to mailx-12.5-replyto.patch index 073ca16..90e6947 100644 --- a/mailx-12.1-replyto.patch +++ b/mailx-12.5-replyto.patch @@ -1,6 +1,6 @@ --- collect.c -+++ collect.c 2006-07-20 13:21:32.000000000 +0200 -@@ -718,7 +718,7 @@ cont: ++++ collect.c 2006-07-20 11:21:32.000000000 +0000 +@@ -720,7 +720,7 @@ cont: * Grab a bunch of headers. */ do @@ -9,7 +9,7 @@ value("bsdcompat") != NULL && value("bsdorder") != NULL); while (hp->h_to == NULL); -@@ -741,13 +741,21 @@ cont: +@@ -743,13 +743,21 @@ cont: break; case 's': /* @@ -33,7 +33,7 @@ /* * Edit the attachment list. --- def.h -+++ def.h 2006-07-20 13:21:32.000000000 +0200 ++++ def.h 2006-07-20 11:21:32.000000000 +0000 @@ -393,7 +393,7 @@ enum gfield { GUA = 128, /* User-Agent field */ GMIME = 256, /* MIME 1.0 fields */ @@ -53,29 +53,28 @@ #define visible(mp) (((mp)->m_flag&(MDELETED|MHIDDEN|MKILL))==0|| \ dot==(mp) && (mp)->m_flag&MKILL) --- extern.h -+++ extern.h 2006-07-20 13:21:32.000000000 +0200 -@@ -456,7 +456,8 @@ int send(struct message *mp, FILE *obuf, ++++ extern.h 2011-05-13 09:07:33.891926124 +0000 +@@ -457,7 +457,7 @@ int send(struct message *mp, FILE *obuf, + char *prefix, enum sendaction action, off_t *stats); + /* sendout.c */ char *makeboundary(void); - int mail(struct name *to, struct name *cc, struct name *bcc, +-int mail(struct name *to, struct name *cc, struct name *bcc, ++int mail(struct name *to, struct name *cc, struct name *bcc, struct name *replyto, struct name *smopts, char *subject, struct attachment *attach, -- char *quotefile, int recipient_record, int tflag); -+ char *quotefile, int recipient_record, int tflag, -+ struct name * replyto); + char *quotefile, int recipient_record, int tflag, int Eflag); int sendmail(void *v); - int Sendmail(void *v); - enum okay mail1(struct header *hp, int printheaders, struct message *quote, --- mailx.1 -+++ mailx.1 2006-07-20 13:23:09.000000000 +0200 ++++ mailx.1 2011-05-13 09:11:27.640426515 +0000 @@ -43,7 +43,7 @@ mailx \- send and receive Internet mail .PD 0 .HP .ad l --\fBmailx\fR [\fB\-BDdFintv~\fR] -+\fBmailx\fR [\fB\-BDdFintv~\fR] [\fB\-R\fI\ address\fR ] +-\fBmailx\fR [\fB\-BDdEFintv~\fR] ++\fBmailx\fR [\fB\-BDdEFintv~\fR] [\fB\-R\fR [\fIaddress\fR]] [\fB\-s\fI\ subject\fR] [\fB\-a\fI\ attachment\fR ] [\fB\-c\fI\ cc-addr\fR] [\fB\-b\fI\ bcc-addr\fR] [\fB\-r\fI\ from-addr\fR] [\fB\-h\fI\ hops\fR] -@@ -192,8 +192,12 @@ it is recommended to set the +@@ -203,8 +203,12 @@ it is recommended to set the .I from variable directly instead. .TP @@ -89,7 +88,7 @@ .TP .BI \-s \ subject Specify subject on command line (only the first argument after the -@@ -2104,6 +2108,9 @@ copying the message to +@@ -2131,6 +2135,9 @@ copying the message to `dead.letter' in the user's home directory if save is set. .TP @@ -100,8 +99,8 @@ Read the named file into the message. .TP --- main.c -+++ main.c 2006-07-20 13:37:02.000000000 +0200 -@@ -52,6 +52,11 @@ static char sccsid[] = "@(#)main.c 2.48 ++++ main.c 2011-05-13 09:18:29.747926305 +0000 +@@ -52,6 +52,11 @@ static char sccsid[] = "@(#)main.c 2.51 * Note: We set egid to realgid ... and only if we need the egid we will * switch back temporary. Nevertheless, I do not like seg faults. * Werner Fink, @@ -113,68 +112,49 @@ */ -@@ -86,9 +91,9 @@ static void setscreensize(int dummy); +@@ -87,9 +92,9 @@ static void setscreensize(int dummy); int main(int argc, char *argv[]) { -- const char optstr[] = "A:BHFINVT:RS:a:b:c:dDefh:inqr:s:tu:v~"; -+ const char optstr[] = "A:BHFINVT:R\rS:a:b:c:dDefh:inqr:s:tu:v~"; +- const char optstr[] = "A:BHEFINVT:RS:a:b:c:dDefh:inqr:s:tu:v~"; ++ const char optstr[] = "A:BHEFINVT:R::S:a:b:c:dDefh:inqr:s:tu:v~"; int i, existonly = 0, headersonly = 0, sendflag = 0; - struct name *to, *cc, *bcc, *smopts; -+ struct name *to, *cc, *bcc, *smopts, *replyto; ++ struct name *to, *cc, *bcc, *replyto, *smopts; struct attachment *attach; char *subject, *cp, *ef, *qf = NULL, *fromaddr = NULL, *Aflag = NULL; char nosrc = 0; -@@ -175,6 +180,26 @@ main(int argc, char *argv[]) +@@ -179,6 +184,8 @@ main(int argc, char *argv[]) attach = NULL; smopts = NULL; subject = NULL; + replyto = NULL; -+ -+ if (*argv) { -+ /* -+ * Use -R option for send and folder mode. In folder mode -R is used -+ * for read only and in send mode for providing a reply-to address. -+ */ -+ char **opt = argv; -+ while (*(++opt) && (**opt)) { -+ char *cp = *opt; -+ if (*cp == '-' && *(cp+1) == 'R') { -+ if (*(cp+2) == 0) { -+ if (*(++opt) && (**opt) && (**opt != '-')) -+ *(cp+1) = '\r'; -+ } -+ break; -+ } -+ } -+ } + while ((i = getopt(argc, argv, optstr)) != EOF) { switch (i) { case 'V': -@@ -339,13 +364,20 @@ main(int argc, char *argv[]) - case 'A': +@@ -348,12 +355,18 @@ main(int argc, char *argv[]) Aflag = optarg; break; -+ case '\r': + case 'R': +- Rflag = 1; + /* + * Set the Reply-to Address (as who we send mail) + */ + if (optarg && *optarg) + replyto = checkaddrs(cat(replyto, extract(optarg, GREPLYTO|GFULL))); -+ break; - case 'R': - Rflag = 1; ++ else ++ Rflag = 1; break; case '?': usage: fprintf(stderr, catgets(catd, CATSET, 135, --"Usage: %s -eiIUdFntBDNHRV~ -T FILE -u USER -h hops -r address -s SUBJECT -a FILE -q FILE -f FILE -A ACCOUNT -b USERS -c USERS -S OPTION users\n"), progname); -+"Usage: %s -eiIUdFntBDNHV~ [ -R | -R reply-address ] -T FILE -u USER -h hops -r address -s SUBJECT -a FILE -q FILE -f FILE -A ACCOUNT -b USERS -c USERS -S OPTION users\n"), progname); +-"Usage: %s -eiIUdEFntBDNHRV~ -T FILE -u USER -h hops -r address -s SUBJECT -a FILE -q FILE -f FILE -A ACCOUNT -b USERS -c USERS -S OPTION users\n"), progname); ++"Usage: %s -eiIUdEFntBDNHV~ [-R [reply-address]] -T FILE -u USER -h hops -r address -s SUBJECT -a FILE -q FILE -f FILE -A ACCOUNT -b USERS -c USERS -S OPTION users\n"), progname); exit(2); } } -@@ -379,6 +411,10 @@ usage: +@@ -387,6 +400,10 @@ usage: fprintf(stderr, "The -R option is meaningless in send mode.\n"); goto usage; } @@ -185,28 +165,29 @@ if (Iflag && ef == NULL) { fprintf(stderr, catgets(catd, CATSET, 204, "Need -f with -I.\n")); -@@ -427,7 +463,7 @@ usage: +@@ -441,8 +458,8 @@ usage: if (fromaddr) assign("from", fromaddr); if (!rcvmode) { -- mail(to, cc, bcc, smopts, subject, attach, qf, Fflag, tflag); -+ mail(to, cc, bcc, smopts, subject, attach, qf, Fflag, tflag, replyto); +- mail(to, cc, bcc, smopts, subject, attach, qf, Fflag, tflag, +- Eflag); ++ mail(to, cc, bcc, replyto, smopts, subject, attach, qf, ++ Fflag, tflag, Eflag); /* * why wait? */ --- sendout.c -+++ sendout.c 2006-07-20 13:21:39.000000000 +0200 -@@ -638,7 +638,8 @@ savemail(char *name, FILE *fi) ++++ sendout.c 2011-05-13 09:19:01.288426393 +0000 +@@ -712,7 +712,7 @@ savemail(char *name, FILE *fi) + * which does all the dirty work. + */ int - mail(struct name *to, struct name *cc, struct name *bcc, +-mail(struct name *to, struct name *cc, struct name *bcc, ++mail(struct name *to, struct name *cc, struct name *bcc, struct name *replyto, struct name *smopts, char *subject, struct attachment *attach, -- char *quotefile, int recipient_record, int tflag) -+ char *quotefile, int recipient_record, int tflag, -+ struct name *replyto) + char *quotefile, int recipient_record, int tflag, int Eflag) { - struct header head; - struct str in, out; -@@ -655,6 +656,7 @@ mail(struct name *to, struct name *cc, s +@@ -731,6 +731,7 @@ mail(struct name *to, struct name *cc, s head.h_to = to; head.h_cc = cc; head.h_bcc = bcc; @@ -215,7 +196,7 @@ head.h_attach = attach; head.h_smopts = smopts; --- tty.c -+++ tty.c 2006-07-20 13:21:39.000000000 +0200 ++++ tty.c 2006-07-20 11:21:39.000000000 +0000 @@ -338,6 +338,12 @@ grabh(struct header *hp, enum gfield gfl hp->h_organization = rtty_internal("Organization: ", hp->h_organization); diff --git a/mailx-12.2.dif b/mailx-12.5.dif similarity index 72% rename from mailx-12.2.dif rename to mailx-12.5.dif index 043ec39..8bfd94f 100644 --- a/mailx-12.2.dif +++ b/mailx-12.5.dif @@ -1,5 +1,5 @@ --- .pkgextract -+++ .pkgextract 2006-07-20 13:42:19.000000000 +0200 ++++ .pkgextract 2006-07-20 11:42:19.000000000 +0000 @@ -0,0 +1,5 @@ +patch -p 0 -s --suffix=".path" < ../nail-11.25-path.dif +patch -p 0 -s --suffix=".rplyto" < ../mailx-12.1-replyto.patch @@ -7,7 +7,7 @@ +patch -p 0 -s --suffix=".toaddr" < ../nail-11.25-toaddr.dif +patch -p 0 -s --suffix=".mime" < ../mailx-12.2-mime.dif --- Makefile -+++ Makefile 2007-04-17 12:12:48.536367085 +0200 ++++ Makefile 2007-04-17 10:12:49.000000000 +0000 @@ -10,6 +10,7 @@ PREFIX = /usr/local BINDIR = $(PREFIX)/bin MANDIR = $(PREFIX)/share/man @@ -26,7 +26,7 @@ ########################################################################### ########################################################################### --- aux.c -+++ aux.c 2006-07-20 13:42:19.000000000 +0200 ++++ aux.c 2006-07-20 11:42:19.000000000 +0000 @@ -42,6 +42,7 @@ static char sccsid[] = "@(#)aux.c 2.83 ( #endif #endif /* not lint */ @@ -36,7 +36,7 @@ #include "extern.h" #include --- base64.c -+++ base64.c 2006-07-20 13:42:19.000000000 +0200 ++++ base64.c 2006-07-20 11:42:19.000000000 +0000 @@ -33,6 +33,7 @@ static char sccsid[] = "@(#)base64.c 2.1 * base64 functions */ @@ -46,8 +46,8 @@ #include "extern.h" --- cmd1.c -+++ cmd1.c 2006-07-20 13:42:19.000000000 +0200 -@@ -42,6 +42,7 @@ static char sccsid[] = "@(#)cmd1.c 2.96 ++++ cmd1.c 2006-07-20 11:42:19.000000000 +0000 +@@ -42,6 +42,7 @@ static char sccsid[] = "@(#)cmd1.c 2.97 #endif #endif /* not lint */ @@ -56,8 +56,8 @@ #include "extern.h" #ifdef HAVE_WCWIDTH --- cmd2.c -+++ cmd2.c 2006-07-20 13:42:19.000000000 +0200 -@@ -42,6 +42,7 @@ static char sccsid[] = "@(#)cmd2.c 2.46 ++++ cmd2.c 2006-07-20 11:42:19.000000000 +0000 +@@ -42,6 +42,7 @@ static char sccsid[] = "@(#)cmd2.c 2.47 #endif #endif /* not lint */ @@ -66,8 +66,8 @@ #include "extern.h" #include --- cmd3.c -+++ cmd3.c 2006-07-20 13:42:19.000000000 +0200 -@@ -44,6 +44,7 @@ static char sccsid[] = "@(#)cmd3.c 2.84 ++++ cmd3.c 2006-07-20 11:42:19.000000000 +0000 +@@ -44,6 +44,7 @@ static char sccsid[] = "@(#)cmd3.c 2.87 #include #include @@ -76,7 +76,7 @@ #include "extern.h" #include --- cmdtab.c -+++ cmdtab.c 2006-07-20 13:42:19.000000000 +0200 ++++ cmdtab.c 2006-07-20 11:42:19.000000000 +0000 @@ -42,6 +42,7 @@ static char sccsid[] = "@(#)cmdtab.c 2.5 #endif #endif /* not lint */ @@ -86,7 +86,7 @@ #include "extern.h" --- collect.c -+++ collect.c 2006-07-20 13:42:19.000000000 +0200 ++++ collect.c 2006-07-20 11:42:19.000000000 +0000 @@ -49,6 +49,7 @@ static char sccsid[] = "@(#)collect.c 2. * ~ escapes. */ @@ -96,7 +96,7 @@ #include "extern.h" #include --- dotlock.c -+++ dotlock.c 2006-07-20 13:42:19.000000000 +0200 ++++ dotlock.c 2006-07-20 11:42:19.000000000 +0000 @@ -38,6 +38,7 @@ static char sccsid[] = "@(#)dotlock.c 2. #endif #endif @@ -106,8 +106,8 @@ #include #include --- edit.c -+++ edit.c 2006-07-20 13:42:19.000000000 +0200 -@@ -42,6 +42,7 @@ static char sccsid[] = "@(#)edit.c 2.24 ++++ edit.c 2006-07-20 11:42:19.000000000 +0000 +@@ -42,6 +42,7 @@ static char sccsid[] = "@(#)edit.c 2.24 #endif #endif /* not lint */ @@ -116,8 +116,8 @@ #include "extern.h" #include --- fio.c -+++ fio.c 2006-07-20 13:42:19.000000000 +0200 -@@ -42,6 +42,7 @@ static char sccsid[] = "@(#)fio.c 2.71 ( ++++ fio.c 2006-07-20 11:42:19.000000000 +0000 +@@ -42,6 +42,7 @@ static char sccsid[] = "@(#)fio.c 2.76 ( #endif #endif /* not lint */ @@ -126,7 +126,7 @@ #include #include --- getname.c -+++ getname.c 2006-07-20 13:42:19.000000000 +0200 ++++ getname.c 2006-07-20 11:42:19.000000000 +0000 @@ -42,6 +42,7 @@ static char sccsid[] = "@(#)getname.c 2. #endif #endif /* not lint */ @@ -136,8 +136,8 @@ #include #include "extern.h" --- head.c -+++ head.c 2006-07-20 13:42:19.000000000 +0200 -@@ -42,6 +42,7 @@ static char sccsid[] = "@(#)head.c 2.17 ++++ head.c 2006-07-20 11:42:19.000000000 +0000 +@@ -42,6 +42,7 @@ static char sccsid[] = "@(#)head.c 2.17 #endif #endif /* not lint */ @@ -146,7 +146,7 @@ #include "extern.h" #include --- hmac.c -+++ hmac.c 2006-07-20 13:42:19.000000000 +0200 ++++ hmac.c 2006-07-20 11:42:19.000000000 +0000 @@ -32,6 +32,7 @@ Appendix -- Sample Code /* Sccsid @(#)hmac.c 1.8 (gritter) 3/4/06 */ @@ -156,7 +156,7 @@ #include "md5.h" --- imap_gssapi.c -+++ imap_gssapi.c 2006-07-20 13:42:19.000000000 +0200 ++++ imap_gssapi.c 2006-07-20 11:42:19.000000000 +0000 @@ -73,6 +73,8 @@ static char sccsid[] = "@(#)imap_gssapi. #endif #endif /* not lint */ @@ -167,7 +167,7 @@ * Implementation of IMAP GSSAPI authentication according to RFC 1731. */ --- lex.c -+++ lex.c 2006-07-20 13:42:19.000000000 +0200 ++++ lex.c 2006-07-20 11:42:19.000000000 +0000 @@ -42,6 +42,7 @@ static char sccsid[] = "@(#)lex.c 2.86 ( #endif #endif /* not lint */ @@ -177,8 +177,8 @@ #include "extern.h" #include --- list.c -+++ list.c 2006-07-20 13:42:19.000000000 +0200 -@@ -42,6 +42,7 @@ static char sccsid[] = "@(#)list.c 2.61 ++++ list.c 2006-07-20 11:42:19.000000000 +0000 +@@ -42,6 +42,7 @@ static char sccsid[] = "@(#)list.c 2.62 #endif #endif /* not lint */ @@ -187,13 +187,13 @@ #include #include "extern.h" --- mail.rc -+++ mail.rc 2006-07-20 13:42:19.000000000 +0200 ++++ mail.rc 2006-07-20 11:42:19.000000000 +0000 @@ -0,0 +1,2 @@ +set asksub append dot save crt=20 +ignore Received Message-Id Resent-Message-Id Status Mail-From Return-Path Via --- mailx.1 -+++ mailx.1 2006-07-20 13:42:22.000000000 +0200 -@@ -164,7 +164,7 @@ Only applicable in combination with ++++ mailx.1 2006-07-20 11:42:22.000000000 +0000 +@@ -175,7 +175,7 @@ Only applicable in combination with .IR \-f . .TP .B \-n @@ -202,7 +202,7 @@ This option should be activated for .I mailx scripts that are invoked on more than one machine, -@@ -3062,7 +3062,7 @@ in the user's home directory. +@@ -3097,7 +3097,7 @@ in the user's home directory. The name of an optional startup file to be read after ~/.mailrc. This variable is ignored if it is imported from the environment; @@ -211,7 +211,7 @@ to allow bypassing the configuration with e. g. `MAILRC=/dev/null'. Use this file for commands that are not understood by other mailx implementations. -@@ -3637,7 +3637,7 @@ Used as directory for temporary files in +@@ -3674,7 +3674,7 @@ Used as directory for temporary files in ~/.mailrc File giving initial commands. .TP @@ -221,21 +221,21 @@ .TP ~/.mime.types --- main.c -+++ main.c 2006-07-20 14:13:32.000000000 +0200 -@@ -92,7 +92,7 @@ int ++++ main.c 2011-05-13 11:25:38.211926290 +0000 +@@ -93,7 +93,7 @@ int main(int argc, char *argv[]) { - const char optstr[] = "A:BHFINVT:R\rS:a:b:c:dDefh:inqr:s:tu:v~"; + const char optstr[] = "A:BHEFINVT:R::S:a:b:c:dDefh:inqr:s:tu:v~"; - int i, existonly = 0, headersonly = 0, sendflag = 0; + int i, existonly = 0, headersonly = 0, sendflag = 0, err = 1; - struct name *to, *cc, *bcc, *smopts, *replyto; + struct name *to, *cc, *bcc, *replyto, *smopts; struct attachment *attach; char *subject, *cp, *ef, *qf = NULL, *fromaddr = NULL, *Aflag = NULL; -@@ -395,8 +395,11 @@ main(int argc, char *argv[]) +@@ -385,8 +385,11 @@ main(int argc, char *argv[]) case '?': usage: fprintf(stderr, catgets(catd, CATSET, 135, --"Usage: %s -eiIUdFntBDNHV~ [ -R | -R reply-address ] -T FILE -u USER -h hops -r address -s SUBJECT -a FILE -q FILE -f FILE -A ACCOUNT -b USERS -c USERS -S OPTION users\n"), progname); +-"Usage: %s -eiIUdEFntBDNHV~ [-R [reply-address]] -T FILE -u USER -h hops -r address -s SUBJECT -a FILE -q FILE -f FILE -A ACCOUNT -b USERS -c USERS -S OPTION users\n"), progname); - exit(2); +"Usage: %s [-BDFintv~] [-s subject] [-a attachment ] [-c cc-addr] [-b bcc-addr]\n\ + [-r from-addr] [-h hops] [-A account] [-R reply-addr] [-S option] to-addr ...\n\ @@ -245,7 +245,7 @@ } } if (ef != NULL) { -@@ -437,11 +440,13 @@ usage: +@@ -427,11 +430,13 @@ usage: goto usage; } if (Rflag && to != NULL) { @@ -262,12 +262,12 @@ } if (Iflag && ef == NULL) { --- makeconfig -+++ makeconfig 2006-07-20 13:42:19.000000000 +0200 -@@ -298,23 +298,49 @@ int main(void) ++++ makeconfig 2011-05-13 11:28:45.907925652 +0000 +@@ -304,23 +304,48 @@ int main(void) 'for socket functionality in libsocket and libnsl' \ '#define HAVE_SOCKETS' '-lsocket -lnsl' --#link_check 'for IPv6 functionality' '#define HAVE_IPv6_FUNCS' <<\! +-#link_check ipv6 'for IPv6 functionality' '#define HAVE_IPv6_FUNCS' <<\! -##include "config.h" -##include -##include @@ -284,20 +284,19 @@ -# return 0; -#} -#! -+ +cat >$tmp1.c <<\! +#include "config.h" +#include +#include +#include +#include -+#ifdef HAVE_ARPA_INET_H ++#ifdef HAVE_ARPA_INET_H +#include -+#endif /* HAVE_ARPA_INET_H */ ++#endif /* HAVE_ARPA_INET_H */ + +int main() +{ -+ struct addrinfo a, *ap; ++ struct addrinfo a, *ap; + getaddrinfo("foo", "0", &a, &ap); + return 0; +} @@ -309,9 +308,9 @@ +#include +#include +#include -+#ifdef HAVE_ARPA_INET_H ++#ifdef HAVE_ARPA_INET_H +#include -+#endif /* HAVE_ARPA_INET_H */ ++#endif /* HAVE_ARPA_INET_H */ + +int main() +{ @@ -321,17 +320,17 @@ +} +! + -+<$tmp1.c link_check 'for IPv6 functionality getaddrinfo' '#define HAVE_GETADDRINFO' && -+ <$tmp2.c link_check 'for IPv6 functionality getnameinfo' '#define HAVE_GETNAMEINFO' ++<$tmp1.c link_check ipv6 'for IPv6 functionality getaddrinfo' '#define HAVE_GETADDRINFO' && ++ <$tmp2.c link_check ipv6 'for IPv6 functionality getnameinfo' '#define HAVE_GETNAMEINFO' +echo \ +'#if defined(HAVE_GETADDRINFO) && defined(HAVE_GETNAMEINFO) +# define HAVE_IPv6_FUNCS +#endif' >>$out - link_check 'for Network Security Services (NSS)' '#define USE_SSL + link_check nss 'for Network Security Services (NSS)' '#define USE_SSL #define USE_NSS' '-lsmime3 -lnss3 -lssl3 -lnspr4 -lplc4' <<\! || \ --- md5.c -+++ md5.c 2006-07-20 13:42:19.000000000 +0200 ++++ md5.c 2006-07-20 11:42:19.000000000 +0000 @@ -33,6 +33,7 @@ documentation and/or software. /* Sccsid @(#)md5.c 1.8 (gritter) 3/4/06 */ @@ -341,8 +340,8 @@ #include "md5.h" --- mime.c -+++ mime.c 2006-07-20 13:42:19.000000000 +0200 -@@ -44,6 +44,7 @@ static char sccsid[] = "@(#)mime.c 2.67 ++++ mime.c 2006-07-20 11:42:19.000000000 +0000 +@@ -44,6 +44,7 @@ static char sccsid[] = "@(#)mime.c 2.71 #endif /* DOSCCS */ #endif /* not lint */ @@ -351,7 +350,7 @@ #include "extern.h" #include --- names.c -+++ names.c 2006-07-20 13:42:22.000000000 +0200 ++++ names.c 2006-07-20 11:42:22.000000000 +0000 @@ -48,6 +48,7 @@ static char sccsid[] = "@(#)names.c 2.22 * Handle name lists. */ @@ -361,7 +360,7 @@ #include "extern.h" #include --- nsserr.c -+++ nsserr.c 2006-07-20 13:42:22.000000000 +0200 ++++ nsserr.c 2006-07-20 11:42:22.000000000 +0000 @@ -29,6 +29,7 @@ /* "@(#)nsserr.c 1.3 (gritter) 3/4/06" */ @@ -371,7 +370,7 @@ #include --- popen.c -+++ popen.c 2006-07-20 13:42:22.000000000 +0200 ++++ popen.c 2006-07-20 11:42:22.000000000 +0000 @@ -42,6 +42,7 @@ static char sccsid[] = "@(#)popen.c 2.20 #endif #endif /* not lint */ @@ -381,8 +380,8 @@ #include "extern.h" #include --- quit.c -+++ quit.c 2006-07-20 13:42:22.000000000 +0200 -@@ -42,6 +42,7 @@ static char sccsid[] = "@(#)quit.c 2.28 ++++ quit.c 2006-07-20 11:42:22.000000000 +0000 +@@ -42,6 +42,7 @@ static char sccsid[] = "@(#)quit.c 2.30 #endif #endif /* not lint */ @@ -391,8 +390,8 @@ #include "extern.h" #include --- send.c -+++ send.c 2006-07-20 13:42:22.000000000 +0200 -@@ -42,6 +42,7 @@ static char sccsid[] = "@(#)send.c 2.83 ++++ send.c 2006-07-20 11:42:22.000000000 +0000 +@@ -42,6 +42,7 @@ static char sccsid[] = "@(#)send.c 2.86 #endif #endif /* not lint */ @@ -401,7 +400,7 @@ #include "extern.h" #include --- sendout.c -+++ sendout.c 2006-07-20 13:42:22.000000000 +0200 ++++ sendout.c 2006-07-20 11:42:22.000000000 +0000 @@ -42,6 +42,7 @@ static char sccsid[] = "@(#)sendout.c 2. #endif #endif /* not lint */ @@ -411,8 +410,8 @@ #include "extern.h" #include --- smtp.c -+++ smtp.c 2006-07-20 13:42:22.000000000 +0200 -@@ -42,6 +42,7 @@ static char sccsid[] = "@(#)smtp.c 2.38 ++++ smtp.c 2006-07-20 11:42:22.000000000 +0000 +@@ -42,6 +42,7 @@ static char sccsid[] = "@(#)smtp.c 2.43 #endif #endif /* not lint */ @@ -421,7 +420,7 @@ #include --- strings.c -+++ strings.c 2006-07-20 13:42:22.000000000 +0200 ++++ strings.c 2006-07-20 11:42:22.000000000 +0000 @@ -50,6 +50,7 @@ static char sccsid[] = "@(#)strings.c 2. * loop each time, so they need not be freed. */ @@ -431,7 +430,7 @@ #include "extern.h" --- temp.c -+++ temp.c 2006-07-20 13:42:22.000000000 +0200 ++++ temp.c 2006-07-20 11:42:22.000000000 +0000 @@ -42,6 +42,7 @@ static char sccsid[] = "@(#)temp.c 2.8 ( #endif #endif /* not lint */ @@ -441,8 +440,8 @@ #include "extern.h" #include --- tty.c -+++ tty.c 2006-07-20 13:42:22.000000000 +0200 -@@ -48,6 +48,7 @@ static char sccsid[] = "@(#)tty.c 2.28 ( ++++ tty.c 2006-07-20 11:42:22.000000000 +0000 +@@ -48,6 +48,7 @@ static char sccsid[] = "@(#)tty.c 2.29 ( * Generally useful tty stuff. */ @@ -451,7 +450,7 @@ #include "extern.h" #include --- v7.local.c -+++ v7.local.c 2006-07-20 13:42:22.000000000 +0200 ++++ v7.local.c 2006-07-20 11:42:22.000000000 +0000 @@ -50,6 +50,7 @@ static char sccsid[] = "@(#)v7.local.c 2 * Local routines that are installation dependent. */ @@ -461,8 +460,8 @@ #include "extern.h" #include --- vars.c -+++ vars.c 2006-07-20 13:42:22.000000000 +0200 -@@ -42,6 +42,7 @@ static char sccsid[] = "@(#)vars.c 2.11 ++++ vars.c 2006-07-20 11:42:22.000000000 +0000 +@@ -42,6 +42,7 @@ static char sccsid[] = "@(#)vars.c 2.12 #endif #endif /* not lint */ @@ -471,7 +470,7 @@ #include "extern.h" --- catd/en_US -+++ catd/en_US 2006-07-20 14:48:28.000000000 +0200 ++++ catd/en_US 2006-07-20 12:48:28.000000000 +0000 @@ -180,7 +180,10 @@ The following ~ escapes are defined:\n\ 132 No applicable messages\n 133 %d: Inappropriate message\n diff --git a/mailx-12.5.tar.bz2 b/mailx-12.5.tar.bz2 new file mode 100644 index 0000000..0c303be --- /dev/null +++ b/mailx-12.5.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fb3adcff77709331fdde241a77434328601a0a2493ad4398618baf3038c668b5 +size 261429 diff --git a/mailx-fix-openssl.patch b/mailx-fix-openssl.patch index 947082a..f6ce563 100644 --- a/mailx-fix-openssl.patch +++ b/mailx-fix-openssl.patch @@ -1,5 +1,5 @@ ---- openssl.c.orig -+++ openssl.c +--- openssl.c ++++ openssl.c 2011-05-13 00:00:00.000000000 +0000 @@ -63,6 +63,7 @@ static sigjmp_buf ssljmp; #include #include @@ -8,16 +8,7 @@ #include "rcv.h" #include -@@ -105,7 +106,7 @@ static SSL_METHOD *ssl_select_method(con - static void ssl_load_verifications(struct sock *sp); - static void ssl_certificate(struct sock *sp, const char *uhp); - static enum okay ssl_check_host(const char *server, struct sock *sp); --static int smime_verify(struct message *m, int n, STACK *chain, -+static int smime_verify(struct message *m, int n, STACK_OF(X509) *chain, - X509_STORE *store); - static EVP_CIPHER *smime_cipher(const char *name); - static int ssl_password_cb(char *buf, int size, int rwflag, void *userdata); -@@ -166,6 +167,10 @@ ssl_init(void) +@@ -171,6 +172,10 @@ ssl_init(void) verbose = value("verbose") != NULL; if (initialized == 0) { SSL_library_init(); @@ -28,7 +19,7 @@ initialized = 1; } if (rand_init == 0) -@@ -211,9 +216,12 @@ ssl_select_method(const char *uhp) +@@ -216,9 +221,12 @@ ssl_select_method(const char *uhp) cp = ssl_method_string(uhp); if (cp != NULL) { @@ -42,61 +33,3 @@ method = SSLv3_client_method(); else if (equal(cp, "tls1")) method = TLSv1_client_method(); -@@ -308,7 +316,7 @@ ssl_check_host(const char *server, struc - X509 *cert; - X509_NAME *subj; - char data[256]; -- /*GENERAL_NAMES*/STACK *gens; -+ STACK_OF(GENERAL_NAME) *gens; - GENERAL_NAME *gen; - int i; - -@@ -494,7 +502,7 @@ smime_sign(FILE *ip, struct header *head - } - - static int --smime_verify(struct message *m, int n, STACK *chain, X509_STORE *store) -+smime_verify(struct message *m, int n, STACK_OF(X509) *chain, X509_STORE *store) - { - struct message *x; - char *cp, *sender, *to, *cc, *cnttype; -@@ -503,7 +511,8 @@ smime_verify(struct message *m, int n, S - off_t size; - BIO *fb, *pb; - PKCS7 *pkcs7; -- STACK *certs, *gens; -+ STACK_OF(X509) *certs; -+ STACK_OF(GENERAL_NAME) *gens; - X509 *cert; - X509_NAME *subj; - char data[LINESIZE]; -@@ -612,7 +621,7 @@ cverify(void *vp) - { - int *msgvec = vp, *ip; - int ec = 0; -- STACK *chain = NULL; -+ STACK_OF(X509) *chain = NULL; - X509_STORE *store; - char *ca_dir, *ca_file; - -@@ -685,7 +694,7 @@ smime_encrypt(FILE *ip, const char *cert - X509 *cert; - PKCS7 *pkcs7; - BIO *bb, *yb; -- STACK *certs; -+ STACK_OF(X509) *certs; - EVP_CIPHER *cipher; - - certfile = expand((char *)certfile); -@@ -948,9 +957,9 @@ smime_certsave(struct message *m, int n, - off_t size; - BIO *fb, *pb; - PKCS7 *pkcs7; -- STACK *certs; -+ STACK_OF(X509) *certs; - X509 *cert; -- STACK *chain = NULL; -+ STACK_OF(X509) *chain = NULL; - enum okay ok = OKAY; - - message_number = n; diff --git a/mailx.changes b/mailx.changes index 3985bb4..9aaf931 100644 --- a/mailx.changes +++ b/mailx.changes @@ -1,4 +1,42 @@ ------------------------------------------------------------------- +Fri May 13 13:29:52 CEST 2011 - werner@suse.de + +- Update to heirloom mailx 12.5 + * Better detection of base64 encoded text if acrossed a line + * A null pointer dereference that lead to a segmentation fault + when the user hit return at a yes/no question has been fixed + * When both standard input and standard output refer to a + terminal, ignore SIGPIPE + * With the "-E" command line option or if the "skipemptybody" + variable is set, outgoing messages that contain no text in + their first or only part are not sent but silently discarded. + * When an attachment that would have a "text/something" content + type contains illegal byte sequences, it is now reliably sent + out with the "application/octet-stream" content type instead + * Fixed a bug that caused messages to be truncated with IMAP servers that + use LF as line ending in message data, such as Google Mail (reported by + Matthew L. Shobe). + * Do not run filename expansion for IMAP or POP3 mailboxes names, making + it possible to select mailboxes that contain both brackets and spaces + in their names (reported by Matthew L. Shobe). + * Fixed the format of the timezone in "Date" header fields for zones in + the Western Hemisphere whose offsets are not an integral number of hours + (patch by Matthew Fischer). + * Fixed a message corruption that occurred when the "inc" command was used + with a mbox format mailbox after encrypted messages had been viewed + (reported by Martin Neitzel). + * Fixed a condition that caused mailx to hang when looking at a message, + copying that message, and issuing a "z" command evaluating an uncached + portion of an IMAP folder. + * Make it compile with OpenSSL 1.0.0-beta2 + * For RFC 2047 MIME "encoded-word" parts in headers, assume that the end of + each word resets the conversion state (Yedidyah Bar-David). + * When the ORGANIZATION variable has an empty value, do not generate an + "Organization:" header field. Previously, this condition resulted in + mailx refusing to send mail +- Fix my Reply-To patch found by milli + +------------------------------------------------------------------ Sat Apr 9 21:30:46 UTC 2011 - crrodriguez@opensuse.org - Allow mailx to compile properly when openSSL is built without diff --git a/mailx.spec b/mailx.spec index e957938..2576a71 100644 --- a/mailx.spec +++ b/mailx.spec @@ -26,13 +26,13 @@ Group: Productivity/Networking/Email/Utilities Provides: mail Recommends: smtp_daemon AutoReqProv: on -Version: 12.2 -Release: 158 +Version: 12.5 +Release: 1 Summary: A MIME-Capable Implementation of the mailx Command Source: mailx-%{version}.tar.bz2 Patch: mailx-%{version}.dif Patch1: nail-11.25-path.dif -Patch2: mailx-12.1-replyto.patch +Patch2: mailx-%{version}-replyto.patch Patch3: nail-11.25-ttychar.dif Patch4: nail-11.25-toaddr.dif Patch5: mailx-%{version}-mime.dif @@ -53,8 +53,8 @@ minor enhancements like the ability to set a "From:" address. %patch3 -p0 -b .ttychr %patch4 -p0 -b .toaddr %patch5 -p0 -b .mime +%patch6 -p0 -b .ssl %patch -p0 -%patch6 %build CC=gcc diff --git a/nail-11.25-path.dif b/nail-11.25-path.dif index 078a4e2..d2a4c64 100644 --- a/nail-11.25-path.dif +++ b/nail-11.25-path.dif @@ -85,7 +85,7 @@ if ((obuf = Popen(cmd, "r", cp, 0)) == NULL) { perror(cmd); return; -@@ -1049,7 +1049,7 @@ mespipe(char *cmd) +@@ -1051,7 +1051,7 @@ mespipe(char *cmd) * stdout = new message. */ if ((shell = value("SHELL")) == NULL) @@ -198,7 +198,7 @@ tempEdit, NULL, NULL) < 0) { --- fio.c +++ fio.c 2005-10-14 13:44:09.000000000 +0000 -@@ -539,7 +539,7 @@ globname(char *name) +@@ -542,7 +542,7 @@ globname(char *name) } snprintf(cmdbuf, sizeof cmdbuf, "echo %s", name); if ((shell = value("SHELL")) == NULL) @@ -209,7 +209,7 @@ close(pivec[0]); --- main.c +++ main.c 2005-10-14 13:44:09.000000000 +0000 -@@ -396,7 +396,7 @@ usage: +@@ -403,7 +403,7 @@ usage: rcvmode = !to && !tflag; spreserve(); if (!nosrc) @@ -231,7 +231,7 @@ sigaddset(&nset, SIGINT); --- send.c +++ send.c 2005-10-14 13:44:09.000000000 +0000 -@@ -1049,7 +1049,7 @@ getpipefile(char *pipecmd, FILE **qbuf, +@@ -1088,7 +1088,7 @@ getpipefile(char *pipecmd, FILE **qbuf, Ftfree(&tempPipe); } if ((shell = value("SHELL")) == NULL) @@ -242,7 +242,7 @@ perror(pipecmd); --- sendout.c +++ sendout.c 2005-10-14 13:44:09.000000000 +0000 -@@ -837,7 +837,7 @@ start_mta(struct name *to, struct name * +@@ -884,7 +884,7 @@ start_mta(struct name *to, struct name * if ((cp = value("sendmail")) != NULL) cp = expand(cp); else diff --git a/nail-11.25-toaddr.dif b/nail-11.25-toaddr.dif index b85e90b..ece2bda 100644 --- a/nail-11.25-toaddr.dif +++ b/nail-11.25-toaddr.dif @@ -1,9 +1,11 @@ --- main.c -+++ main.c 2005-10-17 14:36:24.000000000 +0200 -@@ -184,10 +184,27 @@ ++++ main.c 2011-05-13 09:28:48.052426589 +0000 +@@ -186,6 +186,25 @@ main(int argc, char *argv[]) + subject = NULL; + replyto = NULL; - if (*argv) { - /* ++ if (*argv) { ++ /* + * Be compatible with broken mail behaviour, which use direct + * sendmail options for sending mails if getopt is skiped + * by first argument which is non option like a mail address. @@ -19,17 +21,12 @@ + to = checkaddrs(cat(to, nalloc(*opt, GTO))); + argc--, argv++; + } ++ } + -+ /* - * Use -R option for send and folder mode. In folder mode -R is used - * for read only and in send mode for providing a reply-to address. - */ -- char **opt = argv; -+ opt = argv; - while (*(++opt) && (**opt)) { - char *cp = *opt; - if (*cp == '-' && *(cp+1) == 'R') { -@@ -386,8 +403,19 @@ + while ((i = getopt(argc, argv, optstr)) != EOF) { + switch (i) { + case 'V': +@@ -380,8 +399,19 @@ usage: ef = argv[optind]; } } else { diff --git a/nail-11.25-ttychar.dif b/nail-11.25-ttychar.dif index 8ee3b87..1ba662f 100644 --- a/nail-11.25-ttychar.dif +++ b/nail-11.25-ttychar.dif @@ -1,8 +1,8 @@ --- mime.c -+++ mime.c 2005-10-14 16:28:39.000000000 +0200 -@@ -260,7 +260,19 @@ - else if (isclean & MIME_HIGHBIT) { - charset = wantcharset ? wantcharset : value("charset"); ++++ mime.c 2005-10-14 14:28:39.000000000 +0000 +@@ -261,7 +261,19 @@ getcharset(int isclean) + charset = (wantcharset && wantcharset != (char *)-1) ? + wantcharset : value("charset"); if (charset == NULL) { - charset = defcharset; + char *t = value("ttycharset");