--- ldapvi-1.7.orig/debian/changelog +++ ldapvi-1.7/debian/changelog @@ -0,0 +1,127 @@ +ldapvi (1.7-7) unstable; urgency=low + + * Change libreadline5-dev to libreadline-dev (closes: #553795) + + -- Gerfried Fuchs Mon, 02 Nov 2009 20:20:57 +0100 + +ldapvi (1.7-6) unstable; urgency=low + + * New patch getline-conflict fetched from upstream, renaming the included + getline function to not conflict with glibc's one (closes: #552868) + + -- Gerfried Fuchs Mon, 02 Nov 2009 08:07:56 +0100 + +ldapvi (1.7-5) unstable; urgency=low + + * Install doc-base file for the user manual. + * Add "ldap-conf: yes" to /etc/ldapvi.conf so the ldap.conf file is still + read and not disabled just because we switch the otherwise paged help off + (closes: #546602) + * Add DEP3 tags to the patches. + * Upgraded to Standards-Version 3.8.3: + - Add README.source file referencing quilt. + - Support parallel building. + * Switched debianization to BSD style. + * New patch manpage-hyphen which escapes the dashes that aren't meant to be + hyphens. + * Explicitly strip .comment section which install -s doesn't do. + + -- Gerfried Fuchs Fri, 25 Sep 2009 22:52:30 +0200 + +ldapvi (1.7-4) unstable; urgency=low + + * Removed Depends on editor, Debian assures itself that there is an editor + available (closes: #444865) + * Switch to using quilt instead of patching directly, split into these + patches: + - disable-libcrypto: disable libcrypto due to bug/licensing isssues + - sensible-editor-pager: use sensible-{editor,pager} instead of vi and + less + - unpaged-help: the posibility to use an unpaged --help output + * Add Homepage: to control file. + * Linked to GPL-2 in copyright file directly, added hint for later versions. + + -- Gerfried Fuchs Wed, 17 Oct 2007 15:53:38 +0200 + +ldapvi (1.7-3) unstable; urgency=low + + * Test for GNUmakefile instead of Makefile when cleaning up (closes: #442624) + + -- Gerfried Fuchs Sun, 16 Sep 2007 21:53:15 +0200 + +ldapvi (1.7-2) unstable; urgency=low + + * s/less/sensible-pager/: use Debian's pager magic instead of hardcoded + less. + * Pulled patch for unpaged-help config option from upstream and ship + systemwide configuration file that sets it (closes: #424978) + + -- Gerfried Fuchs Sat, 28 Jul 2007 21:08:26 +0200 + +ldapvi (1.7-1) unstable; urgency=low + + * New upstream release which includes the buffer overflow fix. + * Updated copyright file with current year list. + * Build manual.html and install only itself and its dependencies. + + -- Gerfried Fuchs Sun, 20 May 2007 00:20:59 +0200 + +ldapvi (1.6-3) unstable; urgency=high + + * Fixed a buffer overflow in home_filename function which was reported to + upstream. + + -- Gerfried Fuchs Fri, 09 Feb 2007 00:16:48 +0100 + +ldapvi (1.6-2) unstable; urgency=low + + * Alright, it's called libsasl2-dev now, not libsasl2-2-dev anymore... + + -- Gerfried Fuchs Sun, 10 Dec 2006 15:20:32 +0100 + +ldapvi (1.6-1) unstable; urgency=low + + * New upstream release which supports SASL, UTF-8 and configuration file. + Requires additional dependencies: libsasl2-2-dev, libreadline5-dev + * Made the watch file watch again. + * Don't patch GNUmakefile.in but instead save configure before calling + distclean. + * Lowercased synopsis start. + * Applied patch from upstream to be able to compile without a libcrypto, see + README.Debian. + + -- Gerfried Fuchs Sat, 18 Nov 2006 13:02:21 +0100 + +ldapvi (1.5-2) unstable; urgency=low + + * Patched misc.c to fall back onto sensible-editor instead of vi, and add + depends on editor so at least one is available for sure (closes: #367995) + * Applied replace_not_delete_add.diff to make it work for changing attributes + which are allowed only once (closes: #374962) + * Bumped Standards-Version to 3.7.2, no changes required. + + -- Gerfried Fuchs Fri, 23 Jun 2006 03:56:36 -0500 + +ldapvi (1.5-1) unstable; urgency=low + + * New upstream release. + * Updated watch file to version 3, and make it work again. + * Bumped Standards-Version to 3.6.2, no changes required. + * Applied patch from David Lichteblau himself for libldap 2.1, because + vanilla ldapvi requires libldap 2.2. Thanks! + * Updated FSF address in copyright file. + + -- Gerfried Fuchs Tue, 13 Dec 2005 21:30:13 +0100 + +ldapvi (1.1-2) unstable; urgency=low + + * fixed segfault: allow deletions to be skipped + + -- Gerfried Fuchs Wed, 7 Jul 2004 14:33:02 +0200 + +ldapvi (1.1-1) unstable; urgency=low + + * Initial Release (closes: #237082) + * GNUmakefile.in: removed configure from distclean target :-( + + -- Gerfried Fuchs Tue, 06 Jul 2004 17:21:19 +0200 --- ldapvi-1.7.orig/debian/postinst +++ ldapvi-1.7/debian/postinst @@ -0,0 +1,10 @@ +#!/bin/sh -e +# postinst for ldapvi +# copyright 2008 by Gerfried Fuchs +# Licenced under BSD style + +if [ "$1" = configure ]; then + if which install-docs >/dev/null 2>&1; then + install-docs -i /usr/share/doc-base/ldapvi-user-manual + fi +fi --- ldapvi-1.7.orig/debian/rules +++ ldapvi-1.7/debian/rules @@ -0,0 +1,125 @@ +#!/usr/bin/make -f +# debian/rules for ldapvi +# copyright 2004-2009 by Gerfried Fuchs +# Licenced under BSD style + +PKG = ldapvi +TMP = $(CURDIR)/debian/$(PKG) + +# These are used for cross-compiling and for saving the configure script +# from having to guess our platform (since we know it already) +DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) +DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) + +CFLAGS = -Wall -g +INSTALL = install +INSTALL_FILE = $(INSTALL) -p -oroot -groot -m644 +INSTALL_PROGRAM = $(INSTALL) -p -oroot -groot -m755 +INSTALL_SCRIPT = $(INSTALL) -p -oroot -groot -m755 +INSTALL_DIR = $(INSTALL) -p -d -oroot -groot -m755 +ifneq (,$(filter noopt,$(DEB_BUILD_OPTIONS))) + CFLAGS += -O0 +else + CFLAGS += -O2 +endif +ifeq (,$(filter nostrip,$(DEB_BUILD_OPTIONS))) + INSTALL_PROGRAM += -s + STRIP = true +endif +ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS))) + NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS))) + MAKEFLAGS += -j$(NUMJOBS) +endif + + +QUILT_STAMPFN = patch-stamp +include /usr/share/quilt/quilt.make + + +clean: unpatch + $(checkdir) + $(checkroot) + -rm -rf $(TMP) debian/substvars debian/files \ + build-stamp install-stamp config.log test/*.out \ + manual/manual.html config.log + [ ! -f GNUmakefile ] || $(MAKE) clean + # saving configure from distclean + cp -a configure configure.save + [ ! -f Makefile ] || $(MAKE) distclean + mv configure.save configure + + +build: build-stamp +build-stamp: patch-stamp + $(checkdir) + CFLAGS="$(CFLAGS)" ./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info --with-libcrypto=none + $(MAKE) + cd manual && $(MAKE) manual.html + touch build-stamp + + +check: build + $(checkdir) + cd test && ./try + +install: install-stamp +install-stamp: build + $(checkdir) + $(checkroot) + -rm -rf $(TMP) + $(INSTALL_DIR) $(TMP)/usr/bin $(TMP)/usr/share/man/man1 \ + $(TMP)/usr/share/doc/$(PKG) $(TMP)/etc + ### install currently broken, do it on our own + # $(MAKE) install prefix=$(TMP)/usr + $(INSTALL_PROGRAM) ldapvi $(TMP)/usr/bin + test "$(STRIP)" != true || strip \ + --remove-section=.comment --remove-section=.note \ + $(TMP)/usr/bin/ldapvi + $(INSTALL_FILE) debian/ldapvi.conf $(TMP)/etc + $(INSTALL_FILE) ldapvi.1 $(TMP)/usr/share/man/man1 + $(INSTALL_FILE) manual/manual.css manual/manual.html manual/bg.png \ + $(TMP)/usr/share/doc/ldapvi + $(INSTALL_FILE) NEWS $(TMP)/usr/share/doc/$(PKG)/changelog + cd $(TMP)/usr && gzip -9 share/doc/$(PKG)/changelog \ + share/man/man1/ldapvi.1 + touch install-stamp + + +# Build architecture-independent files here. +binary-indep: build install +# We have nothing to do by default. + + +# Build architecture-dependent files here. +binary-arch: build install + $(checkdir) + $(checkroot) + $(INSTALL_DIR) $(TMP)/DEBIAN $(TMP)/usr/share/doc-base + $(INSTALL_FILE) debian/copyright debian/README.Debian \ + $(TMP)/usr/share/doc/$(PKG) + $(INSTALL_FILE) debian/changelog \ + $(TMP)/usr/share/doc/$(PKG)/changelog.Debian + gzip -9 $(TMP)/usr/share/doc/$(PKG)/changelog.Debian + $(INSTALL_FILE) debian/doc-base/ldapvi-user-manual \ + $(TMP)/usr/share/doc-base/ + $(INSTALL_FILE) debian/conffiles \ + $(TMP)/DEBIAN + dpkg-shlibdeps -Tdebian/substvars -dDepends $(TMP)/usr/bin/ldapvi + dpkg-gencontrol -ldebian/changelog -isp -Tdebian/substvars \ + -p$(PKG) -P$(TMP) + cd $(TMP) && find * -type f ! -regex '^DEBIAN/.*' -print0 | \ + xargs -r0 md5sum > DEBIAN/md5sums + dpkg --build $(TMP) .. + + +binary: binary-arch + +define checkdir + test -f debian/rules +endef + +define checkroot + test root = "`whoami`" +endef + +.PHONY: clean build check install binary-indep binary-arch binary --- ldapvi-1.7.orig/debian/control +++ ldapvi-1.7/debian/control @@ -0,0 +1,17 @@ +Source: ldapvi +Section: text +Priority: optional +Maintainer: Gerfried Fuchs +Build-Depends: libldap2-dev, libglib2.0-dev, libpopt-dev, libncurses5-dev, libsasl2-dev, libreadline5-dev, xsltproc, quilt +Standards-Version: 3.8.3 +Homepage: http://www.lichteblau.com/ldapvi/ + +Package: ldapvi +Architecture: any +Depends: ${shlibs:Depends} +Description: perform an LDAP search and update results using a text editor + From a first glance ldapvi looks like ldapsearch: You search for entries in + the ldap database. But the results get opened in your preferred editor, and + you can change, add or delete entries from there. After you are done you quit + the editor and ldapvi offers you several options: View your changes as LDIF, + commit changes or discard them. --- ldapvi-1.7.orig/debian/copyright +++ ldapvi-1.7/debian/copyright @@ -0,0 +1,29 @@ +This package was debianized by Gerfried Fuchs on +Mon, 8 Mar 2004 11:38:57 +0100. The debianization of the package is +licensed under BSD style, see /usr/share/common-licenses/BSD. + +It was downloaded from + +Upstream Author: David Lichteblau + +Copyright: + + Copyright (c) 2003,2004,2005,2006,2007 David Lichteblau + + 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, 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 + +On Debian GNU/Linux systems, the complete text of the GNU General +Public License version 2 can be found in `/usr/share/common-licenses/GPL-2', +later versions can be found in the same directory. --- ldapvi-1.7.orig/debian/prerm +++ ldapvi-1.7/debian/prerm @@ -0,0 +1,10 @@ +#!/bin/sh -e +# prerm for ldapvi +# copyright 2008 by Gerfried Fuchs +# Licenced under BSD style + +if [ "$1" = remove ] || [ "$1" = upgrade ]; then + if which install-docs >/dev/null 2>&1; then + install-docs -r /usr/share/doc-base/ldapvi-user-manual + fi +fi --- ldapvi-1.7.orig/debian/README.source +++ ldapvi-1.7/debian/README.source @@ -0,0 +1,2 @@ +This package uses quilt for its patch management, see +/usr/share/doc/quilt/README.source if you are unfamiliar with it. --- ldapvi-1.7.orig/debian/watch +++ ldapvi-1.7/debian/watch @@ -0,0 +1,3 @@ +version=3 +http://www.lichteblau.com/ldapvi/ http://www.lichteblau.com/download/ldapvi-([0-9.]+).tar.gz debian uupdate +# Site/Directory Pattern Version Script --- ldapvi-1.7.orig/debian/ldapvi.conf +++ ldapvi-1.7/debian/ldapvi.conf @@ -0,0 +1,3 @@ +profile default +unpaged-help: yes +ldap-conf: yes --- ldapvi-1.7.orig/debian/README.Debian +++ ldapvi-1.7/debian/README.Debian @@ -0,0 +1,16 @@ +ldapvi for Debian +----------------- + + Since version 1.6 of ldapvi it is able to link against a libcrypto for + supporting MD5. Unfortunately there are some problems with this: It + supports both linking it against the openssl and the gnutls libraries. + The former is out of scope because of the licence incompatibility of it + with the GPL. ldapvi author would add linking exception to its licence, + though it uses libreadline and that one doesn't have the exception. + + The latter though has a more severe problem: The password prompt will be + displayed in clear text on the screen. It is yet unknown why, but for the + time being upstream was so kind to send a patch along to disable libcrypto + linking all along. + + -- Gerfried Fuchs Sat, 18 Nov 2006 13:02:21 +0100 --- ldapvi-1.7.orig/debian/conffiles +++ ldapvi-1.7/debian/conffiles @@ -0,0 +1 @@ +/etc/ldapvi.conf --- ldapvi-1.7.orig/debian/doc-base/ldapvi-user-manual +++ ldapvi-1.7/debian/doc-base/ldapvi-user-manual @@ -0,0 +1,9 @@ +Document: ldapvi-user-manual +Title: ldapvi Use Manual +Abstract: This document helps you getting started with ldapvi, + an interactive LDAP client. +Section: Data Management + +Format: HTML +Index: /usr/share/doc/ldapvi/manual.html +Files: /usr/share/doc/ldapvi/manual.* --- ldapvi-1.7.orig/debian/patches/series +++ ldapvi-1.7/debian/patches/series @@ -0,0 +1,5 @@ +01_disable-libcrypto +02_sensible-editor-pager +03_unpaged-help +04_manpage-hyphen +05_getline-conflict --- ldapvi-1.7.orig/debian/patches/04_manpage-hyphen +++ ldapvi-1.7/debian/patches/04_manpage-hyphen @@ -0,0 +1,46 @@ +Description: escape the dashes so they don't become hyphens +Author: Gerfried Fuchs + +Index: ldapvi-1.7/ldapvi.1 +=================================================================== +--- ldapvi-1.7.orig/ldapvi.1 ++++ ldapvi-1.7/ldapvi.1 +@@ -41,7 +41,7 @@ Disable or enable SASL. + .TP + \fB\-\-bind\-dialog\fR [never,auto,always] + Interactive login dialog. +-.SS "SASL options (these parameters set --bind sasl):" ++.SS "SASL options (these parameters set \-\-bind sasl):" + .HP + \fB\-I\fR, \fB\-\-sasl\-interactive\fR Set \fB\-\-bind\-dialog\fR always. + .TP +@@ -177,10 +177,10 @@ Report bugs to "ldapvi@lists.askja.de". + Assuming a suitably configured LDAP library, run ldapvi without arguments + to see all entries available. + +-Otherwise, try `ldapvi -h HOSTNAME --discover' to query the ROOT DSE for ++Otherwise, try `ldapvi \-h HOSTNAME \-\-discover' to query the ROOT DSE for + available naming contexts. + +-Once that works, run `ldapvi -h HOSTNAME --discover --config' to ++Once that works, run `ldapvi \-h HOSTNAME \-\-discover \-\-config' to + generate sample configuration that can be pasted into ~/.ldaprc or + /etc/ldap/ldap.conf. + +Index: ldapvi-1.7/ldapvi.1.in +=================================================================== +--- ldapvi-1.7.orig/ldapvi.1.in ++++ ldapvi-1.7/ldapvi.1.in +@@ -2,10 +2,10 @@ + Assuming a suitably configured LDAP library, run ldapvi without arguments + to see all entries available. + +-Otherwise, try `ldapvi -h HOSTNAME --discover' to query the ROOT DSE for ++Otherwise, try `ldapvi \-h HOSTNAME \-\-discover' to query the ROOT DSE for + available naming contexts. + +-Once that works, run `ldapvi -h HOSTNAME --discover --config' to ++Once that works, run `ldapvi \-h HOSTNAME \-\-discover \-\-config' to + generate sample configuration that can be pasted into ~/.ldaprc or + /etc/ldap/ldap.conf. + --- ldapvi-1.7.orig/debian/patches/03_unpaged-help +++ ldapvi-1.7/debian/patches/03_unpaged-help @@ -0,0 +1,73 @@ +Description: adds the posibility to use an unpaged --help output +Origin: upstream, commit:fcee00ee +Bug-Debian: http://bugs.debian.org/424978 +Author: David Lichteblau + +Index: ldapvi-1.7/arguments.c +=================================================================== +--- ldapvi-1.7.orig/arguments.c ++++ ldapvi-1.7/arguments.c +@@ -115,7 +115,7 @@ enum ldapvi_option_numbers { + OPTION_NOQUESTIONS, OPTION_LDAPSEARCH, OPTION_LDAPMODIFY, + OPTION_LDAPDELETE, OPTION_LDAPMODDN, OPTION_LDAPMODRDN, OPTION_ADD, + OPTION_CONFIG, OPTION_READ, OPTION_LDAP_CONF, OPTION_BIND, +- OPTION_BIND_DIALOG ++ OPTION_BIND_DIALOG, OPTION_UNPAGED_HELP + }; + + static struct poptOption options[] = { +@@ -170,14 +170,17 @@ static struct poptOption options[] = { + {"ldapdelete", 0, 0, 0, OPTION_LDAPDELETE, 0, 0}, + {"ldapmoddn", 0, 0, 0, OPTION_LDAPMODDN, 0, 0}, + {"ldapmodrdn", 0, 0, 0, OPTION_LDAPMODRDN, 0, 0}, ++ {"unpaged-help", 0, 0, 0, OPTION_UNPAGED_HELP, 0, 0}, + {0, 0, 0, 0, 0} + }; + + ++static int usage_pagerp = 1; ++ + void + usage(int fd, int rc) + { +- if (fd == -1 && rc == 0 && isatty(1)) { ++ if (usage_pagerp && fd == -1 && rc == 0 && isatty(1)) { + int fd; + int pid = pipeview(&fd); + write(fd, USAGE, strlen(USAGE)); +@@ -479,6 +482,9 @@ parse_argument(int c, char *arg, cmdline + case OPTION_LDAP_CONF: + result->profileonlyp = 0; + break; ++ case OPTION_UNPAGED_HELP: ++ usage_pagerp = 0; ++ break; + case 'p': + parse_configuration(arg, result, ctrls); + break; +Index: ldapvi-1.7/manual/manual.xml +=================================================================== +--- ldapvi-1.7.orig/manual/manual.xml ++++ ldapvi-1.7/manual/manual.xml +@@ -718,6 +718,10 @@ wofuer was das doch gleich da? + suppress-configuration="suppress-configuration"> + Print help on command line arguments. + ++ ++ Disable the use of a pager ++ for --help. ++ + + When changing the relative distinguished name to a new attribute + value, delete the old attribute value instead of keeping it. +Index: ldapvi-1.7/NEWS +=================================================================== +--- ldapvi-1.7.orig/NEWS ++++ ldapvi-1.7/NEWS +@@ -1,3 +1,6 @@ ++1.8 2007-mm-dd ++ - new configuration option `unpaged-help' ++ + 1.7 2007-05-05 + - Fixed buffer overrun in home_filename(), thanks to Thomas Friebel. + --- ldapvi-1.7.orig/debian/patches/01_disable-libcrypto +++ ldapvi-1.7/debian/patches/01_disable-libcrypto @@ -0,0 +1,191 @@ +Description: disable libcrypto due to bug/licensing isssues +Author: David Lichteblau + +Index: ldapvi-1.7/config.h.in +=================================================================== +--- ldapvi-1.7.orig/config.h.in ++++ ldapvi-1.7/config.h.in +@@ -5,5 +5,6 @@ + #undef HAVE_OPENSSL + #undef HAVE_GNUTLS + #undef HAVE_SHA1 ++#undef HAVE_MD5 + #undef RAND_PSEUDO_BYTES + #undef HAVE_SASL +Index: ldapvi-1.7/configure +=================================================================== +--- ldapvi-1.7.orig/configure ++++ ldapvi-1.7/configure +@@ -4836,6 +4836,8 @@ _ACEOF + _ACEOF + + ;; ++ none) ++ ;; + *) + { { echo "$as_me:$LINENO: error: invalid value --with-libcrypto=$with_libcrypto, expected openssl or gnutls" >&5 + echo "$as_me: error: invalid value --with-libcrypto=$with_libcrypto, expected openssl or gnutls" >&2;} +@@ -4937,6 +4939,100 @@ fi + done + + ++for ac_func in MD5 ++do ++as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` ++{ echo "$as_me:$LINENO: checking for $ac_func" >&5 ++echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } ++if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then ++ echo $ECHO_N "(cached) $ECHO_C" >&6 ++else ++ cat >conftest.$ac_ext <<_ACEOF ++/* confdefs.h. */ ++_ACEOF ++cat confdefs.h >>conftest.$ac_ext ++cat >>conftest.$ac_ext <<_ACEOF ++/* end confdefs.h. */ ++/* Define $ac_func to an innocuous variant, in case declares $ac_func. ++ For example, HP-UX 11i declares gettimeofday. */ ++#define $ac_func innocuous_$ac_func ++ ++/* System header to define __stub macros and hopefully few prototypes, ++ which can conflict with char $ac_func (); below. ++ Prefer to if __STDC__ is defined, since ++ exists even on freestanding compilers. */ ++ ++#ifdef __STDC__ ++# include ++#else ++# include ++#endif ++ ++#undef $ac_func ++ ++/* Override any GCC internal prototype to avoid an error. ++ Use char because int might match the return type of a GCC ++ builtin and then its argument prototype would still apply. */ ++#ifdef __cplusplus ++extern "C" ++#endif ++char $ac_func (); ++/* The GNU C library defines this for functions which it implements ++ to always fail with ENOSYS. Some functions are actually named ++ something starting with __ and the normal name is an alias. */ ++#if defined __stub_$ac_func || defined __stub___$ac_func ++choke me ++#endif ++ ++int ++main () ++{ ++return $ac_func (); ++ ; ++ return 0; ++} ++_ACEOF ++rm -f conftest.$ac_objext conftest$ac_exeext ++if { (ac_try="$ac_link" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++ (eval "$ac_link") 2>conftest.er1 ++ ac_status=$? ++ grep -v '^ *+' conftest.er1 >conftest.err ++ rm -f conftest.er1 ++ cat conftest.err >&5 ++ echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest$ac_exeext && ++ $as_test_x conftest$ac_exeext; then ++ eval "$as_ac_var=yes" ++else ++ echo "$as_me: failed program was:" >&5 ++sed 's/^/| /' conftest.$ac_ext >&5 ++ ++ eval "$as_ac_var=no" ++fi ++ ++rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ ++ conftest$ac_exeext conftest.$ac_ext ++fi ++ac_res=`eval echo '${'$as_ac_var'}'` ++ { echo "$as_me:$LINENO: result: $ac_res" >&5 ++echo "${ECHO_T}$ac_res" >&6; } ++if test `eval echo '${'$as_ac_var'}'` = yes; then ++ cat >>confdefs.h <<_ACEOF ++#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 ++_ACEOF ++ ++fi ++done ++ ++ + for ac_func in RAND_pseudo_bytes + do + as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +Index: ldapvi-1.7/configure.in +=================================================================== +--- ldapvi-1.7.orig/configure.in ++++ ldapvi-1.7/configure.in +@@ -73,11 +73,14 @@ case $with_libcrypto in + AC_DEFINE(HAVE_GNUTLS) + AC_DEFINE(SHA_DIGEST_LENGTH,20) + ;; ++ none) ++ ;; + *) + AC_MSG_ERROR([invalid value --with-libcrypto=$with_libcrypto, expected openssl or gnutls]) + ;; + esac + AC_CHECK_FUNCS([SHA1]) ++AC_CHECK_FUNCS([MD5]) + AC_CHECK_FUNCS([RAND_pseudo_bytes]) + + AC_CHECK_LIB([crypt],[main]) +Index: ldapvi-1.7/port.c +=================================================================== +--- ldapvi-1.7.orig/port.c ++++ ldapvi-1.7/port.c +@@ -39,7 +39,7 @@ + #include + #include + #else +-#error oops ++#warning Compiling without cryptographic routines. + #endif + + #ifndef HAVE_RAND_PSEUDO_BYTES +@@ -148,15 +148,21 @@ g_string_append_ssha(GString *string, ch + int + g_string_append_md5(GString *string, char *key) + { ++#ifdef HAVE_MD5 + unsigned char tmp[MD5_DIGEST_LENGTH]; + MD5((unsigned char *) key, strlen(key), tmp); + g_string_append_base64(string, tmp, sizeof(tmp)); + return 1; ++#else ++ puts("Sorry, MD5 support not linked into ldapvi."); ++ return 0; ++#endif + } + + int + g_string_append_smd5(GString *string, char *key) + { ++#ifdef HAVE_MD5 + unsigned char rand[4]; + unsigned char tmp[MD5_DIGEST_LENGTH + sizeof(rand)]; + MD5_CTX MD5context; +@@ -172,4 +178,8 @@ g_string_append_smd5(GString *string, ch + g_string_append_base64(string, tmp, sizeof(tmp)); + + return 1; ++#else ++ puts("Sorry, SMD5 support not linked into ldapvi."); ++ return 0; ++#endif + } --- ldapvi-1.7.orig/debian/patches/05_getline-conflict +++ ldapvi-1.7/debian/patches/05_getline-conflict @@ -0,0 +1,44 @@ +Description: rename internal getline function to avoid conflict +Origin: upstream, commit:bf7af39b +Bug-Debian: http://bugs.debian.org/552868 +Author: David Lichteblau + +Index: ldapvi-1.7/common.h +=================================================================== +--- ldapvi-1.7.orig/common.h ++++ ldapvi-1.7/common.h +@@ -273,7 +273,7 @@ void pipeview_wait(int pid); + char *home_filename(char *name); + void read_ldapvi_history(void); + void write_ldapvi_history(void); +-char *getline(char *prompt, char *value); ++char *ldapvi_getline(char *prompt, char *value); + char *get_password(); + char *append(char *a, char *b); + void *xalloc(size_t size); +Index: ldapvi-1.7/misc.c +=================================================================== +--- ldapvi-1.7.orig/misc.c ++++ ldapvi-1.7/misc.c +@@ -319,7 +319,7 @@ write_ldapvi_history() + } + + char * +-getline(char *prompt, char *value) ++ldapvi_getline(char *prompt, char *value) + { + tdialog d; + init_dialog(&d, DIALOG_DEFAULT, prompt, value); +Index: ldapvi-1.7/ldapvi.c +=================================================================== +--- ldapvi-1.7.orig/ldapvi.c ++++ ldapvi-1.7/ldapvi.c +@@ -470,7 +470,7 @@ change_mechanism(bind_options *bo) + bo->authmethod = LDAP_AUTH_SASL; + puts("Switching to SASL authentication."); + } +- bo->sasl_mech = getline("SASL mechanism", bo->sasl_mech); ++ bo->sasl_mech = ldapvi_getline("SASL mechanism", bo->sasl_mech); + } + + static int --- ldapvi-1.7.orig/debian/patches/02_sensible-editor-pager +++ ldapvi-1.7/debian/patches/02_sensible-editor-pager @@ -0,0 +1,31 @@ +Description: use sensible-{editor,pager} instead of vi and less +Forwarded: not-needed +Bug-Debian: http://bugs.debian.org/367995 +Author: Gerfried Fuchs + +Index: ldapvi-1.7/misc.c +=================================================================== +--- ldapvi-1.7.orig/misc.c ++++ ldapvi-1.7/misc.c +@@ -163,7 +163,9 @@ edit(char *pathname, long line) + + vi = getenv("VISUAL"); + if (!vi) vi = getenv("EDITOR"); +- if (!vi) vi = "vi"; ++ /* changed from "vi" as fallback to "sensible-editor" which is what ++ * Debian really uses (closes: #367995) */ ++ if (!vi) vi = "sensible-editor"; + + switch ( (childpid = fork())) { + case -1: +@@ -204,7 +206,9 @@ view(char *pathname) + char *clear = tigetstr("clear"); + + pg = getenv("PAGER"); +- if (!pg) pg = "less"; ++ /* changed from "less" as fallback to "sensible-pager" which is what ++ * Debian really uses */ ++ if (!pg) pg = "sensible-pager"; + + if (!invalidp(clear)) + putp(clear);