From owner-freebsd-ports@FreeBSD.ORG Sat Jun 8 05:42:43 2013 Return-Path: Delivered-To: ports@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 439A6F38 for ; Sat, 8 Jun 2013 05:42:43 +0000 (UTC) (envelope-from koobs.freebsd@gmail.com) Received: from mail-pb0-x22b.google.com (mail-pb0-x22b.google.com [IPv6:2607:f8b0:400e:c01::22b]) by mx1.freebsd.org (Postfix) with ESMTP id 1D2FB15BD for ; Sat, 8 Jun 2013 05:42:43 +0000 (UTC) Received: by mail-pb0-f43.google.com with SMTP id md12so4400100pbc.30 for ; Fri, 07 Jun 2013 22:42:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:reply-to:user-agent:mime-version:to:cc:subject :references:in-reply-to:x-enigmail-version:content-type; bh=Yh+SswocgfkH7TWpzXo2cUPAkaRlJM024zjq8zyydWY=; b=NcJkelRq18VlCwrImHb43x+HNUquHu+jUGTbJmKNhRZSzE4zDQdxF/jbN0oi1/NDka nDCcXJ37g3MxdgdajDdHgt6aNE2NTQRs2B+8eBFLs1XSoDXGJx7mLAyiuCWL60JNJKOG UJkdh91xcLqfxdC219t4SIZkmjeuNwCXo6/W0hXZ4hWaQDKY0jH0LnFcUfVoxtXY214M Tz/NakM53rtdo9a6u59T/VTS5tBsWSVvN0z5V6swbrN0MDevmtPIn7Tumt6hRKDOvX7P mLnGxI4JNCfvpM7FKQURKL/+PKaecbhXsWOULj6jdAKpE+svZuNf3KHAkgjFbsBN0NyO 9fFg== X-Received: by 10.66.173.201 with SMTP id bm9mr5771665pac.27.1370670162530; Fri, 07 Jun 2013 22:42:42 -0700 (PDT) Received: from [192.168.1.7] (ppp59-167-128-11.static.internode.on.net. [59.167.128.11]) by mx.google.com with ESMTPSA id vb8sm1835251pbc.11.2013.06.07.22.42.39 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 07 Jun 2013 22:42:41 -0700 (PDT) Message-ID: <51B2C43F.5010300@FreeBSD.org> Date: Sat, 08 Jun 2013 15:42:23 +1000 From: Kubilay Kocak User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130509 Thunderbird/17.0.6 MIME-Version: 1.0 To: Janet Sullivan Subject: Re: REWARD for working pam_mount References: <0a9ae9e0df704d13b643ee26d487e73a@BY2PR07MB043.namprd07.prod.outlook.com> In-Reply-To: <0a9ae9e0df704d13b643ee26d487e73a@BY2PR07MB043.namprd07.prod.outlook.com> X-Enigmail-Version: 1.5.1 Content-Type: multipart/mixed; boundary="------------050409030706090702020605" Cc: "ports@freebsd.org" X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: koobs@FreeBSD.org List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 Jun 2013 05:42:43 -0000 This is a multi-part message in MIME format. --------------050409030706090702020605 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit On 8/06/2013 1:57 PM, Janet Sullivan wrote: > The /usr/ports/sysutils/pam_mount port is broken, because it's > expecting an older version of libHX. I'd really like to have a > working pam_mount, and am willing to paypal US $50 over to the first > person who gets it working. I'm not subscribed to the list, so > please email me directly to claim the prize. Janet, Your offer is commendable but unnecessary :) Try this patch I just created (cherry picked from upstream), and let me know how it goes. You'll want to apply it to the pam_mount port directory. There's also something you can do to ensure pam_mount will work going forward: I had to backport the fix because the new pam_mount 2.13 version requires libmount. Let upstream know that FreeBSD doesn't have libmount, and request they make it optional and configurable (--without-libmount configure option for example), even if it disables certain functionality. If it works for you, let me know so I can commit the change, and feel free to consider donating to the FreeBSD Foundation instead Koobs --------------050409030706090702020605 Content-Type: text/plain; charset=windows-1252; name="pam_mount-fix-libHX.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="pam_mount-fix-libHX.patch" Index: Makefile =================================================================== --- Makefile (revision 320195) +++ Makefile (working copy) @@ -14,7 +14,7 @@ MAINTAINER= gahr@FreeBSD.org COMMENT= A PAM that can mount volumes for a user session -LIB_DEPENDS= HX.27:${PORTSDIR}/lang/libhx +LIB_DEPENDS= HX:${PORTSDIR}/lang/libhx USE_GNOME= pkgconfig libxml2 USE_PERL5= yes Index: files/patch-commit335500 =================================================================== --- files/patch-commit335500 (revision 0) +++ files/patch-commit335500 (working copy) @@ -0,0 +1,144 @@ +# Patch for commit 33550036cb0c9311c9dc4da9b3b359435319420e (pam-mount) +# 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, ¤t, i->ptr) > 0) { ++ if (HXformat_aprintf(vinfo, ¤t, 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; Property changes on: files/patch-commit335500 ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property --------------050409030706090702020605--