summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mail/postsrsd/Makefile5
-rw-r--r--mail/postsrsd/distinfo5
-rw-r--r--mail/postsrsd/files/patch-CMakeLists.txt10
-rw-r--r--mail/postsrsd/files/patch-postinstall.cmake.in9
-rw-r--r--mail/postsrsd/files/patch-srs2.c15
-rw-r--r--mail/postsrsd/files/patch-srs2.h11
-rw-r--r--mail/postsrsd/files/postsrsd.in33
7 files changed, 28 insertions, 60 deletions
diff --git a/mail/postsrsd/Makefile b/mail/postsrsd/Makefile
index 153baee3fd4e..fa5c60ce3349 100644
--- a/mail/postsrsd/Makefile
+++ b/mail/postsrsd/Makefile
@@ -2,8 +2,7 @@
# $FreeBSD$
PORTNAME= postsrsd
-PORTVERSION= 1.3
-PORTREVISION= 2
+PORTVERSION= 1.4
CATEGORIES= mail
MAINTAINER= ports@bsdserwis.com
@@ -31,6 +30,6 @@ OPTIONS_DEFINE= DOCS
DOCS_CMAKE_ON= -DENABLE_DOCS:STRING="ON"
-PLIST_FILES= sbin/postsrsd man/man8/postsrsd.8.gz etc/postsrsd.secret
+PLIST_FILES= sbin/postsrsd man/man8/postsrsd.8.gz
.include <bsd.port.mk>
diff --git a/mail/postsrsd/distinfo b/mail/postsrsd/distinfo
index 76e3fc435507..b2f329210c46 100644
--- a/mail/postsrsd/distinfo
+++ b/mail/postsrsd/distinfo
@@ -1,2 +1,3 @@
-SHA256 (roehling-postsrsd-1.3_GH0.tar.gz) = 0f72c41052204a17c35a22a7651430156ca1dbcb98b1bfe48e44ec76248b62fc
-SIZE (roehling-postsrsd-1.3_GH0.tar.gz) = 26409
+TIMESTAMP = 1488207086
+SHA256 (roehling-postsrsd-1.4_GH0.tar.gz) = f3230d57c36ba4688cc3beb90fbb0f199a06381e4df2edbc4ef541a9e8a574ff
+SIZE (roehling-postsrsd-1.4_GH0.tar.gz) = 26555
diff --git a/mail/postsrsd/files/patch-CMakeLists.txt b/mail/postsrsd/files/patch-CMakeLists.txt
index c284977a6300..ec69da464b17 100644
--- a/mail/postsrsd/files/patch-CMakeLists.txt
+++ b/mail/postsrsd/files/patch-CMakeLists.txt
@@ -25,8 +25,8 @@
find_library(LIBSOCKET socket)
find_library(LIBNSL nsl)
-@@ -46,26 +47,6 @@ if(HAVE_TIME_H)
- add_definitions(-DHAVE_TIME_H)
+@@ -54,26 +55,6 @@ if(HAVE_SYS_TYPES_H)
+ add_definitions(-DHAVE_SYS_TYPES_H)
endif()
-if(NOT DEFINED INIT_FLAVOR)
@@ -52,7 +52,7 @@
add_executable(${PROJECT_NAME} postsrsd.c sha1.c srs2.c)
if(${CMAKE_SYSTEM_NAME} MATCHES "SunOS")
-@@ -74,15 +55,7 @@ endif()
+@@ -82,15 +63,7 @@ endif()
get_target_property(POSTSRSD ${PROJECT_NAME} LOCATION)
get_filename_component(POSTSRSD ${POSTSRSD} NAME_WE)
@@ -68,7 +68,7 @@
configure_file(init/${PROJECT_NAME}.default.in ${PROJECT_NAME}.default @ONLY)
configure_file(postinstall.cmake.in postinstall.cmake @ONLY)
-@@ -92,7 +65,7 @@ add_custom_command(TARGET ${PROJECT_NAME
+@@ -100,7 +73,7 @@ add_custom_command(TARGET ${PROJECT_NAME
COMMAND ${HELP2MAN} ARGS -s8 -o${PROJECT_NAME}.8 -n "Postfix Sender Rewriting Scheme daemon" -N -h-h -v-v ${CMAKE_CURRENT_BINARY_DIR}/${POSTSRSD}
VERBATIM
)
@@ -77,7 +77,7 @@
endif()
if(USE_APPARMOR)
-@@ -100,6 +73,8 @@ if(USE_APPARMOR)
+@@ -108,6 +81,8 @@ if(USE_APPARMOR)
endif()
install(TARGETS ${PROJECT_NAME} DESTINATION "sbin")
diff --git a/mail/postsrsd/files/patch-postinstall.cmake.in b/mail/postsrsd/files/patch-postinstall.cmake.in
index 6ba00e24880e..91b345d09cf8 100644
--- a/mail/postsrsd/files/patch-postinstall.cmake.in
+++ b/mail/postsrsd/files/patch-postinstall.cmake.in
@@ -1,6 +1,11 @@
--- postinstall.cmake.in.orig 2015-12-13 08:56:05 UTC
+++ postinstall.cmake.in
-@@ -7,51 +7,13 @@ set(INIT_FLAVOR "@INIT_FLAVOR@")
+@@ -1,4 +1,3 @@
+-set(GENERATE_SRS_SECRET "@GENERATE_SRS_SECRET@")
+ set(SYSCONF_DIR "@SYSCONF_DIR@")
+ set(SYSD_UNIT_DIR "@SYSD_UNIT_DIR@")
+ set(CHROOT_DIR "@CHROOT_DIR@")
+@@ -7,51 +6,13 @@ set(INIT_FLAVOR "@INIT_FLAVOR@")
set(SECRET_FILE "@PROJECT_NAME@.secret")
set(DD "@DD@")
set(BASE64_ENCODE "@BASE64_ENCODE@")
@@ -53,7 +58,7 @@
message(STATUS "Generating secret key")
execute_process(
COMMAND ${DD} if=/dev/urandom bs=18 count=1
-@@ -60,7 +22,7 @@ if(GENERATE_SRS_SECRET AND DD AND BASE64
+@@ -60,7 +21,7 @@ if(GENERATE_SRS_SECRET AND DD AND BASE64
ERROR_QUIET
OUTPUT_STRIP_TRAILING_WHITESPACE
)
diff --git a/mail/postsrsd/files/patch-srs2.c b/mail/postsrsd/files/patch-srs2.c
deleted file mode 100644
index a9c09a5e1b14..000000000000
--- a/mail/postsrsd/files/patch-srs2.c
+++ /dev/null
@@ -1,15 +0,0 @@
---- srs2.c.orig 2015-12-13 08:56:05 UTC
-+++ srs2.c
-@@ -21,7 +21,11 @@
- #include <sys/types.h> /* tyepdefs */
- #include <sys/time.h> /* timeval / timezone struct */
- #include <string.h> /* memcpy, strcpy, memset */
--#include <alloca.h>
-+#if defined(__FreeBSD__)
-+# include <stdlib.h>
-+#else
-+# include <alloca.h>
-+#endif
-
- #ifdef USE_OPENSSL
- #include <openssl/hmac.h>
diff --git a/mail/postsrsd/files/patch-srs2.h b/mail/postsrsd/files/patch-srs2.h
deleted file mode 100644
index 95a1e351f8f2..000000000000
--- a/mail/postsrsd/files/patch-srs2.h
+++ /dev/null
@@ -1,11 +0,0 @@
---- srs2.h.orig 2015-12-13 08:56:05 UTC
-+++ srs2.h
-@@ -23,7 +23,7 @@
- #ifdef __APPLE__
- #include <sys/types.h>
- #endif
--
-+#include <time.h>
-
- #ifndef __BEGIN_DECLS
- #define __BEGIN_DECLS
diff --git a/mail/postsrsd/files/postsrsd.in b/mail/postsrsd/files/postsrsd.in
index 835f3ac39afc..ca0190588306 100644
--- a/mail/postsrsd/files/postsrsd.in
+++ b/mail/postsrsd/files/postsrsd.in
@@ -52,29 +52,15 @@ load_rc_config $name
# Options other than above can be set with $postsrsd_flags.
# see postsrsd documentation for detail.
-if [ "x${postsrsd_uid}" != "x" ];then
- _uid_prefix="-u"
-fi
-if [ "x${postsrsd_domain}" != "x" ];then
- postsrsd_domain="-d ${postsrsd_domain}"
-fi
-if [ "x${postsrsd_secret}" != "x" ];then
- postsrsd_secret="-s ${postsrsd_secret}"
-fi
-if [ "x${postsrsd_forward_port}" != "x" ];then
- postsrsd_forward_port="-f ${postsrsd_forward_port}"
-fi
-if [ "x${postsrsd_reverse_port}" != "x" ];then
- postsrsd_reverse_port="-r ${postsrsd_reverse_port}"
-fi
-if [ "x${postsrsd_idle_timeout}" != "x" ];then
- postsrsd_idle_timeout="-t ${postsrsd_idle_timeout}"
-fi
-if [ "x${postsrsd_exclude_domains}" != "x" ];then
- postsrsd_exclude_domains="-X${postsrsd_exclude_domains}"
-fi
+[ -n "${postsrsd_uid}" ] && _uid_prefix="-u"
+[ -n "${postsrsd_domain}" ] && cmd_args="-d ${postsrsd_domain}"
+[ -n "${postsrsd_secret}" ] && cmd_args="${cmd_args} -s ${postsrsd_secret}"
+[ -n "${postsrsd_forward_port}" ] && cmd_args="${cmd_args} -f ${postsrsd_forward_port}"
+[ -n "${postsrsd_reverse_port}" ] && cmd_args="${cmd_args} -r ${postsrsd_reverse_port}"
+[ -n "${postsrsd_idle_timeout}" ] && cmd_args="${cmd_args} -t ${postsrsd_idle_timeout}"
+[ -n "${postsrsd_exclude_domains}" ] && cmd_args="${cmd_args} -X${postsrsd_exclude_domains}"
-command_args=" -D ${_uid_prefix} ${postsrsd_uid} -p ${pidfile} ${postsrsd_domain} ${postsrsd_secret} ${postsrsd_forward_port} ${postsrsd_reverse_port} ${postsrsd_idle_timeout} ${postsrsd_exclude_domains} ${postsrsd_flags}"
+command_args=" -D ${_uid_prefix} ${postsrsd_uid} -p ${pidfile} ${cmd_args} ${postsrsd_flags}"
postsrsd_prepcmd ()
{
@@ -84,6 +70,9 @@ postsrsd_prepcmd ()
if [ -n "${postsrsd_uid}" ] ; then
chown ${postsrsd_uid} ${_piddir}
fi
+ if [ ! -f "${postsrsd_secret}" ] ; then
+ tr -cd "[:alnum:]" < /dev/urandom | head -c 24 > "${postsrsd_secret}"
+ fi
}
postsrsd_postcmd()