Re: REWARD for working pam_mount

2013-06-25 Thread Kubilay Kocak
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.
 ___
 freebsd-ports@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-ports
 To unsubscribe, send any mail to freebsd-ports-unsubscr...@freebsd.org
 

Hi Janet,

Just wanted to get a follow-up on whether the patched worked for you so
I can submit is as a PR for the maintainer and get it committed

Koobs
___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to freebsd-ports-unsubscr...@freebsd.org


Re: REWARD for working pam_mount

2013-06-08 Thread Jerry
On Sat, 08 Jun 2013 15:42:23 +1000
Kubilay Kocak articulated:

 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.

Maybe it is just me; however, wouldn't it make more sense for FreeBSD to
acquire libmount and thereby eliminate the whole problem to begin
with, not to mention losing potential functionality?

-- 
Jerry ♔

Disclaimer: off-list followups get on-list replies or get ignored.
Please do not ignore the Reply-To header.
__
___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to freebsd-ports-unsubscr...@freebsd.org

Re: REWARD for working pam_mount

2013-06-08 Thread Kubilay Kocak
On 8/06/2013 8:32 PM, Jerry wrote:
 On Sat, 08 Jun 2013 15:42:23 +1000
 Kubilay Kocak articulated:
 
 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.
 
 Maybe it is just me; however, wouldn't it make more sense for FreeBSD to
 acquire libmount and thereby eliminate the whole problem to begin
 with, not to mention losing potential functionality?
 

If that's the whole problem, and if it makes sense, absolutely.

Though not explicit, my advice was based on the following:

a) That my cherry-picked patch is likely only an interim measure.

b) That the easiest thing an end-user could do to contribute to a
solution is to notify the authors that portability would help.

c) We can no longer track pam_mount updates given the recent addition of
libmount as a hard dependency.

d) that libmount (part of util-linux) is likely quite Linux centric and
not useful in FreeBSD terms. I may be wrong here.

The root cause of Janets reported issue is only a LIB_DEPENDS pointing
to a specific library version (unnecessarily) and a libhx port that has
moved on that pam_mount didn't support.

But definitely, there may be more 'longer term' solutions such as what
you eluded to.

koobs


___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to freebsd-ports-unsubscr...@freebsd.org


RE: REWARD for working pam_mount

2013-06-08 Thread Janet Sullivan
Thank you for the quick turnaround.  I'll make a donation to the foundation in 
your honor. :-)

I am having problems with the patch, however, part of it is rejected, as seen 
below.

(/usr/ports/sysutils/pam_mount) .oO Sat Jun 08 07:30 AM Oo.
[co1gnsntxw01] (root)## patch  pam_mount-fix-libHX.patch
Hmm...  Looks like a unified diff to me...
The text leading up to this was:
--
|Index: Makefile
|===
|--- Makefile   (revision 320195)
|+++ Makefile   (working copy)
--
Patching file Makefile using Plan A...
Hunk #1 failed at 14.
1 out of 1 hunks failed--saving rejects to Makefile.rej
Hmm...  The next patch looks like a unified diff to me...
The text leading up to this was:
--
|Index: files/patch-commit335500
|===
|--- files/patch-commit335500   (revision 0)
|+++ files/patch-commit335500   (working copy)
--
(Creating file files/patch-commit335500...)
Patching file files/patch-commit335500 using Plan A...
Hunk #1 succeeded at 1.
Hmm...  Ignoring the trailing garbage.
done

-Original Message-
From: Kubilay Kocak [mailto:koobs.free...@gmail.com] 
Sent: Friday, June 7, 2013 10:42 PM
To: Janet Sullivan
Cc: po...@freebsd.org
Subject: Re: REWARD for working pam_mount

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
___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to freebsd-ports-unsubscr...@freebsd.org


Re: REWARD for working pam_mount

