All of lore.kernel.org
 help / color / mirror / Atom feed
* [MERGE] Add a --disable-zfs configure flag.
@ 2012-02-04 19:56 Mike Gilbert
  2012-02-04 20:06 ` Vladimir 'φ-coder/phcoder' Serbinenko
  0 siblings, 1 reply; 9+ messages in thread
From: Mike Gilbert @ 2012-02-04 19:56 UTC (permalink / raw)
  To: grub-devel


[-- Attachment #1.1: Type: text/plain, Size: 298 bytes --]

I happen to have the ZFS libraries installed on my machine, but I don't
want my boot loader to use them. It seems to be broken for me at the
moment in any case.

I'm new to bazaar and this is my first submission to this mailing list,
so please let me know if I've done something incorrectly.

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2: grub-3849.patch --]
[-- Type: text/x-patch; name="grub-3849.patch", Size: 3193 bytes --]

# Bazaar merge directive format 2 (Bazaar 0.90)
# revision_id: floppym@gentoo.org-20120204194808-vy5uw5huaqqsui7l
# target_branch: http://bzr.savannah.gnu.org/r/grub/trunk/grub/
# testament_sha1: 174b6ca637f4fda2819cb82c07bb55424dee8f5a
# timestamp: 2012-02-04 14:48:49 -0500
# base_revision_id: phcoder@gmail.com-20120204130023-z03vb7w0onbf9ste
# 
# Begin patch
=== modified file 'configure.ac'
--- configure.ac	2012-01-22 15:43:14 +0000
+++ configure.ac	2012-02-04 19:48:08 +0000
@@ -968,16 +968,21 @@
                         [Define to 1 if you have the LZMA library.])],)
 AC_SUBST([LIBLZMA])
 
-AC_CHECK_LIB([zfs], [libzfs_init],
-             [LIBZFS="-lzfs"
-              AC_DEFINE([HAVE_LIBZFS], [1],
-                        [Define to 1 if you have the ZFS library.])],)
+AC_ARG_ENABLE([zfs],
+              [AS_HELP_STRING([--disable-zfs], [Disable ZFS support.])])
+
+if test x"$enable_zfs" != xno; then
+  AC_CHECK_LIB([zfs], [libzfs_init],
+               [LIBZFS="-lzfs"
+                AC_DEFINE([HAVE_LIBZFS], [1],
+                          [Define to 1 if you have the ZFS library.])],)
+
+  AC_CHECK_LIB([nvpair], [nvlist_print],
+               [LIBNVPAIR="-lnvpair"
+                AC_DEFINE([HAVE_LIBNVPAIR], [1],
+                          [Define to 1 if you have the NVPAIR library.])],)
+fi
 AC_SUBST([LIBZFS])
-
-AC_CHECK_LIB([nvpair], [nvlist_print],
-             [LIBNVPAIR="-lnvpair"
-              AC_DEFINE([HAVE_LIBNVPAIR], [1],
-                        [Define to 1 if you have the NVPAIR library.])],)
 AC_SUBST([LIBNVPAIR])
 
 LIBS=""

# Begin bundle
IyBCYXphYXIgcmV2aXNpb24gYnVuZGxlIHY0CiMKQlpoOTFBWSZTWdTBFGYAAab/gAAcAQB0Z///
f+/dGr/v//BQBB7stwO3Zu2NdLbhKIp6mTTRogybITT1M0hpkGmgxNDIbSNAlII0yaNTZJ6po9JP
SMmjTQAGhkAAPUGSDRRminkgDanpAaBoAANAGgyHNMjIZMENGEwRpo0YgaZMjAAEEkiNCYjJknpl
MRHlNlGjRoADQ9Qep6j0k1eg+m+77F8l2VVDE+/OX6JZrJAgwZ446YsGc9z5EhMIE8e5ngqBEEqx
RkfG8LVtc14EEhIYwM8jHkaPfL+EJR0aOLcqN+WEBiUixuKz8RJbj1cctLfTQaqEXl4ngqxR7LjG
IiN2XqxOG0TlMpgjxlcvzvVhHJdIG2qVEclkMJNbJPfZxKTd3GMkcQkhIfwCppAccLhmLiAoiDAd
RKut6ZqI3d65GMC74RnbmK6NNA+KgRkY3ba5CZR5SRWqL/2FYZbumIlmZDlN9CusXAEcILQLli02
lMknrJODEuqRIWF6KTUrmfsG2HC7ZV5K9a0wM1IxrluUmFiBt3v1k9BL8iEKcQUb51TK2vfO3XTU
YD39oTkExuauyJcZQzZYOXlIGuyLXuJmshFj770vyos0E3HAky3ASUWYCSgYl1rVahdzsR8mEIvf
AsmrAyICM0QXewFVMWROLbAtJpg5pjOOpo2Nq1cKxq0cDKKuHwecsuWuvply4bdSNi4VsaenEiTB
PViM5+J/Yvs6eBXMyY/Lw9kow9DiVUHGXEZ+A6TkYl3hNJXOcRGcH9C0F4xKIIiTVpUZlFzNSZKP
SSTNoLEdDWwNFSVCobmFmcY0nGDE26U+piYsVaBzPEiGx28kSWnL0U2A1mtg2vkMg4Mhmoe72YaU
NdNIbKa387rIdgONT/A6T+C7pEREqsPDTYs3cYmqxqgOypbEPUvxvvLDOfKJxAxjfBUw2Bjp0exX
VXsz45G4wklLU7GNTxQn1hyH1LWfOpcJbxCNGot6H21MglmwULUysgfBXqsktqkX42PQL7zLqM1M
OhtvFxV/byxLBOVt1bg11dGrCDUzA9PiVw8q0Sc5tt5yla4yInNF4f526cbcbhqYSRj7kmtF1MyO
SQ/9FIbDAJjAM5I1vULNarYzyiq1prPH800JcZ0k4b6h6WI4t8IMLoR6tM7KhE8EjnClOfouboVN
uQcwOBsAkCRwWx7GYYaFxvyZbNGPElqKX9gcEusL5u6tQ0oOcI3leAyphVwLCEemVWISEQoa5JTa
IpYXhksciYPQtrwlSgTpOD1JTq86iJU3FnNmwLnMnkHBKZR6WmKJLGZSonFtE1tyTYg0qgI0JrKQ
pMaKGmtrWhyIl9BcCaBMJHXhObJngIpwKHK6UcExJLwpHjWxb1N3ClKSNycExaXTheNIIjwUETKe
B4BRVQFZBxOG4WE1nashSngy5halgKsjStkFC6JIiOH0grjLEnO1bsP+LuSKcKEhqYIozA==

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 230 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [MERGE] Add a --disable-zfs configure flag.
  2012-02-04 19:56 [MERGE] Add a --disable-zfs configure flag Mike Gilbert
@ 2012-02-04 20:06 ` Vladimir 'φ-coder/phcoder' Serbinenko
  2012-02-04 20:46   ` Mike Gilbert
  0 siblings, 1 reply; 9+ messages in thread
From: Vladimir 'φ-coder/phcoder' Serbinenko @ 2012-02-04 20:06 UTC (permalink / raw)
  To: The development of GNU GRUB; +Cc: Mike Gilbert

On 04.02.2012 20:56, Mike Gilbert wrote:
> I happen to have the ZFS libraries installed on my machine, but I don't
> want my boot loader to use them. It seems to be broken for me at the
> moment in any case.
>
> I'm new to bazaar and this is my first submission to this mailing list,
> so please let me know if I've done something incorrectly.
It's not maintainable to disable a feature every time we meet an issue 
with a part of code. Could you please detail on your issues?
>
>
> _______________________________________________
> Grub-devel mailing list
> Grub-devel@gnu.org
> https://lists.gnu.org/mailman/listinfo/grub-devel


-- 
Regards
Vladimir 'φ-coder/phcoder' Serbinenko



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [MERGE] Add a --disable-zfs configure flag.
  2012-02-04 20:06 ` Vladimir 'φ-coder/phcoder' Serbinenko
