Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 18 Jan 2016 20:29:11 +0000 (UTC)
From:      Kurt Jaeger <pi@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r406609 - in head/mail/postsrsd: . files
Message-ID:  <201601182029.u0IKTB3k092693@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: pi
Date: Mon Jan 18 20:29:11 2016
New Revision: 406609
URL: https://svnweb.freebsd.org/changeset/ports/406609

Log:
  mail/postsrsd: 1.1 -> 1.3
  
  Changes:
    https://github.com/roehling/postsrsd/commits/master
  
  PR:		206116
  Submitted by:	Krzysztof <ports@bsdserwis.com> (maintainer)

Deleted:
  head/mail/postsrsd/files/patch-postsrsd.c
  head/mail/postsrsd/pkg-plist
Modified:
  head/mail/postsrsd/Makefile
  head/mail/postsrsd/distinfo
  head/mail/postsrsd/files/patch-CMakeLists.txt
  head/mail/postsrsd/files/patch-postinstall.cmake.in
  head/mail/postsrsd/files/patch-srs2.c
  head/mail/postsrsd/files/patch-srs2.h

Modified: head/mail/postsrsd/Makefile
==============================================================================
--- head/mail/postsrsd/Makefile	Mon Jan 18 19:48:35 2016	(r406608)
+++ head/mail/postsrsd/Makefile	Mon Jan 18 20:29:11 2016	(r406609)
@@ -2,8 +2,7 @@
 # $FreeBSD$
 
 PORTNAME=	postsrsd
-PORTVERSION=	1.1
-PORTREVISION=	1
+PORTVERSION=	1.3
 CATEGORIES=	mail
 
 MAINTAINER=	ports@bsdserwis.com
@@ -25,10 +24,12 @@ CMAKE_ARGS+=	--no-warn-unused-cli \
 USE_LDCONFIG=	${PREFIX}/lib/${PORTNAME}
 USE_RC_SUBR=	${PORTNAME}
 
-PORTDOCS=	README.md main.cf.ex
+PORTDOCS=	README.md main.cf.ex README_UPGRADE.md
 
 OPTIONS_DEFINE=	DOCS
 
 DOCS_CMAKE_ON=	-DENABLE_DOCS:STRING="ON"
 
+PLIST_FILES=	sbin/postsrsd man/man8/postsrsd.8.gz etc/postsrsd.secret
+
 .include <bsd.port.mk>

Modified: head/mail/postsrsd/distinfo
==============================================================================
--- head/mail/postsrsd/distinfo	Mon Jan 18 19:48:35 2016	(r406608)
+++ head/mail/postsrsd/distinfo	Mon Jan 18 20:29:11 2016	(r406609)
@@ -1,2 +1,2 @@
-SHA256 (roehling-postsrsd-1.1_GH0.tar.gz) = 1bd8d92e94951cced7eb50f1cd571fb08d2fec627362ceab090393425925a83e
-SIZE (roehling-postsrsd-1.1_GH0.tar.gz) = 24209
+SHA256 (roehling-postsrsd-1.3_GH0.tar.gz) = 0f72c41052204a17c35a22a7651430156ca1dbcb98b1bfe48e44ec76248b62fc
+SIZE (roehling-postsrsd-1.3_GH0.tar.gz) = 26409

Modified: head/mail/postsrsd/files/patch-CMakeLists.txt
==============================================================================
--- head/mail/postsrsd/files/patch-CMakeLists.txt	Mon Jan 18 19:48:35 2016	(r406608)
+++ head/mail/postsrsd/files/patch-CMakeLists.txt	Mon Jan 18 20:29:11 2016	(r406609)
@@ -1,6 +1,6 @@
---- CMakeLists.txt	2014-01-03 01:01:47.000000000 +0100
-+++ CMakeLists.txt.new	2014-06-18 02:01:27.734952000 +0200
-@@ -3,45 +3,22 @@
+--- CMakeLists.txt.orig	2015-12-13 08:56:05 UTC
++++ CMakeLists.txt
+@@ -4,11 +4,14 @@ include(CheckIncludeFile)
  
  option(GENERATE_SRS_SECRET "Generate a random SRS secret if none exists during install" ON)
  option(USE_APPARMOR "Enable AppArmor profile" OFF)