2013-06-08 Thread Kubilay Kocak
On 9/06/2013 12:33 AM, Janet Sullivan wrote:
 Thank you for the quick turnaround.  I'll make a donation to the foundation 
 in your honor. :-)
 
 I am having problems with the patch, however, part of it is rejected, as seen 
 below.
 
 (/usr/ports/sysutils/pam_mount) .oO Sat Jun 08 07:30 AM Oo.
 [co1gnsntxw01] (root)## patch  pam_mount-fix-libHX.patch
 Hmm...  Looks like a unified diff to me...
 The text leading up to this was:
 --
 |Index: Makefile
 |===
 |--- Makefile   (revision 320195)
 |+++ Makefile   (working copy)
 --
 Patching file Makefile using Plan A...
 Hunk #1 failed at 14.
 1 out of 1 hunks failed--saving rejects to Makefile.rej
 Hmm...  The next patch looks like a unified diff to me...
 The text leading up to this was:
 --
 |Index: files/patch-commit335500
 |===
 |--- files/patch-commit335500   (revision 0)
 |+++ files/patch-commit335500   (working copy)
 --
 (Creating file files/patch-commit335500...)
 Patching file files/patch-commit335500 using Plan A...
 Hunk #1 succeeded at 1.
 Hmm...  Ignoring the trailing garbage.
 done
 
 -Original Message-
 From: Kubilay Kocak [mailto:koobs.free...@gmail.com] 
 Sent: Friday, June 7, 2013 10:42 PM
 To: Janet Sullivan
 Cc: po...@freebsd.org
 Subject: Re: REWARD for working pam_mount
 
 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
 

You're welcome Janet

For the Makefile, all you want to change is:

-LIB_DEPENDS=   HX.27:${PORTSDIR}/lang/libhx
+LIB_DEPENDS=   HX:${PORTSDIR}/lang/libhx

If that doesn't work for you, I've also attached a second version of the
patch

Let me know how you go

Koobs

=== Generating patch
=== Viewing diff with more
diff -ruN /usr/ports/sysutils/pam_mount/Makefile ./Makefile
--- /usr/ports/sysutils/pam_mount/Makefile  2012-11-17 17:01:40.0 
+1100
+++ ./Makefile  2013-06-08 14:23:04.506365111 +1000
@@ -3,7 +3,7 @@
 # Date created:14 October 2010
 # Whom:gahr
 #
-# $FreeBSD: ports/sysutils/pam_mount/Makefile,v 1.11 2012/11/17 06:01:40 
svnexp Exp $
+# $FreeBSD: head/sysutils/pam_mount/Makefile 300897 2012-07-14 14:29:18Z beat $
 #
 
 PORTNAME=  pam_mount
@@ -14,7 +14,7 @@
 MAINTAINER=g...@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
diff -ruN /usr/ports/sysutils/pam_mount/files/patch-commit335500 
./files/patch-commit335500
--- /usr/ports/sysutils/pam_mount/files/patch-commit335500  1970-01-01 
10:00:00.0 +1000
+++ ./files/patch-commit335500  2013-06-08 15:30:41.045578737 +1000
@@ -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.orig2011-10-06 22:48:08.0 +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.0 +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

REWARD for working pam_mount

2013-06-07 Thread Janet Sullivan
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.
___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to freebsd-ports-unsubscr...@freebsd.org


Re: REWARD for working pam_mount

2013-06-07 Thread Kubilay Kocak
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
Index: Makefile
===
--- Makefile(revision 320195)
+++ Makefile(working copy)
@@ -14,7 +14,7 @@
 MAINTAINER=g...@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.orig2011-10-06 22:48:08.0 +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.0 +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.0 +1100
 ./src/ehd.c2013-06-08 14:46:27.56654 +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.0 +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.0 +1100
 ./src/mount.c  2013-06-08 14:47:54.65561 +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.0 +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.0 +1100
 ./src/mtcrypt.c2013-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)
++