From 5ef1672b5427b11fd4a17a5291ee24d85986064e Mon Sep 17 00:00:00 2001 From: Silvan Calarco Date: Sat, 6 Jan 2024 06:53:02 +0100 Subject: [PATCH] rebuilt with openssl 1.0 [release 12.4-2mamba;Mon Mar 14 2011] --- README.md | 4 + mailx-12.4-openssl_1.0.0_build_fix-1.patch | 177 +++++++++++++++++++++ mailx.spec | 61 +++++++ 3 files changed, 242 insertions(+) create mode 100644 mailx-12.4-openssl_1.0.0_build_fix-1.patch create mode 100644 mailx.spec diff --git a/README.md b/README.md index 7a691f1..18ace45 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,6 @@ # mailx +Heirloom mailx (previously known as nail) is a mail user agent for Unix systems. Highlights are: +- Derived from Berkeley Mail 8.1. An interface like the original Berkeley one is still optionally available; +- Is a free implementation of the System V mailx command and features an interface like that by default. + diff --git a/mailx-12.4-openssl_1.0.0_build_fix-1.patch b/mailx-12.4-openssl_1.0.0_build_fix-1.patch new file mode 100644 index 0000000..52df8d5 --- /dev/null +++ b/mailx-12.4-openssl_1.0.0_build_fix-1.patch @@ -0,0 +1,177 @@ +Submitted By: Ken Moffat +Date: 2010-10-01 +Initial Package Version: 12.4 +Upstream Status: Applied +Origin: Upstream, patch originally from Bernhard Rosenkränzer +Description: Let mailx compile with openssl-1.0.0 and later. +Comment: Upstream is still at http://nail.cvs.sourceforge.net/viewvc/nail/nail/ + +diff -Naur mailx-12.4.orig//makeconfig mailx-12.4/makeconfig +--- mailx-12.4.orig//makeconfig 2007-04-14 16:24:28.000000000 +0100 ++++ mailx-12.4/makeconfig 2010-09-01 20:38:30.604945969 +0100 +@@ -1,7 +1,7 @@ + #!/bin/sh + + # +-# Sccsid @(#)makeconfig 1.43 (gritter) 4/14/07 ++# Sccsid @(#)makeconfig 1.44 (gritter) 5/26/09 + # + + tmp=___build$$ +@@ -393,6 +393,25 @@ + ! + fi + ++if test x$have_openssl = xyes ++then ++ compile_check stack_of 'for STACK_OF()' '#define HAVE_STACK_OF' <<\! ++#include ++#include ++#include ++#include ++#include ++ ++int main(void) ++{ ++ STACK_OF(GENERAL_NAME) *gens = NULL; ++ printf("%p", gens); /* to make it used */ ++ SSLv23_client_method(); ++ PEM_read_PrivateKey(0, 0, 0, 0); ++ return 0; ++} ++! ++fi + + cat >$tmp2.c <<\! + #include +diff -Naur mailx-12.4.orig//openssl.c mailx-12.4/openssl.c +--- mailx-12.4.orig//openssl.c 2007-08-04 12:38:03.000000000 +0100 ++++ mailx-12.4/openssl.c 2010-09-01 20:38:41.220028132 +0100 +@@ -38,7 +38,7 @@ + + #ifndef lint + #ifdef DOSCCS +-static char sccsid[] = "@(#)openssl.c 1.25 (gritter) 8/4/07"; ++static char sccsid[] = "@(#)openssl.c 1.26 (gritter) 5/26/09"; + #endif + #endif /* not lint */ + +@@ -101,12 +101,17 @@ + static int ssl_rand_init(void); + static void ssl_init(void); + static int ssl_verify_cb(int success, X509_STORE_CTX *store); +-static SSL_METHOD *ssl_select_method(const char *uhp); ++static const SSL_METHOD *ssl_select_method(const char *uhp); + 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); ++#ifdef HAVE_STACK_OF ++static int smime_verify(struct message *m, int n, STACK_OF(X509) *chain, ++ X509_STORE *store); ++#else + static int smime_verify(struct message *m, int n, STACK *chain, + X509_STORE *store); ++#endif + static EVP_CIPHER *smime_cipher(const char *name); + static int ssl_password_cb(char *buf, int size, int rwflag, void *userdata); + static FILE *smime_sign_cert(const char *xname, const char *xname2, int warn); +@@ -203,10 +208,10 @@ + return 1; + } + +-static SSL_METHOD * ++static const SSL_METHOD * + ssl_select_method(const char *uhp) + { +- SSL_METHOD *method; ++ const SSL_METHOD *method; + char *cp; + + cp = ssl_method_string(uhp); +@@ -308,7 +313,11 @@ + X509 *cert; + X509_NAME *subj; + char data[256]; ++#ifdef HAVE_STACK_OF ++ STACK_OF(GENERAL_NAME) *gens; ++#else + /*GENERAL_NAMES*/STACK *gens; ++#endif + GENERAL_NAME *gen; + int i; + +@@ -357,7 +366,8 @@ + + ssl_init(); + ssl_set_vrfy_level(uhp); +- if ((sp->s_ctx = SSL_CTX_new(ssl_select_method(uhp))) == NULL) { ++ if ((sp->s_ctx = ++ SSL_CTX_new((SSL_METHOD *)ssl_select_method(uhp))) == NULL) { + ssl_gen_err(catgets(catd, CATSET, 261, "SSL_CTX_new() failed")); + return STOP; + } +@@ -496,7 +506,11 @@ + } + + static int ++#ifdef HAVE_STACK_OF ++smime_verify(struct message *m, int n, STACK_OF(X509) *chain, X509_STORE *store) ++#else + smime_verify(struct message *m, int n, STACK *chain, X509_STORE *store) ++#endif + { + struct message *x; + char *cp, *sender, *to, *cc, *cnttype; +@@ -505,7 +519,12 @@ + off_t size; + BIO *fb, *pb; + PKCS7 *pkcs7; ++#ifdef HAVE_STACK_OF ++ STACK_OF(X509) *certs; ++ STACK_OF(GENERAL_NAME) *gens; ++#else + STACK *certs, *gens; ++#endif + X509 *cert; + X509_NAME *subj; + char data[LINESIZE]; +@@ -614,7 +633,11 @@ + { + int *msgvec = vp, *ip; + int ec = 0; ++#ifdef HAVE_STACK_OF ++ STACK_OF(X509) *chain = NULL; ++#else + STACK *chain = NULL; ++#endif + X509_STORE *store; + char *ca_dir, *ca_file; + +@@ -687,7 +710,11 @@ + X509 *cert; + PKCS7 *pkcs7; + BIO *bb, *yb; ++#ifdef HAVE_STACK_OF ++ STACK_OF(X509) *certs; ++#else + STACK *certs; ++#endif + EVP_CIPHER *cipher; + + certfile = expand((char *)certfile); +@@ -950,9 +977,14 @@ + off_t size; + BIO *fb, *pb; + PKCS7 *pkcs7; ++#ifdef HAVE_STACK_OF ++ STACK_OF(X509) *certs; ++ STACK_OF(X509) *chain = NULL; ++#else + STACK *certs; +- X509 *cert; + STACK *chain = NULL; ++#endif ++ X509 *cert; + enum okay ok = OKAY; + + message_number = n; diff --git a/mailx.spec b/mailx.spec new file mode 100644 index 0000000..a0e854c --- /dev/null +++ b/mailx.spec @@ -0,0 +1,61 @@ +Name: mailx +Version: 12.4 +Release: 2mamba +Summary: A simple mail user agent for Unix systems derived from Berkeley Mail +Group: Applications/Networking +Vendor: openmamba +Distribution: openmamba +Packager: Silvan Calarco +URL: http://heirloom.sourceforge.net/mailx.html +Source: http://ovh.dl.sourceforge.net/sourceforge/heirloom/mailx-%{version}.tar.bz2 +Patch0: %{name}-12.4-openssl_1.0.0_build_fix-1.patch +## AUTOBUILDREQ-BEGIN +BuildRequires: glibc-devel +BuildRequires: libgss-devel +BuildRequires: libopenssl-devel +## AUTOBUILDREQ-END +License: GPL +BuildRoot: %{_tmppath}/%{name}-%{version}-root + +%description +Heirloom mailx (previously known as nail) is a mail user agent for Unix systems. Highlights are: +- Derived from Berkeley Mail 8.1. An interface like the original Berkeley one is still optionally available; +- Is a free implementation of the System V mailx command and features an interface like that by default. + +%prep +%setup -q +%patch0 -p1 + +%build +%make PREFIX=/ + +%install +%makeinstall PREFIX=/ MANDIR=%{_mandir} UCBINSTALL=%{__install} DESTDIR=%{buildroot} + +%clean +[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" + +%files +%defattr(-,root,root) +/bin/mailx +%config(noreplace) %{_sysconfdir}/nail.rc +%{_mandir}/man1/mailx.1.gz + +%changelog +* Mon Mar 14 2011 Silvan Calarco 12.4-2mamba +- rebuilt with openssl 1.0 + +* Tue Sep 30 2008 Silvan Calarco 12.4-1mamba +- automatic update by autodist + +* Sun May 20 2007 Silvan Calarco 12.2-2mamba +- rebuilt + +* Sat May 19 2007 Silvan Calarco 12.2-1mamba +- update to 12.2 + +* Tue Jun 17 2003 Silvan Calarco 8.1.1-2qilnx +- added /bin/mailx symlink to /bin/mail + +* Tue Jun 12 2003 Silvan Calarco 8.1.1-1qilnx +- first build