@@ -8,50 +8,67 @@
  
 +if(MK_CHROOT_DIR)
  set(CHROOT_DIR "${CMAKE_INSTALL_PREFIX}/lib/${PROJECT_NAME}" CACHE PATH "Chroot jail for daemon")
--set(CONFIG_DIR "/etc/default" CACHE PATH "Location of configuration file")
 +endif()
-+set(CONFIG_DIR "${CMAKE_INSTALL_PREFIX}/etc" CACHE PATH "Location of configuration file")
+ set(SYSCONF_DIR "/etc" CACHE PATH "Global system configuration folder")
+ set(SYSD_UNIT_DIR "${SYSCONF_DIR}/systemd/system" CACHE PATH "Systemd unit file folder")
+-set(CONFIG_DIR "${SYSCONF_DIR}/default" CACHE PATH "Location of startup configuration file")
++set(CONFIG_DIR "${CMAKE_INSTALL_PREFIX}/etc" CACHE PATH "Location of startup configuration file")
+ set(DOC_DIR "share/doc/${PROJECT_NAME}" CACHE PATH "Path for documentation files")
+ mark_as_advanced(CHROOT_DIR SYSCONF_DIR SYSD_UNIT_DIR CONFIG_DIR DOC_DIR)
  
- find_program(HELP2MAN help2man DOC "path to help2man executable")
+@@ -16,8 +19,6 @@ find_program(HELP2MAN help2man DOC "path
  find_program(DD dd DOC "path to dd executable")
  find_program(BASE64 base64 DOC "path to base64 executable")
+ find_program(OPENSSL openssl DOC "path to OpenSSL executable")
 -find_program(INSSERV insserv DOC "path to insserv executable")
 -find_program(CHKCONFIG chkconfig DOC "path to chkconfig executable")
--
+ find_library(LIBSOCKET socket)
+ find_library(LIBNSL nsl)
+ 
+@@ -46,26 +47,6 @@ if(HAVE_TIME_H)
+     add_definitions(-DHAVE_TIME_H)
+ endif()
+ 
 -if(NOT DEFINED INIT_FLAVOR)
--    if(IS_DIRECTORY "/etc/init" AND EXISTS "/lib/init/upstart-job")
+-	if(IS_DIRECTORY "${SYSD_UNIT_DIR}" AND EXISTS "/usr/lib/systemd/systemd")
+-        message(STATUS "Detected init flavor: systemd")
+-        set(INIT_FLAVOR "systemd" CACHE STRING "Init daemon of this system")
+-    elseif(IS_DIRECTORY "${SYSCONF_DIR}/init" AND EXISTS "/lib/init/upstart-job")
 -        message(STATUS "Detected init flavor: upstart")
 -        set(INIT_FLAVOR "upstart" CACHE STRING "Init daemon of this system")
--    elseif(IS_DIRECTORY "/etc/init.d" AND EXISTS "/lib/lsb/init-functions")
--        message(STATUS "Detected init flavor: sysv-lsb")
--        set(INIT_FLAVOR "sysv-lsb" CACHE STRING "Init daemon of this system")
--    elseif(IS_DIRECTORY "/etc/init.d" AND EXISTS "/etc/init.d/functions")
+-    elseif(IS_DIRECTORY "${SYSCONF_DIR}/init.d" AND EXISTS "${SYSCONF_DIR}/init.d/functions")
 -        message(STATUS "Detected init flavor: sysv-redhat")
 -        set(INIT_FLAVOR "sysv-redhat" CACHE STRING "Init daemon of this system")
+-    elseif(IS_DIRECTORY "${SYSCONF_DIR}/init.d" AND EXISTS "/lib/lsb/init-functions")
+-        message(STATUS "Detected init flavor: sysv-lsb")
+-        set(INIT_FLAVOR "sysv-lsb" CACHE STRING "Init daemon of this system")
 -    else()
 -        message(STATUS "Detected init flavor: none")
 -        message(STATUS "System startup files will not be installed")
 -        set(INIT_FLAVOR "" CACHE STRING "Init daemon of this system")
 -    endif()
 -endif()
- 
+-
  add_executable(${PROJECT_NAME} postsrsd.c sha1.c srs2.c)
  
+ if(${CMAKE_SYSTEM_NAME} MATCHES "SunOS")
+@@ -74,15 +55,7 @@ endif()
+ 
  get_target_property(POSTSRSD ${PROJECT_NAME} LOCATION)
  get_filename_component(POSTSRSD ${POSTSRSD} NAME_WE)
 -set(APPARMOR_PROFILE "${CMAKE_INSTALL_PREFIX}/sbin/${POSTSRSD}")
 -string(REGEX REPLACE "^/+" "" APPARMOR_PROFILE "${APPARMOR_PROFILE}")
 -string(REPLACE "/" "." APPARMOR_PROFILE "${APPARMOR_PROFILE}")
--
--configure_file(${PROJECT_NAME}.lsb_init.in ${PROJECT_NAME}.lsb_init @ONLY)
--configure_file(${PROJECT_NAME}.rh_init.in ${PROJECT_NAME}.rh_init @ONLY)
--configure_file(${PROJECT_NAME}.upstart.in ${PROJECT_NAME}.upstart @ONLY)
--configure_file(${PROJECT_NAME}.apparmor.in ${PROJECT_NAME}.apparmor @ONLY)
-+
- configure_file(postinstall.cmake.in postinstall.cmake @ONLY)
  
- if(HELP2MAN)
-@@ -49,7 +26,7 @@
+-configure_file(init/${PROJECT_NAME}.sysv-lsb.in ${PROJECT_NAME}.sysv-lsb @ONLY)
+-configure_file(init/${PROJECT_NAME}.sysv-redhat.in ${PROJECT_NAME}.sysv-redhat @ONLY)
+-configure_file(init/${PROJECT_NAME}.upstart.in ${PROJECT_NAME}.upstart @ONLY)
+-configure_file(init/${PROJECT_NAME}.apparmor.in ${PROJECT_NAME}.apparmor @ONLY)
+-configure_file(init/${PROJECT_NAME}.systemd.in ${PROJECT_NAME}.systemd @ONLY)
+ 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
  	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
  )