@ 2012-02-04 20:46   ` Mike Gilbert
  2012-02-04 21:41     ` Richard Laager
  2012-02-04 22:36     ` Mike Gilbert
  0 siblings, 2 replies; 9+ messages in thread
From: Mike Gilbert @ 2012-02-04 20:46 UTC (permalink / raw)
  To: The development of GNU GRUB
  Cc: Vladimir 'φ-coder/phcoder' Serbinenko

[-- Attachment #1: Type: text/plain, Size: 2443 bytes --]

On 02/04/2012 03:06 PM, Vladimir 'φ-coder/phcoder' Serbinenko wrote:
> On 04.02.2012 20:56, Mike Gilbert wrote:
>> I happen to have the ZFS libraries installed on my machine, but I don't
>> want my boot loader to use them. It seems to be broken for me at the
>> moment in any case.
>>
>> I'm new to bazaar and this is my first submission to this mailing list,
>> so please let me know if I've done something incorrectly.
> It's not maintainable to disable a feature every time we meet an issue
> with a part of code.

There is no maintenance burden here, just a one-time change to
configure.ac. The code already has the proper #ifdefs and whatnot.

Also, this goes beyond my own build issues. Having configure auto-detect
libraries with no way to manually override it creates an "automagic
dependency", which we hate over at Gentoo Linux. The following link has
a great explanation.

http://www.gentoo.org/proj/en/qa/automagic.xml

> Could you please detail on your issues?

I'm getting the following build failure:

gcc -DHAVE_CONFIG_H -I.   -Wall -W -I./include -DGRUB_UTIL=1
-DGRUB_LIBDIR=\"/usr/local/lib/grub\"
-DLOCALEDIR=\"/usr/local/share/locale\"  -DGRUB_MACHINE_PCBIOS=1
-DGRUB_MACHINE=I386_PC -DGRUB_TARGET_CPU_I386=1
-DGRUB_FILE=\"util/getroot.c\" -I. -I. -I. -I. -I./include -I./include
-I./grub-core/gnulib -I./grub-core/gnulib                  -Wno-undef
-Wno-sign-compare -Wno-unused -Wno-unused-parameter               -MT
util/libgrubkern_a-getroot.o -MD -MP -MF
util/.deps-util/libgrubkern_a-getroot.Tpo -c -o
util/libgrubkern_a-getroot.o `test -f 'util/getroot.c' || echo
'./'`util/getroot.c
util/getroot.c:2384:1: error: unknown type name 'libzfs_handle_t'
util/getroot.c: In function 'fini_libzfs':
util/getroot.c:2389:3: warning: implicit declaration of function
'libzfs_fini' [-Wimplicit-function-declaration]
util/getroot.c: At top level:
util/getroot.c:2392:1: error: unknown type name 'libzfs_handle_t'
util/getroot.c: In function 'grub_get_libzfs_handle':
util/getroot.c:2397:7: warning: implicit declaration of function
'libzfs_init' [-Wimplicit-function-declaration]
util/getroot.c:2397:23: warning: assignment makes pointer from integer
without a cast [enabled by default]

I have the libzfs headers in /usr/include/libzfs, which is where the ZFS
on Linux build system puts them. My best guess is that it isn't finding
libzfs.h, but I haven't really dug in.


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 230 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [MERGE] Add a --disable-zfs configure flag.
  2012-02-04 20:46   ` Mike Gilbert
