Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 29 Nov 2013 09:14:06 +0000 (UTC)
From:      Kubilay Kocak <koobs@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r335154 - in head/sysutils/pam_mount: . files
Message-ID:  <201311290914.rAT9E6Mn064135@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: koobs
Date: Fri Nov 29 09:14:05 2013
New Revision: 335154
URL: http://svnweb.freebsd.org/changeset/ports/335154

Log:
  sysutils/pam_mount: Cherrypick upstream for libHX 3.12 support, Enable STAGE
  
  This issue was originally reported on the freebsd-ports mailing list [1]
  and has been sitting in my local tree since June. Let's finish it off.
  
  - Backport upstream commit adding libHX 3.12 support [2] and remove
    obsoleted patches (patch-src_mtab.c, patch-src_pmvarrun.c
  - QA: Enable STAGE support, remove MAN* macros and pkg-plist accordingly
  - QA: Remove indefinite article from COMMENT
  - QA: Add LICENSE (LGPL21 GPLv2)
  - QA: Use new LIB_DEPENDS shared library convention
  
  [1] http://lists.freebsd.org/pipermail/freebsd-ports/2013-June/084156.html
  [2] http://sf.net/p/pam-mount/pam-mount/ci/33550036cb0c9311c9dc4da9b3b359435319420e/
  
  Reviewed by:	gahr (maintainer)
  Approved by:	gahr (maintainer)

Added:
  head/sysutils/pam_mount/files/patch-commit335500   (contents, props changed)
Deleted:
  head/sysutils/pam_mount/files/patch-src_mtab.c
  head/sysutils/pam_mount/files/patch-src_pmvarrun.c
Modified:
  head/sysutils/pam_mount/Makefile
  head/sysutils/pam_mount/pkg-plist   (contents, props changed)

Modified: head/sysutils/pam_mount/Makefile
==============================================================================
--- head/sysutils/pam_mount/Makefile	Fri Nov 29 08:39:03 2013	(r335153)
+++ head/sysutils/pam_mount/Makefile	Fri Nov 29 09:14:05 2013	(r335154)
@@ -7,9 +7,12 @@ CATEGORIES=	sysutils
 MASTER_SITES=	SF/${PORTNAME:S/_/-/}/${PORTNAME}/${PORTVERSION}/
 
 MAINTAINER=	gahr@FreeBSD.org
-COMMENT=	A PAM that can mount volumes for a user session
+COMMENT=	PAM module that can mount volumes for a user session
 
-LIB_DEPENDS=	HX:${PORTSDIR}/lang/libhx
+LICENSE=	LGPL21 GPLv2
+LICENSE_COMB=	multi
+
+LIB_DEPENDS=	libHX.so:${PORTSDIR}/lang/libhx
 
 USES=		pkgconfig perl5
 USE_GNOME=	libxml2
@@ -22,7 +25,6 @@ CONFIGURE_ARGS+=--localstatedir=/var \
 		--without-cryptsetup \
 		--with-ssbindir=${PREFIX}/sbin
 
-NO_STAGE=	yes
 post-patch:
 	${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|' ${WRKSRC}/src/pam_mount.c
 	${REINPLACE_CMD} -e '/dist_security_DATA/s|\.xml$$|.xml.sample|' \
@@ -30,9 +32,4 @@ post-patch:
 	${MV} ${WRKSRC}/config/pam_mount.conf.xml ${WRKSRC}/config/pam_mount.conf.xml.sample
 	${FIND} ${WRKSRC} -name "*.c" -exec ${REINPLACE_CMD} -e 's|HXformat2_aprintf|HXformat_aprintf|g' {} \;
 
-MAN5=	pam_mount.conf.5
-MAN8=	mount.crypt.8 mount.crypt_LUKS.8 mount.crypto_LUKS.8 \
-	pmvarrun.8 pmt-ehd.8 umount.crypt.8 umount.crypt_LUKS.8 \
-	umount.crypto_LUKS.8 pam_mount.8
-
 .include <bsd.port.mk>

Added: head/sysutils/pam_mount/files/patch-commit335500
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/sysutils/pam_mount/files/patch-commit335500	Fri Nov 29 09:14:05 2013	(r335154)
@@ -0,0 +1,145 @@
+# Patch for commit 33550036cb0c9311c9dc4da9b3b359435319420e (pam-mount)
+# http://sourceforge.net/p/pam-mount/pam-mount/ci/33550036cb0c9311c9dc4da9b3b359435319420e/
+# Log: src: update for libHX 3.12
+# Authored by: Jan Engelhardt 2011-12-02
+
+--- ./configure.ac.orig	2011-10-06 22:48:08.000000000 +1100
++++ ./configure.ac	2013-06-08 14:52:22.855624000 +1000
+@@ -63,7 +63,7 @@
+ AM_CONDITIONAL([HAVE_MDIO], [test "x$ac_cv_header_sys_mdioctl_h" = "xyes"])
+ AM_CONDITIONAL([HAVE_VND], [test "x$ac_cv_header_dev_vndvar_h" = "xyes"])
+ 
+-PKG_CHECK_MODULES([libHX], [libHX >= 3.10.1])
++PKG_CHECK_MODULES([libHX], [libHX >= 3.12])
+ PKG_CHECK_MODULES([libxml], [libxml-2.0 >= 2.6])
+ 
+ AC_ARG_WITH(
+--- ./src/autoloop.c.orig	2011-10-06 22:48:08.000000000 +1100
++++ ./src/autoloop.c		2013-06-08 14:45:47.846247000 +1000
+@@ -54,7 +54,8 @@
+ 		HXOPT_AUTOHELP,
+ 		HXOPT_TABLEEND,
+ 	};
+-	if (HX_getopt(options_table, argc, argv, HXOPT_USAGEONERR) <= 0)
++	if (HX_getopt(options_table, argc, argv, HXOPT_USAGEONERR) !=
++	    HXOPT_ERR_SUCCESS)
+ 		return false;
+ 	if (*argc != 2) {
+ 		fprintf(stderr, "Usage: %s file\n", HX_basename(**argv));
+--- ./src/ehd.c.orig	2011-10-06 22:48:08.000000000 +1100
++++ ./src/ehd.c		2013-06-08 14:46:27.566540000 +1000
+@@ -526,7 +526,8 @@
+ 		HXOPT_TABLEEND,
+ 	};
+ 
+-	if (HX_getopt(options_table, argc, argv, HXOPT_USAGEONERR) <= 0)
++	if (HX_getopt(options_table, argc, argv, HXOPT_USAGEONERR) !=
++	    HXOPT_ERR_SUCCESS)
+ 		return false;
+ 
+ 	pg->interactive = isatty(fileno(stdin));
+--- ./src/misc.c.orig	2011-10-06 22:48:08.000000000 +1100
++++ ./src/misc.c	2013-06-08 14:47:27.515576000 +1000
+@@ -159,7 +159,7 @@
+ {
+ 	char *filled;
+ 
+-	if (HXformat2_aprintf(vinfo, &filled, arg) == 0)
++	if (HXformat_aprintf(vinfo, &filled, arg) == 0)
+ 		/*
+ 		 * This case may happen with e.g. %(before="-o" OPTIONS) where
+ 		 * OPTIONS is empty. And options expanding to nothing are
+--- ./src/mount.c.orig	2011-10-06 22:48:08.000000000 +1100
++++ ./src/mount.c	2013-06-08 14:47:54.655610000 +1000
+@@ -487,7 +487,7 @@
+ 	string = HXmc_meminit(NULL, 0);
+ 
+ 	for (i = config->command[CMD_FSCK]->first; i != NULL; i = i->next) {
+-		if (HXformat2_aprintf(vinfo, &current, i->ptr) > 0) {
++		if (HXformat_aprintf(vinfo, &current, i->ptr) > 0) {
+ 			HXmc_strcat(&string, current);
+ 			HXmc_strcat(&string, " ");
+ 		}
+--- ./src/mtab.c.orig	2011-10-06 22:48:08.000000000 +1100
++++ ./src/mtab.c	2013-06-08 14:48:18.965526000 +1000
+@@ -138,7 +138,7 @@
+ 			l0g("HX_dirname: %s\n", strerror(errno));
+ 			return -errno;
+ 		}
+-		ret = HX_mkdir(dirname);
++		ret = HX_mkdir(dirname, S_IRUGO | S_IXUGO | S_IWUSR);
+ 		free(dirname);
+ 		if (ret < 0) {
+ 			l0g("HX_mkdir: %s\n", strerror(-ret));
+--- ./src/mtcrypt.c.orig	2011-10-06 22:48:08.000000000 +1100
++++ ./src/mtcrypt.c		2013-06-08 14:49:23.036264000 +1000
+@@ -185,7 +185,8 @@
+ 	bool kfpt;
+ 	int ret;
+ 
+-	if (HX_getopt(options_table, argc, argv, HXOPT_USAGEONERR) <= 0)
++	if (HX_getopt(options_table, argc, argv, HXOPT_USAGEONERR) !=
++	    HXOPT_ERR_SUCCESS)
+ 		return false;
+ 
+ 	pmtlog_path[PMTLOG_DBG][PMTLOG_STDERR] = Debug;
+@@ -508,7 +509,8 @@
+ 	};
+ 	int ret;
+ 
+-	if (HX_getopt(options_table, argc, argv, HXOPT_USAGEONERR) <= 0)
++	if (HX_getopt(options_table, argc, argv, HXOPT_USAGEONERR) !=
++	    HXOPT_ERR_SUCCESS)
+ 		return false;
+ 
+ 	pmtlog_path[PMTLOG_DBG][PMTLOG_STDERR] = Debug;
+--- ./src/pam_mount.h	2011-10-06 22:48:08.000000000 +1100
++++ ./src/pam_mount.h	2013-06-08 14:50:03.445549000 +1000
+@@ -15,12 +15,6 @@
+ #	define EXPORT_SYMBOL
+ #endif
+ 
+-#ifndef S_IRXG
+-#	define S_IRXG (S_IRGRP | S_IXGRP)
+-#endif
+-#ifndef S_IRXO
+-#	define S_IRXO (S_IROTH | S_IXOTH)
+-#endif
+ #define sizeof_z(x) (sizeof(x) - 1)
+ 
+ /*
+--- ./src/pmvarrun.c.orig	2011-10-06 22:48:08.000000000 +1100
++++ ./src/pmvarrun.c		2013-06-08 14:51:23.506567000 +1000
+@@ -296,10 +296,11 @@
+  */
+ static int create_var_run(void)
+ {
++	static const unsigned int mode = S_IRUGO | S_IXUGO | S_IWUSR;
+ 	int ret;
+ 
+ 	w4rn("creating " VAR_RUN_PMT);
+-	if (HX_mkdir(VAR_RUN_PMT) < 0) {
++	if (HX_mkdir(VAR_RUN_PMT, mode) < 0) {
+ 		ret = -errno;
+ 		l0g("unable to create " VAR_RUN_PMT ": %s\n", strerror(errno));
+ 		return ret;
+@@ -314,7 +315,7 @@
+ 	 * 0755: `su` creates file group owned by user and then releases root
+ 	 * permissions. User needs to be able to access file on logout.
+ 	 */
+-	if (chmod(VAR_RUN_PMT, S_IRWXU | S_IRXG | S_IRXO) < 0) {
++	if (chmod(VAR_RUN_PMT, mode) < 0) {
+ 		ret = -errno;
+ 		l0g("unable to chmod " VAR_RUN_PMT ": %s\n", strerror(errno));
+ 		return ret;
+--- ./src/rdconf1.c.orig	2011-10-06 22:48:08.000000000 +1100
++++ ./src/rdconf1.c		2013-06-08 14:51:47.165542000 +1000
+@@ -126,7 +126,7 @@
+ 
+ 	if (*dest_pptr == NULL)
+ 		return true;
+-	HXformat2_aprintf(vinfo, &tmp, *dest_pptr);
++	HXformat_aprintf(vinfo, &tmp, *dest_pptr);
+ 	*dest_pptr = xstrdup(tmp);
+ 	HXmc_free(tmp);
+ 	return true;

Modified: head/sysutils/pam_mount/pkg-plist
==============================================================================
--- head/sysutils/pam_mount/pkg-plist	Fri Nov 29 08:39:03 2013	(r335153)
+++ head/sysutils/pam_mount/pkg-plist	Fri Nov 29 09:14:05 2013	(r335154)
@@ -4,9 +4,19 @@ sbin/mount.crypto_LUKS
 sbin/umount.crypt
 sbin/umount.crypt_LUKS
 sbin/umount.crypto_LUKS
+sbin/pmvarrun
 etc/security/pam_mount.conf.xml.sample
 lib/pam_mount.so
-sbin/pmvarrun
+man/man5/pam_mount.conf.5.gz
+man/man8/mount.crypt.8.gz
+man/man8/mount.crypt_LUKS.8.gz
+man/man8/mount.crypto_LUKS.8.gz
+man/man8/pam_mount.8.gz
+man/man8/pmt-ehd.8.gz
+man/man8/pmvarrun.8.gz
+man/man8/umount.crypt.8.gz
+man/man8/umount.crypt_LUKS.8.gz
+man/man8/umount.crypto_LUKS.8.gz
 @dirrm share/xml/pam_mount/dtd
 @dirrm share/xml/pam_mount
 @dirrm etc/security



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