Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 4 May 2013 07:51:33 GMT
From:      Berend de Boer <berend@pobox.com>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/178334: security/pam-pgsql: did no longer work on FreeBSD + upgrade to 0.7.3.1
Message-ID:  <201305040751.r447pXWh014196@red.freebsd.org>
Resent-Message-ID: <201305041130.r44BU45A064512@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         178334
>Category:       ports
>Synopsis:       security/pam-pgsql: did no longer work on FreeBSD + upgrade to 0.7.3.1
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Sat May 04 11:30:03 UTC 2013
>Closed-Date:
>Last-Modified:
>Originator:     Berend de Boer
>Release:        9.1
>Organization:
Xplain Hosting
>Environment:
FreeBSD vfreebsd91 9.1-RELEASE FreeBSD 9.1-RELEASE #0 r243825: Tue Dec  4 09:23:10 UTC 2012     root@farrell.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  amd64
>Description:
pam_pgsql should link to libcrypt, but didn't do so. If you try this port you will see:

  pam_start: system error

The reason is probably that FreeBSD's PAM linked with crypt in the past, but no longer.

Now we link explicitly.

Also this upgrades the port to 0.7.3.1.

>How-To-Repeat:
Install old version.
>Fix:
See patch.

Patch attached with submission follows:

diff -urN pam-pgsql/Makefile /usr/ports/security/pam-pgsql/Makefile
--- pam-pgsql/Makefile	2012-11-17 19:01:14.000000000 +1300
+++ /usr/ports/security/pam-pgsql/Makefile	2013-05-04 19:30:35.000000000 +1200
@@ -1,34 +1,28 @@
-# New ports collection makefile for:    pam-pgsql
-# Date created:				Nov 16, 2000
-# Whom:	      				Mikhail Teterin <mi@aldan.algebra.com>
-#
+# Created by: Mikhail Teterin <mi@aldan.algebra.com>
 # $FreeBSD: ports/security/pam-pgsql/Makefile,v 1.32 2012/11/17 06:01:14 svnexp Exp $
 #
 
 PORTNAME=	pam-pgsql
-PORTVERSION=	0.6.3
-PORTREVISION=	1
+PORTVERSION=	0.7.3.1
 CATEGORIES=	security databases
-MASTER_SITES=	SF
-DISTNAME=	libpam-pgsql-${PORTVERSION}
+MASTER_SITES=SF/${PORTNAME}/${PORTNAME}/0.7/
 
-MAINTAINER=	ports@FreeBSD.org
+MAINTAINER=	berend@pobox.com
 COMMENT=	A pam module for authenticating with PostgreSQL
 
-LIB_DEPENDS=	mhash.2:${PORTSDIR}/security/mhash
+LIB_DEPENDS=	mhash:${PORTSDIR}/security/mhash
 
-USE_BZIP2=	yes
+LDFLAGS+=	-lcrypt
 USE_PGSQL=	yes
 GNU_CONFIGURE=	yes
