Your message dated Sat, 01 Jul 2017 15:06:04 +0000
with message-id <[email protected]>
and subject line Bug#866178: fixed in lbdb 0.43
has caused the Debian Bug report #866178,
regarding lbdb: add khard support
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
866178: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=866178
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: lbdb
Version: 0.42.1
Severity: wishlist
Tags: patch

Hi,

I'm using lbdb with khard as part of a CardDAV contacts system I set up
for myself recently, documented at
https://www.chiark.greenend.org.uk/~cjwatson/blog/new-address-book.html.
Would you consider taking this patch for lbdb so that others can use it
more easily?

diff --git a/README b/README
index 17baf44..b62c385 100644
--- a/README
+++ b/README
@@ -179,6 +179,9 @@ m_vcf
        This module uses libvformat to search for addresses from the
        space-separated set of vCard files defined in $VCF_FILES.
 
+m_khard
+       This module searches a CardDAV address book via khard.
+
 
 Feel free to create your own modules to query other kinds of
 databases.  m_finger should be a good example of how to do it.
@@ -214,3 +217,4 @@ Many thanks to the authors of the several modules and 
extensions:
 - Dave Pearson <[email protected]>                   (m_palm, lbdb.el)
 - Brian Salter-Duke <[email protected]>        (m_muttalias)
 - François Charlier <[email protected]>          (m_goobook)
+- Colin Watson <[email protected]>               (m_khard)
diff --git a/configure b/configure
index 6a72461..6bd6f56 100755
--- a/configure
+++ b/configure
@@ -628,6 +628,7 @@ VFORMAT
 PBXBUILD
 XCODEBUILD
 PERL
+KHARD
 EVOLUTION_ADDRESSBOOK_EXPORT
 PGP
 PGPK
@@ -733,6 +734,7 @@ with_gpg
 with_pgpk
 with_pgp
 with_evolution_addressbook_export
+with_khard
 '
       ac_precious_vars='build_alias
 host_alias
@@ -1376,6 +1378,7 @@ Optional Packages:
   --with-pgp              with PGP 2.* support
   --with-evolution-addressbook-export
                           with Evolution support ('auto' searchs at runtime)
+  --with-khard            with khard support
 
 Some influential environment variables:
   CC          C compiler command
@@ -6198,6 +6201,114 @@ fi
     fi
 
 
+    withval=""
+
+# Check whether --with-khard was given.
+if test "${with_khard+set}" = set; then :
+  withval=$with_khard;
+fi
+
+    if test x$withval = xyes; then
+        # Extract the first word of "khard", so it can be a program name with 
args.
+set dummy khard; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_KHARD+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $KHARD in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_KHARD="$KHARD" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_path_KHARD="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" 
>&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+  test -z "$ac_cv_path_KHARD" && ac_cv_path_KHARD=""no""
+  ;;
+esac
+fi
+KHARD=$ac_cv_path_KHARD
+if test -n "$KHARD"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $KHARD" >&5
+$as_echo "$KHARD" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+        if test x$KHARD = xno; then
+           as_fn_error $? "khard not in PATH" "$LINENO" 5
+        else
+           MODULES="$MODULES m_khard"
+
+        fi
+    elif test x$withval = x; then
+        # Extract the first word of "khard", so it can be a program name with 
args.
+set dummy khard; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_KHARD+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $KHARD in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_KHARD="$KHARD" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_path_KHARD="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" 
>&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+  test -z "$ac_cv_path_KHARD" && ac_cv_path_KHARD=""no""
+  ;;
+esac
+fi
+KHARD=$ac_cv_path_KHARD
+if test -n "$KHARD"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $KHARD" >&5
+$as_echo "$KHARD" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+        if test x$KHARD != xno; then
+           MODULES="$MODULES m_khard"
+
+        fi
+    elif test x$withval != xno; then
+        KHARD=$withval
+        MODULES="$MODULES m_khard"
+
+    fi
+
+
 # Extract the first word of "perl", so it can be a program name with args.
 set dummy perl; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
diff --git a/configure.in b/configure.in
index c64fa3b..20fa85a 100644
--- a/configure.in
+++ b/configure.in
@@ -175,6 +175,7 @@ LBDB_ARG_WITH(PGPK, pgpk, m_pgp5, [with PGP 5.* support])
 LBDB_ARG_WITH(PGP, pgp, m_pgp2, [with PGP 2.* support])
 LBDB_ARG_WITH(EVOLUTION_ADDRESSBOOK_EXPORT, evolution-addressbook-export,
               m_evolution, [with Evolution support ('auto' searchs at 
runtime)])
+LBDB_ARG_WITH(KHARD, khard, m_khard, [with khard support])
 
 AC_PATH_PROG(PERL, perl, "no")
 if test "x$PERL" != xno ; then
diff --git a/debian/control b/debian/control
index 9aa5159..56a48b8 100644
--- a/debian/control
+++ b/debian/control
@@ -15,6 +15,7 @@ Depends: emacsen-common (>= 2.0.8),
 Suggests: abook,
           finger,
           goobook,