@ 2012-02-04 21:41     ` Richard Laager
  2012-02-04 22:13       ` Mike Gilbert
  2012-02-04 22:36     ` Mike Gilbert
  1 sibling, 1 reply; 9+ messages in thread
From: Richard Laager @ 2012-02-04 21:41 UTC (permalink / raw)
  To: grub-devel; +Cc: Mike Gilbert

[-- Attachment #1: Type: text/plain, Size: 477 bytes --]

Additionally in the case of libzfs specifically:
 A) There have been compatibility breakages in the past and it's not
    versioned.
 B) GRUB has an alternate method of working with ZFS (using the
    command-line tools).

I support* the patch if modified to name the option --disable-libzfs
instead of --disable-zfs.

* Mike, to be clear, I'm not a GRUB developer. I have been doing stuff
  with GRUB and ZFS, which is what brought me to this list.

-- 
Richard

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [MERGE] Add a --disable-zfs configure flag.
  2012-02-04 21:41     ` Richard Laager
@ 2012-02-04 22:13       ` Mike Gilbert
  0 siblings, 0 replies; 9+ messages in thread
From: Mike Gilbert @ 2012-02-04 22:13 UTC (permalink / raw)
  To: Richard Laager; +Cc: grub-devel

On Sat, Feb 4, 2012 at 4:41 PM, Richard Laager <rlaager@wiktel.com> wrote:
> Additionally in the case of libzfs specifically:
>  A) There have been compatibility breakages in the past and it's not
>    versioned.
>  B) GRUB has an alternate method of working with ZFS (using the
>    command-line tools).
>
> I support* the patch if modified to name the option --disable-libzfs
> instead of --disable-zfs.
>

In that case, --without-libzfs sounds better to me than --disable-libzfs.


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [MERGE] Add a --disable-zfs configure flag.
  2012-02-04 20:46   ` Mike Gilbert
  2012-02-04 21:41     ` Richard Laager
@ 2012-02-04 22:36     ` Mike Gilbert
  2012-02-05  1:12       ` Mike Gilbert
  2012-02-05  3:40       ` Darik Horn
  1 sibling, 2 replies; 9+ messages in thread