-WRKSRC=		${WRKDIR}/${DISTNAME:S/lib//}
+CONFIGURE_ARGS=	--libdir=/usr/lib --without-libgcrypt
 
 post-install:
-post-install:
 	@${SED} -e 's,%%PREFIX%%,${PREFIX},' ${PKGMESSAGE}
-.if !defined(NOPORTDOCS)
+.if !defined(PORT_OPTIONS:MDOCS)
 	@${MKDIR} ${DOCSDIR}
-	@${INSTALL_DATA} ${WRKSRC}/README ${WRKSRC}/debian/changelog \
-		${WRKSRC}/debian/copyright ${DOCSDIR}
+	@${INSTALL_DATA} ${WRKSRC}/README ${WRKSRC}/CHANGELOG \
+		${WRKSRC}/COPYRIGHT ${DOCSDIR}
 .endif
 
 .include <bsd.port.mk>
diff -urN pam-pgsql/distinfo /usr/ports/security/pam-pgsql/distinfo
--- pam-pgsql/distinfo	2011-07-04 02:03:21.000000000 +1200
+++ /usr/ports/security/pam-pgsql/distinfo	2013-05-04 17:47:39.000000000 +1200
@@ -1,2 +1,2 @@
-SHA256 (libpam-pgsql-0.6.3.tar.bz2) = 0e47e8f1fda4439073fb57a88c464af8593e7d2bc61b1fda531497250711b739
-SIZE (libpam-pgsql-0.6.3.tar.bz2) = 63420
+SHA256 (pam-pgsql-0.7.3.1.tar.gz) = c9327e7636e81a2d2bbaf4f017edbd9319a08df1654c9d1875e6f933750548dd
+SIZE (pam-pgsql-0.7.3.1.tar.gz) = 301678
diff -urN pam-pgsql/files/patch-Makefile.in /usr/ports/security/pam-pgsql/files/patch-Makefile.in
--- pam-pgsql/files/patch-Makefile.in	2005-08-19 07:38:29.000000000 +1200
+++ /usr/ports/security/pam-pgsql/files/patch-Makefile.in	1970-01-01 12:00:00.000000000 +1200
@@ -1,11 +0,0 @@
---- Makefile.in.orig	Wed May 25 21:02:56 2005
-+++ Makefile.in	Thu Aug 18 21:30:07 2005
-@@ -9,7 +9,7 @@
- LDLIBS=		${LINK} -lpam -lpq @PAM_MISC_LD@ @MHASH_LD@
- INCLUDE=	@PGSQL_INC@ @MHASH_INC@
- DEBUG=      @DEBUG@
--CFLAGS=		-O2 -frename-registers -fstrict-aliasing -fPIC -DPIC -Wall -W -Wdisabled-optimization -Wredundant-decls -Wmissing-format-attribute -Wmissing-noreturn -D_GNU_SOURCE ${INCLUDE} ${DEBUG}
-+CFLAGS=		@CFLAGS@ -fPIC -DPIC -D_GNU_SOURCE ${INCLUDE} ${DEBUG}
- 
- 
- all: ${LIBLIB}
diff -urN pam-pgsql/files/patch-pam_get_pass.c /usr/ports/security/pam-pgsql/files/patch-pam_get_pass.c
--- pam-pgsql/files/patch-pam_get_pass.c	2005-08-19 07:38:29.000000000 +1200
+++ /usr/ports/security/pam-pgsql/files/patch-pam_get_pass.c	2013-05-04 18:18:35.000000000 +1200
@@ -1,19 +1,13 @@
---- pam_get_pass.c.orig	Wed May 25 21:02:56 2005
-+++ pam_get_pass.c	Thu Aug 18 21:25:11 2005
-@@ -34,7 +34,16 @@
- #include <stdlib.h>
- #include <string.h>
- #include <security/pam_modules.h>
-+#include <security/pam_appl.h>
- #include "pam_mod_misc.h"
-+
+--- ./src/pam_get_pass.c.orig   2013-05-04 15:51:26.655632820 +1000
++++ ./src/pam_get_pass.c        2013-05-04 15:52:30.385566056 +1000
+@@ -41,6 +41,10 @@
+ #include <sys/param.h>
+ #endif
+
 +#ifdef __FreeBSD__
-+#include <sys/param.h>
-+#endif
-+
-+#if (defined(__FreeBSD__) && __FreeBSD_version > 500000)
 +#define PAM_AUTHTOK_RECOVER_ERR PAM_AUTHTOK_RECOVERY_ERR
 +#endif
- 
++
  static int
  pam_conv_pass(pam_handle_t *pamh, int pam_item, const char *prompt, int options)
+ {
diff -urN pam-pgsql/files/patch-pam_pgsql.c /usr/ports/security/pam-pgsql/files/patch-pam_pgsql.c
--- pam-pgsql/files/patch-pam_pgsql.c	2005-08-19 07:38:29.000000000 +1200
+++ /usr/ports/security/pam-pgsql/files/patch-pam_pgsql.c	1970-01-01 12:00:00.000000000 +1200
@@ -1,14 +0,0 @@
---- pam_pgsql.c.orig	Wed Aug 17 00:05:28 2005
-+++ pam_pgsql.c	Wed Aug 17 00:06:51 2005
-@@ -17,10 +17,10 @@
- #include <time.h>
- #include <sys/time.h>
- #include <libpq-fe.h>
--#include <crypt.h>
- #include <sys/types.h>
- #include <unistd.h>
- #include <netdb.h>
-+#include <security/pam_appl.h>
- 
- #define PAM_SM_AUTH
- #define PAM_SM_ACCOUNT
diff -urN pam-pgsql/pkg-plist /usr/ports/security/pam-pgsql/pkg-plist
--- pam-pgsql/pkg-plist	2005-08-19 07:38:29.000000000 +1200
+++ /usr/ports/security/pam-pgsql/pkg-plist	2013-05-04 18:13:01.000000000 +1200
@@ -1,6 +1,8 @@
 %%PORTDOCS%%%%DOCSDIR%%/README
-%%PORTDOCS%%%%DOCSDIR%%/changelog
-%%PORTDOCS%%%%DOCSDIR%%/copyright
+%%PORTDOCS%%%%DOCSDIR%%/CHANGELOG
+%%PORTDOCS%%%%DOCSDIR%%/COPYRIGHT
+%%PORTDOCS%%%%DOCSDIR%%/CREDITS
+%%PORTDOCS%%%%DOCSDIR%%/sample.sql
 %%PORTDOCS%%@dirrm %%DOCSDIR%%
 @cwd /usr
 lib/pam_pgsql.so


>Release-Note:
>Audit-Trail:
>Unformatted:



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