+          khard,
           libauthen-sasl-perl,
           libnet-ldap-perl,
           libpalm-perl,
@@ -45,3 +46,4 @@ Description: Little Brother's DataBase for the mutt mail 
reader
   - m_ldap (query some LDAP server)
   - m_evolution (search in the Evolution addressbook)
   - m_vcf (search in vcard files using libvformat)
+  - m_khard (search a CardDAV address book via khard)
diff --git a/debian/rules b/debian/rules
index eeb41e0..aa1dc8d 100755
--- a/debian/rules
+++ b/debian/rules
@@ -27,7 +27,8 @@ override_dh_auto_configure:
                        --with-gpg=/usr/bin/gpg \
                        --with-pgpk=/usr/bin/pgpk \
                        --with-pgp=/usr/bin/pgp \
-                       --with-evolution-addressbook-export=auto
+                       --with-evolution-addressbook-export=auto \
+                       --with-khard=/usr/bin/khard
 
 override_dh_auto_install:
        $(MAKE) install_prefix=$(DROOT) install
diff --git a/lbdb.rc.in b/lbdb.rc.in
index 7dd0089..b45718d 100644
--- a/lbdb.rc.in
+++ b/lbdb.rc.in
@@ -38,6 +38,7 @@
 # - m_osx_addressbook  search the OS X addressbook (only available on OS X).
 # - m_evolution  search in the Ximan Evolution addressbook.
 # - m_vcf        search a vcard (according to RFC2426) file.
+# - m_khard      search a CardDAV address book via khard
 
 METHODS="m_inmail m_passwd m_finger"
 
diff --git a/lbdbq.man.in b/lbdbq.man.in
index b9b2270..912fc38 100644
--- a/lbdbq.man.in
+++ b/lbdbq.man.in
@@ -304,6 +304,10 @@ which is shipped with evolution.
 This module uses libvformat to search for addresses from the
 space\-separated set of vCard files defined in
 .IR $VCF_FILES .
+.TP
+.BR m_khard
+This module searches a CardDAV address book via
+.BR khard (1).
 .PP
 Feel free to create your own modules to query other database resources,
 YP maps, and the like.
@@ -379,8 +383,9 @@ Torsten Jerzembeck <[email protected]> 
(m_addr_email),
 Adrian Likins <[email protected]> (m_getent),
 Gergely Nagy <[email protected]> (m_wanderlust),
 Dave Pearson <[email protected]> (m_palm, lbdb.el),
-Brian Salter-Duke <[email protected]> (m_muttalias), and
-François Charlier <[email protected]> (m_goobook)
+Brian Salter-Duke <[email protected]> (m_muttalias),
+François Charlier <[email protected]> (m_goobook), and
+Colin Watson <[email protected]> (m_khard)
 .SH AUTHOR
 The lbdb package was initially written by Thomas Roessler
 <[email protected]> and is now maintained and heavily extended by
diff --git a/m_khard.sh.in b/m_khard.sh.in
new file mode 100644
index 0000000..404ccd1
--- /dev/null
+++ b/m_khard.sh.in
@@ -0,0 +1,30 @@
+#! @SH@
+#
+# -*-sh-mode-*-
+#
+#     Copyright (C) 2017 Colin Watson <[email protected]>
+#
+#     This program is free software; you can redistribute it and/or modify
+#     it under the terms of the GNU General Public License as published by
+#     the Free Software Foundation; either version 2 of the License, or
+#     (at your option) any later version.
+#
+#     This program is distributed in the hope that it will be useful,
+#     but WITHOUT ANY WARRANTY; without even the implied warranty of
+#     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#     GNU General Public License for more details.
+#
+#     You should have received a copy of the GNU General Public License
+#     along with this program; if not, write to the Free Software Foundation,
+#     Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301,, USA.
+
+m_khard_query() {
+    KHARD=@KHARD@
+
+    if [ -x "$KHARD" ]
+    then
+        "$KHARD" email \
+            --parsable --remove-first-line --search-in-source-files \
+            "$1"
+    fi
+}
-- 
2.11.0

-- System Information:
Debian Release: 9.0
  APT prefers stable
  APT policy: (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 4.9.0-3-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8), 
LANGUAGE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages lbdb depends on:
ii  emacsen-common  2.0.8
ii  libc6           2.24-11+deb9u1
ii  libvformat0     1.13-10
ii  perl            5.24.1-3

lbdb recommends no packages.

Versions of packages lbdb suggests:
ii  abook                0.6.1-1+b1
ii  finger               0.17-15.1
pn  goobook              <none>
ii  libauthen-sasl-perl  2.1600-1
ii  libnet-ldap-perl     1:0.6500+dfsg-1
ii  libpalm-perl         1:1.400-1
ii  mutt                 1.7.2-1
ii  procmail             3.22-25+b1

-- no debconf information

Thanks,

-- 
Colin Watson                                       [[email protected]]

--- End Message ---
--- Begin Message ---
Source: lbdb
Source-Version: 0.43

