aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRodrigo Osorio <rodrigo@FreeBSD.org>2023-09-14 14:04:11 +0000
committerRodrigo Osorio <rodrigo@FreeBSD.org>2023-09-15 08:57:44 +0000
commit2cf1aff496796ba20029b9952cc82d01b166a402 (patch)
tree4397df61e52187e9cc8caaef0986addfdfc45c4f
parent7bcf779c114694009eb049c972e1e70daf90502d (diff)
downloadports-2cf1aff496796ba20029b9952cc82d01b166a402.tar.gz
ports-2cf1aff496796ba20029b9952cc82d01b166a402.zip
benchmarks/postal: update to 0.76
Major changes: * Fix buffer underrun * Add -b option to bind to an address to bhm * Improve build Port changes: * Update MASTER_SITE and WWW
-rw-r--r--benchmarks/postal/Makefile9
-rw-r--r--benchmarks/postal/distinfo5
-rw-r--r--benchmarks/postal/files/patch-bhm.cpp47
-rw-r--r--benchmarks/postal/files/patch-bhmusers.h36
-rw-r--r--benchmarks/postal/files/patch-postal.cpp21
-rw-r--r--benchmarks/postal/files/patch-rabid.cpp22
-rw-r--r--benchmarks/postal/files/patch-smtp.h26
7 files changed, 25 insertions, 141 deletions
diff --git a/benchmarks/postal/Makefile b/benchmarks/postal/Makefile
index 1d58d3bbb4fa..c5ac9cd1ca92 100644
--- a/benchmarks/postal/Makefile
+++ b/benchmarks/postal/Makefile
@@ -1,12 +1,11 @@
PORTNAME= postal
-PORTVERSION= 0.73
-PORTREVISION= 3
+PORTVERSION= 0.76
CATEGORIES= benchmarks mail
-MASTER_SITES= http://www.coker.com.au/postal/
+MASTER_SITES= https://www.coker.com.au/postal/
MAINTAINER= ports@FreeBSD.org
COMMENT= Benchmark SMTP/POP servers
-WWW= https://www.coker.com.au/postal/
+WWW= https://doc.coker.com.au/projects/postal/
LICENSE= GPLv3
@@ -22,9 +21,9 @@ PLIST_FILES= bin/postal-list \
sbin/postal \
sbin/rabid
+OPTIONS_DEFAULT= OPENSSL
OPTIONS_RADIO= TLS
OPTIONS_RADIO_TLS= GNUTLS OPENSSL
-OPTIONS_DEFAULT= OPENSSL
GNUTLS_LIB_DEPENDS= libgnutls.so:security/gnutls
GNUTLS_USES= pkgconfig
diff --git a/benchmarks/postal/distinfo b/benchmarks/postal/distinfo
index d791d21c619d..ab0513ecfdbf 100644
--- a/benchmarks/postal/distinfo
+++ b/benchmarks/postal/distinfo
@@ -1,2 +1,3 @@
-SHA256 (postal-0.73.tgz) = 25cc208f5a86d393707164d33a8dfb6ca5b9f586d0d401d549fc15179b766030
-SIZE (postal-0.73.tgz) = 106171
+TIMESTAMP = 1694465477
+SHA256 (postal-0.76.tgz) = 0cc13df48d7e3355289088fbe9ce01fb80ba16fca309d54918c36223b84bf0df
+SIZE (postal-0.76.tgz) = 100260
diff --git a/benchmarks/postal/files/patch-bhm.cpp b/benchmarks/postal/files/patch-bhm.cpp
index 7d49a99c97a4..2c61d2f21756 100644
--- a/benchmarks/postal/files/patch-bhm.cpp
+++ b/benchmarks/postal/files/patch-bhm.cpp
@@ -1,41 +1,6 @@
---- bhm.cpp.orig 2012-01-14 12:09:31 UTC
+--- bhm.cpp.orig 2016-06-30 09:04:24 UTC
+++ bhm.cpp
-@@ -3,27 +3,25 @@
- #endif
-
- #include "bhmusers.h"
--#include <errno.h>
--#include <ctype.h>
-+#include <cerrno>
-+#include <cctype>
- #include <unistd.h>
- #include <sys/wait.h>
--#include <signal.h>
--#include <stdio.h>
-+#include <csignal>
-+#include <cstdio>
-+#include <cstdlib>
- #include <sys/poll.h>
- #include <sys/types.h>
- #include <sys/socket.h>
- #include <arpa/inet.h>
-+#ifndef __FreeBSD__
- #include <netinet/ip.h>
-+#endif
-
- #include "postal.h"
- #include "logit.h"
- #include "results.h"
- #include "basictcp.h"
--#ifdef USE_GNUTLS
--#include <errno.h>
--#include <gcrypt.h>
--GCRY_THREAD_OPTION_PTHREAD_IMPL;
--#endif
-
- int processes = 0;
- int *thread_status;
-@@ -47,7 +45,7 @@ void usage(CPCCHAR msg = NULL)
+@@ -50,7 +50,7 @@
int maxMsgSize = 10240;
results res;
@@ -44,7 +9,7 @@
int exitCount = 0;
-@@ -261,7 +259,7 @@ int readCommand(base_tcp &t, char *buf, int bufSize, b
+@@ -264,7 +264,7 @@
void do_work(thread_data *td)
{
@@ -53,7 +18,7 @@
#ifdef USE_SSL
, td->ssl
#endif
-@@ -408,7 +406,7 @@ int main(int argc, char **argv)
+@@ -414,7 +414,7 @@
#endif
"\n");
@@ -62,10 +27,10 @@
Logit *debug = NULL;
if(debugName)
-@@ -419,7 +417,7 @@ int main(int argc, char **argv)
+@@ -425,7 +425,7 @@
in.sin_family = AF_INET;
in.sin_port = htons(port);
- in.sin_addr.s_addr = INADDR_ANY;
+ memcpy(&in.sin_addr, &sin_addr, sizeof(sin_addr));
- if(listen_fd == -1 || bind(listen_fd, (sockaddr *)&in, sizeof(in))
+ if(listen_fd == -1 || ::bind(listen_fd, (sockaddr *)&in, sizeof(in))
|| listen(listen_fd, 10))
diff --git a/benchmarks/postal/files/patch-bhmusers.h b/benchmarks/postal/files/patch-bhmusers.h
index 5feaa1234e19..7d1bcde83da9 100644
--- a/benchmarks/postal/files/patch-bhmusers.h
+++ b/benchmarks/postal/files/patch-bhmusers.h
@@ -1,44 +1,20 @@
---- bhmusers.h.orig 2006-09-28 15:20:28 UTC
+--- bhmusers.h.orig 2016-06-30 08:57:25 UTC
+++ bhmusers.h
-@@ -6,12 +6,16 @@ using namespace std;
+@@ -6,7 +6,7 @@
#include <string>
#include "conf.h"
-+#if defined(_LIBCPP_VERSION)
+-#include <tr1/unordered_map>
+#include <unordered_map>
-+#else
- #ifdef HAVE_EXT_HASH_MAP
- using namespace __gnu_cxx;
- #include <ext/hash_map>
- #else
- #include <hash_map.h>
- #endif
-+#endif
#include "postal.h"
-@@ -23,7 +27,12 @@ typedef struct
+@@ -18,7 +18,7 @@
int sync_time;
} BHM_DATA;
-+
-+#if defined(_LIBCPP_VERSION)
-+namespace std
-+#else
- namespace __gnu_cxx
-+#endif
- {
- template<> struct hash< std::string >
- {
-@@ -34,7 +43,11 @@ namespace __gnu_cxx
- };
- }
-
-+#if defined(_LIBCPP_VERSION)
-+typedef std::unordered_map<string, BHM_DATA , hash<string> > NAME_MAP;
-+#else
- typedef hash_map<string, BHM_DATA , hash<string> > NAME_MAP;
-+#endif
+-typedef std::tr1::unordered_map<string, BHM_DATA, hash<string> > NAME_MAP;
++typedef std::unordered_map<string, BHM_DATA, hash<string> > NAME_MAP;
class BHMUsers
{
diff --git a/benchmarks/postal/files/patch-postal.cpp b/benchmarks/postal/files/patch-postal.cpp
deleted file mode 100644
index ff6f908d592e..000000000000
--- a/benchmarks/postal/files/patch-postal.cpp
+++ /dev/null
@@ -1,21 +0,0 @@
---- postal.cpp.orig 2012-01-14 12:08:12 UTC
-+++ postal.cpp
-@@ -6,15 +6,11 @@
- #include "smtp.h"
- #include <unistd.h>
- #include <sys/wait.h>
--#include <signal.h>
--#include <stdio.h>
-+#include <csignal>
-+#include <cstdio>
-+#include <cstdlib>
- #include "postal.h"
- #include "logit.h"
--#ifdef USE_GNUTLS
--#include <errno.h>
--#include <gcrypt.h>
--GCRY_THREAD_OPTION_PTHREAD_IMPL;
--#endif
-
- void usage()
- {
diff --git a/benchmarks/postal/files/patch-rabid.cpp b/benchmarks/postal/files/patch-rabid.cpp
deleted file mode 100644
index cc7526af3e0e..000000000000
--- a/benchmarks/postal/files/patch-rabid.cpp
+++ /dev/null
@@ -1,22 +0,0 @@
---- rabid.cpp.orig 2012-01-14 12:08:49 UTC
-+++ rabid.cpp
-@@ -7,15 +7,14 @@
- #include <cstdlib>
- #include <unistd.h>
- #include <sys/wait.h>
--#include <signal.h>
--#include <stdio.h>
-+#include <csignal>
-+#include <cstdio>
-+#include <cstring>
- #include <strings.h>
- #include "postal.h"
- #include "logit.h"
- #ifdef USE_GNUTLS
--#include <errno.h>
--#include <gcrypt.h>
--GCRY_THREAD_OPTION_PTHREAD_IMPL;
-+#include <cerrno>
- #endif
-
- void usage()
diff --git a/benchmarks/postal/files/patch-smtp.h b/benchmarks/postal/files/patch-smtp.h
index 0be7c57dba19..a100a39dc434 100644
--- a/benchmarks/postal/files/patch-smtp.h
+++ b/benchmarks/postal/files/patch-smtp.h
@@ -1,34 +1,20 @@
---- smtp.h.orig 2012-01-14 12:36:56 UTC
+--- smtp.h.orig 2016-06-30 08:51:27 UTC
+++ smtp.h
-@@ -4,14 +4,18 @@
- using namespace std;
- #include <string>
+@@ -6,7 +6,7 @@
#include <cstring>
--#include <time.h>
-+#include <ctime>
+ #include <time.h>
#include "conf.h"
-+#if defined(_LIBCPP_VERSION)
+-#include <tr1/unordered_map>
+#include <unordered_map>
-+#else
- #ifdef HAVE_EXT_HASH_MAP
- using namespace __gnu_cxx;
- #include <ext/hash_map>
- #else
- #include <hash_map.h>
- #endif
-+#endif
#include "tcp.h"
#include "mutex.h"
-@@ -30,7 +34,11 @@ struct eqlng
+@@ -25,7 +25,7 @@
}
};
-+#if defined(_LIBCPP_VERSION)
+-typedef std::tr1::unordered_map<unsigned long, string *, hash<unsigned long>, eqlng> NAME_MAP;
+typedef std::unordered_map<unsigned long, string *, hash<unsigned long>, eqlng> NAME_MAP;
-+#else
- typedef hash_map<unsigned long, string *, hash<unsigned long>, eqlng> NAME_MAP;
-+#endif
class smtpData
{