@@ -60,12 +77,12 @@
  endif()
  
  if(USE_APPARMOR)
-@@ -57,6 +34,8 @@
+@@ -100,6 +73,8 @@ if(USE_APPARMOR)
  endif()
  
  install(TARGETS ${PROJECT_NAME} DESTINATION "sbin")
 +if(ENABLE_DOCS)
- install(FILES README.md main.cf.ex DESTINATION "share/doc/${PROJECT_NAME}")
+ install(FILES README.md README_UPGRADE.md main.cf.ex DESTINATION "${DOC_DIR}")
 +endif()
  install(SCRIPT "${CMAKE_CURRENT_BINARY_DIR}/postinstall.cmake")
  

Modified: head/mail/postsrsd/files/patch-postinstall.cmake.in
==============================================================================
--- head/mail/postsrsd/files/patch-postinstall.cmake.in	Mon Jan 18 19:48:35 2016	(r406608)
+++ head/mail/postsrsd/files/patch-postinstall.cmake.in	Mon Jan 18 20:29:11 2016	(r406609)
@@ -1,9 +1,9 @@
---- postinstall.cmake.in	2014-01-03 01:01:47.000000000 +0100
-+++ postinstall.cmake.in.new	2014-06-18 01:47:16.240011867 +0200
-@@ -5,37 +5,13 @@
+--- postinstall.cmake.in.orig	2015-12-13 08:56:05 UTC
++++ postinstall.cmake.in
+@@ -7,51 +7,13 @@ set(INIT_FLAVOR "@INIT_FLAVOR@")
  set(SECRET_FILE "@PROJECT_NAME@.secret")
  set(DD "@DD@")
- set(BASE64 "@BASE64@")
+ set(BASE64_ENCODE "@BASE64_ENCODE@")
 -set(INSSERV "@INSSERV@")
 -set(CHKCONFIG "@CHKCONFIG@")
  