From: Mike Gilbert @ 2012-02-04 22:36 UTC (permalink / raw)
  To: grub-devel

[-- Attachment #1: Type: text/plain, Size: 718 bytes --]

On 02/04/2012 03:46 PM, Mike Gilbert wrote:
> I have the libzfs headers in /usr/include/libzfs, which is where the ZFS
> on Linux build system puts them. My best guess is that it isn't finding
> libzfs.h, but I haven't really dug in.
> 

As it turns out, there are a few things going on here:

1. grub's configure is failing to detect libnvpair due to some breakage
upstream. See https://github.com/zfsonlinux/zfs/issues/560 .

2. getroot.c only includes libzfs.h if HAVE_LIBZFS and HAVE_LIBNVPAIR
are defined.

3. getroot.c references libzfs_handle_t if HAVE_LIBZFS is set, but does
not look at HAVE_LIBNVPAIR.

So, getroot.c is trying to use a ZFS structure without including the ZFS
header(s).


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 230 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [MERGE] Add a --disable-zfs configure flag.
  2012-02-04 22:36     ` Mike Gilbert
@ 2012-02-05  1:12       ` Mike Gilbert
  2012-02-05  3:40       ` Darik Horn
  1 sibling, 0 replies; 9+ messages in thread
From: Mike Gilbert @ 2012-02-05  1:12 UTC (permalink / raw)
  To: grub-devel


[-- Attachment #1.1: Type: text/plain, Size: 87 bytes --]

Here's a new bundle including a --without-libzfs flag, and a fix for my
build issue.

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2: grub-zfs-changes.patch --]
[-- Type: text/x-patch; name="grub-zfs-changes.patch", Size: 4896 bytes --]

# Bazaar merge directive format 2 (Bazaar 0.90)
# revision_id: floppym@gentoo.org-20120205010752-empg4oxbegj3fepe
# target_branch: http://bzr.savannah.gnu.org/r/grub/trunk/grub/
# testament_sha1: 3de5f3713591cd87700717bed9a9371d99f3e053
# timestamp: 2012-02-04 20:08:34 -0500
# base_revision_id: phcoder@gmail.com-20120204204729-kvhzfohes2vqg8h9
# 
# Begin patch
=== modified file 'configure.ac'
--- configure.ac	2012-02-04 20:47:29 +0000
+++ configure.ac	2012-02-05 01:05:27 +0000
@@ -974,16 +974,21 @@
                         [Define to 1 if you have the LZMA library.])],)
 AC_SUBST([LIBLZMA])
 
-AC_CHECK_LIB([zfs], [libzfs_init],
-             [LIBZFS="-lzfs"
-              AC_DEFINE([HAVE_LIBZFS], [1],
-                        [Define to 1 if you have the ZFS library.])],)
+AC_ARG_WITH([libzfs],
+              [AS_HELP_STRING([--without-libzfs], [Do not use libzfs.])])
+
+if test x"$with_libzfs" != xno; then
+  AC_CHECK_LIB([zfs], [libzfs_init],
+               [LIBZFS="-lzfs"
+                AC_DEFINE([HAVE_LIBZFS], [1],
+                          [Define to 1 if you have the ZFS library.])],)
+
+  AC_CHECK_LIB([nvpair], [nvlist_print],
+               [LIBNVPAIR="-lnvpair"
+                AC_DEFINE([HAVE_LIBNVPAIR], [1],
+                          [Define to 1 if you have the NVPAIR library.])],)
+fi
 AC_SUBST([LIBZFS])
-
-AC_CHECK_LIB([nvpair], [nvlist_print],
-             [LIBNVPAIR="-lnvpair"
-              AC_DEFINE([HAVE_LIBNVPAIR], [1],
-                        [Define to 1 if you have the NVPAIR library.])],)
 AC_SUBST([LIBNVPAIR])
 
 LIBS=""

=== modified file 'util/getroot.c'
--- util/getroot.c	2012-02-03 21:36:51 +0000
+++ util/getroot.c	2012-02-05 01:07:52 +0000
@@ -2380,7 +2380,7 @@
 }
 #endif
 
-#ifdef HAVE_LIBZFS
+#if defined(HAVE_LIBZFS) && defined(HAVE_LIBNVPAIR)
 static libzfs_handle_t *__libzfs_handle;
 
 static void

# Begin bundle
IyBCYXphYXIgcmV2aXNpb24gYnVuZGxlIHY0CiMKQlpoOTFBWSZTWZtMHVMABbj/gAAcAQB9Z///
f+/dmr////BgCbz6e7nVKeDVb2tpxTtSLpoKAAANRTNTTEAyNA0NAxAANMgADQGQSUCniGU2qn4k
9U9T1ANAAAAAAAAJSmjBBoI9VH6NU/RMakeoGj1AyDR6jJoAASJJT9CZMgmTUxMTIaAGQaAMhiNk
mIcZMmjENNDATQxNGmTEDIwmjTTCDJgqSQmjQJpiaATaJNGmmiaek0A2oAGg2pZo18+4FDOWOedB
0bRznZDqI5jdUYNzesjZDOMx37qDenVvStMrt19BYIvasYBu9NNVmOLq1RUFcSlKNaiZgW05mlJL
0bmV/x38sD+MyZqsVUqlKnDqhr3Rq1iZS2EVkSyUqnNRllkk3SppwUsUmFjsDIXpbAv1q1D8PRNH
UdoR/jEVnNzaZ6dsNm+AVOEgBhwLFG3OqQ840iTtTTp3cuoOQOtNWoO9v23WMKmFoCGQQPPBCBme
GFVxsGsbXohTXLD4aOYOBADB8pZgFEKUnOPWiioT2fRD9M80+o9h4Q80ehc7vXCuftNJyRqZTzm2
/169O32bNLRC04Qvt7Z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ZrE1wyNDwRgb2dHEzWZbEUzvs7UeF2z4I+E3txPcYBYwOaO9HpOSPuuc50
Ka0qLMidaHVDkfbCkeiPKSGLKdPZHcel7xt5U9tX1am0yhij/4u5IpwoSE2mDqmA

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 230 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [MERGE] Add a --disable-zfs configure flag.
  2012-02-04 22:36     ` Mike Gilbert
  2012-02-05  1:12       ` Mike Gilbert
@ 2012-02-05  3:40       ` Darik Horn
  2012-02-05  5:44         ` Mike Gilbert
  1 sibling, 1 reply; 9+ messages in thread
From: Darik Horn @ 2012-02-05  3:40 UTC (permalink / raw)
  To: The development of GNU GRUB; +Cc: Mike Gilbert

[-- Attachment #1: Type: text/plain, Size: 433 bytes --]

On Sat, Feb 4, 2012 at 16:36, Mike Gilbert <floppym@gentoo.org> wrote:
>
> 1. grub's configure is failing to detect libnvpair due to some breakage
> upstream. See https://github.com/zfsonlinux/zfs/issues/560 .
>

Please try the attached patch, which should fix this build failure on
Gentoo. Remember to run ./autogen.sh after applying the patch.

The same patch is posted to your Github ticket.

-- 
Darik Horn <dajhorn@vanadac.com>

[-- Attachment #2: 0001-Let-libnvpair-be-linked-independently-of-libzfs.patch --]
[-- Type: text/x-patch, Size: 1494 bytes --]

From 3483b67dae85ac1f039613866c56b51f634faeb7 Mon Sep 17 00:00:00 2001
From: Darik Horn <dajhorn@vanadac.com>
Date: Sat, 4 Feb 2012 20:54:43 -0600
Subject: [PATCH] Let libnvpair be linked independently of libzfs.

Autoconf will fail to detect the ZoL libnvpair on systems that do not
implicitly link library runtime dependencies, which is anything that
has the GCC 4.5 DCO update.

Build libuutil before libnvpair, and put it on the the LDADD line of
the libnvpair automake template.

Closes: #560
---
 lib/Makefile.am           |    2 +-
 lib/libnvpair/Makefile.am |    3 +++
 2 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/lib/Makefile.am b/lib/Makefile.am
index 51a8abd..09139d5 100644
--- a/lib/Makefile.am
+++ b/lib/Makefile.am
@@ -4,4 +4,4 @@ SUBDIRS = libspl libavl libefi libshare libunicode
 
 # These four libraries, which are installed as the final build product,
 # incorporate the five convenience libraries given above.
-SUBDIRS += libnvpair libuutil libzpool libzfs
+SUBDIRS += libuutil libnvpair libzpool libzfs
diff --git a/lib/libnvpair/Makefile.am b/lib/libnvpair/Makefile.am
index b0cf8ad..467f461 100644
--- a/lib/libnvpair/Makefile.am
+++ b/lib/libnvpair/Makefile.am
@@ -14,6 +14,9 @@ libnvpair_la_SOURCES = \
 	$(top_srcdir)/module/nvpair/nvpair_alloc_fixed.c \
 	$(top_srcdir)/module/nvpair/nvpair.c
 
+libnvpair_la_LIBADD = \
+        $(top_builddir)/lib/libuutil/libuutil.la
+
 libnvpair_la_LDFLAGS = -version-info 1:1:0
 
 EXTRA_DIST = \
-- 
1.7.5.4


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [MERGE] Add a --disable-zfs configure flag.
  2012-02-05  3:40       ` Darik Horn
@ 2012-02-05  5:44         ` Mike Gilbert
  0 siblings, 0 replies; 9+ messages in thread
From: Mike Gilbert @ 2012-02-05  5:44 UTC (permalink / raw)
  To: Darik Horn; +Cc: The development of GNU GRUB

[-- Attachment #1: Type: text/plain, Size: 528 bytes --]

On 02/04/2012 10:40 PM, Darik Horn wrote:
> On Sat, Feb 4, 2012 at 16:36, Mike Gilbert <floppym@gentoo.org> wrote:
>>
>> 1. grub's configure is failing to detect libnvpair due to some breakage
>> upstream. See https://github.com/zfsonlinux/zfs/issues/560 .
>>
> 
> Please try the attached patch, which should fix this build failure on
> Gentoo. Remember to run ./autogen.sh after applying the patch.
> 
> The same patch is posted to your Github ticket.
> 

Thanks, that fixes AC_CHECK_LIB(nvpair, nvlist_print).


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 230 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2012-02-05  5:44 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-04 19:56 [MERGE] Add a --disable-zfs configure flag Mike Gilbert
2012-02-04 20:06 ` Vladimir 'φ-coder/phcoder' Serbinenko
2012-02-04 20:46   ` Mike Gilbert
2012-02-04 21:41     ` Richard Laager
2012-02-04 22:13       ` Mike Gilbert
2012-02-04 22:36     ` Mike Gilbert
2012-02-05  1:12       ` Mike Gilbert
2012-02-05  3:40       ` Darik Horn
2012-02-05  5:44         ` Mike Gilbert

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.