We believe that the bug you reported is fixed in the latest version of
lbdb, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Roland Rosenfeld <[email protected]> (supplier of updated lbdb package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Format: 1.8
Date: Sat, 01 Jul 2017 13:10:13 +0200
Source: lbdb
Binary: lbdb
Architecture: source amd64
Version: 0.43
Distribution: unstable
Urgency: medium
Maintainer: Roland Rosenfeld <[email protected]>
Changed-By: Roland Rosenfeld <[email protected]>
Description:
 lbdb       - Little Brother's DataBase for the mutt mail reader
Closes: 866178
Changes:
 lbdb (0.43) unstable; urgency=medium
 .
   * Rebuild aclocal with version 1.15.
   * Update config.guess and config.sub from autotools-dev 20161112.1
   * m_khard: New CardDAV module using khard.  Thanks to Colin Watson for
     providing the patch (Closes: #866178).
   * Upgrade to Standards-Version 4.0.0 (https in copyright format).
   * Upgrade to debhelper 10.
   * Update TODO list.
Checksums-Sha1:
 952728d1be7f63191043e1ef8b2ae9293c64efb2 1448 lbdb_0.43.dsc
 89dce782494b47ee55ce2844b1a60c6482ef0a0c 124268 lbdb_0.43.tar.xz
 24b33b359b33bf36e29c7c466cfdea14801704a7 43920 lbdb-dbgsym_0.43_amd64.deb
 5fb595cf9281108815cd4c68bf2bca09b3a769e7 5892 lbdb_0.43_amd64.buildinfo
 68bc4ac7ac03acfec060c9a18c267fccc1bc80fb 73756 lbdb_0.43_amd64.deb
Checksums-Sha256:
 4a0be864ad06cfa1e894f133d9562afcd471d5b946e9d6c34553d304799d59c7 1448 
lbdb_0.43.dsc
 bbe16a21e210f237bd26a0983c54308d65cff4c4e11b44b2687c413a78ecd48a 124268 
lbdb_0.43.tar.xz
 555c35af5965cceb545f7555127cadcec4dfa548238c153783f9ddd60b44fd1e 43920 
lbdb-dbgsym_0.43_amd64.deb
 3a054ae7e693a3863c661bbac05fd4ffcbd41c3fcdf4a5f498237da15e0f30fa 5892 
lbdb_0.43_amd64.buildinfo
 d77a6f2a675e52943e19b2bb936a4b13558fb37f0979c17dd83d8503bfbf8287 73756 
lbdb_0.43_amd64.deb
Files:
 886bd71a23c2a322ec671b4e7bcf0382 1448 mail optional lbdb_0.43.dsc
 171ac219faf6b7ca0e72cd85f3c24696 124268 mail optional lbdb_0.43.tar.xz
 d1d947b59e65b51a8100b975de0f1af5 43920 debug extra lbdb-dbgsym_0.43_amd64.deb
 688e4a1f128606f2b0df17a24eb0a5d8 5892 mail optional lbdb_0.43_amd64.buildinfo
 1e8d0fb7ebad612040cb994925b271d7 73756 mail optional lbdb_0.43_amd64.deb

-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEErC+9sQSUPYpEoCEdAnE7z8pUELIFAllXnIEACgkQAnE7z8pU
ELLD7Q/7B+L4GwR2IeKOAIfmmzq++hezBbWkAUJNgXlTtI79A3OXeboGczd4GuEs
SKTuvKPlfN5NKLjIAUUPLG5/lm3AEtTyNrR3scDCk8VDj+8DpZei/9QiI1usxnDV
Bg03S+6ZnnG7H068oMdQ7OLJsMFrdAiS+TPrrbnUaQR9BZyqclDy/7pTjgi1dEIa
RegSfezm5hIL06fhpIbZa3IinC9OX3SUy0sykF0E9j1iyJoJuk02EMNqxusUUg1U
7ZN9Ux1ESTm4KhaSyAckxlTh7T3qiQolgBPYW9NQGz084t+5zxySc6qQv6klJn53
XLOkY7VjRiG7ks+ERFtrq9iWfJAFJ/wpn8I/VtcgWb1X1aj838WkUZQ5WV9KmP0e
6cZ3epb6wZAoqFK+QFE7mqyBt9BvOUqhfcvCNGSInu1SssApZg5sV7a0ivCZmb3T
SY5QamUNOR3Wtf03BRxppe1DrMiVOOLqmi+JWY2x7d2nX1Cz/8OZr2GLCS1hiEuz
dCPYutvWrFfpCURLoQaqqfROwMq84V1sx2EZtszskilQxnOTI/YJoxK/TwCMDWWO
hC4QS54jaiwP1SsyQVMFj5zJEM33iZNvZV4Ihs20LdNY1LY40tbX3k/VOZaU7qsC
aK2MjrqYabbEzL4oqi+3ql73QWfs6sRWkmOnk8Fv2NJlqbJE8tI=
=Uh8o
-----END PGP SIGNATURE-----

--- End Message ---

Reply via email to