@@ -12,38 +12,53 @@
  	file(MAKE_DIRECTORY "$ENV{DESTDIR}${CHROOT_DIR}")
  endif()
  
--if(INIT_FLAVOR AND NOT EXISTS "$ENV{DESTDIR}${CONFIG_DIR}/@PROJECT_NAME@")
--	file(INSTALL FILES "@CMAKE_CURRENT_SOURCE_DIR@/@PROJECT_NAME@.default" DESTINATION "${CONFIG_DIR}" RENAME "@PROJECT_NAME@")
+-if(INIT_FLAVOR)
+-	if (NOT EXISTS "$ENV{DESTDIR}${CONFIG_DIR}/@PROJECT_NAME@")
+-		file(INSTALL FILES "@CMAKE_CURRENT_BINARY_DIR@/@PROJECT_NAME@.default" DESTINATION "${CONFIG_DIR}" RENAME "@PROJECT_NAME@")
+-	else()
+-		file(INSTALL FILES "@CMAKE_CURRENT_BINARY_DIR@/@PROJECT_NAME@.default" DESTINATION "${CONFIG_DIR}" RENAME "@PROJECT_NAME@.new")
+-		message(STATUS "")
+-		message(STATUS "*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*")
+-		message(STATUS "*!* ${CONFIG_DIR}/@PROJECT_NAME@ will NOT be overwritten!")
+-		message(STATUS "*!* Please note the changes from @PROJECT_NAME@.new in the same folder and")
+-		message(STATUS "*!* update your configuration accordinly.")
+-		message(STATUS "*!* See also README_UPGRADE.md for details")
+-		message(STATUS "*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*")
+-		message(STATUS "")
+-	endif()
 -endif()
 -
 -if(INIT_FLAVOR STREQUAL "sysv-lsb")
--	file(INSTALL FILES "@CMAKE_CURRENT_BINARY_DIR@/@PROJECT_NAME@.lsb_init" TYPE PROGRAM DESTINATION "/etc/init.d" RENAME "@PROJECT_NAME@")
+-	file(INSTALL FILES "@CMAKE_CURRENT_BINARY_DIR@/@PROJECT_NAME@.sysv-lsb" TYPE PROGRAM DESTINATION "${SYSCONF_DIR}/init.d" RENAME "@PROJECT_NAME@")
 -	if(INSSERV)
 -		execute_process(
--			COMMAND ${INSSERV} -p "$ENV{DESTDIR}/etc/init.d" @PROJECT_NAME@
+-			COMMAND ${INSSERV} -p "$ENV{DESTDIR}${SYSCONF_DIR}/init.d" @PROJECT_NAME@
 -		)
 -	endif()
 -elseif(INIT_FLAVOR STREQUAL "sysv-redhat")
--	file(INSTALL FILES "@CMAKE_CURRENT_BINARY_DIR@/@PROJECT_NAME@.rh_init" TYPE PROGRAM DESTINATION "/etc/init.d" RENAME "@PROJECT_NAME@")
+-	file(INSTALL FILES "@CMAKE_CURRENT_BINARY_DIR@/@PROJECT_NAME@.sysv-redhat" TYPE PROGRAM DESTINATION "${SYSCONF_DIR}/init.d" RENAME "@PROJECT_NAME@")
 -	if(CHKCONFIG AND NOT "$ENV{DESTDIR}")
 -		execute_process(
 -			COMMAND ${CHKCONFIG} --add @PROJECT_NAME@
 -		)
 -	endif()
 -elseif(INIT_FLAVOR STREQUAL "upstart")
--	file(INSTALL FILES "@CMAKE_CURRENT_BINARY_DIR@/@PROJECT_NAME@.upstart" DESTINATION "/etc/init" RENAME "@PROJECT_NAME@.conf")
+-	file(INSTALL FILES "@CMAKE_CURRENT_BINARY_DIR@/@PROJECT_NAME@.upstart" DESTINATION "${SYSCONF_DIR}/init" RENAME "@PROJECT_NAME@.conf")
+-elseif(INIT_FLAVOR STREQUAL "systemd")
+-	file(INSTALL FILES "@CMAKE_CURRENT_BINARY_DIR@/@PROJECT_NAME@.systemd" DESTINATION "${SYSD_UNIT_DIR}" RENAME "@PROJECT_NAME@.service")
 -endif()
 -
