From owner-dev-commits-ports-all@freebsd.org Thu May 6 23:13:08 2021 Return-Path: Delivered-To: dev-commits-ports-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id AC643631610; Thu, 6 May 2021 23:13:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FbqBD4Ml1z3C2G; Thu, 6 May 2021 23:13:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 88E962097D; Thu, 6 May 2021 23:13:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 146ND8gb033943; Thu, 6 May 2021 23:13:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 146ND87Y033942; Thu, 6 May 2021 23:13:08 GMT (envelope-from git) Date: Thu, 6 May 2021 23:13:08 GMT Message-Id: <202105062313.146ND87Y033942@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Ryan Steinmetz Subject: git: 8db220ac1a80 - main - New port: security/duo_openvpn: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zi X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8db220ac1a80b30f99cecdfd222a6b1254c4b00e Auto-Submitted: auto-generated X-BeenThere: dev-commits-ports-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the ports repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 May 2021 23:13:08 -0000 The branch main has been updated by zi: URL: https://cgit.FreeBSD.org/ports/commit/?id=8db220ac1a80b30f99cecdfd222a6b1254c4b00e commit 8db220ac1a80b30f99cecdfd222a6b1254c4b00e Author: Ryan Steinmetz AuthorDate: 2021-05-06 23:12:22 +0000 Commit: Ryan Steinmetz CommitDate: 2021-05-06 23:12:22 +0000 New port: security/duo_openvpn: Duo provides simple two-factor authentication as a service via: 1. Phone callback 2. SMS-delivered one-time passcodes 3. Duo mobile app to generate one-time passcodes 4. Duo mobile app for smartphone push authentication 5. Duo hardware token to generate one-time passcodes Duo two-factor authentication for OpenVPN WWW: https://github.com/duosecurity/duo_openvpn --- security/duo_openvpn/Makefile | 53 ++++++++++++++++++++++++ security/duo_openvpn/distinfo | 3 ++ security/duo_openvpn/files/patch-Makefile | 8 ++++ security/duo_openvpn/files/patch-duo__openvpn.py | 12 ++++++ security/duo_openvpn/files/pkg-message.in | 13 ++++++ security/duo_openvpn/pkg-descr | 11 +++++ security/duo_openvpn/pkg-plist | 6 +++ 7 files changed, 106 insertions(+) diff --git a/security/duo_openvpn/Makefile b/security/duo_openvpn/Makefile new file mode 100644 index 000000000000..09cc5bab9d44 --- /dev/null +++ b/security/duo_openvpn/Makefile @@ -0,0 +1,53 @@ +# Created by: Ryan Steinmetz + +PORTNAME= duo_openvpn +PORTVERSION= 2.4 +CATEGORIES= security + +MAINTAINER= zi@FreeBSD.org +COMMENT= Duo two-factor authentication for OpenVPN + +LICENSE= GPLv2 + +RUN_DEPENDS= openvpn>0:security/openvpn + +USES= gmake +USE_GITHUB= yes +GH_ACCOUNT= duosecurity + +CFLAGS+= -DPREFIX='\"${DATADIR}\"' + +SUB_FILES= pkg-message + +OPTIONS_SINGLE= HELPER +OPTIONS_SINGLE_HELPER= PERL PYTHON +OPTIONS_DEFAULT=PERL +OPTIONS_SUB= yes + +PERL_USES= perl5 +PERL_VARS= USE_PERL5=run CFLAGS+=-DUSE_PERL +PERL_RUN_DEPENDS= p5-JSON-XS>0:converters/p5-JSON-XS \ + p5-libwww>0:www/p5-libwww \ + p5-LWP-Protocol-https>0:www/p5-LWP-Protocol-https \ + p5-Digest-HMAC>0:security/p5-Digest-HMAC +PYTHON_USES= python:3.7+,run + +.include + +post-patch: + ${REINPLACE_CMD} 's|%%SHEBANG%%|${PYTHON_CMD}|' ${WRKSRC}/duo_openvpn.py + +do-install: + @${MKDIR} ${STAGEDIR}${DATADIR} + ${INSTALL_LIB} ${WRKSRC}/duo_openvpn.so ${STAGEDIR}${DATADIR} + ${INSTALL_DATA} ${WRKSRC}/ca_certs.pem ${STAGEDIR}${DATADIR} + +do-install-PERL-on: + ${INSTALL_SCRIPT} ${WRKSRC}/duo_openvpn.pl ${STAGEDIR}${DATADIR} + +do-install-PYTHON-on: + ${INSTALL_SCRIPT} ${WRKSRC}/duo_openvpn.py ${STAGEDIR}${DATADIR} + ${INSTALL_SCRIPT} ${WRKSRC}/https_wrapper.py ${STAGEDIR}${DATADIR} + ${INSTALL_SCRIPT} ${WRKSRC}/six.py ${STAGEDIR}${DATADIR} + +.include diff --git a/security/duo_openvpn/distinfo b/security/duo_openvpn/distinfo new file mode 100644 index 000000000000..5338049be180 --- /dev/null +++ b/security/duo_openvpn/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1620320015 +SHA256 (duosecurity-duo_openvpn-2.4_GH0.tar.gz) = a15c2534fb63f8a5b0130e59fc8c6189c2511a49f161fa9dbf415485aa21b962 +SIZE (duosecurity-duo_openvpn-2.4_GH0.tar.gz) = 35768 diff --git a/security/duo_openvpn/files/patch-Makefile b/security/duo_openvpn/files/patch-Makefile new file mode 100644 index 000000000000..240ce139c1fb --- /dev/null +++ b/security/duo_openvpn/files/patch-Makefile @@ -0,0 +1,8 @@ +--- Makefile.orig 2021-05-06 18:10:21 UTC ++++ Makefile +@@ -1,5 +1,3 @@ +-PREFIX=/opt/duo +-CFLAGS += -DPREFIX='"$(PREFIX)"' + + ifdef USE_PERL + CFLAGS += -DUSE_PERL diff --git a/security/duo_openvpn/files/patch-duo__openvpn.py b/security/duo_openvpn/files/patch-duo__openvpn.py new file mode 100644 index 000000000000..f1872659cf27 --- /dev/null +++ b/security/duo_openvpn/files/patch-duo__openvpn.py @@ -0,0 +1,12 @@ +--- duo_openvpn.py.orig 2021-05-06 18:37:22 UTC ++++ duo_openvpn.py +@@ -1,8 +1,4 @@ +-#!/bin/sh +-''''which python3 >/dev/null 2>&1 && exec python3 "$0" "$@" # ''' +-''''which python >/dev/null 2>&1 && exec python "$0" "$@" # ''' +-''''which python2 >/dev/null 2>&1 && exec python2 "$0" "$@" # ''' +-''''exec echo "Error: No python module found in system"# ''' ++#!%%SHEBANG%% + # + # duo_openvpn.py + # Duo OpenVPN diff --git a/security/duo_openvpn/files/pkg-message.in b/security/duo_openvpn/files/pkg-message.in new file mode 100644 index 000000000000..b3154f8a88cb --- /dev/null +++ b/security/duo_openvpn/files/pkg-message.in @@ -0,0 +1,13 @@ +[ +{ type: install + message: <