diff options
author | zi <zi@FreeBSD.org> | 2013-06-24 19:55:42 +0800 |
---|---|---|
committer | zi <zi@FreeBSD.org> | 2013-06-24 19:55:42 +0800 |
commit | 7fcf7f916924118240b8eb0e0d16d87b09ebf5a0 (patch) | |
tree | 5c856b43c453e8273fa4ff1b7b4b31442b3b9ea1 | |
parent | f7c2681678bbd2b93a3d24f5fe80abbbc2c62076 (diff) | |
download | freebsd-ports-gnome-7fcf7f916924118240b8eb0e0d16d87b09ebf5a0.tar.gz freebsd-ports-gnome-7fcf7f916924118240b8eb0e0d16d87b09ebf5a0.tar.zst freebsd-ports-gnome-7fcf7f916924118240b8eb0e0d16d87b09ebf5a0.zip |
- Update to 1.9.2
- Convert to new 'created by' header
- Workaround build issue under 10.x
PR: ports/179781
Submitted by: brooks@
-rw-r--r-- | security/duo/Makefile | 36 | ||||
-rw-r--r-- | security/duo/distinfo | 4 | ||||
-rw-r--r-- | security/duo/files/patch-login__duo_Makefile.in | 22 | ||||
-rw-r--r-- | security/duo/files/patch-pam__duo_Makefile.in | 23 | ||||
-rw-r--r-- | security/duo/files/pkg-message.in | 4 | ||||
-rw-r--r-- | security/duo/pkg-plist | 9 |
6 files changed, 80 insertions, 18 deletions
diff --git a/security/duo/Makefile b/security/duo/Makefile index 1a636577accc..52105ff365ef 100644 --- a/security/duo/Makefile +++ b/security/duo/Makefile @@ -1,14 +1,10 @@ -# New ports collection makefile for: duo -# Date created: 17 Jul 2011 -# Whom: Ryan Steinmetz <zi@FreeBSD.org> -# +# Created by: Ryan Steinmetz <zi@FreeBSD.org> # $FreeBSD$ -# PORTNAME= duo -PORTVERSION= 1.9 +PORTVERSION= 1.9.2 CATEGORIES= security -MASTER_SITES= http://cloud.github.com/downloads/${PORTNAME}security/${PORTNAME}_unix/ \ +MASTER_SITES= https://dl.duosecurity.com/ \ http://mirrors.rit.edu/zi/ DISTNAME= ${PORTNAME}_unix-${PORTVERSION} @@ -17,9 +13,7 @@ COMMENT= Duo unix integration package LICENSE= GPLv2 -LIB_DEPENDS= curl:${PORTSDIR}/ftp/curl - -CONFIGURE_ARGS= --with-pam=${PREFIX}/lib/security --sysconfdir=${ETCDIR} \ +CONFIGURE_ARGS= --with-pam=${PREFIX}/lib/security --sysconfdir=${PREFIX}/etc \ --docdir=${DOCSDIR} GNU_CONFIGURE= yes @@ -29,14 +23,34 @@ SUB_FILES= pkg-message MAN3= duo.3 MAN8= login_duo.8 pam_duo.8 +OPTIONS= DOCS + +.include <bsd.port.options.mk> + +.if ${OSVERSION} >= 1000000 +USE_GCC= yes +.endif + post-patch: @${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|g' ${WRKSRC}/login_duo/login_duo.8 @${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|g' ${WRKSRC}/pam_duo/pam_duo.8 -.if defined(NOPORTDOCS) +.if !${PORT_OPTIONS:MDOCS} @${REINPLACE_CMD} -e 's|README AUTHORS CHANGES LICENSE||g' ${WRKSRC}/Makefile.in .endif post-install: + @${INSTALL} -o sshd -g wheel -m 700 ${WRKSRC}/login_duo/login_duo.conf \ + ${PREFIX}/etc/login_duo.conf.sample + @${INSTALL_DATA} -m 700 ${WRKSRC}/pam_duo/pam_duo.conf \ + ${PREFIX}/etc/pam_duo.conf.sample + @if [ ! -f ${PREFIX}/etc/login_duo.conf ]; then \ + ${CP} -p ${PREFIX}/etc/login_duo.conf.sample \ + ${PREFIX}/etc/login_duo.conf ; \ + fi + @if [ ! -f ${PREFIX}/etc/pam_duo.conf ]; then \ + ${CP} -p ${PREFIX}/etc/pam_duo.conf.sample \ + ${PREFIX}/etc/pam_duo.conf ; \ + fi @${CAT} ${PKGMESSAGE} .include <bsd.port.mk> diff --git a/security/duo/distinfo b/security/duo/distinfo index decb27cfe914..c5f109302b9f 100644 --- a/security/duo/distinfo +++ b/security/duo/distinfo @@ -1,2 +1,2 @@ -SHA256 (duo_unix-1.9.tar.gz) = 92121c2f0d06babc17a70a71aa272d24c035522136304758f2357c79b67b3061 -SIZE (duo_unix-1.9.tar.gz) = 444818 +SHA256 (duo_unix-1.9.2.tar.gz) = a8d37d3fc99b840144d2b55d4f603d32b344c0f7b8022b25c9d50c155fe7f50a +SIZE (duo_unix-1.9.2.tar.gz) = 434788 diff --git a/security/duo/files/patch-login__duo_Makefile.in b/security/duo/files/patch-login__duo_Makefile.in new file mode 100644 index 000000000000..88c0919c01ab --- /dev/null +++ b/security/duo/files/patch-login__duo_Makefile.in @@ -0,0 +1,22 @@ + +$FreeBSD$ + +--- login_duo/Makefile.in.orig ++++ login_duo/Makefile.in +@@ -607,16 +607,6 @@ + chmod 4755 $(DESTDIR)$(sbindir)/login_duo + + install-data-local: +- $(MKDIR_P) $(DESTDIR)$(sysconfdir) +- -@if [ ! -f $(DESTDIR)$(sysconfdir)/login_duo.conf ]; then \ +- cp login_duo.conf $(DESTDIR)$(sysconfdir)/login_duo.conf; \ +- echo "Created ${DESTDIR}$(sysconfdir)/login_duo.conf"; \ +- echo "Please edit it to add your Duo integration and secret keys"; \ +- else \ +- echo "Found existing ${DESTDIR}$(sysconfdir)/login_duo.conf - updating permissions"; \ +- fi +- -chown $(DUO_PRIVSEP_USER) $(DESTDIR)$(sysconfdir)/login_duo.conf +- -chmod 600 $(DESTDIR)$(sysconfdir)/login_duo.conf + + # Tell versions [3.59,3.63) of GNU make to not export all variables. + # Otherwise a system limit (for SysV at least) may be exceeded. diff --git a/security/duo/files/patch-pam__duo_Makefile.in b/security/duo/files/patch-pam__duo_Makefile.in new file mode 100644 index 000000000000..a97ac41b491b --- /dev/null +++ b/security/duo/files/patch-pam__duo_Makefile.in @@ -0,0 +1,23 @@ + +$FreeBSD$ + +--- pam_duo/Makefile.in.orig ++++ pam_duo/Makefile.in +@@ -595,17 +595,7 @@ + tags uninstall uninstall-am uninstall-man uninstall-man8 \ + uninstall-pam_libLTLIBRARIES + +- + install-data-local: +- $(MKDIR_P) $(DESTDIR)$(sysconfdir) +- -@if [ ! -f $(DESTDIR)$(sysconfdir)/pam_duo.conf ]; then \ +- cp pam_duo.conf $(DESTDIR)$(sysconfdir)/pam_duo.conf; \ +- echo "Created ${DESTDIR}$(sysconfdir)/pam_duo.conf"; \ +- echo "Please edit it to add your Duo integration and secret keys"; \ +- else \ +- echo "Found existing ${DESTDIR}$(sysconfdir)/pam_duo.conf - updating permissions"; \ +- fi +- -chmod 600 $(DESTDIR)$(sysconfdir)/pam_duo.conf + + # Tell versions [3.59,3.63) of GNU make to not export all variables. + # Otherwise a system limit (for SysV at least) may be exceeded. diff --git a/security/duo/files/pkg-message.in b/security/duo/files/pkg-message.in index 69370e26b6da..f5fb151ed36a 100644 --- a/security/duo/files/pkg-message.in +++ b/security/duo/files/pkg-message.in @@ -1,12 +1,12 @@ ================================================================= -Configuration file %%ETCDIR%%/login_duo.conf was created. +Configuration file %%PREFIX%%/etc/login_duo.conf was created. You must edit it to add your Duo integration and secret keys. If you are using the PAM module, a line similar to the following should be added to your service(s) of choice in /etc/pam.d: auth required %%PREFIX%%/lib/security/pam_duo.so -Additionally, you must edit %%ETCDIR%%/pam_duo.conf +Additionally, you must edit %%PREFIX%%/etc/pam_duo.conf ================================================================= diff --git a/security/duo/pkg-plist b/security/duo/pkg-plist index e6e3c2476438..0953420ba0ca 100644 --- a/security/duo/pkg-plist +++ b/security/duo/pkg-plist @@ -1,5 +1,9 @@ -%%ETCDIR%%/login_duo.conf -%%ETCDIR%%/pam_duo.conf +@unexec if cmp -s %D/etc/login_duo.conf.sample %D/etc/login_duo.conf; then rm -f %D/etc/login_duo.conf; fi +etc/login_duo.conf.sample +@exec if [ ! -f %D/etc/login_duo.conf ] ; then cp -p %D/%F %B/login_duo.conf; fi +@unexec if cmp -s %D/etc/pam_duo.conf.sample %D/etc/pam_duo.conf; then rm -f %D/etc/pam_duo.conf; fi +etc/pam_duo.conf.sample +@exec if [ ! -f %D/etc/pam_duo.conf ] ; then cp -p %D/%F %B/pam_duo.conf; fi include/duo.h lib/libduo.so.3 lib/libduo.so @@ -15,4 +19,3 @@ lib/security/pam_duo.la %%PORTDOCS%%@dirrm %%DOCSDIR%% sbin/login_duo @dirrmtry lib/security -@dirrmtry %%ETCDIR%% |