--if(GENERATE_SRS_SECRET AND DD AND BASE64 AND EXISTS "/dev/urandom" AND NOT EXISTS "$ENV{DESTDIR}/etc/${SECRET_FILE}")
-+if(GENERATE_SRS_SECRET AND DD AND BASE64 AND EXISTS "/dev/urandom")
+-if(GENERATE_SRS_SECRET AND DD AND BASE64_ENCODE AND EXISTS "/dev/urandom" AND NOT EXISTS "$ENV{DESTDIR}${SYSCONF_DIR}/${SECRET_FILE}")
++if(GENERATE_SRS_SECRET AND DD AND BASE64_ENCODE AND EXISTS "/dev/urandom")
  	message(STATUS "Generating secret key")
  	execute_process(
  		COMMAND ${DD} if=/dev/urandom bs=18 count=1
-@@ -44,6 +20,6 @@
+@@ -60,7 +22,7 @@ if(GENERATE_SRS_SECRET AND DD AND BASE64
  		ERROR_QUIET
  		OUTPUT_STRIP_TRAILING_WHITESPACE
  	)
--file(INSTALL FILES "@CMAKE_CURRENT_BINARY_DIR@/${SECRET_FILE}" DESTINATION "/etc" RENAME "${SECRET_FILE}" FILE_PERMISSIONS OWNER_READ OWNER_WRITE)
-+file(INSTALL FILES "@CMAKE_CURRENT_BINARY_DIR@/${SECRET_FILE}" DESTINATION "${CONFIG_DIR}" RENAME "${SECRET_FILE}" FILE_PERMISSIONS OWNER_READ OWNER_WRITE)
+-file(INSTALL FILES "@CMAKE_CURRENT_BINARY_DIR@/${SECRET_FILE}" DESTINATION "${SYSCONF_DIR}" RENAME "${SECRET_FILE}" PERMISSIONS OWNER_READ OWNER_WRITE)
++file(INSTALL FILES "@CMAKE_CURRENT_BINARY_DIR@/${SECRET_FILE}" DESTINATION "${CONFIG_DIR}" RENAME "${SECRET_FILE}" PERMISSIONS OWNER_READ OWNER_WRITE)
  file(REMOVE "@CMAKE_CURRENT_BINARY_DIR@/${SECRET_FILE}")
  endif()
+ 

Modified: head/mail/postsrsd/files/patch-srs2.c
==============================================================================
--- head/mail/postsrsd/files/patch-srs2.c	Mon Jan 18 19:48:35 2016	(r406608)
+++ head/mail/postsrsd/files/patch-srs2.c	Mon Jan 18 20:29:11 2016	(r406609)
@@ -1,11 +1,15 @@
---- srs2.c	2014-01-03 01:01:47.000000000 +0100
-+++ srs2.c.new	2014-06-17 16:13:45.773381667 +0200
-@@ -21,7 +21,7 @@
+--- 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>
-+#include <stdlib.h>
++#if defined(__FreeBSD__)
++#  include <stdlib.h>
++#else
++#  include <alloca.h>
++#endif
  
  #ifdef USE_OPENSSL
  #include <openssl/hmac.h>

Modified: head/mail/postsrsd/files/patch-srs2.h
==============================================================================
--- head/mail/postsrsd/files/patch-srs2.h	Mon Jan 18 19:48:35 2016	(r406608)
+++ head/mail/postsrsd/files/patch-srs2.h	Mon Jan 18 20:29:11 2016	(r406609)
@@ -1,9 +1,10 @@
---- srs2.h	2014-01-03 01:01:47.000000000 +0100
-+++ srs2.h.new	2014-06-17 16:16:22.880373371 +0200
-@@ -20,6 +20,7 @@
- #include <stdio.h>
- #include <stdlib.h>
- #include <ctype.h>
+--- 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201601182029.u0IKTB3k092693>